@sumaris-net/ngx-components 1.18.1 → 1.18.2
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.
- package/bundles/sumaris-net.ngx-components.umd.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +2 -2
- package/fesm2015/sumaris-net.ngx-components.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/table"),require("@angular/cdk/a11y"),require("@angular/cdk/overlay"),require("@angular/cdk/scrolling"),require("@angular/material/core"),require("@angular/material/table"),require("@angular/material/sort"),require("@angular/material/paginator"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/material/checkbox"),require("@angular/material/expansion"),require("@angular/material/toolbar"),require("@angular/material/icon"),require("@angular/material/button"),require("@angular/material/menu"),require("@angular/material/select"),require("@angular/material/card"),require("@angular/material/tabs"),require("@angular/material/stepper"),require("@angular/material/list"),require("@angular/material/button-toggle"),require("@angular/material/progress-spinner"),require("@angular/material/progress-bar"),require("@angular/material/radio"),require("@angular/material/badge"),require("@angular/material/slide-toggle"),require("@angular/material/dialog"),require("@angular/material/autocomplete"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/animations"),require("@ngx-translate/core"),require("@ionic/angular"),require("moment"),require("@angular/material-moment-adapter"),require("moment-timezone"),require("@ionic-native/keyboard/ngx"),require("angular2-text-mask"),require("ngx-material-timepicker"),require("@angular/material/datepicker"),require("@angular/material/divider"),require("@angular/material/tooltip"),require("@angular/material/chips"),require("@angular/router"),require("@angular/platform-browser"),require("@angular/common/http"),require("ngx-color-picker"),require("@ionic-native/native-audio/ngx"),require("@ionic-native/vibration/ngx"),require("@ionic-native/audio-management/ngx"),require("@ionic-native/native-audio/ngx/index"),require("@ionic-native/vibration/ngx/index"),require("@ionic-native/audio-management/ngx/index"),require("uuid/v4"),require("@angular/cdk/drag-drop"),require("ngx-markdown"),require("tweetnacl"),require("@ionic/storage"),require("zone.js/dist/zone-error"),require("@ionic-native/splash-screen/ngx"),require("@ionic-native/network/ngx"),require("ionic-cache"),require("ionic-cache/dist/cache.service"),require("@ionic-native/network/ngx/index"),require("@ionic-native/splash-screen/ngx/index"),require("@ionic-native/status-bar/ngx"),require("@angular/cdk/platform"),require("@ionic-native/in-app-browser/ngx"),require("@apollo/client/core"),require("apollo-angular"),require("@apollo/client/link/ws"),require("@apollo/client/utilities"),require("@apollo/client/link/retry"),require("apollo-link-queue"),require("apollo-link-serialize"),require("apollo-link-logger"),require("apollo-angular/http"),require("apollo3-cache-persist"),require("@ionic-native/downloader/ngx"),require("@ionic-native/status-bar/ngx/index"),require("@ionic-native/keyboard/ngx/index"),require("@ionic-native/in-app-browser/ngx/index"),require("@ionic-native/downloader/ngx/index"),require("@angular/cdk/text-field"),require("@e-is/ngx-material-table"),require("@angular/cdk/collections"),require("ngx-jdenticon"),require("tweetnacl-util"),require("scrypt-async"),require("hammerjs")):"function"==typeof define&&define.amd?define("@sumaris-net/ngx-components",["exports","@angular/core","@angular/common","@angular/cdk/table","@angular/cdk/a11y","@angular/cdk/overlay","@angular/cdk/scrolling","@angular/material/core","@angular/material/table","@angular/material/sort","@angular/material/paginator","@angular/material/form-field","@angular/material/input","@angular/material/checkbox","@angular/material/expansion","@angular/material/toolbar","@angular/material/icon","@angular/material/button","@angular/material/menu","@angular/material/select","@angular/material/card","@angular/material/tabs","@angular/material/stepper","@angular/material/list","@angular/material/button-toggle","@angular/material/progress-spinner","@angular/material/progress-bar","@angular/material/radio","@angular/material/badge","@angular/material/slide-toggle","@angular/material/dialog","@angular/material/autocomplete","@angular/forms","rxjs","rxjs/operators","@angular/animations","@ngx-translate/core","@ionic/angular","moment","@angular/material-moment-adapter","moment-timezone","@ionic-native/keyboard/ngx","angular2-text-mask","ngx-material-timepicker","@angular/material/datepicker","@angular/material/divider","@angular/material/tooltip","@angular/material/chips","@angular/router","@angular/platform-browser","@angular/common/http","ngx-color-picker","@ionic-native/native-audio/ngx","@ionic-native/vibration/ngx","@ionic-native/audio-management/ngx","@ionic-native/native-audio/ngx/index","@ionic-native/vibration/ngx/index","@ionic-native/audio-management/ngx/index","uuid/v4","@angular/cdk/drag-drop","ngx-markdown","tweetnacl","@ionic/storage","zone.js/dist/zone-error","@ionic-native/splash-screen/ngx","@ionic-native/network/ngx","ionic-cache","ionic-cache/dist/cache.service","@ionic-native/network/ngx/index","@ionic-native/splash-screen/ngx/index","@ionic-native/status-bar/ngx","@angular/cdk/platform","@ionic-native/in-app-browser/ngx","@apollo/client/core","apollo-angular","@apollo/client/link/ws","@apollo/client/utilities","@apollo/client/link/retry","apollo-link-queue","apollo-link-serialize","apollo-link-logger","apollo-angular/http","apollo3-cache-persist","@ionic-native/downloader/ngx","@ionic-native/status-bar/ngx/index","@ionic-native/keyboard/ngx/index","@ionic-native/in-app-browser/ngx/index","@ionic-native/downloader/ngx/index","@angular/cdk/text-field","@e-is/ngx-material-table","@angular/cdk/collections","ngx-jdenticon","tweetnacl-util","scrypt-async","hammerjs"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["sumaris-net"]=t["sumaris-net"]||{},t["sumaris-net"]["ngx-components"]={}),t.ng.core,t.ng.common,t.ng.cdk.table,t.ng.cdk.a11y,t.ng.cdk.overlay,t.ng.cdk.scrolling,t.ng.material.core,t.ng.material.table,t.ng.material.sort,t.ng.material.paginator,t.ng.material.formField,t.ng.material.input,t.ng.material.checkbox,t.ng.material.expansion,t.ng.material.toolbar,t.ng.material.icon,t.ng.material.button,t.ng.material.menu,t.ng.material.select,t.ng.material.card,t.ng.material.tabs,t.ng.material.stepper,t.ng.material.list,t.ng.material.buttonToggle,t.ng.material.progressSpinner,t.ng.material.progressBar,t.ng.material.radio,t.ng.material.badge,t.ng.material.slideToggle,t.ng.material.dialog,t.ng.material.autocomplete,t.ng.forms,t.rxjs,t.rxjs.operators,t.ng.animations,t["ngx-translate"].core,t.ionic.angular,t.moment,t.ng.materialMomentAdapter,t["moment-timezone"],t["ionic-native"].keyboard.ngx,t["angular2-text-mask"],t["ngx-material-timepicker"],t.ng.material.datepicker,t.ng.material.divider,t.ng.material.tooltip,t.ng.material.chips,t.ng.router,t.ng.platformBrowser,t.ng.common.http,t["ngx-color-picker"],t["ionic-native"]["native-audio"].ngx,t["ionic-native"].vibration.ngx,t["ionic-native"]["audio-management"].ngx,t["ionic-native"]["native-audio"].ngx.index,t["ionic-native"].vibration.ngx.index,t["ionic-native"]["audio-management"].ngx.index,t.uuid.v4,t.ng.cdk.dragDrop,t["ngx-markdown"],t.tweetnacl,t.ionic.storage,null,t["ionic-native"]["splash-screen"].ngx,t["ionic-native"].network.ngx,t["ionic-cache"],t["ionic-cache/dist/cache"].service,t["ionic-native"].network.ngx.index,t["ionic-native"]["splash-screen"].ngx.index,t["ionic-native"]["status-bar"].ngx,t.ng.cdk.platform,t["ionic-native"]["in-app-browser"].ngx,t.apollo.client.core,t["apollo-angular"],t.apollo.client.link.ws,t.apollo.client.utilities,t.apollo.client.link.retry,t["apollo-link-queue"],t["apollo-link-serialize"],t["apollo-link-logger"],t["apollo-angular"].http,t["apollo3-cache-persist"],t["ionic-native"].downloader.ngx,t["ionic-native"]["status-bar"].ngx.index,t["ionic-native"].keyboard.ngx.index,t["ionic-native"]["in-app-browser"].ngx.index,t["ionic-native"].downloader.ngx.index,t.ng.cdk.textField,t["e-is"]["ngx-material-table"],t.ng.cdk.collections,t["ngx-jdenticon"])}(this,(function(t,e,n,o,r,i,a,s,l,c,u,d,p,h,m,f,g,b,y,v,C,w,E,I,x,O,_,k,S,T,A,R,P,D,N,M,F,L,j,B,V,U,q,$,H,G,z,W,K,Q,Y,J,X,Z,tt,et,nt,ot,rt,it,at,st,lt,ct,ut,dt,pt,ht,mt,ft,gt,bt,yt,vt,Ct,wt,Et,It,xt,Ot,_t,kt,St,Tt,At,Rt,Pt,Dt,Nt,Mt,Ft,Lt){"use strict";function jt(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function Bt(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var Vt=Bt(e),Ut=Bt(n),qt=Bt(s),$t=Bt(A),Ht=Bt(P),Gt=Bt(F),zt=Bt(L),Wt=Bt(j),Kt=Bt(B),Qt=Bt(K),Yt=Bt(Q),Jt=Bt(Y),Xt=Bt(et),Zt=Bt(nt),te=Bt(ot),ee=Bt(rt),ne=Bt(lt),oe=Bt(ht),re=Bt(mt),ie=Bt(ft),ae=Bt(bt),se=Bt(Ct),le=jt(xt),ce=jt(Ot),ue=jt(_t),de=Bt(kt),pe=Bt(At),he=Bt(Rt),me=Bt(Pt),fe=Bt(Dt),ge=new e.InjectionToken("ENV"),be=function(){},ye="YYYY-MM-DDTHH:mm:ss.SSSZ",ve="_",Ce=/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$/,we=250,Ee=function(t,e){return Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ee(t,e)};function Ie(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function xe(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function Oe(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))}function _e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function ke(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Se(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function Te(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Se(arguments[e]));return t}function Ae(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}Object.create;function Re(t){return null==t}function Pe(t){return null==t||"string"==typeof t&&""===t.trim()}function De(t){return null!=t}function Ne(t){return null!=t&&("string"!=typeof t||""!==t.trim())}function Me(t){return null!=t&&("number"!=typeof t||!isNaN(t))}function Fe(t){return null!=t&&t.length>0}function Le(t){return null==t||!t.length}function je(t){return null!=t&&"string"==typeof t||!1}function Be(t){return void 0===t?null:t}function Ve(t,e){return null!=t?"false"!==t&&!!t:e}function Ue(t,e){return null!=t?+t:e}function qe(t,e){return t&&t.toUpperCase().startsWith(e)}function $e(t,e){return t&&!!t.toUpperCase().match(e)}function He(t){if(t&&"/"!==t.trim())return t.trim().lastIndexOf("/")===t.length-1?t.substring(0,t.length-1):t}function Ge(t,e){return(null==t?void 0:t.endsWith(e||""))?t.substr(0,t.length-e.length):t}function ze(t){return Pe(t)?t:t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function We(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Ke(t,e,n){var o=this;if(De(e)&&"object"==typeof e)return{data:[e]};e="string"==typeof e&&"*"!==e&&e.toUpperCase()||void 0;var r=n&&(n.searchAttribute&&[n.searchAttribute]||n.searchAttributes)||["label"];if(!t)return{data:[],total:0};var i=t;Ne(e)&&(-1!==e.indexOf("*")?(e=e.replace("*",".*"),i=i.filter((function(t){return-1!==r.findIndex((function(n){return $e(on(t,n),e)}))}))):i=i.filter((function(t){return-1!==r.findIndex((function(n){return qe(on(t,n),e)}))}))),Fe(null==n?void 0:n.excludedIds)&&(i=i.filter((function(t){return!n.excludedIds.includes(+t.id)}))),n&&!0===n.skipSort||(i===t&&(i=i.slice()),i.sort(Ye(r)));var a=i.length||0,s=i;n&&((n.offset||0)>0&&(s=s.slice(n.offset)),De(n.size)&&s.length>n.size&&(s=s.slice(0,n.size)));var l={data:s,total:a},c=(n&&n.offset||0)+s.length;return c<a&&(l.fetchMore=function(t){return Oe(o,void 0,void 0,(function(){return _e(this,(function(t){return[2,Ke(i,void 0,Object.assign(Object.assign({},n),{offset:c,skipSort:!0,excludedIds:void 0}))]}))}))}),l}function Qe(t,e,n){if(!t)throw new Error("Could not display an undefined entity.");return e.map((function(e){return en(t,e)})).filter(Ne).join(n||" - ")}function Ye(t,e){if(!t||!t.length||e&&t.length>e.length)throw new Error("Invalid arguments: missing 'keys' or array 'defaultValues' has a bad length");return function(n,o){return t.map((function(t,r){var i=en(n,t,e&&e[r]),a=en(o,t,e&&e[r]);return i===a?0:i>a?1:-1})).find((function(t){return 0!==t}))||0}}var Je=/^[-]?\d+$/;function Xe(t){return De(t)&&Je.test(t)}var Ze=/^[-]?\d+(\.\d+)?$/;var tn=/^(\d+-\d+)|([><=]*\d+)$/;function en(t,e,n){if(Re(t))return n;if(Pe(e))return t;var o=e.indexOf(".");if(-1===o){var r=t[e];return De(r)||Re(n)?r:n}var i=e.substring(0,o);if(Re(t[i]))return n;if(t[i]&&"object"==typeof t[i])return en(t[i],e.substring(o+1));throw new Error("Invalid property path: '"+i+"' is not an valid object.")}function nn(t,e){if(!Re(t))return t[e]}function on(t,e){var n=en(t,e);return n&&("string"==typeof n?n:""+n)}function rn(t){if(!(t<=0))return new Promise((function(e){return setTimeout(e,t)}))}function an(t){return Me(t)?Math.round(100*(t+Number.EPSILON))/100:t}function sn(t){return t&&0!==t.length?t.substr(0,1).toUpperCase()+t.substr(1):t}function ln(t){return(t||[]).reduce((function(t,e){var n=null==e?void 0:e.id;return De(n)&&(t[n]=e),t}),{})}function cn(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;var n,o,r,i=typeof t;if(i==typeof e&&"object"==i){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(o in r=Object.create(null),t){if(!cn(t[o],e[o]))return!1;r[o]=!0}for(o in e)if(!(o in r)&&void 0!==e[o])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(o=0;o<n;o++)if(!cn(t[o],e[o]))return!1;return!0}}return!1}var un=function(){function t(){}return t.copy=function(t,e,n){if(Re(t))return t;var o=new e;return Object.keys(n||o).forEach((function(e){o[e]=t[e]})),o},t.isEmpty=function(e,n,o){return Re(e)||-1===(Array.isArray(n)?n:Object.keys(n||e)).findIndex((function(n){var r=e[n];return r&&"object"==typeof r?!t.isEmpty(r,null,o):o&&!0===o.blankStringLikeEmpty&&"string"==typeof r?Ne(r):De(r)}))},t}();function dn(t){return!!t&&"focus"in t}function pn(t){if(t.defaultPrevented)return!1;var e=t.target;if(!e)return!0;if(Pe(e.value))return!1;if("function"==typeof e.selectRange)try{return e.selectRange(e.value.length,0),!0}catch(t){return console.error("Could not select input content, using selectRange()",t),!1}if(e&&"function"==typeof e.select)try{return e.select(),!0}catch(t){return console.error("Could not select input content, using select()",t),!1}return!0}function hn(t,e,n){if(t&&"function"==typeof t.setSelectionRange){if(Pe(t.value))return!1;try{t.setSelectionRange(e,De(n)?n:e)}catch(t){return console.error("Could not select input range",t),!1}}return!0}function mn(t){return t&&t.selectionStart?t.selectionDirection?"backward"===t.selectionDirection?t.selectionStart:t.selectionEnd:t.selectionStart:-1}function fn(t,e,n){if(t.defaultPrevented||!e)return!1;var o=t.target;if(!o)return!0;var r=mn(o);if(-1===r)return!0;var i=o.value;if(Pe(i))return!1;try{if(i&&r<=i.length){var a=(n=!1!==n)?i.indexOf(e,r):i.lastIndexOf(e,r);-1!==a&&(n&&a+1<i.length||!n&&a>0)&&o.setSelectionRange&&hn(o,a+(n?1:-1))&&(t.preventDefault(),t.stopPropagation())}}catch(t){return console.error("Could not move caret to next separator",t),!1}return!0}function gn(t,e,n){t.which>=48&&t.which<=57||t.which>=37&&t.which<=40||e&&(!n&&("."===t.key||","===t.key)||n&&t.key===n)||t.keyCode>=37&&t.keyCode<=40||46==t.keyCode||8==t.which||9==t.keyCode||45==t.keyCode||t.preventDefault()}function bn(t){var e=Cn(t);e?e.focus():console.warn("Trying to focus on this element:",t)}function yn(t,e){vn(t)?t.tabindex=e:t&&vn(t.nativeElement)?t.nativeElement.tabIndex=e:console.warn("Trying to change tabindex on this element:",t)}function vn(t){return dn(t)&&("value"in t||"tabindex"in t||"tabIndex"in t)}function Cn(t){if(t){if(vn(t))return t;if(t.nativeElement&&vn(t.nativeElement))return t.nativeElement}}function wn(t,e){var n=t.tabindex||t.tabIndex,o=e.tabindex||e.tabIndex;return n===o?0:n>o?1:-1}function En(t,e){return!!t&&(!Ve(t.disabled,!1)&&!Ve(t.hidden,!1)&&(Re(e.minTabindex)||Ue(t.tabIndex,t.tabindex)>e.minTabindex)&&(Re(e.maxTabindex)||Ue(t.tabIndex,t.tabindex)<e.maxTabindex)&&(!e.excludeEmptyInput||Pe(t.value)))}function In(t,e){e=Object.assign({sortByTabIndex:!1,excludeEmptyInput:!1},e);var n=t.map(Cn).filter((function(t){var n=En(t,e);return t&&e.debug&&console.debug("[inputs] Focusable input {canFocus: "+n+", tabIndex: "+(t.tabIndex||t.tabindex)+"}",t),n}));return e.sortByTabIndex?n.sort(wn):n}function xn(t){return t.pipe(N.first(De))}function On(t){return t.pipe(N.first((function(t){return!0===t}))).toPromise()}function _n(t){return t.pipe(N.first((function(t){return!1===t}))).toPromise()}function kn(t){return xn(t).toPromise()}function Sn(t){return(t||[]).reduce((function(t,e){return t?t.then((function(t){return e().then((function(e){return t.concat(e)}))})):e().then((function(t){return[t]}))}),null)}function Tn(t){return t.pipe(N.first((function(t){return!0===t})),N.map((function(t){})))}function An(t,e){return Oe(this,void 0,void 0,(function(){var n,o,r,i;return _e(this,(function(a){switch(a.label){case 0:return t()?[2,Promise.resolve()]:(n=e&&e.checkPeriod||300,o=e&&e.dueTime||n,r=D.timer(o,n).pipe(N.filter((function(e){return t()})),N.map((function(t){return!0}))),e&&e.timeout&&(i=D.timer(e.timeout),r=D.merge(r.pipe(N.takeUntil(i)),i.pipe(N.map((function(){throw new Error("Timeout waitIdle() - after "+e.timeout+"ms")}))))),[4,kn(r)]);case 1:return a.sent(),[2]}}))}))}function Rn(t,e){return Oe(this,void 0,void 0,(function(){var n,o;return _e(this,(function(r){return n=Tn(t),e&&e.timeout>0?(o=D.timer(e.timeout),[2,D.merge(D.timer(e.dueTime||0).pipe(N.switchMap((function(){return n})),N.takeUntil(o)),o.pipe(N.map((function(){throw new Error("Timeout ready() - after "+e.timeout+"ms")})))).toPromise()]):e&&e.dueTime>0?[2,D.timer(e.dueTime).pipe(N.switchMap((function(){return n}))).toPromise()]:[2,n.toPromise()]}))}))}function Pn(){return new e.EventEmitter(!0)}function Dn(t,e,n){var o=Object.assign(Object.assign({},n&&n.detail||{}),e);return new CustomEvent(t,{detail:o})}function Nn(t,e,n){return new Promise((function(o,r){var i=Dn(e,{success:o,error:r},n);t.emit(i)}))}function Mn(t,e){var n;if((e=e||"15%").endsWith("%")){var o=parseInt(e.slice(0,e.length-1))/100;n=function(){return 1-(t.scrollTop+t.offsetHeight)/t.scrollHeight<o}}else{if(!e.endsWith("px"))throw new Error("Invalid argument 'threshold'. Expected value unit: 'px' or '%' ");var r=parseInt(e.slice(0,e.length-2));n=function(){return t.scrollHeight-(t.scrollTop+t.offsetHeight)<r}}return D.fromEvent(t,"scroll").pipe(N.filter((function(){return n()})))}var Fn=M.trigger("fadeInAnimation",[M.transition(":enter",[M.style({opacity:0}),M.animate(".3s",M.style({opacity:1}))])]),Ln=M.trigger("fadeInOutAnimation",[M.transition(":enter",[M.style({opacity:0}),M.animate(".3s",M.style({opacity:1}))]),M.transition(":leave",[M.animate(".5s ease-in-out",M.style({opacity:0}))])]),jn=M.trigger("slideInOutAnimation",[M.state("*",M.style({position:"relative",top:0,left:0,right:0,bottom:0,opacity:1})),M.transition(":enter",[M.style({left:"400%",opacity:0}),M.animate(".3s ease-in-out",M.style({left:0,opacity:.8}))]),M.transition(":leave",[M.animate(".5s ease-in-out",M.style({left:"400%",opacity:0}))])]),Bn=M.trigger("slideUpDownAnimation",[M.state("*",M.style({transform:"translateY(0)",opacity:1})),M.transition(":enter",[M.style({transform:"translateY(-400%)",opacity:0}),M.animate(".3s ease-in-out",M.style({transform:"translateY(0)",opacity:1}))]),M.transition(":leave",[M.animate(".5s ease-in-out",M.style({transform:"translateY(-100%)",opacity:0}))])]),Vn=function(t,e){return t.matchMedia(e).matches},Un=function(t,e){var n=t.navigator.userAgent||t.navigator.vendor||window.opera;return e.test(n)},qn=function(t){return Un(t,/windows/i)},$n=function(t){return Vn(t,"(any-pointer:coarse)")},Hn=function(t){return Qn(window)||Kn(t)||Wn(window)||$n(t)&&!qn(t)},Gn=function(t){return!!Un(t,/iPad/i)||!(!Un(t,/Macintosh/i)||!Hn(t))},zn=Gn,Wn=function(t){return Un(t,/iPhone|iPod/i)||Gn(t)},Kn=function(t){return Un(t,/android|sink/i)},Qn=function(t){return!!(t.cordova||t.phonegap||t.PhoneGap)},Yn=function(){function t(t){this.options=t,this.fields={},this.getUserAttributes=(null==t?void 0:t.getUserAttributes)||function(t,e){return e||["label","name"]}}return t.prototype.add=function(t,e){if(!t)throw new Error("Unable to add config, with name: "+(t||"undefined"));var n=(e=e||{}).suggestFn||e.service&&function(t,n){return e.service.suggest(t,n)}||void 0,o=this.getUserAttributes(t,e.attributes)||["label","name"],r=o.map((function(t,n){return"function"==typeof t&&e.attributes[n]||t})),i=Object.assign({searchAttribute:1===o.length?o[0]:void 0,searchAttributes:o.length>1?o:void 0},e.filter),a=e.displayWith||Jn.createDisplayFn(o,e.multiple),s=e.equals||Jn.defaultEquals,l=Object.assign(Object.assign({},e),{attributes:r,suggestFn:n,filter:i,displayWith:a,equals:s});return this.fields[t]=l,l},t.prototype.get=function(t){if(!t)throw new Error("Unable to add config, with name: "+(t||"undefined"));return this.fields[t]||this.add(t)},t}(),Jn=function(){function t(){}return t.createDisplayFn=function(t,e){return e?function(e){return Array.isArray(e)?(e||[]).map((function(e){return e&&Qe(e,t)})).join(", "):e&&Qe(e,t)}:function(e){return e&&Qe(e,t)}},t.defaultEquals=function(t,e){return De(null==t?void 0:t.id)&&t.id===(null==e?void 0:e.id)},t}(),Xn=function(t){},Zn=function(){function t(t,n){this.cd=t,this.formGroupDir=n,this._onChangeCallback=Xn,this._onTouchedCallback=Xn,this.logPrefix="[mat-autocomplete] ",this.formControlName=null,this.required=!1,this.clearable=!1,this.debounceTime=null,this.i18nPrefix="REFERENTIAL.",this.noResultMessage="COMMON.NO_RESULT",this.itemSize="48px",this.fetchMoreThreshold="15%",this.suggestLengthThreshold=null,this.showLoadingSpinner=!0,this.debug=!1,this.showSearchBar=!0,this.stickySearchBar=!1,this.clicked=new e.EventEmitter,this.blurred=new e.EventEmitter,this.focused=new e.EventEmitter,this.dropButtonClick=new e.EventEmitter(!0),this.keydownEscape=new e.EventEmitter,this.keyupEnter=new e.EventEmitter,this._readonly=!1,this.$inputItems=new D.BehaviorSubject(void 0),this.$filteredItems=new D.BehaviorSubject(void 0),this.displayValue="",this._fetchMore$=new e.EventEmitter,this._subscription=new D.Subscription,this._$filter=new D.BehaviorSubject(void 0),this._reload$=new D.Subject}return Object.defineProperty(t.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canFetchMore",{get:function(){return this._onFetchMoreCallback&&this._moreItemsCount>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"filter",{get:function(){return this._$filter.value},set:function(t){t!==this._$filter.value&&this._$filter.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readonly",{get:function(){return this._readonly},set:function(t){this._readonly=t,this.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabindex",{get:function(){return this._tabindex},set:function(t){this._tabindex=t,this.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.$inputItems},set:function(t){var e=this;this._itemsSubscription&&(console.warn(this.logPrefix+" Items received twice !"),this._subscription.remove(this._itemsSubscription),this._itemsSubscription.unsubscribe()),D.isObservable(t)?this._itemsSubscription=this._subscription.add(t.subscribe((function(t){e.$inputItems.next(t)}))):t!==this.$inputItems.value&&this.$inputItems.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.formControl.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._readonly||this.formControl.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return!this._readonly&&this.formControl.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loading",{get:function(){return Re(this.$filteredItems.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"desktop",{get:function(){return!this.mobile},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t,e,n=this;if(this.formControl=this.formControl||this.formControlName&&this.formGroupDir&&this.formGroupDir.form.get(this.formControlName),!this.formControl)throw new Error("Missing mandatory attribute 'formControl' or 'formControlName' in <mat-autocomplete-field>.");this.config&&(this.suggestFn=this.suggestFn||this.config.suggestFn,!this.suggestFn&&this.config.items&&(this.items=this.config.items),this.filter=this.filter||this.config.filter,this.displayAttributes=this.displayAttributes||this.config.attributes,this.displayColumnSizes=this.displayColumnSizes||this.config.columnSizes,this.displayColumnNames=this.displayColumnNames||this.config.columnNames,this.displayWith=this.displayWith||this.config.displayWith,this.equals=this.equals||this.config.equals,this.multiple=Ve(this.multiple,this.config.multiple),this.mobile=Ve(this.mobile,this.config.mobile),this.suggestLengthThreshold=Ue(this.suggestLengthThreshold,this.config.suggestLengthThreshold||0),this.showAllOnFocus=Ve(this.showAllOnFocus,Ve(this.config.showAllOnFocus,this.suggestLengthThreshold<=0)),this.showPanelOnFocus=Ve(this.showPanelOnFocus,Ve(this.config.showPanelOnFocus,!0)),this.classList=this.classList||this.config.class,this.debounceTime=Ue(this.debounceTime,this.config.debounceTime),this.highlightAccent=Ve(this.highlightAccent,Ve(this.config.highlightAccent))),this.multiple=Ve(this.multiple,!1),this.mobile=Ve(this.mobile,this.multiple||Hn(window)),this.displayAttributes=this.displayAttributes||(null===(t=this.filter)||void 0===t?void 0:t.attributes)||["label","name"],this.displayWith=this.displayWith||Jn.createDisplayFn(this.displayAttributes,this.multiple),this.equals=this.equals||Jn.defaultEquals,this.displayColumnSizes=this.displayColumnSizes||1===this.displayAttributes.length&&[void 0]||this.displayAttributes.map((function(t){return t&&(t.endsWith("label")?3:t.endsWith("rankOrder")?2:void 0)})),this.displayColumnNames=this.displayAttributes.map((function(t,e){return n.displayColumnNames&&n.displayColumnNames[e]||n.i18nPrefix+ze(t).toUpperCase()}));var o=null===(e=this.classList)||void 0===e?void 0:e.split(" ");if(this.panelWidth=this.panelWidth||o&&((o.includes("min-width-medium")?"300px":o.includes("min-width-large")&&"400px")||o.includes("min-width-xlarge")&&"450px"||o.includes("mat-autocomplete-panel-full-size")&&"100vw"),this.showPanelOnFocus=Ve(this.showPanelOnFocus,!0),this.debounceTime=Ue(this.debounceTime,this.mobile?650:250),this.highlightAccent=Ve(this.highlightAccent,!1),this.suggestLengthThreshold=this.suggestLengthThreshold||0,this.matAutocompletePosition=this.matAutocompletePosition||"auto",this.suggestFn)this.mobile&&this._subscription.add(this._$filter.pipe(N.startWith(this.filter),N.debounceTime(250),N.takeWhile((function(t){return n.mobile})),N.filter((function(t){return n.suggestLengthThreshold<=0})),N.switchMap((function(t){return n.suggest("*",t)}))).subscribe((function(t){return n.$inputItems.next(t)})));else{var r=function(t,e){return Oe(n,void 0,void 0,(function(){return _e(this,(function(n){return[2,Ke(this.$inputItems.value,t,Object.assign({searchAttributes:this.displayAttributes},e))]}))}))};this.suggestFn=function(t,e){return Oe(n,void 0,void 0,(function(){return _e(this,(function(n){switch(n.label){case 0:return Re(this.$inputItems.value)?[4,kn(this.$inputItems)]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.suggestFn=r,[2,this.suggestFn(t,e)]}}))}))}}var i=function(t){return Pe(t)||"*"===t?n.suggestLengthThreshold<=0:!("string"==typeof t)||t.length>=n.suggestLengthThreshold},a=D.merge(this._reload$,this.formControl.valueChanges.pipe(N.filter((function(t){return n.enabled&&je(t)})),N.tap((function(t){return n.showLoadingSpinner&&n.markAsLoading()})),N.filter((function(t){return t.length>=n.suggestLengthThreshold||(n.displayValue=t,!1)})),N.debounceTime(this.debounceTime)),this.formControl.valueChanges.pipe(N.startWith(this.formControl.value),N.filter((function(t){return!n.mobile&&De(t)&&"object"==typeof t})),N.tap((function(t){var e,o=n.displayWith(t)||"";n.displayValue!==o&&(n.displayValue=o,(null===(e=n.matInputText)||void 0===e?void 0:e.nativeElement)&&(n.matInputText.nativeElement.value=n.displayValue))}))),this.dropButtonClick.pipe(N.filter((function(t){return!n.mobile&&n.enabled&&(!t||!t.defaultPrevented)})),N.map((function(t){return n.showAllOnFocus?"*":n.formControl.value})),N.filter(i)),D.merge(D.merge(this.focused,this.clicked).pipe(N.filter((function(t){return n.enabled&&!n.mobile})),N.map((function(t){return n.showAllOnFocus?"*":n.formControl.value}))),D.merge(this.$inputItems,this._$filter).pipe(N.filter((function(t){return n.enabled})),N.map((function(t){return n.formControl.value})))).pipe(N.filter(i),N.distinctUntilChanged((function(t,e){return!n.loading&&(t===e||n.equals(t,e))})))).pipe(N.mergeMap((function(t){return n.suggest(t,n.filter)})),N.tap((function(t){return n.updateImplicitValue(t)}))),s=this._fetchMore$.pipe(N.tap((function(t){return null==t?void 0:t.preventDefault()})),N.filter((function(){return n.canFetchMore})),N.mergeMap((function(){return n.fetchMore()})),N.map((function(t){return(n.$filteredItems.value||[]).concat(t)})));this._subscription.add(D.merge(this.$inputItems,a,s).subscribe((function(t){if(t&&n.mobile){var e=n.formControl.value;De(e)&&"object"==typeof e&&-1===t.findIndex((function(t){return n.equals(t,e)}))&&(t=t.concat(e))}n.$filteredItems.next(t)}))),this._subscription.add(this.blurred.pipe(N.filter((function(t){return!n.mobile})),N.map((function(t){return n.formControl.value}))).subscribe((function(t){n._implicitValue&&(n.required&&Pe(t)||Ne(t)&&"object"!=typeof t)?(n.writeValue(n._implicitValue),n.formControl.markAsPending({emitEvent:!1,onlySelf:!0}),n.formControl.updateValueAndValidity({emitEvent:!1,onlySelf:!0}),n.checkIfTouched(),n.$filteredItems.next([n._implicitValue])):Pe(t)&&(n.writeValue(null),n.formControl.markAsPending({emitEvent:!1,onlySelf:!0}),n.formControl.updateValueAndValidity({emitEvent:!1,onlySelf:!0}),n.checkIfTouched(),n.$filteredItems.next(void 0)),n._implicitValue=null,n.closePanel()}))),this._subscription.add(this.formControl.statusChanges.pipe(N.distinctUntilChanged()).subscribe((function(){return n.checkIfTouched()}))),this._subscription.add(this.keydownEscape.subscribe((function(t){n.isOpen&&(null==t||t.stopPropagation(),null==t||t.preventDefault(),n.closePanel())})))},t.prototype.ngOnDestroy=function(){this._subscription.unsubscribe(),this._itemsSubscription&&this._itemsSubscription.unsubscribe(),this._openedSubscription&&this._openedSubscription.unsubscribe(),this.$inputItems.complete(),this.$inputItems.unsubscribe(),this.$filteredItems.complete(),this.$filteredItems.unsubscribe(),this._reload$.complete(),this._$filter.complete(),this.dropButtonClick.complete(),this.clicked.complete(),this.blurred.complete(),this.focused.complete(),this.keydownEscape.complete(),this.keyupEnter.complete(),this._fetchMore$.complete(),this._implicitValue=void 0,this.formControl=null,this.displayWith=null,this.equals=null,this.suggestFn=null,this.$filteredItems=null,this.config=null,this.classList=null,this._onChangeCallback=null,this._onTouchedCallback=null,this._onFetchMoreCallback=null,this.autocomplete&&this.autocomplete.ngOnDestroy()},t.prototype.reloadItems=function(t){var e;this._reload$.next(t||"*"),!this.isOpen&&Ne(null===(e=this.ionSearchbar)||void 0===e?void 0:e.value)&&(this.ionSearchbar.value=null)},t.prototype.writeValue=function(t){t!==this.formControl.value&&(this.formControl.patchValue(t,{emitEvent:!1}),this._onChangeCallback(t))},t.prototype.registerOnChange=function(t){this._onChangeCallback=t},t.prototype.registerOnTouched=function(t){this._onTouchedCallback=t},t.prototype.setDisabledState=function(t){var e;t&&(null===(e=this.autocomplete)||void 0===e?void 0:e.isOpen)&&this.closePanel(),this.cd.markForCheck()},t.prototype.focus=function(){this.mobile?this.matSelect.focus():bn(this.matInputText)},t.prototype.filterInputTextFocusEvent=function(t){var e;if(t&&!t.defaultPrevented)return t.relatedTarget instanceof HTMLElement&&"MAT-OPTION"===t.relatedTarget.tagName?(t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.returnValue=!1,!1):!(Ne(null===(e=t.target)||void 0===e?void 0:e.value)&&!this.showPanelOnFocus&&!this.showAllOnFocus)&&(this.focused.emit(),!0)},t.prototype.filterInputTextBlurEvent=function(t){if(t&&!t.defaultPrevented)return t.relatedTarget instanceof HTMLElement&&"MAT-OPTION"===t.relatedTarget.tagName?(t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.returnValue=!1,!1):(hn(t.target,0,0),this.blurred.emit(t),!0)},t.prototype.ionSearchBarChanged=function(t){t&&!t.defaultPrevented&&this.matSelect.panelOpen&&(t.preventDefault(),t.detail.preventDefault(),t.stopPropagation(),t.detail.stopPropagation(),this.markAsLoading(),this.reloadItems(t.detail.data))},t.prototype.ionSearchBarClear=function(t){t&&!t.defaultPrevented&&this.matSelect.panelOpen&&(this.markAsLoading(),this.reloadItems())},t.prototype.filterMatSelectFocusEvent=function(t){t&&!t.defaultPrevented&&this.focused.emit(t)},t.prototype.filterMatSelectBlurEvent=function(t){if(t&&!t.defaultPrevented)return t.relatedTarget instanceof HTMLElement&&"MAT-OPTION"===t.relatedTarget.tagName?(t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.returnValue=!1,!1):(this.blurred.emit(t),!0)},t.prototype.clearValue=function(t){this.writeValue(null),t.stopPropagation()},t.prototype._initAutocompleteInfiniteScroll=function(t){var e=this;if(this.autocomplete){this._openedSubscription&&(this._openedSubscription.unsubscribe(),this._subscription.remove(this._openedSubscription));var n=(this.autocomplete._isOpen?D.timer(0):this.autocomplete.opened.pipe(N.debounceTime(200))).pipe(N.map((function(t){return e.getAutocompletePanel()})),N.filter(De),N.switchMap((function(n){return Mn(n,t).pipe(N.takeUntil(e.autocomplete.closed))})));this._openedSubscription=n.subscribe((function(){return e._fetchMore$.emit()})),this._subscription.add(this._openedSubscription)}},t.prototype._initMatSelectInfiniteScroll=function(t){var e=this;if(this.matSelect){this._openedSubscription&&(this._openedSubscription.unsubscribe(),this._subscription.remove(this._openedSubscription));var n=(this.matSelect.panelOpen?D.timer(0):this.matSelect._openedStream.pipe(N.debounceTime(200))).pipe(N.map((function(t){return e.getMatSelectPanel()})),N.filter(De),N.switchMap((function(n){return Mn(n,t).pipe(N.takeUntil(e.matSelect._closedStream))})));this._openedSubscription=n.pipe(N.filter((function(t){return e._moreItemsCount>0}))).subscribe((function(){return e._fetchMore$.emit()})),this._subscription.add(this._openedSubscription)}},Object.defineProperty(t.prototype,"isOpen",{get:function(){var t,e;return!this.mobile&&(null===(t=this.autocomplete)||void 0===t?void 0:t.isOpen)||(null===(e=this.matSelect)||void 0===e?void 0:e.panelOpen)||!1},enumerable:!1,configurable:!0}),t.prototype.closePanel=function(){var t,e,n,o;(null===(t=this.autocomplete)||void 0===t?void 0:t.isOpen)?null===(e=this.autocompleteTrigger)||void 0===e||e.closePanel():(null===(n=this.matSelect)||void 0===n?void 0:n.panelOpen)&&(null===(o=this.matSelect)||void 0===o||o.close())},t.prototype.suggest=function(t,e){return Oe(this,void 0,void 0,(function(){var n,o,r,i;return _e(this,(function(a){switch(a.label){case 0:return[4,this.suggestFn(t,e)];case 1:return(n=a.sent())?Array.isArray(n)?(this._itemCount=n.length||0,this._onFetchMoreCallback=void 0,this._moreItemsCount=0):(o=n.data,r=n.total,i=n.fetchMore,this._itemCount=Ue(r,o&&o.length||0),this._onFetchMoreCallback=i,this._moreItemsCount=i&&this._itemCount-o.length||0,n=o):(this._itemCount=0,this._onFetchMoreCallback=void 0,this._moreItemsCount=0),[2,n]}}))}))},t.prototype.fetchMore=function(){return Oe(this,void 0,void 0,(function(){var t,e,n,o,r;return _e(this,(function(i){switch(i.label){case 0:return this._onFetchMoreCallback?(t=this._onFetchMoreCallback,this._onFetchMoreCallback=void 0,[4,t()]):[2,[]];case 1:return e=i.sent(),n=e.data,o=e.total,r=e.fetchMore,this._itemCount=o||this._itemCount,this._onFetchMoreCallback=r,this._moreItemsCount=Math.max(0,this._moreItemsCount-n.length),[2,n]}}))}))},t.prototype.updateImplicitValue=function(t){this.mobile||(t&&1===t.length?this._implicitValue=t[0]:this._implicitValue=void 0)},t.prototype.checkIfTouched=function(){this.formControl.touched&&(this.cd.markForCheck(),this._onTouchedCallback())},t.prototype.getAutocompletePanel=function(){var t,e,n=null===(e=null===(t=this.autocomplete)||void 0===t?void 0:t.options.last)||void 0===e?void 0:e._getHostElement().parentElement;return n||console.warn(this.logPrefix+" Unable to find the autocomplete div..."),n},t.prototype.getMatSelectPanel=function(){var t,e=null===(t=this.matSelect.options.last)||void 0===t?void 0:t._getHostElement().parentElement;return e||console.warn(this.logPrefix+" Unable to find the mat-select container..."),e},t.prototype.markForCheck=function(){this.cd.markForCheck()},t.prototype.markAsLoading=function(){this.$filteredItems.value&&(this.$filteredItems.next(void 0),this._itemCount=void 0,this._implicitValue=void 0,this._onFetchMoreCallback=void 0,this._moreItemsCount=0,this.markForCheck())},t}();Zn.decorators=[{type:e.Component,args:[{selector:"mat-autocomplete-field",template:'<ion-grid class="ion-no-padding">\n <ion-row>\n <ion-col class="ion-no-padding">\n \x3c!-- readonly --\x3e\n <mat-form-field *ngIf="_readonly; else writable"\n [floatLabel]="floatLabel"\n [title]="displayValue"\n class="mat-form-field-disabled">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet="matPrefixTemplate"></ng-container>\n </div>\n\n <input matInput hidden type="text"\n [placeholder]="placeholder"\n [formControl]="formControl" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet="matSuffixTemplate"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]="floatLabel"\n [class.mat-form-field-disabled]="disabled"\n [title]="displayValue">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet="matPrefixTemplate"></ng-container>\n </div>\n\n \x3c!-- Mobile or Mutliple (use <mat-select>) --\x3e\n <mat-select #matSelect\n *ngIf="mobile || multiple; else desktopTemplate"\n [disableRipple]="true"\n [placeholder]="placeholder"\n [formControl]="formControl"\n [tabindex]="_tabindex"\n [panelClass]="classList"\n [style.width]="panelWidth"\n (focus)="filterMatSelectFocusEvent($event)"\n (blur)="filterMatSelectBlurEvent($event)"\n (keydown.escape)="keydownEscape.emit($event)"\n (keyup.enter)="keyupEnter.emit($event)"\n [compareWith]="equals"\n [multiple]="multiple"\n [typeaheadDebounceInterval]="debounceTime * 10"\n [required]="required">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n \x3c!-- Search bar --\x3e\n <ion-searchbar *ngIf="showSearchBar" #ionSearchbar\n class="mat-select-header"\n [class.ion-searchbar-sticky]="stickySearchBar"\n inputmode="search"\n autocomplete="off"\n animated="true"\n showClearButton\n [debounce]="debounceTime"\n (ionClear)="ionSearchBarClear($event)"\n (ionInput)="ionSearchBarChanged($event)"\n [placeholder]="\'COMMON.BTN_SEARCH\'|translate"\n ></ion-searchbar>\n\n \x3c!-- Headers --\x3e\n <ion-row class="mat-select-header column ion-no-padding"\n [class.multiple]="multiple"\n [class.ion-searchbar-sticky]="showSearchBar && stickySearchBar">\n <ion-col *ngFor="let attr of displayAttributes; index as i" [size]="displayColumnSizes[i]">\n <ion-label [innerHTML]="displayColumnNames[i] | translate"></ion-label>\n </ion-col>\n </ion-row>\n\n \x3c!-- None option --\x3e\n <mat-option *ngIf="!required && !multiple && !clearable" class="ion-no-padding">\n <ion-row class="ion-no-padding">\n <ion-col class="ion-no-padding">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf="$filteredItems | async as items; else loadingTemplate">\n \x3c!-- No item option --\x3e\n <mat-option *ngIf="items | isEmptyArray" class="ion-padding text-italic" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n \x3c!-- Options --\x3e\n <mat-option *ngFor="let item of items" [value]="item" class="ion-no-padding">\n <ion-row [classList]="item.classList">\n <ion-col *ngFor="let path of displayAttributes; index as i;"\n [size]="displayColumnSizes[i]">\n <ion-text [innerHTML]="item | propertyGet: path | highlight: { search: ionSearchbar.value, withAccent: highlightAccent }"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n \x3c!-- More item --\x3e\n <mat-option *ngIf="_moreItemsCount" (ngInit)="_initMatSelectInfiniteScroll()"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n \x3c!-- footer --\x3e\n <ion-row *ngIf="itemCount as count"\n class="mat-autocomplete-footer ion-no-padding">\n <ion-col>\n <ion-text class="ion-float-end ion-padding-end"><i>{{\'COMMON.RESULT_COUNT\'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n \x3c!-- Loading spinner --\x3e\n <ng-template #loadingTemplate>\n <mat-option *ngIf="(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n \x3c!-- Need more characters --\x3e\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class="ion-padding text-italic" disabled>\n <ion-label>\n {{\'INFO.PLEASE_TYPE_MORE_CHARACTERS\'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-select>\n\n\n \x3c!--\n NOTE :\n - "selectInputContent($event) || onFocus.emit($event)" : call onFocus only when to the input is empty (nothing to select)\n --\x3e\n <ng-template #desktopTemplate>\n <input matInput #matInputText type="text"\n [matAutocomplete]="autocomplete"\n [matAutocompletePosition]="matAutocompletePosition"\n [formControl]="formControl"\n [placeholder]="placeholder"\n [appAutofocus]="autofocus"\n [tabindex]="_tabindex"\n [required]="required"\n (click)="clicked.emit($event)"\n (focus)="filterInputTextFocusEvent($event)"\n (blur)="filterInputTextBlurEvent($event)"\n (keydown.escape)="keydownEscape.emit($event)"\n (keyup.enter)="keyupEnter.emit($event)"\n (keyup.arrowdown)="!autocomplete.showPanel && dropButtonClick.emit($event)">\n\n \x3c!-- autocomplete --\x3e\n <mat-autocomplete #autocomplete="matAutocomplete"\n autoActiveFirstOption\n [displayWith]="displayWith"\n [class]="classList"\n [panelWidth]="panelWidth">\n \x3c!-- Headers --\x3e\n <ion-row class="mat-autocomplete-header column ion-no-padding">\n <ion-col *ngFor="let attr of displayAttributes; index as i" [size]="displayColumnSizes[i]">\n <ion-label [innerHTML]="displayColumnNames[i] | translate"></ion-label>\n </ion-col>\n </ion-row>\n\n \x3c!-- Options --\x3e\n <ng-container *ngIf="$filteredItems | async as items; else loadingTemplate">\n \x3c!-- No item option --\x3e\n <mat-option *ngIf="items | isEmptyArray" class="ion-padding text-italic" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor="let item of items" [value]="item" class="ion-no-padding">\n <ion-row [classList]="item.classList">\n <ion-col *ngFor="let path of displayAttributes; index as i;"\n [size]="displayColumnSizes[i]">\n <ion-text [innerHTML]="item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n \x3c!-- More item --\x3e\n <mat-option *ngIf="_moreItemsCount" (ngInit)="_initAutocompleteInfiniteScroll()"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n \x3c!-- Loading spinner --\x3e\n <ng-template #loadingTemplate>\n <mat-option *ngIf="(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n \x3c!-- Need more characters --\x3e\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class="ion-padding text-italic" disabled>\n <ion-label>\n {{\'INFO.PLEASE_TYPE_MORE_CHARACTERS\'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n\n \x3c!-- footer --\x3e\n <ion-row *ngIf="itemCount; let count" class="mat-autocomplete-footer ion-no-padding">\n <ion-col>\n <ion-text class="ion-float-end ion-padding-end"><i>{{\'COMMON.RESULT_COUNT\'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet="matSuffixTemplate"></ng-container>\n </div>\n\n <mat-error *ngIf="formControl.hasError(\'required\')" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf="formControl.hasError(\'entity\')" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select="[matError]"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size="auto" class="ion-align-self-center">\n <ng-content select="[matAfter]"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select="[matPrefix]"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex="-1"\n type="button"\n *ngIf="desktop"\n (click)="dropButtonClick.emit($event)"\n [hidden]="disabled">\n <mat-icon class="large select-arrow">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex="-1"\n type="button"\n *ngIf="clearable"\n (click)="clearValue($event)"\n [hidden]="disabled || !formControl.value">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select="[matSuffix]"></ng-content>\n</ng-template>\n\n<ng-template #headers>\n <ion-row class="mat-autocomplete-header ion-no-padding">\n <ion-col *ngFor="let attr of displayAttributes; index as i" [size]="displayColumnSizes[i]">\n <ion-label [innerHTML]="displayColumnNames[i] | translate"></ion-label>\n </ion-col>\n </ion-row>\n</ng-template>\n\n<ng-template #options>\n\n\n</ng-template>\n\n',providers:[{provide:P.NG_VALUE_ACCESSOR,multi:!0,useExisting:e.forwardRef((function(){return Zn}))}],animations:[jn],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button[hidden]{display:none}mat-icon.select-arrow{color:rgba(0,0,0,.47);font-size:150%}"]}]}],Zn.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:P.FormGroupDirective,decorators:[{type:e.Optional}]}]},Zn.propDecorators={equals:[{type:e.Input}],logPrefix:[{type:e.Input}],formControl:[{type:e.Input}],formControlName:[{type:e.Input}],floatLabel:[{type:e.Input}],placeholder:[{type:e.Input}],suggestFn:[{type:e.Input}],required:[{type:e.Input}],mobile:[{type:e.Input}],clearable:[{type:e.Input}],debounceTime:[{type:e.Input}],displayWith:[{type:e.Input}],displayAttributes:[{type:e.Input}],displayColumnSizes:[{type:e.Input}],displayColumnNames:[{type:e.Input}],highlightAccent:[{type:e.Input}],showAllOnFocus:[{type:e.Input}],showPanelOnFocus:[{type:e.Input}],autofocus:[{type:e.Input}],config:[{type:e.Input}],i18nPrefix:[{type:e.Input}],noResultMessage:[{type:e.Input}],classList:[{type:e.Input,args:["class"]}],panelWidth:[{type:e.Input}],matAutocompletePosition:[{type:e.Input}],multiple:[{type:e.Input}],itemSize:[{type:e.Input}],fetchMoreThreshold:[{type:e.Input}],suggestLengthThreshold:[{type:e.Input}],showLoadingSpinner:[{type:e.Input}],debug:[{type:e.Input}],showSearchBar:[{type:e.Input}],stickySearchBar:[{type:e.Input}],clicked:[{type:e.Output,args:["click"]}],blurred:[{type:e.Output,args:["blur"]}],focused:[{type:e.Output,args:["focus"]}],dropButtonClick:[{type:e.Output}],keydownEscape:[{type:e.Output,args:["keydown.escape"]}],keyupEnter:[{type:e.Output,args:["keyup.enter"]}],matSelect:[{type:e.ViewChild,args:["matSelect"]}],ionSearchbar:[{type:e.ViewChild,args:["ionSearchbar"]}],matInputText:[{type:e.ViewChild,args:["matInputText"]}],autocomplete:[{type:e.ViewChild,args:[R.MatAutocomplete]}],autocompleteTrigger:[{type:e.ViewChild,args:[R.MatAutocompleteTrigger]}],filter:[{type:e.Input}],readonly:[{type:e.Input}],tabindex:[{type:e.Input}],items:[{type:e.Input}]};var to=function(){function t(t,e){this.dateAdapter=t,this.translate=e;var n=e.instant(["COMMON.DATE_PATTERN","COMMON.DATE_TIME_PATTERN","COMMON.DATE_TIME_SECONDS_PATTERN"]);this.datePattern=n["COMMON.DATE_PATTERN"],this.dateTimePattern=n["COMMON.DATE_TIME_PATTERN"],this.dateTimeSecondsPattern=n["COMMON.DATE_TIME_SECONDS_PATTERN"]}return t.prototype.transform=function(t,e){var n=e&&e.pattern||(e&&e.time?e.seconds?this.dateTimeSecondsPattern:this.dateTimePattern:this.datePattern),o=j.isMoment(t)?t:this.dateAdapter.parse(t,ye);return o&&this.dateAdapter.format(o,n)||""},t.prototype.format=function(t,e){return this.dateAdapter.format(t,e)},t}();to.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new to(Vt.ɵɵinject(Kt.MomentDateAdapter),Vt.ɵɵinject(Gt.TranslateService))},token:to,providedIn:"root"}),to.decorators=[{type:e.Pipe,args:[{name:"dateFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}],to.ctorParameters=function(){return[{type:B.MomentDateAdapter},{type:F.TranslateService}]};var eo=Wt,no=function(){function t(t,e){var n=this;this.dateAdapter=t,this.translate=e,this.dayUnit=e.instant("COMMON.DAY_UNIT"),e.get("COMMON.DAY_UNIT").subscribe((function(t){return n.dayUnit=t}))}return t.prototype.transform=function(t,e){if(!t.startValue||!t.endValue)return"";var n=this.dateAdapter.parse(t.startValue,ye),o=this.dateAdapter.parse(t.endValue,ye);return this.format(n,o)},t.prototype.format=function(t,e){var n=eo.duration(e.diff(t));if(n.asMinutes()<0)return"";var o=eo(0).hour(n.hours()).minute(n.minutes()),r=Math.floor(n.asDays());return(r>0?r.toString()+(this.dayUnit+" "):"")+o.format("HH:mm")},t}();no.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new no(Vt.ɵɵinject(qt.DateAdapter),Vt.ɵɵinject(Gt.TranslateService))},token:no,providedIn:"root"}),no.decorators=[{type:e.Pipe,args:[{name:"dateDiffDuration"}]},{type:e.Injectable,args:[{providedIn:"root"}]}],no.ctorParameters=function(){return[{type:s.DateAdapter},{type:F.TranslateService}]};var oo=function(){function t(t){this.dateAdapter=t}return t.prototype.transform=function(t,e){var n=j.isMoment(t)?t:this.dateAdapter.parse(t,ye);return n?n.fromNow(e&&e.withoutSuffix):""},t}();oo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new oo(Vt.ɵɵinject(Kt.MomentDateAdapter))},token:oo,providedIn:"root"}),oo.decorators=[{type:e.Pipe,args:[{name:"dateFromNow"}]},{type:e.Injectable,args:[{providedIn:"root"}]}],oo.ctorParameters=function(){return[{type:B.MomentDateAdapter}]};var ro=["DDMMSS","DDMM","DD"],io={pattern:"DDMM",maxDecimals:3,placeholderChar:ve},ao=Object.assign(Object.assign({},io),{longitude:!1}),so=Object.assign(Object.assign({},io),{longitude:!0});function lo(t,e){if(null==t)return null;switch(e.pattern){case"DDMMSS":return po(t,Object.assign(Object.assign({},ao),e));case"DDMM":return ho(t,Object.assign(Object.assign({},ao),e));default:return uo(t,Object.assign(Object.assign({},ao),e))}}function co(t,e){if(null==t)return null;switch(e.pattern){case"DDMMSS":return po(t,Object.assign(Object.assign({},so),e));case"DDMM":return ho(t,Object.assign(Object.assign({},so),e));default:return uo(t,Object.assign(Object.assign({},so),e))}}function uo(t,e){var n=t<0;if(n&&(t*=-1),e.longitude)for(;t>180;)(n=(t-=180)<0)&&(t*=-1);else for(;t>90;)(n=(t-=90)<0)&&(t*=-1);var o=fo(t,e.maxDecimals).toString(),r=n?"-":"+";if(e.placeholderChar){e.longitude?t<100&&(o=e.placeholderChar+o):r+=" ",t<10&&(o=e.placeholderChar+o);var i=e.longitude?3:2;for(o.length===i&&(o+=".");o.length<e.maxDecimals+i;)o+=e.placeholderChar}return(e.hideSign?"":r)+o+"°"}function po(t,e){var n=t<0;if(n&&(t*=-1),e.longitude)for(;t>180;)(n=(t-=180)<0)&&(t*=-1);else for(;t>90;)(n=(t-=90)<0)&&(t*=-1);for(var o=Math.trunc(t),r=Math.trunc(60*(t-o)),i=fo(60*(60*(t-o)-r),e.maxDecimals);i>=60;)i-=60,r+=1;for(;r>=60;)r-=60,o+=1;var a=e.longitude?n?"W":"E":n?"S":"N",s="";if(e.placeholderChar&&(e.longitude&&o<100&&(s+=e.placeholderChar),o<10&&(s+=e.placeholderChar),r<10&&(r=e.placeholderChar+r),i=i<10?e.placeholderChar+i:i.toString(),e.maxDecimals>0))for(2===i.length&&(i+=".");i.length<e.maxDecimals+3;)i+=e.placeholderChar;return s+o+"° "+r+"' "+i+'"'+(e.hideSign?"":" "+a)}function ho(t,e){var n=t<0;if(n&&(t*=-1),e.longitude)for(;t>180;)(n=(t-=180)<0)&&(t*=-1);else for(;t>90;)(n=(t-=90)<0)&&(t*=-1);for(var o=Math.trunc(t),r=fo(60*(t-o),e.maxDecimals);r>=60;)r-=60,o+=1;var i=e.longitude?n?"W":"E":n?"S":"N",a="";if(e.placeholderChar&&(e.longitude&&o<100&&(a+=e.placeholderChar),o<10&&(a+=e.placeholderChar),r=r<10?e.placeholderChar+r:r.toString(),e.maxDecimals>0))for(2===r.length&&(r+=".");r.length<e.maxDecimals+3;)r+=e.placeholderChar;return a+o+"° "+r+"'"+(e.hideSign?"":" "+i)}function mo(t,e,n,o){var r=t.trim().replace(new RegExp("[ +"+(o||ve)+"]+","g"),"").split(/[^-\d\w.,]+/),i=parseFloat(r[0].replace(/,/g,"."));if(isNaN(i))return console.debug("parseLatitudeOrLongitude "+t+" -> Invalid degrees (NaN). Parts found:",r),NaN;if("DD"===e)return fo(i,n);var a=("DDMMSS"===e||"DDMM"===e)&&r[1]&&parseFloat(r[1].replace(/,/g,"."))||0,s="DDMMSS"===e&&r[2]&&parseFloat(r[2].replace(/,/g,"."))||0,l="DDMMSS"===e&&r[3]||"DDMM"===e&&r[2]||void 0;return fo(i=(!l||"s"!==l&&"S"!==l&&"w"!==l&&"W"!==l?1:-1)*(i+a/60+s/3600),n)}function fo(t,e){if(e>0){var n=Math.pow(10,e);return Math.trunc(t*n+.5)/n}return 0===e?Math.trunc(t+.5):t}var go=function(){function t(){}return t.prototype.transform=function(t,e){return(e.type&&"latitude"===e.type?lo:co)(t,e)},t}();go.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new go},token:go,providedIn:"root"}),go.decorators=[{type:e.Pipe,args:[{name:"latLongFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var bo=function(){this.transform=lo};bo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new bo},token:bo,providedIn:"root"}),bo.decorators=[{type:e.Pipe,args:[{name:"latitudeFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var yo=function(){this.transform=co};yo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new yo},token:yo,providedIn:"root"}),yo.decorators=[{type:e.Pipe,args:[{name:"longitudeFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var vo=function(){function t(){}return t.prototype.transform=function(t,e){return null!=t?t.toLocaleString(void 0,e):""},t}();vo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new vo},token:vo,providedIn:"root"}),vo.decorators=[{type:e.Pipe,args:[{name:"numberFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var Co=function(){function t(){}return t.prototype.transform=function(t,e){if("string"!=typeof t||!e)return t;var n="string"==typeof e?e:e.search,o="string"!=typeof e&&Ve(null==e?void 0:e.withAccent,!1);if("string"!=typeof n)return t;var r=n.replace(/[.]/g,"[.]").replace(/[*]+/g,".*");if(".*"===r)return t;if(o){var i=We(r).toUpperCase(),a=We(t.toUpperCase()).indexOf(i);return-1!==a?t.substr(0,a-1)+"<b>"+t.substr(a,i.length)+"</b>"+t.substr(a+i.length):t}var s=new RegExp("[ ]?"+r,"gi");return(""+t).replace(s,"<b>$&</b>")},t}();Co.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new Co},token:Co,providedIn:"root"}),Co.decorators=[{type:e.Pipe,args:[{name:"highlight"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/table"),require("@angular/cdk/a11y"),require("@angular/cdk/overlay"),require("@angular/cdk/scrolling"),require("@angular/material/core"),require("@angular/material/table"),require("@angular/material/sort"),require("@angular/material/paginator"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/material/checkbox"),require("@angular/material/expansion"),require("@angular/material/toolbar"),require("@angular/material/icon"),require("@angular/material/button"),require("@angular/material/menu"),require("@angular/material/select"),require("@angular/material/card"),require("@angular/material/tabs"),require("@angular/material/stepper"),require("@angular/material/list"),require("@angular/material/button-toggle"),require("@angular/material/progress-spinner"),require("@angular/material/progress-bar"),require("@angular/material/radio"),require("@angular/material/badge"),require("@angular/material/slide-toggle"),require("@angular/material/dialog"),require("@angular/material/autocomplete"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/animations"),require("@ngx-translate/core"),require("@ionic/angular"),require("moment"),require("@angular/material-moment-adapter"),require("moment-timezone"),require("@ionic-native/keyboard/ngx"),require("angular2-text-mask"),require("ngx-material-timepicker"),require("@angular/material/datepicker"),require("@angular/material/divider"),require("@angular/material/tooltip"),require("@angular/material/chips"),require("@angular/router"),require("@angular/platform-browser"),require("@angular/common/http"),require("ngx-color-picker"),require("@ionic-native/native-audio/ngx"),require("@ionic-native/vibration/ngx"),require("@ionic-native/audio-management/ngx"),require("@ionic-native/native-audio/ngx/index"),require("@ionic-native/vibration/ngx/index"),require("@ionic-native/audio-management/ngx/index"),require("uuid/v4"),require("@angular/cdk/drag-drop"),require("ngx-markdown"),require("tweetnacl"),require("@ionic/storage"),require("zone.js/dist/zone-error"),require("@ionic-native/splash-screen/ngx"),require("@ionic-native/network/ngx"),require("ionic-cache"),require("ionic-cache/dist/cache.service"),require("@ionic-native/network/ngx/index"),require("@ionic-native/splash-screen/ngx/index"),require("@ionic-native/status-bar/ngx"),require("@angular/cdk/platform"),require("@ionic-native/in-app-browser/ngx"),require("@apollo/client/core"),require("apollo-angular"),require("@apollo/client/link/ws"),require("@apollo/client/utilities"),require("@apollo/client/link/retry"),require("apollo-link-queue"),require("apollo-link-serialize"),require("apollo-link-logger"),require("apollo-angular/http"),require("apollo3-cache-persist"),require("@ionic-native/downloader/ngx"),require("@ionic-native/status-bar/ngx/index"),require("@ionic-native/keyboard/ngx/index"),require("@ionic-native/in-app-browser/ngx/index"),require("@ionic-native/downloader/ngx/index"),require("@angular/cdk/text-field"),require("@e-is/ngx-material-table"),require("@angular/cdk/collections"),require("ngx-jdenticon"),require("tweetnacl-util"),require("scrypt-async"),require("hammerjs")):"function"==typeof define&&define.amd?define("@sumaris-net/ngx-components",["exports","@angular/core","@angular/common","@angular/cdk/table","@angular/cdk/a11y","@angular/cdk/overlay","@angular/cdk/scrolling","@angular/material/core","@angular/material/table","@angular/material/sort","@angular/material/paginator","@angular/material/form-field","@angular/material/input","@angular/material/checkbox","@angular/material/expansion","@angular/material/toolbar","@angular/material/icon","@angular/material/button","@angular/material/menu","@angular/material/select","@angular/material/card","@angular/material/tabs","@angular/material/stepper","@angular/material/list","@angular/material/button-toggle","@angular/material/progress-spinner","@angular/material/progress-bar","@angular/material/radio","@angular/material/badge","@angular/material/slide-toggle","@angular/material/dialog","@angular/material/autocomplete","@angular/forms","rxjs","rxjs/operators","@angular/animations","@ngx-translate/core","@ionic/angular","moment","@angular/material-moment-adapter","moment-timezone","@ionic-native/keyboard/ngx","angular2-text-mask","ngx-material-timepicker","@angular/material/datepicker","@angular/material/divider","@angular/material/tooltip","@angular/material/chips","@angular/router","@angular/platform-browser","@angular/common/http","ngx-color-picker","@ionic-native/native-audio/ngx","@ionic-native/vibration/ngx","@ionic-native/audio-management/ngx","@ionic-native/native-audio/ngx/index","@ionic-native/vibration/ngx/index","@ionic-native/audio-management/ngx/index","uuid/v4","@angular/cdk/drag-drop","ngx-markdown","tweetnacl","@ionic/storage","zone.js/dist/zone-error","@ionic-native/splash-screen/ngx","@ionic-native/network/ngx","ionic-cache","ionic-cache/dist/cache.service","@ionic-native/network/ngx/index","@ionic-native/splash-screen/ngx/index","@ionic-native/status-bar/ngx","@angular/cdk/platform","@ionic-native/in-app-browser/ngx","@apollo/client/core","apollo-angular","@apollo/client/link/ws","@apollo/client/utilities","@apollo/client/link/retry","apollo-link-queue","apollo-link-serialize","apollo-link-logger","apollo-angular/http","apollo3-cache-persist","@ionic-native/downloader/ngx","@ionic-native/status-bar/ngx/index","@ionic-native/keyboard/ngx/index","@ionic-native/in-app-browser/ngx/index","@ionic-native/downloader/ngx/index","@angular/cdk/text-field","@e-is/ngx-material-table","@angular/cdk/collections","ngx-jdenticon","tweetnacl-util","scrypt-async","hammerjs"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["sumaris-net"]=t["sumaris-net"]||{},t["sumaris-net"]["ngx-components"]={}),t.ng.core,t.ng.common,t.ng.cdk.table,t.ng.cdk.a11y,t.ng.cdk.overlay,t.ng.cdk.scrolling,t.ng.material.core,t.ng.material.table,t.ng.material.sort,t.ng.material.paginator,t.ng.material.formField,t.ng.material.input,t.ng.material.checkbox,t.ng.material.expansion,t.ng.material.toolbar,t.ng.material.icon,t.ng.material.button,t.ng.material.menu,t.ng.material.select,t.ng.material.card,t.ng.material.tabs,t.ng.material.stepper,t.ng.material.list,t.ng.material.buttonToggle,t.ng.material.progressSpinner,t.ng.material.progressBar,t.ng.material.radio,t.ng.material.badge,t.ng.material.slideToggle,t.ng.material.dialog,t.ng.material.autocomplete,t.ng.forms,t.rxjs,t.rxjs.operators,t.ng.animations,t["ngx-translate"].core,t.ionic.angular,t.moment,t.ng.materialMomentAdapter,t["moment-timezone"],t["ionic-native"].keyboard.ngx,t["angular2-text-mask"],t["ngx-material-timepicker"],t.ng.material.datepicker,t.ng.material.divider,t.ng.material.tooltip,t.ng.material.chips,t.ng.router,t.ng.platformBrowser,t.ng.common.http,t["ngx-color-picker"],t["ionic-native"]["native-audio"].ngx,t["ionic-native"].vibration.ngx,t["ionic-native"]["audio-management"].ngx,t["ionic-native"]["native-audio"].ngx.index,t["ionic-native"].vibration.ngx.index,t["ionic-native"]["audio-management"].ngx.index,t.uuid.v4,t.ng.cdk.dragDrop,t["ngx-markdown"],t.tweetnacl,t.ionic.storage,null,t["ionic-native"]["splash-screen"].ngx,t["ionic-native"].network.ngx,t["ionic-cache"],t["ionic-cache/dist/cache"].service,t["ionic-native"].network.ngx.index,t["ionic-native"]["splash-screen"].ngx.index,t["ionic-native"]["status-bar"].ngx,t.ng.cdk.platform,t["ionic-native"]["in-app-browser"].ngx,t.apollo.client.core,t["apollo-angular"],t.apollo.client.link.ws,t.apollo.client.utilities,t.apollo.client.link.retry,t["apollo-link-queue"],t["apollo-link-serialize"],t["apollo-link-logger"],t["apollo-angular"].http,t["apollo3-cache-persist"],t["ionic-native"].downloader.ngx,t["ionic-native"]["status-bar"].ngx.index,t["ionic-native"].keyboard.ngx.index,t["ionic-native"]["in-app-browser"].ngx.index,t["ionic-native"].downloader.ngx.index,t.ng.cdk.textField,t["e-is"]["ngx-material-table"],t.ng.cdk.collections,t["ngx-jdenticon"])}(this,(function(t,e,n,o,r,i,a,s,l,c,u,d,p,h,m,f,g,b,y,v,C,w,E,I,x,O,_,k,S,T,A,R,P,D,N,M,F,L,j,B,V,U,q,$,H,G,z,W,K,Q,Y,J,X,Z,tt,et,nt,ot,rt,it,at,st,lt,ct,ut,dt,pt,ht,mt,ft,gt,bt,yt,vt,Ct,wt,Et,It,xt,Ot,_t,kt,St,Tt,At,Rt,Pt,Dt,Nt,Mt,Ft,Lt){"use strict";function jt(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function Bt(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var Vt=Bt(e),Ut=Bt(n),qt=Bt(s),$t=Bt(A),Ht=Bt(P),Gt=Bt(F),zt=Bt(L),Wt=Bt(j),Kt=Bt(B),Qt=Bt(K),Yt=Bt(Q),Jt=Bt(Y),Xt=Bt(et),Zt=Bt(nt),te=Bt(ot),ee=Bt(rt),ne=Bt(lt),oe=Bt(ht),re=Bt(mt),ie=Bt(ft),ae=Bt(bt),se=Bt(Ct),le=jt(xt),ce=jt(Ot),ue=jt(_t),de=Bt(kt),pe=Bt(At),he=Bt(Rt),me=Bt(Pt),fe=Bt(Dt),ge=new e.InjectionToken("ENV"),be=function(){},ye="YYYY-MM-DDTHH:mm:ss.SSSZ",ve="_",Ce=/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$/,we=250,Ee=function(t,e){return Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ee(t,e)};function Ie(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function xe(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function Oe(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))}function _e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function ke(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Se(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function Te(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Se(arguments[e]));return t}function Ae(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}Object.create;function Re(t){return null==t}function Pe(t){return null==t||"string"==typeof t&&""===t.trim()}function De(t){return null!=t}function Ne(t){return null!=t&&("string"!=typeof t||""!==t.trim())}function Me(t){return null!=t&&("number"!=typeof t||!isNaN(t))}function Fe(t){return null!=t&&t.length>0}function Le(t){return null==t||!t.length}function je(t){return null!=t&&"string"==typeof t||!1}function Be(t){return void 0===t?null:t}function Ve(t,e){return null!=t?"false"!==t&&!!t:e}function Ue(t,e){return null!=t?+t:e}function qe(t,e){return t&&t.toUpperCase().startsWith(e)}function $e(t,e){return t&&!!t.toUpperCase().match(e)}function He(t){if(t&&"/"!==t.trim())return t.trim().lastIndexOf("/")===t.length-1?t.substring(0,t.length-1):t}function Ge(t,e){return(null==t?void 0:t.endsWith(e||""))?t.substr(0,t.length-e.length):t}function ze(t){return Pe(t)?t:t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function We(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Ke(t,e,n){var o=this;if(De(e)&&"object"==typeof e)return{data:[e]};e="string"==typeof e&&"*"!==e&&e.toUpperCase()||void 0;var r=n&&(n.searchAttribute&&[n.searchAttribute]||n.searchAttributes)||["label"];if(!t)return{data:[],total:0};var i=t;Ne(e)&&(-1!==e.indexOf("*")?(e=e.replace("*",".*"),i=i.filter((function(t){return-1!==r.findIndex((function(n){return $e(on(t,n),e)}))}))):i=i.filter((function(t){return-1!==r.findIndex((function(n){return qe(on(t,n),e)}))}))),Fe(null==n?void 0:n.excludedIds)&&(i=i.filter((function(t){return!n.excludedIds.includes(+t.id)}))),n&&!0===n.skipSort||(i===t&&(i=i.slice()),i.sort(Ye(r)));var a=i.length||0,s=i;n&&((n.offset||0)>0&&(s=s.slice(n.offset)),De(n.size)&&s.length>n.size&&(s=s.slice(0,n.size)));var l={data:s,total:a},c=(n&&n.offset||0)+s.length;return c<a&&(l.fetchMore=function(t){return Oe(o,void 0,void 0,(function(){return _e(this,(function(t){return[2,Ke(i,void 0,Object.assign(Object.assign({},n),{offset:c,skipSort:!0,excludedIds:void 0}))]}))}))}),l}function Qe(t,e,n){if(!t)throw new Error("Could not display an undefined entity.");return e.map((function(e){return en(t,e)})).filter(Ne).join(n||" - ")}function Ye(t,e){if(!t||!t.length||e&&t.length>e.length)throw new Error("Invalid arguments: missing 'keys' or array 'defaultValues' has a bad length");return function(n,o){return t.map((function(t,r){var i=en(n,t,e&&e[r]),a=en(o,t,e&&e[r]);return i===a?0:i>a?1:-1})).find((function(t){return 0!==t}))||0}}var Je=/^[-]?\d+$/;function Xe(t){return De(t)&&Je.test(t)}var Ze=/^[-]?\d+(\.\d+)?$/;var tn=/^(\d+-\d+)|([><=]*\d+)$/;function en(t,e,n){if(Re(t))return n;if(Pe(e))return t;var o=e.indexOf(".");if(-1===o){var r=t[e];return De(r)||Re(n)?r:n}var i=e.substring(0,o);if(Re(t[i]))return n;if(t[i]&&"object"==typeof t[i])return en(t[i],e.substring(o+1));throw new Error("Invalid property path: '"+i+"' is not an valid object.")}function nn(t,e){if(!Re(t))return t[e]}function on(t,e){var n=en(t,e);return n&&("string"==typeof n?n:""+n)}function rn(t){if(!(t<=0))return new Promise((function(e){return setTimeout(e,t)}))}function an(t){return Me(t)?Math.round(100*(t+Number.EPSILON))/100:t}function sn(t){return t&&0!==t.length?t.substr(0,1).toUpperCase()+t.substr(1):t}function ln(t){return(t||[]).reduce((function(t,e){var n=null==e?void 0:e.id;return De(n)&&(t[n]=e),t}),{})}function cn(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;var n,o,r,i=typeof t;if(i==typeof e&&"object"==i){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(o in r=Object.create(null),t){if(!cn(t[o],e[o]))return!1;r[o]=!0}for(o in e)if(!(o in r)&&void 0!==e[o])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(o=0;o<n;o++)if(!cn(t[o],e[o]))return!1;return!0}}return!1}var un=function(){function t(){}return t.copy=function(t,e,n){if(Re(t))return t;var o=new e;return Object.keys(n||o).forEach((function(e){o[e]=t[e]})),o},t.isEmpty=function(e,n,o){return Re(e)||-1===(Array.isArray(n)?n:Object.keys(n||e)).findIndex((function(n){var r=e[n];return r&&"object"==typeof r?!t.isEmpty(r,null,o):o&&!0===o.blankStringLikeEmpty&&"string"==typeof r?Ne(r):De(r)}))},t}();function dn(t){return!!t&&"focus"in t}function pn(t){if(t.defaultPrevented)return!1;var e=t.target;if(!e)return!0;if(Pe(e.value))return!1;if("function"==typeof e.selectRange)try{return e.selectRange(e.value.length,0),!0}catch(t){return console.error("Could not select input content, using selectRange()",t),!1}if(e&&"function"==typeof e.select)try{return e.select(),!0}catch(t){return console.error("Could not select input content, using select()",t),!1}return!0}function hn(t,e,n){if(t&&"function"==typeof t.setSelectionRange){if(Pe(t.value))return!1;try{t.setSelectionRange(e,De(n)?n:e)}catch(t){return console.error("Could not select input range",t),!1}}return!0}function mn(t){return t&&t.selectionStart?t.selectionDirection?"backward"===t.selectionDirection?t.selectionStart:t.selectionEnd:t.selectionStart:-1}function fn(t,e,n){if(t.defaultPrevented||!e)return!1;var o=t.target;if(!o)return!0;var r=mn(o);if(-1===r)return!0;var i=o.value;if(Pe(i))return!1;try{if(i&&r<=i.length){var a=(n=!1!==n)?i.indexOf(e,r):i.lastIndexOf(e,r);-1!==a&&(n&&a+1<i.length||!n&&a>0)&&o.setSelectionRange&&hn(o,a+(n?1:-1))&&(t.preventDefault(),t.stopPropagation())}}catch(t){return console.error("Could not move caret to next separator",t),!1}return!0}function gn(t,e,n){t.which>=48&&t.which<=57||t.which>=37&&t.which<=40||e&&(!n&&("."===t.key||","===t.key)||n&&t.key===n)||t.keyCode>=37&&t.keyCode<=40||46==t.keyCode||8==t.which||9==t.keyCode||45==t.keyCode||t.preventDefault()}function bn(t){var e=Cn(t);e?e.focus():console.warn("Trying to focus on this element:",t)}function yn(t,e){vn(t)?t.tabindex=e:t&&vn(t.nativeElement)?t.nativeElement.tabIndex=e:console.warn("Trying to change tabindex on this element:",t)}function vn(t){return dn(t)&&("value"in t||"tabindex"in t||"tabIndex"in t)}function Cn(t){if(t){if(vn(t))return t;if(t.nativeElement&&vn(t.nativeElement))return t.nativeElement}}function wn(t,e){var n=t.tabindex||t.tabIndex,o=e.tabindex||e.tabIndex;return n===o?0:n>o?1:-1}function En(t,e){return!!t&&(!Ve(t.disabled,!1)&&!Ve(t.hidden,!1)&&(Re(e.minTabindex)||Ue(t.tabIndex,t.tabindex)>e.minTabindex)&&(Re(e.maxTabindex)||Ue(t.tabIndex,t.tabindex)<e.maxTabindex)&&(!e.excludeEmptyInput||Pe(t.value)))}function In(t,e){e=Object.assign({sortByTabIndex:!1,excludeEmptyInput:!1},e);var n=t.map(Cn).filter((function(t){var n=En(t,e);return t&&e.debug&&console.debug("[inputs] Focusable input {canFocus: "+n+", tabIndex: "+(t.tabIndex||t.tabindex)+"}",t),n}));return e.sortByTabIndex?n.sort(wn):n}function xn(t){return t.pipe(N.first(De))}function On(t){return t.pipe(N.first((function(t){return!0===t}))).toPromise()}function _n(t){return t.pipe(N.first((function(t){return!1===t}))).toPromise()}function kn(t){return xn(t).toPromise()}function Sn(t){return(t||[]).reduce((function(t,e){return t?t.then((function(t){return e().then((function(e){return t.concat(e)}))})):e().then((function(t){return[t]}))}),null)}function Tn(t){return t.pipe(N.first((function(t){return!0===t})),N.map((function(t){})))}function An(t,e){return Oe(this,void 0,void 0,(function(){var n,o,r,i;return _e(this,(function(a){switch(a.label){case 0:return t()?[2,Promise.resolve()]:(n=e&&e.checkPeriod||300,o=e&&e.dueTime||n,r=D.timer(o,n).pipe(N.filter((function(e){return t()})),N.map((function(t){return!0}))),e&&e.timeout&&(i=D.timer(e.timeout),r=D.merge(r.pipe(N.takeUntil(i)),i.pipe(N.map((function(){throw new Error("Timeout waitIdle() - after "+e.timeout+"ms")}))))),[4,kn(r)]);case 1:return a.sent(),[2]}}))}))}function Rn(t,e){return Oe(this,void 0,void 0,(function(){var n,o;return _e(this,(function(r){return n=Tn(t),e&&e.timeout>0?(o=D.timer(e.timeout),[2,D.merge(D.timer(e.dueTime||0).pipe(N.switchMap((function(){return n})),N.takeUntil(o)),o.pipe(N.map((function(){throw new Error("Timeout ready() - after "+e.timeout+"ms")})))).toPromise()]):e&&e.dueTime>0?[2,D.timer(e.dueTime).pipe(N.switchMap((function(){return n}))).toPromise()]:[2,n.toPromise()]}))}))}function Pn(){return new e.EventEmitter(!0)}function Dn(t,e,n){var o=Object.assign(Object.assign({},n&&n.detail||{}),e);return new CustomEvent(t,{detail:o})}function Nn(t,e,n){return new Promise((function(o,r){var i=Dn(e,{success:o,error:r},n);t.emit(i)}))}function Mn(t,e){var n;if((e=e||"15%").endsWith("%")){var o=parseInt(e.slice(0,e.length-1))/100;n=function(){return 1-(t.scrollTop+t.offsetHeight)/t.scrollHeight<o}}else{if(!e.endsWith("px"))throw new Error("Invalid argument 'threshold'. Expected value unit: 'px' or '%' ");var r=parseInt(e.slice(0,e.length-2));n=function(){return t.scrollHeight-(t.scrollTop+t.offsetHeight)<r}}return D.fromEvent(t,"scroll").pipe(N.filter((function(){return n()})))}var Fn=M.trigger("fadeInAnimation",[M.transition(":enter",[M.style({opacity:0}),M.animate(".3s",M.style({opacity:1}))])]),Ln=M.trigger("fadeInOutAnimation",[M.transition(":enter",[M.style({opacity:0}),M.animate(".3s",M.style({opacity:1}))]),M.transition(":leave",[M.animate(".5s ease-in-out",M.style({opacity:0}))])]),jn=M.trigger("slideInOutAnimation",[M.state("*",M.style({position:"relative",top:0,left:0,right:0,bottom:0,opacity:1})),M.transition(":enter",[M.style({left:"400%",opacity:0}),M.animate(".3s ease-in-out",M.style({left:0,opacity:.8}))]),M.transition(":leave",[M.animate(".5s ease-in-out",M.style({left:"400%",opacity:0}))])]),Bn=M.trigger("slideUpDownAnimation",[M.state("*",M.style({transform:"translateY(0)",opacity:1})),M.transition(":enter",[M.style({transform:"translateY(-400%)",opacity:0}),M.animate(".3s ease-in-out",M.style({transform:"translateY(0)",opacity:1}))]),M.transition(":leave",[M.animate(".5s ease-in-out",M.style({transform:"translateY(-100%)",opacity:0}))])]),Vn=function(t,e){return t.matchMedia(e).matches},Un=function(t,e){var n=t.navigator.userAgent||t.navigator.vendor||window.opera;return e.test(n)},qn=function(t){return Un(t,/windows/i)},$n=function(t){return Vn(t,"(any-pointer:coarse)")},Hn=function(t){return Qn(window)||Kn(t)||Wn(window)||$n(t)&&!qn(t)},Gn=function(t){return!!Un(t,/iPad/i)||!(!Un(t,/Macintosh/i)||!Hn(t))},zn=Gn,Wn=function(t){return Un(t,/iPhone|iPod/i)||Gn(t)},Kn=function(t){return Un(t,/android|sink/i)},Qn=function(t){return!!(t.cordova||t.phonegap||t.PhoneGap)},Yn=function(){function t(t){this.options=t,this.fields={},this.getUserAttributes=(null==t?void 0:t.getUserAttributes)||function(t,e){return e||["label","name"]}}return t.prototype.add=function(t,e){if(!t)throw new Error("Unable to add config, with name: "+(t||"undefined"));var n=(e=e||{}).suggestFn||e.service&&function(t,n){return e.service.suggest(t,n)}||void 0,o=this.getUserAttributes(t,e.attributes)||["label","name"],r=o.map((function(t,n){return"function"==typeof t&&e.attributes[n]||t})),i=Object.assign({searchAttribute:1===o.length?o[0]:void 0,searchAttributes:o.length>1?o:void 0},e.filter),a=e.displayWith||Jn.createDisplayFn(o,e.multiple),s=e.equals||Jn.defaultEquals,l=Object.assign(Object.assign({},e),{attributes:r,suggestFn:n,filter:i,displayWith:a,equals:s});return this.fields[t]=l,l},t.prototype.get=function(t){if(!t)throw new Error("Unable to add config, with name: "+(t||"undefined"));return this.fields[t]||this.add(t)},t}(),Jn=function(){function t(){}return t.createDisplayFn=function(t,e){return e?function(e){return Array.isArray(e)?(e||[]).map((function(e){return e&&Qe(e,t)})).join(", "):e&&Qe(e,t)}:function(e){return e&&Qe(e,t)}},t.defaultEquals=function(t,e){return De(null==t?void 0:t.id)&&t.id===(null==e?void 0:e.id)},t}(),Xn=function(t){},Zn=function(){function t(t,n){this.cd=t,this.formGroupDir=n,this._onChangeCallback=Xn,this._onTouchedCallback=Xn,this.logPrefix="[mat-autocomplete] ",this.formControlName=null,this.required=!1,this.clearable=!1,this.debounceTime=null,this.i18nPrefix="REFERENTIAL.",this.noResultMessage="COMMON.NO_RESULT",this.itemSize="48px",this.fetchMoreThreshold="15%",this.suggestLengthThreshold=null,this.showLoadingSpinner=!0,this.debug=!1,this.showSearchBar=!0,this.stickySearchBar=!1,this.clicked=new e.EventEmitter,this.blurred=new e.EventEmitter,this.focused=new e.EventEmitter,this.dropButtonClick=new e.EventEmitter(!0),this.keydownEscape=new e.EventEmitter,this.keyupEnter=new e.EventEmitter,this._readonly=!1,this.$inputItems=new D.BehaviorSubject(void 0),this.$filteredItems=new D.BehaviorSubject(void 0),this.displayValue="",this._fetchMore$=new e.EventEmitter,this._subscription=new D.Subscription,this._$filter=new D.BehaviorSubject(void 0),this._reload$=new D.Subject}return Object.defineProperty(t.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canFetchMore",{get:function(){return this._onFetchMoreCallback&&this._moreItemsCount>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"filter",{get:function(){return this._$filter.value},set:function(t){t!==this._$filter.value&&this._$filter.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readonly",{get:function(){return this._readonly},set:function(t){this._readonly=t,this.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabindex",{get:function(){return this._tabindex},set:function(t){this._tabindex=t,this.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.$inputItems},set:function(t){var e=this;this._itemsSubscription&&(console.warn(this.logPrefix+" Items received twice !"),this._subscription.remove(this._itemsSubscription),this._itemsSubscription.unsubscribe()),D.isObservable(t)?this._itemsSubscription=this._subscription.add(t.subscribe((function(t){e.$inputItems.next(t)}))):t!==this.$inputItems.value&&this.$inputItems.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.formControl.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._readonly||this.formControl.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return!this._readonly&&this.formControl.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loading",{get:function(){return Re(this.$filteredItems.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"desktop",{get:function(){return!this.mobile},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t,e,n=this;if(this.formControl=this.formControl||this.formControlName&&this.formGroupDir&&this.formGroupDir.form.get(this.formControlName),!this.formControl)throw new Error("Missing mandatory attribute 'formControl' or 'formControlName' in <mat-autocomplete-field>.");this.config&&(this.suggestFn=this.suggestFn||this.config.suggestFn,!this.suggestFn&&this.config.items&&(this.items=this.config.items),this.filter=this.filter||this.config.filter,this.displayAttributes=this.displayAttributes||this.config.attributes,this.displayColumnSizes=this.displayColumnSizes||this.config.columnSizes,this.displayColumnNames=this.displayColumnNames||this.config.columnNames,this.displayWith=this.displayWith||this.config.displayWith,this.equals=this.equals||this.config.equals,this.multiple=Ve(this.multiple,this.config.multiple),this.mobile=Ve(this.mobile,this.config.mobile),this.suggestLengthThreshold=Ue(this.suggestLengthThreshold,this.config.suggestLengthThreshold||0),this.showAllOnFocus=Ve(this.showAllOnFocus,Ve(this.config.showAllOnFocus,this.suggestLengthThreshold<=0)),this.showPanelOnFocus=Ve(this.showPanelOnFocus,Ve(this.config.showPanelOnFocus,!0)),this.classList=this.classList||this.config.class,this.debounceTime=Ue(this.debounceTime,this.config.debounceTime),this.highlightAccent=Ve(this.highlightAccent,Ve(this.config.highlightAccent))),this.multiple=Ve(this.multiple,!1),this.mobile=Ve(this.mobile,this.multiple||Hn(window)),this.displayAttributes=this.displayAttributes||(null===(t=this.filter)||void 0===t?void 0:t.attributes)||["label","name"],this.displayWith=this.displayWith||Jn.createDisplayFn(this.displayAttributes,this.multiple),this.equals=this.equals||Jn.defaultEquals,this.displayColumnSizes=this.displayColumnSizes||1===this.displayAttributes.length&&[void 0]||this.displayAttributes.map((function(t){return t&&(t.endsWith("label")?3:t.endsWith("rankOrder")?2:void 0)})),this.displayColumnNames=this.displayAttributes.map((function(t,e){return n.displayColumnNames&&n.displayColumnNames[e]||n.i18nPrefix+ze(t).toUpperCase()}));var o=null===(e=this.classList)||void 0===e?void 0:e.split(" ");if(this.panelWidth=this.panelWidth||o&&((o.includes("min-width-medium")?"300px":o.includes("min-width-large")&&"400px")||o.includes("min-width-xlarge")&&"450px"||o.includes("mat-autocomplete-panel-full-size")&&"100vw"),this.showPanelOnFocus=Ve(this.showPanelOnFocus,!0),this.debounceTime=Ue(this.debounceTime,this.mobile?650:250),this.highlightAccent=Ve(this.highlightAccent,!1),this.suggestLengthThreshold=this.suggestLengthThreshold||0,this.matAutocompletePosition=this.matAutocompletePosition||"auto",this.suggestFn)this.mobile&&this._subscription.add(this._$filter.pipe(N.startWith(this.filter),N.debounceTime(250),N.takeWhile((function(t){return n.mobile})),N.filter((function(t){return n.suggestLengthThreshold<=0})),N.switchMap((function(t){return n.suggest("*",t)}))).subscribe((function(t){return n.$inputItems.next(t)})));else{var r=function(t,e){return Oe(n,void 0,void 0,(function(){return _e(this,(function(n){return[2,Ke(this.$inputItems.value,t,Object.assign({searchAttributes:this.displayAttributes},e))]}))}))};this.suggestFn=function(t,e){return Oe(n,void 0,void 0,(function(){return _e(this,(function(n){switch(n.label){case 0:return Re(this.$inputItems.value)?[4,kn(this.$inputItems)]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.suggestFn=r,[2,this.suggestFn(t,e)]}}))}))}}var i=function(t){return Pe(t)||"*"===t?n.suggestLengthThreshold<=0:!("string"==typeof t)||t.length>=n.suggestLengthThreshold},a=D.merge(this._reload$,this.formControl.valueChanges.pipe(N.filter((function(t){return n.enabled&&je(t)})),N.tap((function(t){return n.showLoadingSpinner&&n.markAsLoading()})),N.filter((function(t){return t.length>=n.suggestLengthThreshold||(n.displayValue=t,!1)})),N.debounceTime(this.debounceTime)),this.formControl.valueChanges.pipe(N.startWith(this.formControl.value),N.filter((function(t){return!n.mobile&&De(t)&&"object"==typeof t})),N.tap((function(t){var e,o=n.displayWith(t)||"";n.displayValue!==o&&(n.displayValue=o,(null===(e=n.matInputText)||void 0===e?void 0:e.nativeElement)&&(n.matInputText.nativeElement.value=n.displayValue))}))),this.dropButtonClick.pipe(N.filter((function(t){return!n.mobile&&n.enabled&&(!t||!t.defaultPrevented)})),N.map((function(t){return n.showAllOnFocus?"*":n.formControl.value})),N.filter(i)),D.merge(D.merge(this.focused,this.clicked).pipe(N.filter((function(t){return n.enabled&&!n.mobile})),N.map((function(t){return n.showAllOnFocus?"*":n.formControl.value}))),D.merge(this.$inputItems,this._$filter).pipe(N.filter((function(t){return n.enabled})),N.map((function(t){return n.formControl.value})))).pipe(N.filter(i),N.distinctUntilChanged((function(t,e){return!n.loading&&(t===e||n.equals(t,e))})))).pipe(N.mergeMap((function(t){return n.suggest(t,n.filter)})),N.tap((function(t){return n.updateImplicitValue(t)}))),s=this._fetchMore$.pipe(N.tap((function(t){return null==t?void 0:t.preventDefault()})),N.filter((function(){return n.canFetchMore})),N.mergeMap((function(){return n.fetchMore()})),N.map((function(t){return(n.$filteredItems.value||[]).concat(t)})));this._subscription.add(D.merge(this.$inputItems,a,s).subscribe((function(t){if(t&&n.mobile){var e=n.formControl.value;De(e)&&"object"==typeof e&&-1===t.findIndex((function(t){return n.equals(t,e)}))&&(t=t.concat(e))}n.$filteredItems.next(t)}))),this._subscription.add(this.blurred.pipe(N.filter((function(t){return!n.mobile})),N.map((function(t){return n.formControl.value}))).subscribe((function(t){n._implicitValue&&(n.required&&Pe(t)||Ne(t)&&"object"!=typeof t)?(n.writeValue(n._implicitValue),n.formControl.markAsPending({emitEvent:!1,onlySelf:!0}),n.formControl.updateValueAndValidity({emitEvent:!1,onlySelf:!0}),n.checkIfTouched(),n.$filteredItems.next([n._implicitValue])):Pe(t)&&(n.writeValue(null),n.formControl.markAsPending({emitEvent:!1,onlySelf:!0}),n.formControl.updateValueAndValidity({emitEvent:!1,onlySelf:!0}),n.checkIfTouched(),n.$filteredItems.next(void 0)),n._implicitValue=null,n.closePanel()}))),this._subscription.add(this.formControl.statusChanges.pipe(N.distinctUntilChanged()).subscribe((function(){return n.checkIfTouched()}))),this._subscription.add(this.keydownEscape.subscribe((function(t){n.isOpen&&(null==t||t.stopPropagation(),null==t||t.preventDefault(),n.closePanel())})))},t.prototype.ngOnDestroy=function(){this._subscription.unsubscribe(),this._itemsSubscription&&this._itemsSubscription.unsubscribe(),this._openedSubscription&&this._openedSubscription.unsubscribe(),this.$inputItems.complete(),this.$inputItems.unsubscribe(),this.$filteredItems.complete(),this.$filteredItems.unsubscribe(),this._reload$.complete(),this._$filter.complete(),this.dropButtonClick.complete(),this.clicked.complete(),this.blurred.complete(),this.focused.complete(),this.keydownEscape.complete(),this.keyupEnter.complete(),this._fetchMore$.complete(),this._implicitValue=void 0,this.formControl=null,this.displayWith=null,this.equals=null,this.suggestFn=null,this.$filteredItems=null,this.config=null,this.classList=null,this._onChangeCallback=null,this._onTouchedCallback=null,this._onFetchMoreCallback=null,this.autocomplete&&this.autocomplete.ngOnDestroy()},t.prototype.reloadItems=function(t){var e;this._reload$.next(t||"*"),!this.isOpen&&Ne(null===(e=this.ionSearchbar)||void 0===e?void 0:e.value)&&(this.ionSearchbar.value=null)},t.prototype.writeValue=function(t){t!==this.formControl.value&&(this.formControl.patchValue(t,{emitEvent:!1}),this._onChangeCallback(t))},t.prototype.registerOnChange=function(t){this._onChangeCallback=t},t.prototype.registerOnTouched=function(t){this._onTouchedCallback=t},t.prototype.setDisabledState=function(t){var e;t&&(null===(e=this.autocomplete)||void 0===e?void 0:e.isOpen)&&this.closePanel(),this.cd.markForCheck()},t.prototype.focus=function(){this.mobile?this.matSelect.focus():bn(this.matInputText)},t.prototype.filterInputTextFocusEvent=function(t){var e;if(t&&!t.defaultPrevented)return t.relatedTarget instanceof HTMLElement&&"MAT-OPTION"===t.relatedTarget.tagName?(t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.returnValue=!1,!1):!(Ne(null===(e=t.target)||void 0===e?void 0:e.value)&&!this.showPanelOnFocus&&!this.showAllOnFocus)&&(this.focused.emit(),!0)},t.prototype.filterInputTextBlurEvent=function(t){if(t&&!t.defaultPrevented)return t.relatedTarget instanceof HTMLElement&&"MAT-OPTION"===t.relatedTarget.tagName?(t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.returnValue=!1,!1):(hn(t.target,0,0),this.blurred.emit(t),!0)},t.prototype.ionSearchBarChanged=function(t){t&&!t.defaultPrevented&&this.matSelect.panelOpen&&(t.preventDefault(),t.detail.preventDefault(),t.stopPropagation(),t.detail.stopPropagation(),this.markAsLoading(),this.reloadItems(t.detail.data))},t.prototype.ionSearchBarClear=function(t){t&&!t.defaultPrevented&&this.matSelect.panelOpen&&(this.markAsLoading(),this.reloadItems())},t.prototype.filterMatSelectFocusEvent=function(t){t&&!t.defaultPrevented&&this.focused.emit(t)},t.prototype.filterMatSelectBlurEvent=function(t){if(t&&!t.defaultPrevented)return t.relatedTarget instanceof HTMLElement&&"MAT-OPTION"===t.relatedTarget.tagName?(t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.returnValue=!1,!1):(this.blurred.emit(t),!0)},t.prototype.clearValue=function(t){this.writeValue(null),t.stopPropagation()},t.prototype._initAutocompleteInfiniteScroll=function(t){var e=this;if(this.autocomplete){this._openedSubscription&&(this._openedSubscription.unsubscribe(),this._subscription.remove(this._openedSubscription));var n=(this.autocomplete._isOpen?D.timer(0):this.autocomplete.opened.pipe(N.debounceTime(200))).pipe(N.map((function(t){return e.getAutocompletePanel()})),N.filter(De),N.switchMap((function(n){return Mn(n,t).pipe(N.takeUntil(e.autocomplete.closed))})));this._openedSubscription=n.subscribe((function(){return e._fetchMore$.emit()})),this._subscription.add(this._openedSubscription)}},t.prototype._initMatSelectInfiniteScroll=function(t){var e=this;if(this.matSelect){this._openedSubscription&&(this._openedSubscription.unsubscribe(),this._subscription.remove(this._openedSubscription));var n=(this.matSelect.panelOpen?D.timer(0):this.matSelect._openedStream.pipe(N.debounceTime(200))).pipe(N.map((function(t){return e.getMatSelectPanel()})),N.filter(De),N.switchMap((function(n){return Mn(n,t).pipe(N.takeUntil(e.matSelect._closedStream))})));this._openedSubscription=n.pipe(N.filter((function(t){return e._moreItemsCount>0}))).subscribe((function(){return e._fetchMore$.emit()})),this._subscription.add(this._openedSubscription)}},Object.defineProperty(t.prototype,"isOpen",{get:function(){var t,e;return!this.mobile&&(null===(t=this.autocomplete)||void 0===t?void 0:t.isOpen)||(null===(e=this.matSelect)||void 0===e?void 0:e.panelOpen)||!1},enumerable:!1,configurable:!0}),t.prototype.closePanel=function(){var t,e,n,o;(null===(t=this.autocomplete)||void 0===t?void 0:t.isOpen)?null===(e=this.autocompleteTrigger)||void 0===e||e.closePanel():(null===(n=this.matSelect)||void 0===n?void 0:n.panelOpen)&&(null===(o=this.matSelect)||void 0===o||o.close())},t.prototype.suggest=function(t,e){return Oe(this,void 0,void 0,(function(){var n,o,r,i;return _e(this,(function(a){switch(a.label){case 0:return[4,this.suggestFn(t,e)];case 1:return(n=a.sent())?Array.isArray(n)?(this._itemCount=n.length||0,this._onFetchMoreCallback=void 0,this._moreItemsCount=0):(o=n.data,r=n.total,i=n.fetchMore,this._itemCount=Ue(r,o&&o.length||0),this._onFetchMoreCallback=i,this._moreItemsCount=i&&this._itemCount-o.length||0,n=o):(this._itemCount=0,this._onFetchMoreCallback=void 0,this._moreItemsCount=0),[2,n]}}))}))},t.prototype.fetchMore=function(){return Oe(this,void 0,void 0,(function(){var t,e,n,o,r;return _e(this,(function(i){switch(i.label){case 0:return this._onFetchMoreCallback?(t=this._onFetchMoreCallback,this._onFetchMoreCallback=void 0,[4,t()]):[2,[]];case 1:return e=i.sent(),n=e.data,o=e.total,r=e.fetchMore,this._itemCount=o||this._itemCount,this._onFetchMoreCallback=r,this._moreItemsCount=Math.max(0,this._moreItemsCount-n.length),[2,n]}}))}))},t.prototype.updateImplicitValue=function(t){this.mobile||(t&&1===t.length?this._implicitValue=t[0]:this._implicitValue=void 0)},t.prototype.checkIfTouched=function(){this.formControl.touched&&(this.cd.markForCheck(),this._onTouchedCallback())},t.prototype.getAutocompletePanel=function(){var t,e,n=null===(e=null===(t=this.autocomplete)||void 0===t?void 0:t.options.last)||void 0===e?void 0:e._getHostElement().parentElement;return n||console.warn(this.logPrefix+" Unable to find the autocomplete div..."),n},t.prototype.getMatSelectPanel=function(){var t,e=null===(t=this.matSelect.options.last)||void 0===t?void 0:t._getHostElement().parentElement;return e||console.warn(this.logPrefix+" Unable to find the mat-select container..."),e},t.prototype.markForCheck=function(){this.cd.markForCheck()},t.prototype.markAsLoading=function(){this.$filteredItems.value&&(this.$filteredItems.next(void 0),this._itemCount=void 0,this._implicitValue=void 0,this._onFetchMoreCallback=void 0,this._moreItemsCount=0,this.markForCheck())},t}();Zn.decorators=[{type:e.Component,args:[{selector:"mat-autocomplete-field",template:'<ion-grid class="ion-no-padding">\n <ion-row>\n <ion-col class="ion-no-padding">\n \x3c!-- readonly --\x3e\n <mat-form-field *ngIf="_readonly; else writable"\n [floatLabel]="floatLabel"\n [title]="displayValue"\n class="mat-form-field-disabled">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet="matPrefixTemplate"></ng-container>\n </div>\n\n <input matInput hidden type="text"\n [placeholder]="placeholder"\n [formControl]="formControl" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet="matSuffixTemplate"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]="floatLabel"\n [class.mat-form-field-disabled]="disabled"\n [title]="displayValue">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet="matPrefixTemplate"></ng-container>\n </div>\n\n \x3c!-- Mobile or Mutliple (use <mat-select>) --\x3e\n <mat-select #matSelect\n *ngIf="mobile || multiple; else desktopTemplate"\n [disableRipple]="true"\n [placeholder]="placeholder"\n [formControl]="formControl"\n [tabindex]="_tabindex"\n [panelClass]="classList"\n [style.width]="panelWidth"\n (focus)="filterMatSelectFocusEvent($event)"\n (blur)="filterMatSelectBlurEvent($event)"\n (keydown.escape)="keydownEscape.emit($event)"\n (keyup.enter)="keyupEnter.emit($event)"\n [compareWith]="equals"\n [multiple]="multiple"\n [typeaheadDebounceInterval]="debounceTime * 10"\n [required]="required">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n \x3c!-- Search bar --\x3e\n <ion-searchbar *ngIf="showSearchBar" #ionSearchbar\n class="mat-select-header"\n [class.ion-searchbar-sticky]="stickySearchBar"\n inputmode="search"\n autocomplete="off"\n animated="true"\n showClearButton\n [debounce]="debounceTime"\n (ionClear)="ionSearchBarClear($event)"\n (ionInput)="ionSearchBarChanged($event)"\n [placeholder]="\'COMMON.BTN_SEARCH\'|translate"\n ></ion-searchbar>\n\n \x3c!-- Headers --\x3e\n <ion-row class="mat-select-header column ion-no-padding"\n [class.multiple]="multiple"\n [class.ion-searchbar-sticky]="showSearchBar && stickySearchBar">\n <ion-col *ngFor="let attr of displayAttributes; index as i" [size]="displayColumnSizes[i]">\n <ion-label [innerHTML]="displayColumnNames[i] | translate"></ion-label>\n </ion-col>\n </ion-row>\n\n \x3c!-- None option --\x3e\n <mat-option *ngIf="!required && !multiple && !clearable" class="ion-no-padding">\n <ion-row class="ion-no-padding">\n <ion-col class="ion-no-padding">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf="$filteredItems | async as items; else loadingTemplate">\n \x3c!-- No item option --\x3e\n <mat-option *ngIf="items | isEmptyArray" class="ion-padding text-italic" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n \x3c!-- Options --\x3e\n <mat-option *ngFor="let item of items" [value]="item" class="ion-no-padding">\n <ion-row [classList]="item.classList">\n <ion-col *ngFor="let path of displayAttributes; index as i;"\n [size]="displayColumnSizes[i]">\n <ion-text [innerHTML]="item | propertyGet: path"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n \x3c!-- More item --\x3e\n <mat-option *ngIf="_moreItemsCount" (ngInit)="_initMatSelectInfiniteScroll()"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n \x3c!-- footer --\x3e\n <ion-row *ngIf="itemCount as count"\n class="mat-autocomplete-footer ion-no-padding">\n <ion-col>\n <ion-text class="ion-float-end ion-padding-end"><i>{{\'COMMON.RESULT_COUNT\'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n \x3c!-- Loading spinner --\x3e\n <ng-template #loadingTemplate>\n <mat-option *ngIf="(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n \x3c!-- Need more characters --\x3e\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class="ion-padding text-italic" disabled>\n <ion-label>\n {{\'INFO.PLEASE_TYPE_MORE_CHARACTERS\'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-select>\n\n\n \x3c!--\n NOTE :\n - "selectInputContent($event) || onFocus.emit($event)" : call onFocus only when to the input is empty (nothing to select)\n --\x3e\n <ng-template #desktopTemplate>\n <input matInput #matInputText type="text"\n [matAutocomplete]="autocomplete"\n [matAutocompletePosition]="matAutocompletePosition"\n [formControl]="formControl"\n [placeholder]="placeholder"\n [appAutofocus]="autofocus"\n [tabindex]="_tabindex"\n [required]="required"\n (click)="clicked.emit($event)"\n (focus)="filterInputTextFocusEvent($event)"\n (blur)="filterInputTextBlurEvent($event)"\n (keydown.escape)="keydownEscape.emit($event)"\n (keyup.enter)="keyupEnter.emit($event)"\n (keyup.arrowdown)="!autocomplete.showPanel && dropButtonClick.emit($event)">\n\n \x3c!-- autocomplete --\x3e\n <mat-autocomplete #autocomplete="matAutocomplete"\n autoActiveFirstOption\n [displayWith]="displayWith"\n [class]="classList"\n [panelWidth]="panelWidth">\n \x3c!-- Headers --\x3e\n <ion-row class="mat-autocomplete-header column ion-no-padding">\n <ion-col *ngFor="let attr of displayAttributes; index as i" [size]="displayColumnSizes[i]">\n <ion-label [innerHTML]="displayColumnNames[i] | translate"></ion-label>\n </ion-col>\n </ion-row>\n\n \x3c!-- Options --\x3e\n <ng-container *ngIf="$filteredItems | async as items; else loadingTemplate">\n \x3c!-- No item option --\x3e\n <mat-option *ngIf="items | isEmptyArray" class="ion-padding text-italic" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor="let item of items" [value]="item" class="ion-no-padding">\n <ion-row [classList]="item.classList">\n <ion-col *ngFor="let path of displayAttributes; index as i;"\n [size]="displayColumnSizes[i]">\n <ion-text [innerHTML]="item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n \x3c!-- More item --\x3e\n <mat-option *ngIf="_moreItemsCount" (ngInit)="_initAutocompleteInfiniteScroll()"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n \x3c!-- Loading spinner --\x3e\n <ng-template #loadingTemplate>\n <mat-option *ngIf="(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate"\n class="ion-padding" disabled>\n <ion-skeleton-text [animated]="true" style="width: 100%"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n \x3c!-- Need more characters --\x3e\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class="ion-padding text-italic" disabled>\n <ion-label>\n {{\'INFO.PLEASE_TYPE_MORE_CHARACTERS\'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n\n \x3c!-- footer --\x3e\n <ion-row *ngIf="itemCount; let count" class="mat-autocomplete-footer ion-no-padding">\n <ion-col>\n <ion-text class="ion-float-end ion-padding-end"><i>{{\'COMMON.RESULT_COUNT\'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet="matSuffixTemplate"></ng-container>\n </div>\n\n <mat-error *ngIf="formControl.hasError(\'required\')" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf="formControl.hasError(\'entity\')" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select="[matError]"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size="auto" class="ion-align-self-center">\n <ng-content select="[matAfter]"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select="[matPrefix]"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex="-1"\n type="button"\n *ngIf="desktop"\n (click)="dropButtonClick.emit($event)"\n [hidden]="disabled">\n <mat-icon class="large select-arrow">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex="-1"\n type="button"\n *ngIf="clearable"\n (click)="clearValue($event)"\n [hidden]="disabled || !formControl.value">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select="[matSuffix]"></ng-content>\n</ng-template>\n\n<ng-template #headers>\n <ion-row class="mat-autocomplete-header ion-no-padding">\n <ion-col *ngFor="let attr of displayAttributes; index as i" [size]="displayColumnSizes[i]">\n <ion-label [innerHTML]="displayColumnNames[i] | translate"></ion-label>\n </ion-col>\n </ion-row>\n</ng-template>\n\n<ng-template #options>\n\n\n</ng-template>\n\n',providers:[{provide:P.NG_VALUE_ACCESSOR,multi:!0,useExisting:e.forwardRef((function(){return Zn}))}],animations:[jn],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button[hidden]{display:none}mat-icon.select-arrow{color:rgba(0,0,0,.47);font-size:150%}"]}]}],Zn.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:P.FormGroupDirective,decorators:[{type:e.Optional}]}]},Zn.propDecorators={equals:[{type:e.Input}],logPrefix:[{type:e.Input}],formControl:[{type:e.Input}],formControlName:[{type:e.Input}],floatLabel:[{type:e.Input}],placeholder:[{type:e.Input}],suggestFn:[{type:e.Input}],required:[{type:e.Input}],mobile:[{type:e.Input}],clearable:[{type:e.Input}],debounceTime:[{type:e.Input}],displayWith:[{type:e.Input}],displayAttributes:[{type:e.Input}],displayColumnSizes:[{type:e.Input}],displayColumnNames:[{type:e.Input}],highlightAccent:[{type:e.Input}],showAllOnFocus:[{type:e.Input}],showPanelOnFocus:[{type:e.Input}],autofocus:[{type:e.Input}],config:[{type:e.Input}],i18nPrefix:[{type:e.Input}],noResultMessage:[{type:e.Input}],classList:[{type:e.Input,args:["class"]}],panelWidth:[{type:e.Input}],matAutocompletePosition:[{type:e.Input}],multiple:[{type:e.Input}],itemSize:[{type:e.Input}],fetchMoreThreshold:[{type:e.Input}],suggestLengthThreshold:[{type:e.Input}],showLoadingSpinner:[{type:e.Input}],debug:[{type:e.Input}],showSearchBar:[{type:e.Input}],stickySearchBar:[{type:e.Input}],clicked:[{type:e.Output,args:["click"]}],blurred:[{type:e.Output,args:["blur"]}],focused:[{type:e.Output,args:["focus"]}],dropButtonClick:[{type:e.Output}],keydownEscape:[{type:e.Output,args:["keydown.escape"]}],keyupEnter:[{type:e.Output,args:["keyup.enter"]}],matSelect:[{type:e.ViewChild,args:["matSelect"]}],ionSearchbar:[{type:e.ViewChild,args:["ionSearchbar"]}],matInputText:[{type:e.ViewChild,args:["matInputText"]}],autocomplete:[{type:e.ViewChild,args:[R.MatAutocomplete]}],autocompleteTrigger:[{type:e.ViewChild,args:[R.MatAutocompleteTrigger]}],filter:[{type:e.Input}],readonly:[{type:e.Input}],tabindex:[{type:e.Input}],items:[{type:e.Input}]};var to=function(){function t(t,e){this.dateAdapter=t,this.translate=e;var n=e.instant(["COMMON.DATE_PATTERN","COMMON.DATE_TIME_PATTERN","COMMON.DATE_TIME_SECONDS_PATTERN"]);this.datePattern=n["COMMON.DATE_PATTERN"],this.dateTimePattern=n["COMMON.DATE_TIME_PATTERN"],this.dateTimeSecondsPattern=n["COMMON.DATE_TIME_SECONDS_PATTERN"]}return t.prototype.transform=function(t,e){var n=e&&e.pattern||(e&&e.time?e.seconds?this.dateTimeSecondsPattern:this.dateTimePattern:this.datePattern),o=j.isMoment(t)?t:this.dateAdapter.parse(t,ye);return o&&this.dateAdapter.format(o,n)||""},t.prototype.format=function(t,e){return this.dateAdapter.format(t,e)},t}();to.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new to(Vt.ɵɵinject(Kt.MomentDateAdapter),Vt.ɵɵinject(Gt.TranslateService))},token:to,providedIn:"root"}),to.decorators=[{type:e.Pipe,args:[{name:"dateFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}],to.ctorParameters=function(){return[{type:B.MomentDateAdapter},{type:F.TranslateService}]};var eo=Wt,no=function(){function t(t,e){var n=this;this.dateAdapter=t,this.translate=e,this.dayUnit=e.instant("COMMON.DAY_UNIT"),e.get("COMMON.DAY_UNIT").subscribe((function(t){return n.dayUnit=t}))}return t.prototype.transform=function(t,e){if(!t.startValue||!t.endValue)return"";var n=this.dateAdapter.parse(t.startValue,ye),o=this.dateAdapter.parse(t.endValue,ye);return this.format(n,o)},t.prototype.format=function(t,e){var n=eo.duration(e.diff(t));if(n.asMinutes()<0)return"";var o=eo(0).hour(n.hours()).minute(n.minutes()),r=Math.floor(n.asDays());return(r>0?r.toString()+(this.dayUnit+" "):"")+o.format("HH:mm")},t}();no.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new no(Vt.ɵɵinject(qt.DateAdapter),Vt.ɵɵinject(Gt.TranslateService))},token:no,providedIn:"root"}),no.decorators=[{type:e.Pipe,args:[{name:"dateDiffDuration"}]},{type:e.Injectable,args:[{providedIn:"root"}]}],no.ctorParameters=function(){return[{type:s.DateAdapter},{type:F.TranslateService}]};var oo=function(){function t(t){this.dateAdapter=t}return t.prototype.transform=function(t,e){var n=j.isMoment(t)?t:this.dateAdapter.parse(t,ye);return n?n.fromNow(e&&e.withoutSuffix):""},t}();oo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new oo(Vt.ɵɵinject(Kt.MomentDateAdapter))},token:oo,providedIn:"root"}),oo.decorators=[{type:e.Pipe,args:[{name:"dateFromNow"}]},{type:e.Injectable,args:[{providedIn:"root"}]}],oo.ctorParameters=function(){return[{type:B.MomentDateAdapter}]};var ro=["DDMMSS","DDMM","DD"],io={pattern:"DDMM",maxDecimals:3,placeholderChar:ve},ao=Object.assign(Object.assign({},io),{longitude:!1}),so=Object.assign(Object.assign({},io),{longitude:!0});function lo(t,e){if(null==t)return null;switch(e.pattern){case"DDMMSS":return po(t,Object.assign(Object.assign({},ao),e));case"DDMM":return ho(t,Object.assign(Object.assign({},ao),e));default:return uo(t,Object.assign(Object.assign({},ao),e))}}function co(t,e){if(null==t)return null;switch(e.pattern){case"DDMMSS":return po(t,Object.assign(Object.assign({},so),e));case"DDMM":return ho(t,Object.assign(Object.assign({},so),e));default:return uo(t,Object.assign(Object.assign({},so),e))}}function uo(t,e){var n=t<0;if(n&&(t*=-1),e.longitude)for(;t>180;)(n=(t-=180)<0)&&(t*=-1);else for(;t>90;)(n=(t-=90)<0)&&(t*=-1);var o=fo(t,e.maxDecimals).toString(),r=n?"-":"+";if(e.placeholderChar){e.longitude?t<100&&(o=e.placeholderChar+o):r+=" ",t<10&&(o=e.placeholderChar+o);var i=e.longitude?3:2;for(o.length===i&&(o+=".");o.length<e.maxDecimals+i;)o+=e.placeholderChar}return(e.hideSign?"":r)+o+"°"}function po(t,e){var n=t<0;if(n&&(t*=-1),e.longitude)for(;t>180;)(n=(t-=180)<0)&&(t*=-1);else for(;t>90;)(n=(t-=90)<0)&&(t*=-1);for(var o=Math.trunc(t),r=Math.trunc(60*(t-o)),i=fo(60*(60*(t-o)-r),e.maxDecimals);i>=60;)i-=60,r+=1;for(;r>=60;)r-=60,o+=1;var a=e.longitude?n?"W":"E":n?"S":"N",s="";if(e.placeholderChar&&(e.longitude&&o<100&&(s+=e.placeholderChar),o<10&&(s+=e.placeholderChar),r<10&&(r=e.placeholderChar+r),i=i<10?e.placeholderChar+i:i.toString(),e.maxDecimals>0))for(2===i.length&&(i+=".");i.length<e.maxDecimals+3;)i+=e.placeholderChar;return s+o+"° "+r+"' "+i+'"'+(e.hideSign?"":" "+a)}function ho(t,e){var n=t<0;if(n&&(t*=-1),e.longitude)for(;t>180;)(n=(t-=180)<0)&&(t*=-1);else for(;t>90;)(n=(t-=90)<0)&&(t*=-1);for(var o=Math.trunc(t),r=fo(60*(t-o),e.maxDecimals);r>=60;)r-=60,o+=1;var i=e.longitude?n?"W":"E":n?"S":"N",a="";if(e.placeholderChar&&(e.longitude&&o<100&&(a+=e.placeholderChar),o<10&&(a+=e.placeholderChar),r=r<10?e.placeholderChar+r:r.toString(),e.maxDecimals>0))for(2===r.length&&(r+=".");r.length<e.maxDecimals+3;)r+=e.placeholderChar;return a+o+"° "+r+"'"+(e.hideSign?"":" "+i)}function mo(t,e,n,o){var r=t.trim().replace(new RegExp("[ +"+(o||ve)+"]+","g"),"").split(/[^-\d\w.,]+/),i=parseFloat(r[0].replace(/,/g,"."));if(isNaN(i))return console.debug("parseLatitudeOrLongitude "+t+" -> Invalid degrees (NaN). Parts found:",r),NaN;if("DD"===e)return fo(i,n);var a=("DDMMSS"===e||"DDMM"===e)&&r[1]&&parseFloat(r[1].replace(/,/g,"."))||0,s="DDMMSS"===e&&r[2]&&parseFloat(r[2].replace(/,/g,"."))||0,l="DDMMSS"===e&&r[3]||"DDMM"===e&&r[2]||void 0;return fo(i=(!l||"s"!==l&&"S"!==l&&"w"!==l&&"W"!==l?1:-1)*(i+a/60+s/3600),n)}function fo(t,e){if(e>0){var n=Math.pow(10,e);return Math.trunc(t*n+.5)/n}return 0===e?Math.trunc(t+.5):t}var go=function(){function t(){}return t.prototype.transform=function(t,e){return(e.type&&"latitude"===e.type?lo:co)(t,e)},t}();go.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new go},token:go,providedIn:"root"}),go.decorators=[{type:e.Pipe,args:[{name:"latLongFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var bo=function(){this.transform=lo};bo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new bo},token:bo,providedIn:"root"}),bo.decorators=[{type:e.Pipe,args:[{name:"latitudeFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var yo=function(){this.transform=co};yo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new yo},token:yo,providedIn:"root"}),yo.decorators=[{type:e.Pipe,args:[{name:"longitudeFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var vo=function(){function t(){}return t.prototype.transform=function(t,e){return null!=t?t.toLocaleString(void 0,e):""},t}();vo.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new vo},token:vo,providedIn:"root"}),vo.decorators=[{type:e.Pipe,args:[{name:"numberFormat"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];var Co=function(){function t(){}return t.prototype.transform=function(t,e){if("string"!=typeof t||!e)return t;var n="string"==typeof e?e:e.search,o="string"!=typeof e&&Ve(null==e?void 0:e.withAccent,!1);if("string"!=typeof n)return t;var r=n.replace(/[.]/g,"[.]").replace(/[*]+/g,".*");if(".*"===r)return t;if(o){var i=We(r).toUpperCase(),a=We(t.toUpperCase()).indexOf(i);return-1!==a?t.substr(0,a-1)+"<b>"+t.substr(a,i.length)+"</b>"+t.substr(a+i.length):t}var s=new RegExp("[ ]?"+r,"gi");return(""+t).replace(s,"<b>$&</b>")},t}();Co.ɵprov=Vt.ɵɵdefineInjectable({factory:function(){return new Co},token:Co,providedIn:"root"}),Co.decorators=[{type:e.Pipe,args:[{name:"highlight"}]},{type:e.Injectable,args:[{providedIn:"root"}]}];
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2019 Jonathan Catmull.
|