dealpos 12.10.2 → 12.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/POS/1081.f55fad039f737252.js +1 -0
  2. package/POS/1126.c1814c2077ad5ce4.js +1 -0
  3. package/POS/1145.8d3eb685f037cfda.js +1 -0
  4. package/POS/1258.feb7b98fdaa6109a.js +1 -0
  5. package/POS/1530.7548a54008996d76.js +1 -0
  6. package/POS/1775.cdf3f474781397bb.js +1 -0
  7. package/POS/1863.fbfea822b0fdc3ec.js +1 -0
  8. package/POS/1880.8c05eb47c7b451d5.js +1 -0
  9. package/POS/1977.bb4354fc853a7bab.js +1 -0
  10. package/POS/2210.5b2dced33e8a7005.js +1 -0
  11. package/POS/222.67828a83b75c3c75.js +1 -0
  12. package/POS/2358.d968f0014f9198bb.js +1 -0
  13. package/POS/2871.21059ba009315140.js +1 -0
  14. package/POS/3044.aba7b259487aec9d.js +1 -0
  15. package/POS/3047.8bb19eb7ab2aeeed.js +1 -0
  16. package/POS/3422.06d1a90861175e9a.js +1 -0
  17. package/POS/3565.ad9fe9f2e84d4ea7.js +1 -0
  18. package/POS/{4576.f0c40b83408809a7.js → 3576.81c46596063eb20b.js} +1 -1
  19. package/POS/3672.2f01ce303a5863a4.js +1 -0
  20. package/POS/3831.408127d0f8704ac9.js +1 -0
  21. package/POS/3942.5f370f3aff087dd9.js +1 -0
  22. package/POS/3962.85725f802739f233.js +1 -0
  23. package/POS/4453.ba7f153df91d566d.js +1 -0
  24. package/POS/4971.5cf2d9c50992b262.js +1 -0
  25. package/POS/566.325a87c58ee37b0f.js +1 -0
  26. package/POS/58.e852f3d907366eda.js +1 -0
  27. package/POS/6097.0fb86aaa71059f0c.js +1 -0
  28. package/POS/6428.e18e0ea2a745fa66.js +1 -0
  29. package/POS/6654.36a390e1651f5e97.js +1 -0
  30. package/POS/{6865.9d564d18c1771175.js → 6865.8ecf3ebfda7785c8.js} +1 -1
  31. package/POS/7117.bc579d4c97f2d780.js +1 -0
  32. package/POS/7618.8ba9b7c2cd8e91d9.js +1 -0
  33. package/POS/7714.4fd9529912a886cf.js +1 -0
  34. package/POS/{7733.c496cbe74f2ddfb7.js → 7733.d71cd232369b4653.js} +1 -1
  35. package/POS/7836.0607b945ec4d038f.js +1 -0
  36. package/POS/8053.5caa51cff952cc91.js +1 -0
  37. package/POS/8117.eeee6ab40f0700b8.js +1 -0
  38. package/POS/8146.ece3cfe1b3cc56b7.js +1 -0
  39. package/POS/8335.3895e90b2ba5ff66.js +1 -0
  40. package/POS/9014.c35361afdad684be.js +1 -0
  41. package/POS/9069.8a1bbaca7d394c52.js +1 -0
  42. package/POS/9071.97d46d0872afdd17.js +1 -0
  43. package/POS/9484.39729b9444312102.js +1 -0
  44. package/POS/{9856.7110c6559761f249.js → 9856.9165cf7afd85488c.js} +1 -1
  45. package/POS/9914.9b8c914f1ae82204.js +1 -0
  46. package/POS/common.336eded8a649192f.js +1 -0
  47. package/POS/index.html +3 -3
  48. package/POS/main.7b07b60eff1b16e4.js +1 -0
  49. package/POS/runtime.195303192ea8211e.js +1 -0
  50. package/POS/{styles.4e75ca4e4b8892b5.css → styles.c232b3b5224fcdd8.css} +1 -1
  51. package/package.json +1 -1
  52. package/POS/1126.80923b0a8356c113.js +0 -1
  53. package/POS/1145.236fd6df28f624a9.js +0 -1
  54. package/POS/1563.6e9ddeafa4196fb5.js +0 -1
  55. package/POS/1775.3bed34dc72522561.js +0 -1
  56. package/POS/1824.e0c9b0e17d0b2586.js +0 -1
  57. package/POS/1877.102d5eb1f2eaccd8.js +0 -1
  58. package/POS/1880.52f8c0df0b4b22b2.js +0 -1
  59. package/POS/1977.3d0e386c4299ab51.js +0 -1
  60. package/POS/2020.0f2c05e11bf1e6ef.js +0 -1
  61. package/POS/2116.0b36d2ac9f9b75b6.js +0 -1
  62. package/POS/2210.4e6c027d354de06e.js +0 -1
  63. package/POS/2405.fd09b9c9e6244c47.js +0 -1
  64. package/POS/2453.6261c8b310773f28.js +0 -1
  65. package/POS/2635.fa9d6725e9b8034e.js +0 -1
  66. package/POS/3044.7f0b93b27fd1d17e.js +0 -1
  67. package/POS/3047.afbbfe3033f80f08.js +0 -1
  68. package/POS/3103.55dc2787c072819f.js +0 -1
  69. package/POS/3204.a97b74ef5f99212f.js +0 -1
  70. package/POS/329.95865ac4b808fcf8.js +0 -1
  71. package/POS/3565.1c862beaba69ffca.js +0 -1
  72. package/POS/3831.55f7e6494361286e.js +0 -1
  73. package/POS/3942.851cf7ecbe364c9a.js +0 -1
  74. package/POS/3962.b683dcf1ad1d4324.js +0 -1
  75. package/POS/4192.b46f92c9ef5707a3.js +0 -1
  76. package/POS/4499.5b71f6f650b4d46c.js +0 -1
  77. package/POS/4971.7894e84dd358aa51.js +0 -1
  78. package/POS/5465.5e701d2d7cf1b6be.js +0 -1
  79. package/POS/58.fc1197e382062785.js +0 -1
  80. package/POS/5880.46cb6c0c1a6394b8.js +0 -1
  81. package/POS/6050.fc7f81de6e037e52.js +0 -1
  82. package/POS/6097.132478d6a679a0c1.js +0 -1
  83. package/POS/6428.3f67c74463ebc084.js +0 -1
  84. package/POS/7117.6a014b74d103fb45.js +0 -1
  85. package/POS/7618.e7a3bbcffd3f470a.js +0 -1
  86. package/POS/7836.5a658f584fbb7f7f.js +0 -1
  87. package/POS/8629.381e0838ae91ff0b.js +0 -1
  88. package/POS/9121.41f5d252ee0e8ca2.js +0 -1
  89. package/POS/9484.0e373b1beae97883.js +0 -1
  90. package/POS/9511.b0aa1361a75500dc.js +0 -1
  91. package/POS/common.a189ee5d432bfe3b.js +0 -1
  92. package/POS/main.4b4c87f1db8dfc61.js +0 -1
  93. package/POS/runtime.916d5f63ede54365.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1081],{48807:(q,O,y)=>{y.d(O,{y:()=>p});var p=function(S){return S[S.PAID=0]="PAID",S[S.OVERDUE=1]="OVERDUE",S[S.SELL_ONLY=2]="SELL_ONLY",S[S.SUSPENDED=3]="SUSPENDED",S}(p||{})},91925:(q,O,y)=>{y.d(O,{G:()=>We});var p=y(81180);const S=[0,2e3,1e4,3e4,null];class j{constructor(e){this._retryDelays=void 0!==e?[...e,null]:S}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}var _=y(15861);let T=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();class Z{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}}class x{get(e,t){return this.send({...t,method:"GET",url:e})}post(e,t){return this.send({...t,method:"POST",url:e})}delete(e,t){return this.send({...t,method:"DELETE",url:e})}getCookieString(e){return""}}class ee extends x{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){var t=this;return(0,_.Z)(function*(){let n=!0;t._accessTokenFactory&&(!t._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,t._accessToken=yield t._accessTokenFactory()),t._setAuthorizationHeader(e);const o=yield t._innerClient.send(e);return n&&401===o.statusCode&&t._accessTokenFactory?(t._accessToken=yield t._accessTokenFactory(),t._setAuthorizationHeader(e),yield t._innerClient.send(e)):o})()}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[T.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[T.Authorization]&&delete e.headers[T.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}class E extends Error{constructor(e,t){const n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}}class W extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class k extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class te extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}}class ne extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}}class oe extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}}class re extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class se extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}}var i=function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r}(i||{});class ${constructor(){}log(e,t){}}$.instance=new $;const ie="7.0.10";class m{static isRequired(e,t){if(null==e)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}}class b{static get isBrowser(){return"object"==typeof window&&"object"==typeof window.document}static get isWebWorker(){return"object"==typeof self&&"importScripts"in self}static get isReactNative(){return"object"==typeof window&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function D(r,e){let t="";return R(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${function ce(r){const e=new Uint8Array(r);let t="";return e.forEach(n=>{t+=`0x${n<16?"0":""}${n.toString(16)} `}),t.substr(0,t.length-1)}(r)}'`)):"string"==typeof r&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function R(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&"ArrayBuffer"===r.constructor.name)}function B(r,e,t,n,o,s){return U.apply(this,arguments)}function U(){return(U=(0,_.Z)(function*(r,e,t,n,o,s){const a={},[c,l]=I();a[c]=l,r.log(i.Trace,`(${e} transport) sending data. ${D(o,s.logMessageContent)}.`);const h=R(o)?"arraybuffer":"text",u=yield t.post(n,{content:o,headers:{...a,...s.headers},responseType:h,timeout:s.timeout,withCredentials:s.withCredentials});r.log(i.Trace,`(${e} transport) request complete. Response status: ${u.statusCode}.`)})).apply(this,arguments)}class le{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}}class A{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${i[e]}: ${t}`;switch(e){case i.Critical:case i.Error:this.out.error(n);break;case i.Warning:this.out.warn(n);break;case i.Information:this.out.info(n);break;default:this.out.log(n)}}}}function I(){let r="X-SignalR-User-Agent";return b.isNode&&(r="User-Agent"),[r,he(ie,ue(),b.isNode?"NodeJS":"Browser",de())]}function he(r,e,t,n){let o="Microsoft SignalR/";const s=r.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${r}; `,o+=e&&""!==e?`${e}; `:"Unknown OS; ",o+=`${t}`,o+=n?`; ${n}`:"; Unknown Runtime Version",o+=")",o}function ue(){if(!b.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function de(){if(b.isNode)return process.versions.node}function F(r){return r.stack?r.stack:r.message?r.message:`${r}`}class _e extends x{constructor(e){if(super(),this._logger=e,typeof fetch>"u"){const t=require;this._jar=new(t("tough-cookie").CookieJar),this._fetchType=t("node-fetch"),this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function fe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}());if(typeof AbortController>"u"){const t=require;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){var t=this;return(0,_.Z)(function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new k;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new t._abortControllerType;let o;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),o=new k});let a,s=null;e.timeout&&(s=setTimeout(()=>{n.abort(),t._logger.log(i.Warning,"Timeout from HTTP request."),o=new W},e.timeout)),""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},e.headers["Content-Type"]=R(e.content)?"application/octet-stream":"text/plain;charset=UTF-8");try{a=yield t._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(h){throw o||(t._logger.log(i.Warning,`Error from HTTP request. ${h}.`),h)}finally{s&&clearTimeout(s),e.abortSignal&&(e.abortSignal.onabort=null)}if(!a.ok){const h=yield z(a,"text");throw new E(h||a.statusText,a.status)}const l=yield z(a,e.responseType);return new Z(a.status,a.statusText,l)})()}getCookieString(e){let t="";return b.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}}function z(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":default:t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`)}return t}class pe extends x{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new k):e.method?e.url?new Promise((t,n)=>{const o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=void 0===e.withCredentials||e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(R(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=e.headers;s&&Object.keys(s).forEach(a=>{o.setRequestHeader(a,s[a])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new k)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new Z(o.status,o.statusText,o.response||o.responseText)):n(new E(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(i.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new E(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(i.Warning,"Timeout from HTTP request."),n(new W)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class me extends x{constructor(e){if(super(),typeof fetch<"u"||b.isNode)this._httpClient=new _e(e);else{if(!(typeof XMLHttpRequest<"u"))throw new Error("No usable HttpClient found.");this._httpClient=new pe(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new k):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}var w=function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r}(w||{}),C=function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r}(C||{});class be{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class X{constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new be,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}connect(e,t){var n=this;return(0,_.Z)(function*(){if(m.isRequired(e,"url"),m.isRequired(t,"transferFormat"),m.isIn(t,C,"transferFormat"),n._url=e,n._logger.log(i.Trace,"(LongPolling transport) Connecting."),t===C.Binary&&typeof XMLHttpRequest<"u"&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[o,s]=I(),a={[o]:s,...n._options.headers},c={abortSignal:n._pollAbort.signal,headers:a,timeout:1e5,withCredentials:n._options.withCredentials};t===C.Binary&&(c.responseType="arraybuffer");const l=`${e}&_=${Date.now()}`;n._logger.log(i.Trace,`(LongPolling transport) polling: ${l}.`);const h=yield n._httpClient.get(l,c);200!==h.statusCode?(n._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${h.statusCode}.`),n._closeError=new E(h.statusText||"",h.statusCode),n._running=!1):n._running=!0,n._receiving=n._poll(n._url,c)})()}_poll(e,t){var n=this;return(0,_.Z)(function*(){try{for(;n._running;)try{const o=`${e}&_=${Date.now()}`;n._logger.log(i.Trace,`(LongPolling transport) polling: ${o}.`);const s=yield n._httpClient.get(o,t);204===s.statusCode?(n._logger.log(i.Information,"(LongPolling transport) Poll terminated by server."),n._running=!1):200!==s.statusCode?(n._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${s.statusCode}.`),n._closeError=new E(s.statusText||"",s.statusCode),n._running=!1):s.content?(n._logger.log(i.Trace,`(LongPolling transport) data received. ${D(s.content,n._options.logMessageContent)}.`),n.onreceive&&n.onreceive(s.content)):n._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){n._running?o instanceof W?n._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(n._closeError=o,n._running=!1):n._logger.log(i.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{n._logger.log(i.Trace,"(LongPolling transport) Polling complete."),n.pollAborted||n._raiseOnClose()}})()}send(e){var t=this;return(0,_.Z)(function*(){return t._running?B(t._logger,"LongPolling",t._httpClient,t._url,e,t._options):Promise.reject(new Error("Cannot send until the transport is connected"))})()}stop(){var e=this;return(0,_.Z)(function*(){e._logger.log(i.Trace,"(LongPolling transport) Stopping polling."),e._running=!1,e._pollAbort.abort();try{yield e._receiving,e._logger.log(i.Trace,`(LongPolling transport) sending DELETE request to ${e._url}.`);const t={},[n,o]=I();t[n]=o;const s={headers:{...t,...e._options.headers},timeout:e._options.timeout,withCredentials:e._options.withCredentials};yield e._httpClient.delete(e._url,s),e._logger.log(i.Trace,"(LongPolling transport) DELETE request sent.")}finally{e._logger.log(i.Trace,"(LongPolling transport) Stop finished."),e._raiseOnClose()}})()}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(i.Trace,e),this.onclose(this._closeError)}}}class we{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){var n=this;return(0,_.Z)(function*(){return m.isRequired(e,"url"),m.isRequired(t,"transferFormat"),m.isIn(t,C,"transferFormat"),n._logger.log(i.Trace,"(SSE transport) Connecting."),n._url=e,n._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n._accessToken)}`),new Promise((o,s)=>{let c,a=!1;if(t===C.Text){if(b.isBrowser||b.isWebWorker)c=new n._options.EventSource(e,{withCredentials:n._options.withCredentials});else{const l=n._httpClient.getCookieString(e),h={};h.Cookie=l;const[u,d]=I();h[u]=d,c=new n._options.EventSource(e,{withCredentials:n._options.withCredentials,headers:{...h,...n._options.headers}})}try{c.onmessage=l=>{if(n.onreceive)try{n._logger.log(i.Trace,`(SSE transport) data received. ${D(l.data,n._options.logMessageContent)}.`),n.onreceive(l.data)}catch(h){return void n._close(h)}},c.onerror=l=>{a?n._close():s(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{n._logger.log(i.Information,`SSE connected to ${n._url}`),n._eventSource=c,a=!0,o()}}catch(l){return void s(l)}}else s(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})})()}send(e){var t=this;return(0,_.Z)(function*(){return t._eventSource?B(t._logger,"SSE",t._httpClient,t._url,e,t._options):Promise.reject(new Error("Cannot send until the transport is connected"))})()}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class Ce{constructor(e,t,n,o,s,a){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=a}connect(e,t){var n=this;return(0,_.Z)(function*(){let o;return m.isRequired(e,"url"),m.isRequired(t,"transferFormat"),m.isIn(t,C,"transferFormat"),n._logger.log(i.Trace,"(WebSockets transport) Connecting."),n._accessTokenFactory&&(o=yield n._accessTokenFactory()),new Promise((s,a)=>{let c;e=e.replace(/^http/,"ws");const l=n._httpClient.getCookieString(e);let h=!1;if(b.isNode||b.isReactNative){const u={},[d,P]=I();u[d]=P,o&&(u[T.Authorization]=`Bearer ${o}`),l&&(u[T.Cookie]=l),c=new n._webSocketConstructor(e,void 0,{headers:{...u,...n._headers}})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);c||(c=new n._webSocketConstructor(e)),t===C.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{n._logger.log(i.Information,`WebSocket connected to ${e}.`),n._webSocket=c,h=!0,s()},c.onerror=u=>{let d=null;d=typeof ErrorEvent<"u"&&u instanceof ErrorEvent?u.error:"There was an error with the transport",n._logger.log(i.Information,`(WebSockets transport) ${d}.`)},c.onmessage=u=>{if(n._logger.log(i.Trace,`(WebSockets transport) data received. ${D(u.data,n._logMessageContent)}.`),n.onreceive)try{n.onreceive(u.data)}catch(d){return void n._close(d)}},c.onclose=u=>{if(h)n._close(u);else{let d=null;d=typeof ErrorEvent<"u"&&u instanceof ErrorEvent?u.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",a(new Error(d))}}})})()}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(i.Trace,`(WebSockets transport) sending data. ${D(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class ye{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,m.isRequired(e,"url"),this._logger=function ae(r){return void 0===r?new A(i.Information):null===r?$.instance:void 0!==r.log?r:new A(r)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout;let n=null,o=null;if(b.isNode){const s=require;n=s("ws"),o=s("eventsource")}!b.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:b.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!b.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:b.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new ee(t.httpClient||new me(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){var t=this;return(0,_.Z)(function*(){if(m.isIn(e=e||C.Binary,C,"transferFormat"),t._logger.log(i.Debug,`Starting connection with transfer format '${C[e]}'.`),"Disconnected"!==t._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(t._connectionState="Connecting",t._startInternalPromise=t._startInternal(e),yield t._startInternalPromise,"Disconnecting"===t._connectionState){const n="Failed to start the HttpConnection before stop() was called.";return t._logger.log(i.Error,n),yield t._stopPromise,Promise.reject(new k(n))}if("Connected"!==t._connectionState){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return t._logger.log(i.Error,n),Promise.reject(new k(n))}t._connectionStarted=!0})()}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new L(this.transport)),this._sendQueue.send(e))}stop(e){var t=this;return(0,_.Z)(function*(){return"Disconnected"===t._connectionState?(t._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===t._connectionState?(t._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),t._stopPromise):(t._connectionState="Disconnecting",t._stopPromise=new Promise(n=>{t._stopPromiseResolver=n}),yield t._stopInternal(e),void(yield t._stopPromise))})()}_stopInternal(e){var t=this;return(0,_.Z)(function*(){t._stopError=e;try{yield t._startInternalPromise}catch{}if(t.transport){try{yield t.transport.stop()}catch(n){t._logger.log(i.Error,`HttpConnection.transport.stop() threw error '${n}'.`),t._stopConnection()}t.transport=void 0}else t._logger.log(i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})()}_startInternal(e){var t=this;return(0,_.Z)(function*(){let n=t.baseUrl;t._accessTokenFactory=t._options.accessTokenFactory,t._httpClient._accessTokenFactory=t._accessTokenFactory;try{if(t._options.skipNegotiation){if(t._options.transport!==w.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");t.transport=t._constructTransport(w.WebSockets),yield t._startTransport(n,e)}else{let o=null,s=0;do{if(o=yield t._getNegotiationResponse(n),"Disconnecting"===t._connectionState||"Disconnected"===t._connectionState)throw new k("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(n=o.url),o.accessToken){const a=o.accessToken;t._accessTokenFactory=()=>a,t._httpClient._accessToken=a,t._httpClient._accessTokenFactory=void 0}s++}while(o.url&&s<100);if(100===s&&o.url)throw new Error("Negotiate redirection limit exceeded.");yield t._createTransport(n,t._options.transport,o,e)}t.transport instanceof X&&(t.features.inherentKeepAlive=!0),"Connecting"===t._connectionState&&(t._logger.log(i.Debug,"The HttpConnection connected successfully."),t._connectionState="Connected")}catch(o){return t._logger.log(i.Error,"Failed to start the connection: "+o),t._connectionState="Disconnected",t.transport=void 0,t._stopPromiseResolver(),Promise.reject(o)}})()}_getNegotiationResponse(e){var t=this;return(0,_.Z)(function*(){const n={},[o,s]=I();n[o]=s;const a=t._resolveNegotiateUrl(e);t._logger.log(i.Debug,`Sending negotiation request: ${a}.`);try{const c=yield t._httpClient.post(a,{content:"",headers:{...n,...t._options.headers},timeout:t._options.timeout,withCredentials:t._options.withCredentials});if(200!==c.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));const l=JSON.parse(c.content);return(!l.negotiateVersion||l.negotiateVersion<1)&&(l.connectionToken=l.connectionId),l}catch(c){let l="Failed to complete negotiation with the server: "+c;return c instanceof E&&404===c.statusCode&&(l+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),t._logger.log(i.Error,l),Promise.reject(new re(l))}})()}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){var s=this;return(0,_.Z)(function*(){let a=s._createConnectUrl(e,n.connectionToken);if(s._isITransport(t))return s._logger.log(i.Debug,"Connection was provided an instance of ITransport, using that directly."),s.transport=t,yield s._startTransport(a,o),void(s.connectionId=n.connectionId);const c=[],l=n.availableTransports||[];let h=n;for(const u of l){const d=s._resolveTransportOrError(u,t,o);if(d instanceof Error)c.push(`${u.transport} failed:`),c.push(d);else if(s._isITransport(d)){if(s.transport=d,!h){try{h=yield s._getNegotiationResponse(e)}catch(P){return Promise.reject(P)}a=s._createConnectUrl(e,h.connectionToken)}try{return yield s._startTransport(a,o),void(s.connectionId=h.connectionId)}catch(P){if(s._logger.log(i.Error,`Failed to start the transport '${u.transport}': ${P}`),h=void 0,c.push(new oe(`${u.transport} failed: ${P}`,w[u.transport])),"Connecting"!==s._connectionState){const Q="Failed to select transport before stop() was called.";return s._logger.log(i.Debug,Q),Promise.reject(new k(Q))}}}}return Promise.reject(c.length>0?new se(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c):new Error("None of the transports supported by the client are supported by the server."))})()}_constructTransport(e){switch(e){case w.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Ce(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case w.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new we(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case w.LongPolling:return new X(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n){const o=w[e.transport];if(null==o)return this._logger.log(i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(!function ve(r,e){return!r||0!=(e&r)}(t,o))return this._logger.log(i.Debug,`Skipping transport '${w[o]}' because it was disabled by the client.`),new ne(`'${w[o]}' is disabled by the client.`,o);if(!(e.transferFormats.map(a=>C[a]).indexOf(n)>=0))return this._logger.log(i.Debug,`Skipping transport '${w[o]}' because it does not support the requested transfer format '${C[n]}'.`),new Error(`'${w[o]}' does not support ${C[n]}.`);if(o===w.WebSockets&&!this._options.WebSocket||o===w.ServerSentEvents&&!this._options.EventSource)return this._logger.log(i.Debug,`Skipping transport '${w[o]}' because it is not supported in your environment.'`),new te(`'${w[o]}' is not supported in your environment.`,o);this._logger.log(i.Debug,`Selecting transport '${w[o]}'.`);try{return this._constructTransport(o)}catch(a){return a}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(i.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!b.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=e.indexOf("?");let n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",n+=-1===t?"":e.substring(t),-1===n.indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this._negotiateVersion),n}}class L{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new H,this._transportResult=new H,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new H),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){var e=this;return(0,_.Z)(function*(){for(;;){if(yield e._sendBufferedData.promise,!e._executing){e._transportResult&&e._transportResult.reject("Connection stopped.");break}e._sendBufferedData=new H;const t=e._transportResult;e._transportResult=void 0;const n="string"==typeof e._buffer[0]?e._buffer.join(""):L._concatBuffers(e._buffer);e._buffer.length=0;try{yield e._transport.send(n),t.resolve()}catch(o){t.reject(o)}}})()}static _concatBuffers(e){const t=e.map(s=>s.byteLength).reduce((s,a)=>s+a),n=new Uint8Array(t);let o=0;for(const s of e)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}}class H{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class v{static write(e){return`${e}${v.RecordSeparator}`}static parse(e){if(e[e.length-1]!==v.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(v.RecordSeparator);return t.pop(),t}}v.RecordSeparatorCode=30,v.RecordSeparator=String.fromCharCode(v.RecordSeparatorCode);class Se{writeHandshakeRequest(e){return v.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(R(e)){const c=new Uint8Array(e),l=c.indexOf(v.RecordSeparatorCode);if(-1===l)throw new Error("Message is incomplete.");const h=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(c.slice(0,h))),n=c.byteLength>h?c.slice(h).buffer:null}else{const c=e,l=c.indexOf(v.RecordSeparator);if(-1===l)throw new Error("Message is incomplete.");const h=l+1;t=c.substring(0,h),n=c.length>h?c.substring(h):null}const o=v.parse(t),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var g=function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r}(g||{});class ke{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new le(this,e)}}var f=function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r}(f||{});class M{constructor(e,t,n,o){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},m.isRequired(e,"connection"),m.isRequired(t,"logger"),m.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new Se,this.connection.onreceive=s=>this._processIncomingData(s),this.connection.onclose=s=>this._connectionClosed(s),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=f.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:g.Ping})}static create(e,t,n,o){return new M(e,t,n,o)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==f.Disconnected&&this._connectionState!==f.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){var e=this;return(0,_.Z)(function*(){if(e._connectionState!==f.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));e._connectionState=f.Connecting,e._logger.log(i.Debug,"Starting HubConnection.");try{yield e._startInternal(),b.isBrowser&&window.document.addEventListener("freeze",e._freezeEventListener),e._connectionState=f.Connected,e._connectionStarted=!0,e._logger.log(i.Debug,"HubConnection connected successfully.")}catch(t){return e._connectionState=f.Disconnected,e._logger.log(i.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}})()}_startInternal(){var e=this;return(0,_.Z)(function*(){e._stopDuringStartError=void 0,e._receivedHandshakeResponse=!1;const t=new Promise((n,o)=>{e._handshakeResolver=n,e._handshakeRejecter=o});yield e.connection.start(e._protocol.transferFormat);try{const n={protocol:e._protocol.name,version:e._protocol.version};if(e._logger.log(i.Debug,"Sending handshake request."),yield e._sendMessage(e._handshakeProtocol.writeHandshakeRequest(n)),e._logger.log(i.Information,`Using HubProtocol '${e._protocol.name}'.`),e._cleanupTimeout(),e._resetTimeoutPeriod(),e._resetKeepAliveInterval(),yield t,e._stopDuringStartError)throw e._stopDuringStartError;e.connection.features.inherentKeepAlive||(yield e._sendMessage(e._cachedPingMessage))}catch(n){throw e._logger.log(i.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),e._cleanupTimeout(),e._cleanupPingTimer(),yield e.connection.stop(n),n}})()}stop(){var e=this;return(0,_.Z)(function*(){const t=e._startPromise;e._stopPromise=e._stopInternal(),yield e._stopPromise;try{yield t}catch{}})()}_stopInternal(e){return this._connectionState===f.Disconnected?(this._logger.log(i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===f.Disconnecting?(this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=f.Disconnecting,this._logger.log(i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new k("The connection was stopped before the hub handshake could complete."),this.connection.stop(e)))}stream(e,...t){const[n,o]=this._replaceStreamingParams(t),s=this._createStreamInvocation(e,t,o);let a;const c=new ke;return c.cancelCallback=()=>{const l=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],a.then(()=>this._sendWithProtocol(l))},this._callbacks[s.invocationId]=(l,h)=>{h?c.error(h):l&&(l.type===g.Completion?l.error?c.error(new Error(l.error)):c.complete():c.next(l.item))},a=this._sendWithProtocol(s).catch(l=>{c.error(l),delete this._callbacks[s.invocationId]}),this._launchStreams(n,a),c}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,o]=this._replaceStreamingParams(t),s=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,s),s}invoke(e,...t){const[n,o]=this._replaceStreamingParams(t),s=this._createInvocation(e,t,!1,o);return new Promise((c,l)=>{this._callbacks[s.invocationId]=(u,d)=>{d?l(d):u&&(u.type===g.Completion?u.error?l(new Error(u.error)):c(u.result):l(new Error(`Unexpected message type: ${u.type}`)))};const h=this._sendWithProtocol(s).catch(u=>{l(u),delete this._callbacks[s.invocationId]});this._launchStreams(n,h)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const o=n.indexOf(t);-1!==o&&(n.splice(o,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const n of t)switch(n.type){case g.Invocation:this._invokeClientMethod(n);break;case g.StreamItem:case g.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===g.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(i.Error,`Stream callback threw error: ${F(s)}`)}}break}case g.Ping:break;case g.Close:{this._logger.log(i.Information,"Close message received from server.");const o=n.error?new Error("Server returned an error on close: "+n.error):void 0;!0===n.allowReconnect?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}default:this._logger.log(i.Warning,`Invalid message type: ${n.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){const s="Error parsing handshake response: "+o;this._logger.log(i.Error,s);const a=new Error(s);throw this._handshakeRejecter(a),a}if(t.error){const o="Server returned handshake error: "+t.error;this._logger.log(i.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}return this._logger.log(i.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){var e=this;if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let t=this._nextKeepAlive-(new Date).getTime();t<0&&(t=0),this._pingServerHandle=setTimeout((0,_.Z)(function*(){if(e._connectionState===f.Connected)try{yield e._sendMessage(e._cachedPingMessage)}catch{e._cleanupPingTimer()}}),t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){var t=this;return(0,_.Z)(function*(){const n=e.target.toLowerCase(),o=t._methods[n];if(!o)return t._logger.log(i.Warning,`No client method with the name '${n}' found.`),void(e.invocationId&&(t._logger.log(i.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),yield t._sendWithProtocol(t._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const s=o.slice(),a=!!e.invocationId;let c,l,h;for(const u of s)try{const d=c;c=yield u.apply(t,e.arguments),a&&c&&d&&(t._logger.log(i.Error,`Multiple results provided for '${n}'. Sending error to server.`),h=t._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),l=void 0}catch(d){l=d,t._logger.log(i.Error,`A callback for the method '${n}' threw error '${d}'.`)}h?yield t._sendWithProtocol(h):a?(l?h=t._createCompletionMessage(e.invocationId,`${l}`,null):void 0!==c?h=t._createCompletionMessage(e.invocationId,null,c):(t._logger.log(i.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),h=t._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield t._sendWithProtocol(h)):c&&t._logger.log(i.Error,`Result given for '${n}' method but server is not expecting a result.`)})()}_connectionClosed(e){this._logger.log(i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new k("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===f.Disconnecting?this._completeClose(e):this._connectionState===f.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===f.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=f.Disconnected,this._connectionStarted=!1,b.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){var t=this;return(0,_.Z)(function*(){const n=Date.now();let o=0,s=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),a=t._getNextRetryDelay(o++,0,s);if(null===a)return t._logger.log(i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void t._completeClose(e);if(t._connectionState=f.Reconnecting,t._logger.log(i.Information,e?`Connection reconnecting because of error '${e}'.`:"Connection reconnecting."),0!==t._reconnectingCallbacks.length){try{t._reconnectingCallbacks.forEach(c=>c.apply(t,[e]))}catch(c){t._logger.log(i.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(t._connectionState!==f.Reconnecting)return void t._logger.log(i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==a;){if(t._logger.log(i.Information,`Reconnect attempt number ${o} will start in ${a} ms.`),yield new Promise(c=>{t._reconnectDelayHandle=setTimeout(c,a)}),t._reconnectDelayHandle=void 0,t._connectionState!==f.Reconnecting)return void t._logger.log(i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(yield t._startInternal(),t._connectionState=f.Connected,t._logger.log(i.Information,"HubConnection reconnected successfully."),0!==t._reconnectedCallbacks.length)try{t._reconnectedCallbacks.forEach(c=>c.apply(t,[t.connection.connectionId]))}catch(c){t._logger.log(i.Error,`An onreconnected callback called with connectionId '${t.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(t._logger.log(i.Information,`Reconnect attempt failed because of error '${c}'.`),t._connectionState!==f.Reconnecting)return t._logger.log(i.Debug,`Connection moved to the '${t._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(t._connectionState===f.Disconnecting&&t._completeClose());s=c instanceof Error?c:new Error(c.toString()),a=t._getNextRetryDelay(o++,Date.now()-n,s)}}t._logger.log(i.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${o} failed attempts. Connection disconnecting.`),t._completeClose()})()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{const o=t[n];try{o(null,e)}catch(s){this._logger.log(i.Error,`Stream 'error' callback called with '${e}' threw error: ${F(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return 0!==o.length?{arguments:t,streamIds:o,target:e,type:g.Invocation}:{arguments:t,target:e,type:g.Invocation};{const s=this._invocationId;return this._invocationId++,0!==o.length?{arguments:t,invocationId:s.toString(),streamIds:o,target:e,type:g.Invocation}:{arguments:t,invocationId:s.toString(),target:e,type:g.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;s=o instanceof Error?o.message:o&&o.toString?o.toString():"Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let o=0;o<e.length;o++){const s=e[o];if(this._isObservable(s)){const a=this._invocationId;this._invocationId++,t[a]=s,n.push(a.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&"function"==typeof e.subscribe}_createStreamInvocation(e,t,n){const o=this._invocationId;return this._invocationId++,0!==n.length?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:g.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:g.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:g.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:g.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:g.Completion}:{invocationId:e,result:n,type:g.Completion}}}class Te{constructor(){this.name="json",this.version=1,this.transferFormat=C.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=$.instance);const n=v.parse(e),o=[];for(const s of n){const a=JSON.parse(s);if("number"!=typeof a.type)throw new Error("Invalid payload.");switch(a.type){case g.Invocation:this._isInvocationMessage(a);break;case g.StreamItem:this._isStreamItemMessage(a);break;case g.Completion:this._isCompletionMessage(a);break;case g.Ping:case g.Close:break;default:t.log(i.Information,"Unknown message type '"+a.type+"' ignored.");continue}o.push(a)}return o}writeMessage(e){return v.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const $e={trace:i.Trace,debug:i.Debug,info:i.Information,information:i.Information,warn:i.Warning,warning:i.Warning,error:i.Error,critical:i.Critical,none:i.None};class Re{configureLogging(e){if(m.isRequired(e,"logging"),function xe(r){return void 0!==r.log}(e))this.logger=e;else if("string"==typeof e){const t=function De(r){const e=$e[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}(e);this.logger=new A(t)}else this.logger=new A(e);return this}withUrl(e,t){return m.isRequired(e,"url"),m.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return m.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return this.reconnectPolicy=e?Array.isArray(e)?new j(e):e:new j,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new ye(this.url,e);return M.create(t,this.logger||$.instance,this.protocol||new Te,this.reconnectPolicy)}}var N=y(78645),K=y(65619),Ae=y(2459),He=y(26306),G=y(58504),Ne=y(70108),J=y(86864),Y=y(65879),Oe=y(2425);let We=(()=>{var r;class e{constructor(n){(0,p.Z)(this,"toastr",void 0),(0,p.Z)(this,"port",window.location.href.split("localhost:")[1]?.split("/")[0]),(0,p.Z)(this,"hostURL",o=>Ne.N.production?o:`https://localhost:${this.port}${o}`),(0,p.Z)(this,"lastGroupID",void 0),(0,p.Z)(this,"OnPaymentReceived",new N.x),(0,p.Z)(this,"OnReceivePushNotification",new N.x),(0,p.Z)(this,"OnContactReceive",new N.x),(0,p.Z)(this,"OnPromotionEventChange",new N.x),(0,p.Z)(this,"_recacheOutlet",new K.X(!1)),(0,p.Z)(this,"recacheOutlet$",this._recacheOutlet.asObservable()),(0,p.Z)(this,"_recacheCategory",new K.X(!1)),(0,p.Z)(this,"recacheCategory$",this._recacheCategory.asObservable()),(0,p.Z)(this,"socketConnection",void 0),this.toastr=n,this.socketConnection=(new Re).withUrl(this.hostURL("/POSHub")).withAutomaticReconnect().configureLogging(i.Information).build()}SubscribeGroup(n,o=null){n!=this.lastGroupID&&(this.socketConnection.state==f.Disconnected?this.socketConnection.start().then(()=>{this.invokeSubscribe(n,o),this.registerEventHandler()}).catch(s=>{this.toastr.error(s,"Error")}):this.invokeSubscribe(n,o))}invokeSubscribe(n,o){this.socketConnection.invoke("SubscribeGroup",{CurrentID:n,PreviousID:o}).then(()=>{this.lastGroupID=n})}registerEventHandler(){this.socketConnection.on("ReceiveMobilePaymentSignal",n=>{this.OnPaymentReceived.next(n)}),this.socketConnection.on("OnContactReceive",n=>{this.OnContactReceive.next(n)}),this.socketConnection.on("ReceiveNewPromotionSignal",n=>{this.OnPromotionEventChange.next(n)}),this.socketConnection.on("ReceivePushNotificationSignal",n=>{this.OnReceivePushNotification.next(n)}),this.socketConnection.on("ReceiveOutletChanges",()=>{this._recacheOutlet.next(!0)}),this.socketConnection.on("ReceiveProductCategoryChanges",()=>{this._recacheOutlet.next(!0)})}isSocketConnected(){return!J.g.IsEmpty(this.socketConnection)&&this.socketConnection.state==f.Connected}broadcast(n){return J.g.IsNotEmpty(this.socketConnection.connectionId)&&this.isSocketConnected()?(0,Ae.D)(this.socketConnection.invoke("BroadCast",n)).pipe((0,He.K)(o=>(this.toastr.error(o,"Error"),(0,G._)(()=>o)))):(0,G._)(()=>"SignalR is not connected")}resetOutletCache(){this._recacheOutlet.next(!1)}resetCategoryCache(){this._recacheCategory.next(!1)}}return r=e,(0,p.Z)(e,"\u0275fac",function(n){return new(n||r)(Y.LFG(Oe._W))}),(0,p.Z)(e,"\u0275prov",Y.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"})),e})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1126],{61126:(Q,h,a)=>{a.r(h),a.d(h,{AuthLoginModule:()=>D});var r=a(81180),p=a(96814),t=a(65879),l=a(86864),b=a(70108),m=a(48807),x=a(91925),f=a(58763),y=a(41001),C=a(2459),v=a(37398),Z=a(94664),w=a(99397),_=a(34562),S=(a(59058),a(80534),a(87879),a(84537),a(20981)),u=a(64190);let M=(()=>{var o;class s{constructor(e,i,d){(0,r.Z)(this,"afAuth",void 0),(0,r.Z)(this,"http",void 0),(0,r.Z)(this,"router",void 0),this.afAuth=e,this.http=i,this.router=d}loginWithGoogle(e){e.preventDefault();const i=new _.X;i.setCustomParameters({prompt:"select_account"}),(0,C.D)(this.afAuth.signInWithPopup(i)).pipe((0,v.U)(c=>c.credential),(0,v.U)(c=>c.idToken),(0,Z.w)(c=>this.http.post("/api/login/Google",JSON.stringify({IDToken:c}))),(0,w.b)(c=>{localStorage.setItem("MenuPageData",JSON.stringify(c.Menu)),localStorage.setItem("Token",c.Token),localStorage.setItem("TinyMCEPlugins",c.UIConfig.TinyMCE),localStorage.setItem("Roles",JSON.stringify(l.g.parseJwt(localStorage.getItem("Token"))["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"])),localStorage.setItem("Intercom",JSON.stringify(c.Intercom)),localStorage.setItem("CloudinaryConfig",c.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",c.UIConfig.DataDaysRange),localStorage.setItem("KeepSignIn",JSON.stringify(!0)),this.router.navigate([c.ReturnUrl])})).subscribe()}}return o=s,(0,r.Z)(s,"\u0275fac",function(e){return new(e||o)(t.LFG(S.zQ),t.LFG(f.O),t.LFG(u.F0))}),(0,r.Z)(s,"\u0275prov",t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"})),s})();var O=a(6593),g=a(56223);const P=function(o){return{active:o}};function L(o,s){if(1&o&&(t.TgZ(0,"div",39)(1,"div")(2,"a",40),t._UZ(3,"img",41),t.qZA()(),t.TgZ(4,"a",42),t._uU(5),t.qZA(),t.TgZ(6,"p",43),t._uU(7),t.qZA()()),2&o){const n=s.$implicit;t.Tol(t.VKq(7,P,0==s.index)),t.xp6(2),t.Q6J("href",n.Href,t.LSH),t.xp6(1),t.Q6J("src",n.ImageSource,t.LSH),t.xp6(1),t.Q6J("href",n.Href,t.LSH),t.xp6(1),t.Oqu(n.Title),t.xp6(2),t.Oqu(n.Description)}}function T(o,s){if(1&o&&(t.ynx(0),t.TgZ(1,"div",45),t._uU(2),t.qZA(),t.BQk()),2&o){const n=t.oxw().$implicit;t.xp6(1),t.Tol(n.class),t.xp6(1),t.Oqu(n.message)}}function A(o,s){if(1&o&&(t.ynx(0),t.YNc(1,T,3,3,"ng-container",44),t.BQk()),2&o){const n=s.$implicit,e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.status==e.loginLoaderData.SubscriptionStatus)}}function U(o,s){if(1&o){const n=t.EpF();t.TgZ(0,"i",48),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.showPassword())}),t.qZA()}if(2&o){const n=t.oxw(3);t.Gre("",n.showHideClass," fas")}}function I(o,s){if(1&o&&(t.TgZ(0,"span",46),t.YNc(1,U,1,3,"i",47),t.qZA()),2&o){const n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.password)}}const N=function(o,s){return{"rounded-end":o,"border-end-0":s}},J=function(){return["/ForgotPassword"]};function F(o,s){if(1&o){const n=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),t._uU(4,"New Features"),t.qZA(),t.TgZ(5,"div",5)(6,"div",6)(7,"div",7),t.YNc(8,L,8,9,"div",8),t.qZA(),t.TgZ(9,"div",9),t._UZ(10,"button",10)(11,"button",11),t.qZA()()()(),t.TgZ(12,"div",12)(13,"div",5)(14,"h3",13),t._uU(15),t.qZA(),t.YNc(16,A,2,1,"ng-container",14),t.qZA(),t.TgZ(17,"form",15),t.NdJ("submit",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.submitLogin())}),t.TgZ(18,"div",16)(19,"div",17)(20,"div",18)(21,"span"),t._UZ(22,"i",19),t.qZA()(),t.TgZ(23,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(n);const d=t.oxw();return t.KtG(d.username=i)}),t.qZA()(),t.TgZ(24,"div",21)(25,"div",18)(26,"span"),t._UZ(27,"i",22),t.qZA()(),t.TgZ(28,"input",23),t.NdJ("ngModelChange",function(i){t.CHM(n);const d=t.oxw();return t.KtG(d.password=i)}),t.qZA(),t.YNc(29,I,2,1,"span",24),t.qZA(),t.TgZ(30,"div",25)(31,"div",26)(32,"a",27),t._uU(33,"Forgot your password?"),t.qZA()()(),t._UZ(34,"input",28),t.TgZ(35,"div",29),t._UZ(36,"hr"),t.TgZ(37,"span",30),t._uU(38,"or"),t.qZA(),t._UZ(39,"hr"),t.qZA(),t.TgZ(40,"div")(41,"button",31),t.NdJ("click",function(i){t.CHM(n);const d=t.oxw();return t.KtG(d.fbService.loginWithGoogle(i))}),t._UZ(42,"i",32),t._uU(43," Sign In with Google"),t.qZA()()()()()(),t.TgZ(44,"div",33)(45,"span",34),t._uU(46,"powered by :"),t.qZA(),t._UZ(47,"a",35),t.qZA(),t.TgZ(48,"div",36)(49,"a",37),t._uU(50),t._UZ(51,"i",38),t.qZA()()()}if(2&o){const n=t.oxw();t.xp6(8),t.Q6J("ngForOf",n.newsList),t.xp6(7),t.hij(" ",n.loginLoaderData.CompanyName," "),t.xp6(1),t.Q6J("ngForOf",n.subscriptionStatus),t.xp6(7),t.Q6J("ngModel",n.username),t.xp6(5),t.Q6J("type",n.inputType)("ngClass",t.WLB(11,N,"edge"==n.browserType,"edge"!=n.browserType))("ngModel",n.password),t.xp6(1),t.Q6J("ngIf","edge"!=n.browserType),t.xp6(3),t.Q6J("routerLink",t.DdM(14,J)),t.xp6(17),t.MGl("href","https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion,"",t.LSH),t.xp6(1),t.hij("version ",n.loginLoaderData.Version,"")}}const k=[{path:"",component:(()=>{var o;class s{constructor(e,i,d,c,H,G){(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"authService",void 0),(0,r.Z)(this,"fbService",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"activatedRoute",void 0),(0,r.Z)(this,"title",void 0),(0,r.Z)(this,"signalRClient",(0,t.f3M)(x.G)),(0,r.Z)(this,"appVersion",b.N.version),(0,r.Z)(this,"showHideClass",void 0),(0,r.Z)(this,"inputType",void 0),(0,r.Z)(this,"browserType",void 0),(0,r.Z)(this,"loginLoaderData",void 0),(0,r.Z)(this,"username",void 0),(0,r.Z)(this,"password",void 0),(0,r.Z)(this,"returnUrl",void 0),(0,r.Z)(this,"newsList",[]),(0,r.Z)(this,"subscriptionStatus",void 0),this.httpService=e,this.authService=i,this.fbService=d,this.router=c,this.activatedRoute=H,this.title=G,this.initLogin()}ngOnInit(){document.body.classList.add("login-body"),this.browserType=this.findname_browser(),this.initSubscriptionStatus()}initLogin(){this.returnUrl=this.authService.returnUrl;const e=this.activatedRoute.snapshot.queryParams,i={UserName:e.UserName,Password:e.Password};l.g.IsNotEmpty(i.UserName)&&l.g.IsNotEmpty(i.Password)?(this.username=i.UserName,this.password=i.Password,this.submitLogin(()=>this.loginLoader())):this.loginLoader()}initSubscriptionStatus(){this.subscriptionStatus=[{status:m.y.OVERDUE,message:"Subscription overdue",class:"alert-warning"},{status:m.y.SELL_ONLY,message:"Subscription partially suspended",class:"alert-danger"},{status:m.y.SUSPENDED,message:"Subscription suspended",class:"alert-danger"}]}loginLoader(){this.authService.loginLoader().subscribe(e=>{this.loginLoaderData=e,this.newsList=e.News,this.title.setTitle(e.PageTitle),this.initUserLogin(e)}),this.inputType="password",this.showHideClass="fas fa-eye fas"}ngOnDestroy(){document.body.classList.remove("login-body")}initUserLogin(e){e.Authenticated?l.g.IsNotEmpty(this.returnUrl)?(this.router.navigateByUrl(this.returnUrl),this.authService.returnUrl=null):this.router.navigate([e.ReturnURL]):l.g.IsNotEmpty(this.returnUrl)&&this.router.navigate([],{queryParamsHandling:"merge",queryParams:{ReturnUrl:this.returnUrl}})}submitLogin(e){this.authService.login({GetMenu:!0,Name:this.username,Password:this.password}).subscribe({next:d=>{this.onLoginSuccess(d)},error:d=>{e&&e()}})}onLoginSuccess(e){this.signalRClient._recacheOutlet.next(!0),"totp"==e.Type?this.router.navigate(["/verify-2fa"]):"geo"==e.Type?this.router.navigate(["/verify-geolocation"]):l.g.IsEmpty(this.returnUrl)?this.router.navigate([e.ReturnUrl]):(this.router.navigateByUrl(this.returnUrl),this.authService.returnUrl=null)}showPassword(){this.showHideClass="fas fa-eye fas"==this.showHideClass?"fas fas fa-eye-slash":"fas fa-eye fas",this.inputType="fas fa-eye fas"==this.showHideClass?"password":"text"}findname_browser(){var e=window.navigator.userAgent;if(e.indexOf("Edg/")>-1)return"edge";var i={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer/i,edge:/edg/i};for(var d in i)if(i[d].test(e))return d;return"unknown"}}return o=s,(0,r.Z)(s,"\u0275fac",function(e){return new(e||o)(t.Y36(f.O),t.Y36(y.e),t.Y36(M),t.Y36(u.F0),t.Y36(u.gz),t.Y36(O.Dx))}),(0,r.Z)(s,"\u0275cmp",t.Xpm({type:o,selectors:[["POS-auth-login"]],decls:1,vars:1,consts:[["class","container-fluid",4,"ngIf"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","border-secondary","features-pane","pt-12"],[1,"fw-normal","fs-2","header-title"],[1,"d-flex","align-items-center"],["id","new-features","data-bs-ride","carousel",1,"carousel","slide"],[1,"carousel-inner"],["class","carousel-item",3,"class",4,"ngFor","ngForOf"],[1,"carousel-indicators"],["data-bs-target","#new-features","aria-label","Slide 1","data-bs-slide-to","0","aria-current","true",1,"mx-1","active","border-top-0","border-bottom-0","d-inline-block","rounded-1"],["data-bs-target","#new-features","aria-label","Slide 2","data-bs-slide-to","1",1,"mx-1","border-top-0","border-bottom-0","d-inline-block","rounded-1"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"text-md-start","text-center","fw-normal","fs-2","header-title","me-2"],[4,"ngFor","ngForOf"],[2,"margin-top","28px",3,"submit"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","50px",3,"ngModel","ngModelChange"],[1,"input-group","input-group-lg","mt-8"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","50px",3,"type","ngClass","ngModel","ngModelChange"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"text-end","mt-4"],[1,"me-2"],[1,"text-primary",3,"routerLink"],["id","btnSubmit","type","submit","value","Sign In","data-cy","loginBtn",1,"w-100","btn","fs-3","rounded-3","btn-login","text-white","mt-6","bg-primary"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-body-secondary"],[1,"btn","btn-social-login","text-primary","me-5","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"carousel-item"],["target","_blank",3,"href"],[1,"border","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-primary","header-title","fs-4",3,"href"],[1,"mt-3","fs-6"],[4,"ngIf"],[1,"fs-6","fw-normal","mt-1","fst-italic","px-2","py-1","border","alert","rounded-0","mb-0"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,i){1&e&&t.YNc(0,F,52,15,"div",0),2&e&&t.Q6J("ngIf",i.loginLoaderData)},dependencies:[p.mk,p.sg,p.O5,g._Y,g.Fj,g.JJ,g.JL,g.On,g.F,u.rH],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-primary)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}"]})),s})()}];let D=(()=>{var o;class s{}return o=s,(0,r.Z)(s,"\u0275fac",function(e){return new(e||o)}),(0,r.Z)(s,"\u0275mod",t.oAB({type:o})),(0,r.Z)(s,"\u0275inj",t.cJS({imports:[p.ez,g.u5,u.Bz.forChild(k)]})),s})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1145],{41587:(L,q,p)=>{p.d(q,{U:()=>y});var l=p(81180),c=p(76328),s=p(40652);class y extends s.M{get formData(){return this.data.Form}set formData(_){this.data.Form=_}get options(){return this.data.Options?this.data.Options:{}}get Roles(){return this.data.Roles?this.data.Roles:{}}constructor(_,h,g,f){super(_),(0,l.Z)(this,"httpService",void 0),(0,l.Z)(this,"formDataAPI",void 0),(0,l.Z)(this,"route",void 0),(0,l.Z)(this,"data",{}),this.httpService=h,this.formDataAPI=g,this.route=f;let Z=this.route.snapshot.queryParams;this.menuData$.pipe((0,c.b)(()=>this.httpService.post(`/api/${this.formDataAPI}`,JSON.stringify(Z)))).subscribe(e=>{this.data=e,this.postBindForm(e)})}postBindForm(_){}onSubmit(_,h=!1){this.preSubmitForm(),this.httpService.post(`/api/${_}`,JSON.stringify(this.formData)).subscribe({next:g=>{this.onSubmitSuccess(g)},error:g=>{this.onSubmitError(g)}})}compare(_,h,g){return(_<h?-1:1)*(g?1:-1)}preSubmitForm(){}onSubmitSuccess(_){}onSubmitError(_){}}},98292:(L,q,p)=>{p.d(q,{X:()=>s});var l=p(81180),c=p(58087);class s extends c.n{constructor(u,_,h,g,f,Z){super(u,_,h,g,f,Z),(0,l.Z)(this,"httpService",void 0),(0,l.Z)(this,"nextPageDisabled",!1),(0,l.Z)(this,"extendData",!1),(0,l.Z)(this,"goToLast",!1),(0,l.Z)(this,"listTotal",void 0),(0,l.Z)(this,"infiniteList",void 0),(0,l.Z)(this,"oldRowCount",void 0),(0,l.Z)(this,"originalData",void 0),this.httpService=_}StoreRowsCountAPIResult(u,_=!1){this.httpService.post("/api/"+u,JSON.stringify(this.pageData.Filter)).subscribe(h=>{this.listTotal=h.Count,this.pageData.HideStoreApiCount=!0,_&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData())})}NextPage(u){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=u,this.getListData()}postInit(u){this.extendData?(this.infiniteList=this.infiniteList.concat(u.Data),this.postExtendData(u),this.extendData=!1):(this.infiniteList=u.Data,this.assignAggregate(u)),this.nextPageDisabled=!(u.Data.length<this.pageData.Filter.RowCount),this.originalData=u.Data,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(u)}afterPostInit(u){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(u){}assignAggregate(u){}}},91145:(L,q,p)=>{p.r(q),p.d(q,{PaymentModule:()=>Qn});var l=p(81180),c=p(96814),s=p(56223),y=p(54807),u=p(97221),_=p(74297),h=p(73044),g=p(64190),f=p(58087),Z=p(97446),e=p(65879),T=p(67547),x=p(58763),C=p(53482),A=p(82430),v=p(17700);function B(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"a",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",16),e._uU(2," Export "),e.qZA()}}function Y(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",17)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",18),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"From - To"),e.qZA(),e.TgZ(6,"div")(7,"datepicker",19),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA()(),e.TgZ(8,"div",20)(9,"datepicker",21),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(4),e.Q6J("date",t.pageData.Filter.From),e.xp6(2),e.Q6J("date",t.pageData.Filter.To)}}function Q(a,i){if(1&a&&(e.TgZ(0,"th",11),e._uU(1),e.qZA()),2&a){const t=i.$implicit;e.xp6(1),e.Oqu(t.Name)}}function H(a,i){if(1&a&&(e.TgZ(0,"td",11),e._uU(1),e.ALo(2,"number"),e.ALo(3,"FilterGetAmount"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw().$implicit;e.xp6(1),e.hij("",e.lcZ(2,1,e.gM2(3,3,n.Payments,"ID",t.ID,"Amount"))," ")}}const K=function(a){return{ID:a}};function V(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"date"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"date"),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.ALo(11,"date"),e.qZA(),e.TgZ(12,"td")(13,"a",22),e._uU(14),e.qZA()(),e.YNc(15,H,4,8,"td",10),e.TgZ(16,"td",11),e._uU(17),e.ALo(18,"number"),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Oqu(e.xi3(5,8,t.Date,"dd MMM yyyy")),e.xp6(3),e.Oqu(e.xi3(8,11,t.Created,"dd MMM yyyy")),e.xp6(3),e.Oqu(e.xi3(11,14,t.DateInvoice,"dd MMM yyyy")),e.xp6(3),e.Q6J("queryParams",e.VKq(19,K,t.InvoiceID)),e.xp6(1),e.Oqu(t.Number),e.xp6(1),e.Q6J("ngForOf",n.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(18,17,t.Amount))}}const W=function(a,i){return[a,"Payments",i,"ID","Amount"]};function $(a,i){if(1&a&&(e.TgZ(0,"td",11),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumWithID"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,e.G7q(3,3,e.WLB(9,W,n.data.Data,t.ID))))}}const j=function(){return["/menu/Payment/Default/Daily"]};function X(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("textChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter.Text=o)})("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,B,3,0,"a",2),e.TgZ(3,"a",3),e._uU(4,"View Summary"),e.qZA()(),e.TgZ(5,"filters"),e.YNc(6,Y,10,4,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(8,"content")(9,"div",5)(10,"table",6)(11,"thead",7)(12,"tr")(13,"th"),e._uU(14,"Outlet"),e.qZA(),e.TgZ(15,"th",8),e._uU(16,"Payment Date"),e.qZA(),e.TgZ(17,"th",9),e._uU(18,"Payment Created"),e.qZA(),e.TgZ(19,"th",8),e._uU(20,"Invoice Date"),e.qZA(),e.TgZ(21,"th"),e._uU(22,"Number"),e.qZA(),e.YNc(23,Q,2,1,"th",10),e.TgZ(24,"th",11),e._uU(25,"Total"),e.qZA()()(),e.TgZ(26,"tbody"),e.YNc(27,V,19,21,"tr",12),e.qZA(),e.TgZ(28,"tfoot")(29,"tr",13)(30,"td",14),e._uU(31,"Total : "),e.qZA(),e.YNc(32,$,4,12,"td",10),e.TgZ(33,"td",11),e._uU(34),e.ALo(35,"number"),e.ALo(36,"sum"),e.qZA()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("text",t.pageData.Filter.Text)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",null==t.roleService?null:t.roleService.global.Export),e.xp6(1),e.Q6J("routerLink",e.DdM(15,j)),e.xp6(20),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(4),e.Q6J("ngForOf",t.data.Data),e.xp6(5),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(35,10,e.xi3(36,12,t.data.Data,"Amount")))}}let z=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d){super(n,o,"Payment/DailyPaymentReceivedDifferenceDate","PaymentLoader/DailyPaymentDetailLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),this.csvConverter=r,this.roleService=m,this.matDialog=d}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Payment Differences",exportTypes:[{ID:"PaymentExport/DailyPaymentReceivedDifferenceDate",Value:"Default"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.menuData.H=n.PageTitle}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-payments-difference-date"]],features:[e.qOj],decls:1,vars:1,consts:[["searchBoxPlaceholder","Search number...",3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],["searchBoxPlaceholder","Search number...",3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"routerLink"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","110px"],[2,"width","130px"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","5",1,"text-end"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],[1,"mt-4"],["name","To",3,"date","dateChange"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",3,"queryParams"]],template:function(n,o){1&n&&e.YNc(0,X,37,16,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,c.JJ,c.uU,_.qU,_.f4,_.If]})),i})();function ee(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"a",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",12),e._uU(2," Export "),e.qZA()}}function te(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",13)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",14),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"From - To"),e.qZA(),e.TgZ(6,"div")(7,"datepicker",15),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA()(),e.TgZ(8,"div",16)(9,"datepicker",17),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(4),e.Q6J("date",t.pageData.Filter.From),e.xp6(2),e.Q6J("date",t.pageData.Filter.To)}}const ne=function(){return["/menu/Users/User/Users/Form"]},ae=function(a){return{ID:a}};function oe(a,i){if(1&a&&(e.TgZ(0,"a",20),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ne))("queryParams",e.VKq(4,ae,t.CreatorID)),e.xp6(1),e.Oqu(t.Name)}}function ie(a,i){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.Name)}}function re(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e.YNc(2,oe,2,6,"a",18),e.YNc(3,ie,2,1,"span",19),e.qZA(),e.TgZ(4,"td",8),e._uU(5),e.ALo(6,"number"),e.qZA(),e.TgZ(7,"td",8),e._uU(8),e.ALo(9,"number"),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Q6J("ngIf",n.roleService.users.Edit),e.xp6(1),e.Q6J("ngIf",!n.roleService.users.Edit),e.xp6(2),e.Oqu(e.lcZ(6,4,t.Count)),e.xp6(3),e.Oqu(e.lcZ(9,6,t.Amount))}}function le(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,ee,3,0,"a",2),e.qZA(),e.TgZ(3,"filters"),e.YNc(4,te,10,4,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"content")(7,"div",4),e._UZ(8,"div",5),e.TgZ(9,"table",6)(10,"thead",7)(11,"tr")(12,"th"),e._uU(13,"User"),e.qZA(),e.TgZ(14,"th",8),e._uU(15,"Total Invoice"),e.qZA(),e.TgZ(16,"th",8),e._uU(17,"Total Amount"),e.qZA()()(),e.TgZ(18,"tbody"),e.YNc(19,re,10,8,"tr",9),e.qZA(),e.TgZ(20,"tfoot")(21,"tr",10)(22,"td",8),e._uU(23,"Total"),e.qZA(),e.TgZ(24,"td",8),e._uU(25),e.ALo(26,"number"),e.ALo(27,"sum"),e.qZA(),e.TgZ(28,"td",8),e._uU(29),e.ALo(30,"number"),e.ALo(31,"sum"),e.qZA()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",null==t.roleService?null:t.roleService.global.Export),e.xp6(17),e.Q6J("ngForOf",t.data.Data),e.xp6(6),e.Oqu(e.lcZ(26,8,e.xi3(27,10,t.data.Data,"Count"))),e.xp6(4),e.Oqu(e.lcZ(30,13,e.xi3(31,15,t.data.Data,"Amount")))}}let me=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d){super(n,o,"Payment/UserPayment","PaymentLoader/DailyPaymentLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),this.csvConverter=r,this.roleService=m,this.matDialog=d}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Payment Received by User",exportTypes:[{ID:"PaymentExport/UserPayment",Value:"Default"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-received-by-user"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"d-none","d-sm-block"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],[1,"mt-4"],["name","To",3,"date","dateChange"],[3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[3,"routerLink","queryParams"]],template:function(n,o){1&n&&e.YNc(0,le,32,18,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,c.JJ,_.qU]})),i})();var J=p(41587),P=p(86864),ce=p(78645),pe=p(32181),_e=p(93997),de=p(83620),se=p(27921),ue=p(94664),ge=p(37398),he=p(2425);let ye=(()=>{var a;class i{constructor(n){(0,l.Z)(this,"httpService",void 0),this.httpService=n}searchUnpaidOrder(n){return this.httpService.post("/API/AC/SearchUnpaidOrderByNumber",JSON.stringify({Prefix:n,Count:20}))}findPaymentByCustomerId(n){return this.httpService.post("/api/payment/Bulk_DetailByCustomerID",{ID:n})}findPaymentBySoId(n){return this.httpService.post("/api/payment/Bulk_DetailBySOID",{ID:n})}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.LFG(x.O))}),(0,l.Z)(i,"\u0275prov",e.Yz7({token:a,factory:a.\u0275fac,providedIn:"root"})),i})();var O=p(7726),N=p(49488),w=p(92596),fe=p(29057);function xe(a,i){if(1&a&&(e.TgZ(0,"div",17)(1,"div",18),e._uU(2),e.qZA(),e.TgZ(3,"div",19),e._uU(4),e.ALo(5,"number"),e.qZA()()),2&a){const t=i.$implicit;e.xp6(2),e.hij("#",t.Number,""),e.xp6(2),e.Oqu(e.lcZ(5,2,t.PaymentAmount))}}let De=(()=>{var a;class i{constructor(){(0,l.Z)(this,"eventNew",void 0),(0,l.Z)(this,"paymentDetails",[]),this.eventNew=new e.vpe}onNew(){this.eventNew.emit()}keyEvent(n){"F8"==n.code&&this.onNew()}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["bulk-payment-complete"]],hostBindings:function(n,o){1&n&&e.NdJ("keyup",function(m){return o.keyEvent(m)},!1,e.Jf7)},inputs:{paymentDetails:"paymentDetails"},outputs:{eventNew:"onNew"},decls:26,vars:7,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top","fw-bold",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[1,"col","text-start"],[1,"col","text-end"]],template:function(n,o){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),e._UZ(5,"i",5),e._uU(6,"Bulk Payment Complete"),e.qZA()(),e.TgZ(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),e.NdJ("click",function(){return o.onNew()}),e._uU(11,"New Bulk Payment (F8)"),e.qZA()()()()()(),e.TgZ(12,"div",10)(13,"div",2)(14,"div",11)(15,"h2",12),e._uU(16," Bulk Payment Invoice "),e.qZA()(),e.TgZ(17,"div",13),e.YNc(18,xe,6,4,"div",14),e.TgZ(19,"div",15)(20,"div",16),e._uU(21,"Total:"),e.qZA(),e.TgZ(22,"div",16),e._uU(23),e.ALo(24,"number"),e.ALo(25,"sum"),e.qZA()()()()()()),2&n&&(e.xp6(18),e.Q6J("ngForOf",o.paymentDetails),e.xp6(5),e.Oqu(e.lcZ(24,2,e.xi3(25,4,o.paymentDetails,"PaymentAmount"))))},dependencies:[c.sg,c.JJ,_.qU]})),i})();const Ze=["invoiceOption"];function Te(a,i){1&a&&(e.TgZ(0,"div",39)(1,"div",40),e._uU(2," Outlet "),e.qZA(),e.TgZ(3,"div",41),e._uU(4," Date "),e.qZA(),e.TgZ(5,"div",41),e._uU(6," Number "),e.qZA()())}function Ce(a,i){if(1&a&&(e.TgZ(0,"div",39)(1,"div",40),e._uU(2),e.ALo(3,"limitTo"),e.qZA(),e.TgZ(4,"div",41),e._uU(5),e.ALo(6,"date"),e.qZA(),e.TgZ(7,"div",41),e._uU(8),e.qZA()()),2&a){const t=i.item;e.xp6(2),e.hij(" ",e.xi3(3,3,t.EntityName,25)," "),e.xp6(3),e.hij(" ",e.xi3(6,6,t.Date,"dd MMM yyyy")," "),e.xp6(3),e.hij(" ",t.Number," ")}}function Ae(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"ng-contailer")(1,"ng-select",35,36),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onSelectInvoiceNumber(o))}),e.ALo(3,"async"),e.YNc(4,Te,7,0,"ng-template",37),e.YNc(5,Ce,9,9,"ng-template",38),e.qZA()()}if(2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("items",e.lcZ(3,2,t.invoiceOptions$))("typeahead",t.invoiceInput$)}}function ve(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"autocompleteV2",42),e.NdJ("onSelect",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onSelectCustomer(o))}),e.qZA()}}function Pe(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"tr")(1,"td",44),e.NdJ("click",function(){const r=e.CHM(t).$implicit,m=e.oxw(3);return e.KtG(m.onRemoveInvoice(r.ID))}),e._UZ(2,"i",45),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.ALo(11,"date"),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.ALo(14,"date"),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.ALo(17,"number"),e.qZA(),e.TgZ(18,"td")(19,"input",46),e.NdJ("ngModelChange",function(o){const m=e.CHM(t).$implicit;return e.KtG(m.PaymentAmount=o)}),e.qZA()()()}if(2&a){const t=i.$implicit,n=e.oxw(3);e.xp6(4),e.Oqu(t.EntityName),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.CustomerName),e.xp6(2),e.Oqu(n.isMinDate(t.Date)?"-":e.xi3(11,7,t.Date,"dd MMM yyyy")),e.xp6(3),e.Oqu(n.isMinDate(t.Due)?"-":e.xi3(14,10,t.Due,"dd MMM yyyy")),e.xp6(3),e.Oqu(e.lcZ(17,13,t.AmountToBePaid)),e.xp6(3),e.Q6J("ngModel",t.PaymentAmount)}}function be(a,i){if(1&a&&(e.ynx(0),e.YNc(1,Pe,20,15,"tr",43),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.bulkPayment)}}function Fe(a,i){1&a&&(e.ynx(0),e.TgZ(1,"div",47)(2,"div",48)(3,"h1",49),e._uU(4,"Invoice not found"),e.qZA(),e.TgZ(5,"p",49),e._uU(6,"To start creating a bulk payment, please add an Invoice or select a customer "),e.qZA()()(),e.BQk())}function qe(a,i){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",6)(2,"div",7)(3,"label",8),e._uU(4,"Payment Date"),e.qZA()(),e.TgZ(5,"div",9)(6,"datepicker",10),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.data.PaymentDate=o)}),e.qZA()()(),e.TgZ(7,"div",11)(8,"div",7)(9,"label",12),e._uU(10,"Payment Method"),e.qZA()(),e.TgZ(11,"div",13)(12,"ng-select",14),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.methodID=o)}),e.qZA()()(),e.TgZ(13,"div",15)(14,"div",16)(15,"label",17),e._uU(16," Unpaid Invoices "),e.qZA()()(),e.TgZ(17,"div",18)(18,"div",7)(19,"mat-button-toggle-group",19),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.onSearchTypeChange(o))}),e.TgZ(20,"mat-button-toggle",20),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchState="NUMBER")}),e._UZ(21,"i",21),e.qZA(),e.TgZ(22,"mat-button-toggle",22),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchState="CUSTOMER")}),e._UZ(23,"i",23),e.qZA()()(),e.TgZ(24,"div",24),e.YNc(25,Ae,6,4,"ng-contailer",4),e.YNc(26,ve,1,0,"ng-template",null,25,e.W1O),e.qZA()(),e.TgZ(28,"div",26)(29,"div",27)(30,"div",28)(31,"div",29)(32,"table",30)(33,"thead",31)(34,"tr"),e._UZ(35,"th",32),e.TgZ(36,"th"),e._uU(37,"Outlet"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Number"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Customer"),e.qZA(),e.TgZ(42,"th"),e._uU(43,"Date"),e.qZA(),e.TgZ(44,"th"),e._uU(45,"Due"),e.qZA(),e.TgZ(46,"th"),e._uU(47,"Amount"),e.qZA(),e.TgZ(48,"th",33),e._uU(49,"Payment"),e.qZA()()(),e.TgZ(50,"tbody"),e.YNc(51,be,2,1,"ng-container",34),e.qZA()(),e.YNc(52,Fe,7,0,"ng-container",34),e.qZA()()()(),e.BQk()}if(2&a){const t=e.MAs(27),n=e.oxw();e.xp6(6),e.Q6J("isFloatingLabel",!1)("date",n.data.PaymentDate),e.xp6(6),e.Q6J("items",n.data.PaymentMethods)("ngModel",n.methodID)("clearable",!1),e.xp6(8),e.Q6J("checked","NUMBER"==n.searchState),e.xp6(2),e.Q6J("checked","CUSTOMER"==n.searchState),e.xp6(3),e.Q6J("ngIf","NUMBER"==n.searchState)("ngIfElse",t),e.xp6(26),e.Q6J("ngIf",n.bulkPayment.length>0),e.xp6(1),e.Q6J("ngIf",0==n.bulkPayment.length)}}function Me(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"bulk-payment-complete",50),e.NdJ("onNew",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onNewBulkPayment())}),e.qZA()}if(2&a){const t=e.oxw();e.Q6J("paymentDetails",t.bulkPayment)}}let Oe=(()=>{var a;class i extends J.U{constructor(n,o,r,m,d){super(n,o,"PaymentLoader/Bulk_Add",r),(0,l.Z)(this,"route",void 0),(0,l.Z)(this,"toastrService",void 0),(0,l.Z)(this,"bulkPaymentService",void 0),(0,l.Z)(this,"methodID",void 0),(0,l.Z)(this,"searchState","NUMBER"),(0,l.Z)(this,"bulkPayment",[]),(0,l.Z)(this,"invoiceOptions$",void 0),(0,l.Z)(this,"sourceOptions$",void 0),(0,l.Z)(this,"invoiceInput$",void 0),(0,l.Z)(this,"isComplete",!1),(0,l.Z)(this,"invoiceOption",void 0),(0,l.Z)(this,"ngSelectValue",void 0),this.route=r,this.toastrService=m,this.bulkPaymentService=d,this.invoiceInput$=new ce.x}ngOnInit(){this.initInvoiceOptions()}postBindForm(n){this.menuData.H="Adding New Bulk Payment",this.data.PaymentDate=new Date(n.PaymentDate)}initInvoiceOptions(){this.invoiceOptions$=this.invoiceInput$.pipe((0,pe.h)(n=>null!=n&&(""==n||n.length>=3)),(0,_e.x)(),(0,de.b)(500),(0,se.O)(""),(0,ue.w)(n=>this.bulkPaymentService.searchUnpaidOrder(n)),(0,ge.U)(n=>this.onFilterUnpaidOrder(n)))}onFilterUnpaidOrder(n){let o;return n.filter(r=>(o=this.bulkPayment.findIndex(m=>m.Number==r.Number),-1==o))}onSelectCustomer(n){P.g.IsNotEmpty(n)&&this.bulkPaymentService.findPaymentByCustomerId(n).subscribe((o=[])=>{this.handleAddPaymentByCustomer(o)})}handleAddPaymentByCustomer(n=[]){let o;(n=n.filter(r=>(o=this.bulkPayment.findIndex(m=>m.ID==r.ID),-1==o))).length>0&&(n=n.map(r=>(r.PaymentAmount=r.AmountToBePaid,r)),this.bulkPayment=[...n,...this.bulkPayment])}onSelectInvoiceNumber(n){P.g.IsNotEmpty(n)&&this.bulkPaymentService.findPaymentBySoId(n.ID).subscribe(o=>{this.handleAddPaymentByInvoiceNumber(o)})}handleAddPaymentByInvoiceNumber(n){-1==this.bulkPayment.findIndex(r=>r.ID==n.ID)&&(n.PaymentAmount=n.AmountToBePaid,this.bulkPayment=[...this.bulkPayment,n]),this.invoiceOption.clearModel(),this.initInvoiceOptions()}onRemoveInvoice(n){this.bulkPayment=this.bulkPayment.filter(o=>o.ID!==n),this.initInvoiceOptions()}isMinDate(n){return P.g.MinDate==n}onSearchTypeChange(n){this.bulkPayment=[]}validateSubmit(){P.g.IsEmpty(this.methodID)?this.toastrService.warning("Payment Method is required","Warning"):0!=this.validatePaymentAmount()?(this.generateSubmitData(),this.onSubmit("payment/Bulk_Add")):this.toastrService.warning("Payment Amount is required","Warning")}validatePaymentAmount(){return-1==this.bulkPayment.findIndex(o=>P.g.IsEmpty(o.PaymentAmount)||0==o.PaymentAmount)}onSubmitSuccess(n){this.toastrService.success(n.Message,"Success"),this.isComplete=!0}generateSubmitData(){this.data.Form={PaymentDate:this.data.PaymentDate,PaymentMethod:this.methodID,Invoices:this.bulkPayment.map(n=>({InvoiceID:n.ID,Amount:n.PaymentAmount}))}}onNewBulkPayment(){this.bulkPayment=[],this.isComplete=!1}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(g.gz),e.Y36(he._W),e.Y36(ye))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["app-bulk-payment"]],viewQuery:function(n,o){if(1&n&&e.Gf(Ze,5),2&n){let r;e.iGM(r=e.CRH())&&(o.invoiceOption=r.first)}},features:[e.qOj],decls:11,vars:5,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["routerLink","/menu/Payment/Default/Received","type","button","role","button",1,"btn","btn-outline-secondary","me-4"],["type","button","role","button",1,"btn","btn-success",3,"click"],[1,"container-fluid","pt-5"],[4,"ngIf","ngIfElse"],["COMPLETE",""],[1,"row","g-3","align-items-center"],[1,"col-auto"],["for","paymentDate",1,"col-form-label","fw-bold","ms-7"],[1,"col-3","ms-11"],["placeholder","Payment Date","appearance","outline",1,"date-bulk-payment",3,"isFloatingLabel","date","dateChange"],[1,"row","g-3","align-items-center","mt-8"],["for","paymentMethod",1,"col-form-label","fw-bold","ms-7"],[1,"col-3","ms-3"],["id","paymentMethod","bindLabel","Name","bindValue","ID","placeholder","Payment Method","appendTo","body",1,"currency-option",3,"items","ngModel","clearable","ngModelChange"],[1,"row","mt-7","mb-1"],[1,"col-12","d-flex","justify-content-start"],[1,"ms-7","fw-bold"],[1,"row","g-3","align-items-center","ps-6"],["id","toggle","name","fontStyle","aria-label","Font Style",2,"height","37px","width","88px",3,"change"],["matTooltipPosition","above","matTooltip","Search by Invoice Number","value","NUMBER",1,"w-100","toggle-search",3,"checked","click"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Customer","value","CUSTOMER",1,"w-100","toggle-search",3,"checked","click"],[1,"fa-solid","fa-address-book"],[1,"col-3","ms-6","pe-0","mt-3"],["SEARCH_BY_CUSTOMER",""],[1,"row","mt-5"],[1,"col-12"],[1,"container-fluid","mt-2"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","30px"],[2,"width","150px"],[4,"ngIf"],["bindValue","ID","bindLabel","Number","placeholder","Select an Invoice",1,"select-bulk-payment",3,"items","typeahead","change"],["invoiceOption",""],["ng-header-tmp",""],["ng-option-tmp",""],[1,"row"],[1,"col-5"],[1,"col-3"],["inputID","invoiceNumber","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Select a Customer","notFoundMessageFor","customer",1,"w-100",3,"onSelect"],[4,"ngFor","ngForOf"],["matTooltipPosition","above","matTooltip","Remove",1,"text-center","text-danger","pointer",3,"click"],[1,"fa-solid","fa-xmark"],["autoNum","",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center","justify-content-center",2,"height","35vh"],[1,"d-inline-block","text-center"],[1,"text-body-secondary"],[3,"paymentDetails","onNew"]],template:function(n,o){if(1&n&&(e.TgZ(0,"mainpanel-cmp",0)(1,"actions")(2,"button",1),e._uU(3,"Cancel"),e.qZA(),e.TgZ(4,"button",2),e.NdJ("click",function(){return o.validateSubmit()}),e._uU(5,"Submit"),e.qZA()(),e.TgZ(6,"content")(7,"div",3),e.YNc(8,qe,53,11,"ng-container",4),e.qZA()()(),e.YNc(9,Me,1,1,"ng-template",null,5,e.W1O)),2&n){const r=e.MAs(10);e.Q6J("pageData",o.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),e.xp6(8),e.Q6J("ngIf",!o.isComplete)("ngIfElse",r)}},dependencies:[c.sg,c.O5,g.rH,h.p,s.Fj,s.JJ,s.On,u.QB,y.w9,y.ir,y.Cm,O.J,N.A9,N.Yi,w.gM,fe.b,De,c.Ov,c.JJ,c.uU,_.OI],styles:["mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:33px!important} datepicker.date-bulk-payment>.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{padding-bottom:0} ng-select.select-bulk-payment .ng-dropdown-panel.ng-select-bottom{width:30rem}"]})),i})();function we(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",21),e._uU(2," Export"),e.qZA()}}function Ue(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",22)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Year"),e.qZA(),e.TgZ(6,"ng-select",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.Year=o)})("change",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.yearMonthToDateRange())}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"Month"),e.qZA(),e.TgZ(9,"ng-select",25),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.Month=o)})("change",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.yearMonthToDateRange())}),e.qZA()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("items",t.year)("ngModel",t.pageData.Filter.Year),e.xp6(3),e.Q6J("items",t.month)("ngModel",t.pageData.Filter.Month)}}function Ne(a,i){if(1&a&&(e.TgZ(0,"th",26),e._uU(1),e.qZA()),2&a){const t=i.$implicit;e.xp6(1),e.hij(" ",t.Name,"")}}function Ie(a,i){if(1&a&&(e.TgZ(0,"td",11),e._uU(1),e.ALo(2,"number"),e.qZA()),2&a){const t=i.index,n=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,n.Payments[t].Amount),"")}}function Le(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.ALo(3,"date"),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.ALo(6,"date"),e.qZA(),e.YNc(7,Ie,3,3,"td",15),e.TgZ(8,"td",11),e._uU(9),e.ALo(10,"number"),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Oqu(e.xi3(3,4,t.Date,"EEEE")),e.xp6(3),e.Oqu(e.xi3(6,7,t.Date,"dd MMM yyyy")),e.xp6(2),e.Q6J("ngForOf",n.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(10,10,t.Amount))}}function Je(a,i){if(1&a&&(e.TgZ(0,"td",11),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumNestedArray"),e.qZA()),2&a){const t=i.index,n=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,n.data.Data,"Payments",t,"Amount")),"")}}function Se(a,i){if(1&a&&(e.TgZ(0,"td",11),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumNestedArray"),e.qZA()),2&a){const t=i.index,n=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,n.data.Data,"Payments",t,"Fee")),"")}}function ke(a,i){if(1&a&&(e.TgZ(0,"td",19),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumNestedArray"),e.qZA()),2&a){const t=i.index,n=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,e.gM2(3,3,n.data.Data,"Payments",t,"Nett")))}}const Re=function(){return["/menu/Payment/Default/Made/Detail"]};function Ge(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,we,3,0,"button",2),e.TgZ(3,"a",3),e._uU(4,"View Detail"),e.qZA()(),e.TgZ(5,"filters"),e.YNc(6,Ue,10,6,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(8,"content")(9,"div",5)(10,"div",6)(11,"table",7)(12,"thead",8)(13,"tr")(14,"th",9),e._uU(15,"Day"),e.qZA(),e.TgZ(16,"th",9),e._uU(17,"Date"),e.qZA(),e.YNc(18,Ne,2,1,"th",10),e.TgZ(19,"th",11),e._uU(20,"Total"),e.qZA()()(),e.TgZ(21,"tbody"),e.YNc(22,Le,11,12,"tr",12),e.qZA(),e.TgZ(23,"tfoot",13)(24,"tr")(25,"td",14),e._uU(26,"Total"),e.qZA(),e.YNc(27,Je,4,8,"td",15),e.TgZ(28,"td",11),e._uU(29),e.ALo(30,"number"),e.ALo(31,"sum"),e.qZA()(),e.TgZ(32,"tr",16)(33,"td",14),e._uU(34,"Fee :"),e.qZA(),e.YNc(35,Se,4,8,"td",15),e.TgZ(36,"td",11),e._uU(37),e.ALo(38,"number"),e.ALo(39,"sum"),e.ALo(40,"GetChildrenArray"),e.qZA()(),e.TgZ(41,"tr")(42,"td",17),e._uU(43,"Nett :"),e.qZA(),e.YNc(44,ke,4,8,"td",18),e.TgZ(45,"td",19),e._uU(46),e.ALo(47,"number"),e.ALo(48,"sum"),e.ALo(49,"GetChildrenArray"),e.qZA()()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(1),e.Q6J("routerLink",e.DdM(35,Re)),e.xp6(15),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(4),e.Q6J("ngForOf",t.data.Data),e.xp6(5),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(30,14,e.xi3(31,16,t.data.Data,"Amount"))),e.xp6(6),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.hij("",e.lcZ(38,19,e.xi3(39,21,e.xi3(40,24,t.data.Data,"Payments"),"Fee"))," "),e.xp6(7),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(47,27,e.xi3(48,29,e.xi3(49,32,t.data.Data,"Payments"),"Nett")))}}let Ee=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d){super(n,o,"Payment/DailyPaymentMade","PaymentLoader/DailyPaymentMadeLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"year",void 0),(0,l.Z)(this,"month",void 0),this.csvConverter=r,this.matDialog=m,this.roleService=d,this.year=[],P.g.GenerateYears((new Date).getFullYear(),11,!0).forEach(M=>{this.year.push({ID:M,Name:M})}),this.month=P.g.Months}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Daily Payments Made",exportTypes:[{ID:"PaymentExport/DailyPaymentMade",Value:"Default",FileName:"Daily Payments Made"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.menuData.H=n.PageTitle}yearMonthToDateRange(){const o=new Date(this.pageData.Filter.Year,this.pageData.Filter.Month),r=o.getMonth()-1,m=o.getFullYear();this.pageData.Filter.From=new Date(m,r,1).toDateString(),this.pageData.Filter.To=new Date(m,r+1,0).toDateString()}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(v.uw),e.Y36(A.N))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-daily-payment-made"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"routerLink"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","90px"],["style","width: 90px","class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],[1,"table-danger"],["colspan","2",1,"text-end","text-success","border-bottom-0"],["class","text-end text-success border-bottom-0",4,"ngFor","ngForOf"],[1,"text-end","text-success","border-bottom-0"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["appendTo","body","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange","change"],["appendTo","body","bindLabel","Label","bindValue","ID",3,"items","ngModel","ngModelChange","change"],[1,"text-end",2,"width","90px"]],template:function(n,o){1&n&&e.YNc(0,Ge,50,36,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,y.w9,c.JJ,c.uU,_.qU,_.J1,_.QC]})),i})();var I=p(84982),b=p(13566);function Be(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",24),e._uU(2," Export"),e.qZA()}}function Ye(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",25)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",26),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Customer"),e.qZA(),e.TgZ(6,"autocompleteV2",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.CustomerID=o)}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"Code/Note"),e.qZA(),e.TgZ(9,"input",28),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.Text=o)}),e.qZA(),e.TgZ(10,"h6"),e._uU(11,"From - To"),e.qZA(),e.TgZ(12,"div")(13,"datepicker",29),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA()(),e.TgZ(14,"div",30)(15,"datepicker",31),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)}),e.qZA()(),e.TgZ(16,"h6"),e._uU(17,"Type"),e.qZA(),e.TgZ(18,"radio-options",32),e.NdJ("modelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.AllPayment=o)}),e.qZA()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("ngModel",t.pageData.Filter.CustomerID),e.xp6(3),e.Q6J("ngModel",t.pageData.Filter.Text),e.xp6(4),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To),e.xp6(3),e.Q6J("model",t.pageData.Filter.AllPayment)("options",t.typeOptions)}}function Qe(a,i){if(1&a&&(e.TgZ(0,"th",33),e._uU(1),e.qZA()),2&a){const t=i.$implicit;e.xp6(1),e.Oqu(t.Name)}}const He=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},S=function(a){return{ID:a}};function Ke(a,i){if(1&a&&(e.TgZ(0,"a",35),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,He))("queryParams",e.VKq(4,S,t.InvoiceID)),e.xp6(1),e.Oqu(t.Number)}}const We=function(){return["/menu/Debt/Join/Join_Invoice/New_Join_Invoice/Info"]};function $e(a,i){if(1&a&&(e.TgZ(0,"a",35),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,We))("queryParams",e.VKq(4,S,t.InvoiceID)),e.xp6(1),e.Oqu(t.Number)}}function je(a,i){if(1&a&&(e.TgZ(0,"td",22),e._uU(1),e.ALo(2,"number"),e.ALo(3,"FilterGetAmount"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,e.gM2(3,3,n.Payments,"ID",t.ID,"Amount"))," ")}}function Xe(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.ALo(3,"date"),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.ALo(6,"date"),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.ALo(9,"date"),e.qZA(),e.TgZ(10,"td"),e.YNc(11,Ke,2,6,"a",34),e.YNc(12,$e,2,6,"a",34),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.qZA(),e.YNc(17,je,4,8,"td",21),e.TgZ(18,"td",22),e._uU(19),e.ALo(20,"number"),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Oqu(e.xi3(3,10,t.Date,"dd MMM yyyy")),e.xp6(3),e.Oqu(e.xi3(6,13,t.Created,"HH:mm")),e.xp6(3),e.Oqu(e.xi3(9,16,t.DateInvoice,"dd MMM yyyy")),e.xp6(3),e.Q6J("ngIf",t.TypeID===n.Type.Invoice),e.xp6(1),e.Q6J("ngIf",t.TypeID===n.Type.JoinInvoice),e.xp6(2),e.Oqu(t.CustomerName),e.xp6(2),e.Oqu(t.Code),e.xp6(1),e.Q6J("ngForOf",n.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(20,19,t.Amount)),e.xp6(3),e.Oqu(t.Note)}}const ze=function(a,i){return[a,"Payments",i,"ID","Amount"]};function et(a,i){if(1&a&&(e.TgZ(0,"td",22),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumWithID"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,e.G7q(3,3,e.WLB(9,ze,n.data.Data,t.ID))))}}const tt=function(){return["/menu/Payment/Default/Detail"]};function nt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,Be,3,0,"button",2),e.TgZ(3,"a",3),e._uU(4,"View Detail"),e.qZA()(),e.TgZ(5,"filters"),e.YNc(6,Ye,19,10,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(8,"content")(9,"div",5)(10,"div",6)(11,"table",7),e.NdJ("matSortChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.sortData(o))}),e.TgZ(12,"thead",8)(13,"tr")(14,"th",9),e._uU(15,"Payment Date "),e.qZA(),e.TgZ(16,"th",10),e._uU(17,"Payment Time "),e.qZA(),e.TgZ(18,"th",11),e._uU(19,"Invoice Date"),e.qZA(),e.TgZ(20,"th",12),e._uU(21,"Number"),e.qZA(),e.TgZ(22,"th",13),e._uU(23,"Customer"),e.qZA(),e.TgZ(24,"th",14),e._uU(25,"Code"),e.qZA(),e.YNc(26,Qe,2,1,"th",15),e.TgZ(27,"th",16),e._uU(28," Total"),e.qZA(),e.TgZ(29,"th",17),e._uU(30,"Note"),e.qZA()()(),e.TgZ(31,"tbody"),e.YNc(32,Xe,23,21,"tr",18),e.qZA(),e.TgZ(33,"tfoot")(34,"tr",19)(35,"td",20),e._uU(36,"Total : "),e.qZA(),e.YNc(37,et,4,12,"td",21),e.TgZ(38,"td",22),e._uU(39),e.ALo(40,"number"),e.ALo(41,"sum"),e.qZA(),e._UZ(42,"td",22),e.qZA()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(1),e.Q6J("routerLink",e.DdM(15,tt)),e.xp6(23),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(6),e.Q6J("ngForOf",t.data.Data),e.xp6(5),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(40,10,e.xi3(41,12,t.data.Data,"Amount")))}}var k=function(a){return a[a.Invoice=0]="Invoice",a[a.JoinInvoice=1]="JoinInvoice",a}(k||{});let at=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d){super(n,o,"Payment/DailyPaymentReceivedDetail","PaymentLoader/DailyPaymentDetailLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"typeOptions",[{Key:0,Value:"All"},{Key:1,Value:"AR"},{Key:2,Value:"Cash"}]),(0,l.Z)(this,"datasource",void 0),(0,l.Z)(this,"Type",k),this.csvConverter=r,this.roleService=m,this.matDialog=d}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Daily Payments Received Detail",exportTypes:[{ID:"PaymentExport/DailyPaymentReceivedDetail",Value:"Default",FileName:"Daily Payments Received Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.menuData.H=n.PageTitle,this.datasource=n.Data}sortData(n){const o=this.data.Data.slice();this.data.Data=n.active&&""!==n.direction?o.sort((r,m)=>{const d="asc"===n.direction;switch(r.CustomerName=null==r.CustomerName?"":r.CustomerName,m.CustomerName=null==m.CustomerName?"":m.CustomerName,r.Code=null==r.Code?"":r.Code,m.Code=null==m.Code?"":m.Code,r.Note=null==r.Note?"":r.Note,m.Note=null==m.Note?"":m.Note,n.active){case"paymentDate":return this.compare(new Date(r.Date).getTime(),new Date(m.Date).getTime(),d);case"paymentTime":return this.compare(this.getTime(r.Created),this.getTime(m.Created),d);case"invoiceDate":return this.compare(r.DateInvoice.toLocaleLowerCase(),m.DateInvoice.toLocaleLowerCase(),d);case"number":return this.compare(r.Number.toLocaleLowerCase(),m.Number.toLocaleLowerCase(),d);case"customer":return this.compare(r.CustomerName.toLocaleLowerCase(),m.CustomerName.toLocaleLowerCase(),d);case"code":return this.compare(r.Code.toLocaleLowerCase(),m.Code.toLocaleLowerCase(),d);case"total":return this.compare(r.Amount,m.Amount,d);case"note":return this.compare(r.Note.toLocaleLowerCase(),m.Note.toLocaleLowerCase(),d);default:return 0}}):this.datasource}getTime(n){let o=new Date(n);return`${o.getHours()}:${o.getMinutes()}`}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-daily-payment-received-detail"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"routerLink"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","paymentDate",2,"width","90px","vertical-align","middle"],["mat-sort-header","paymentTime",2,"width","90px","vertical-align","middle"],["mat-sort-header","invoiceDate","arrowPosition","before",2,"width","90px","vertical-align","middle"],["mat-sort-header","number",2,"width","130px","vertical-align","middle"],["mat-sort-header","customer",2,"vertical-align","middle"],["mat-sort-header","code",2,"width","100px","vertical-align","middle","padding-right","25px!important"],["class","text-end","style","vertical-align: middle; width: 100px",4,"ngFor","ngForOf"],["mat-sort-header","total","arrowPosition","before",1,"flex-right",2,"width","90px"],["mat-sort-header","note",2,"vertical-align","middle"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","6",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100","ac-filter",3,"ngModel","ngModelChange"],["type","text",1,"form-control","input-filter",3,"ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["name","Type",3,"model","options","modelChange"],[1,"text-end",2,"vertical-align","middle","width","100px"],[3,"routerLink","queryParams",4,"ngIf"],[3,"routerLink","queryParams"]],template:function(n,o){1&n&&e.YNc(0,nt,43,16,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.Fj,s.JJ,s.On,u.QB,y.w9,I.P,b.YE,b.nU,O.J,c.JJ,c.uU,_.qU,_.f4,_.If]})),i})();var F=p(35983);function ot(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",21),e._uU(2," Export"),e.qZA()}}function it(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",22)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"From - To"),e.qZA(),e.TgZ(6,"div")(7,"datepicker",24),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA()(),e.TgZ(8,"div",25)(9,"datepicker",26),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()(),e.TgZ(10,"h6"),e._uU(11,"Type"),e.qZA(),e.TgZ(12,"radio-options",27),e.NdJ("modelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.PaymentType=o)}),e.qZA(),e.TgZ(13,"h6"),e._uU(14,"Sort By"),e.qZA(),e.TgZ(15,"radio-options",27),e.NdJ("modelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.SortBy=o)}),e.qZA()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(4),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To),e.xp6(3),e.Q6J("model",t.pageData.Filter.PaymentType)("options",t.typeOptions),e.xp6(3),e.Q6J("model",t.pageData.Filter.SortBy)("options",t.pageData.Options.Sort)}}function rt(a,i){1&a&&e._UZ(0,"th",28),2&a&&e.Q6J("innerHTML",i.$implicit.Name,e.oJD)}const lt=function(){return["/menu/Payment/Default/Detail"]},mt=function(a,i,t){return{MethodID:a,From:i,To:t}};function ct(a,i){if(1&a&&(e.ynx(0),e.TgZ(1,"a",30),e.ALo(2,"date"),e.ALo(3,"ToDateString"),e.ALo(4,"date"),e.ALo(5,"ToDateString"),e._uU(6),e.ALo(7,"number"),e.qZA(),e.BQk()),2&a){const t=i.ngIf,n=e.oxw(2).$implicit;e.xp6(1),e.Q6J("routerLink",e.DdM(15,lt))("queryParams",e.kEZ(16,mt,t.ID,e.xi3(2,3,e.lcZ(3,6,n.Date),"ddMMyyyy"),e.xi3(4,8,e.lcZ(5,11,n.Date),"ddMMyyyy"))),e.xp6(5),e.Oqu(e.lcZ(7,13,t.Amount))}}function pt(a,i){if(1&a&&(e.TgZ(0,"td",15),e.YNc(1,ct,8,20,"ng-container",29),e.qZA()),2&a){const t=i.$implicit,n=e.oxw().$implicit,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",o.filterPaymentByID(n.Payments,t.ID))}}function _t(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.ALo(3,"date"),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.ALo(6,"date"),e.qZA(),e.YNc(7,pt,2,1,"td",14),e.TgZ(8,"td",15),e._uU(9),e.ALo(10,"number"),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Oqu(e.xi3(3,4,t.Date,"EEEE")),e.xp6(3),e.Oqu(e.xi3(6,7,t.Date,"dd MMM yyyy")),e.xp6(2),e.Q6J("ngForOf",n.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(10,10,t.Amount))}}const dt=function(a,i){return[a,"Payments",i,"ID","Amount"]};function st(a,i){if(1&a&&(e.TgZ(0,"td",15),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumWithID"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,e.G7q(3,3,e.WLB(9,dt,n.data.Data,t.ID))),"")}}const ut=function(a,i){return[a,"Payments",i,"ID","Fee"]};function gt(a,i){if(1&a&&(e.TgZ(0,"td",15),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumWithID"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,1,e.G7q(3,3,e.WLB(9,ut,n.data.Data,t.ID))),"")}}const ht=function(a,i){return[a,"Payments",i,"ID","Nett"]};function yt(a,i){if(1&a&&(e.TgZ(0,"td",19),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumWithID"),e.qZA()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,e.G7q(3,3,e.WLB(9,ht,n.data.Data,t.ID))))}}function ft(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,ot,3,0,"button",2),e.qZA(),e.TgZ(3,"filters"),e.YNc(4,it,16,11,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),e._uU(13,"Day"),e.qZA(),e.TgZ(14,"th",8),e._uU(15,"Date"),e.qZA(),e.YNc(16,rt,1,1,"th",9),e.TgZ(17,"th",10),e._uU(18,"Total"),e.qZA()()(),e.TgZ(19,"tbody"),e.YNc(20,_t,11,12,"tr",11),e.ALo(21,"sortBy"),e.qZA(),e.TgZ(22,"tfoot",12)(23,"tr")(24,"td",13),e._uU(25,"Total"),e.qZA(),e.YNc(26,st,4,12,"td",14),e.TgZ(27,"td",15),e._uU(28),e.ALo(29,"number"),e.ALo(30,"sum"),e.qZA()(),e.TgZ(31,"tr",16)(32,"td",13),e._uU(33,"MDR :"),e.qZA(),e.YNc(34,gt,4,12,"td",14),e.TgZ(35,"td",15),e._uU(36),e.ALo(37,"number"),e.ALo(38,"sum"),e.ALo(39,"GetChildrenArray"),e.qZA()(),e.TgZ(40,"tr")(41,"td",17),e._uU(42,"Nett :"),e.qZA(),e.YNc(43,yt,4,12,"td",18),e.TgZ(44,"td",19),e._uU(45),e.ALo(46,"number"),e.ALo(47,"sum"),e.ALo(48,"GetChildrenArray"),e.qZA()()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(14),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(4),e.Q6J("ngForOf",e.Dn7(21,13,t.data.Data,"asc","Date")),e.xp6(6),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(29,17,e.xi3(30,19,t.data.Data,"Amount"))),e.xp6(6),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.hij("",e.lcZ(37,22,e.xi3(38,24,e.xi3(39,27,t.data.Data,"Payments"),"Fee"))," "),e.xp6(7),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(46,30,e.xi3(47,32,e.xi3(48,35,t.data.Data,"Payments"),"Nett")))}}let xt=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d,D){super(n,o,"Payment/DailyPaymentReceived","PaymentLoader/PaymentReceivedLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"dateFilterOptions",[{Key:!1,Value:"Custom"},{Key:!0,Value:"Month"}]),(0,l.Z)(this,"typeOptions",[{Key:0,Value:"All"},{Key:1,Value:"AR"},{Key:2,Value:"Cash"}]),(0,l.Z)(this,"year",void 0),(0,l.Z)(this,"month",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.csvConverter=r,this.roleService=m,this.matDialog=d,this.dataDaysRangeService=D,this.year=[],P.g.GenerateYears((new Date).getFullYear(),11,!0).forEach(U=>{this.year.push({ID:U,Name:U})}),this.month=P.g.Months}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Daily Payments Received",exportTypes:[{ID:"PaymentExport/DailyPaymentReceived",Value:"Default",FileName:"Daily Payments Received"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}preInitList(){this.pageData.Filter.ByMonth=!1}postInit(n){this.changeDatepickerValidation(),this.menuData.H=n.PageTitle}preGetList(){this.pageData.Filter.Custom=0==this.pageData.Filter.ByMonth}yearMonthToDateRange(){const o=new Date(this.pageData.Filter.Year,this.pageData.Filter.Month),r=o.getMonth()-1,m=o.getFullYear();this.pageData.Filter.From=new Date(m,r,1).toDateString(),this.pageData.Filter.To=new Date(m,r+1,0).toDateString()}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}filterPaymentByID(n,o){return n.find(m=>m.ID==o)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(v.uw),e.Y36(F.k))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-daily-payment-received"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","90px"],["style","width: 90px","class","text-end",3,"innerHTML",4,"ngFor","ngForOf"],[1,"text-end",2,"width","90px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[1,"table-danger"],["colspan","2",1,"text-end","text-success","border-bottom-0"],["class","text-end text-success border-bottom-0",4,"ngFor","ngForOf"],[1,"text-end","text-success","border-bottom-0"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["name","Type",3,"model","options","modelChange"],[1,"text-end",2,"width","90px",3,"innerHTML"],[4,"ngIf"],[1,"text-dark",3,"routerLink","queryParams"]],template:function(n,o){1&n&&e.YNc(0,ft,49,38,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,I.P,c.JJ,c.uU,_.qU,_.J1,_.aJ,_.W7,_.If]})),i})();function Dt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",14)(1,"h6"),e._uU(2,"Register"),e.qZA(),e.TgZ(3,"ng-select",15),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.RegisterID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Year"),e.qZA(),e.TgZ(6,"ng-select",16),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.Year=o)})("change",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.yearMonthToDateRange())}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"Month"),e.qZA(),e.TgZ(9,"ng-select",17),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.Month=o)})("change",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.yearMonthToDateRange())}),e.qZA()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Registers)("ngModel",t.pageData.Filter.RegisterID),e.xp6(3),e.Q6J("items",t.year)("ngModel",t.pageData.Filter.Year),e.xp6(3),e.Q6J("items",t.month)("ngModel",t.pageData.Filter.Month)}}function Zt(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.ALo(3,"date"),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.ALo(6,"date"),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td",9),e._uU(10),e.qZA(),e.TgZ(11,"td",18),e._uU(12),e.qZA(),e.TgZ(13,"td",18),e._uU(14),e.qZA(),e.TgZ(15,"td",18),e._uU(16),e.ALo(17,"number"),e.qZA()()),2&a){const t=i.$implicit;e.xp6(2),e.Oqu(e.xi3(3,7,t.Date,"EEEE")),e.xp6(3),e.Oqu(e.xi3(6,10,t.Date,"dd MMM yyyy")),e.xp6(3),e.Oqu(t.Count),e.xp6(2),e.hij(" ",t.MethodName," "),e.xp6(2),e.Oqu(t.MinAmount),e.xp6(2),e.Oqu(t.MaxAmount),e.xp6(2),e.Oqu(e.lcZ(17,13,t.Amount))}}const Tt=function(){return["/menu/Payment/Default/Payment_Gateway"]};function Ct(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions")(2,"a",2),e._uU(3,"View Summary"),e.qZA()(),e.TgZ(4,"filters"),e.YNc(5,Dt,10,6,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(7,"content")(8,"div",4)(9,"div",5)(10,"table",6)(11,"thead",7)(12,"tr")(13,"th"),e._uU(14,"Day"),e.qZA(),e.TgZ(15,"th"),e._uU(16,"Date"),e.qZA(),e.TgZ(17,"th"),e._uU(18,"Count"),e.qZA(),e.TgZ(19,"th",8),e._uU(20),e.qZA(),e.TgZ(21,"th",9),e._uU(22,"Lowest"),e.qZA(),e.TgZ(23,"th",9),e._uU(24,"Highest"),e.qZA(),e.TgZ(25,"th",8),e._uU(26,"Total"),e.qZA()()(),e.TgZ(27,"tbody"),e.YNc(28,Zt,18,15,"tr",10),e.ALo(29,"sortBy"),e.qZA(),e.TgZ(30,"tfoot",11)(31,"tr")(32,"td",12),e._uU(33,"Total"),e.qZA(),e.TgZ(34,"td",13),e._uU(35),e.ALo(36,"number"),e.ALo(37,"sum"),e.qZA()()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("routerLink",e.DdM(17,Tt)),e.xp6(18),e.Oqu(null==t.data.Data[0]?null:t.data.Data[0].MethodName),e.xp6(8),e.Q6J("ngForOf",e.Dn7(29,8,t.data.Data,"asc","Date")),e.xp6(7),e.Oqu(e.lcZ(36,12,e.xi3(37,14,t.data.Data,"Amount")))}}let At=(()=>{var a;class i extends f.n{constructor(n,o){super(n,o,"Payment/DailyPaymentNotification","PaymentLoader/PaymentNotificationLoader"),(0,l.Z)(this,"year",void 0),(0,l.Z)(this,"month",void 0),this.year=[],P.g.GenerateYears((new Date).getFullYear(),11,!0).forEach(m=>{this.year.push({ID:m,Name:m})}),this.month=P.g.Months}yearMonthToDateRange(){const o=new Date(this.pageData.Filter.Year,this.pageData.Filter.Month),r=o.getMonth()-1,m=o.getFullYear();this.pageData.Filter.From=new Date(m,r,1).toDateString(),this.pageData.Filter.To=new Date(m,r+1,0).toDateString()}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-payment-gateway-daily-aggregate"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],[1,"btn","btn-success",3,"routerLink"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"width","90px"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","6",1,"text-end","border-bottom-0"],[1,"text-end","border-bottom-0"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose a register",3,"items","ngModel","ngModelChange"],["appendTo","body","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange","change"],["appendTo","body","bindLabel","Label","bindValue","ID",3,"items","ngModel","ngModelChange","change"],[1,"text-end",2,"width","200px"]],template:function(n,o){1&n&&e.YNc(0,Ct,38,18,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,y.w9,c.JJ,c.uU,_.qU,_.W7]})),i})();function vt(a,i){if(1&a&&(e.TgZ(0,"pre",22),e._uU(1),e.ALo(2,"json"),e.qZA()),2&a){const t=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,t.formData.RequestJSON))}}function Pt(a,i){if(1&a&&(e.TgZ(0,"pre",23),e._uU(1),e.ALo(2,"json"),e.qZA()),2&a){const t=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,t.formData.ResponseJSON))}}function bt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1)(1,"content")(2,"div",2)(3,"form",3)(4,"div",4)(5,"div",5)(6,"div",6),e._UZ(7,"input",7),e.TgZ(8,"label",8),e._uU(9,"Outlet"),e.qZA()()(),e.TgZ(10,"div",5)(11,"div",6),e._UZ(12,"input",9),e.TgZ(13,"label",10),e._uU(14,"Type"),e.qZA()()()(),e.TgZ(15,"div",4)(16,"div",5)(17,"div",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.invoiceDetail())}),e._UZ(18,"input",12),e.TgZ(19,"label",13),e._uU(20,"Number"),e.qZA()()(),e.TgZ(21,"div",5)(22,"div",6),e._UZ(23,"input",14),e.TgZ(24,"label",15),e._uU(25,"Amount"),e.qZA()()()(),e.TgZ(26,"div",4)(27,"div",5)(28,"div",16)(29,"div",17)(30,"div",18)(31,"h3"),e._uU(32,"Request"),e.qZA()()(),e.YNc(33,vt,3,3,"pre",19),e.qZA()(),e.TgZ(34,"div",5)(35,"div",16)(36,"div",20)(37,"div",18)(38,"h3"),e._uU(39,"Response"),e.qZA()(),e.YNc(40,Pt,3,3,"pre",21),e.qZA()()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),e.xp6(7),e.Q6J("value",t.formData.OutletName),e.xp6(5),e.Q6J("value",t.formData.TypeString),e.xp6(6),e.Q6J("value",t.formData.Number),e.xp6(5),e.Q6J("value",t.formData.Amount),e.xp6(10),e.Q6J("ngIf",null!=t.formData.RequestJSON),e.xp6(7),e.Q6J("ngIf",null!=t.formData.ResponseJSON)}}let Ft=(()=>{var a;class i extends J.U{constructor(n,o,r,m){super(n,o,"Payment/PaymentNotificationInfo",r),(0,l.Z)(this,"router",void 0),this.router=m}postBindForm(){this.formData.ResponseJSON=JSON.parse(this.formData.ResponseJSON)}invoiceDetail(){this.router.navigate(["/menu/Orders/Orders/Customer_Invoice/Info"],{queryParams:{ID:this.formData.InvoiceID}})}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(g.gz),e.Y36(g.F0))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-payment-gateway-detail"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"container-fluid","mt-5"],["id","init","api","Payment/PaymentNotificationInfo","name","form"],[1,"row"],[1,"col-md-6"],[1,"form-floating-outline"],["type","text","name","outlet","readonly","",1,"form-control",3,"value"],["for","outlet"],["type","text","readonly","","name","type",1,"form-control",3,"value"],["for","type"],[1,"form-floating-outline",3,"click"],["type","text","readonly","","name","number",1,"form-control",2,"color","#0976b4",3,"value"],["for","number"],["type","text","readonly","","name","amount",1,"form-control",3,"value"],["for","amount"],[1,"card"],[1,"card-header"],[1,"me-auto","mt-2"],["style","font-size: 13px; margin-top:20px;padding-left: 10px; padding-top: 10px;",4,"ngIf"],[1,"card-header","d-lg-flex"],["style","font-size: 13px;margin-top:20px; margin-left:-90px; padding-left: 10px; padding-top: 10px;",4,"ngIf"],[2,"font-size","13px","margin-top","20px","padding-left","10px","padding-top","10px"],[2,"font-size","13px","margin-top","20px","margin-left","-90px","padding-left","10px","padding-top","10px"]],template:function(n,o){1&n&&e.YNc(0,bt,41,9,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data&&o.formData)},dependencies:[c.O5,h.p,s._Y,s.JL,s.F,c.Ts],styles:["input[_ngcontent-%COMP%]{background-color:#fff!important}pre[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word;overflow-x:auto}"]})),i})();var R=p(21476);function qt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",17)(1,"h6"),e._uU(2,"Register"),e.qZA(),e.TgZ(3,"ng-select",18),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.RegisterID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Status"),e.qZA(),e.TgZ(6,"ng-select",19),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.StatusCode=o)}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"Number"),e.qZA(),e.TgZ(9,"input",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.Number=o)}),e.qZA(),e.TgZ(10,"h6"),e._uU(11,"From - To"),e.qZA(),e.TgZ(12,"div")(13,"datepicker",21),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA()(),e.TgZ(14,"div",22)(15,"datepicker",23),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Registers)("ngModel",t.pageData.Filter.RegisterID),e.xp6(3),e.Q6J("items",t.pageData.Options.StatusCode)("ngModel",t.pageData.Filter.StatusCode),e.xp6(3),e.Q6J("ngModel",t.pageData.Filter.Number),e.xp6(4),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}const Mt=function(a){return{"bg-gradient-danger":a}},Ot=function(){return["/menu/Payment/Default/Payment_Gateway/Detail"]},wt=function(a){return{ID:a}},Ut=function(a,i){return{"text-danger":a,"text-success":i,"text-end":!0}};function Nt(a,i){if(1&a&&(e.TgZ(0,"tr",24)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"a",25),e._uU(5),e.qZA()(),e.TgZ(6,"td",26),e._uU(7),e.ALo(8,"number"),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.ALo(11,"date"),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA(),e.TgZ(16,"td"),e._uU(17),e.qZA()()),2&a){const t=i.$implicit;e.Tol(e.VKq(18,Mt,200!=t.HttpStatusCode)),e.xp6(2),e.Oqu(t.OutletName),e.xp6(2),e.Q6J("routerLink",e.DdM(20,Ot))("queryParams",e.VKq(21,wt,t.ID)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(e.lcZ(8,13,t.Amount)),e.xp6(3),e.Oqu(e.xi3(11,15,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Oqu(t.TypeString),e.xp6(2),e.Oqu(t.Issuer),e.xp6(1),e.Tol(e.WLB(23,Ut,422==t.HttpStatusCode,200==t.HttpStatusCode)),e.xp6(1),e.hij(" ",t.HttpStatusCode,"")}}function It(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mat-paginator",27),e.NdJ("page",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.onPaginationChange(o))}),e.qZA()}if(2&a){const t=e.oxw(2);e.Q6J("length",t.pagination.listTotal)("pageSize",t.pagination.pageSize)("pageIndex",0==t.pageData.Filter.PageNumber?0:t.pageData.Filter.PageNumber-1)}}const Lt=function(){return["/menu/Payment/Default/Payment_Gateway/Daily"]};function Jt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions")(2,"a",2),e._uU(3," Daily Aggregate "),e.qZA()(),e.TgZ(4,"filters"),e.YNc(5,qt,16,10,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(7,"content")(8,"div",4)(9,"div",5)(10,"table",6)(11,"thead",7)(12,"tr")(13,"th",8),e._uU(14,"Register"),e.qZA(),e.TgZ(15,"th",9),e._uU(16,"Number"),e.qZA(),e.TgZ(17,"th",10),e._uU(18,"Amount"),e.qZA(),e.TgZ(19,"th",11),e._uU(20,"Created"),e.qZA(),e.TgZ(21,"th",12),e._uU(22,"Type"),e.qZA(),e.TgZ(23,"th",13),e._uU(24,"Issuer"),e.qZA(),e.TgZ(25,"th",14),e._uU(26,"Status Code"),e.qZA()()(),e.TgZ(27,"tbody"),e.YNc(28,Nt,18,26,"tr",15),e.qZA()()(),e.TgZ(29,"div"),e.YNc(30,It,1,3,"mat-paginator",16),e.qZA()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("routerLink",e.DdM(7,Lt)),e.xp6(26),e.Q6J("ngForOf",t.data.Data),e.xp6(2),e.Q6J("ngIf",t.pagination.listTotal>0)}}let St=(()=>{var a;class i extends f.n{constructor(n,o,r){super(n,o,"Payment/GetPaymentNotificationList","PaymentLoader/PaymentNotificationLoader"),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.dataDaysRangeService=r}postInit(n){this.changeDatepickerValidation()}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(F.k))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-payment-gateway"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],[1,"btn","btn-success",3,"routerLink"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[2,"width","220px"],[1,"text-end",2,"width","120px"],[2,"width","90px"],[2,"width","50px"],["matTooltipPosition","above","matTooltip","Client Application used to pay",2,"width","50px"],[1,"text-end",2,"width","50px"],["class","border-bottom",3,"class",4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"dialog-filter"],["placeholder","Choose an register","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["placeholder","Choose..","bindLabel","Value","bindValue","Key",3,"items","ngModel","ngModelChange"],["type","text","placeholder","Type an invoice number",1,"form-control","input-filter",3,"ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"border-bottom"],[3,"routerLink","queryParams"],[1,"text-end"],[3,"length","pageSize","pageIndex","page"]],template:function(n,o){1&n&&e.YNc(0,Jt,31,8,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.Fj,s.JJ,s.On,u.QB,y.w9,R.NW,w.gM,c.JJ,c.uU]})),i})();function kt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",14),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",15),e._uU(2," Export"),e.qZA()}}function Rt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",16)(1,"h6"),e._uU(2,"From - To"),e.qZA(),e.TgZ(3,"div")(4,"datepicker",17),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA()(),e.TgZ(5,"div",18)(6,"datepicker",19),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(4),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}function Gt(a,i){1&a&&e._UZ(0,"th",20),2&a&&e.Q6J("innerHTML",i.$implicit.Name,e.oJD)}function Et(a,i){if(1&a&&(e.TgZ(0,"td",9),e._uU(1),e.ALo(2,"number"),e.qZA()),2&a){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.Value))}}function Bt(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.YNc(3,Et,3,3,"td",21),e.TgZ(4,"td",9),e._uU(5),e.ALo(6,"number"),e.qZA()()),2&a){const t=i.$implicit;e.xp6(2),e.Oqu(t.EntityName),e.xp6(1),e.Q6J("ngForOf",t.Payments),e.xp6(2),e.Oqu(e.lcZ(6,3,t.Amount))}}function Yt(a,i){if(1&a&&(e.TgZ(0,"td",12),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumNestedArray"),e.qZA()),2&a){const t=i.index,n=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,e.gM2(3,3,n.data.Data,"Payments",t,"Value")))}}function Qt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,kt,3,0,"button",2),e.qZA(),e.TgZ(3,"filters"),e.YNc(4,Rt,7,5,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"content")(7,"div",4),e._UZ(8,"div",5),e.TgZ(9,"table",6)(10,"thead",7)(11,"tr")(12,"th"),e._uU(13,"Outlet"),e.qZA(),e.YNc(14,Gt,1,1,"th",8),e.TgZ(15,"th",9),e._uU(16,"Total"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,Bt,7,5,"tr",10),e.qZA(),e.TgZ(19,"tfoot")(20,"tr",11)(21,"td",12),e._uU(22,"Total"),e.qZA(),e.YNc(23,Yt,4,8,"td",13),e.TgZ(24,"td",12),e._uU(25),e.ALo(26,"number"),e.ALo(27,"sum"),e.qZA()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(12),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(4),e.Q6J("ngForOf",t.data.Data),e.xp6(5),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(26,9,e.xi3(27,11,t.data.Data,"Amount")))}}let Ht=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d,D){super(n,o,"Payment/OutletPayment","PaymentLoader/DailyPaymentLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.csvConverter=r,this.matDialog=m,this.roleService=d,this.dataDaysRangeService=D}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Outlet Payments",exportTypes:[{ID:"PaymentExport/OutletPayment",Value:"Default",FileName:"Outlet Payments"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.menuData.H=n.PageTitle,n.Data.forEach(o=>o.Payments.sort((r,m)=>r.ID>m.ID?1:r.ID<m.ID?-1:0)),this.changeDatepickerValidation()}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(v.uw),e.Y36(A.N),e.Y36(F.k))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-payment-received-by-group"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"d-none","d-sm-block"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["class","text-end",3,"innerHTML",4,"ngFor","ngForOf"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-end","border-bottom-0"],["class","text-end border-bottom-0",4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"text-end",3,"innerHTML"],["class","text-end",4,"ngFor","ngForOf"]],template:function(n,o){1&n&&e.YNc(0,Qt,28,14,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,h.p,u.QB,c.JJ,_.qU,_.QC]})),i})();function Kt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",21),e._uU(2," Export"),e.qZA()}}function Vt(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",22)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Supplier"),e.qZA(),e.TgZ(6,"autocompleteV2",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.SupplierID=o)}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"From - To"),e.qZA(),e.TgZ(9,"datepicker",25),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA(),e.TgZ(10,"div",26)(11,"datepicker",27),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("ngModel",t.pageData.Filter.SupplierID),e.xp6(3),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}function Wt(a,i){if(1&a&&(e.TgZ(0,"th",28),e._uU(1),e.qZA()),2&a){const t=i.$implicit;e.xp6(1),e.hij(" ",t.Name,"")}}function $t(a,i){if(1&a&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.BQk()),2&a){const t=e.oxw().index,n=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,n.Payments[t].Amount)," ")}}function jt(a,i){1&a&&(e.ynx(0),e._uU(1," 0 "),e.BQk())}function Xt(a,i){if(1&a&&(e.TgZ(0,"td",19),e.YNc(1,$t,3,3,"ng-container",30),e.YNc(2,jt,2,0,"ng-container",30),e.qZA()),2&a){const t=i.$implicit,n=i.index,o=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",o.Payments[n].ID==t.ID),e.xp6(1),e.Q6J("ngIf",o.Payments[n].ID!=t.ID)}}const zt=function(){return["/menu/Orders/Orders/Supplier_Bill/Info"]},G=function(a){return{ID:a}},en=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function tn(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.ALo(3,"date"),e.qZA(),e.TgZ(4,"td")(5,"a",29),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"a",29),e._uU(9),e.qZA()(),e.TgZ(10,"td"),e._uU(11),e.qZA(),e.YNc(12,Xt,3,2,"td",18),e.TgZ(13,"td",19),e._uU(14),e.ALo(15,"number"),e.ALo(16,"sum"),e.qZA(),e.TgZ(17,"td"),e._uU(18),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Oqu(e.xi3(3,11,t.Date,"dd MMM yyyy")),e.xp6(3),e.Q6J("routerLink",e.DdM(19,zt))("queryParams",e.VKq(20,G,t.ID)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Q6J("routerLink",e.DdM(22,en))("queryParams",e.VKq(23,G,t.SupplierID)),e.xp6(1),e.Oqu(t.SupplierName),e.xp6(2),e.Oqu(t.Code),e.xp6(1),e.Q6J("ngForOf",n.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(15,14,e.xi3(16,16,t.Payments,"Amount"))),e.xp6(4),e.Oqu(t.Note)}}function nn(a,i){if(1&a&&(e.TgZ(0,"td",19),e._uU(1),e.ALo(2,"number"),e.ALo(3,"sumNestedArray"),e.qZA()),2&a){const t=i.index,n=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,e.gM2(3,3,n.data.Data,"Payments",t,"Amount")))}}const an=function(){return["/menu/Payment/Default/Made"]};function on(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,Kt,3,0,"button",2),e.TgZ(3,"a",3),e._uU(4,"View Summary"),e.qZA()(),e.TgZ(5,"filters"),e.YNc(6,Vt,12,7,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(8,"content")(9,"div",5)(10,"table",6),e.NdJ("matSortChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.sortData(o))}),e.TgZ(11,"thead",7)(12,"tr")(13,"th",8),e._uU(14,"Date"),e.qZA(),e.TgZ(15,"th",9),e._uU(16,"Number"),e.qZA(),e.TgZ(17,"th",10),e._uU(18,"Supplier"),e.qZA(),e.TgZ(19,"th",11),e._uU(20,"Code"),e.qZA(),e.YNc(21,Wt,2,1,"th",12),e.TgZ(22,"th",13),e._uU(23," Total"),e.qZA(),e.TgZ(24,"th",14),e._uU(25,"Note"),e.qZA()()(),e.TgZ(26,"tbody"),e.YNc(27,tn,19,25,"tr",15),e.qZA(),e.TgZ(28,"tfoot")(29,"tr",16)(30,"td",17),e._uU(31,"Total : "),e.qZA(),e.YNc(32,nn,4,8,"td",18),e.TgZ(33,"td",19),e._uU(34),e.ALo(35,"number"),e.ALo(36,"sum"),e.qZA(),e._UZ(37,"td",19),e.qZA()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(1),e.Q6J("routerLink",e.DdM(15,an)),e.xp6(18),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(6),e.Q6J("ngForOf",t.data.Data),e.xp6(5),e.Q6J("ngForOf",t.data.PaymentMethods),e.xp6(2),e.Oqu(e.lcZ(35,10,e.xi3(36,12,t.data.Data,"Amount")))}}let rn=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d){super(n,o,"Payment/PurchaseOrderPayment","PaymentLoader/PurchaseOrderPaymentLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"datasource",void 0),this.csvConverter=r,this.roleService=m,this.matDialog=d}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Payments Made Detail",exportTypes:[{ID:"PaymentExport/PurchaseOrderPayment",Value:"Default",FileName:"Payments Made Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.datasource=n.Data}sortData(n){const o=this.data.Data.slice();this.data.Data=n.active&&""!==n.direction?o.sort((r,m)=>{const d="asc"===n.direction;switch(r.SupplierName=null==r.SupplierName?"":r.SupplierName,m.SupplierName=null==m.SupplierName?"":m.SupplierName,r.Code=null==r.Code?"":r.Code,m.Code=null==m.Code?"":m.Code,r.Note=null==r.Note?"":r.Note,m.Note=null==m.Note?"":m.Note,n.active){case"date":return this.compare(r.Date.toLocaleLowerCase(),m.Date.toLocaleLowerCase(),d);case"number":return this.compare(r.Number.toLocaleLowerCase(),m.Number.toLocaleLowerCase(),d);case"supplier":return this.compare(r.SupplierName.toLocaleLowerCase(),m.SupplierName.toLocaleLowerCase(),d);case"code":return this.compare(r.Code.toLocaleLowerCase(),m.Code.toLocaleLowerCase(),d);case"total":return this.compare(r.Payments.find(D=>D.Amount>0)?.Amount||0,m.Payments.find(D=>D.Amount>0)?.Amount||0,d);case"note":return this.compare(r.Note.toLocaleLowerCase(),m.Note.toLocaleLowerCase(),d);default:return 0}}):this.datasource}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-purchase-order-payment-detail"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"routerLink"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","date",2,"width","90px"],["mat-sort-header","number",2,"width","130px"],["mat-sort-header","supplier",2,"vertical-align","middle"],["mat-sort-header","code",2,"width","100px"],["class","text-end","style","width: 100px",4,"ngFor","ngForOf"],["mat-sort-header","total","arrowPosition","before",1,"flex-right",2,"width","90px"],["mat-sort-header","note"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100","ac-filter",3,"ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"text-end",2,"width","100px"],[3,"routerLink","queryParams"],[4,"ngIf"]],template:function(n,o){1&n&&e.YNc(0,on,38,16,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,b.YE,b.nU,O.J,c.JJ,c.uU,_.qU,_.QC]})),i})();function ln(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",17),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",18),e._uU(2," Export"),e.qZA()}}function mn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",19)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",20),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"From - To"),e.qZA(),e.TgZ(6,"datepicker",21),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA(),e.TgZ(7,"div",22)(8,"datepicker",23),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}const cn=function(){return["/menu/Payment/Default/Detail"]},pn=function(a,i,t){return{MethodID:a,From:i,To:t}};function _n(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td",24),e._uU(4),e.ALo(5,"number"),e.qZA(),e.TgZ(6,"td",24)(7,"a",25),e.ALo(8,"date"),e.ALo(9,"ToDateString"),e.ALo(10,"date"),e.ALo(11,"ToDateString"),e._uU(12),e.ALo(13,"number"),e.qZA()(),e.TgZ(14,"td",26),e._uU(15),e.ALo(16,"number"),e.qZA(),e.TgZ(17,"td",27),e._uU(18),e.ALo(19,"number"),e.qZA()()),2&a){const t=i.$implicit,n=e.oxw(2);e.xp6(2),e.Oqu(t.MethodName),e.xp6(2),e.Oqu(e.lcZ(5,7,t.Count)),e.xp6(3),e.Q6J("routerLink",e.DdM(28,cn))("queryParams",e.kEZ(29,pn,t.MethodID,e.xi3(8,9,e.lcZ(9,12,n.pageData.Filter.From),"ddMMyyyy"),e.xi3(10,14,e.lcZ(11,17,n.pageData.Filter.To),"ddMMyyyy"))),e.xp6(5),e.hij(" ",e.xi3(13,19,t.Amount,"1.0-0")," "),e.xp6(3),e.Oqu(e.xi3(16,22,t.MDR,"1.0-4")),e.xp6(3),e.Oqu(e.xi3(19,25,t.Nett,"1.0-4"))}}function dn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions")(2,"button",2),e._uU(3," Bulk Payment "),e.qZA(),e.YNc(4,ln,3,0,"button",3),e.qZA(),e.TgZ(5,"filters"),e.YNc(6,mn,9,7,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(8,"content")(9,"div",5)(10,"div",6)(11,"table",7)(12,"thead",8)(13,"tr")(14,"th"),e._uU(15,"Type"),e.qZA(),e.TgZ(16,"th",9),e._uU(17,"Count"),e.qZA(),e.TgZ(18,"th",9),e._uU(19,"Amount"),e.qZA(),e.TgZ(20,"th",9),e._uU(21,"MDR"),e.qZA(),e.TgZ(22,"th",9),e._uU(23,"Nett"),e.qZA()()(),e.TgZ(24,"tbody"),e.YNc(25,_n,20,33,"tr",10),e.qZA(),e.TgZ(26,"tfoot",11)(27,"tr",12)(28,"td",13),e._uU(29,"Total"),e.qZA(),e.TgZ(30,"td",14),e._uU(31),e.ALo(32,"number"),e.ALo(33,"sum"),e.qZA(),e.TgZ(34,"td",14),e._uU(35),e.ALo(36,"number"),e.ALo(37,"sum"),e.qZA(),e.TgZ(38,"td",15),e._uU(39),e.ALo(40,"number"),e.ALo(41,"sum"),e.qZA(),e.TgZ(42,"td",16),e._uU(43),e.ALo(44,"number"),e.ALo(45,"sum"),e.qZA()()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(4),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(21),e.Q6J("ngForOf",t.data.Data),e.xp6(6),e.Oqu(e.lcZ(32,10,e.xi3(33,12,t.data.Data,"Count"))),e.xp6(4),e.Oqu(e.xi3(36,15,e.xi3(37,18,t.data.Data,"Amount"),"1.0-0")),e.xp6(4),e.Oqu(e.xi3(40,21,e.xi3(41,24,t.data.Data,"MDR"),"1.0-4")),e.xp6(4),e.Oqu(e.xi3(44,27,e.xi3(45,30,t.data.Data,"Nett"),"1.0-4"))}}let sn=(()=>{var a;class i extends f.n{constructor(n,o,r,m,d,D){super(n,o,"Payment/ReceivedPayment","PaymentLoader/ReceivedPayment"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.csvConverter=r,this.dataDaysRangeService=m,this.roleService=d,this.matDialog=D}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Received Payment",exportTypes:[{ID:"PaymentExport/ReceivedPayment",Value:"Default",FileName:"Received Payment"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.menuData.H=n.PageTitle,this.changeDatepickerValidation()}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(F.k),e.Y36(A.N),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-received-payment"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["routerLink","/menu/Payment/Default/Received/Bulk_Payment",1,"btn","btn-outline-secondary","me-4"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"width","150px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"fw-bold"],[1,"border-bottom-0"],[1,"text-end","border-bottom-0"],[1,"text-end","text-danger","border-bottom-0"],[1,"text-end","text-success","border-bottom-0"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","placeholder","Choose an outlet","bindValue","ID",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"text-end"],["target","_blank",1,"text-dark",3,"routerLink","queryParams"],[1,"text-end","text-danger"],[1,"text-end","text-success"]],template:function(n,o){1&n&&e.YNc(0,dn,46,33,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,c.JJ,c.uU,_.qU,_.aJ]})),i})();var un=p(98292);function gn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",24),e._uU(2," Export"),e.qZA()}}function hn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",25)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",26),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Type"),e.qZA(),e.TgZ(6,"ng-select",27),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.MethodID=o)}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"From - To"),e.qZA(),e.TgZ(9,"datepicker",28),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA(),e.TgZ(10,"div",29)(11,"datepicker",30),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("items",t.pageData.Options.PaymentMethod)("ngModel",t.pageData.Filter.MethodID),e.xp6(3),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}function yn(a,i){if(1&a&&(e.TgZ(0,"small",35),e._uU(1),e.ALo(2,"date"),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,t.Created,"dd MMM yyyy"))}}const fn=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},E=function(a){return{ID:a}};function xn(a,i){if(1&a&&(e.TgZ(0,"a",36),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,fn))("queryParams",e.VKq(4,E,t.InvoiceID)),e.xp6(1),e.Oqu(t.Number)}}const Zn=function(){return["/menu/Debt/Join/Join_Invoice/New_Join_Invoice/Info"]};function Tn(a,i){if(1&a&&(e.TgZ(0,"a",36),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Zn))("queryParams",e.VKq(4,E,t.InvoiceID)),e.xp6(1),e.Oqu(t.Number)}}function Cn(a,i){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"date"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"date"),e.qZA(),e.TgZ(9,"td"),e.YNc(10,yn,3,4,"small",31),e.ALo(11,"date"),e.ALo(12,"date"),e.TgZ(13,"span"),e._uU(14),e.ALo(15,"date"),e.qZA()(),e.TgZ(16,"td"),e.YNc(17,xn,2,6,"a",32),e.YNc(18,Tn,2,6,"a",32),e.qZA(),e.TgZ(19,"td",33),e._uU(20),e.ALo(21,"number"),e.qZA(),e.TgZ(22,"td"),e._uU(23),e.qZA(),e.TgZ(24,"td",34),e._uU(25),e.ALo(26,"number"),e.qZA(),e.TgZ(27,"td",33),e._uU(28),e.ALo(29,"number"),e.qZA()()),2&a){const t=i.$implicit;e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Oqu(e.xi3(5,11,t.Date,"EEE")),e.xp6(3),e.Oqu(e.xi3(8,14,t.Date,"dd MMM yyyy")),e.xp6(3),e.Q6J("ngIf",e.xi3(11,17,t.Date,"dd MMM")!=e.xi3(12,20,t.Created,"dd MMM")),e.xp6(4),e.Oqu(e.xi3(15,23,t.Created,"HH:mm")),e.xp6(3),e.Q6J("ngIf",t.invoiceVisible),e.xp6(1),e.Q6J("ngIf",!t.invoiceVisible),e.xp6(2),e.Oqu(e.lcZ(21,26,t.Amount)),e.xp6(3),e.Oqu(t.Type),e.xp6(2),e.Oqu(e.lcZ(26,28,t.MDRAmount)),e.xp6(3),e.Oqu(e.lcZ(29,30,t.Nett))}}function An(a,i){if(1&a&&(e.TgZ(0,"tfoot")(1,"tr",37),e._UZ(2,"td",38),e.TgZ(3,"td",39),e._uU(4),e.qZA(),e.TgZ(5,"td",40),e._uU(6),e.ALo(7,"number"),e.ALo(8,"sum"),e.qZA(),e._UZ(9,"td",41),e.TgZ(10,"td",42),e._uU(11),e.ALo(12,"number"),e.ALo(13,"sum"),e.qZA(),e.TgZ(14,"td",40),e._uU(15),e.ALo(16,"number"),e.ALo(17,"sum"),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(4),e.hij("",t.data.Data.length," Invoices"),e.xp6(2),e.Oqu(e.xi3(7,4,e.xi3(8,7,t.data.Data,"Amount"),"1.0-0")),e.xp6(5),e.hij("",e.xi3(12,10,e.xi3(13,13,t.data.Data,"MDRAmount"),"1.0-0")," "),e.xp6(4),e.Oqu(e.xi3(16,16,e.xi3(17,19,t.data.Data,"Nett"),"1.0-0"))}}function vn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"span",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.StoreRowsCountAPIResult("Payment/RecordPaymentCountByMethodID"))}),e.TgZ(1,"i",44),e._uU(2,"?"),e.qZA()()}}function Pn(a,i){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&a){const t=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,t.listTotal))}}function bn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",45)(1,"a",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.NextPage(!0))}),e._UZ(2,"i",47),e._uU(3," Next"),e.qZA(),e.TgZ(4,"a",48),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.StoreRowsCountAPIResult("Payment/RecordPaymentCountByMethodID",!0))}),e._UZ(5,"i",49),e._uU(6," Show All"),e.qZA()()}}const Fn=function(){return["/menu/Payment/Default/Detail/TypeColumn"]};function qn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,gn,3,0,"button",2),e.TgZ(3,"a",3),e._UZ(4,"i",4),e._uU(5,"With Type Column "),e.qZA()(),e.TgZ(6,"filters"),e.YNc(7,hn,12,9,"ng-template",null,5,e.W1O),e.qZA(),e.TgZ(9,"content")(10,"div",6)(11,"div",7)(12,"table",8),e.NdJ("matSortChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.sortData(o))}),e.TgZ(13,"thead",9)(14,"tr")(15,"th",10),e._uU(16,"Outlet"),e.qZA(),e.TgZ(17,"th",11),e._uU(18,"Day"),e.qZA(),e.TgZ(19,"th",12),e._uU(20,"Payment Date"),e.qZA(),e.TgZ(21,"th",13),e._uU(22,"Created"),e.qZA(),e.TgZ(23,"th"),e._uU(24,"Number"),e.qZA(),e.TgZ(25,"th",14),e._uU(26,"Amount"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Type"),e.qZA(),e.TgZ(29,"th",15),e._uU(30,"MDR"),e.qZA(),e.TgZ(31,"th",14),e._uU(32,"Nett"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,Cn,30,32,"tr",16),e.qZA(),e.YNc(35,An,18,22,"tfoot",17),e.qZA()(),e.TgZ(36,"div",18)(37,"div",19)(38,"div",20),e._uU(39),e.ALo(40,"number"),e.YNc(41,vn,3,0,"span",21),e.YNc(42,Pn,3,3,"span",17),e._uU(43),e.qZA()(),e.YNc(44,bn,7,0,"div",22),e.qZA()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(1),e.Q6J("routerLink",e.DdM(15,Fn)),e.xp6(31),e.Q6J("ngForOf",t.infiniteList),e.xp6(1),e.Q6J("ngIf",t.data.Data.length>0),e.xp6(4),e.hij(" Showing 1 - ",e.lcZ(40,13,t.pageData.Filter.RowCount*(t.pageData.Filter.PageNumber-1)+t.data.TotalCurrentRow)," of "),e.xp6(2),e.Q6J("ngIf",!t.pageData.HideStoreApiCount),e.xp6(1),e.Q6J("ngIf",t.pageData.HideStoreApiCount),e.xp6(1),e.hij(" records ~ ",t.pageData.Filter.PageNumber," Page "),e.xp6(1),e.Q6J("ngIf",t.nextPageDisabled&&!t.goToLast)}}function On(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",12),e._uU(2," Export"),e.qZA()}}function wn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",13)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",14),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"From - To"),e.qZA(),e.TgZ(6,"datepicker",15),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA(),e.TgZ(7,"div",16)(8,"datepicker",17),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}function Un(a,i){if(1&a&&(e.TgZ(0,"tr",18)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",9),e._uU(6),e.qZA(),e.TgZ(7,"td",9),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"td",9),e._uU(11),e.ALo(12,"number"),e.qZA(),e.TgZ(13,"td",9),e._uU(14),e.ALo(15,"number"),e.qZA(),e.TgZ(16,"td",9),e._uU(17),e.ALo(18,"number"),e.qZA()()),2&a){const t=i.$implicit,n=i.index;e.xp6(2),e.Oqu(n+1+"."),e.xp6(2),e.Oqu(t.Name),e.xp6(2),e.Oqu(t.Used),e.xp6(2),e.Oqu(e.lcZ(9,7,t.Minimum)),e.xp6(3),e.Oqu(e.lcZ(12,9,t.Maximum)),e.xp6(3),e.Oqu(e.lcZ(15,11,t.Average)),e.xp6(3),e.Oqu(e.lcZ(18,13,t.TotalAmount))}}function Nn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,On,3,0,"button",2),e.qZA(),e.TgZ(3,"filters"),e.YNc(4,wn,9,7,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th"),e._uU(13,"No"),e.qZA(),e.TgZ(14,"th",8),e._uU(15,"Payment Type"),e.qZA(),e.TgZ(16,"th",9),e._uU(17,"Count"),e.qZA(),e.TgZ(18,"th",9),e._uU(19,"Minimum"),e.qZA(),e.TgZ(20,"th",9),e._uU(21,"Maximum"),e.qZA(),e.TgZ(22,"th",9),e._uU(23,"Average"),e.qZA(),e.TgZ(24,"th",9),e._uU(25,"Total Amount"),e.qZA()()(),e.TgZ(26,"tbody"),e.YNc(27,Un,19,15,"tr",10),e.qZA()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(25),e.Q6J("ngForOf",t.data.Data)}}function Ln(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openExportModal())}),e._UZ(1,"i",22),e._uU(2," Export"),e.qZA()}}function Jn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"div",23)(1,"h6"),e._uU(2,"Outlet"),e.qZA(),e.TgZ(3,"ng-select",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.EntityID=o)}),e.qZA(),e.TgZ(4,"h6"),e._uU(5,"Reason"),e.qZA(),e.TgZ(6,"ng-select",25),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.ReasonID=o)}),e.qZA(),e.TgZ(7,"h6"),e._uU(8,"From - To"),e.qZA(),e.TgZ(9,"datepicker",26),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.From=o)}),e.qZA(),e.TgZ(10,"div",27)(11,"datepicker",28),e.NdJ("dateChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.pageData.Filter.To=o)})("dateChange",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.changeDatepickerValidation())}),e.qZA()()()}if(2&a){const t=e.oxw(2);e.xp6(3),e.Q6J("items",t.pageData.Options.Entities)("ngModel",t.pageData.Filter.EntityID),e.xp6(3),e.Q6J("items",t.pageData.Options.ReasonOption)("ngModel",t.pageData.Filter.ReasonID),e.xp6(3),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.From)("minDateValidation",t.checkValidFilterFrom),e.xp6(2),e.Q6J("isFloatingLabel",!1)("date",t.pageData.Filter.To)}}const Sn=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},kn=function(a){return{ID:a}};function Rn(a,i){if(1&a&&(e.TgZ(0,"tr",29)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"a",30),e._uU(5),e.qZA()(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td",31),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td",32),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"td",32),e._uU(15),e.ALo(16,"number"),e.qZA(),e.TgZ(17,"td"),e._uU(18),e.qZA(),e.TgZ(19,"td"),e._uU(20),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.ALo(23,"date"),e.qZA()()),2&a){const t=i.$implicit;e.xp6(2),e.Oqu(t.EntityName),e.xp6(2),e.Q6J("routerLink",e.DdM(21,Sn))("queryParams",e.VKq(22,kn,t.InvoiceID)),e.xp6(1),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.CustomerName),e.xp6(2),e.Oqu(e.lcZ(10,11,t.Amount)),e.xp6(3),e.Oqu(e.lcZ(13,13,t.SalesNTax)),e.xp6(3),e.hij("",e.xi3(16,15,t.percentage,"1.0-0"),"%"),e.xp6(3),e.Oqu(t.Reason),e.xp6(2),e.Oqu(t.CreatorName),e.xp6(2),e.Oqu(e.xi3(23,18,t.Created,"dd MMM yyyy"))}}function Gn(a,i){if(1&a){const t=e.EpF();e.TgZ(0,"mainpanel-cmp",1),e.NdJ("onSubmit",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.searchFromPageOne())})("filterChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.pageData.Filter=o)}),e.TgZ(1,"actions"),e.YNc(2,Ln,3,0,"button",2),e.qZA(),e.TgZ(3,"filters"),e.YNc(4,Jn,12,9,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr",8)(12,"th",9),e._uU(13,"Outlet"),e.qZA(),e.TgZ(14,"th",10),e._uU(15,"Number"),e.qZA(),e.TgZ(16,"th",11),e._uU(17,"Customer"),e.qZA(),e.TgZ(18,"th",12),e._uU(19,"Amount"),e.qZA(),e.TgZ(20,"th",12),e._uU(21,"Invoice"),e.qZA(),e.TgZ(22,"th",13),e._uU(23,"Percent"),e.qZA(),e.TgZ(24,"th",14),e._uU(25,"Reason"),e.qZA(),e.TgZ(26,"th",9),e._uU(27,"Created by"),e.qZA(),e.TgZ(28,"th",9),e._uU(29,"Date"),e.qZA()()(),e.TgZ(30,"tbody"),e.YNc(31,Rn,24,24,"tr",15),e.qZA(),e.TgZ(32,"tfoot")(33,"tr")(34,"td",16)(35,"span",17),e._uU(36,"Total:"),e.qZA()(),e.TgZ(37,"td",18),e._uU(38),e.qZA(),e.TgZ(39,"td",19),e._uU(40),e.ALo(41,"number"),e.ALo(42,"sum"),e.qZA(),e.TgZ(43,"td",20),e._uU(44),e.ALo(45,"number"),e.ALo(46,"sum"),e.qZA()()()()()()()()}if(2&a){const t=e.oxw();e.Q6J("pageData",t.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1)("filter",t.pageData.Filter),e.xp6(2),e.Q6J("ngIf",t.roleService.global.Export),e.xp6(29),e.Q6J("ngForOf",t.data.Data),e.xp6(7),e.hij("",t.data.Data.length," Invoice(s)"),e.xp6(2),e.Oqu(e.lcZ(41,9,e.xi3(42,11,t.data.Data,"Amount"))),e.xp6(4),e.Oqu(e.lcZ(45,14,e.xi3(46,16,t.data.Data,"SalesNTax")))}}const En=[{path:"Default/Received",component:sn},{path:"Default/Received/Bulk_Payment",component:Oe},{path:"Default/Received_by_Outlet",component:Ht},{path:"Default/Daily",component:xt},{path:"Default/Detail",component:(()=>{var a;class i extends un.X{constructor(n,o,r,m,d,D,M){super(n,o,"Payment/RecordPaymentByMethodID","PaymentLoader/RecordPaymentByMethodID",null,m),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"datasource",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.csvConverter=r,this.roleService=d,this.matDialog=D,this.dataDaysRangeService=M}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Record Payments",exportTypes:[{ID:"PaymentExport/RecordPaymentByMethodID",Value:"Default",FileName:"Record Payments"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"Payment/RecordPaymentCountByMethodID",pagination:!0}})}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount,this.changeDatepickerValidation()}sortData(n){const o=this.data.Data.slice();this.data.Data=n.active&&""!==n.direction?o.sort((r,m)=>{const d="asc"===n.direction;return"created"===n.active?this.compare(r.Created.toLocaleLowerCase(),m.Created.toLocaleLowerCase(),d):0}):this.datasource}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(g.gz),e.Y36(A.N),e.Y36(v.uw),e.Y36(F.k))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-record-payment-detail"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fa-solid","fa-table","me-3"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",2,"width","100%",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","180px"],[2,"width","80px"],[2,"width","120px"],["mat-sort-header","created",1,"align-left",2,"width","100px"],[1,"text-end",2,"width","150px"],["matTooltipPosition","above","matTooltip","Merchant Discount Rate",1,"text-end",2,"width","70px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["appendTo","body","bindLabel","Value","bindValue","Key",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["class","d-block",4,"ngIf"],[3,"routerLink","queryParams",4,"ngIf"],[1,"text-end"],[1,"text-end","text-danger"],[1,"d-block"],[3,"routerLink","queryParams"],[1,"table-footer"],["colspan","4",1,"text-end","empty-column","border-bottom-0"],[1,"border-bottom-0"],[1,"text-end","border-bottom-0"],[1,"text-end","empty-column","border-bottom-0"],[1,"text-end","text-danger","border-bottom-0"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"],[1,"btn-group"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(n,o){1&n&&e.YNc(0,qn,45,16,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,b.YE,b.nU,w.gM,c.JJ,c.uU,_.qU]})),i})()},{path:"Default/Detail/TypeColumn",component:at},{path:"Default/Top_Payment_Methods",component:(()=>{var a;class i extends f.n{constructor(n,o,r,m,d,D){super(n,o,"Payment/GetTopPayment","PaymentLoader/GetTopPaymentLoader"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.csvConverter=r,this.roleService=m,this.dataDaysRangeService=d,this.matDialog=D}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Top Payments",exportTypes:[{ID:"PaymentExport/GetTopPayment",Value:"Default",FileName:"Top Payments"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}preInitList(){this.pageData.Filter.ByMonth=!1,this.pageData.Filter.Custom=!0,this.changeDatepickerValidation()}export(n){this.exportCSV(this.csvConverter,"Payment/ExportPaymentMethod","paymentmethod.csv")}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(F.k),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-top-payment-methods"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","200px"],[1,"text-end"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"border-bottom"]],template:function(n,o){1&n&&e.YNc(0,Nn,28,6,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,h.p,s.JJ,s.On,u.QB,y.w9,c.JJ]})),i})()},{path:"Default/Made",component:Ee},{path:"Default/Made/Detail",component:rn},{path:"Default/Write_Off",component:(()=>{var a;class i extends f.n{constructor(n,o,r,m,d,D){super(n,o,"Payment/GetInvoiceWriteOff","PaymentLoader/GetInvoiceWriteOff"),(0,l.Z)(this,"csvConverter",void 0),(0,l.Z)(this,"roleService",void 0),(0,l.Z)(this,"dataDaysRangeService",void 0),(0,l.Z)(this,"matDialog",void 0),(0,l.Z)(this,"checkValidFilterFrom",void 0),this.csvConverter=r,this.roleService=m,this.dataDaysRangeService=d,this.matDialog=D}openExportModal(){this.matDialog.open(Z.H,{data:{title:"Write Off Invoices",exportTypes:[{ID:"PaymentExport/GetInvoiceWriteOff",Value:"Default",FileName:"Write Off Invoices"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(n){this.data.Data=this.data.Data.map(o=>this.calculatePercentage(o)),this.changeDatepickerValidation()}calculatePercentage(n){return n.percentage=(n.Amount?n.Amount:0)/(n.Sales?n.Sales:0)*100,n}changeDatepickerValidation(){this.checkValidFilterFrom=this.dataDaysRangeService.getFromDateValidation(this.pageData.Filter.To)}}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)(e.Y36(T.X),e.Y36(x.O),e.Y36(C.O),e.Y36(A.N),e.Y36(F.k),e.Y36(v.uw))}),(0,l.Z)(i,"\u0275cmp",e.Xpm({type:a,selectors:[["POS-write-off"]],features:[e.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange",4,"ngIf"],[3,"pageData","hideSearchBox","isFilterOnDropdown","filter","onSubmit","filterChange"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["pageFilterTemplate",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","100px"],[2,"width","150px"],[2,"width","180px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[2,"width","120px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom-0"],[1,"fw-bold"],[1,"border-bottom-0","fw-bold"],["colspan","2",1,"border-bottom-0","text-end","fw-bold"],[1,"border-bottom-0","text-end","fw-bold"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["appendTo","body","placeholder","Choose a reason","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","minDateValidation","dateChange"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams"],[1,"text-end","text-danger"],[1,"text-end"]],template:function(n,o){1&n&&e.YNc(0,Gn,47,19,"mainpanel-cmp",0),2&n&&e.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,g.rH,h.p,s.JJ,s.On,u.QB,y.w9,c.JJ,c.uU,_.qU]})),i})()},{path:"Default/Payment_Gateway",component:St},{path:"Default/Payment_Gateway/Daily",component:At},{path:"Default/Payment_Gateway/Detail",component:Ft},{path:"Advance/Received_by_User",component:me},{path:"Advance/Payments_Difference",component:z},{path:"",redirectTo:"Default/Received",pathMatch:"full"}];let Bn=(()=>{var a;class i{}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)}),(0,l.Z)(i,"\u0275mod",e.oAB({type:a})),(0,l.Z)(i,"\u0275inj",e.cJS({imports:[g.Bz.forChild(En),g.Bz]})),i})();var Yn=p(50852);let Qn=(()=>{var a;class i{}return a=i,(0,l.Z)(i,"\u0275fac",function(n){return new(n||a)}),(0,l.Z)(i,"\u0275mod",e.oAB({type:a})),(0,l.Z)(i,"\u0275inj",e.cJS({imports:[c.ez,Bn,h.R,s.u5,_.dr,u.ZU,y.A0,I.K,b.JX,O.Q,R.TU,N.vV,w.AV,Yn.X,y.A0]})),i})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1258],{58087:(L,v,l)=>{l.d(v,{s:()=>C,n:()=>u});var o=l(81180),d=l(4132),S=l(86864),D=l(9315),m=l(37398),c=l(99397),M=l(34423);class b{constructor(){(0,o.Z)(this,"enabledDragItem",void 0),this.enabledDragItem=!1}drop(i,t){(0,M.bA)(t.Data,i.previousIndex,i.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(i,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.postListID(i,t.data.Data)}onPutSaveDragAndDrop(i,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.putListID(i,t.data.Data)}}class I{constructor(i){(0,o.Z)(this,"httpService",void 0),this.httpService=i}exportCSV(i,t,a,s){a.pageData.Filter.Export=!0,a.pageData.Filter.FormatType=C.CSV,s=s||"export.csv",this.httpService.post(`/api/${t}`,JSON.stringify(a.pageData.Filter)).subscribe(n=>{i.convertToCSV(n,s),a.pageData.Filter.Export=!1})}convertToCSV(i,t=!1,a){let s=this.ExportDataFromUI2(t);i.convertToCSV(s,a)}ExportDataFromUI2(i=!1){const t=document.getElementById("tableGrid"),a=[];return S.g.IsNotEmpty(t)&&t.querySelectorAll("tr").forEach(n=>{const r=new Object;let h=0;n.querySelectorAll("th, td").forEach(f=>{h++;const O=parseInt(f.getAttribute("colspan"));for(let E=1;E<O;E++)r["column"+h]="",h++;const P=f.innerText,Z=P.toString().split("");if(i&&"0"===Z[0]&&Z.length>1){let E="'"+P.trim();r["column"+h]=E}else r["column"+h]=P.trim()}),a.push(r)}),a}}var e=l(40652);class _{constructor(){(0,o.Z)(this,"listTotal",void 0),(0,o.Z)(this,"pageSize",void 0),(0,o.Z)(this,"show",void 0),this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(i){this.pageSize=i.pageData.Filter.RowCount,this.listTotal=i.data?.ListTotal,this.show=this.pageSize<=this.listTotal}changePage(i,t,a){t.Filter.PageNumber=i.pageIndex+1,a.getListData()}}var x=l(54165),y=l(65879),C=function(p){return p[p.CSV=0]="CSV",p[p.XLSX=1]="XLSX",p}(C||{});class u extends e.M{constructor(i,t,a,s,n,r){super(i),(0,o.Z)(this,"httpService",void 0),(0,o.Z)(this,"dataAPI",void 0),(0,o.Z)(this,"pageAPI",void 0),(0,o.Z)(this,"toastrService",void 0),(0,o.Z)(this,"route",void 0),(0,o.Z)(this,"reportFilterService",(0,y.f3M)(x.z)),(0,o.Z)(this,"pageData",{Filter:{},Options:{},Roles:{},Config:{}}),(0,o.Z)(this,"data",void 0),(0,o.Z)(this,"pagination",new _),(0,o.Z)(this,"dragDrop",new b),(0,o.Z)(this,"exportHandler",void 0),(0,o.Z)(this,"comparation",0),(0,o.Z)(this,"queryParams",{}),this.httpService=t,this.dataAPI=a,this.pageAPI=s,this.toastrService=n,this.route=r,this.exportHandler=new I(t),s?(r&&(this.queryParams={ListIDs:this.reportFilterService?.initOutletFilter(),...r.snapshot.queryParams}),this.preInitLoader(),(0,D.D)([this.menuData$,this.httpService.post("/api/"+this.pageAPI,JSON.stringify(this.queryParams))]).pipe((0,m.U)(([h,g])=>g)).subscribe(h=>{this.pageData=h,this.pageData.Filter||(this.pageData.Filter={}),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.queryParams.ID,this.preInitList(),this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),(0,D.D)({menuData:this.menuData$,listData:this.getListData$()}).subscribe())}preInitLoader(){}preInitList(){}getListData(i){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,JSON.stringify(this.pageData.Filter)).subscribe(t=>{this.data=t,this.postInit(t),this.pagination.changePaginationData(this),i&&(this.pageData.HideStoreApiCount=!1)})}getListData$(i){return this.preGetList(),this.httpService.post("/api/"+this.dataAPI,JSON.stringify(this.pageData.Filter)).pipe((0,c.b)(t=>{this.data=t,this.postInit(t),this.pagination.changePaginationData(this),i&&(this.pageData.HideStoreApiCount=!1)}))}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(i){null!=i.PageTitle&&(this.menuData.H=i.PageTitle)}preGetList(){null==this.pageData.Filter.From&&(this.pageData.Filter.From=S.g.MinDate),null==this.pageData.Filter.To&&(this.pageData.Filter.To=S.g.MinDate)}preSearchFromPageOne(){}onPaginationChange(i){this.pagination.changePage(i,this.pageData,this)}onSelectAllData(i){this.data.Data=this.data.Data.map(t=>(t.selected=i,t))}getSelectedData(){let i=[];return this.data&&(i=this.data.Data.filter(t=>t.selected)),i}httpPostListID(i,t,a){if(t||(t="Are you sure you want to selected record/s?"),0==confirm(t))return;let s=this.getSelectedData();s.length>0&&this.postListID(i,s,a)}httpPutListID(i,t,a){if(t||(t="Are you sure you want to selected record/s?"),0==confirm(t))return;let s=this.getSelectedData();s.length>0&&this.putListID(i,s,a)}httpDeleteListID(i,t,a){if(t||(t="Are you sure you want to delete selected record/s?"),0==confirm(t))return;let s=this.getSelectedData();s.length>0&&this.DeleteListID(i,s,a)}onSaveDragAndDrop(i){this.dragDrop.onSaveDragAndDrop(i,this)}onPutSaveDragAndDrop(i){this.dragDrop.onPutSaveDragAndDrop(i,this)}postListID(i,t,a){const s=t.map(n=>a?n[a]:n.ID);this.httpService.post(`/api/${i}`,s).subscribe(n=>{this.toastrService.success(n.Message?n.Message:n,d.n.Success),this.getListData()})}putListID(i,t,a){const s=t.map(n=>a?n[a]:n.ID);this.httpService.put(`/api/${i}`,s).subscribe(n=>{this.toastrService.success(n.Message?n.Message:n,d.n.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(i,t,a){const s=t.map(n=>a?n[a]:n.ID);this.httpService.delete(`/api/${i}`,s).subscribe(n=>{this.toastrService.success(n.Message?n.Message:n,d.n.Success),this.getListData()})}postData(i,t){this.httpService.post("/API/"+i,JSON.stringify(t)).subscribe(a=>{this.getListData(),this.toastrService.success(a.Message?a.Message:a,d.n.Success)})}compare(i,t,a){return(i<t?-1:1)*(a?1:-1)}exportCSV(i,t,a){this.exportHandler.exportCSV(i,t,this,a)}s2ab(i){for(var t=new ArrayBuffer(i.length),a=new Uint8Array(t),s=0;s!=i.length;++s)a[s]=255&i.charCodeAt(s);return t}exportXlsx(i,t){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${i}`,JSON.stringify(this.pageData.Filter)).subscribe(a=>{t=decodeURI(t);const s=window.URL.createObjectURL(new Blob([this.s2ab(atob(a))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),n=document.createElement("a");n.href=s,n.setAttribute("download",t),document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(s),n.remove()})}convertToCSV(i,t=!1,a){let s=this.exportHandler.ExportDataFromUI2(t);i.convertToCSV(s,a)}OnCompare(i){const t=i?this.data[i]:this.data;if(t.length<1)return;const a=Object.assign({},this.pageData.Filter);a.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),a.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,JSON.stringify(a)).subscribe(s=>{const n=i?s[i]:s;this.comparation=0,t.forEach(r=>{r.PrevIndex="-",r.CurrentIndex="-",r.Increase="-";const h=n.filter(g=>g.EntityID==r.EntityID);if(r.CurrentIndex=r.Rank,h.length>0){const g=h[0];r.PrevIndex=g.Rank,g.SalesNet?r.Increase=(r.SalesNet-g.SalesNet)/g.SalesNet*100:g.Sales&&(r.Increase=(r.Sales-g.Sales)/g.Sales*100),r.IsPositive=r.Increase>0,r.IsNegative=r.Increase<0,this.comparation+=r.Increase}})})}}},40652:(L,v,l)=>{l.d(v,{M:()=>S});var o=l(81180),d=l(99397);class S{constructor(m){(0,o.Z)(this,"menuData$",void 0),(0,o.Z)(this,"menuData",{T:null,N:null,H:null,U:null}),m.setMenu$(),this.menuData$=m.menu$.pipe((0,d.b)(c=>this.menuData=c))}}},67547:(L,v,l)=>{l.d(v,{X:()=>a});var o=l(81180),d=l(22096),S=l(36232),D=l(99397),m=l(94664),c=l(37398),M=l(26306),b=l(96814),I=l(17700),e=l(65879);function _(s,n){if(1&s&&e._UZ(0,"button",14),2&s){const r=e.oxw().index;e.uIk("data-bs-slide-to",r)}}function x(s,n){if(1&s&&(e.ynx(0),e.YNc(1,_,1,1,"button",13),e.BQk()),2&s){const r=n.index;e.xp6(1),e.Q6J("ngIf",0!=r)}}function y(s,n){if(1&s&&(e.TgZ(0,"div",11),e._UZ(1,"button",12),e.YNc(2,x,2,1,"ng-container",10),e.qZA()),2&s){const r=e.oxw();e.xp6(1),e.uIk("data-bs-slide-to",0),e.xp6(1),e.Q6J("ngForOf",r.changelogs)}}function C(s,n){if(1&s&&(e.TgZ(0,"div",16),e._UZ(1,"img",6),e.TgZ(2,"div",7)(3,"h2")(4,"a",8),e._uU(5),e.qZA()(),e.TgZ(6,"p",9),e._uU(7),e.qZA()()()),2&s){const r=e.oxw().$implicit;e.xp6(1),e.Q6J("src",r.ImageSource,e.LSH),e.xp6(3),e.Q6J("href",r.Href,e.LSH),e.xp6(1),e.Oqu(r.Title),e.xp6(2),e.hij(" ",r.Description," ")}}function u(s,n){if(1&s&&(e.ynx(0),e.YNc(1,C,8,4,"div",15),e.BQk()),2&s){const r=n.index;e.xp6(1),e.Q6J("ngIf",0!=r)}}let p=(()=>{var s;class n{constructor(h,g){(0,o.Z)(this,"dialogRef",void 0),(0,o.Z)(this,"changelogs",[]),this.dialogRef=g,this.changelogs=h}close(){this.dialogRef.close()}}return s=n,(0,o.Z)(n,"\u0275fac",function(h){return new(h||s)(e.Y36(I.WI),e.Y36(I.so))}),(0,o.Z)(n,"\u0275cmp",e.Xpm({type:s,selectors:[["POS-modal-changelog"]],standalone:!0,features:[e.jDz],decls:15,vars:6,consts:[[1,"changelog-container","h-100"],["mat-button","",1,"close",3,"click"],["id","carouselExampleIndicators","data-bs-ride","carousel",1,"carousel","slide"],["class","carousel-indicators",4,"ngIf"],[1,"carousel-inner"],[1,"carousel-item","active"],["alt","",3,"src"],[1,"text-container",2,"height","150px","width","40vw","margin","0 auto"],["target","_blank",3,"href"],[1,"description"],[4,"ngFor","ngForOf"],[1,"carousel-indicators"],["type","button","data-bs-target","#carouselExampleIndicators","aria-current","true",1,"active"],["type","button","data-bs-target","#carouselExampleIndicators","aria-current","true",4,"ngIf"],["type","button","data-bs-target","#carouselExampleIndicators","aria-current","true"],["class","carousel-item",4,"ngIf"],[1,"carousel-item"]],template:function(h,g){1&h&&(e.TgZ(0,"div",0)(1,"button",1),e.NdJ("click",function(){return g.close()}),e._uU(2,"X"),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,y,3,2,"div",3),e.TgZ(5,"div",4)(6,"div",5),e._UZ(7,"img",6),e.TgZ(8,"div",7)(9,"h2")(10,"a",8),e._uU(11),e.qZA()(),e.TgZ(12,"p",9),e._uU(13),e.qZA()()(),e.YNc(14,u,2,1,"ng-container",10),e.qZA()()()),2&h&&(e.xp6(4),e.Q6J("ngIf",g.changelogs.length>1),e.xp6(3),e.Q6J("src",g.changelogs[0].ImageSource,e.LSH),e.xp6(3),e.Q6J("href",g.changelogs[0].Href,e.LSH),e.xp6(1),e.Oqu(g.changelogs[0].Title),e.xp6(2),e.hij(" ",g.changelogs[0].Description," "),e.xp6(1),e.Q6J("ngForOf",g.changelogs))},dependencies:[b.ez,b.sg,b.O5],styles:[".changelog-container[_ngcontent-%COMP%]{position:relative;text-align:center}.changelog-container[_ngcontent-%COMP%] .carousel.slide[_ngcontent-%COMP%]{height:100%}.changelog-container[_ngcontent-%COMP%] .carousel-indicators[_ngcontent-%COMP%] [data-bs-target][_ngcontent-%COMP%]{background-color:#dbdfea}.changelog-container[_ngcontent-%COMP%] .carousel-indicators[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{background-color:#19a7ce}.changelog-container[_ngcontent-%COMP%] .carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:10px;border:0}.changelog-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{aspect-ratio:16/9;max-height:55vh}@media (max-width: 576px){.changelog-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{aspect-ratio:auto;width:100%}}.changelog-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-top:20px}.changelog-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:10px!important;margin-bottom:15px!important;max-width:700px;font-size:15px;margin:0 auto}.changelog-container[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{position:absolute;top:15px;right:20px;transform:translate(100%,-100%);background:white;padding:8px 13px;min-width:auto;border:none;border-radius:119px;z-index:2}@media (max-width: 576px){.changelog-container[_ngcontent-%COMP%] .text-container[_ngcontent-%COMP%]{width:100%!important}}"]})),n})();var i=l(58763),t=l(6593);let a=(()=>{var s;class n{constructor(h,g,f){(0,o.Z)(this,"http",void 0),(0,o.Z)(this,"matDialog",void 0),(0,o.Z)(this,"title",void 0),(0,o.Z)(this,"menu$",void 0),this.http=h,this.matDialog=g,this.title=f}setMenu$(){const h=this.getCurrentFormattedRoute();this.menu$=this.http.get(`/API/Menu/${h}`).pipe((0,D.b)(g=>this.title.setTitle(g.T)),(0,m.w)(g=>{let f=(0,d.of)(g);if(g.U.length>0){localStorage.getItem("mapRouteOpenChangelogDialog")||localStorage.setItem("mapRouteOpenChangelogDialog",JSON.stringify([]));const O=JSON.parse(localStorage.getItem("mapRouteOpenChangelogDialog")),P=h.split("?")[0];O.includes(P)||(O.push(P),localStorage.setItem("mapRouteOpenChangelogDialog",JSON.stringify(O)),f=this.matDialog.open(p,{panelClass:"changelog-dialog",data:g.U}).afterOpened().pipe((0,c.U)(()=>g)))}return f}),(0,M.K)(()=>S.E))}getCurrentFormattedRoute(){try{let h=window.location.href;return h=h.split("menu/")[1],h=h.split(";")[0],h}catch(h){console.log(h)}}}return s=n,(0,o.Z)(n,"\u0275fac",function(h){return new(h||s)(e.LFG(i.O),e.LFG(I.uw),e.LFG(t.Dx))}),(0,o.Z)(n,"\u0275prov",e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"})),n})()},63729:(L,v,l)=>{l.d(v,{a:()=>C});var o=l(81180),d=l(96814),S=l(64190),D=l(86864),m=l(48807),c=l(65879),M=l(41001);const b=function(u){return{"pe-none":u}},I=function(){return["/menu/Profile/Main/My_Subscription"]},e=function(u){return{"text-decoration-none":u}},_=function(u){return{"text-capitalize":u}};function x(u,p){if(1&u&&(c.TgZ(0,"div",2)(1,"h5",3),c._uU(2),c.TgZ(3,"a",4)(4,"u",5)(5,"span",5),c._uU(6,"please"),c.qZA(),c._uU(7," process your payment! "),c.qZA()()()()),2&u){const i=c.oxw().$implicit,t=c.oxw();c.Tol("alert rounded-0 mb-0 text-center border-bottom "+i.class),c.xp6(2),c.hij(" ",i.message," "),c.xp6(1),c.Q6J("ngClass",c.VKq(7,b,t.isMySubscriptionMenu))("routerLink",c.DdM(9,I)),c.xp6(1),c.Q6J("ngClass",c.VKq(10,e,t.isMySubscriptionMenu)),c.xp6(1),c.Q6J("ngClass",c.VKq(12,_,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}function y(u,p){if(1&u&&(c.ynx(0),c.YNc(1,x,8,14,"div",1),c.BQk()),2&u){const i=p.$implicit,t=c.oxw();c.xp6(1),c.Q6J("ngIf",i.status==t.currentSubStatus&&t.isNotEmpty(t.currentSubStatus))}}let C=(()=>{var u;class p{constructor(t,a,s){(0,o.Z)(this,"document",void 0),(0,o.Z)(this,"router",void 0),(0,o.Z)(this,"authService",void 0),(0,o.Z)(this,"subscriptionStatus",void 0),(0,o.Z)(this,"currentSubStatus",void 0),(0,o.Z)(this,"subsStatusEnum",m.y),(0,o.Z)(this,"isMySubscriptionMenu",void 0),(0,o.Z)(this,"htmlStyleElement",void 0),(0,o.Z)(this,"htmlBodyElement",void 0),this.document=t,this.router=a,this.authService=s}ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus(),this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(t){return D.g.IsNotEmpty(t)}overrideCssStickyHeader(){if(D.g.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==m.y.PAID){const t=".sticky-top-thead th {\n top: 100px !important;\n z-index: 1020;\n }";this.htmlBodyElement=this.document.getElementsByTagName("body")[0],this.htmlStyleElement=this.document.createElement("style"),this.htmlStyleElement.appendChild(this.document.createTextNode(t)),this.htmlBodyElement.appendChild(this.htmlStyleElement)}}initSubscriptionStatus(){this.subscriptionStatus=[{status:m.y.OVERDUE,class:"alert-warning",message:"Your subscription is overdue. To avoid suspension, "},{status:m.y.SELL_ONLY,class:"alert-danger",message:"Your subscription is partially suspended."},{status:m.y.SUSPENDED,class:"alert-danger",message:"Your subscription is suspended."}]}ngOnDestroy(){this.htmlBodyElement&&this.htmlBodyElement.removeChild(this.htmlStyleElement)}}return u=p,(0,o.Z)(p,"\u0275fac",function(t){return new(t||u)(c.Y36(d.K0),c.Y36(S.F0),c.Y36(M.e))}),(0,o.Z)(p,"\u0275cmp",c.Xpm({type:u,selectors:[["subscription-alert"]],standalone:!0,features:[c.jDz],decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["role","alert",3,"class",4,"ngIf"],["role","alert"],[1,"fw-normal"],[1,"alert-link",3,"ngClass","routerLink"],[3,"ngClass"]],template:function(t,a){1&t&&c.YNc(0,y,2,1,"ng-container",0),2&t&&c.Q6J("ngForOf",a.subscriptionStatus)},dependencies:[d.ez,d.mk,d.sg,d.O5,S.Bz,S.rH]})),p})()}}]);