var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"fr"});
"use strict";(function(global){global.ng=global.ng||{};global.ng.common=global.ng.common||{};global.ng.common.locales=global.ng.common.locales||{};var u=undefined;function plural(n){var i=Math.floor(Math.abs(n));if(i===0||i===1)return 1;return 5}global.ng.common.locales["fr"]=["fr",[["AM","PM"],u,u],u,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],u,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],u,[["av. J.-C.","ap. J.-C."],u,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}","{1} '\xE0' {0}",u,u],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{"ARS":["$AR","$"],"AUD":["$AU","$"],"BEF":["FB"],"BMD":["$BM","$"],"BND":["$BN","$"],"BZD":["$BZ","$"],"CAD":["$CA","$"],"CLP":["$CL","$"],"CNY":[u,"\xA5"],"COP":["$CO","$"],"CYP":["\xA3CY"],"EGP":[u,"\xA3E"],"FJD":["$FJ","$"],"FKP":["\xA3FK","\xA3"],"FRF":["F"],"GBP":["\xA3GB","\xA3"],"GIP":["\xA3GI","\xA3"],"HKD":[u,"$"],"IEP":["\xA3IE"],"ILP":["\xA3IL"],"ITL":["\u20A4IT"],"JPY":[u,"\xA5"],"KMF":[u,"FC"],"LBP":["\xA3LB","\xA3L"],"MTP":["\xA3MT"],"MXN":["$MX","$"],"NAD":["$NA","$"],"NIO":[u,"$C"],"NZD":["$NZ","$"],"RHD":["$RH"],"RON":[u,"L"],"RWF":[u,"FR"],"SBD":["$SB","$"],"SGD":["$SG","$"],"SRD":["$SR","$"],"TOP":[u,"$T"],"TTD":["$TT","$"],"TWD":[u,"NT$"],"USD":["$US","$"],"UYU":["$UY","$"],"WST":["$WS"],"XCD":[u,"$"],"XPF":["FCFP"],"ZMW":[u,"Kw"]},"ltr",plural,[[["minuit","midi","mat.","ap.m.","soir","nuit"],u,["minuit","midi","du matin","de l\u2019apr\xE8s-midi","du soir","du matin"]],[["minuit","midi","mat.","ap.m.","soir","nuit"],u,["minuit","midi","matin","apr\xE8s-midi","soir","nuit"]],["00:00","12:00",["04:00","12:00"],["12:00","18:00"],["18:00","24:00"],["00:00","04:00"]]]]})(typeof globalThis!=="undefined"&&globalThis||typeof global!=="undefined"&&global||typeof window!=="undefined"&&window);;
!function(){function e(){var t=Ba([":@@survey-answer-connect-browser-upgrade-message\u241fb116ff6fb352c36c963d4ce261d41c76e4d59ebf\u241f6133990645748704866: La version de votre navigateur n\u2019est pas pris en charge. Veuillez plut\xf4t utiliser la version la plus r\xe9cente de Google Chrome, Microsoft Edge, Safari ou Mozilla Firefox. "]);return e=function(){return t},t}function t(){var e=Ba([":@@avis-legal\u241fbb84d31a458f20bf20959ae6cec47ba736cd10ba\u241f6307784615964621972:Avis l\xe9gal"]);return t=function(){return e},e}function n(){var e=Ba([":@@confidentialite\u241f0a2d331749b48b9f4d63c2c14a146c9ddf4452f1\u241f8393472153703114984:Confidentialit\xe9"]);return n=function(){return e},e}function r(){var e=Ba([":@@footer-droits_reserves\u241faf4adaf59b7984de393a3daf8d7421bc636e334f\u241f210420890772582012:Tous droits r\xe9serv\xe9s"]);return r=function(){return e},e}function i(){var e=Ba([":@@menu-change-language-sm\u241f21a7cc8fca7a122613fb8b7a29681590d8606457\u241f1919953059996445670:En"]);return i=function(){return e},e}function o(){var e=Ba([":@@menu-change-language\u241fa0843de0a64adcc7ee6a946408b6876cd8abdcae\u241f5866254605255506989:English"]);return o=function(){return e},e}function a(){var e=Ba([":@@menu-suivi-demande\u241f12d5d16aeb6f5713f31fe5a6f00c0c20432fbd46\u241f4413228435210354183:Suivi d'une demande"]);return a=function(){return e},e}function s(){var e=Ba([":@@menu-nouv-demande\u241f495c7d5e5ce76f8d4356c9bae34b97b3648eacde\u241f3232815869323231476:Nouvelle demande"]);return s=function(){return e},e}function l(){var e=Ba([":@@menu-suivi-demande\u241f12d5d16aeb6f5713f31fe5a6f00c0c20432fbd46\u241f4413228435210354183:Suivi d'une demande"]);return l=function(){return e},e}function u(){var e=Ba([":@@menu-nouv-demande\u241f495c7d5e5ce76f8d4356c9bae34b97b3648eacde\u241f3232815869323231476:Nouvelle demande"]);return u=function(){return e},e}function c(){var e=Ba([":@@header-title\u241f8059b82322edcf5f28ab416774d2ce2bcb52caf1\u241f3718849074234636697:Demandes en ligne"]);return c=function(){return e},e}function d(){var e=Ba([":@@site-hors-ligne\u241fae796c35aeec59485042f2cf57dfe3f8d3b0cdcf\u241f7232911903226575761:Le site est pr\xe9sentement hors-ligne."]);return d=function(){return e},e}function h(){var e=Ba([":@@recours-msg\u241f18fd3d6bddde5dc90a4af30c5482cd353baa846c\u241f8211128244132600890:Vous \xeates le seul responsable des dommages d\xe9coulant de l'utilisation des informations r\xe9unis par Voil\xe0!"]);return h=function(){return e},e}function p(){var e=Ba([":@@recours-lbl\u241ff72563ddb32c4df9970d961f2aecfd843e2f0778\u241f5091390908974308952:RECOURS"]);return p=function(){return e},e}function f(){var e=Ba([":@@exactitudedonnees-msg\u241fce1bb0350ce37e56c402201c5afc894e8a61d67a\u241f8533312472946668960:Bien que les informations soient habituellement exactes, PG Solutions ne garantit pas la parfaite exactitude des donn\xe9es recueillies et n'assume aucune responsabilit\xe9 quant aux erreurs qu'elles pourraient contenir ou aux erreurs d'interpr\xe9tation auxquelles elles pourraient donner lieu. En cas de divergence entre un texte officiel et l'information obtenue de ce site, le texte officiel a pr\xe9s\xe9ance. Le client est le seul responsable du r\xe9sultat de ses recherches. Les textes et les donn\xe9es disponibles sont susceptibles de contenir des inexactitudes techniques ou des erreurs typographiques. De plus, en cas de divergence entre un texte officiel et le contenu du site, le texte officiel a pr\xe9s\xe9ance."]);return f=function(){return e},e}function m(){var e=Ba([":@@exactitudedonnees-lbl\u241f9ac69f5d3ce45e922956bbe8e80473fa8be7f95e\u241f709865625114169928:EXACTITUDE DES DONN\xc9ES"]);return m=function(){return e},e}function g(){var e=Ba([":@@lienautressites-msg\u241ffbf45c32126b3552136af56bcf9535479247f0ed\u241f3941201344505717282:Ce site peut contenir des liens vers des sites externes exploit\xe9s par des tierces parties. PG Solutions n'exerce aucun contr\xf4le sur ces sites externes et ne peut donc, en aucun cas, \xeatre tenu responsable de la teneur des propos et du contenu de ces sites. L'insertion de ces liens par PG Solutions vers d'autres sites Web ne suppose aucun endossement du mat\xe9riel pr\xe9sent\xe9 dans ces sites ni aucune association avec les entit\xe9s qui les exploitent."]);return g=function(){return e},e}function v(){var e=Ba([":@@lienautressites-lbl\u241fe5909e249407a20b32ade2fb25ddb00bf97d8a56\u241f4921059807165794722:LIEN VERS D'AUTRES SITES"]);return v=function(){return e},e}function y(){var e=Ba([":@@interruptionService-msg\u241fca3d0103f971a27b277de174a0545be083772212\u241f6269420498783179271:PG Solutions peut interrompre, en tout temps, de fa\xe7on temporaire, l'acc\xe8s au site \xe0 des fins de mise \xe0 jour ou de maintenance des programmes et/ou des \xe9quipements. PG Solutions s'engage \xe0 minimiser ces interruptions afin de perturber le moins possible les activit\xe9s des abonn\xe9s."]);return y=function(){return e},e}function b(){var e=Ba([":@@interruptionService-lbl\u241f1832de45fe438b96fdf3fdeb00f8122490b6a7c8\u241f2141202773309459318:INTERRUPTION TEMPORAIRE DU SERVICE"]);return b=function(){return e},e}function _(){var e=Ba([":@@definitiontermes-msg\u241ff60a65588f5304aa19e9fa68fea9137568f9e6d8\u241f6826459935930506459:Voil\xe0! d\xe9signe les modules Permis et/ou Requ\xeate de PG Solutions"]);return _=function(){return e},e}function w(){var e=Ba([":@@definitiontermes-lbl\u241f2bfdc2f8d49c2fdf680f95b95f03e1112eaad86e\u241f739886751873570374:D\xc9FINITION DES TERMES"]);return w=function(){return e},e}function C(){var e=Ba([":@@al-dernieremaj\u241f355bf110c34410a89298b6c8f1e44c5bff57b663\u241f612526646609688427:Derni\xe8re mise \xe0 jour : Novembre 2016"]);return C=function(){return e},e}function x(){var e=Ba([":@@avislegaux\u241fe5ae8bbeb92e83f8bfd2c5d9a9985c48a8962b4e\u241f2460165516187256133:Avis l\xe9gaux"]);return x=function(){return e},e}function S(){var e=Ba([":@@suiv\u241fff95cf8e57d4575f49d31cab40d6d7b081993353\u241f2709229530273324966:Suiv."]);return S=function(){return e},e}function P(){var e=Ba([":@@de\u241f2941fa3d3bdaddbf34352eb20bda41353b51fa92\u241f2497995081825714047:de"]);return P=function(){return e},e}function k(){var e=Ba([":@@etape\u241f1bfc41606492ff89be80889157326f4f17d4d4a4\u241f869038628234397733:\xc9tape"]);return k=function(){return e},e}function E(){var e=Ba([":@@prec\u241fe5fe774d64ab376f2ffe966f96ebf0e531c1971d\u241f8229334980588294232:Pr\xe9c."]);return E=function(){return e},e}function A(){var e=Ba([":@@fermer\u241f1a7391c494239efe2ad440cff51f17e9a03bc6b0\u241f9059155436017318544:Fermer"]);return A=function(){return e},e}function I(){var e=Ba([":@@service-responsable\u241f89c761e3a737077e6b228055d7a0621db05be329\u241f5370453473325508084: Service responsable de la requ\xeate "]);return I=function(){return e},e}function T(){var e=Ba([":@@infos\u241f0aa26473c8c40e4e4793b48551c980a4fed023a8\u241f1264773356404959229:Infos"]);return T=function(){return e},e}function O(){var e=Ba([":@@nature-2points\u241f4069542b1d90a5ae227df61c58d78338502c69dc\u241f3220192483829477987:Nature\xa0:"]);return O=function(){return e},e}function R(){var e=Ba([":@@schemas\u241f0f2ce3f4fc7eeb0ebdb0692e952c9a9449b878ce\u241f749794875285930252:Sch\xe9mas de la r\xe9glementation"]);return R=function(){return e},e}function V(){var e=Ba([":@@ast_documents_obligatoires\u241f5047f518571c1d4b2cf5697e153fe064da75caeb\u241f6062226975538233759: * Document obligatoire "]);return V=function(){return e},e}function D(){var e=Ba([":@@doc-requis\u241f9cbab6c58f41866232a7b38143519a73ce3ceb20\u241f7538696438364511257:Documents requis"]);return D=function(){return e},e}function N(){var e=Ba([":@@consulter-normes\u241f2d75798d35fac15c9f995ac46ceb16243c7da57a\u241f4941516254138706600:Consulter les normes"]);return N=function(){return e},e}function L(){var e=Ba([":@@reglementation\u241f8df8c3938372d85fcf30b16397ab5173d6139020\u241f586370248617779205: R\xe9glementation "]);return L=function(){return e},e}function F(){var e=Ba([":@@delai-detail\u241f8f98d8f1cb95b2c4e4bafb0ba873f3bbcb171efa\u241f1790855627594116192:",":START_TAG_SPAN:Le d\xe9lai de traitement de ce type de permis est de ",":ICU: ",":CLOSE_TAG_SPAN:"]);return F=function(){return e},e}function M(){var e=Ba([":\u241fa575e132ad02002e271252d981d71c0521613941\u241f3677441351552154852:{VAR_PLURAL, plural, =1 {1 jour.} other {{INTERPOLATION} jours.}}"]);return M=function(){return e},e}function q(){var e=Ba([":@@delai\u241f9be17a2121b71da1f00b54ae95b46da292c88171\u241f4258902171002059992: D\xe9lai "]);return q=function(){return e},e}function j(){var e=Ba([":@@montant-frais-etude\u241facfd761eb40775e20afc09e7883185746b15d8df\u241f92519210247555602:Frais pour l'\xe9tude de la demande "]);return j=function(){return e},e}function B(){var e=Ba([":@@montant-variable\u241ff4f29728d167e7eda942d92b4b93730e93812277\u241f2459306863056149782: Montant variable "]);return B=function(){return e},e}function z(){var e=Ba([":@@gratuit\u241f776aafd0cd7fa1d8f70b1e5a5fea343367006c14\u241f5219353193291427616: Gratuit"]);return z=function(){return e},e}function U(){var e=Ba([":@@fermer\u241f1a7391c494239efe2ad440cff51f17e9a03bc6b0\u241f9059155436017318544:Fermer"]);return U=function(){return e},e}function H(){var e=Ba([":@@cout-2points\u241f3be5377646d7cf80734ecaf99c0f367b9d15e004\u241f5476757784046107370:Co\xfbt\xa0:"]);return H=function(){return e},e}function Q(){var e=Ba([":@@infos\u241f0aa26473c8c40e4e4793b48551c980a4fed023a8\u241f1264773356404959229:Infos"]);return Q=function(){return e},e}function W(){var e=Ba([":@@type-2points\u241f66d9cbdb57eb38e5c373900db03cb97ab76a53e0\u241f283278599373275985:Type\xa0:"]);return W=function(){return e},e}function G(){var e=Ba([":@@consultation-demande\u241f66bc6ae9cc5208250ffedea3b9816351e89ef9f1\u241f7005997764026077668:Consultation de la demande"]);return G=function(){return e},e}function $(){var e=Ba([":@@modification-demande\u241fbda5a098ee0567e9a228c3e54dbeda40c74a1a89\u241f2854823205870880444:Modification de la demande"]);return $=function(){return e},e}function J(){var e=Ba([":@@nouvelle-demande\u241f495c7d5e5ce76f8d4356c9bae34b97b3648eacde\u241f3232815869323231476:Nouvelle demande"]);return J=function(){return e},e}function Y(){var e=Ba([":@@suivre_une_autre_demande\u241f076c796493abe2dcd28315897b2aa426034cb7b3\u241f2371384411648506166:Suivre une autre demande"]);return Y=function(){return e},e}function K(){var e=Ba([":@@aller_au_suivi_demande\u241f2ed665c4ca02ea9b4906d5a946aa7db9f1ec6762\u241f6051987840082381971:Aller au suivi de la demande"]);return K=function(){return e},e}function Z(){var e=Ba([":@@retourner_suivi_demande\u241ffb8e63de45f9e65893a740c71e59df6ad0c4411f\u241f7906193152728278328:Retourner au suivi de la demande"]);return Z=function(){return e},e}function X(){var e=Ba([":@@commencer_nouvelle_demande\u241f160def9170251f10e2fd0dc51dd4261f7712dbce\u241f4677494868576461659:Commencer une nouvelle demande"]);return X=function(){return e},e}function ee(){var e=Ba([":@@recommencer_demande\u241fd33166cd29085423407123aa9e023edc900b9a9d\u241f7332000329835356310:Recommencer la demande"]);return ee=function(){return e},e}function te(){var e=Ba([":@@erreur_sauvegarde_demande\u241f23982c13b52b97fa70c47148820fe14288439f9c\u241f7460453659570736731: Une erreur s'est produite lors de la sauvegarde de votre demande. ",":LINE_BREAK:",":LINE_BREAK: Si le probl\xe8me persiste, veuillez contacter votre ville.\n"]);return te=function(){return e},e}function ne(){var e=Ba([":@@aller_au_suivi_demande\u241f2ed665c4ca02ea9b4906d5a946aa7db9f1ec6762\u241f6051987840082381971:Aller au suivi de la demande"]);return ne=function(){return e},e}function re(){var e=Ba([":@@commencer_nouvelle_demande\u241f160def9170251f10e2fd0dc51dd4261f7712dbce\u241f4677494868576461659:Commencer une nouvelle demande"]);return re=function(){return e},e}function ie(){var e=Ba([":@@nom_famille_ou_entreprise\u241fc519c4e51fec0fbd91d4f39f61407f98965ca524\u241f5391073534573650967:Nom de famille ou d'entreprise"]);return ie=function(){return e},e}function oe(){var e=Ba([":@@numero_de_suivi\u241fdd45a927cb29b1e8a260ec2a2dff110c1008cdbc\u241f6292014663174285874:Num\xe9ro de suivi"]);return oe=function(){return e},e}function ae(){var e=Ba([":@@msg_demande_soumise_courriel\u241f779470286a44d405f67e541452a40b69bf8a0b02\u241f2680530373445166810: Votre demande a bien \xe9t\xe9 soumise et sera trait\xe9e d\xe8s que possible. Vous recevrez sous peu un courriel vous permettant d'en faire le suivi. "]);return ae=function(){return e},e}function se(){var e=Ba([":@@msg_demande_soumise\u241f8b894a8a79a80cf675be5a2d4db3c7247a0aca72\u241f6170579224529684307:Votre demande a bien \xe9t\xe9 soumise et sera trait\xe9e d\xe8s que possible. Veuillez utiliser les informations ci-dessous pour en faire le suivi. Vous recevrez \xe9galement une copie de ces informations par courriel."]);return se=function(){return e},e}function le(){var e=Ba([":@@msg_demande_enregistree\u241f614ffa1263df95d8892c5e30539399d6f0352ef3\u241f5610313679738394571: Votre demande a bien \xe9t\xe9 enregistr\xe9e. Veuillez utiliser les informations ci-dessous pour revenir la modifier plus tard via le menu de suivi d'une demande, dans un d\xe9lai maximal de 7 jours. Vous recevrez \xe9galement une copie de ces informations par courriel. "]);return le=function(){return e},e}function ue(){var e=Ba([":@@demande_enregistree\u241fe8d985f222ba85b0e5d26c787adde5647a42d0f2\u241f407380641496588371:Demande enregistr\xe9e"]);return ue=function(){return e},e}function ce(){var e=Ba([":@@demande_soumise\u241f56a3d7ceccacdd84b559da716efcc33906803300\u241f3983066160302282355:Demande soumise"]);return ce=function(){return e},e}function de(){var e=Ba([":@@merci_utiliser_services_en_ligne\u241f0088e6bb5cc7ae330650d2ef1b1bffe26ee911e3\u241f3508521313157714595: Merci d'utiliser les services en ligne de ",":INTERPOLATION:"]);return de=function(){return e},e}function he(){var e=Ba([":@@soumettre\u241fb49137fbe6239f18ebfdf3b96fe848689bcd828f\u241f6255671880111620823:Soumettre"]);return he=function(){return e},e}function pe(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return pe=function(){return e},e}function fe(){var e=Ba([":@@consentement-non_accepter\u241f31e9891a4142a3c154978d376613bada61b77d4c\u241f7491213935293933120: Vous devez confirmer votre consentement sur l'utilisation des donn\xe9es personnelles pour pouvoir soumettre votre demande. "]);return fe=function(){return e},e}function me(){var e=Ba([":@@langue_de_correspondance\u241f56dc82802949869e6effb15a5b0aee7bda5a9df1\u241f4235644872728249934:Langue de correspondance"]);return me=function(){return e},e}function ge(){var e=Ba([":@@err-fournir_au_moins_un_moyen_communication\u241f7e4fe28da5aa0adbb6634358bb1cd3415f54c7cf\u241f8855782728489753269:Veuillez fournir au moins un moyen de communication. "]);return ge=function(){return e},e}function ve(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return ve=function(){return e},e}function ye(){var e=Ba([":@@err-aucun_telephone\u241fe151b7c1b3b8fb3f2c55611733428177b7562809\u241f8987416629599611952: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone. "]);return ye=function(){return e},e}function be(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return be=function(){return e},e}function _e(){var e=Ba([":@@err-aucun_courriel\u241ffc5e8448f662328cc854f6b89084fae003c25fcf\u241f3305382122751034707: Veuillez entrer une adresse courriel. "]);return _e=function(){return e},e}function we(){var e=Ba([":@@photos_pieces_jointes\u241fd86149b9219b236046300c96b52dfe632b41d53f\u241f7679100431815646857:",":START_TAG_STRONG:Photos et pi\xe8ces jointes",":CLOSE_TAG_STRONG:"]);return we=function(){return e},e}function Ce(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return Ce=function(){return e},e}function xe(){var e=Ba([":@@telephone\u241fc34e20a0eb6652aedd651c9cfe3fc0c26b6fdc6c\u241f6628356255817390419:T\xe9l\xe9phone"]);return xe=function(){return e},e}function Se(){var e=Ba([":@@courriel\u241f3d1ca149ef3415a4dc6c6102c62db928b2cff6fc\u241f8268021232951468752:Courriel"]);return Se=function(){return e},e}function Pe(){var e=Ba([":@@communication\u241f728e7a8967748f752ffae77f3bde489480a620ac\u241f6915429060840718325:Communication"]);return Pe=function(){return e},e}function ke(){var e=Ba([":@@description\u241feec715de352a6b114713b30b640d319fa78207a0\u241f4902817035128594900:Description"]);return ke=function(){return e},e}function Ee(){var e=Ba([":@@demandeur\u241f813d9f5f678727a57fa31af4050b4dca2a6b9190\u241f8306684293502208679:Demandeur"]);return Ee=function(){return e},e}function Ae(){var e=Ba([":@@emplacement\u241f248d330094718cb1ead6b04cc9857c50238f3c6e\u241f7292948510706319360:Emplacement"]);return Ae=function(){return e},e}function Ie(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return Ie=function(){return e},e}function Te(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return Te=function(){return e},e}function Oe(){var e=Ba([":@@retirer\u241f77f8baef86fbb86a6aab1b6e672e521dad0e9036\u241f9087963924191376133:Retirer"]);return Oe=function(){return e},e}function Re(){var e=Ba([":@@retirer\u241f77f8baef86fbb86a6aab1b6e672e521dad0e9036\u241f9087963924191376133:Retirer"]);return Re=function(){return e},e}function Ve(){var e=Ba([":@@limite_fichiers_atteinte\u241fef428886801c9e5da038a33c4c4e344ac7ad199d\u241f7939664899586229158:Limite de fichiers atteinte"]);return Ve=function(){return e},e}function De(){var e=Ba([":@@glissez_cliquez_pour_ajouter\u241fd7fbef9ba20c7e2eb3c8160d720819aae6d65e84\u241f6586303937643526439:Glissez ou cliquez pour ajouter des fichiers",":LINE_BREAK:",":START_SMALL_TEXT:(maximum ",":INTERPOLATION: fichier(s) - maximum ",":INTERPOLATION_1: Mo par fichier)",":CLOSE_SMALL_TEXT:"]);return De=function(){return e},e}function Ne(){var e=Ba([":@@photos_pieces_jointes\u241f8e69c4803677667df780e33f971d3c618a6df3c2\u241f191509953622091990:Photos et pi\xe8ces jointes"]);return Ne=function(){return e},e}function Le(){var e=Ba([":@@chargement_des_fichiers\u241fe2553d54d39c3b39ce6b69c3e417cb408e9ed180\u241f704293793153342789:Chargement des fichiers"]);return Le=function(){return e},e}function Fe(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return Fe=function(){return e},e}function Me(){var e=Ba([":@@description_details_QS\u241f93130d06a85149261bf1d2ff13760581c79e16e7\u241f8154708322676482307:Veuillez nous d\xe9crire votre demande en mentionnant le lieu, les faits et ou les autres \xe9l\xe9ments pertinents. *"]);return Me=function(){return e},e}function qe(){var e=Ba([":@@description\u241feec715de352a6b114713b30b640d319fa78207a0\u241f4902817035128594900:Description"]);return qe=function(){return e},e}function je(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return je=function(){return e},e}function Be(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return Be=function(){return e},e}function ze(){var e=Ba([":@@demandes-property-not-found\u241fa24459d6ec73fe62ce17cf7304bd90191b0063c2\u241f1414403505758682449:La propri\xe9t\xe9 recherch\xe9e n'a pas \xe9t\xe9 trouv\xe9e \xe0 notre r\xf4le d'\xe9valuation."]);return ze=function(){return e},e}function Ue(){var e=Ba([":@@adresse_emplacement_invalide\u241fa0b7d4e1c560e03cf7b46178cc1565df8d70e47a\u241f3656076495126593452:Aucune adresse \xe0 cet emplacement"]);return Ue=function(){return e},e}function He(){var e=Ba([":@@adresse_emplacement\u241f2a3999b2b07449c254cec8d506a0b6d5d3f894bd\u241f3486266897901581982:Adresse : ",":INTERPOLATION:"]);return He=function(){return e},e}function Qe(){var e=Ba([":@@qs_utiliser_localisation_actuelle\u241f3f508aaf46ae556c3f9a39e01366211a76a22c32\u241f8726076235145476255:Utiliser ma localisation actuelle"]);return Qe=function(){return e},e}function We(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return We=function(){return e},e}function Ge(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return Ge=function(){return e},e}function $e(){var e=Ba([":@@use-localize-on-map\u241fcd88799b1a2be4b62f5810ec770f852db2473f3a\u241f7927864276946151272:utiliser la carte pour le localiser."]);return $e=function(){return e},e}function Je(){var e=Ba([":@@demandes-unknown-location\u241f003bef558bcc4e3d789b8e8f917dabb32ae53e78\u241f289676323002146312:Si vous ne connaissez pas l'emplacement exact, vous pouvez "]);return Je=function(){return e},e}function Ye(){var e=Ba([":@@demandes-property-not-found\u241f34c56a4be35a4995ab759a8eb54c6d7438a78871\u241f3323543797657105011:La propri\xe9t\xe9 recherch\xe9e n'a pas \xe9t\xe9 trouv\xe9e \xe0 notre r\xf4le d'\xe9valuation."]);return Ye=function(){return e},e}function Ke(){var e=Ba([":@@err-voie_publique\u241f2e3e08c548f92310a1aeb15182e0142df09eb089\u241f4463322692083548301: Veuillez selectionner une voie dans la liste sugg\xe9r\xe9e. "]);return Ke=function(){return e},e}function Ze(){var e=Ba([":@@rue_av_ch_rte_etc\u241f3483afa505ecc31399d24ce12a25157cd0ec9526\u241f5245194578156388448:Rue, avenue, boulevard, chemin, route, etc."]);return Ze=function(){return e},e}function Xe(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return Xe=function(){return e},e}function et(){var e=Ba([":@@gen-voie_publique\u241fc307a85960f357442790dd9ca6bf8f806cf79ac5\u241f7687036597322971973:Voie publique"]);return et=function(){return e},e}function tt(){var e=Ba([":@@gen-no_civique\u241fa287161b88be1bc03d45ed1eb5d737ff1b401669\u241f8280715317216312033:N",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: civique"]);return tt=function(){return e},e}function nt(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return nt=function(){return e},e}function rt(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return rt=function(){return e},e}function it(){var e=Ba([":@@qs_demandeur_adresse_erreur_message\u241f6a3a5fb6de3c9682d8f05369874ecae6a7e9a2a7\u241f7956637129492316795: Si l'adresse du demandeur est erron\xe9e, veuillez la modifier \xe0 l'\xe9tape pr\xe9c\xe9dente. "]);return it=function(){return e},e}function ot(){var e=Ba([":@@qs_utiliser_adresse_demandeur\u241f89a02d8146f2dfea1b38443324e85926dc4dcb41\u241f2773040743096609195:Utiliser l'adresse du demandeur"]);return ot=function(){return e},e}function at(){var e=Ba([":@@qs_selectionner_sur_carte\u241f1bf62da8501e300aeed905ed5df106537dba28df\u241f8419394584357516655:S\xe9lectionner sur une carte"]);return at=function(){return e},e}function st(){var e=Ba([":@@qs_entrer_adresse\u241fb69c502190ce77c6912ebb5e4bdf86eac315a187\u241f5107960374763928750:Entrer une adresse"]);return st=function(){return e},e}function lt(){var e=Ba([":@@qs_endroit_vise\u241fb1e35a276e0d7ef351fcec05a63e7e76b3a652c6\u241f4701132574562173170: Veuillez nous indiquer quel endroit est vis\xe9 par cette requ\xeate.\n"]);return lt=function(){return e},e}function ut(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return ut=function(){return e},e}function ct(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return ct=function(){return e},e}function dt(){var e=Ba([":@@code_postal\u241ff61844fc6aac98f584eb5f115b7a9d210c18ce29\u241f4716513778549226272:Code postal"]);return dt=function(){return e},e}function ht(){var e=Ba([":@@rue_av_ch_rte_etc\u241f3483afa505ecc31399d24ce12a25157cd0ec9526\u241f5245194578156388448:Rue, avenue, boulevard, chemin, route, etc."]);return ht=function(){return e},e}function pt(){var e=Ba([":@@gen-voie_publique\u241fc307a85960f357442790dd9ca6bf8f806cf79ac5\u241f7687036597322971973:Voie publique"]);return pt=function(){return e},e}function ft(){var e=Ba([":@@entrer_adresse_manuellement\u241f4bf22d44a6e630d05b10176276ff8d2f0df56632\u241f4567686309049601448:Entrer mon adresse manuellement"]);return ft=function(){return e},e}function mt(){var e=Ba([":@@demandes-property-not-found\u241fc11a5c8fbab0ad808ff4f06bebe2248c2a922bf2\u241f362902474622756837:La propri\xe9t\xe9 recherch\xe9e n'a pas \xe9t\xe9 trouv\xe9e \xe0 notre r\xf4le d'\xe9valuation."]);return mt=function(){return e},e}function gt(){var e=Ba([":@@err-voie_publique\u241f6e593e1dd25b78ae369e7abccdd7a9e8bd1362ec\u241f3453794314621693895: Veuillez selectionner une voie dans la liste sugg\xe9r\xe9e. "]);return gt=function(){return e},e}function vt(){var e=Ba([":@@rue_av_ch_rte_etc\u241f3483afa505ecc31399d24ce12a25157cd0ec9526\u241f5245194578156388448:Rue, avenue, boulevard, chemin, route, etc."]);return vt=function(){return e},e}function yt(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return yt=function(){return e},e}function bt(){var e=Ba([":@@gen-voie_publique\u241fc307a85960f357442790dd9ca6bf8f806cf79ac5\u241f7687036597322971973:Voie publique"]);return bt=function(){return e},e}function _t(){var e=Ba([":@@err-no_civique\u241f762817f99463f1d347b148d2b091713b2fc2f72a\u241f8879395827480283945: Veuillez saisir un n",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: civique. "]);return _t=function(){return e},e}function wt(){var e=Ba([":@@gen-app_local\u241f14b39f7a154d33b09b21b2008948a38bf11c7b93\u241f8040132387261040999:App. ou local"]);return wt=function(){return e},e}function Ct(){var e=Ba([":@@gen-suffixe\u241fe7cb92bfd2a2132f8899d3a7167df046b7d33002\u241f1858167856442129653:Suffixe"]);return Ct=function(){return e},e}function xt(){var e=Ba([":@@gen-no_civique\u241fa287161b88be1bc03d45ed1eb5d737ff1b401669\u241f8280715317216312033:N",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: civique"]);return xt=function(){return e},e}function St(){var e=Ba([":@@IsRedident\u241f4255f4d433cc4c209c2634ea100a5abc6f5201fe\u241f7853792808775677003:Je r\xe9side \xe0 ",":INTERPOLATION:"]);return St=function(){return e},e}function Pt(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return Pt=function(){return e},e}function kt(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return kt=function(){return e},e}function Et(){var e=Ba([":@@err-aucun_telephone_demandeur\u241f2cbc48109294abd55fc586751b1621ff188bad57\u241f8557212516753563991: Veuillez entrer le num\xe9ro de t\xe9l\xe9phone du demandeur. "]);return Et=function(){return e},e}function At(){var e=Ba([":@@err-courriels_ne_correspondent_pas\u241f300e1c012aeeb0b51915a498603562b3fcff522e\u241f6916507521208498508: Les adresses courriel ne correspondent pas. "]);return At=function(){return e},e}function It(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return It=function(){return e},e}function Tt(){var e=Ba([":@@err-aucun_courriel_demandeur\u241f98a3299efc5c97a349e8576363781b2b8558c2cc\u241f288000383551311940: Veuillez entrer le courriel du demandeur. "]);return Tt=function(){return e},e}function Ot(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return Ot=function(){return e},e}function Rt(){var e=Ba([":@@err-aucun_courriel_demandeur\u241f98a3299efc5c97a349e8576363781b2b8558c2cc\u241f288000383551311940: Veuillez entrer le courriel du demandeur. "]);return Rt=function(){return e},e}function Vt(){var e=Ba([":@@err-aucun_prenom_demandeur\u241fbf8189e43f3eda0dfc286559148d3dfc98dcb0ce\u241f3705922350402240860: Veuillez entrer le pr\xe9nom du demandeur. "]);return Vt=function(){return e},e}function Dt(){var e=Ba([":@@prenom\u241fbe2bc63e2cd1274d4e43b10423d6b8f6cd829584\u241f8203024106711668685:Pr\xe9nom"]);return Dt=function(){return e},e}function Nt(){var e=Ba([":@@err-aucun_nom_demandeur\u241ff1091cb52c0b6554739f0c1d429b2b051f004e7e\u241f5400751685968260901: Veuillez entrer le nom du demandeur. "]);return Nt=function(){return e},e}function Lt(){var e=Ba([":@@nom-entreprise\u241fa887dfec8e36e060bf652a60e53a2243b1a98b36\u241f3943794501363843346: Nom d'entreprise"]);return Lt=function(){return e},e}function Ft(){var e=Ba([":@@nom\u241fa60e1d483b4172a50beadd6889195ab7e4405b6d\u241f5624320088169402344: Nom"]);return Ft=function(){return e},e}function Mt(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return Mt=function(){return e},e}function qt(){var e=Ba([":@@je_ne_trouve_pas_adresse\u241f2732005bbf421d17b887b7f457917ed5da6ee68d\u241f3044371178295411798:Je ne trouve pas mon adresse dans la liste. "]);return qt=function(){return e},e}function jt(){var e=Ba([":@@commencez_taper_adresse\u241ffdbb1b32582c6a18d99bc36be95902ccf4e0f5e2\u241f4475166614578295015:Commencez \xe0 taper une adresse..."]);return jt=function(){return e},e}function Bt(){var e=Ba([":@@other-phone\u241fd4f36e9225669668291b41714ce29f124904cc0f\u241f6271623807999308993:T\xe9l\xe9phone (autre)"]);return Bt=function(){return e},e}function zt(){var e=Ba([":@@telephone\u241f9fc523f1ebd8584b31efd66961314d9b611f5a58\u241f2625879441802619713:T\xe9l\xe9phone (principal)"]);return zt=function(){return e},e}function Ut(){var e=Ba([":@@confirmation_courriel\u241f1a3a7141449e80e641e72a51381d7b7cbc6e69c9\u241f1183085422743671184: Confirmation du courriel"]);return Ut=function(){return e},e}function Ht(){var e=Ba([":@@courriel\u241f3d1ca149ef3415a4dc6c6102c62db928b2cff6fc\u241f8268021232951468752:Courriel"]);return Ht=function(){return e},e}function Qt(){var e=Ba([":@@entreprise\u241fdae3ed4fbe0a7cb40ba8b345edce7c294fa06e25\u241f7209503596777460834: Entreprise"]);return Qt=function(){return e},e}function Wt(){var e=Ba([":@@particulier\u241fbbec76c40ebb2c378fcbe2d8f3035a20fccf7fc8\u241f9115055065292143717: Particulier"]);return Wt=function(){return e},e}function Gt(){var e=Ba([":@@type_demandeur\u241ff10adb0f55d0612e11800482f35af44ddd2210e0\u241f7456183291870572640:Type de demandeur"]);return Gt=function(){return e},e}function $t(){var e=Ba([":@@demandeur\u241f813d9f5f678727a57fa31af4050b4dca2a6b9190\u241f8306684293502208679:Demandeur"]);return $t=function(){return e},e}function Jt(){var e=Ba([":@@aller_au_suivi_demande\u241f2ed665c4ca02ea9b4906d5a946aa7db9f1ec6762\u241f6051987840082381971:Aller au suivi de la demande"]);return Jt=function(){return e},e}function Yt(){var e=Ba([":@@commencer_nouvelle_demande\u241f160def9170251f10e2fd0dc51dd4261f7712dbce\u241f4677494868576461659:Commencer une nouvelle demande"]);return Yt=function(){return e},e}function Kt(){var e=Ba([":@@reessayer_le_paiement\u241fafcb2903e9ee2765ae9beb2e2f1d605f1ab91822\u241f7990920785150102849:R\xe9essayer le paiement"]);return Kt=function(){return e},e}function Zt(){var e=Ba([":@@merci_utiliser_services_en_ligne\u241f0088e6bb5cc7ae330650d2ef1b1bffe26ee911e3\u241f3508521313157714595: Merci d'utiliser les services en ligne de ",":INTERPOLATION:"]);return Zt=function(){return e},e}function Xt(){var e=Ba([":@@nom_famille_ou_entreprise\u241fc519c4e51fec0fbd91d4f39f61407f98965ca524\u241f5391073534573650967:Nom de famille ou d'entreprise"]);return Xt=function(){return e},e}function en(){var e=Ba([":@@numero_de_suivi\u241fdd45a927cb29b1e8a260ec2a2dff110c1008cdbc\u241f6292014663174285874:Num\xe9ro de suivi"]);return en=function(){return e},e}function tn(){var e=Ba([":@@msg_reessayer_paiement_courriel\u241fb7e124c5410e623185f450e8662f48ad82313bfd\u241f5020137699706191292: Vous recevrez sous peu un courriel vous permettant de faire le suivi de votre demande. Vous pourrez ensuite r\xe9essayer le paiement, dans un d\xe9lai maximal de 7 jours. Votre demande ne sera pas trait\xe9e avant la r\xe9ception de votre paiement. "]);return tn=function(){return e},e}function nn(){var e=Ba([":@@msg_reessayer_paiement\u241fdfe10471804311cc780345a46a9b5e99f5925e4d\u241f639858494861293384: Veuillez ",":START_LINK:r\xe9essayer",":CLOSE_LINK: ou noter les informations de suivi ci-dessous pour r\xe9essayer plus tard, dans un d\xe9lai maximal de 7 jours. Votre demande ne sera pas trait\xe9e avant la r\xe9ception de votre paiement. "]);return nn=function(){return e},e}function rn(){var e=Ba([":@@msg_demande_soumise_courriel\u241f779470286a44d405f67e541452a40b69bf8a0b02\u241f2680530373445166810: Votre demande a bien \xe9t\xe9 soumise et sera trait\xe9e d\xe8s que possible. Vous recevrez sous peu un courriel vous permettant d'en faire le suivi. "]);return rn=function(){return e},e}function on(){var e=Ba([":@@msg_demande_soumise\u241f8b894a8a79a80cf675be5a2d4db3c7247a0aca72\u241f6170579224529684307:Votre demande a bien \xe9t\xe9 soumise et sera trait\xe9e d\xe8s que possible. Veuillez utiliser les informations ci-dessous pour en faire le suivi. Vous recevrez \xe9galement une copie de ces informations par courriel."]);return on=function(){return e},e}function an(){var e=Ba([":@@msg_demande_enregistree\u241f614ffa1263df95d8892c5e30539399d6f0352ef3\u241f5610313679738394571: Votre demande a bien \xe9t\xe9 enregistr\xe9e. Veuillez utiliser les informations ci-dessous pour revenir la modifier plus tard via le menu de suivi d'une demande, dans un d\xe9lai maximal de 7 jours. Vous recevrez \xe9galement une copie de ces informations par courriel. "]);return an=function(){return e},e}function sn(){var e=Ba([":@@demande_enregistree\u241fe8d985f222ba85b0e5d26c787adde5647a42d0f2\u241f407380641496588371:Demande enregistr\xe9e"]);return sn=function(){return e},e}function ln(){var e=Ba([":@@demande_soumise\u241f56a3d7ceccacdd84b559da716efcc33906803300\u241f3983066160302282355:Demande soumise"]);return ln=function(){return e},e}function un(){var e=Ba([":@@echec-du-paiement-description\u241f13f5895fb653e29897efd0d8c32203bfe870d59a\u241f1697778169869612677: Veuillez vous assurer que vos informations de paiement soient correctes, puis r\xe9essayez."]);return un=function(){return e},e}function cn(){var e=Ba([":@@echec-du-paiement\u241fc0631ef2df3520de8e66f8cd8f8be122ee5558a3\u241f7099928471872762029:\xc9chec du paiement"]);return cn=function(){return e},e}function dn(){var e=Ba([":@@paiement-annule\u241ffdeee7a7418b11e5913de89bb797bd01c2d12a5b\u241f2954472184514711011:Paiement annul\xe9"]);return dn=function(){return e},e}function hn(){var e=Ba([":@@charge_nom\u241fd895edc3a27b78b198e512381d6adb9f03e2790f\u241f5609315843059885830:Cette charge appara\xeetra sur votre relev\xe9 de compte de cr\xe9dit sous le nom"]);return hn=function(){return e},e}function pn(){var e=Ba([":@@paiement_confirmation\u241f6d1cb6f2cd1d08870ba678a95ae7362b1fc98aee\u241f820187130694733474:Num\xe9ro de confirmation"]);return pn=function(){return e},e}function fn(){var e=Ba([":@@demande_payee\u241f2294267dc447a863e8d9d745cea5d707e6264441\u241f4160589440589141208:Demande pay\xe9e"]);return fn=function(){return e},e}function mn(){var e=Ba([":@@soumettre_et_payer\u241f4621a4d7ceeb03397094b781805a4b96384745fc\u241f5252369168474901989:Soumettre et payer "]);return mn=function(){return e},e}function gn(){var e=Ba([":@@soumettre\u241fb49137fbe6239f18ebfdf3b96fe848689bcd828f\u241f6255671880111620823:Soumettre"]);return gn=function(){return e},e}function vn(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return vn=function(){return e},e}function yn(){var e=Ba([":@@err-non_accepter\u241f30e92e5478c5b17e7155ac9a9c98ae1cb5778944\u241f6990743358250370763: Vous devez confirmer avoir lu et accept\xe9 les conditions et exigences en cochant la case ci-contre avant de continuer. "]);return yn=function(){return e},e}function bn(){var e=Ba([":@@consentement-non_accepter\u241f31e9891a4142a3c154978d376613bada61b77d4c\u241f7491213935293933120: Vous devez confirmer votre consentement sur l'utilisation des donn\xe9es personnelles pour pouvoir soumettre votre demande. "]);return bn=function(){return e},e}function _n(){var e=Ba([":@@langue_de_correspondance\u241f56dc82802949869e6effb15a5b0aee7bda5a9df1\u241f4235644872728249934:Langue de correspondance"]);return _n=function(){return e},e}function wn(){var e=Ba([":@@err-fournir_au_moins_un_moyen_communication\u241f7e4fe28da5aa0adbb6634358bb1cd3415f54c7cf\u241f8855782728489753269:Veuillez fournir au moins un moyen de communication. "]);return wn=function(){return e},e}function Cn(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return Cn=function(){return e},e}function xn(){var e=Ba([":@@err-aucun_telephone\u241fe151b7c1b3b8fb3f2c55611733428177b7562809\u241f8987416629599611952: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone. "]);return xn=function(){return e},e}function Sn(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return Sn=function(){return e},e}function Pn(){var e=Ba([":@@err-aucun_courriel\u241ffc5e8448f662328cc854f6b89084fae003c25fcf\u241f3305382122751034707: Veuillez entrer une adresse courriel. "]);return Pn=function(){return e},e}function kn(){var e=Ba([":@@document_documents\u241fa1bb53f9ee8b28dc4c8c56399fa402c7f6dc8e8a\u241f2034940825628059082:",":START_TAG_STRONG:",":ICU:",":CLOSE_TAG_STRONG:"]);return kn=function(){return e},e}function En(){var e=Ba([":\u241fd56dd237785fe26c05534deb2e0019379114a72d\u241f2697451003624139118:{VAR_PLURAL, plural, =1 {Document } other {Documents }}"]);return En=function(){return e},e}function An(){var e=Ba([":@@demandeur\u241f813d9f5f678727a57fa31af4050b4dca2a6b9190\u241f8306684293502208679:Demandeur"]);return An=function(){return e},e}function In(){var e=Ba([":@@emplacement\u241f248d330094718cb1ead6b04cc9857c50238f3c6e\u241f7292948510706319360:Emplacement"]);return In=function(){return e},e}function Tn(){var e=Ba([":x_jour_validity\u241fcf70fc58c6caa318c6da3b20efda5c121654c569\u241f1486574773473367477: ",":ICU: "]);return Tn=function(){return e},e}function On(){var e=Ba([":\u241fa435c1161981c52f0422f9b7aa922fad8141c41a\u241f1286528453012719646:{VAR_PLURAL, plural, =1 {1 jour} other {{INTERPOLATION} jours}}"]);return On=function(){return e},e}function Rn(){var e=Ba([":x_mois_validity\u241f2deae00d5cb3b15b34e93854c29975cd8c2e26d1\u241f8609863806435133923: ",":ICU: "]);return Rn=function(){return e},e}function Vn(){var e=Ba([":\u241f5995edbf4c35fa099262a34b49d6f2e7f14aa8f4\u241f5036829260818279467:{VAR_PLURAL, plural, =1 {1 mois} other {{INTERPOLATION} mois}}"]);return Vn=function(){return e},e}function Dn(){var e=Ba([":@@a_compter_date_emission\u241f2527e7f081669eb151acfbeed41561d03f96e74e\u241f2267275339922816453: \xe0 compter de la date d'\xe9mission "]);return Dn=function(){return e},e}function Nn(){var e=Ba([":@@delai_validite_permis\u241f58ac8d1110d6ce98db662ebb5ae5c5605fc97c74\u241f1952624370645987785:D\xe9lai de validit\xe9"]);return Nn=function(){return e},e}function Ln(){var e=Ba([":@@cout_du_permis\u241f8f0e1e0e67635927eeb19da6f3ea4132d726e4cd\u241f5036795245990193353:Co\xfbt"]);return Ln=function(){return e},e}function Fn(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return Fn=function(){return e},e}function Mn(){var e=Ba([":@@telephone\u241fc34e20a0eb6652aedd651c9cfe3fc0c26b6fdc6c\u241f6628356255817390419:T\xe9l\xe9phone"]);return Mn=function(){return e},e}function qn(){var e=Ba([":@@courriel\u241f3d1ca149ef3415a4dc6c6102c62db928b2cff6fc\u241f8268021232951468752:Courriel"]);return qn=function(){return e},e}function jn(){var e=Ba([":@@communication\u241f728e7a8967748f752ffae77f3bde489480a620ac\u241f6915429060840718325:Communication"]);return jn=function(){return e},e}function Bn(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return Bn=function(){return e},e}function zn(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return zn=function(){return e},e}function Un(){var e=Ba([":@@chargement_des_fichiers\u241fe2553d54d39c3b39ce6b69c3e417cb408e9ed180\u241f704293793153342789:Chargement des fichiers"]);return Un=function(){return e},e}function Hn(){var e=Ba([":@@veuillez_joindre_au_moins_x_documents\u241fdc7891a212b6e8a92c8207f9d9d2dbb77a28d00d\u241f4336384761110215973: Veuillez joindre au moins ",":ICU:. "]);return Hn=function(){return e},e}function Qn(){var e=Ba([":\u241f3d904e3e63781608109fd7d8c3c285d2be2dd6e2\u241f5940307459504827807:{VAR_PLURAL, plural, =1 {1 document} other {{INTERPOLATION} documents}}"]);return Qn=function(){return e},e}function Wn(){var e=Ba([":@@informations_complementaires\u241ff312db469126382e45a6fd27b1dc184dd8874475\u241f7893957009089960921:Informations compl\xe9mentaires"]);return Wn=function(){return e},e}function Gn(){var e=Ba([":@@retirer\u241f77f8baef86fbb86a6aab1b6e672e521dad0e9036\u241f9087963924191376133:Retirer"]);return Gn=function(){return e},e}function $n(){var e=Ba([":@@retirer\u241f77f8baef86fbb86a6aab1b6e672e521dad0e9036\u241f9087963924191376133:Retirer"]);return $n=function(){return e},e}function Jn(){var e=Ba([":@@limite_fichiers_atteinte\u241fef428886801c9e5da038a33c4c4e344ac7ad199d\u241f7939664899586229158:Limite de fichiers atteinte"]);return Jn=function(){return e},e}function Yn(){var e=Ba([":@@glissez_cliquez_pour_ajouter\u241fd7fbef9ba20c7e2eb3c8160d720819aae6d65e84\u241f6586303937643526439:Glissez ou cliquez pour ajouter des fichiers",":LINE_BREAK:",":START_SMALL_TEXT:(maximum ",":INTERPOLATION: fichier(s) - maximum ",":INTERPOLATION_1: Mo par fichier)",":CLOSE_SMALL_TEXT:"]);return Yn=function(){return e},e}function Kn(){var e=Ba([":@@aucun_document_ajoute\u241f3bdf8695d3cbcacd6beaf1f6aa283938fa236c98\u241f3002349388680117973:Aucun document n'a \xe9t\xe9 ajout\xe9 pour cette demande. "]);return Kn=function(){return e},e}function Zn(){var e=Ba([":@@ast_documents_obligatoires\u241fd0f8403b0abd38c2c99af431530892e57940adaf\u241f3036546584436183779: * Document obligatoire"]);return Zn=function(){return e},e}function Xn(){var e=Ba([":@@veuillez_joindre_documents_suivants\u241fb1ac2bfa0ff0b0000fc8d077ec91b82e4a2712e6\u241f9169244071913397664:Veuillez joindre les documents suivants \xe0 votre demande\xa0: "]);return Xn=function(){return e},e}function er(){var e=Ba([":@@documents\u241f9d51b3c90afda70700229d1b8a55371c13cb3bce\u241f4733307402565258070:Documents"]);return er=function(){return e},e}function tr(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return tr=function(){return e},e}function nr(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return nr=function(){return e},e}function rr(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return rr=function(){return e},e}function ir(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return ir=function(){return e},e}function or(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return or=function(){return e},e}function ar(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return ar=function(){return e},e}function sr(){var e=Ba([":@@err-code_postal_invalide\u241ffc474c1ecd64365ef0747892e93e87108ace7f1f\u241f8185618002052192419: Le code postal est invalide. "]);return sr=function(){return e},e}function lr(){var e=Ba([":@@err-aucune_arpenteur_geometre\u241f91d7ff97bc2587b0b8c4ebaf3342145d854b9a81\u241f5693751499833952093: Vous devez obligatoirement saisir un arpenteur-g\xe9om\xe8tre. "]);return lr=function(){return e},e}function ur(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return ur=function(){return e},e}function cr(){var e=Ba([":@@err-aucune_description_travaux\u241f55e6a03b72267ae03c99584cb5e9f889de03e5d8\u241f5521139049539609687: Vous devez obligatoirement saisir du texte. "]);return cr=function(){return e},e}function dr(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return dr=function(){return e},e}function hr(){var e=Ba([":@@telephone_secondaire\u241fa6c181bf1bc310572417ff87ab5ef1d72baca0d9\u241f7561695173611122878:T\xe9l\xe9phone secondaire"]);return hr=function(){return e},e}function pr(){var e=Ba([":@@telephone\u241fc34e20a0eb6652aedd651c9cfe3fc0c26b6fdc6c\u241f6628356255817390419:T\xe9l\xe9phone"]);return pr=function(){return e},e}function fr(){var e=Ba([":@@code_postal\u241ff61844fc6aac98f584eb5f115b7a9d210c18ce29\u241f4716513778549226272:Code postal"]);return fr=function(){return e},e}function mr(){var e=Ba([":@@adresse_arpenteur\u241fd8daa02ec96a076b42057f9d111f070fe2058c37\u241f5049616761140918465:Adresse de l'arpenteur"]);return mr=function(){return e},e}function gr(){var e=Ba([":@@arpenteur_geometre\u241f4d132c3a9178acba181f00d037a6dfc2d46d9fee\u241f3063761427670664825:Arpenteur-g\xe9om\xe8tre"]);return gr=function(){return e},e}function vr(){var e=Ba([":@@arpenteur_geometre\u241f4d132c3a9178acba181f00d037a6dfc2d46d9fee\u241f3063761427670664825:Arpenteur-g\xe9om\xe8tre"]);return vr=function(){return e},e}function yr(){var e=Ba([":@@description_operation_cadastral_PL\u241f8d9bc8f1f6e8e15c0ed4046758bde0a4dc2df105\u241f5106155194467315681:Description de l'op\xe9ration cadastrale"]);return yr=function(){return e},e}function br(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return br=function(){return e},e}function _r(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return _r=function(){return e},e}function wr(){var e=Ba([":@@err-aucune_description_travaux\u241f55e6a03b72267ae03c99584cb5e9f889de03e5d8\u241f5521139049539609687: Vous devez obligatoirement saisir du texte. "]);return wr=function(){return e},e}function Cr(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return Cr=function(){return e},e}function xr(){var e=Ba([":@@description_reasons_UR\u241fd0337e99f58b8b40eb8992e17a823ff60c0103cd\u241f8038851575818772854:Expliquer ce qui justifie de faire votre demande. Quels sont les pr\xe9judices?"]);return xr=function(){return e},e}function Sr(){var e=Ba([":@@reasons\u241fd86b45bdb56c2d2ed6f1f3fdbe6ee57c6d832c21\u241f4411711948849314627:Raisons"]);return Sr=function(){return e},e}function Pr(){var e=Ba([":@@description_nature_UR\u241f544925f395f3969cf850a56d13fdbf6f2bb3ba86\u241f7097482664330857586:D\xe9crire le but vis\xe9 ou les changements souhait\xe9s."]);return Pr=function(){return e},e}function kr(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return kr=function(){return e},e}function Er(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return Er=function(){return e},e}function Ar(){var e=Ba([":@@err-neq_invalide\u241fe50d63a3f71601b4a84d4764c9a601b4a94cd692\u241f6558607472014409273: Le NEQ est invalide. "]);return Ar=function(){return e},e}function Ir(){var e=Ba([":@@err-licence_rbq_invalide\u241f78f0f024456618e1fd8f6f5e062c8dc59d52dd70\u241f8447708180755139595: Le n",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: de licence RBQ est invalide. "]);return Ir=function(){return e},e}function Tr(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return Tr=function(){return e},e}function Or(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return Or=function(){return e},e}function Rr(){var e=Ba([":@@err-code_postal_invalide\u241ffc474c1ecd64365ef0747892e93e87108ace7f1f\u241f8185618002052192419: Le code postal est invalide. "]);return Rr=function(){return e},e}function Vr(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return Vr=function(){return e},e}function Dr(){var e=Ba([":@@no_entreprise_qc_neq\u241fd0bd23fa10f01df964022bbfc1eca32b829084be\u241f5953666000196643916: N",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: d'entreprise (NEQ)"]);return Dr=function(){return e},e}function Nr(){var e=Ba([":@@no_licence_rbq\u241f6ce19a0e4ee0dbf3230a561c36fac64ca69515c1\u241f5827291324375115160:N",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: de licence RBQ"]);return Nr=function(){return e},e}function Lr(){var e=Ba([":@@courriel\u241f3d1ca149ef3415a4dc6c6102c62db928b2cff6fc\u241f8268021232951468752:Courriel"]);return Lr=function(){return e},e}function Fr(){var e=Ba([":@@telephone\u241fc34e20a0eb6652aedd651c9cfe3fc0c26b6fdc6c\u241f6628356255817390419:T\xe9l\xe9phone"]);return Fr=function(){return e},e}function Mr(){var e=Ba([":@@code_postal\u241ff61844fc6aac98f584eb5f115b7a9d210c18ce29\u241f4716513778549226272:Code postal"]);return Mr=function(){return e},e}function qr(){var e=Ba([":@@adresse_executant\u241f9766ffdfd3db21aba4242b18d650f622b2ad3a85\u241f1591921791811070975:Adresse de l'ex\xe9cutant"]);return qr=function(){return e},e}function jr(){var e=Ba([":@@executant_des_travaux\u241f7372780db73a45da51f452d734f4d49ab4283ce8\u241f2084767807603783024:Ex\xe9cutant des travaux"]);return jr=function(){return e},e}function Br(){var e=Ba([":@@non\u241fe8e109583d3a554a74c22d7b86dd06ff58249fe8\u241f4709450557795328287:Non"]);return Br=function(){return e},e}function zr(){var e=Ba([":@@oui\u241f26d4a0b6084f51ee40e224fe3b51b1cfde8f121e\u241f7180575964287205441:Oui"]);return zr=function(){return e},e}function Ur(){var e=Ba([":@@executant_est_il_entrepreneur\u241f3e795dd137e403e437e790b28c34b637f0b0469f\u241f9103781291232733109: L'ex\xe9cutant des travaux est-il un entrepreneur licenci\xe9?"]);return Ur=function(){return e},e}function Hr(){var e=Ba([":@@executant_des_travaux\u241f7372780db73a45da51f452d734f4d49ab4283ce8\u241f2084767807603783024:Ex\xe9cutant des travaux"]);return Hr=function(){return e},e}function Qr(){var e=Ba([":@@err-aucune_valeur_travaux\u241ffcad38a2cea33b8f6d8c852926553db380fe0674\u241f4720921044185099866: Veuillez saisir la valeur des travaux. "]);return Qr=function(){return e},e}function Wr(){var e=Ba([":@@ne_pas_saisir_cents\u241f3d163f99d609294d40905881b1a5de0129237c10\u241f2999117682207101434: Ne pas saisir les cents "]);return Wr=function(){return e},e}function Gr(){var e=Ba([":@@valeur\u241f682c6738dc138ad385790cf462130300117061c1\u241f3717603792840045364:Valeur"]);return Gr=function(){return e},e}function $r(){var e=Ba([":@@err-date_fin_delai_maximal\u241f0aa05a55b5b479fe1ad19e0562693b5d8b27d3fa\u241f5153389903235724906: Le d\xe9lai maximum est de ",":ICU: "]);return $r=function(){return e},e}function Jr(){var e=Ba([":\u241f685898b9c08bfbe86032142044780a6b6ade452d\u241f1225797178923144819:{VAR_PLURAL, plural, =1 {1 jour cons\xe9cutif.} other {{INTERPOLATION} jours cons\xe9cutifs.}}"]);return Jr=function(){return e},e}function Yr(){var e=Ba([":@@err-date_fin_inferieure\u241f43be9246f00cfdcc25af0b99ba484006c0036ccb\u241f100619095890545625: La date de fin doit \xeatre sup\xe9rieure ou \xe9gale \xe0 la date de d\xe9but des travaux. "]);return Yr=function(){return e},e}function Kr(){var e=Ba([":@@err-date_fin_travaux_obligatoire\u241f48331e1d8ff0d8bbf7cea0394d0e4e58105f7ce9\u241f6201989641254191912: Veuillez saisir une date de fin des travaux. "]);return Kr=function(){return e},e}function Zr(){var e=Ba([":@@date_prevue_de_fin\u241fc8228f59d0dbdce676aaac96f146f1b86ab36253\u241f4608479117650972052:Date de fin pr\xe9vue"]);return Zr=function(){return e},e}function Xr(){var e=Ba([":@@err-choisir_date_debut_travaux\u241f788e61cd8ef932dedc26622fb9d5ae6f8b2be8fd\u241f6771849187397054188: Veuillez choisir une date. "]);return Xr=function(){return e},e}function ei(){var e=Ba([":@@err-aucune_description_travaux\u241f55e6a03b72267ae03c99584cb5e9f889de03e5d8\u241f5521139049539609687: Vous devez obligatoirement saisir du texte. "]);return ei=function(){return e},e}function ti(){var e=Ba([":@@travaux\u241f66d38c4020a0e8edb78312ca0ea5f9df10fd6dbe\u241f325658905128013696:Travaux"]);return ti=function(){return e},e}function ni(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return ni=function(){return e},e}function ri(){var e=Ba([":@@enregistrer_pour_plus_tard\u241f56a9b84b08a2086a2905151ac4bcaaaa5a292393\u241f4460249800213743616:Enregistrer pour plus tard"]);return ri=function(){return e},e}function ii(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return ii=function(){return e},e}function oi(){var e=Ba([":@@err-telephone_invalide\u241f6cb8f58be3f5693d587ec2e9e3d1014672594d8c\u241f2304925022797156845: Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide. "]);return oi=function(){return e},e}function ai(){var e=Ba([":@@err-aucun_telephone_demandeur\u241f2cbc48109294abd55fc586751b1621ff188bad57\u241f8557212516753563991: Veuillez entrer le num\xe9ro de t\xe9l\xe9phone du demandeur. "]);return ai=function(){return e},e}function si(){var e=Ba([":@@err-courriels_ne_correspondent_pas\u241f300e1c012aeeb0b51915a498603562b3fcff522e\u241f6916507521208498508: Les adresses courriel ne correspondent pas. "]);return si=function(){return e},e}function li(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return li=function(){return e},e}function ui(){var e=Ba([":@@err-aucun_courriel_demandeur\u241f98a3299efc5c97a349e8576363781b2b8558c2cc\u241f288000383551311940: Veuillez entrer le courriel du demandeur. "]);return ui=function(){return e},e}function ci(){var e=Ba([":@@err-courriel_invalide\u241f0062ac322befa9b50344ee61cdd5b5bf843754b0\u241f900133254369663487: Veuillez entrer une adresse courriel valide. "]);return ci=function(){return e},e}function di(){var e=Ba([":@@err-aucun_courriel_demandeur\u241f98a3299efc5c97a349e8576363781b2b8558c2cc\u241f288000383551311940: Veuillez entrer le courriel du demandeur. "]);return di=function(){return e},e}function hi(){var e=Ba([":@@err-code_postal_invalide\u241ff213a212b2e2f89fbbc12af4638ff440ad878bac\u241f397472714257974567: Veuillez entrer un code postal valide. "]);return hi=function(){return e},e}function pi(){var e=Ba([":@@err-aucun_code_postal_demandeur\u241f30297a28d6d6b1a79e87eb5640d9a5a14bbc9c10\u241f728776811504324300: Veuillez entrer le code postal du demandeur. "]);return pi=function(){return e},e}function fi(){var e=Ba([":@@err-aucune_adresse_demandeur\u241fb89409c93dd9672fd1fd9e1fd80051ceef0f3369\u241f4325975143928425501: Veuillez entrer l'adresse du demandeur. "]);return fi=function(){return e},e}function mi(){var e=Ba([":@@err-aucun_prenom_demandeur\u241fbf8189e43f3eda0dfc286559148d3dfc98dcb0ce\u241f3705922350402240860: Veuillez entrer le pr\xe9nom du demandeur. "]);return mi=function(){return e},e}function gi(){var e=Ba([":@@prenom\u241fbe2bc63e2cd1274d4e43b10423d6b8f6cd829584\u241f8203024106711668685:Pr\xe9nom"]);return gi=function(){return e},e}function vi(){var e=Ba([":@@err-aucun_nom_demandeur\u241ff1091cb52c0b6554739f0c1d429b2b051f004e7e\u241f5400751685968260901: Veuillez entrer le nom du demandeur. "]);return vi=function(){return e},e}function yi(){var e=Ba([":@@nom-entreprise\u241fa887dfec8e36e060bf652a60e53a2243b1a98b36\u241f3943794501363843346: Nom d'entreprise"]);return yi=function(){return e},e}function bi(){var e=Ba([":@@nom\u241fa60e1d483b4172a50beadd6889195ab7e4405b6d\u241f5624320088169402344: Nom"]);return bi=function(){return e},e}function _i(){var e=Ba([":@@assurer_infos_correctes\u241fde07160c5c36b0cc8c78bf729a32ac828c572441\u241f5664494001029668779: Veuillez vous assurer que les informations sont correctes, puis compl\xe9tez les informations manquantes. "]);return _i=function(){return e},e}function wi(){var e=Ba([":@@non_modifier\u241fbdea94392305d0d0cd030ece85bd3fa379c61e4d\u241f807702297639796840:Non, modifier"]);return wi=function(){return e},e}function Ci(){var e=Ba([":@@oui_continuer\u241f633e146412ec4d8c258ae38fe29e68eedba5346c\u241f4950833406652403117:Oui, continuer"]);return Ci=function(){return e},e}function xi(){var e=Ba([":@@aide_demandeur\u241fe34c3ef6f9632aaf42606912acc89f56c9f8c6ea\u241f702704530399623582: Le demandeur sera le contact de pr\xe9f\xe9rence pour cette demande. "]);return xi=function(){return e},e}function Si(){var e=Ba([":@@proprietaire_est_il_demandeur\u241fd3a849493d048b040a6e4c44849de633df5838ac\u241f8942941037667807942: Ce propri\xe9taire est-il \xe9galement le ",":START_TAG_STRONG:demandeur",":CLOSE_TAG_STRONG:? "]);return Si=function(){return e},e}function Pi(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return Pi=function(){return e},e}function ki(){var e=Ba([":@@telephone\u241fc34e20a0eb6652aedd651c9cfe3fc0c26b6fdc6c\u241f6628356255817390419:T\xe9l\xe9phone"]);return ki=function(){return e},e}function Ei(){var e=Ba([":@@confirmation_courriel\u241f1a3a7141449e80e641e72a51381d7b7cbc6e69c9\u241f1183085422743671184: Confirmation du courriel"]);return Ei=function(){return e},e}function Ai(){var e=Ba([":@@courriel\u241f3d1ca149ef3415a4dc6c6102c62db928b2cff6fc\u241f8268021232951468752:Courriel"]);return Ai=function(){return e},e}function Ii(){var e=Ba([":@@code_postal\u241ff61844fc6aac98f584eb5f115b7a9d210c18ce29\u241f4716513778549226272:Code postal"]);return Ii=function(){return e},e}function Ti(){var e=Ba([":@@adresse\u241f71134e1f8e386768460814d4d54b826ea9e1790a\u241f1815195286714301387:Adresse"]);return Ti=function(){return e},e}function Oi(){var e=Ba([":@@entreprise\u241fdae3ed4fbe0a7cb40ba8b345edce7c294fa06e25\u241f7209503596777460834: Entreprise"]);return Oi=function(){return e},e}function Ri(){var e=Ba([":@@particulier\u241fbbec76c40ebb2c378fcbe2d8f3035a20fccf7fc8\u241f9115055065292143717: Particulier"]);return Ri=function(){return e},e}function Vi(){var e=Ba([":@@type_demandeur\u241ff10adb0f55d0612e11800482f35af44ddd2210e0\u241f7456183291870572640:Type de demandeur"]);return Vi=function(){return e},e}function Di(){var e=Ba([":@@demandeur\u241f813d9f5f678727a57fa31af4050b4dca2a6b9190\u241f8306684293502208679:Demandeur"]);return Di=function(){return e},e}function Ni(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return Ni=function(){return e},e}function Li(){var e=Ba([":@@err-code_postal_invalide\u241ffc474c1ecd64365ef0747892e93e87108ace7f1f\u241f8185618002052192419: Le code postal est invalide. "]);return Li=function(){return e},e}function Fi(){var e=Ba([":@@err-aucun_code_postal\u241fc4fa01f38138754bea3d7c0cdff6d6d02c19923f\u241f7033995984852221541: Veuillez entrer un code postal. "]);return Fi=function(){return e},e}function Mi(){var e=Ba([":@@err-aucune_adresse\u241f674134c3cc58e1a2a1af2e77272398f2bc6b6e6b\u241f5604888754106362525: Veuillez entrer une adresse. "]);return Mi=function(){return e},e}function qi(){var e=Ba([":@@gen-annuler\u241f12380235948088ddf227ad226ce8a2ae63878fe5\u241f1711750570766225138:Annuler"]);return qi=function(){return e},e}function ji(){var e=Ba([":@@gen-modifier\u241f0bb048f1cd5de73db9ef1d3e0c7baf8668de4749\u241f2333000199634096810: Modifier "]);return ji=function(){return e},e}function Bi(){var e=Ba([":@@err-aucun_propri\xe9taire\u241f6278ad9091176e37041f4dfd33c4eea87be296ef\u241f558476091376125653: Veuillez entrer un propri\xe9taire. "]);return Bi=function(){return e},e}function zi(){var e=Ba([":@@code_postal\u241ff61844fc6aac98f584eb5f115b7a9d210c18ce29\u241f4716513778549226272:Code postal"]);return zi=function(){return e},e}function Ui(){var e=Ba([":@@adresse\u241f71134e1f8e386768460814d4d54b826ea9e1790a\u241f1815195286714301387:Adresse"]);return Ui=function(){return e},e}function Hi(){var e=Ba([":@@proprietaire\u241fb291dca70326ce1c5e1335962f655348e175e684\u241f3639261595344831811:Propri\xe9taire"]);return Hi=function(){return e},e}function Qi(){var e=Ba([":@@proprietaire\u241fb291dca70326ce1c5e1335962f655348e175e684\u241f3639261595344831811:Propri\xe9taire"]);return Qi=function(){return e},e}function Wi(){var e=Ba([":@@demandes-continue-with-address\u241f15c1eab92d47d455155f76ea74f6e706adbb5535\u241f3330961990077242156:Poursuivre en ajoutant une adresse"]);return Wi=function(){return e},e}function Gi(){var e=Ba([":@@demandes-continue-with-address-any-way\u241f6e54453e6571bde9f8954739dce8d621a5ee190b\u241f6711877805437910964:Poursuivre quand m\xeame en ajoutant une adresse"]);return Gi=function(){return e},e}function $i(){var e=Ba([":@@demandes-property-not-found\u241fe9c50a7b84eb6d1db0e3df8dbbc4bd9eea6eea50\u241f6221187841562988222:La propri\xe9t\xe9 recherch\xe9e n'a pas \xe9t\xe9 trouv\xe9e \xe0 notre r\xf4le d'\xe9valuation."]);return $i=function(){return e},e}function Ji(){var e=Ba([":@@gen-commencez_a_taper\u241ff6d17cac0b1a6945b191aeae7a8e0508d11581b3\u241f2285717752378816897:Commencez \xe0 taper\u2026"]);return Ji=function(){return e},e}function Yi(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return Yi=function(){return e},e}function Ki(){var e=Ba([":@@gen-numero_de_lot\u241ffd2467e015f8736b6eb9fbaa5e2e0f5a3b8abee5\u241f251491035014236129:Num\xe9ro de lot"]);return Ki=function(){return e},e}function Zi(){var e=Ba([":@@demandes-cant-find-property\u241ff26bc2f9f265ea0eb179714abf6905d0888ccb96\u241f5063780801626450086:Je ne trouve pas ma propri\xe9t\xe9 "]);return Zi=function(){return e},e}function Xi(){var e=Ba([":@@gen-commencez_a_taper\u241ff6d17cac0b1a6945b191aeae7a8e0508d11581b3\u241f2285717752378816897:Commencez \xe0 taper\u2026"]);return Xi=function(){return e},e}function eo(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return eo=function(){return e},e}function to(){var e=Ba([":@@gen-matricule\u241f25300c88ae5170f9cc37e559808b4c9644c5480b\u241f5728733297058862219:Matricule"]);return to=function(){return e},e}function no(){var e=Ba([":@@err-voie_publique\u241f4e4441403c47b6c543b9f83f80cc76b5b7738fab\u241f4062742483743193836: Veuillez selectionner une voie dans la liste sugg\xe9r\xe9e. "]);return no=function(){return e},e}function ro(){var e=Ba([":@@gen-commencez_a_taper\u241ff6d17cac0b1a6945b191aeae7a8e0508d11581b3\u241f2285717752378816897:Commencez \xe0 taper\u2026"]);return ro=function(){return e},e}function io(){var e=Ba([":@@gen-chargement-ellipsis\u241f836cd11a927efd40052b5415f5b66406b94ab659\u241f6081697647486005114:Chargement\u2026"]);return io=function(){return e},e}function oo(){var e=Ba([":@@err-no_civique\u241f5125998fb78ae9eaba4cc622e3c8d21ec9ac16f6\u241f3243419024922874395: Veuillez saisir un n",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: civique. "]);return oo=function(){return e},e}function ao(){var e=Ba([":@@rue_av_ch_rte_etc\u241f5c4c753ff0e4a3c77bcab4625c275ad4d7d18f70\u241f4537247375989837628: Rue, avenue, boulevard, chemin, route, etc. "]);return ao=function(){return e},e}function so(){var e=Ba([":@@gen-voie_publique\u241fc307a85960f357442790dd9ca6bf8f806cf79ac5\u241f7687036597322971973:Voie publique"]);return so=function(){return e},e}function lo(){var e=Ba([":@@gen-app_local\u241f14b39f7a154d33b09b21b2008948a38bf11c7b93\u241f8040132387261040999:App. ou local"]);return lo=function(){return e},e}function uo(){var e=Ba([":@@gen-suffixe\u241fe7cb92bfd2a2132f8899d3a7167df046b7d33002\u241f1858167856442129653:Suffixe"]);return uo=function(){return e},e}function co(){var e=Ba([":@@gen-no_civique\u241fa287161b88be1bc03d45ed1eb5d737ff1b401669\u241f8280715317216312033:N",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: civique"]);return co=function(){return e},e}function ho(){var e=Ba([":@@gen-no_de_lot\u241fb7c6b49861514773ec5256bdd479029c76439963\u241f8879759001940821928:N",":START_SUPERSCRIPT:o",":CLOSE_SUPERSCRIPT: de lot"]);return ho=function(){return e},e}function po(){var e=Ba([":@@gen-matricule-short\u241f8c0a787503ef060f40ec65c91f0f1b0bb5fc37f1\u241f3980627315187994264:Matricule",":START_SUPERSCRIPT:",":CLOSE_SUPERSCRIPT:"]);return po=function(){return e},e}function fo(){var e=Ba([":@@gen-adresse\u241f71134e1f8e386768460814d4d54b826ea9e1790a\u241f1815195286714301387:Adresse"]);return fo=function(){return e},e}function mo(){var e=Ba([":@@rechercher_par\u241f53aa14ae05d907f4d0c2e7105986dcb37f6cd66e\u241f3207254148219127109:Rechercher par"]);return mo=function(){return e},e}function go(){var e=Ba([":@@champs_obligatoires\u241feaa5610187e6b62ee1700cf1fbabe500a622bb6f\u241f4511933382056009677:* Champs obligatoires"]);return go=function(){return e},e}function vo(){var e=Ba([":@@emplacement\u241f248d330094718cb1ead6b04cc9857c50238f3c6e\u241f7292948510706319360:Emplacement"]);return vo=function(){return e},e}function yo(){var e=Ba([":@@schemas\u241f0f2ce3f4fc7eeb0ebdb0692e952c9a9449b878ce\u241f749794875285930252:Sch\xe9mas de la r\xe9glementation"]);return yo=function(){return e},e}function bo(){var e=Ba([":@@ast_documents_obligatoires\u241f6b40db2707aa3213aa60afd61350396035938354\u241f4955559124072130067: * Document obligatoire "]);return bo=function(){return e},e}function _o(){var e=Ba([":@@doc-requis\u241f9cbab6c58f41866232a7b38143519a73ce3ceb20\u241f7538696438364511257:Documents requis"]);return _o=function(){return e},e}function wo(){var e=Ba([":@@consulter-normes\u241f2d75798d35fac15c9f995ac46ceb16243c7da57a\u241f4941516254138706600:Consulter les normes"]);return wo=function(){return e},e}function Co(){var e=Ba([":@@reglementation\u241f21916285be85c66896451d92699d8ae64049a9e9\u241f1588584100204802257: R\xe9glementation "]);return Co=function(){return e},e}function xo(){var e=Ba([":@@delai-detail\u241fca6bda7154e61927560ecaa32bc64c3be4b9c5b7\u241f8123832385988654424:",":START_TAG_SPAN:Le d\xe9lai de traitement de ce type de permis est de ",":ICU: ",":CLOSE_TAG_SPAN:"]);return xo=function(){return e},e}function So(){var e=Ba([":\u241f65102fb17cf6da24496e37b2f7fea098222bd51e\u241f6596202199666685804:{VAR_PLURAL, plural, =1 {1 jour.} other {{INTERPOLATION} jours.}}"]);return So=function(){return e},e}function Po(){var e=Ba([":@@delai\u241fd60f73a86bc7671a6f8a7142435427aad1d1b113\u241f825951322326176543: D\xe9lai "]);return Po=function(){return e},e}function ko(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return ko=function(){return e},e}function Eo(){var e=Ba([":@@lire_la_suite\u241fd7773ff0e9b9d8fb705eceb37bbf3430f1c06023\u241f7705196657634977334:Lire la suite"]);return Eo=function(){return e},e}function Ao(){var e=Ba([":@@montant-frais-etude\u241facfd761eb40775e20afc09e7883185746b15d8df\u241f92519210247555602:Frais pour l'\xe9tude de la demande "]);return Ao=function(){return e},e}function Io(){var e=Ba([":@@montant-variable\u241f606123e7893d451f4d66f264b8e0fe63e7daa3ce\u241f1244729219194763896:Montant variable "]);return Io=function(){return e},e}function To(){var e=Ba([":@@gratuit\u241f21619dec2105f2be244ce4d92c5852dde7a79b75\u241f3583190022849186425: Gratuit"]);return To=function(){return e},e}function Oo(){var e=Ba([":@@continuer\u241f237e4de631cdfe28439048304429a6549e0f10b0\u241f4207918560099388002:Continuer"]);return Oo=function(){return e},e}function Ro(){var e=Ba([":@@service-responsable\u241f89c761e3a737077e6b228055d7a0621db05be329\u241f5370453473325508084: Service responsable de la requ\xeate "]);return Ro=function(){return e},e}function Vo(){var e=Ba([":@@err-aucun_item_filtre\u241f15947b2f29e574cf5eeaeff2ff337a0517ab1355\u241f1878503776039979698:Aucun item ne correspond au filtre."]);return Vo=function(){return e},e}function Do(){var e=Ba([":@@all-services\u241f5d506a435ba869b1800b7bfe11a9bc7af520645b\u241f3563992613021805758:Tous les services"]);return Do=function(){return e},e}function No(){var e=Ba([":@@recherche-mot-cles\u241f49f53efdd22fbccaa41c635c080f2ef37ebebda8\u241f7354446670723354384:Rechercher par mots cl\xe9s"]);return No=function(){return e},e}function Lo(){var e=Ba([":@@msg-explication-filtre-QS\u241fb6bd76fdb1dc8abc59a847ca82ea7f1677fae740\u241f8408484291899303946: Vous avez la possibilit\xe9 de faire une recherche par mots cl\xe9s ou utiliser les filtres des services pour trouver plus rapidement vos natures. "]);return Lo=function(){return e},e}function Fo(){var e=Ba([":@@choisir-type-demande\u241f0df892fa4e457268fb1ffef0403948a56d3d7a1c\u241f650489228576069518:Veuillez choisir le type de demande d\xe9sir\xe9."]);return Fo=function(){return e},e}function Mo(){var e=Ba([":@@err-aucun_item\u241fc0d65c0255e6387438cabafe436fcb8c12294693\u241f2543926101693039233:Aucun item n'est disponible pour le moment."]);return Mo=function(){return e},e}function qo(){var e=Ba([":@@suivre_une_autre_demande\u241f076c796493abe2dcd28315897b2aa426034cb7b3\u241f2371384411648506166:Suivre une autre demande"]);return qo=function(){return e},e}function jo(){var e=Ba([":@@description\u241feec715de352a6b114713b30b640d319fa78207a0\u241f4902817035128594900:Description"]);return jo=function(){return e},e}function Bo(){var e=Ba([":@@masquer_les_coordonnees\u241f1f2294b359798f413bb246056771c1b35c46c8bb\u241f3538422770943038769:Masquer les coordonn\xe9es"]);return Bo=function(){return e},e}function zo(){var e=Ba([":@@voir_les_coordonnees\u241f616d36394bd08af2266ebfd42c7ad88226d8aea8\u241f2878452578815372001:Voir les coordonn\xe9es"]);return zo=function(){return e},e}function Uo(){var e=Ba([":@@masquer_historique_detaille\u241f4de8ad92f534c1c7db63fe542bee4bd5058c7dd4\u241f2101273183152879254:Masquer l'historique d\xe9taill\xe9"]);return Uo=function(){return e},e}function Ho(){var e=Ba([":@@voir_historique_detaille\u241f8c2f1b5b2cb078fa9874aee7667ad484443a8f2a\u241f8145916471373365081:Voir l'historique d\xe9taill\xe9"]);return Ho=function(){return e},e}function Qo(){var e=Ba([":@@emplacement\u241f248d330094718cb1ead6b04cc9857c50238f3c6e\u241f7292948510706319360:Emplacement"]);return Qo=function(){return e},e}function Wo(){var e=Ba([":@@demandeur\u241f813d9f5f678727a57fa31af4050b4dca2a6b9190\u241f8306684293502208679:Demandeur"]);return Wo=function(){return e},e}function Go(){var e=Ba([":@@modifier_demande_initiale\u241fd64288f568cdd14aaa5cbcb64fdc58a214e4e48c\u241f7782646618035098574:Modifier la demande initiale"]);return Go=function(){return e},e}function $o(){var e=Ba([":@@consulter_demande_initiale\u241f5a5a53f3e6e6c5efcb7df76852f3d7742a8acd3f\u241f5887692523128556366:Consulter la demande initiale"]);return $o=function(){return e},e}function Jo(){var e=Ba([":@@nature-2points\u241f4069542b1d90a5ae227df61c58d78338502c69dc\u241f3220192483829477987:Nature\xa0:"]);return Jo=function(){return e},e}function Yo(){var e=Ba([":@@demande\u241ffbeaecc9165b39778fac9a90cc2160876f0f42b3\u241f2322316107967399165:Demande"]);return Yo=function(){return e},e}function Ko(){var e=Ba([":@@masquer_les_coordonnees\u241f1f2294b359798f413bb246056771c1b35c46c8bb\u241f3538422770943038769:Masquer les coordonn\xe9es"]);return Ko=function(){return e},e}function Zo(){var e=Ba([":@@voir_les_coordonnees\u241f616d36394bd08af2266ebfd42c7ad88226d8aea8\u241f2878452578815372001:Voir les coordonn\xe9es"]);return Zo=function(){return e},e}function Xo(){var e=Ba([":@@total_invoice_bypass_max_allowed_online\u241f8d3cb16d66498977221d4a99b8622e329af2f5b9\u241f5823219939241321645:Montant maximum atteint pour le paiement en ligne. Doit \xeatre pay\xe9 au comptoir. "]);return Xo=function(){return e},e}function ea(){var e=Ba([":@@payer_en_ligne\u241f642974a52fa8223094f5ec198360b779e36a3548\u241f9036427348372376493:Payer en ligne"]);return ea=function(){return e},e}function ta(){var e=Ba([":@@non_payable_en_ligne\u241fd1f87923978443aa2a50e47d8453996704794fac\u241f1201813599385517524:* Non payable en ligne"]);return ta=function(){return e},e}function na(){var e=Ba([":@@erreur_lors_du_telechargement\u241f93f0f86f7adfc88efd88d6ea701c44762838eda6\u241f729618124509672951:Erreur lors du t\xe9l\xe9chargement"]);return na=function(){return e},e}function ra(){var e=Ba([":@@telecharger\u241f3a5d97ac5f7d5e07b558bc022abe536554a2e9a9\u241f849872790737433504:T\xe9l\xe9charger\u2026 "]);return ra=function(){return e},e}function ia(){var e=Ba([":@@telecharger\u241f4a57eaca9a982c80b653fb19649f2a99f50a600c\u241f1618094588743700891:T\xe9l\xe9charger"]);return ia=function(){return e},e}function oa(){var e=Ba([":@@paye\u241f7af5ce51e266e94d082b3828ad2bbbe660b04480\u241f7167206433671373229:Pay\xe9"]);return oa=function(){return e},e}function aa(){var e=Ba([":@@montant\u241f9bf76ef012909b8620e807d014554d3bb97c4824\u241f4373029104911386311:Montant"]);return aa=function(){return e},e}function sa(){var e=Ba([":@@factures\u241f9f09d012ea0b243eedfb9d9013b801f7e45cfb64\u241f1225559612980635630:Factures"]);return sa=function(){return e},e}function la(){var e=Ba([":@@masquer_historique_detaille\u241f4de8ad92f534c1c7db63fe542bee4bd5058c7dd4\u241f2101273183152879254:Masquer l'historique d\xe9taill\xe9"]);return la=function(){return e},e}function ua(){var e=Ba([":@@voir_historique_detaille\u241f8c2f1b5b2cb078fa9874aee7667ad484443a8f2a\u241f8145916471373365081:Voir l'historique d\xe9taill\xe9"]);return ua=function(){return e},e}function ca(){var e=Ba([":@@documents_a_telecharger\u241f38981b6c903c8bf0f24b752adaa4605bd7ed0f80\u241f8477378277295016842:DOCUMENTS \xc0 T\xc9L\xc9CHARGER "]);return ca=function(){return e},e}function da(){var e=Ba([":@@gen-nouveau-abrev\u241faee24ecdebdace141b39819a7034cd1a2d2cfb55\u241f4019422797206036470:Nouveau"]);return da=function(){return e},e}function ha(){var e=Ba([":@@emplacement\u241f248d330094718cb1ead6b04cc9857c50238f3c6e\u241f7292948510706319360:Emplacement"]);return ha=function(){return e},e}function pa(){var e=Ba([":@@demandeur\u241f813d9f5f678727a57fa31af4050b4dca2a6b9190\u241f8306684293502208679:Demandeur"]);return pa=function(){return e},e}function fa(){var e=Ba([":@@modifier_demande_initiale\u241fd64288f568cdd14aaa5cbcb64fdc58a214e4e48c\u241f7782646618035098574:Modifier la demande initiale"]);return fa=function(){return e},e}function ma(){var e=Ba([":@@consulter_demande_initiale\u241f5a5a53f3e6e6c5efcb7df76852f3d7742a8acd3f\u241f5887692523128556366:Consulter la demande initiale"]);return ma=function(){return e},e}function ga(){var e=Ba([":@@type-2points\u241f66d9cbdb57eb38e5c373900db03cb97ab76a53e0\u241f283278599373275985:Type\xa0:"]);return ga=function(){return e},e}function va(){var e=Ba([":@@demande\u241ffbeaecc9165b39778fac9a90cc2160876f0f42b3\u241f2322316107967399165:Demande"]);return va=function(){return e},e}function ya(){var e=Ba([":@@echec-du-paiement-description\u241f6ee9ba00d583c9210ecc7648f1d2179d7dcf5ba7\u241f3090902119533369280: Veuillez vous assurer que vos informations de paiement soient correctes, puis r\xe9essayez."]);return ya=function(){return e},e}function ba(){var e=Ba([":@@echec-du-paiement\u241fc0631ef2df3520de8e66f8cd8f8be122ee5558a3\u241f7099928471872762029:\xc9chec du paiement"]);return ba=function(){return e},e}function _a(){var e=Ba([":@@fermer\u241f1a7391c494239efe2ad440cff51f17e9a03bc6b0\u241f9059155436017318544:Fermer"]);return _a=function(){return e},e}function wa(){var e=Ba([":@@charge_nom\u241f906c49aaf1197e14c4e3eeb014f43040b9746269\u241f4101069452963700416:Cette charge appara\xeetra sur votre relev\xe9 de compte de cr\xe9dit sous le nom"]);return wa=function(){return e},e}function Ca(){var e=Ba([":@@paiement_confirmation\u241f6d1cb6f2cd1d08870ba678a95ae7362b1fc98aee\u241f820187130694733474:Num\xe9ro de confirmation"]);return Ca=function(){return e},e}function xa(){var e=Ba([":@@paiement_accepte\u241f91aa59216e924d0ca0180a5434caf78b1b50cace\u241f3858904261483628485:Paiement accept\xe9"]);return xa=function(){return e},e}function Sa(){var e=Ba([":@@fermer\u241f1a7391c494239efe2ad440cff51f17e9a03bc6b0\u241f9059155436017318544:Fermer"]);return Sa=function(){return e},e}function Pa(){var e=Ba([":@@gen-nouveau-abrev\u241faee24ecdebdace141b39819a7034cd1a2d2cfb55\u241f4019422797206036470:Nouveau"]);return Pa=function(){return e},e}function ka(){var e=Ba([":@@gen-cliquer-lien-telechargement\u241fe269c9b9a19660f5f3fa0d2cf4965c7d1be82a5a\u241f1131535813047820594:Cliquer sur chaque lien pour t\xe9l\xe9charger le fichier."]);return ka=function(){return e},e}function Ea(){var e=Ba([":@@err-aucune_demande_trouvee\u241f882c752f397693e0252a4825a610664e26c1f346\u241f5168012174412875128: Aucune demande n'a \xe9t\xe9 trouv\xe9e avec ces informations. Veuillez vous assurer que celles-ci soient correctes. "]);return Ea=function(){return e},e}function Aa(){var e=Ba([":@@err-nom_entreprise\u241f69d306de6f6572621f8f6292f3f16f43b19e029d\u241f5373723036588105757: Veuillez saisir un nom d'entreprise. "]);return Aa=function(){return e},e}function Ia(){var e=Ba([":@@err-nom_famille\u241f4d844a6e2f85f776acf9e056b6a6efeac50f98b1\u241f6935009092434086018: Veuillez saisir un nom de famille. "]);return Ia=function(){return e},e}function Ta(){var e=Ba([":@@err-no_suivi\u241f6de1f60703dd442cac27902454032f4e2087b530\u241f7047194021810955720: Veuillez saisir un num\xe9ro de suivi. "]);return Ta=function(){return e},e}function Oa(){var e=Ba([":@@suivi_dune_demande\u241f12d5d16aeb6f5713f31fe5a6f00c0c20432fbd46\u241f4413228435210354183:Suivi d'une demande"]);return Oa=function(){return e},e}function Ra(){var e=Ba([":@@rechercher\u241fa74db487f1577ddd1bb97940a9f18b8bbe2a1742\u241f5829380065548494521:Rechercher"]);return Ra=function(){return e},e}function Va(){var e=Ba([":@@nom_dentreprise\u241f2a3239b1b0f9c10702d519e5519549baac1fc6cb\u241f5204476090104618475:Nom d'entreprise"]);return Va=function(){return e},e}function Da(){var e=Ba([":@@nom_de_famille\u241f0236d1251a8b96b095410716abce29cb39f33fa7\u241f6203463917370694107:Nom de famille"]);return Da=function(){return e},e}function Na(){var e=Ba([":@@rechercher_par\u241f53aa14ae05d907f4d0c2e7105986dcb37f6cd66e\u241f3207254148219127109:Rechercher par"]);return Na=function(){return e},e}function La(){var e=Ba([":@@fourni_dans_courriel_confirmation\u241f8da40cb0a65c9a0d572834b060bf5ea1686b09c1\u241f8429885329896096300: Fourni dans le courriel confirmant la cr\xe9ation de la demande "]);return La=function(){return e},e}function Fa(){var e=Ba([":@@numero_de_suivi\u241fdd45a927cb29b1e8a260ec2a2dff110c1008cdbc\u241f6292014663174285874:Num\xe9ro de suivi"]);return Fa=function(){return e},e}function Ma(){var e=Ba([":@@entrer_infos_recherche_demande\u241f06be5d871ac4bb40dd5c2cf0aec6852379087f91\u241f6376843221383078242: Veuillez entrer les informations demand\xe9es pour rechercher une demande. "]);return Ma=function(){return e},e}function qa(){var e=Ba([":@@erreur_paiement_service_indisponible\u241f8161705dd12f72bb6625fc981173d952fa321a71\u241f8667629591683974327: Le site de paiement est temporairement indisponible. Veuillez r\xe9essayer plus tard.\n"]);return qa=function(){return e},e}function ja(){var e=Ba([":@@err-chargement\u241f55a88ca5846433ebfff071278b098c284c216552\u241f7223316432776832201:Une erreur de chargement s'est produite."]);return ja=function(){return e},e}function Ba(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function za(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ua(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||Wa(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ha(e){return function(e){if(Array.isArray(e))return Ga(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Wa(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qa(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Wa(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Wa(e,t){if(e){if("string"==typeof e)return Ga(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ga(e,t):void 0}}function Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $a(e){var t="function"==typeof Map?new Map:void 0;return($a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ja(e,arguments,rs(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Za(r,e)})(e)}function Ja(e,t,n){return(Ja=ns()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Za(i,n.prototype),i}).apply(null,arguments)}function Ya(e,t,n){return(Ya="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rs(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ka(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Za(e,t)}function Za(e,t){return(Za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xa(e){var t=ns();return function(){var n,r=rs(e);if(t){var i=rs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return es(this,n)}}function es(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?ts(e):t}function ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ns(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function rs(e){return(rs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function is(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function os(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function as(e,t,n){return t&&os(e.prototype,t),n&&os(e,n),e}(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{0:function(e,t,n){e.exports=n("zUnb")},IHAH:function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}([function(e,t,n){"use strict";t.a=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t.b=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})},t.c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},t.d=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(13)),a=n(8),s=n(2),l=n(4),u=n(12),c=n(33),d=n(58),h=n(25),p=n(30),f=n(28),m=n(29),g=n(27),v=n(15),y=n(5),b=n(34);n.d(t,"a",function(){return _});var _=function(){function e(){}return e.parseWidth=function(e,t,n){if(void 0===n&&(n=1),0===e.indexOf("calc"))return t/n;var r,i=parseFloat(e);switch(e.replace(/[^A-Za-z]/g,"")){case"pt":r=1;break;case"mm":r=72/25.4;break;case"cm":r=72/2.54;break;case"in":r=72;break;case"px":r=.75;break;case"pc":case"em":r=12;break;case"ex":r=6;break;default:case"%":r=t/100}return Math.min(i*r,t)},e.pxToPt=function(t){return"string"==typeof t?e.parseWidth(t,Number.MAX_VALUE):72*t/96},e.mergeRects=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={xLeft:e[0].xLeft,xRight:e[0].xRight,yTop:e[0].yTop,yBot:e[0].yBot};return e.forEach(function(e){n.xLeft=Math.min(n.xLeft,e.xLeft),n.xRight=Math.max(n.xRight,e.xRight),n.yTop=Math.min(n.yTop,e.yTop),n.yBot=Math.max(n.yBot,e.yBot)}),n},e.createPoint=function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!1),{xLeft:t?e.xLeft:e.xRight,yTop:n?e.yTop:e.yBot}},e.createRect=function(e,t,n){return{xLeft:e.xLeft,xRight:e.xLeft+t,yTop:e.yTop,yBot:e.yTop+n}},e.createHeaderRect=function(e){return{xLeft:0,xRight:e.paperWidth,yTop:0,yBot:e.margins.top}},e.createFooterRect=function(e){return{xLeft:0,xRight:e.paperWidth,yTop:e.paperHeight-e.margins.bot,yBot:e.paperHeight}},e.chooseHtmlFont=function(e,t){return"standard"===t?this.isCustomFont(e,e.fontName)?this.STANDARD_FONT:e.fontName:e.useCustomFontInHtml?e.fontName:this.STANDARD_FONT},e.generateCssTextRule=function(e,t,n){return'"font-size: '.concat(e,"pt; font-weight: ").concat(t,"; font-family: ").concat(n,"; color: ").concat(this.TEXT_COLOR,';"')},e.createHtmlContainerBlock=function(e,t,n){var r=this.chooseHtmlFont(t,n);return'<div class="__surveypdf_html" style='.concat(this.generateCssTextRule(t.fontSize,t.fontStyle,r),">")+"<style>.__surveypdf_html p { margin: 0; line-height: ".concat(t.fontSize,"pt } body { margin: 0; }</style>").concat(e,"</div>")},e.splitHtmlRect=function(e,t){var i=[],o=t.height,a=e.doc.getFontSize();t.yBot=t.yTop+a;var s=Math.floor(o/a)-1;i.push(t);for(var l=this.createPoint(t),u=0;u<s;u++)i.push(new g.a(this.createRect(l,t.width,a))),l.yTop+=a;var c=o-(s+1)*a;return c>0&&i.push(new g.a(this.createRect(l,t.width,c))),new(y.a.bind.apply(y.a,n.i(r.d)([void 0],i,!1)))},e.createPlainTextFlat=function(e,t,n,r,i){var o=this,a=n.doc.splitTextToSize(r,n.paperWidth-n.margins.right-e.xLeft),s=this.clone(e),l=new y.a;return a.forEach(function(e){var r=n.measureText(e);l.addBrick(new i(t,n,o.createRect(s,r.width,r.height),e)),s.yTop+=r.height}),l},e.createTextFlat=function(e,t,i,o,a){return n.i(r.b)(this,void 0,void 0,function(){var s,l;return n.i(r.c)(this,function(n){switch(n.label){case 0:return"string"!=typeof o&&this.hasHtml(o)?[3,1]:[2,this.createPlainTextFlat(e,t,i,"string"==typeof o?o:this.getLocString(o),a)];case 1:return s=this.splitHtmlRect,l=[i],[4,this.createHTMLFlat(e,t,i,this.createHtmlContainerBlock(this.getLocString(o),i,"standard"))];case 2:return[2,s.apply(this,l.concat([n.sent()]))]}})})},e.hasHtml=function(e){var t=/<\/?[a-z][\s\S]*>/i;return e.hasHtml&&(t.test(e.renderedText)||t.test(e.renderedHtml))},e.getHtmlMargins=function(e,t){var n=e.paperWidth-t.xLeft-e.margins.right;return{top:e.margins.top,bottom:e.margins.bot,width:n>e.unitWidth?n:e.unitWidth}},e.createHTMLRect=function(t,n,r,i){var o=n.paperHeight-n.margins.bot-n.margins.top,a=(n.helperDoc.getNumberOfPages()-1)*(n.fontSize*Math.floor(o/n.fontSize))+i-r.top+e.HTML_TAIL_TEXT_SCALE*n.fontSize,s=n.helperDoc.getNumberOfPages();n.helperDoc.addPage();for(var l=0;l<s;l++)n.helperDoc.deletePage(1);return e.createRect(t,r.width,a)},e.createHTMLFlat=function(t,i,o,a){return n.i(r.b)(this,void 0,void 0,function(){var s;return n.i(r.c)(this,function(n){switch(n.label){case 0:return s=this.getHtmlMargins(o,t),[4,new Promise(function(n){o.helperDoc.fromHTML(a,t.xLeft,s.top,{pagesplit:!0,width:s.width},function(r){var l=e.createHTMLRect(t,o,s,r.y);n(new f.a(i,o,l,a))},s)})];case 1:return[2,n.sent()]}})})},e.generateFontFace=function(e,t,n){return"@font-face { font-family: ".concat(e,"; ")+"src: url(data:application/font-woff;charset=utf-8;base64,".concat(t,") format('woff'); ")+"font-weight: ".concat(n,"; }")},e.generateFontFaceWithItalicStyle=function(e,t,n){return"@font-face { font-family: ".concat(e,"; ")+"src: url(data:application/font-woff;charset=utf-8;base64,".concat(t,") format('woff'); ")+"font-weight: ".concat(n,"; font-style: italic}")},e.htmlToXml=function(e){var t=document.implementation.createHTMLDocument("");return t.write(e.replace(/\#/g,"%23")),t.documentElement.setAttribute("xmlns",t.documentElement.namespaceURI),t.body.style.margin="unset",(new XMLSerializer).serializeToString(t.body).replace(/%23/g,"#")},e.createSvgContent=function(e,t,n){var r=this,i=document.createElement("style");i.innerHTML=".__surveypdf_html p { margin: unset; line-height: 22px; } body { margin: unset; }",document.body.appendChild(i);var o=document.createElement("div");o.className="__surveypdf_html",o.style.display="block",o.style.position="fixed",o.style.top="-10000px",o.style.left="-10000px",o.style.width=t/72*96+"px",o.style.boxSizing="initial",o.style.color="initial",o.style.fontFamily="initial",o.style.font="initial",o.style.lineHeight="initial",o.insertAdjacentHTML("beforeend",e),document.body.appendChild(o);var s=o.offsetWidth,l=o.offsetHeight;o.remove(),i.remove();var u="";return n.useCustomFontInHtml?u="<defs><style>".concat(this.generateFontFace(n.fontName,n.base64Normal,"normal"))+" ".concat(this.generateFontFace(n.fontName,n.base64Bold,"bold"),"</style></defs>"):Object.keys(a.b.customFonts).forEach(function(e){var t=a.b.customFonts[e];Object.keys(t).forEach(function(n){u+="".concat("normal"===n||"bold"===n?r.generateFontFace(e,t[n],n):r.generateFontFaceWithItalicStyle(e,t[n],"italic"===n?"normal":"bold"))}),u="<defs><style>"+u+"</style></defs>"}),{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(s,'px" height="').concat(l,'px">')+u+"<style>.__surveypdf_html p { margin: unset; line-height: 22px; }</style>"+'<foreignObject width="'.concat(s,'px" height="').concat(l,'px">')+this.htmlToXml(e)+"</foreignObject></svg>",divWidth:s,divHeight:l}},e.setCanvas=function(t,n,r,i){t.width=n*e.HTML_TO_IMAGE_QUALITY,t.height=r*e.HTML_TO_IMAGE_QUALITY;var o=t.getContext("2d");o.scale(e.HTML_TO_IMAGE_QUALITY,e.HTML_TO_IMAGE_QUALITY),o.fillStyle=e.BACKGROUND_COLOR,o.fillRect(0,0,n,r),o.drawImage(i,0,0)},e.htmlToImage=function(t,i,o){return n.i(r.b)(this,void 0,void 0,function(){var a,s,l,u,c;return n.i(r.c)(this,function(n){switch(n.label){case 0:return a=e.createSvgContent(t,i,o),s=a.divWidth,l=a.divHeight,u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a.svg))),(c=new Image).src=u,[4,new Promise(function(t){c.onload=function(){var n=document.createElement("canvas");e.setCanvas(n,s,l,c);var r=n.toDataURL("image/jpeg",e.HTML_TO_IMAGE_QUALITY);n.remove(),t({url:r,aspect:s/l})},c.onerror=function(){t({url:"data:,",aspect:i/this.EPSILON})}})];case 1:return[2,n.sent()]}})})},e.createBoldTextFlat=function(e,t,i,o){return n.i(r.b)(this,void 0,void 0,function(){var a;return n.i(r.c)(this,function(n){switch(n.label){case 0:return i.fontStyle="bold",[4,this.createTextFlat(e,t,i,o,u.a)];case 1:return a=n.sent(),i.fontStyle="normal",[2,a]}})})},e.createTitleFlat=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,s,l,u,c,d,h,p,f,m;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=new y.a,a=this.clone(e),s=i.fontSize,i.fontSize*=this.TITLE_FONT_SCALE,t.no?(l=t.no+" ",u=void 0,this.hasHtml(t.locTitle)?(i.fontStyle="bold",i.pushMargins(),i.margins.right=i.paperWidth-i.margins.left-i.measureText(l,"bold").width,[4,this.createHTMLFlat(a,t,i,this.createHtmlContainerBlock(l,i,"standard"))]):[3,2]):[3,5];case 1:return u=n.sent(),i.popMargins(),i.fontStyle="normal",[3,4];case 2:return[4,this.createBoldTextFlat(a,t,i,l)];case 3:u=n.sent(),n.label=4;case 4:o.addBrick(u),a.xLeft=u.xRight,n.label=5;case 5:return i.pushMargins(),i.margins.left=a.xLeft,[4,this.createBoldTextFlat(a,t,i,t.locTitle)];case 6:return c=n.sent(),o.addBrick(c),i.popMargins(),t.isRequired?(d=t.requiredText,this.hasHtml(t.locTitle)?(a=this.createPoint(c.unfold()[0],!1,!1),i.fontStyle="bold",i.pushMargins(),i.margins.right=i.paperWidth-i.margins.left-i.measureText(d,"bold").width,p=(h=o).addBrick,[4,this.createHTMLFlat(a,t,i,this.createHtmlContainerBlock(d,i,"standard"))]):[3,8]):[3,10];case 7:return p.apply(h,[n.sent()]),i.popMargins(),i.fontStyle="normal",[3,10];case 8:return a=this.createPoint(c.unfold().pop(),!1,!0),m=(f=o).addBrick,[4,this.createBoldTextFlat(a,t,i,d)];case 9:m.apply(f,[n.sent()]),n.label=10;case 10:return i.fontSize=s,[2,o]}})})},e.createTitleSurveyPanelFlat=function(e,t,i,o){return n.i(r.b)(this,void 0,void 0,function(){var a,s;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t.fontSize=(a=t.fontSize)*o,t.fontStyle="bold",[4,this.createTextFlat(e,null,t,i,c.a)];case 1:return s=n.sent(),t.fontStyle="normal",t.fontSize=a,[2,s]}})})},e.createTitleSurveyFlat=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,this.createTitleSurveyPanelFlat(e,t,i,this.TITLE_SURVEY_FONT_SIZE_SCALE)];case 1:return[2,n.sent()]}})})},e.createTitlePanelFlat=function(e,t,i,o){return void 0===o&&(o=!1),n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,this.createTitleSurveyPanelFlat(e,t,i,o?this.TITLE_PAGE_FONT_SIZE_SCALE:this.TITLE_PANEL_FONT_SIZE_SCALE)];case 1:return[2,n.sent()]}})})},e.createDescFlat=function(e,t,i,o){return n.i(r.b)(this,void 0,void 0,function(){var a,s;return n.i(r.c)(this,function(n){switch(n.label){case 0:return i.fontSize=(a=i.fontSize)*this.DESCRIPTION_FONT_SIZE_SCALE,[4,this.createTextFlat(e,t,i,o,d.a)];case 1:return s=n.sent(),i.fontSize=a,[2,s]}})})},e.getReadonlyRenderAs=function(e,t){return"auto"===e.readonlyRenderAs?t.readonlyRenderAs:e.readonlyRenderAs},e.createCommentFlat=function(e,t,i,o,a,s){return void 0===s&&(s=0),n.i(r.b)(this,void 0,void 0,function(){var l,u,c;return n.i(r.c)(this,function(n){switch(n.label){case 0:return l=this.createTextFieldRect(e,i,o),t.isReadOnly&&"acroform"!==this.getReadonlyRenderAs(t,i)?[4,this.createReadOnlyTextFieldTextFlat(e,i,t,this.getQuestionOrCommentValue(t,a),!1)]:[3,2];case 1:(u=n.sent()).yBot+(c=i.unitHeight*this.VALUE_READONLY_PADDING_SCALE)>l.yBot&&(l.yBot=u.yBot+c),n.label=2;case 2:return[2,new h.a(t,i,l,a,s)]}})})},e.getQuestionOrCommentValue=function(e,t){return void 0===t&&(t=!0),t?null!=e.value?e.value:"":null!=e.comment?e.comment:""},e.getQuestionOrCommentDisplayValue=function(t,n){return void 0===n&&(n=!0),n?t.displayValue:e.getQuestionOrCommentValue(t,n)},e.createImageFlat=function(t,i,o,a,s,l){return n.i(r.b)(this,void 0,void 0,function(){var u,c,d,h,p;return n.i(r.c)(this,function(n){switch(n.label){case 0:return e.inBrowser?o.applyImageFit?(s>o.paperWidth-o.margins.left-o.margins.right&&(l*=(u=o.paperWidth-o.margins.left-o.margins.right)/s,s=u),c=i&&i.imageFit?i.imageFit:"contain",d="<div style='overflow: hidden; width: ".concat(1.3333333333333333*s,"px; height: ").concat(1.3333333333333333*l,"px;'>\n                        <img src='").concat(a,"' style='object-fit: ").concat(c,"; width: 100%; height: 100%;'/>\n                    </div>"),[4,e.htmlToImage(d,s,o)]):[3,2]:[3,3];case 1:h=n.sent(),a=h.url,n.label=2;case 2:return p="<img src='".concat(a,"' width='").concat(s,"' height='").concat(l,"'/>"),[2,new f.a(i,o,this.createRect(t,s,l),p,!0)];case 3:return[2,new m.a(i,o,a,t,s,l)]}})})},e.canPreviewImage=function(e,t,n){return e.canPreviewImage(t)},e.getImageSize=function(t){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(n){switch(n.label){case 0:return e.inBrowser?[3,2]:[4,new Promise(function(e){return e({width:void 0,height:void 0})})];case 1:return[2,n.sent()];case 2:return[4,new Promise(function(e){var n=new Image;n.src=t,n.onload=function(){return e({width:n.width,height:n.height})},n.onerror=function(){return e(null)}})];case 3:return[2,n.sent()]}})})},e.createRowlineFlat=function(e,t,n,r){var i=void 0===n?t.paperWidth-t.margins.right:e.xLeft+n;return new v.a(t,{xLeft:e.xLeft,xRight:i=i>e.xLeft?i:e.xLeft+this.EPSILON,yTop:e.yTop+this.EPSILON,yBot:e.yTop+this.EPSILON},void 0===r?null:r)},e.createLinkFlat=function(e,t,i,o,a){return n.i(r.b)(this,void 0,void 0,function(){var s,u,c=this;return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,this.createTextFlat(e,t,i,o,l.a)];case 1:return s=n.sent(),u=new y.a,s.unfold().forEach(function(e){u.addBrick(new p.a(e,a));var t=c.createPoint(u);u.addBrick(c.createRowlineFlat(t,i,u.width,p.a.COLOR))}),[2,u]}})})},e.createAcroformRect=function(e){return[e.xLeft,e.yTop,e.xRight-e.xLeft,e.yBot-e.yTop]},e.createTextFieldRect=function(e,t,n){void 0===n&&(n=1);var r=t.paperWidth-e.xLeft-t.margins.right;return r=Math.max(r,t.unitWidth),this.createRect(e,r,t.unitHeight*n)},e.createReadOnlyTextFieldTextFlat=function(e,t,i,o,a){return n.i(r.b)(this,void 0,void 0,function(){var s,u;return n.i(r.c)(this,function(n){switch(n.label){case 0:return s=t.unitWidth*this.VALUE_READONLY_PADDING_SCALE,a||(e.yTop+=s),e.xLeft+=s,t.pushMargins(e.xLeft,t.margins.right+s),[4,this.createTextFlat(e,i,t,o.toString(),l.a)];case 1:return u=n.sent(),t.popMargins(),[2,u]}})})},e.renderFlatBorders=function(e,t){var i,o;if(this.FORM_BORDER_VISIBLE){var a=Math.min(t.width,t.height),s=e.unitHeight*this.VISIBLE_BORDER_SCALE*this.BORDER_SCALE,l=this.formScale(e,t)+s/a,u=e.unitHeight*this.UNVISIBLE_BORDER_SCALE*this.BORDER_SCALE,c=1-u/a,d=this.RADIUS_SCALE*u,h=e.doc.getDrawColor();e.doc.setDrawColor(t.formBorderColor),e.doc.setLineWidth(s),(i=e.doc).rect.apply(i,this.createAcroformRect(this.scaleRect(t,l))),e.doc.setDrawColor(this.BACKGROUND_COLOR),e.doc.setLineWidth(u),(o=e.doc).roundedRect.apply(o,n.i(r.d)(n.i(r.d)([],this.createAcroformRect(this.scaleRect(t,c)),!1),[d,d],!1)),e.doc.setDrawColor(h)}},e.renderReadOnlyTextField=function(e,t,i,o,a,s){return void 0===a&&(a=!0),void 0===s&&(s=!0),n.i(r.b)(this,void 0,void 0,function(){var l,u,c;return n.i(r.c)(this,function(n){switch(n.label){case 0:return l=this.createPoint(i,!0,!0),u=e.fontSize,e.fontSize=i.fontSize,[4,this.createReadOnlyTextFieldTextFlat(l,e,t,o,a)];case 1:return c=n.sent(),e.fontSize=u,a?[4,c.unfold()[0].render()]:[3,3];case 2:return n.sent(),[3,5];case 3:return[4,c.render()];case 4:n.sent(),n.label=5;case 5:return s&&this.renderFlatBorders(e,i),[2]}})})},e.getLocString=function(e){return this.hasHtml(e)?e.renderedHtml:e.renderedText||e.renderedHtml},e.getDropdownQuestionValue=function(e){return e.isOtherSelected?e.otherText:e.displayValue?e.displayValue:e.showOptionsCaption?e.optionsCaption:""},e.getContentQuestion=function(e){return e.contentQuestion?e.contentQuestion:e},e.getContentQuestionTypeRenderAs=function(e,t){var n=e.renderAs;if("boolean"===e.getType()&&"default"===e.renderAs&&(n=t.options.booleanRenderAs),"default"!==n){var r="".concat(e.getType(),"-").concat(n);if(s.a.getInstance().isTypeRegistered(r))return r}return e.getType()},e.getContentQuestionType=function(e,t){return e.customWidget?e.customWidget.pdfQuestionType:e.contentQuestion?"custom_model":this.getContentQuestionTypeRenderAs(e,t)},e.getRatingMinWidth=function(e){return e.measureText(this.RATING_MIN_WIDTH).width},e.getRatingItemText=function(e,t,n){var r=new i.LocalizableString(n.owner,n.useMarkdown);return r.text=this.getLocString(n),0===t&&e.minRateDescription?r.text=e.locMinRateDescription.text+" "+this.getLocString(n):t===e.visibleRateValues.length-1&&e.maxRateDescription&&(r.text=this.getLocString(n)+" "+e.locMaxRateDescription.text),r},e.getPageAvailableWidth=function(e){return e.paperWidth-e.margins.left-e.margins.right},e.getImagePickerAvailableWidth=function(e){var t=this.getPageAvailableWidth(e)-(this.IMAGEPICKER_COUNT-1)*e.unitHeight;return t>0?t:e.unitHeight},e.getColumnWidth=function(e,t){return(this.getPageAvailableWidth(e)-(t-1)*e.unitWidth*this.GAP_BETWEEN_COLUMNS)/t},e.setColumnMargins=function(e,t,n){var r=this.getColumnWidth(e,t);e.margins.left=e.margins.left+n*(r+e.unitWidth*this.GAP_BETWEEN_COLUMNS),e.margins.right=e.margins.right+(t-n-1)*(r+e.unitWidth*this.GAP_BETWEEN_COLUMNS)},e.moveRect=function(e,t,n){return void 0===t&&(t=e.xLeft),void 0===n&&(n=e.yTop),{xLeft:t,yTop:n,xRight:t+e.xRight-e.xLeft,yBot:n+e.yBot-e.yTop}},e.scaleRect=function(e,t){var n=e.xRight-e.xLeft,r=e.yBot-e.yTop,i=(n<r?n:r)*(1-t)/2;return{xLeft:e.xLeft+i,yTop:e.yTop+i,xRight:e.xRight-i,yBot:e.yBot-i}},e.formScale=function(e,t){var n=Math.min(t.width,t.height);return(n-2*e.unitWidth*this.BORDER_SCALE)/n},e.generateQuestionFlats=function(e,t,i,a){return n.i(r.b)(this,void 0,void 0,function(){var l,u,c;return n.i(r.c)(this,function(d){switch(d.label){case 0:return l=this.getContentQuestionType(i,e),[4,s.a.getInstance().create(e,i,t,l).generateFlats(a)];case 1:return u=d.sent(),c=new b.c(a,u,i,t,s.a.getInstance(),o),i.customWidget&&i.customWidget.isFit(i)&&i.customWidget.pdfRender&&e.onRenderQuestion.unshift(i.customWidget.pdfRender),[4,e.onRenderQuestion.fire(e,c)];case 2:return d.sent(),[2,n.i(r.d)([],c.bricks,!0)]}})})},e.isFontExist=function(e,t){return e.doc.internal.getFont(t).fontName===t},e.isCustomFont=function(e,t){return e.doc.internal.getFont(t).encoding===this.CUSTOM_FONT_ENCODING},e.fixFont=function(e){this.isCustomFont(e,e.fontName)&&(e.doc.text("load font",0,0),e.doc.deletePage(1),e.addPage())},e.clone=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},e.EPSILON=2220446049250313e-30,e.TITLE_SURVEY_FONT_SIZE_SCALE=1.7,e.TITLE_PAGE_FONT_SIZE_SCALE=1.3,e.TITLE_PANEL_FONT_SIZE_SCALE=1.3,e.DESCRIPTION_FONT_SIZE_SCALE=2/3,e.OTHER_ROWS_COUNT=2,e.RATING_MIN_WIDTH=3,e.RATING_MIN_HEIGHT=2,e.RATING_COLUMN_WIDTH=5,e.MATRIX_COLUMN_WIDTH=5,e.IMAGEPICKER_COUNT=4,e.IMAGEPICKER_RATIO=4/3,e.MULTIPLETEXT_TEXT_PERS=Math.E/10,e.HTML_TAIL_TEXT_SCALE=.24,e.SELECT_ITEM_FLAT_SCALE=.95,e.GAP_BETWEEN_ROWS=.25,e.GAP_BETWEEN_COLUMNS=1.5,e.GAP_BETWEEN_ITEM_TEXT=.25,e.FORM_BORDER_VISIBLE=!0,e.BORDER_SCALE=.1,e.VISIBLE_BORDER_SCALE=.8,e.UNVISIBLE_BORDER_SCALE=.2,e.RADIUS_SCALE=3,e.TITLE_FONT_SCALE=1.1,e.VALUE_READONLY_PADDING_SCALE=.3,e.HTML_TO_IMAGE_QUALITY=1,e.FORM_BORDER_COLOR="#9f9f9f",e.TEXT_COLOR="#404040",e.BACKGROUND_COLOR="#FFFFFF",e.TITLE_LOCATION_MATRIX="matrix",e.STANDARD_FONT="helvetica",e.CUSTOM_FONT_ENCODING="Identity-H",e.inBrowser="function"==typeof Image,e}()},function(e,t,n){"use strict";var r=n(3);n.d(t,"a",function(){return i});var i=function(){function e(){this.questions={}}return e.getInstance=function(){return e.instance},e.prototype.register=function(e,t){this.questions[e]=t},e.prototype.isTypeRegistered=function(e){return!!this.questions[e]},e.prototype.create=function(e,t,n,i){var o=void 0===i?t.getType():i;return new(this.questions[o]||r.a)(e,t,n)},e.instance=new e,e}()},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(10)),a=n(4),s=n(5),l=n(1);n.d(t,"a",function(){return u});var u=function(){function e(e,t,n){this.survey=e,this.controller=n,this.question=t}return e.prototype.generateFlatTitle=function(e){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(t){switch(t.label){case 0:return[4,l.a.createTitleFlat(e,this.question,this.controller)];case 1:return[2,t.sent()]}})})},e.prototype.generateFlatDescription=function(t){return n.i(r.b)(this,void 0,void 0,function(){var i;return n.i(r.c)(this,function(n){switch(n.label){case 0:return(i=l.a.clone(t)).xLeft+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE,i.yTop+=e.DESC_GAP_SCALE*this.controller.unitHeight,[4,l.a.createDescFlat(i,this.question,this.controller,this.question.locDescription)];case 1:return[2,n.sent()]}})})},e.prototype.generateFlatsComment=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,u;return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,l.a.createTextFlat(e,this.question,this.controller,this.question.locCommentText,a.a)];case 1:return t=n.sent(),(i=l.a.createPoint(t)).yTop+=this.controller.unitHeight*l.a.GAP_BETWEEN_ROWS,o=s.a.bind,u=[void 0,t],[4,l.a.createCommentFlat(i,this.question,this.controller,l.a.OTHER_ROWS_COUNT,!1)];case 2:return[2,new(o.apply(s.a,u.concat([n.sent()])))]}})})},e.prototype.generateFlatsComposite=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t;return n.i(r.c)(this,function(n){switch(n.label){case 0:return(t=this.question.contentPanel)?[4,o.a.generateFlatsPanel(this.survey,this.controller,t,e)]:[3,2];case 1:return[2,n.sent()];case 2:return this.question=l.a.getContentQuestion(this.question),[4,this.generateFlatsContent(e)];case 3:return[2,n.sent()]}})})},e.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){return[2,null]})})},e.prototype.generateFlats=function(t){return n.i(r.b)(this,void 0,void 0,function(){var i,o,a,u,c,d,h,p,f,m,g,v,y,b,_,w,C,x;return n.i(r.c)(this,function(n){switch(n.label){case 0:switch(this.controller.pushMargins(),this.controller.margins.left+=this.controller.measureText(this.question.indent).width,i={xLeft:t.xLeft+this.controller.measureText(this.question.indent).width,yTop:t.yTop},o=[],a=i,u=this.question.getTitleLocation(),u=this.question.hasTitle?u:"hidden",c=!!l.a.getLocString(this.question.locDescription),u){case"top":case"default":return[3,1];case"bottom":return[3,7];case"left":return[3,14];case"hidden":case l.a.TITLE_LOCATION_MATRIX:return[3,19]}return[3,19];case 1:return[4,this.generateFlatTitle(i)];case 2:return f=n.sent(),m=new s.a(f),y=l.a.createPoint(m),c?[4,this.generateFlatDescription(l.a.createPoint(f))]:[3,4];case 3:return g=n.sent(),m.addBrick(g),y=l.a.createPoint(g),[3,5];case 4:y.xLeft+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE,n.label=5;case 5:return m.addBrick(l.a.createRowlineFlat(l.a.createPoint(m),this.controller)),y.yTop+=this.controller.unitHeight*e.CONTENT_GAP_VERT_SCALE+l.a.EPSILON,a=y,this.controller.pushMargins(),this.controller.margins.left+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE,[4,this.generateFlatsComposite(y)];case 6:return v=n.sent(),this.controller.popMargins(),null!==v&&0!==v.length&&(a.yTop=l.a.mergeRects.apply(l.a,v).yBot+this.controller.unitHeight*l.a.GAP_BETWEEN_ROWS,m.addBrick(v.shift())),o.push(m),o.push.apply(o,v),[3,21];case 7:return y=l.a.clone(i),this.controller.pushMargins(),y.xLeft+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE,this.controller.margins.left+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE,a=y,[4,this.generateFlatsComposite(y)];case 8:return v=n.sent(),this.controller.popMargins(),o.push.apply(o,v),null!==v&&0!=v.length&&((a=l.a.createPoint(l.a.mergeRects.apply(l.a,v))).yTop+=this.controller.unitHeight*l.a.GAP_BETWEEN_ROWS),this.question.hasComment?(h=(d=o).push,[4,this.generateFlatsComment(a)]):[3,10];case 9:h.apply(d,[n.sent()]),n.label=10;case 10:return p=i,0!==o.length&&(p.yTop=o[o.length-1].yBot),p.yTop+=this.controller.unitHeight*e.CONTENT_GAP_VERT_SCALE,[4,this.generateFlatTitle(p)];case 11:return f=n.sent(),m=new s.a(f),c?[4,this.generateFlatDescription(l.a.createPoint(f))]:[3,13];case 12:g=n.sent(),m.addBrick(g),n.label=13;case 13:return o.push(m),[3,21];case 14:return this.controller.pushMargins(this.controller.margins.left,this.controller.paperWidth-this.controller.margins.left-l.a.getPageAvailableWidth(this.controller)*l.a.MULTIPLETEXT_TEXT_PERS),[4,this.generateFlatTitle(i)];case 15:return f=n.sent(),m=new s.a(f),y=l.a.createPoint(f,!1,!0),c?[4,this.generateFlatDescription(l.a.createPoint(f))]:[3,17];case 16:g=n.sent(),m.addBrick(g),y.xLeft=Math.max(y.xLeft,g.xRight),n.label=17;case 17:return this.controller.popMargins(),y.xLeft+=this.controller.unitWidth*e.CONTENT_GAP_HOR_SCALE,this.controller.margins.left=y.xLeft,a.xLeft=y.xLeft,[4,this.generateFlatsComposite(y)];case 18:return null!==(v=n.sent())&&0!=v.length&&((a=l.a.createPoint(l.a.mergeRects.apply(l.a,v))).yTop+=this.controller.unitHeight*l.a.GAP_BETWEEN_ROWS,m.addBrick(v.shift())),o.push(m),o.push.apply(o,v),[3,21];case 19:return y=l.a.clone(i),this.controller.pushMargins(),u!==l.a.TITLE_LOCATION_MATRIX&&(y.xLeft+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE,this.controller.margins.left+=this.controller.unitWidth*e.CONTENT_INDENT_SCALE),a=y,_=(b=o.push).apply,w=[o],[4,this.generateFlatsComposite(y)];case 20:return _.apply(b,w.concat([n.sent()])),this.controller.popMargins(),null!==o&&0!==o.length&&((a=l.a.createPoint(l.a.mergeRects.apply(l.a,o))).yTop+=this.controller.unitHeight*l.a.GAP_BETWEEN_ROWS),[3,21];case 21:return this.question.hasComment&&"bottom"!==this.question.titleLocation?(x=(C=o).push,[4,this.generateFlatsComment(a)]):[3,23];case 22:x.apply(C,[n.sent()]),n.label=23;case 23:return this.controller.popMargins(),[2,o]}})})},e.CONTENT_GAP_VERT_SCALE=.5,e.CONTENT_GAP_HOR_SCALE=1,e.CONTENT_INDENT_SCALE=1,e.DESC_GAP_SCALE=.0625,e}();i.Serializer.addProperty("question",{name:"readonlyRenderAs",default:"auto",choices:["auto","text","acroform"]})},function(e,t,n){"use strict";var r=n(0),i=n(7);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.text=i,o.align={align:"left",baseline:"middle"},o}return n.i(r.a)(t,e),t.prototype.escapeText=function(){for(;this.text.indexOf("\t")>-1;)this.text=this.text.replace("\t",Array(5).join(String.fromCharCode(160)));return this.text},t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t,i;return n.i(r.c)(this,function(n){return e=this.alignPoint(this),t=this.controller.fontSize,this.controller.fontSize=this.fontSize,i=this.controller.doc.getTextColor(),this.controller.doc.setTextColor(this.textColor),this.controller.doc.text(this.escapeText(),e.xLeft,e.yTop,this.align),this.controller.doc.setTextColor(i),this.controller.fontSize=t,[2]})})},t.prototype.alignPoint=function(e){return{xLeft:e.xLeft,yTop:e.yTop+(e.yBot-e.yTop)/2}},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(1);n.d(t,"a",function(){return o});var o=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.bricks=[],this.isPageBreak=!1,this._xLeft=0,this._xRight=0,this._yTop=0,this._yBot=0,this.addBrick.apply(this,e)}return Object.defineProperty(e.prototype,"xLeft",{get:function(){return this._xLeft},set:function(e){this.shift(e-this.xLeft,0,0,0),this._xLeft=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xRight",{get:function(){return this._xRight},set:function(e){this.shift(0,e-this.xRight,0,0),this._xRight=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yTop",{get:function(){return this._yTop},set:function(e){this.shift(0,0,e-this.yTop,0),this._yTop=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yBot",{get:function(){return this._yBot},set:function(e){this.shift(0,0,0,e-this.yBot),this._yBot=e},enumerable:!1,configurable:!0}),e.prototype.shift=function(e,t,n,r){this.bricks.forEach(function(i){i.xLeft+=e,i.xRight+=t,i.yTop+=n,i.yBot+=r})},Object.defineProperty(e.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),e.prototype.render=function(){return n.i(r.b)(this,void 0,void 0,function(){var e;return n.i(r.c)(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.bricks.length?[4,this.bricks[e].render()]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.bricks.length},enumerable:!1,configurable:!0}),e.prototype.addBrick=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0!=t.length){(e=this.bricks).push.apply(e,t);var r=i.a.mergeRects.apply(i.a,this.bricks);this._xLeft=r.xLeft,this._xRight=r.xRight,this._yTop=r.yTop,this._yBot=r.yBot}},e.prototype.unfold=function(){var e=[];return this.bricks.forEach(function(t){e.push.apply(e,t.unfold())}),e},e}()},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0),i=n(8),o=n(1);n.d(t,"a",function(){return a});var a=function(){function e(e,t,n){this.question=e,this.controller=t,this.textColor=o.a.TEXT_COLOR,this.formBorderColor=o.a.FORM_BORDER_COLOR,this.isPageBreak=!1,this.xLeft=n.xLeft,this.xRight=n.xRight,this.yTop=n.yTop,this.yBot=n.yBot,this.fontSize=t?t.fontSize:i.b.FONT_SIZE}return Object.defineProperty(e.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),e.prototype.render=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){switch(e.label){case 0:return this.question&&this.question.isReadOnly&&"acroform"!==o.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,this.renderInteractive()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},e.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){return[2]})})},e.prototype.renderReadOnly=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){switch(e.label){case 0:return[4,this.renderInteractive()];case 1:return e.sent(),[2]}})})},e.prototype.unfold=function(){return[this]},e}()},function(e,t,n){"use strict";var r=n(0),i=n(18),o=(n.n(i),n(1)),a=n(57),s=n(60),l=(n.n(s),n(61));n.n(l),n.d(t,"a",function(){return u}),n.d(t,"b",function(){return c});var u=function(){function e(t){var n=this;this._base64Normal=void 0,this._base64Bold=void 0,this._orientation=void 0===t.orientation?void 0===t.format||t.format[0]<t.format[1]?"p":"l":t.orientation,this._format=t.format||"a4",Array.isArray(this._format)&&(this._format=this._format.map(function(t){return t*e.MM_TO_PT})),this._fontSize=t.fontSize||e.FONT_SIZE,this._fontName=t.fontName?t.fontName:e.SEGOE_BOLD||e.SEGOE_NORMAL?"segoe":o.a.STANDARD_FONT,void 0===t.fontName||void 0===t.base64Normal&&void 0===t.base64Bold?"segoe"===this.fontName&&(this._base64Normal=e.SEGOE_NORMAL,this._base64Bold=e.SEGOE_BOLD):(this._base64Normal=t.base64Normal||t.base64Bold,this._base64Bold=t.base64Bold||t.base64Normal),this._useCustomFontInHtml=t.useCustomFontInHtml&&void 0!==t.base64Normal,this._margins=o.a.clone(t.margins),void 0===this._margins&&(this._margins={}),void 0===this._margins.top&&(this._margins.top=10),void 0===this._margins.bot&&(this._margins.bot=10),void 0===this._margins.left&&(this._margins.left=10),void 0===this._margins.right&&(this._margins.right=10),Object.keys(this._margins).forEach(function(t){n._margins[t]=n._margins[t]*e.MM_TO_PT}),this._htmlRenderAs=t.htmlRenderAs||"auto",this._matrixRenderAs=t.matrixRenderAs||"auto",this._readonlyRenderAs=t.readonlyRenderAs||"auto",this._textFieldRenderAs=t.textFieldRenderAs||"singleLine",this._compress=t.compress||!1,this._applyImageFit=t.applyImageFit||!1,this._booleanRenderAs=t.booleanRenderAs||"default"}return Object.defineProperty(e.prototype,"leftTopPoint",{get:function(){return{xLeft:this.margins.left,yTop:this.margins.top}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"base64Normal",{get:function(){return this._base64Normal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"base64Bold",{get:function(){return this._base64Bold},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useCustomFontInHtml",{get:function(){return this._useCustomFontInHtml},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"margins",{get:function(){return this._margins},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this._format},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"htmlRenderAs",{get:function(){return this._htmlRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matrixRenderAs",{get:function(){return this._matrixRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readonlyRenderAs",{get:function(){return this._readonlyRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textFieldRenderAs",{get:function(){return this._textFieldRenderAs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"compress",{get:function(){return this._compress},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"applyImageFit",{get:function(){return this._applyImageFit},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"booleanRenderAs",{get:function(){return this._booleanRenderAs},enumerable:!1,configurable:!0}),e.MM_TO_PT=72/25.4,e.FONT_SIZE=14,e}(),c=function(e){function t(r){void 0===r&&(r={});var s=e.call(this,r)||this,l={orientation:s.orientation,unit:"pt",format:s.format,compress:s.compress};return s._doc=new i.jsPDF(l),void 0===s.base64Normal||o.a.isFontExist(s,s.fontName)||(t.addFont(s.fontName,s.base64Normal,"normal"),t.addFont(s.fontName,s.base64Bold,"bold"),s._doc=new i.jsPDF(l)),n.i(a.a)(s._doc),s._helperDoc=new i.jsPDF(l),s._doc.setFont(s.fontName),s._helperDoc.setFont(s.fontName),s._doc.setFontSize(s.fontSize),s._helperDoc.setFontSize(s.fontSize),s._fontStyle="normal",s.marginsStack=[],s}return n.i(r.a)(t,e),t.addFont=function(e,n,r){var o=t.customFonts[e];o||(t.customFonts[e]=o={}),o[r]=n,i.jsPDF.API.events.push(["addFonts",function(){var n=t.customFonts[e];if(n&&n[r]){var i="".concat(e,"-").concat(r,".ttf");this.addFileToVFS(i,n[r]),this.addFont(i,e,r)}}])},Object.defineProperty(t.prototype,"doc",{get:function(){return this._doc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"helperDoc",{get:function(){return this._helperDoc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontName",{get:function(){return this._fontName},set:function(e){this._fontName=e,this._doc.setFont(e),this._helperDoc.setFont(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(e){this._fontSize=e,this._doc.setFontSize(e),this._helperDoc.setFontSize(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(e){this._fontStyle=e,this._doc.setFont(this._fontName,e),this._helperDoc.setFont(this._fontName,e)},enumerable:!1,configurable:!0}),t.prototype.measureText=function(e,t,n){var r=this;void 0===e&&(e=1),void 0===t&&(t=this._fontStyle),void 0===n&&(n=this._fontSize);var i=this._helperDoc.getFontSize();this._helperDoc.setFontSize(n),this._helperDoc.setFont(this._fontName,t);var a,s=this._helperDoc.getLineHeight()/this._helperDoc.internal.scaleFactor;return a="number"==typeof e?s*e:(e="string"==typeof e?e:o.a.getLocString(e)).split("").reduce(function(e,t){return e+r._helperDoc.getTextWidth(t)},0),this._helperDoc.setFontSize(i),this._helperDoc.setFont(this._fontName,"normal"),{width:a,height:s}},Object.defineProperty(t.prototype,"unitWidth",{get:function(){return this.measureText().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unitHeight",{get:function(){return this.measureText().height},enumerable:!1,configurable:!0}),t.prototype.pushMargins=function(e,t){this.marginsStack.push({left:this.margins.left,right:this.margins.right}),void 0!==e&&(this.margins.left=e),void 0!==t&&(this.margins.right=t)},t.prototype.popMargins=function(){var e=this.marginsStack.pop();this.margins.left=e.left,this.margins.right=e.right},Object.defineProperty(t.prototype,"paperWidth",{get:function(){return this.doc.internal.pageSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paperHeight",{get:function(){return this.doc.internal.pageSize.height},enumerable:!1,configurable:!0}),t.prototype.getNumberOfPages=function(){return this.doc.getNumberOfPages()},t.prototype.addPage=function(){this.doc.addPage()},t.prototype.setPage=function(e){this.doc.setPage(e+1)},t.customFonts={},t}(u)},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(31),a=n(14);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatItem=function(e,t,n,r,i){0===n?(this.radioGroupWrap=new o.b(this.question.id+(void 0===r?"":r),this.controller,this.question.isReadOnly),this.question.pdfRadioGroupWrap=this.radioGroupWrap):void 0===this.radioGroupWrap&&(this.radioGroupWrap=this.question.pdfRadioGroupWrap);var a=void 0===i?t===this.question.otherItem?this.question.isOtherSelected:t.value===this.question.value||void 0!==this.question.isItemSelected&&this.question.isItemSelected(t):i;return new o.a(this.question,this.controller,e,n,a,this.radioGroupWrap)},t}(a.a);i.a.getInstance().register("radiogroup",s),i.a.getInstance().register("buttongroup",s)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(5)),a=n(15),s=n(1),l=n(34),u=n(13);n.d(t,"a",function(){return c});var c=function(){function e(){}return e.generateFlatsPanel=function(e,t,i,o){return n.i(r.b)(this,void 0,void 0,function(){var a,c,d,h,p,f;return n.i(r.c)(this,function(m){switch(m.label){case 0:return a=[],c=s.a.clone(o),t.pushMargins(),t.margins.left+=t.measureText(i.innerIndent).width,c.xLeft+=t.measureText(i.innerIndent).width,h=(d=a.push).apply,p=[a],[4,this.generateFlatsPagePanel(e,t,i,c)];case 1:return h.apply(d,p.concat([m.sent()])),t.popMargins(),f=new l.a(o,a,i,t,u.FlatRepository.getInstance(),u),[4,e.onRenderPanel.fire(e,f)];case 2:return m.sent(),[2,n.i(r.d)([],f.bricks,!0)]}})})},e.generateFlatsPagePanel=function(t,a,l,u){return n.i(r.b)(this,void 0,void 0,function(){var c,d,h,p,f,m,g,v,y,b,_,w,C,x,S,P,k,E,A,I,T,O;return n.i(r.c)(this,function(n){switch(n.label){case 0:return l.isVisible?(l.onFirstRendering(),c=[],d=s.a.clone(u),"page"!==l.getType()||t.showPageTitles?(h=new o.a,l.title?l instanceof i.PanelModel&&l.no?[4,s.a.createTitlePanelFlat(d,a,l.no,"page"===l.getType())]:[3,2]:[3,4]):[3,7]):[2];case 1:p=n.sent(),h.addBrick(p),d.xLeft=p.xRight+a.measureText(" ").width,n.label=2;case 2:return[4,s.a.createTitlePanelFlat(d,a,l.locTitle,"page"===l.getType())];case 3:f=n.sent(),h.addBrick(f),d=s.a.createPoint(f),n.label=4;case 4:return l.description?(l.title&&(d.yTop+=a.unitWidth*e.PANEL_DESC_GAP_SCALE),[4,s.a.createDescFlat(d,null,a,l.locDescription)]):[3,6];case 5:m=n.sent(),h.addBrick(m),d=s.a.createPoint(m),n.label=6;case 6:h.isEmpty||(g=s.a.createPoint(h),h.addBrick(s.a.createRowlineFlat(g,a)),c.push(h),d.yTop+=a.unitHeight*e.PANEL_CONT_GAP_SCALE+s.a.EPSILON),n.label=7;case 7:v=0,y=l.rows,n.label=8;case 8:if(!(v<y.length))return[3,16];if(!(b=y[v]).visible)return[3,15];a.pushMargins(),_=s.a.getPageAvailableWidth(a),w=a.margins.left,C=[],x=0,n.label=9;case 9:return x<b.visibleElements.length?(S=b.visibleElements[x]).isVisible?(P=s.a.parseWidth(S.renderWidth,_-(b.visibleElements.length-1)*a.unitWidth,b.visibleElements.length),a.margins.left=w+(0!==x?a.unitWidth:0),a.margins.right=a.paperWidth-a.margins.left-P,d.xLeft=a.margins.left,w=a.margins.left+P,S instanceof i.PanelModel?(E=(k=C.push).apply,A=[C],[4,this.generateFlatsPanel(t,a,S,d)]):[3,11]):[3,13]:[3,14];case 10:return E.apply(k,A.concat([n.sent()])),[3,13];case 11:return T=(I=C.push).apply,O=[C],[4,s.a.generateQuestionFlats(t,a,S,d)];case 12:T.apply(I,O.concat([n.sent()])),n.label=13;case 13:return x++,[3,9];case 14:a.popMargins(),d.xLeft=a.margins.left,0!==C.length&&(d.yTop=s.a.mergeRects.apply(s.a,C).yBot,d.xLeft=u.xLeft,d.yTop+=a.unitHeight*e.QUES_GAP_VERT_SCALE,c.push.apply(c,C),c.push(s.a.createRowlineFlat(d,a)),d.yTop+=s.a.EPSILON),n.label=15;case 15:return v++,[3,8];case 16:return[2,c]}})})},e.popRowlines=function(e){for(;e.length>0&&e[e.length-1]instanceof a.a;)e.pop()},e.generateFlatTitle=function(t,i,a){return n.i(r.b)(this,void 0,void 0,function(){var l,u,c,d;return n.i(r.c)(this,function(n){switch(n.label){case 0:return l=new o.a,t.showTitle?t.title?[4,s.a.createTitleSurveyFlat(a,i,t.locTitle)]:[3,2]:[3,4];case 1:u=n.sent(),l.addBrick(u),a=s.a.createPoint(u),n.label=2;case 2:return t.description?(t.title&&(a.yTop+=i.unitWidth*e.PANEL_DESC_GAP_SCALE),d=(c=l).addBrick,[4,s.a.createDescFlat(a,null,i,t.locDescription)]):[3,4];case 3:d.apply(c,[n.sent()]),n.label=4;case 4:return[2,l]}})})},e.generateFlatLogoImage=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a;return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,s.a.createImageFlat(i,null,t,s.a.getLocString(e.locLogo),s.a.pxToPt(e.logoWidth),s.a.pxToPt(e.logoHeight))];case 1:return o=n.sent(),a=0,"right"===e.logoPosition?a=s.a.getPageAvailableWidth(t)-o.width:"left"!==e.logoPosition&&(a=s.a.getPageAvailableWidth(t)/2-o.width/2),o.xLeft+=a,o.xRight+=a,[2,o]}})})},e.generateFlats=function(t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,c,d,h,p,f,m,g,v,y,b,_;return n.i(r.c)(this,function(w){switch(w.label){case 0:return o=[],t.hasLogo?[3,2]:[4,this.generateFlatTitle(t,i,i.leftTopPoint)];case 1:return(c=w.sent()).isEmpty||o.push([c]),[3,11];case 2:return t.isLogoBefore?[4,this.generateFlatLogoImage(t,i,i.leftTopPoint)]:[3,5];case 3:return h=w.sent(),o.push([h]),a=s.a.createPoint(h,"top"===t.logoPosition,"top"!==t.logoPosition),"top"!==t.logoPosition?(i.pushMargins(),a.xLeft+=i.unitWidth,i.margins.left+=h.width+i.unitWidth):(a.xLeft=i.leftTopPoint.xLeft,a.yTop+=i.unitHeight/2),[4,this.generateFlatTitle(t,i,a)];case 4:return c=w.sent(),"top"!==t.logoPosition&&i.popMargins(),c.isEmpty||o[0].push(c),[3,11];case 5:return"right"!==t.logoPosition?[3,8]:[4,this.generateFlatLogoImage(t,i,i.leftTopPoint)];case 6:return h=w.sent(),o.push([h]),i.pushMargins(),i.margins.right+=h.width+i.unitWidth,[4,this.generateFlatTitle(t,i,i.leftTopPoint)];case 7:return(c=w.sent()).isEmpty||o[0].unshift(c),i.popMargins(),[3,11];case 8:return[4,this.generateFlatTitle(t,i,i.leftTopPoint)];case 9:return c=w.sent(),d=i.leftTopPoint,c.isEmpty||(o.push([c]),(d=s.a.createPoint(c)).yTop+=i.unitHeight/2),[4,this.generateFlatLogoImage(t,i,d)];case 10:h=w.sent(),0!==o.length?o[0].push(h):o.push([h]),w.label=11;case 11:p=i.leftTopPoint,0!==o.length&&(p.yTop=s.a.createPoint(s.a.mergeRects.apply(s.a,o[0])).yTop,o[0].push(s.a.createRowlineFlat(p,i)),p.yTop+=i.unitHeight*e.PANEL_CONT_GAP_SCALE+s.a.EPSILON),f=0,w.label=12;case 12:return f<t.visiblePages.length?(v=(g=(m=[]).push).apply,y=[m],[4,this.generateFlatsPagePanel(t,i,t.visiblePages[f],p)]):[3,16];case 13:return v.apply(g,y.concat([w.sent()])),b=new l.b(p,m,t.visiblePages[f],i,u.FlatRepository.getInstance(),u),[4,t.onRenderPage.fire(t,b)];case 14:w.sent(),m=n.i(r.d)([],b.bricks,!0),0===f&&0!==o.length?(_=o[0]).push.apply(_,m):o.push(m),this.popRowlines(o[o.length-1]),p.yTop=i.leftTopPoint.yTop,w.label=15;case 15:return f++,[3,12];case 16:return[2,o]}})})},e.QUES_GAP_VERT_SCALE=1.5,e.PANEL_CONT_GAP_SCALE=1,e.PANEL_DESC_GAP_SCALE=.25,e}()},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(4),a=n(1);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r)||this;return s.fieldName=i,s.readonly=o,s.checked=a,s.question=t,s.textColor=s.formBorderColor,s}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,i;return n.i(r.c)(this,function(n){switch(n.label){case 0:return this.readonly&&"acroform"!==a.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return[2,n.sent()];case 2:return e=new this.controller.doc.AcroFormCheckBox,i=a.a.formScale(this.controller,this),e.maxFontSize=this.height*i*t.FONT_SIZE_SCALE,e.caption=t.CHECKMARK_READONLY_SYMBOL,e.textAlign="center",e.fieldName=this.fieldName,e.readOnly=this.readonly,e.color=this.formBorderColor,e.value=!!this.checked&&"On",e.AS=this.checked?"/On":"/Off",e.Rect=a.a.createAcroformRect(a.a.scaleRect(this,i)),this.controller.doc.addField(e),a.a.renderFlatBorders(this.controller,this),[2]}})})},t.prototype.renderReadOnly=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,i,s,l,u;return n.i(r.c)(this,function(n){switch(n.label){case 0:return a.a.renderFlatBorders(this.controller,this),this.checked?(e=a.a.createPoint(this,!0,!0),i=this.controller.fontName,this.controller.fontName=t.CHECKMARK_READONLY_FONT,this.controller.fontSize=(s=this.controller.fontSize)*t.CHECKMARK_READONLY_FONT_SIZE_SCALE,l=this.controller.measureText(t.CHECKMARK_READONLY_SYMBOL),e.xLeft+=this.width/2-l.width/2,e.yTop+=this.height/2-l.height/2,[4,a.a.createTextFlat(e,this.question,this.controller,t.CHECKMARK_READONLY_SYMBOL,o.a)]):[3,3];case 1:return(u=n.sent()).unfold()[0].textColor=this.textColor,this.controller.fontSize=s,[4,u.render()];case 2:n.sent(),this.controller.fontName=i,n.label=3;case 3:return[2]}})})},t.FONT_SIZE_SCALE=.7,t.CHECKMARK_READONLY_SYMBOL="3",t.CHECKMARK_READONLY_FONT="zapfdingbats",t.CHECKMARK_READONLY_FONT_SIZE_SCALE=1-Math.E/10,t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(4);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(t){switch(t.label){case 0:return this.controller.fontStyle="bold",[4,e.prototype.renderInteractive.call(this)];case 1:return t.sent(),this.controller.fontStyle="normal",[2]}})})},t}(i.a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(54);n.d(t,"SurveyPDF",function(){return r.a});var i=n(1);n.d(t,"SurveyHelper",function(){return i.a});var o=n(8);n.d(t,"DocOptions",function(){return o.a}),n.d(t,"DocController",function(){return o.b});var a=n(2);n.d(t,"FlatRepository",function(){return a.a});var s=n(3);n.d(t,"FlatQuestion",function(){return s.a});var l=n(35);n.d(t,"FlatBoolean",function(){return l.a});var u=n(36);n.d(t,"FlatCheckbox",function(){return u.a});var c=n(38);n.d(t,"FlatCustomModel",function(){return c.a});var d=n(37);n.d(t,"FlatComment",function(){return d.a});var h=n(39);n.d(t,"FlatDropdown",function(){return h.a});var p=n(40);n.d(t,"FlatExpression",function(){return p.a});var f=n(41);n.d(t,"FlatFile",function(){return f.a});var m=n(42);n.d(t,"FlatHTML",function(){return m.a});var g=n(43);n.d(t,"FlatImage",function(){return g.a});var v=n(44);n.d(t,"FlatImagePicker",function(){return v.a});var y=n(48);n.d(t,"FlatPanelDynamic",function(){return y.a});var b=n(9);n.d(t,"FlatRadiogroup",function(){return b.a});var _=n(49);n.d(t,"FlatRanking",function(){return _.a});var w=n(50);n.d(t,"FlatRating",function(){return w.a});var C=n(14);n.d(t,"FlatSelectBase",function(){return C.a});var x=n(51);n.d(t,"FlatSignaturePad",function(){return x.a});var S=n(52);n.d(t,"FlatTextbox",function(){return S.a});var P=n(10);n.d(t,"FlatSurvey",function(){return P.a});var k=n(45);n.d(t,"FlatMatrix",function(){return k.a});var E=n(21);n.d(t,"FlatMatrixMultiple",function(){return E.a});var A=n(46);n.d(t,"FlatMatrixDynamic",function(){return A.a});var I=n(47);n.d(t,"FlatMultipleText",function(){return I.a});var T=n(22);n.d(t,"PagePacker",function(){return T.a});var O=n(20);n.d(t,"EventHandler",function(){return O.a});var R=n(19);n.d(t,"HorizontalAlign",function(){return R.a}),n.d(t,"VerticalAlign",function(){return R.b}),n.d(t,"DrawCanvas",function(){return R.c});var V=n(7);n.d(t,"PdfBrick",function(){return V.a});var D=n(23);n.d(t,"BooleanItemBrick",function(){return D.a});var N=n(24);n.d(t,"CheckboxItemBrick",function(){return N.a});var L=n(11);n.d(t,"CheckItemBrick",function(){return L.a});var F=n(25);n.d(t,"CommentBrick",function(){return F.a});var M=n(5);n.d(t,"CompositeBrick",function(){return M.a});var q=n(53);n.d(t,"CustomBrick",function(){return q.a});var j=n(26);n.d(t,"DropdownBrick",function(){return j.a});var B=n(27);n.d(t,"EmptyBrick",function(){return B.a});var z=n(28);n.d(t,"HTMLBrick",function(){return z.a});var U=n(29);n.d(t,"ImageBrick",function(){return U.a});var H=n(30);n.d(t,"LinkBrick",function(){return H.a});var Q=n(31);n.d(t,"RadioItemBrick",function(){return Q.a});var W=n(32);n.d(t,"RankingItemBrick",function(){return W.a});var G=n(15);n.d(t,"RowlineBrick",function(){return G.a});var $=n(17);n.d(t,"TextFieldBrick",function(){return $.a});var J=n(12);n.d(t,"TextBoldBrick",function(){return J.a});var Y=n(16);n.d(t,"TextBoxBrick",function(){return Y.a});var K=n(4);n.d(t,"TextBrick",function(){return K.a});var Z=n(33);n.d(t,"TitlePanelBrick",function(){return Z.a})},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(4),a=n(5),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatComposite=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var l,u,c,d,h,p,f,m,g;return n.i(r.c)(this,function(n){switch(n.label){case 0:return l=new a.a,u=s.a.createRect(e,this.controller.unitWidth,this.controller.unitHeight),c=this.generateFlatItem(s.a.moveRect(s.a.scaleRect(u,s.a.SELECT_ITEM_FLAT_SCALE),e.xLeft),t,i),l.addBrick(c),(d=s.a.clone(e)).xLeft=c.xRight+this.controller.unitWidth*s.a.GAP_BETWEEN_ITEM_TEXT,null===t.locText.renderedHtml?[3,2]:(p=(h=l).addBrick,[4,s.a.createTextFlat(d,this.question,this.controller,t.locText,o.a)]);case 1:p.apply(h,[n.sent()]),n.label=2;case 2:return t===this.question.otherItem&&(t.value===this.question.value||void 0!==this.question.isOtherSelected&&this.question.isOtherSelected)?((f=s.a.createPoint(l)).yTop+=this.controller.unitHeight*s.a.GAP_BETWEEN_ROWS,g=(m=l).addBrick,[4,s.a.createCommentFlat(f,this.question,this.controller,s.a.OTHER_ROWS_COUNT,!1,i)]):[3,4];case 3:g.apply(m,[n.sent()]),n.label=4;case 4:return[2,l]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=this.question.colCount,0==this.question.colCount?(t=Math.floor(s.a.getPageAvailableWidth(this.controller)/this.controller.measureText(s.a.MATRIX_COLUMN_WIDTH).width)||1,this.question.visibleChoices.length<t&&(t=this.question.visibleChoices.length)):this.question.colCount>1&&(t=s.a.getColumnWidth(this.controller,this.question.colCount)<this.controller.measureText(s.a.MATRIX_COLUMN_WIDTH).width?1:this.question.colCount),1!=t?[3,2]:[4,this.generateVerticallyItems(e,this.question.visibleChoices)];case 1:return i=n.sent(),[3,4];case 2:return[4,this.generateHorisontallyItems(e,t)];case 3:i=n.sent(),n.label=4;case 4:return[2,i]}})})},t.prototype.generateVerticallyItems=function(e,t){return n.i(r.b)(this,void 0,void 0,function(){var i,o,a,l;return n.i(r.c)(this,function(n){switch(n.label){case 0:i=s.a.clone(e),o=[],a=0,n.label=1;case 1:return a<t.length?[4,this.generateFlatComposite(i,t[a],a)]:[3,4];case 2:l=n.sent(),i.yTop=l.yBot+s.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,o.push(l),n.label=3;case 3:return a++,[3,1];case 4:return[2,o]}})})},t.prototype.generateHorisontallyItems=function(e,t){return n.i(r.b)(this,void 0,void 0,function(){var i,o,l,u,c,d;return n.i(r.c)(this,function(n){switch(n.label){case 0:i=s.a.clone(e),o=[],l=new a.a,u=0,n.label=1;case 1:return u<this.question.visibleChoices.length?(this.controller.pushMargins(this.controller.margins.left,this.controller.margins.right),s.a.setColumnMargins(this.controller,t,u%t),i.xLeft=this.controller.margins.left,[4,this.generateFlatComposite(i,this.question.visibleChoices[u],u)]):[3,4];case 2:c=n.sent(),l.addBrick(c),this.controller.popMargins(),u%t!=t-1&&u!==this.question.visibleChoices.length-1||(d=s.a.createRowlineFlat(s.a.createPoint(l),this.controller),i.yTop=d.yBot+s.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,o.push(l,d),l=new a.a),n.label=3;case 3:return u++,[3,1];case 4:return[2,o]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0);n.d(t,"a",function(){return i});var i=function(){function e(e,t,n){this.controller=e,this.color=n,this.isPageBreak=!1,this.xLeft=t.xLeft,this.xRight=t.xRight,this.yTop=t.yTop,this.yBot=t.yBot}return Object.defineProperty(e.prototype,"width",{get:function(){return this.xRight-this.xLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.yBot-this.yTop},enumerable:!1,configurable:!0}),e.prototype.render=function(){return n.i(r.b)(this,void 0,void 0,function(){var e;return n.i(r.c)(this,function(t){return null!==this.color&&(e=this.controller.doc.getDrawColor(),this.controller.doc.setDrawColor(this.color),this.controller.doc.line(this.xLeft,this.yTop,this.xRight,this.yTop),this.controller.doc.setDrawColor(e)),[2]})})},e.prototype.unfold=function(){return[this]},e}()},function(e,t,n){"use strict";var r=n(0),i=n(17),o=n(1);n.d(t,"a",function(){return a});var a=function(e){function t(t,n,r,i,a,s){void 0===i&&(i=!0),void 0===a&&(a=!1),void 0===s&&(s=0);var l=e.call(this,t,n,r,i,t.id+(i?"":"_comment"+s),o.a.getQuestionOrCommentValue(t,i),i?o.a.getLocString(t.locPlaceHolder):"",t.isReadOnly,a,t.inputType)||this;return l.isQuestion=i,l.isMultiline=a,l}return n.i(r.a)(t,e),t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(7)),a=n(1);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r,i,o,a,s,l,u,c){var d=e.call(this,t,n,r)||this;return d.isQuestion=i,d.fieldName=o,d.value=a,d.placeholder=s,d.isReadOnly=l,d.isMultiline=u,d.inputType=c,d.question=t,d}return n.i(r.a)(t,e),t.prototype.renderColorQuestion=function(){var e=this.controller.doc.getFillColor();this.controller.doc.setFillColor(this.question.value||"black"),this.controller.doc.rect(this.xLeft,this.yTop,this.width,this.height,"F"),this.controller.doc.setFillColor(e)},t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t;return n.i(r.c)(this,function(n){return"color"===this.inputType?(this.renderColorQuestion(),[2]):((e="password"===this.inputType?new this.controller.doc.AcroFormPasswordField:new this.controller.doc.AcroFormTextField).fieldName=this.fieldName,e.fontName=this.controller.fontName,e.fontSize=this.fontSize,e.isUnicode=a.a.isCustomFont(this.controller,e.fontName),"password"!==this.inputType?(e.V=" "+this.value,e.DV=" "+this.placeholder):e.value="",e.multiline=this.isMultiline,e.readOnly=this.isReadOnly,e.color=this.textColor,t=a.a.formScale(this.controller,this),e.maxFontSize=this.controller.fontSize*t,e.Rect=a.a.createAcroformRect(a.a.scaleRect(this,t)),this.controller.doc.addField(e),a.a.renderFlatBorders(this.controller,this),[2])})})},t.prototype.shouldRenderFlatBorders=function(){return"input"===i.settings.readOnlyTextRenderMode},t.prototype.renderReadOnly=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){switch(e.label){case 0:return this.controller.pushMargins(this.xLeft,this.controller.paperWidth-this.xRight),"color"!==this.inputType?[3,1]:(this.renderColorQuestion(),[3,3]);case 1:return[4,a.a.renderReadOnlyTextField(this.controller,this.question,this,a.a.getQuestionOrCommentDisplayValue(this.question,this.isQuestion),!this.isMultiline,this.shouldRenderFlatBorders())];case 2:e.sent(),e.label=3;case 3:return this.controller.popMargins(),[2]}})})},t}(o.a)},function(e,n){e.exports=t},function(e,t,n){"use strict";var r,i,o=n(0),a=n(8),s=n(4),l=n(12),u=n(1);n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return c}),function(e){e.NotSet="notset",e.Left="left",e.Center="center",e.Right="right"}(r||(r={})),function(e){e.NotSet="notset",e.Top="top",e.Middle="middle",e.Bottom="bottom"}(i||(i={}));var c=function(){function e(e,t,n,r,i){this.packs=e,this.controller=t,this._rect=n,this._countPages=r,this._pageNumber=i}return Object.defineProperty(e.prototype,"countPages",{get:function(){return this._countPages},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageNumber",{get:function(){return this._pageNumber},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rect",{get:function(){return this._rect},enumerable:!1,configurable:!0}),e.prototype.alignRect=function(e,t){void 0===e.margins?e.margins={left:0,right:0,top:0,bot:0}:(void 0===e.margins.left&&(e.margins.left=0),void 0===e.margins.right&&(e.margins.right=0),void 0===e.margins.top&&(e.margins.top=0),void 0===e.margins.bot&&(e.margins.bot=0)),void 0===e.rect&&(void 0!==e.horizontalAlign&&e.horizontalAlign!==r.NotSet||(e.horizontalAlign=r.Center),void 0!==e.verticalAlign&&e.verticalAlign!==i.NotSet||(e.verticalAlign=i.Middle));var n=u.a.clone(this.rect);if(void 0!==e.horizontalAlign)switch(e.horizontalAlign){case r.Left:n.xLeft=this.rect.xLeft+e.margins.left,n.xRight=Math.min(this.rect.xRight-e.margins.right,this.rect.xLeft+e.margins.left+t.width);break;case r.Center:n.xLeft=Math.max(this.rect.xLeft+e.margins.left,(this.rect.xLeft+this.rect.xRight-t.width)/2),n.xRight=Math.min(this.rect.xRight-e.margins.right,(this.rect.xLeft+this.rect.xRight+t.width)/2);break;case r.Right:n.xLeft=Math.max(this.rect.xLeft+e.margins.left,this.rect.xRight-e.margins.right-t.width),n.xRight=this.rect.xRight-e.margins.right}else n.xLeft=e.rect.xLeft||this.rect.xLeft,n.xRight=e.rect.xRight||this.rect.xRight;if(void 0!==e.verticalAlign)switch(e.verticalAlign){case i.Top:n.yTop=this.rect.yTop+e.margins.top,n.yBot=Math.min(this.rect.yBot-e.margins.bot,this.rect.yTop+e.margins.top+t.height);break;case i.Middle:n.yTop=Math.max(this.rect.yTop+e.margins.top,(this.rect.yTop+this.rect.yBot-t.height)/2),n.yBot=Math.min(this.rect.yBot-e.margins.bot,(this.rect.yTop+this.rect.yBot+t.height)/2);break;case i.Bottom:n.yTop=Math.max(this.rect.yTop+e.margins.top,this.rect.yBot-e.margins.bot-t.height),n.yBot=this.rect.yBot-e.margins.bot}else n.yTop=e.rect.yTop||this.rect.yTop,n.yBot=e.rect.yBot||this.rect.yBot;return n},e.prototype.drawText=function(e){void 0===(e=u.a.clone(e)).fontSize&&(e.fontSize=a.a.FONT_SIZE),void 0===e.isBold&&(e.isBold=!1);var t=this.controller.measureText(e.text,e.isBold?"bold":"normal",e.fontSize),n=this.alignRect(e,t);this.packs.push(e.isBold?new l.a(null,this.controller,n,e.text):new s.a(null,this.controller,n,e.text)),this.packs[this.packs.length-1].fontSize=e.fontSize},e.prototype.drawImage=function(e){return n.i(o.b)(this,void 0,void 0,function(){var t,r,i;return n.i(o.c)(this,function(n){switch(n.label){case 0:return void 0===(e=u.a.clone(e)).width&&(e.width=this.rect.xRight-this.rect.xLeft),void 0===e.height&&(e.height=this.rect.yBot-this.rect.yTop),t=this.alignRect(e,{width:e.width,height:e.height}),i=(r=this.packs).push,[4,u.a.createImageFlat(u.a.createPoint(t,!0,!0),null,this.controller,e.base64,t.xRight-t.xLeft,t.yBot-t.yTop)];case 1:return i.apply(r,[n.sent()]),[2]}})})},e}()},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(19)),a=n(1);n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.i(r.a)(t,e),t.prototype.unshift=function(e){this.hasFunc(e)||(null==this.callbacks&&(this.callbacks=new Array),this.callbacks.unshift(e))},t.prototype.fire=function(e,t){return n.i(r.b)(this,void 0,void 0,function(){var i;return n.i(r.c)(this,function(n){switch(n.label){case 0:if(null==this.callbacks)return[2];i=0,n.label=1;case 1:return i<this.callbacks.length?[4,this.callbacks[i](e,t)]:[3,4];case 2:n.sent(),n.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t}(i.Event),l=function(){function e(){}return e.process_header_events=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var s;return n.i(r.c)(this,function(n){switch(n.label){case 0:e.haveCommercialLicense||e.onRenderHeader.add(function(e,t){t.drawText({text:"SurveyJS PDF | Please purchase a SurveyJS PDF developer license to use it in your app | https://surveyjs.io/Buy",fontSize:10})}),s=0,n.label=1;case 1:return s<i.length?[4,e.onRenderHeader.fire(e,new o.c(i[s],t,a.a.createHeaderRect(t),i.length,s+1))]:[3,5];case 2:return n.sent(),[4,e.onRenderFooter.fire(e,new o.c(i[s],t,a.a.createFooterRect(t),i.length,s+1))];case 3:n.sent(),n.label=4;case 4:return s++,[3,1];case 5:return[2]}})})},e}()},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(3)),a=n(2),s=n(4),l=n(5),u=n(1),c=n(10);n.d(t,"a",function(){return d});var d=function(e){function t(t,n,r,i){void 0===i&&(i=!0);var o=e.call(this,t,n,r)||this;return o.survey=t,o.isMultiple=i,o.question=n,o}return n.i(r.a)(t,e),t.prototype.generateFlatsCell=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,c,d,h,p,f,m,g,v,y;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=new l.a,t.hasQuestion?t.cell.column.isShowInMultipleColumns?(c=a.a.getInstance().create(this.survey,t.question,this.controller,t.question.getType()),d=u.a.moveRect(u.a.scaleRect(u.a.createRect(e,this.controller.unitHeight,this.controller.unitHeight),u.a.SELECT_ITEM_FLAT_SCALE),e.xLeft),o.addBrick(c.generateFlatItem(d,t.item,t.choiceIndex)),[3,3]):[3,1]:[3,4];case 1:return t.question.titleLocation=u.a.TITLE_LOCATION_MATRIX,p=(h=o.addBrick).apply,f=[o],[4,u.a.generateQuestionFlats(this.survey,this.controller,t.question,e)];case 2:p.apply(h,f.concat([n.sent()])),n.label=3;case 3:return[3,8];case 4:return t.hasTitle?i?(g=(m=o).addBrick,[4,u.a.createBoldTextFlat(e,this.question,this.controller,t.locTitle)]):[3,6]:[3,8];case 5:return g.apply(m,[n.sent()]),[3,8];case 6:return y=(v=o).addBrick,[4,u.a.createTextFlat(e,this.question,this.controller,t.locTitle,s.a)];case 7:y.apply(v,[n.sent()]),n.label=8;case 8:return[2,o]}})})},t.prototype.ignoreCell=function(e,t){return!(e.hasQuestion||e.hasTitle||this.isMultiple&&0==t)},t.prototype.generateFlatsRowHorisontal=function(e,t,i,o){return n.i(r.b)(this,void 0,void 0,function(){var i,a,s,c,d,h;return n.i(r.c)(this,function(n){switch(n.label){case 0:i=new l.a,a=u.a.clone(e),s=this.controller.paperWidth-this.controller.margins.left+this.controller.unitWidth*u.a.GAP_BETWEEN_COLUMNS,this.controller.pushMargins(),c=0,d=0,n.label=1;case 1:return d<t.cells.length?this.ignoreCell(t.cells[d],d)?[3,3]:(this.controller.margins.left=this.controller.paperWidth-s+this.controller.unitWidth*u.a.GAP_BETWEEN_COLUMNS,this.controller.margins.right=this.controller.paperWidth-this.controller.margins.left-o[c],s=this.controller.margins.right,a.xLeft=this.controller.margins.left,[4,this.generateFlatsCell(a,t.cells[d],t===this.question.renderedTable.headerRow)]):[3,4];case 2:(h=n.sent()).isEmpty||(i.addBrick(h),c++),n.label=3;case 3:return d++,[3,1];case 4:return this.controller.popMargins(),[2,i]}})})},t.prototype.generateFlatsRowVertical=function(e,i,o){return n.i(r.b)(this,void 0,void 0,function(){var o,a,s,c,d,h,p;return n.i(r.c)(this,function(n){switch(n.label){case 0:o=new l.a,a=u.a.clone(e),s=0,n.label=1;case 1:return s<i.cells.length?this.ignoreCell(i.cells[s],s)?[3,5]:this.question.renderedTable.showHeader&&(!this.isMultiple||s>0)?(d=(c=o).addBrick,[4,this.generateFlatsCell(a,this.question.renderedTable.headerRow.cells[s],!1)]):[3,3]:[3,6];case 2:d.apply(c,[n.sent()]),a.yTop=o.yBot+t.GAP_BETWEEN_ROWS*this.controller.unitHeight,n.label=3;case 3:return p=(h=o).addBrick,[4,this.generateFlatsCell(a,i.cells[s],!1)];case 4:p.apply(h,[n.sent()]),a.yTop=o.yBot+t.GAP_BETWEEN_ROWS*this.controller.unitHeight,n.label=5;case 5:return s++,[3,1];case 6:return[2,o]}})})},t.prototype.calculateColumnWidth=function(e,t){for(var n=u.a.getPageAvailableWidth(this.controller)-(t-1)*this.controller.unitWidth*u.a.GAP_BETWEEN_COLUMNS,r=n,i=t,o=[],a=0;a<t;a++){var s=u.a.parseWidth(e[0].cells[a].width,n,t)||0;r-=s,0!==s&&i--,o.push(s)}if(0===i)return o;var l=this.controller.measureText(u.a.MATRIX_COLUMN_WIDTH).width,c=u.a.parseWidth(e[0].cells[0].minWidth,r,t)||0,d=Math.max(l,c,r/i);for(a=0;a<o.length;a++)0===o[a]&&(o[a]=d);return o},t.prototype.generateOneRow=function(e,t,i,o,a){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(n){switch(n.label){case 0:return o?[4,this.generateFlatsRowHorisontal(e,t,i,a)]:[3,2];case 1:return[2,n.sent()];case 2:return[4,this.generateFlatsRowVertical(e,t,i)];case 3:return[2,n.sent()]}})})},t.prototype.generateFlatsRows=function(e,i,o,a){return n.i(r.b)(this,void 0,void 0,function(){var s,d,h,p,f,m,g,v,y;return n.i(r.c)(this,function(n){switch(n.label){case 0:s=u.a.clone(e),d=[],h=0,n.label=1;case 1:return h<i.length?[4,this.generateOneRow(s,i[h],o,a,this.calculateColumnWidth(i,o))]:[3,6];case 2:if((p=n.sent()).isEmpty)return[3,5];if(h!==i.length-1&&(s.yTop=p.yBot,p.addBrick(u.a.createRowlineFlat(s,this.controller))),d.push(p),s.yTop=p.yBot+t.GAP_BETWEEN_ROWS*this.controller.unitHeight,!("none"!==this.question.detailPanelMode&&h>0))return[3,5];for(f=this.question.detailPanelValue,m=0;m<f.questions.length;m++)f.questions[m].id+="_"+h;return[4,c.a.generateFlatsPanel(this.survey,this.controller,f,s)];case 3:return g=n.sent(),(v=new l.a).addBrick.apply(v,g),s.yTop=v.yBot+t.GAP_BETWEEN_ROWS*this.controller.unitHeight,d.push(v),h!==i.length-1&&this.question.renderedTable.showHeader&&a?[4,this.generateOneRow(s,i[0],o,a,this.calculateColumnWidth(i,o))]:[3,5];case 4:y=n.sent(),s.yTop=y.yBot+t.GAP_BETWEEN_ROWS*this.controller.unitHeight,d.push(y),n.label=5;case 5:return h++,[3,1];case 6:return[2,d]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,s,c,d=this;return n.i(r.c)(this,function(n){switch(n.label){case 0:return i="vertical"===this.question.columnLayout,0===(o=(t=this.question.renderedTable).rows[0]?t.rows[0].cells.filter(function(e,t){return!d.ignoreCell(e,t)}).length:t.showHeader&&t.headerRow?t.headerRow.cells.length:t.showFooter&&t.footerRow?t.footerRow.cells.length:0)?[2,[new l.a(u.a.createRowlineFlat(e,this.controller))]]:(a=[],s=u.a.getColumnWidth(this.controller,o),c="list"!==this.question.renderAs&&"list"!==this.controller.matrixRenderAs&&s>=this.controller.measureText(u.a.MATRIX_COLUMN_WIDTH).width,t.showHeader&&c&&a.push(t.headerRow),a.push.apply(a,t.rows),t.hasRemoveRows&&i&&a.pop(),t.showFooter&&c&&a.push(t.footerRow),[4,this.generateFlatsRows(e,a,o,c)]);case 1:return[2,n.sent()]}})})},t.GAP_BETWEEN_ROWS=.5,t}(o.a);i.Serializer.removeProperty("matrixdropdown","renderAs"),i.Serializer.addProperty("matrixdropdown",{name:"renderAs",default:"auto",choices:["auto","list"]}),a.a.getInstance().register("matrixdropdown",d)},function(e,t,n){"use strict";var r=n(55),i=n.n(r),o=n(1);n.d(t,"a",function(){return a});var a=function(){function e(){}return e.findBotInterval=function(e,t,n,r){var i=e.search(t,n);return i.push({pageIndex:0,xLeft:r.margins.left,xRight:r.margins.left,yBot:r.margins.top,absBot:r.margins.top}),i.reduce(function(e,r){return Math.abs(r.xRight-t)<o.a.EPSILON||Math.abs(r.xLeft-n)<o.a.EPSILON||r.pageIndex<e.pageIndex?e:r.pageIndex>e.pageIndex||r.yBot>e.yBot?r:e},i[i.length-1])},e.addPack=function(e,t,n){for(var r=e.length;r<=t;r++)e.push([]);e[t].push(n)},e.pack=function(t,n){var r=n.paperHeight-n.margins.top-n.margins.bot,a=[];t.forEach(function(e){a.push([]),e.forEach(function(e){var t;e.height>r+o.a.EPSILON?(t=a[a.length-1]).push.apply(t,e.unfold()):a[a.length-1].push(e)})}),a.forEach(function(e){e.sort(function(e,t){return e.yTop<t.yTop?-1:e.yTop>t.yTop||e.xLeft>t.xLeft?1:e.xLeft<t.xLeft?-1:0})});var s=0,l=[],u=n.paperHeight-n.margins.bot;return a.forEach(function(t){var r=new i.a,a=0;t.forEach(function(t){var i=e.findBotInterval(r,t.xLeft,t.xRight,n),c=i.pageIndex,d=t.height;t.yTop=i.yBot+t.yTop-i.absBot,(Math.abs(t.yTop-n.margins.top)>o.a.EPSILON&&t.yTop+d>u+o.a.EPSILON||t.isPageBreak)&&(t.yTop=n.margins.top,c++,a=Math.max(a,c)),r.insert(t.xLeft,t.xRight,{pageIndex:c,xLeft:t.xLeft,xRight:t.xRight,yBot:t.yTop+d,absBot:t.yBot}),t.yBot=t.yTop+d,e.addPack(l,s+c,t)}),s+=a+1}),l},e}()},function(e,t,n){"use strict";var r=n(0),i=n(11);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r){return e.call(this,t,n,r,t.id,t.isReadOnly,t.checkedValue)||this}return n.i(r.a)(t,e),t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(11);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r,i,o){return e.call(this,t,n,r,t.id+"index"+o,t.isReadOnly||!i.isEnabled,t.isItemSelected(i))||this}return n.i(r.a)(t,e),t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(16));n.d(t,"a",function(){return a});var a=function(e){function t(t,n,r,i,o){void 0===o&&(o=0);var a=e.call(this,t,n,r,i,!0,o)||this;return a.controller=n,a}return n.i(r.a)(t,e),t.prototype.shouldRenderFlatBorders=function(){return"textarea"===i.settings.readOnlyCommentRenderMode},t}(o.a)},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(1);n.d(t,"a",function(){return a});var a=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.controller=n,i.question=t,i}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t;return n.i(r.c)(this,function(n){return(e=new this.controller.doc.AcroFormComboBox).fieldName=this.question.id,e.Rect=o.a.createAcroformRect(o.a.scaleRect(this,o.a.formScale(this.controller,this))),e.edit=!1,e.color=this.textColor,t=[],this.question.showOptionsCaption&&t.push(this.question.optionsCaption),this.question.visibleChoices.forEach(function(e){t.push(o.a.getLocString(e.locText))}),e.setOptions(t),e.fontName=this.controller.fontName,e.fontSize=this.fontSize,e.readOnly=this.question.isReadOnly,e.isUnicode=o.a.isCustomFont(this.controller,e.fontName),e.V=o.a.getDropdownQuestionValue(this.question),this.controller.doc.addField(e),o.a.renderFlatBorders(this.controller,this),[2]})})},t.prototype.renderReadOnly=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){switch(e.label){case 0:return this.controller.pushMargins(this.xLeft,this.controller.paperWidth-this.xRight),[4,o.a.renderReadOnlyTextField(this.controller,this.question,this,o.a.getDropdownQuestionValue(this.question),!(this.question.isReadOnly&&"multiLine"===this.controller.textFieldRenderAs))];case 1:return e.sent(),this.controller.popMargins(),[2]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(1);n.d(t,"a",function(){return a});var a=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var i=e.call(this,null,n,t)||this;return i.controller=n,i.isBorderVisible=!1,i.isBorderVisible=r,i}return n.i(r.a)(t,e),t.prototype.resizeBorder=function(e){var t=e?1:-1,n=this.controller.doc.getFontSize()*o.a.VALUE_READONLY_PADDING_SCALE;this.xLeft-=t*n,this.xRight+=t*n,this.yBot+=t*n},t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(e){return this.isBorderVisible&&(this.resizeBorder(!0),o.a.renderFlatBorders(this.controller,this),this.resizeBorder(!1)),[2]})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(7);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r,i,o){void 0===o&&(o=!1);var a=e.call(this,t,n,r)||this;return a.html=i,a.margins=o?{top:0,bottom:0}:{top:n.margins.top,bottom:n.margins.bot},a}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t=this;return n.i(r.c)(this,function(n){switch(n.label){case 0:return e=this.controller.fontSize,this.controller.fontSize=this.fontSize,[4,new Promise(function(e){t.controller.doc.fromHTML(t.html,t.xLeft,t.yTop,{width:t.width,pagesplit:!0},function(){[].slice.call(document.querySelectorAll("iframe")).forEach(function(e){0===e.name.lastIndexOf("jsPDFhtmlText",0)&&e.parentNode.removeChild(e)}),e()},t.margins)})];case 1:return n.sent(),this.controller.fontSize=e,[2]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(7);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,{xLeft:i.xLeft,xRight:i.xLeft+(o||0),yTop:i.yTop,yBot:i.yTop+(a||0)})||this;return s.image=r,s.originalWidth=o,s.originalHeight=a,s.isPageBreak=void 0===s.originalHeight,s}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e=this;return n.i(r.c)(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){e.controller.doc.addImage(e.image,e.xLeft,e.yTop,e.originalWidth,e.originalHeight),t()})];case 1:return t.sent(),[2]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n(1);n.d(t,"a",function(){return a});var a=function(e){function t(n,r){var i=e.call(this,n.question,n.controller,n,n.text)||this;return i.link=r,i.textColor=t.COLOR,i}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var i,a;return n.i(r.c)(this,function(n){switch(n.label){case 0:return i=this.controller.doc.getTextColor(),this.controller.doc.setTextColor(o.a.BACKGROUND_COLOR),a=this.controller.unitHeight*(this.controller.doc.getLineHeightFactor()-t.SCALE_FACTOR_MAGIC),this.controller.doc.textWithLink(this.text,this.xLeft,this.yTop+(this.yBot-this.yTop)-a,{url:this.link}),[4,e.prototype.renderInteractive.call(this)];case 1:return n.sent(),this.controller.doc.setTextColor(i),[2]}})})},t.prototype.renderReadOnly=function(){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(t){switch(t.label){case 0:return"text"!==o.a.getReadonlyRenderAs(this.question,this.controller)?[2,this.renderInteractive()]:[4,e.prototype.renderInteractive.call(this)];case 1:return t.sent(),[2]}})})},t.SCALE_FACTOR_MAGIC=.955,t.COLOR="#0000EE",t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(4),a=n(1);n.d(t,"b",function(){return s}),n.d(t,"a",function(){return l});var s=function(){function e(e,t,n){this.name=e,this.controller=t,this._readOnly=n}return e.prototype.addToPdf=function(e){this._radioGroup=new this.controller.doc.AcroFormRadioButton,this._radioGroup.fieldName=this.name,this._radioGroup.value="",this._radioGroup.readOnly=this.readOnly,this._radioGroup.color=e,this.controller.doc.addField(this._radioGroup)},Object.defineProperty(e.prototype,"radioGroup",{get:function(){return this._radioGroup},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readOnly",{get:function(){return this._readOnly},enumerable:!1,configurable:!0}),e}(),l=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r)||this;return s.index=i,s.checked=o,s.radioGroupWrap=a,s.textColor=s.formBorderColor,s}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t,i;return n.i(r.c)(this,function(n){switch(n.label){case 0:return this.radioGroupWrap.readOnly&&"acroform"!==a.a.getReadonlyRenderAs(this.question,this.controller)?[4,this.renderReadOnly()]:[3,2];case 1:return[2,n.sent()];case 2:return 0==this.index&&this.radioGroupWrap.addToPdf(this.formBorderColor),(t=this.radioGroupWrap.radioGroup.createOption(e=this.radioGroupWrap.name+"index"+this.index)).Rect=a.a.createAcroformRect(this),this.checked?(t.AS="/"+e,this.radioGroupWrap.radioGroup.value=e):t.AS="/Off",i=a.a.formScale(this.controller,this),t.Rect=a.a.createAcroformRect(a.a.scaleRect(this,i)),t.color=this.formBorderColor,a.a.renderFlatBorders(this.controller,this),this.radioGroupWrap.radioGroup.setAppearance(this.controller.doc.AcroForm.Appearance.RadioButton.Circle),[2]}})})},t.prototype.renderReadOnly=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,i,s,l;return n.i(r.c)(this,function(n){switch(n.label){case 0:return a.a.renderFlatBorders(this.controller,this),this.checked?(e=a.a.createPoint(this,!0,!0),this.controller.fontSize=(i=this.controller.fontSize)*t.RADIOMARKER_READONLY_FONT_SIZE_SCALE,s=this.controller.measureText(t.RADIOMARKER_READONLY_SYMBOL),e.xLeft+=this.width/2-s.width/2,e.yTop+=this.height/2-s.height/1.9,[4,a.a.createTextFlat(e,this.question,this.controller,t.RADIOMARKER_READONLY_SYMBOL,o.a)]):[3,3];case 1:return(l=n.sent()).unfold()[0].textColor=this.textColor,this.controller.fontSize=i,[4,l.render()];case 2:n.sent(),n.label=3;case 3:return[2]}})})},t.RADIOMARKER_READONLY_SYMBOL="\u2022",t.RADIOMARKER_READONLY_FONT_SIZE_SCALE=1.575,t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(4),a=n(11),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.number=i,o.question=t,o.textColor=o.formBorderColor,o}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t,i,l;return n.i(r.c)(this,function(n){switch(n.label){case 0:return s.a.renderFlatBorders(this.controller,this),e=s.a.createPoint(this,!0,!0),this.controller.fontSize=(t=this.controller.fontSize)*a.a.CHECKMARK_READONLY_FONT_SIZE_SCALE,i=this.controller.measureText(this.number),e.xLeft+=this.width/2-i.width/2,e.yTop+=this.height/2-i.height/2,[4,s.a.createTextFlat(e,this.question,this.controller,this.number,o.a)];case 1:return(l=n.sent()).unfold()[0].textColor=this.textColor,this.controller.fontSize=t,[4,l.render()];case 2:return n.sent(),[2]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(12),o=n(1);n.d(t,"a",function(){return a});var a=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var t;return n.i(r.c)(this,function(n){switch(n.label){case 0:return this.controller.fontSize=(t=this.controller.fontSize)*o.a.TITLE_PANEL_FONT_SIZE_SCALE,[4,e.prototype.renderInteractive.call(this)];case 1:return n.sent(),this.controller.fontSize=t,[2]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0);n.d(t,"c",function(){return o}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return s});var i=function(e,t,n,r,i){this.point=e,this.bricks=t,this.controller=n,this.repository=r,this.module=i},o=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,i,o,a)||this;return s.question=r,s}return n.i(r.a)(t,e),t}(i),a=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,i,o,a)||this;return s.panel=r,s}return n.i(r.a)(t,e),t}(i),s=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,i,o,a)||this;return s.page=r,s}return n.i(r.a)(t,e),t}(i)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(3)),a=n(2),s=n(4),l=n(23),u=n(5),c=n(1),d=n(9);n.d(t,"a",function(){return h});var h=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,d,h,p;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=new u.a,o=new l.a(this.question,this.controller,c.a.moveRect(c.a.scaleRect(c.a.createRect(e,i=this.controller.unitHeight,i),c.a.SELECT_ITEM_FLAT_SCALE),e.xLeft)),t.addBrick(o),(a=c.a.clone(e)).xLeft=o.xRight+this.controller.unitWidth*c.a.GAP_BETWEEN_ITEM_TEXT,null===(d=this.question.isIndeterminate?null:this.question.checkedValue?this.question.locLabelTrue:this.question.locLabelFalse)||null===d.renderedHtml?[3,2]:(p=(h=t).addBrick,[4,c.a.createTextFlat(a,this.question,this.controller,d,s.a)]);case 1:p.apply(h,[n.sent()]),n.label=2;case 2:return[2,[t]]}})})},t}(o.a),p=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=i.getRadiogroupQuestion(n),i}return n.i(r.a)(t,e),t.prototype.getRadiogroupQuestion=function(e){var t=new i.QuestionRadiogroupModel(e.name),n=t.toJSON(),r=e.toJSON();for(var o in r)n[o]=r[o];t.fromJSON(n);var a=new i.ItemValue(void 0!==e.valueFalse?e.valueFalse:"false");a.locOwner=e,a.setLocText(e.locLabelFalse);var s=new i.ItemValue(void 0!==e.valueTrue?e.valueTrue:"true");return s.locOwner=e,s.setLocText(e.locLabelTrue),t.choices=[a,s],t.value=e.value,t},t}(d.a);a.a.getInstance().register("boolean",h),a.a.getInstance().register("boolean-radiogroup",p)},function(e,t,n){"use strict";var r=n(0),i=n(14),o=n(2),a=n(24);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatItem=function(e,t,n){return new a.a(this.question,this.controller,e,t,n)},t}(i.a);o.a.getInstance().register("checkbox",s)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(1);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(t){switch(t.label){case 0:return[4,a.a.createCommentFlat(e,this.question,this.controller,this.question.rows,!0)];case 1:return[2,[t.sent()]]}})})},t}(i.a);o.a.getInstance().register("comment",s)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2);n.d(t,"a",function(){return a});var a=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(t){return[2,o.a.getInstance().create(this.survey,this.question,this.controller,this.question.getType()).generateFlatsContent(e)]})})},t}(i.a);o.a.getInstance().register("custom_model",a)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(26),s=n(5),l=n(1);n.d(t,"a",function(){return u});var u=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,u,c,d;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=l.a.createTextFieldRect(e,this.controller),this.question.isReadOnly&&"multiLine"===this.controller.textFieldRenderAs?[4,l.a.createReadOnlyTextFieldTextFlat(e,this.controller,this.question,l.a.getDropdownQuestionValue(this.question),!1)]:[3,2];case 1:i=n.sent(),t.yBot=Math.max(t.yBot,i.yBot+this.controller.unitHeight*l.a.VALUE_READONLY_PADDING_SCALE),n.label=2;case 2:return o=new s.a(new a.a(this.question,this.controller,t)),this.question.isOtherSelected?((u=l.a.createPoint(o)).yTop+=this.controller.unitHeight*l.a.GAP_BETWEEN_ROWS,d=(c=o).addBrick,[4,l.a.createCommentFlat(u,this.question,this.controller,l.a.OTHER_ROWS_COUNT,!1)]):[3,4];case 3:d.apply(c,[n.sent()]),n.label=4;case 4:return[2,[o]]}})})},t}(i.a);o.a.getInstance().register("dropdown",u)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(17),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t;return n.i(r.c)(this,function(n){return t=s.a.createTextFieldRect(e,this.controller),[2,[new a.a(this.question,this.controller,t,!0,this.question.id,this.question.displayValue,"",!0,!1,"text")]]})})},t}(i.a);o.a.getInstance().register("expression",l)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(3)),a=n(2),s=n(4),l=n(5),u=n(1);n.d(t,"a",function(){return c});var c=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatItem=function(e,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,s,c,d,h;return n.i(r.c)(this,function(n){switch(n.label){case 0:return a=l.a.bind,[4,u.a.createLinkFlat(e,this.question,this.controller,void 0===i.name?"image":i.name,i.content)];case 1:return o=new(a.apply(l.a,[void 0,n.sent()])),u.a.canPreviewImage(this.question,i,i.content)?[4,u.a.getImageSize(i.content)]:[3,4];case 2:return s=n.sent(),this.question.imageWidth&&(s.width=u.a.parseWidth(this.question.imageWidth,u.a.getPageAvailableWidth(this.controller))),this.question.imageHeight&&(s.height=u.a.parseWidth(this.question.imageHeight,u.a.getPageAvailableWidth(this.controller))),(c=u.a.createPoint(o)).yTop+=this.controller.unitHeight*t.IMAGE_GAP_SCALE,h=(d=o).addBrick,[4,u.a.createImageFlat(c,this.question,this.controller,i.content,s.width,s.height)];case 3:h.apply(d,[n.sent()]),n.label=4;case 4:return[2,o]}})})},t.prototype.addLine=function(e,t,n){n!==this.question.previewValue.length-1&&(e[e.length-1].addBrick(u.a.createRowlineFlat(t,this.controller)),t.yTop+=u.a.EPSILON,e.push(new l.a))},t.prototype.getImagePreviewContentWidth=function(e,i){return n.i(r.b)(this,void 0,void 0,function(){var o;return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,u.a.getImageSize(e.content)];case 1:return o=n.sent().width,this.question.imageWidth?o=u.a.parseWidth(this.question.imageWidth,i):this.controller.applyImageFit&&(o=i),void 0===o&&(o=0),[2,Math.max(o,t.TEXT_MIN_SCALE*this.controller.unitWidth)]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,o,a,c,d,h,p,f;return n.i(r.c)(this,function(n){switch(n.label){case 0:return 0!==this.question.previewValue.length?[3,2]:[4,u.a.createTextFlat(e,this.question,this.controller,i.surveyLocalization.getString("noFileChosen"),s.a)];case 1:return[2,[n.sent()]];case 2:t=[new l.a],o=u.a.clone(e),a=o.yTop,c=0,n.label=3;case 3:return c<this.question.previewValue.length?(h=this.controller.paperWidth-this.controller.margins.right-o.xLeft,u.a.canPreviewImage(this.question,d=this.question.previewValue[c],d.content)?[4,this.getImagePreviewContentWidth(d,h)]:[3,6]):[3,10];case 4:return p=n.sent(),h<p&&(o.xLeft=e.xLeft,o.yTop=a,this.addLine(t,o,c)),this.controller.pushMargins(o.xLeft,this.controller.paperWidth-o.xLeft-p),[4,this.generateFlatItem(o,d)];case 5:return f=n.sent(),t[t.length-1].addBrick(f),o.xLeft+=f.width,a=Math.max(a,f.yBot),this.controller.popMargins(),[3,8];case 6:return h<this.controller.unitWidth&&(o.xLeft=e.xLeft,o.yTop=a,this.addLine(t,o,c)),[4,this.generateFlatItem(o,d)];case 7:f=n.sent(),t[t.length-1].addBrick(f),o.xLeft+=f.xRight-f.xLeft,a=Math.max(a,f.yBot),n.label=8;case 8:o.xLeft+=this.controller.unitWidth,n.label=9;case 9:return c++,[3,3];case 10:return[2,t]}})})},t.IMAGE_GAP_SCALE=.195,t.TEXT_MIN_SCALE=5,t}(o.a);a.a.getInstance().register("file",c)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(3)),a=n(2),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i}return n.i(r.a)(t,e),t.prototype.chooseRender=function(e){return/<[^>]*style[^<]*>/.test(e)||/<[^>]*table[^<]*>/.test(e)||/&\w+;/.test(e)?"image":"standard"},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,l,u,c;return n.i(r.c)(this,function(n){switch(n.label){case 0:return"auto"===(t=this.question.renderAs)&&(t=this.controller.htmlRenderAs),"auto"===t&&(t=this.chooseRender(s.a.getLocString(this.question.locHtml))),i=s.a.createHtmlContainerBlock(s.a.getLocString(this.question.locHtml),this.controller,t),"image"!==t?[3,3]:(o=s.a.getPageAvailableWidth(this.controller),[4,s.a.htmlToImage(i,o,this.controller)]);case 1:return a=n.sent(),[4,s.a.createImageFlat(e,this.question,this.controller,a.url,o,o/a.aspect)];case 2:return[2,[n.sent()]];case 3:return u=(l=s.a).splitHtmlRect,c=[this.controller],[4,s.a.createHTMLFlat(e,this.question,this.controller,i)];case 4:return[2,[u.apply(l,c.concat([n.sent()]))]]}})})},t}(o.a);i.Serializer.removeProperty("html","renderAs"),i.Serializer.addProperty("html",{name:"renderAs",default:"auto",choices:["auto","standard","image"]}),a.a.getInstance().register("html",l)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(1);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=a.a.pxToPt(this.question.imageWidth),i=a.a.pxToPt(this.question.imageHeight),[4,a.a.createImageFlat(e,this.question,this.controller,this.question.imageLink,t,i)];case 1:return[2,[n.sent()]]}})})},t}(i.a);o.a.getInstance().register("image",s)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(4),s=n(9),l=n(11),u=n(5),c=n(1);n.d(t,"a",function(){return d});var d=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatItem=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,s,d,h,p,f;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=c.a.getPageAvailableWidth(this.controller),[4,c.a.createImageFlat(e,this.question,this.controller,t.imageLink,o,o/c.a.IMAGEPICKER_RATIO)];case 1:return s=n.sent(),d=new u.a(s),h=c.a.createPoint(d),this.question.showLabel?[4,c.a.createTextFlat(h,this.question,this.controller,t.text||t.value,a.a)]:[3,3];case 2:p=n.sent(),d.addBrick(p),h=c.a.createPoint(p),n.label=3;case 3:return f=c.a.createRect(h,o,this.controller.unitHeight),d.addBrick(this.question.multiSelect?new l.a(this.question,this.controller,f,this.question.id+"index"+i,this.question.isReadOnly||!t.isEnabled,-1!==this.question.value.indexOf(t.value)):this.radio.generateFlatItem(f,t,i)),[2,d]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,l,d,h,p,f,m,g,v;return n.i(r.c)(this,function(n){switch(n.label){case 0:this.radio=this.question.multiSelect?null:new s.a(this.survey,this.question,this.controller),t=[new u.a],i=c.a.getImagePickerAvailableWidth(this.controller)/c.a.IMAGEPICKER_COUNT,o=(o=~~(c.a.getPageAvailableWidth(this.controller)/i)||1)<=(a=this.question.visibleChoices.length)?o:a,l=~~Math.ceil(a/o),d=c.a.clone(e),h=0,n.label=1;case 1:if(!(h<l))return[3,7];p=d.yTop,this.controller.pushMargins(),f=this.controller.margins.left,m=0,n.label=2;case 2:return m<o?(g=h*o+m)==a?[3,5]:(this.controller.margins.left=f,this.controller.margins.right=this.controller.paperWidth-f-i,f=this.controller.paperWidth-this.controller.margins.right+this.controller.unitWidth,d.xLeft=this.controller.margins.left,[4,this.generateFlatItem(d,this.question.visibleChoices[g],g)]):[3,5];case 3:v=n.sent(),t[t.length-1].addBrick(v),p=Math.max(p,v.yBot),n.label=4;case 4:return m++,[3,2];case 5:this.controller.popMargins(),d.xLeft=e.xLeft,d.yTop=p,h!==l-1&&(t[t.length-1].addBrick(c.a.createRowlineFlat(d,this.controller)),d.yTop+=c.a.EPSILON,t.push(new u.a)),n.label=6;case 6:return h++,[3,1];case 7:return[2,t]}})})},t}(i.a);o.a.getInstance().register("imagepicker",d)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(3)),a=n(9),s=n(2),l=n(4),u=n(5),c=n(1);n.d(t,"a",function(){return d});var d=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsHeader=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,s,l,d,h;return n.i(r.c)(this,function(p){switch(p.label){case 0:t=[],i=c.a.clone(e),o=this.question.visibleColumns.length+(this.question.hasRows?1:0),a=0,p.label=1;case 1:return a<this.question.visibleColumns.length?(s=this.question.hasRows?a+1:a,this.controller.pushMargins(),c.a.setColumnMargins(this.controller,o,s),i.xLeft=this.controller.margins.left,d=(l=t).push,[4,c.a.createBoldTextFlat(i,this.question,this.controller,this.question.visibleColumns[a].locText)]):[3,4];case 2:d.apply(l,[p.sent()]),this.controller.popMargins(),p.label=3;case 3:return a++,[3,1];case 4:return[2,[h=new(u.a.bind.apply(u.a,n.i(r.d)([void 0],t,!1))),c.a.createRowlineFlat(c.a.createPoint(h),this.controller)]]}})})},t.prototype.generateFlatsRows=function(e,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,s,l;return n.i(r.c)(this,function(n){switch(n.label){case 0:o=[],a=c.a.clone(e),s=0,n.label=1;case 1:return s<this.question.visibleRows.length?[4,new h(this.survey,this.question,this.controller,this.question.visibleRows[s],"row"+s,0==s,i).generateFlatsContent(a)]:[3,4];case 2:l=n.sent(),(a=c.a.createPoint(c.a.mergeRects.apply(c.a,l))).yTop+=this.controller.unitHeight*t.GAP_BETWEEN_ROWS,o.push.apply(o,l),n.label=3;case 3:return s++,[3,1];case 4:return[2,o]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var i,o,a,s,l,u,d,h;return n.i(r.c)(this,function(n){switch(n.label){case 0:return i=c.a.getColumnWidth(this.controller,this.question.visibleColumns.length+(this.question.hasRows?1:0)),o="list"===this.question.renderAs||"list"===this.controller.matrixRenderAs||i<this.controller.measureText(c.a.MATRIX_COLUMN_WIDTH).width,a=c.a.clone(e),s=[],o||!this.question.showHeader||0==this.question.visibleColumns.length?[3,2]:[4,this.generateFlatsHeader(a)];case 1:l=n.sent(),(a=c.a.createPoint(c.a.mergeRects.apply(c.a,l))).yTop+=t.GAP_BETWEEN_ROWS*this.controller.unitHeight,s.push.apply(s,l),n.label=2;case 2:return d=(u=s.push).apply,h=[s],[4,this.generateFlatsRows(a,o)];case 3:return d.apply(u,h.concat([n.sent()])),[2,s]}})})},t.GAP_BETWEEN_ROWS=.5,t}(o.a),h=function(e){function t(t,n,r,i,o,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=e.call(this,t,n,r)||this;return l.survey=t,l.controller=r,l.row=i,l.key=o,l.isFirst=a,l.isVertical=s,l.questionMatrix=n,l}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t;return n.i(r.c)(this,function(n){switch(n.label){case 0:return this.isVertical?[4,this.generateFlatsVerticallyCells(e)]:[3,2];case 1:return t=n.sent(),[3,4];case 2:return[4,this.generateFlatsHorizontallyCells(e)];case 3:t=n.sent(),n.label=4;case 4:return[2,t]}})})},t.prototype.generateTextComposite=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,s,d,h;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=c.a.clone(e),a=this.row.value==t.value,s=c.a.createRect(o,c.a.getPageAvailableWidth(this.controller),this.controller.unitHeight),d=this.generateFlatItem(s,t,i,this.key,a),o.yTop=d.yBot+this.controller.unitHeight*c.a.GAP_BETWEEN_ITEM_TEXT,[4,c.a.createTextFlat(o,this.questionMatrix,this.controller,this.questionMatrix.getCellDisplayLocText(this.row.name,t),l.a)];case 1:return h=n.sent(),[2,new u.a(d,h)]}})})},t.prototype.generateItemCompoiste=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,s,d,h;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=c.a.clone(e),a=this.row.value==t.value,s=c.a.createRect(o,this.controller.unitHeight,this.controller.unitHeight),d=this.generateFlatItem(c.a.moveRect(c.a.scaleRect(s,c.a.SELECT_ITEM_FLAT_SCALE),s.xLeft),t,i,this.key,a),o.xLeft=d.xRight+this.controller.unitWidth*c.a.GAP_BETWEEN_ITEM_TEXT,[4,c.a.createTextFlat(o,this.questionMatrix,this.controller,t.locText,l.a)];case 1:return h=n.sent(),[2,new u.a(d,h)]}})})},t.prototype.generateFlatsHorizontallyCells=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,s,d,h,p,f,m,g,v,y;return n.i(r.c)(this,function(b){switch(b.label){case 0:return t=[],i=c.a.clone(e),o=this.questionMatrix.visibleColumns.length+(this.questionMatrix.hasRows?1:0),this.questionMatrix.hasRows?(this.controller.pushMargins(),c.a.setColumnMargins(this.controller,o,0),i.xLeft=this.controller.margins.left,s=(a=t).push,[4,c.a.createTextFlat(i,this.questionMatrix,this.controller,this.row.locText,l.a)]):[3,2];case 1:s.apply(a,[b.sent()]),this.controller.popMargins(),b.label=2;case 2:d=0,b.label=3;case 3:return d<this.questionMatrix.visibleColumns.length?(p=this.row.value==(h=this.questionMatrix.visibleColumns[d]).value,f=this.questionMatrix.hasRows?d+1:d,this.controller.pushMargins(),c.a.setColumnMargins(this.controller,o,f),i.xLeft=this.controller.margins.left,this.questionMatrix.hasCellText?(g=(m=t).push,[4,this.generateTextComposite(i,h,d)]):[3,5]):[3,8];case 4:return g.apply(m,[b.sent()]),[3,6];case 5:v=c.a.createRect(i,this.controller.unitHeight,this.controller.unitHeight),t.push(this.generateFlatItem(c.a.moveRect(c.a.scaleRect(v,c.a.SELECT_ITEM_FLAT_SCALE),i.xLeft),h,d,this.key,p)),b.label=6;case 6:this.controller.popMargins(),b.label=7;case 7:return d++,[3,3];case 8:return[2,[y=new(u.a.bind.apply(u.a,n.i(r.d)([void 0],t,!1))),c.a.createRowlineFlat(c.a.createPoint(y),this.controller)]]}})})},t.prototype.generateFlatsVerticallyCells=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,a,s,d,h,p;return n.i(r.c)(this,function(f){switch(f.label){case 0:return t=[],i=c.a.clone(e),this.questionMatrix.hasRows?[4,c.a.createTextFlat(i,this.questionMatrix,this.controller,this.row.locText,l.a)]:[3,2];case 1:a=f.sent(),i.yTop=a.yBot+o.a.CONTENT_GAP_VERT_SCALE*this.controller.unitHeight,t.push(a),f.label=2;case 2:return this.generateFlatComposite=this.questionMatrix.hasCellText?this.generateTextComposite:this.generateItemCompoiste,d=(s=t.push).apply,h=[t],[4,this.generateVerticallyItems(i,this.questionMatrix.visibleColumns)];case 3:return d.apply(s,h.concat([f.sent()])),[2,[p=new(u.a.bind.apply(u.a,n.i(r.d)([void 0],t,!1))),c.a.createRowlineFlat(c.a.createPoint(p),this.controller)]]}})})},t}(a.a);i.Serializer.removeProperty("matrix","renderAs"),i.Serializer.addProperty("matrix",{name:"renderAs",default:"auto",choices:["auto","list"]}),s.a.getInstance().register("matrix",d)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(2)),a=n(21);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r){var i=e.call(this,t,n,r,!1)||this;return i.survey=t,i}return n.i(r.a)(t,e),t}(a.a);i.Serializer.removeProperty("matrixdynamic","renderAs"),i.Serializer.addProperty("matrixdynamic",{name:"renderAs",default:"auto",choices:["auto","list"]}),o.a.getInstance().register("matrixdynamic",s)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(5),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatItem=function(e,t,i,l){return n.i(r.b)(this,void 0,void 0,function(){var t,i,u,c,d,h,p,f;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=s.a.getPageAvailableWidth(this.controller),this.controller.pushMargins(),this.controller.margins.right=this.controller.paperWidth-this.controller.margins.left-t*s.a.MULTIPLETEXT_TEXT_PERS,u=a.a.bind,[4,s.a.createBoldTextFlat(e,this.question,this.controller,l.locTitle)];case 1:return i=new(u.apply(a.a,[void 0,n.sent()])),this.controller.popMargins(),c=o.a.getInstance().create(this.survey,l.editor,this.controller,"text"),d=s.a.createTextFieldRect({xLeft:e.xLeft+t*s.a.MULTIPLETEXT_TEXT_PERS,yTop:e.yTop},this.controller),p=(h=i.addBrick).apply,f=[i],[4,c.generateFlatsContent(d)];case 2:return p.apply(h,f.concat([n.sent()])),[2,i]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var i,o,l,u,c,d,h;return n.i(r.c)(this,function(n){switch(n.label){case 0:i=[],o=s.a.clone(e),l=this.question.getRows(),u=0,n.label=1;case 1:if(!(u<l.length))return[3,7];i.push(new a.a),c=o.yTop,this.controller.pushMargins(),d=0,n.label=2;case 2:return d<l[u].length?(this.controller.pushMargins(),s.a.setColumnMargins(this.controller,this.question.colCount,d),o.xLeft=this.controller.margins.left,[4,this.generateFlatItem(o,u,d,l[u][d])]):[3,5];case 3:h=n.sent(),i[i.length-1].addBrick(h),c=Math.max(c,h.yBot),this.controller.popMargins(),n.label=4;case 4:return d++,[3,2];case 5:this.controller.popMargins(),o.xLeft=e.xLeft,o.yTop=c,i[i.length-1].addBrick(s.a.createRowlineFlat(o,this.controller)),o.yTop+=s.a.EPSILON,o.yTop+=this.controller.unitHeight*t.ROWS_GAP_SCALE,n.label=6;case 6:return u++,[3,1];case 7:return[2,i]}})})},t.ROWS_GAP_SCALE=.195,t}(i.a);o.a.getInstance().register("multipletext",l)},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(3),a=n(2),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var o,a,l,u,c;return n.i(r.c)(this,function(n){switch(n.label){case 0:o=[],a=s.a.clone(e),l=0,u=this.question.panels,n.label=1;case 1:return l<u.length?[4,i.a.generateFlatsPanel(this.survey,this.controller,u[l],a)]:[3,4];case 2:0!==(c=n.sent()).length&&(a.yTop=s.a.mergeRects.apply(s.a,c).yBot,a.yTop+=this.controller.unitHeight*t.GAP_BETWEEN_PANELS,o.push.apply(o,c)),n.label=3;case 3:return l++,[3,1];case 4:return[2,o]}})})},t.GAP_BETWEEN_PANELS=.75,t}(o.a);a.a.getInstance().register("paneldynamic",l)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(4),s=n(32),l=n(5),u=n(1);n.d(t,"a",function(){return c});var c=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatComposite=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,c,d,h,p;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=u.a.createRect(e,this.controller.unitWidth,this.controller.unitHeight),c=u.a.moveRect(u.a.scaleRect(o,u.a.SELECT_ITEM_FLAT_SCALE),e.xLeft),d=new s.a(this.question,this.controller,c,this.question.getNumberByIndex(i)),(h=u.a.clone(e)).xLeft=d.xRight+this.controller.unitWidth*u.a.GAP_BETWEEN_ITEM_TEXT,[4,u.a.createTextFlat(h,this.question,this.controller,t.locText,a.a)];case 1:return p=n.sent(),[2,new l.a(d,p)]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a;return n.i(r.c)(this,function(n){switch(n.label){case 0:t=u.a.clone(e),i=[],o=0,n.label=1;case 1:return o<this.question.rankingChoices.length?[4,this.generateFlatComposite(t,this.question.rankingChoices[o],o)]:[3,4];case 2:a=n.sent(),t.yTop=a.yBot+u.a.GAP_BETWEEN_ROWS*this.controller.unitHeight,i.push(a),n.label=3;case 3:return o++,[3,1];case 4:return[2,i]}})})},t}(i.a);o.a.getInstance().register("ranking",c)},function(e,t,n){"use strict";var r=n(0),i=n(9),o=n(2),a=n(4),s=n(5),l=n(1);n.d(t,"a",function(){return u});var u=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.controller=r,i.questionRating=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatHorisontalComposite=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,a,u,c,d,h,p;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=l.a.getRatingItemText(this.questionRating,i,t.locText),this.controller.pushMargins(),this.controller.margins.left+=a=this.controller.unitWidth/2,this.controller.margins.right+=a,(u=l.a.clone(e)).xLeft+=a,d=s.a.bind,[4,l.a.createBoldTextFlat(u,this.questionRating,this.controller,o)];case 1:return c=new(d.apply(s.a,[void 0,n.sent()])),this.controller.popMargins(),(h=c.width)<l.a.getRatingMinWidth(this.controller)?(c.xLeft+=(l.a.getRatingMinWidth(this.controller)-h)/2-a,h=l.a.getRatingMinWidth(this.controller)):h+=this.controller.unitWidth,(p=l.a.createPoint(c)).xLeft=e.xLeft,c.addBrick(this.generateFlatItem(l.a.createRect(p,h,this.controller.unitHeight),t,i)),[2,c]}})})},t.prototype.generateFlatComposite=function(e,t,i){return n.i(r.b)(this,void 0,void 0,function(){var o,u,c,d,h,p,f;return n.i(r.c)(this,function(n){switch(n.label){case 0:return o=new s.a,u=l.a.createRect(e,this.controller.unitHeight,this.controller.unitHeight),c=this.generateFlatItem(l.a.moveRect(l.a.scaleRect(u,l.a.SELECT_ITEM_FLAT_SCALE),e.xLeft),t,i),o.addBrick(c),(d=l.a.clone(e)).xLeft=c.xRight+this.controller.unitWidth*l.a.GAP_BETWEEN_ITEM_TEXT,null==(h=l.a.getRatingItemText(this.questionRating,i,t.locText))?[3,2]:(f=(p=o).addBrick,[4,l.a.createTextFlat(d,this.question,this.controller,h,a.a)]);case 1:f.apply(p,[n.sent()]),n.label=2;case 2:return[2,o]}})})},t.prototype.generateHorisontallyItems=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,a,u;return n.i(r.c)(this,function(n){switch(n.label){case 0:t=[new s.a],i=l.a.clone(e),o=0,n.label=1;case 1:return o<this.questionRating.visibleRateValues.length?[4,this.generateFlatHorisontalComposite(i,this.questionRating.visibleRateValues[o],o)]:[3,4];case 2:a=n.sent(),t[t.length-1].addBrick(a),u=this.controller.paperWidth-this.controller.margins.right-a.xRight,l.a.getRatingMinWidth(this.controller)<=u+l.a.EPSILON?i.xLeft=a.xRight:(i.xLeft=e.xLeft,i.yTop=a.yBot,o!==this.questionRating.visibleRateValues.length-1&&(t[t.length-1].addBrick(l.a.createRowlineFlat(i,this.controller)),i.yTop+=l.a.EPSILON,t.push(new s.a))),n.label=3;case 3:return o++,[3,1];case 4:return[2,t]}})})},t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o;return n.i(r.c)(this,function(n){for(t=!1,i=0;i<this.questionRating.visibleRateValues.length;i++)o=l.a.getRatingItemText(this.questionRating,i,this.questionRating.visibleRateValues[i].locText),this.controller.measureText(o).width>this.controller.measureText(l.a.RATING_COLUMN_WIDTH).width&&(t=!0);return[2,t?this.generateVerticallyItems(e,this.questionRating.visibleRateValues):this.generateHorisontallyItems(e)]})})},t}(i.a);o.a.getInstance().register("rating",u)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(1);n.d(t,"a",function(){return s});var s=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){return n.i(r.c)(this,function(t){switch(t.label){case 0:return[4,a.a.createImageFlat(e,this.question,this.controller,this.question.value,a.a.pxToPt(this.question.signatureWidth),a.a.pxToPt(this.question.signatureHeight))];case 1:return[2,[t.sent()]]}})})},t}(i.a);o.a.getInstance().register("signaturepad",s)},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(2),a=n(16),s=n(1);n.d(t,"a",function(){return l});var l=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.survey=t,i.question=n,i}return n.i(r.a)(t,e),t.prototype.generateFlatsContent=function(e){return n.i(r.b)(this,void 0,void 0,function(){var i;return n.i(r.c)(this,function(n){switch(n.label){case 0:return"singleLine"===this.controller.textFieldRenderAs?(i=s.a.createTextFieldRect(e,this.controller),[2,[new a.a(this.question,this.controller,i)]]):[4,s.a.createCommentFlat(e,this.question,this.controller,t.MULTILINE_TEXT_ROWS_COUNT,!0)];case 1:return[2,[n.sent()]]}})})},t.MULTILINE_TEXT_ROWS_COUNT=1,t}(i.a);o.a.getInstance().register("text",l)},function(e,t,n){"use strict";var r=n(0),i=n(7);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r){var i=e.call(this,t,n,r(n.helperDoc,t,0,0))||this;return i.renderFunc=r,i}return n.i(r.a)(t,e),t.prototype.renderInteractive=function(){return n.i(r.b)(this,void 0,void 0,function(){var e=this;return n.i(r.c)(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){e.renderFunc(e.controller.doc,e.question,e.xLeft,e.yTop),t()})];case 1:return t.sent(),[2]}})})},t}(i.a)},function(e,t,n){"use strict";var r=n(0),i=n(6),o=(n.n(i),n(8)),a=n(10),s=n(22),l=n(20),u=n(1);n.d(t,"a",function(){return c});var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.onRenderHeader=new l.b,r.onRenderFooter=new l.b,r.onRenderQuestion=new l.b,r.onRenderPanel=new l.b,r.onRenderPage=new l.b,void 0===n&&(n={}),r.options=u.a.clone(n),r._haveCommercialLicense=n.commercial||n.haveCommercialLicense,r}return n.i(r.a)(t,e),Object.defineProperty(t.prototype,"haveCommercialLicense",{get:function(){return this._haveCommercialLicense},set:function(e){this._haveCommercialLicense=e},enumerable:!1,configurable:!0}),t.prototype.waitForQuestionIsReady=function(e){return new Promise(function(t){if(e.isReady)t();else{e.onReadyChanged.add(function n(r,i){i.isReady&&(e.onReadyChanged.remove(n),t())})}})},t.prototype.waitForCoreIsReady=function(){return n.i(r.b)(this,void 0,void 0,function(){var e,t,i,o,a,s;return n.i(r.c)(this,function(n){switch(n.label){case 0:e=0,t=this.getAllQuestions(),n.label=1;case 1:if(!(e<t.length))return[3,9];if(!(i=t[e]).contentPanel)return[3,6];i.contentPanel.addQuestionsToList(o=[]),a=0,s=o,n.label=2;case 2:return a<s.length?[4,this.waitForQuestionIsReady(s[a])]:[3,5];case 3:n.sent(),n.label=4;case 4:return a++,[3,2];case 5:return[3,8];case 6:return[4,this.waitForQuestionIsReady(u.a.getContentQuestion(i))];case 7:n.sent(),n.label=8;case 8:return e++,[3,1];case 9:return[2]}})})},t.prototype.renderSurvey=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t,i,o,u;return n.i(r.c)(this,function(n){switch(n.label){case 0:return[4,this.waitForCoreIsReady()];case 1:return n.sent(),[4,a.a.generateFlats(this,e)];case 2:return t=n.sent(),i=s.a.pack(t,e),[4,l.a.process_header_events(this,e,i)];case 3:n.sent(),o=0,n.label=4;case 4:if(!(o<i.length))return[3,9];u=0,n.label=5;case 5:return u<i[o].length?(e.getNumberOfPages()===o&&e.addPage(),e.setPage(o),[4,i[o][u].render()]):[3,8];case 6:n.sent(),n.label=7;case 7:return u++,[3,5];case 8:return o++,[3,4];case 9:return[2]}})})},t.prototype.save=function(e){return void 0===e&&(e="survey_result.pdf"),n.i(r.b)(this,void 0,void 0,function(){var t;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=new o.b(this.options),u.a.fixFont(t),[4,this.renderSurvey(t)];case 1:return n.sent(),[2,t.doc.save(e,{returnPromise:!0})]}})})},t.prototype.raw=function(e){return n.i(r.b)(this,void 0,void 0,function(){var t;return n.i(r.c)(this,function(n){switch(n.label){case 0:return t=new o.b(this.options),u.a.fixFont(t),[4,this.renderSurvey(t)];case 1:return n.sent(),[2,t.doc.output(e)]}})})},t}(i.SurveyModel)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(56);function i(e){return void 0===e?-1:e.height}var o=function(){function e(e,t){this.intervalTree=e,this.records=[],this.height=0,this.key=t.low,this.max=t.high,this.records.push(t)}return e.prototype.getNodeHigh=function(){for(var e=this.records[0].high,t=1;t<this.records.length;t++)this.records[t].high>e&&(e=this.records[t].high);return e},e.prototype.updateHeight=function(){this.height=Math.max(i(this.left),i(this.right))+1},e.prototype.updateMaxOfParents=function(){if(void 0!==this){var e=this.getNodeHigh();this.max=void 0!==this.left&&void 0!==this.right?Math.max(Math.max(this.left.max,this.right.max),e):void 0!==this.left&&void 0===this.right?Math.max(this.left.max,e):void 0===this.left&&void 0!==this.right?Math.max(this.right.max,e):e,this.parent&&this.parent.updateMaxOfParents()}},e.prototype._updateMaxAfterRightRotate=function(){var e=this.parent,t=e.left,n=t.getNodeHigh();t.max=void 0===t.left&&void 0!==t.right?Math.max(n,t.right.max):void 0!==t.left&&void 0===t.right?Math.max(n,t.left.max):void 0===t.left&&void 0===t.right?n:Math.max(Math.max(t.left.max,t.right.max),n);var r=this.getNodeHigh();this.max=void 0===this.left&&void 0!==this.right?Math.max(r,this.right.max):void 0!==this.left&&void 0===this.right?Math.max(r,this.left.max):void 0===this.left&&void 0===this.right?r:Math.max(Math.max(this.left.max,this.right.max),r),e.max=Math.max(Math.max(e.left.max,e.right.max),e.getNodeHigh())},e.prototype._updateMaxAfterLeftRotate=function(){var e=this.parent,t=e.right,n=t.getNodeHigh();t.max=void 0===t.left&&void 0!==t.right?Math.max(n,t.right.max):void 0!==t.left&&void 0===t.right?Math.max(n,t.left.max):void 0===t.left&&void 0===t.right?n:Math.max(Math.max(t.left.max,t.right.max),n);var r=this.getNodeHigh();this.max=void 0===this.left&&void 0!==this.right?Math.max(r,this.right.max):void 0!==this.left&&void 0===this.right?Math.max(r,this.left.max):void 0===this.left&&void 0===this.right?r:Math.max(Math.max(this.left.max,this.right.max),r),e.max=Math.max(Math.max(e.left.max,t.max),e.getNodeHigh())},e.prototype._leftRotate=function(){var e=this.right;e.parent=this.parent,void 0===e.parent?this.intervalTree.root=e:e.parent.left===this?e.parent.left=e:e.parent.right===this&&(e.parent.right=e),this.right=e.left,void 0!==this.right&&(this.right.parent=this),e.left=this,this.parent=e,this.updateHeight(),e.updateHeight()},e.prototype._rightRotate=function(){var e=this.left;e.parent=this.parent,void 0===e.parent?this.intervalTree.root=e:e.parent.left===this?e.parent.left=e:e.parent.right===this&&(e.parent.right=e),this.left=e.right,void 0!==this.left&&(this.left.parent=this),e.right=this,this.parent=e,this.updateHeight(),e.updateHeight()},e.prototype._rebalance=function(){if(i(this.left)>=2+i(this.right)){var e=this.left;i(e.left)>=i(e.right)?(this._rightRotate(),this._updateMaxAfterRightRotate()):(e._leftRotate(),this._rightRotate(),this._updateMaxAfterRightRotate())}else if(i(this.right)>=2+i(this.left)){var t=this.right;i(t.right)>=i(t.left)?(this._leftRotate(),this._updateMaxAfterLeftRotate()):(t._rightRotate(),this._leftRotate(),this._updateMaxAfterLeftRotate())}},e.prototype.insert=function(t){t.low<this.key?void 0===this.left?(this.left=new e(this.intervalTree,t),this.left.parent=this):this.left.insert(t):void 0===this.right?(this.right=new e(this.intervalTree,t),this.right.parent=this):this.right.insert(t),this.max<t.high&&(this.max=t.high),this.updateHeight(),this._rebalance()},e.prototype._getOverlappingRecords=function(e,t,n){if(e.key<=n&&t<=e.getNodeHigh()){for(var r=[],i=0;i<e.records.length;i++)e.records[i].high>=t&&r.push(e.records[i]);return r}return[]},e.prototype.search=function(e,t){if(void 0===this)return[];var n,r=[],i=[];return e>this.max?[]:(void 0!==this.left&&this.left.max>=e&&(r=this.left.search(e,t)),n=this._getOverlappingRecords(this,e,t),t<this.key?r.concat(n):(void 0!==this.right&&(i=this.right.search(e,t)),r.concat(n,i)))},e.prototype.searchExisting=function(e){if(void 0!==this){if(this.key===e)return this;if(e<this.key){if(void 0!==this.left)return this.left.searchExisting(e)}else if(void 0!==this.right)return this.right.searchExisting(e)}},e.prototype._minValue=function(){return void 0===this.left?this:this.left._minValue()},e.prototype.remove=function(e){var t=this.parent;if(e.key<this.key)return void 0!==this.left?this.left.remove(e):void 0;if(e.key>this.key)return void 0!==this.right?this.right.remove(e):void 0;if(void 0!==this.left&&void 0!==this.right){var n=this.right._minValue();return this.key=n.key,this.records=n.records,this.right.remove(this)}return t.left===this?(void 0!==this.right?(t.left=this.right,this.right.parent=t):(t.left=this.left,void 0!==this.left&&(this.left.parent=t)),t.updateMaxOfParents(),t.updateHeight(),t._rebalance(),this):t.right===this?(void 0!==this.right?(t.right=this.right,this.right.parent=t):(t.right=this.left,void 0!==this.left&&(this.left.parent=t)),t.updateMaxOfParents(),t.updateHeight(),t._rebalance(),this):void 0},e}();t.Node=o;var a=function(){function e(){this.count=0}return e.prototype.insert=function(e){if(e.low>e.high)throw new Error("`low` value must be lower or equal to `high` value");if(void 0===this.root)return this.root=new o(this,e),this.count++,!0;var t=this.root.searchExisting(e.low);if(void 0!==t){for(var n=0;n<t.records.length;n++)if(r(t.records[n],e))return!1;return t.records.push(e),e.high>t.max&&(t.max=e.high,t.parent&&t.parent.updateMaxOfParents()),this.count++,!0}return this.root.insert(e),this.count++,!0},e.prototype.search=function(e,t){return void 0===this.root?[]:this.root.search(e,t)},e.prototype.remove=function(e){if(void 0===this.root)return!1;var t=this.root.searchExisting(e.low);if(void 0===t)return!1;if(t.records.length>1){for(var n=void 0,i=0;i<t.records.length;i++)if(r(t.records[i],e)){n=t.records[i],t.records.splice(i,1);break}if(n){if(n=void 0,e.high===t.max){var a=t.getNodeHigh();t.max=void 0!==t.left&&void 0!==t.right?Math.max(Math.max(t.left.max,t.right.max),a):void 0!==t.left&&void 0===t.right?Math.max(t.left.max,a):void 0===t.left&&void 0!==t.right?Math.max(t.right.max,a):a,t.parent&&t.parent.updateMaxOfParents()}return this.count--,!0}return!1}if(1===t.records.length){if(r(t.records[0],e)){if(this.root.key===t.key){var s=new o(this,{low:e.low,high:e.low});s.left=this.root,this.root.parent=s;var l=this.root.remove(t);return this.root=s.left,void 0!==this.root&&(this.root.parent=void 0),!!l&&(l=void 0,this.count--,!0)}return!!(l=this.root.remove(t))&&(l=void 0,this.count--,!0)}return!1}return!1},e.prototype.inOrder=function(){return new s(this.root)},e.prototype.preOrder=function(){return new l(this.root)},e}();t.IntervalTree=a,t.default=function(){function e(){this.tree=new a}return e.prototype.insert=function(e,t,n){return this.tree.insert({low:e,high:t,data:n})},e.prototype.remove=function(e,t,n){return this.tree.remove({low:e,high:t,data:n})},e.prototype.search=function(e,t){return this.tree.search(e,t).map(function(e){return e.data})},e.prototype.inOrder=function(){return this.tree.inOrder()},e.prototype.preOrder=function(){return this.tree.preOrder()},Object.defineProperty(e.prototype,"count",{get:function(){return this.tree.count},enumerable:!0,configurable:!0}),e}();var s=function(){function e(e){this.stack=[],void 0!==e&&this.push(e)}return e.prototype.next=function(){return void 0===this.currentNode?{done:!0,value:void 0}:this.i<this.currentNode.records.length?{done:!1,value:this.currentNode.records[this.i++]}:(void 0!==this.currentNode.right?this.push(this.currentNode.right):this.pop(),this.next())},e.prototype.push=function(e){for(this.currentNode=e,this.i=0;void 0!==this.currentNode.left;)this.stack.push(this.currentNode),this.currentNode=this.currentNode.left},e.prototype.pop=function(){this.currentNode=this.stack.pop(),this.i=0},e}();t.InOrder=s,"function"==typeof Symbol&&(s.prototype[Symbol.iterator]=function(){return this});var l=function(){function e(e){this.stack=[],this.i=0,this.currentNode=e}return e.prototype.next=function(){return void 0===this.currentNode?{done:!0,value:void 0}:this.i<this.currentNode.records.length?{done:!1,value:this.currentNode.records[this.i++]}:(void 0!==this.currentNode.right&&this.push(this.currentNode.right),void 0!==this.currentNode.left&&this.push(this.currentNode.left),this.pop(),this.next())},e.prototype.push=function(e){this.stack.push(e)},e.prototype.pop=function(){this.currentNode=this.stack.pop(),this.i=0},e}();t.PreOrder=l,"function"==typeof Symbol&&(l.prototype[Symbol.iterator]=function(){return this})},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(i=n?n.call(r,c,d,u):void 0)||void 0===i&&c!==d)return!1}return!0}},function(e,t,n){"use strict";t.a=function(e){var t=e.AcroFormAppearance.RadioButton.Circle.YesNormal;e.AcroFormAppearance.RadioButton.Circle.YesNormal=function(n){var r=t(n),i=r.stream.split("\n"),o=e.__private__.encodeColorString(n.color);return i[0]=i[0]+"\n"+o+"\n"+o.toUpperCase(),r.stream=i.join("\n"),r}}},function(e,t,n){"use strict";var r=n(0),i=n(4);n.d(t,"a",function(){return o});var o=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return n.i(r.a)(t,e),t}(i.a)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(r){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){!function(e,t){"use strict";var n,r=e.API,i=1;function o(e){for(var t="",n=0;n<e.length;n++){for(var r=e.charCodeAt(n).toString(16).toUpperCase();r.length<4;)r="0"+r;t+=r}return"<FEFF"+t+">"}var a=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},s=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},l=function(e){return e.toFixed(2)},u=function(e){return e.toFixed(5)};r.__acroform__={};var c=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},d=function(e){return e*i},h=function(e){return e/i},p=function(e){var t=new L,n=Y.internal.getHeight(e)||0,r=Y.internal.getWidth(e)||0;return t.BBox=[0,0,Number(l(r)),Number(l(n))],t},f=r.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},m=r.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},g=r.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(e&1<<t)?0:1},v=r.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return g(e,t-1)},y=r.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return f(e,t-1)},b=r.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return m(e,t-1)},_=r.__acroform__.calculateCoordinates=function(e){var t=this.internal.getHorizontalCoordinate,n=this.internal.getVerticalCoordinate,r=e[0],i=e[1],o=e[2],a=e[3],s={};return s.lowerLeft_X=t(r)||0,s.lowerLeft_Y=n(i+a)||0,s.upperRight_X=t(r+o)||0,s.upperRight_Y=n(i)||0,[Number(l(s.lowerLeft_X)),Number(l(s.lowerLeft_Y)),Number(l(s.upperRight_X)),Number(l(s.upperRight_Y))]},w=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=C(e,e.V||e.DV),i=n.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(n.__private__.encodeColorString(e.color)),t.push("/"+i+" "+l(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var o=new p(e);return o.stream=t.join("\n"),o}},C=function(e,t){e.isUnicode&&(t=e.trueValue);var r=0===e.fontSize?e.maxFontSize:e.fontSize,i={text:"",fontSize:""},o=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" ");o=o.map(function(e){return e.split("\n")}),e.multiline||(o=o.map(function(e){return[e.join(" ")]}));var s=r,u=Y.internal.getHeight(e)||0;u=u<0?-u:u;var c=Y.internal.getWidth(e)||0;c=c<0?-c:c;var d=function(t,n,r){return t+1<o.length&&x(n+" "+o[t+1][0],e,r).width<=c-4};s++;e:for(;s>0;){t="",s--;var h,p,f=x("3",e,s).height,m=e.multiline?u-s:(u-f)/2,g=m+=2,v=0,y=0,b=0;if(s<=0){t="(...) Tj\n",t+="% Width of Text: "+x(t,e,s=12).width+", FieldWidth:"+c+"\n";break}for(var _="",w=0,C=0;C<o.length;C++)if(o.hasOwnProperty(C)){var S=!1;if(1!==o[C].length&&b!==o[C].length-1){if((f+2)*(w+2)+2>u)continue e;_+=o[C][b],S=!0,y=C,C--}else{_=" "==(_+=o[C][b]+" ").substr(_.length-1)?_.substr(0,_.length-1):_;var P=parseInt(C),k=d(P,_,s),E=C>=o.length-1;if(k&&!E){_+=" ",b=0;continue}if(k||E){if(E)y=P;else if(e.multiline&&(f+2)*(w+2)+2>u)continue e}else{if(!e.multiline)continue e;if((f+2)*(w+2)+2>u)continue e;y=P}}for(var A="",I=v;I<=y;I++){var T=o[I];if(e.multiline){if(I===y){A+=T[b]+" ",b=(b+1)%T.length;continue}if(I===v){A+=T[T.length-1]+" ";continue}}A+=T[0]+" "}switch(A=" "==A.substr(A.length-1)?A.substr(0,A.length-1):A,p=x(A,e,s).width,e.textAlign){case"right":h=c-p-2;break;case"center":h=(c-p)/2;break;case"left":default:h=2}if(t+=l(h)+" "+l(g)+" Td\n",e.isUnicode){var O={};O[n.internal.getFont().id]=n.internal.getFont();var R={text:A,x:null,y:null,options:{lang:null},mutex:{pdfEscape:a,activeFontKey:n.internal.getFont().id,fonts:O,activeFontSize:e.fontSize}};n.internal.events.publish("postProcessText",R),t+="<"+R.text+"> Tj\n"}else t+="("+a(A)+") Tj\n";t+=-l(h)+" 0 Td\n",g=-(s+2),p=0,v=S?y:y+1,w++,_=""}break}return i.text=t,i.fontSize=s,i},x=function(e,t,r){var i=n.internal.getFont(t.fontName,t.fontStyle),o=n.getStringUnitWidth(e,{font:i,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:n.getStringUnitWidth("3",{font:i,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:o}},S={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},P=function(){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];r.objId=void 0,r.hasAnnotation&&E.call(n,r)}},k=function(e){n.internal.acroformPlugin.printedOut&&(n.internal.acroformPlugin.printedOut=!1,n.internal.acroformPlugin.acroFormDictionaryRoot=null),n.internal.acroformPlugin.acroFormDictionaryRoot||R.call(n),n.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e)},E=function(e){var t={type:"reference",object:e};void 0===n.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===t.type&&e.object===t.object})&&n.internal.getPageInfo(e.page).pageContext.annotations.push(t)},A=function(){if(void 0===n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},I=function(){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0},T=function(e){var t=!e;for(var r in e||(n.internal.newObjectDeferredBegin(n.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),n.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||n.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var i=e[r],o=[],a=i.Rect;if(i.Rect&&(i.Rect=_.call(this,i.Rect)),n.internal.newObjectDeferredBegin(i.objId,!0),i.DA=Y.createDefaultAppearanceStream(i),"object"==typeof i&&"function"==typeof i.getKeyValueListForStream&&(o=i.getKeyValueListForStream()),i.Rect=a,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=w.call(this,i);o.push({key:"AP",value:"<</N "+s+">>"}),n.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var l="";for(var u in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(u)){var c=i.appearanceStreamContent[u];if(l+="/"+u+" ",l+="<<",Object.keys(c).length>=1||Array.isArray(c)){for(var r in c)if(c.hasOwnProperty(r)){var d=c[r];"function"==typeof d&&(d=d.call(this,i)),l+="/"+r+" "+d+" ",n.internal.acroformPlugin.xForms.indexOf(d)>=0||n.internal.acroformPlugin.xForms.push(d)}}else"function"==typeof(d=c)&&(d=d.call(this,i)),l+="/"+r+" "+d,n.internal.acroformPlugin.xForms.indexOf(d)>=0||n.internal.acroformPlugin.xForms.push(d);l+=">>"}o.push({key:"AP",value:"<<\n"+l+">>"})}n.internal.putStream({additionalKeyValues:o}),n.internal.out("endobj")}t&&O.call(this,n.internal.acroformPlugin.xForms)},O=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=t,i=e[t];n.internal.newObjectDeferredBegin(i&&i.objId,!0),"object"==typeof i&&"function"==typeof i.putStream&&i.putStream(),delete e[r]}},R=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(n=this,M.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(S)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");i=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new F,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",I),n.internal.events.subscribe("buildDocument",P),n.internal.events.subscribe("putCatalog",A),n.internal.events.subscribe("postPutPages",T),n.internal.acroformPlugin.isInitialized=!0}},V=r.__acroform__.arrayToPdfArray=function(e){if(Array.isArray(e)){for(var t="[",n=0;n<e.length;n++)switch(0!==n&&(t+=" "),typeof e[n]){case"boolean":case"number":case"object":t+=e[n].toString();break;case"string":"/"!==e[n].substr(0,1)?t+="("+a(e[n].toString())+")":t+=e[n].toString()}return t+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},D=function(e){return(e=e||"").toString(),"("+a(e)+")"},N=function(){var e;Object.defineProperty(this,"objId",{configurable:!0,get:function(){return e||(e=n.internal.newObjectDeferred()),e},set:function(t){e=t}})};N.prototype.toString=function(){return this.objId+" 0 R"},N.prototype.putStream=function(){var e=this.getKeyValueListForStream();n.internal.putStream({data:this.stream,additionalKeyValues:e}),n.internal.out("endobj")},N.prototype.getKeyValueListForStream=function(){return function(e){var t=[],n=Object.getOwnPropertyNames(e).filter(function(e){return"content"!=e&&"appearanceStreamContent"!=e&&"_"!=e.substring(0,1)});for(var r in n){var i=Object.getOwnPropertyDescriptor(e,n[r]);if(i&&!1===i.configurable){var o=n[r],a=e[o];a&&(Array.isArray(a)?t.push({key:o,value:V(a)}):a instanceof N?t.push({key:o,value:a.objId+" 0 R"}):"function"!=typeof a&&t.push({key:o,value:a}))}}return t}(this)};var L=function(){N.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writeable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writeable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writeable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,writeable:!0,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writeable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};c(L,N);var F=function(){N.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e)return"("+e+")"},set:function(t){e=t}})};c(F,N);var M=function e(){N.call(this);var t=4;this.isUnicode=!1,this.trueValue="",Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(t,3))},set:function(e){this.F=!0===Boolean(e)?y(t,3):b(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute Ff supplied.');n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==r.length)return r},set:function(e){r=void 0!==e?e:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:h(r[0])},set:function(e){r[0]=d(e)}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:h(r[1])},set:function(e){r[1]=d(e)}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:h(r[2])},set:function(e){r[2]=d(e)}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:h(r[3])},set:function(e){r[3]=d(e)}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=e;break;default:throw new Error('Invalid value "'+e+'" for attribute FT supplied.')}}});var l=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!l||l.length<1){if(this instanceof W)return;l="FieldObject"+e.FieldNum++}return"("+a(l)+")"},set:function(e){l=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return l},set:function(e){l=e}});var u="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return u},set:function(e){u=e}});var c="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return c},set:function(e){c=e}});var p=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return h(p)},set:function(e){p=d(e)}});var f=50;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h(f)},set:function(e){f=d(e)}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(e){m=e}});var g="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!g||this instanceof W||this instanceof $))return D(g)},set:function(e){e=e.toString(),g=e}});var _=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(_)return this instanceof U==0?D(_):_},set:function(e){e=e.toString(),_=this instanceof U==0?"("===e.substr(0,1)?s(e.substr(1,e.length-2)):s(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof U==1?s(_.substr(1,_.length-1)):_},set:function(e){e=e.toString(),_=this instanceof U==1?"/"+e:e}});var w=null;Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){return this.isUnicode?w:w?this instanceof U==0?D(w):w:void 0},set:function(e){e=e.toString(),this.isUnicode?(w=o(e),this.trueValue=e):w=this instanceof U==0?"("===e.substr(0,1)?s(e.substr(1,e.length-2)):s(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof U==1?s(w.substr(1,w.length-1)):w},set:function(e){e=e.toString(),w=this instanceof U==1?"/"+e:e}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var C,x=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,writeable:!0,get:function(){return x},set:function(e){e=Boolean(e),x=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writeable:!0,get:function(){if(C)return C},set:function(e){C=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,1))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,1):b(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,2))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,2):b(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,3))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,3):b(this.Ff,3)}});var S=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==S)return S},set:function(e){if(-1===[0,1,2].indexOf(e))throw new Error('Invalid value "'+e+'" for attribute Q supplied.');S=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(S){case 0:default:e="left";break;case 1:e="center";break;case 2:e="right"}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case"right":case 2:S=2;break;case"center":case 1:S=1;break;case"left":case 0:default:S=0}}})};c(M,N);var q=function(){M.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}});var t="<< /BG [ 0.975 0.975 0.975 ]  >>";Object.defineProperty(this,"MK",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return this.isUnicode?function(e){for(var t="[ ",n=0;n<e.length;n++)t+=o(e[n]);return t+" ]"}(n):V(n)},set:function(e){var t,r;r=[],"string"==typeof(t=e)&&(r=function(e,t,n){n||(n=1);for(var r,i=[];r=t.exec(e);)i.push(r[n]);return i}(t,/\((.*?)\)/g)),n=r}}),this.getOptions=function(){return n},this.setOptions=function(e){n=e,this.sort&&n.sort()},this.addOption=function(e){e=(e=e||"").toString(),n.push(e),this.sort&&n.sort()},this.removeOption=function(e,t){for(t=t||!1,e=(e=e||"").toString();-1!==n.indexOf(e)&&(n.splice(n.indexOf(e),1),!1!==t););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,18))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,18):b(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,19))},set:function(e){!0===this.combo&&(this.Ff=!0===Boolean(e)?y(this.Ff,19):b(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,20))},set:function(e){!0===Boolean(e)?(this.Ff=y(this.Ff,20),n.sort()):this.Ff=b(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,22))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,22):b(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,23))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,23):b(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,27))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,27):b(this.Ff,27)}}),this.hasAppearanceStream=!1};c(q,M);var j=function(){q.call(this),this.fontName="helvetica",this.combo=!1};c(j,q);var B=function(){j.call(this),this.combo=!0};c(B,j);var z=function(){B.call(this),this.edit=!0};c(z,B);var U=function(){M.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,15))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,15):b(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,16))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,16):b(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,17))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,17):b(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,26))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,26):b(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){if(0!==Object.keys(t).length){var e,n=[];for(e in n.push("<<"),t)n.push("/"+e+" ("+t[e]+")");return n.push(">>"),n.join("\n")}},set:function(e){"object"==typeof e&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};c(U,M);var H=function(){U.call(this),this.pushButton=!0};c(H,U);var Q=function(){U.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};c(Q,U);var W=function(){var e,t;M.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e,t=[];for(e in t.push("<<"),r)t.push("/"+e+" ("+r[e]+")");return t.push(">>"),t.join("\n")},set:function(e){"object"==typeof e&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(e){"string"==typeof e&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+e}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Y.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};c(W,M),Q.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},Q.prototype.createOption=function(e){var t=new W;return t.Parent=this,t.optionName=e,this.Kids.push(t),K.call(this,t),t};var G=function(){U.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Y.CheckBox.createAppearanceStream()};c(G,U);var $=function(){M.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,13))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,13):b(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,21))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,21):b(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,23))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,23):b(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,24))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,24):b(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,25))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,25):b(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,26))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,26):b(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};c($,M);var J=function(){$.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(v(this.Ff,14))},set:function(e){this.Ff=!0===Boolean(e)?y(this.Ff,14):b(this.Ff,14)}}),this.password=!0};c(J,$);var Y={CheckBox:{createAppearanceStream:function(){return{N:{On:Y.CheckBox.YesNormal},D:{On:Y.CheckBox.YesPushDown,Off:Y.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=new p(e),r=[],i=n.internal.getFont(e.fontName,e.fontStyle).id,o=n.__private__.encodeColorString(e.color),a=C(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+l(Y.internal.getWidth(e))+" "+l(Y.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+i+" "+l(a.fontSize)+" Tf "+o),r.push("BT"),r.push(a.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join("\n"),t},YesNormal:function(e){var t=new p(e),r=n.internal.getFont(e.fontName,e.fontStyle).id,i=n.__private__.encodeColorString(e.color),o=[],a=Y.internal.getHeight(e),s=Y.internal.getWidth(e),u=C(e,e.caption);return o.push("1 g"),o.push("0 0 "+l(s)+" "+l(a)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+l(s-1)+" "+l(a-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+r+" "+l(u.fontSize)+" Tf "+i),o.push(u.text),o.push("ET"),o.push("Q"),t.stream=o.join("\n"),t},OffPushDown:function(e){var t=new p(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+l(Y.internal.getWidth(e))+" "+l(Y.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Y.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Y.RadioButton.Circle.YesNormal,t.D[e]=Y.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=new p(e),n=[],r=Y.internal.getWidth(e)<=Y.internal.getHeight(e)?Y.internal.getWidth(e)/4:Y.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((r*Y.internal.Bezier_C).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+u(Y.internal.getWidth(e)/2)+" "+u(Y.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),n.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),n.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),n.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=new p(e),n=[],r=Y.internal.getWidth(e)<=Y.internal.getHeight(e)?Y.internal.getWidth(e)/4:Y.internal.getHeight(e)/4,i=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),o=Number((i*Y.internal.Bezier_C).toFixed(5)),a=Number((r*Y.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+u(Y.internal.getWidth(e)/2)+" "+u(Y.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+u(Y.internal.getWidth(e)/2)+" "+u(Y.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=new p(e),n=[],r=Y.internal.getWidth(e)<=Y.internal.getHeight(e)?Y.internal.getWidth(e)/4:Y.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),o=Number((i*Y.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+u(Y.internal.getWidth(e)/2)+" "+u(Y.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Y.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Y.RadioButton.Cross.YesNormal,t.D[e]=Y.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=new p(e),n=[],r=Y.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+l(Y.internal.getWidth(e)-2)+" "+l(Y.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(l(r.x1.x)+" "+l(r.x1.y)+" m"),n.push(l(r.x2.x)+" "+l(r.x2.y)+" l"),n.push(l(r.x4.x)+" "+l(r.x4.y)+" m"),n.push(l(r.x3.x)+" "+l(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=new p(e),n=Y.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+l(Y.internal.getWidth(e))+" "+l(Y.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+l(Y.internal.getWidth(e)-2)+" "+l(Y.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(l(n.x1.x)+" "+l(n.x1.y)+" m"),r.push(l(n.x2.x)+" "+l(n.x2.y)+" l"),r.push(l(n.x4.x)+" "+l(n.x4.y)+" m"),r.push(l(n.x3.x)+" "+l(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=new p(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+l(Y.internal.getWidth(e))+" "+l(Y.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=n.internal.getFont(e.fontName,e.fontStyle).id,r=n.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};Y.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Y.internal.getWidth(e),n=Y.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},Y.internal.getWidth=function(e){var t=0;return"object"==typeof e&&(t=d(e.Rect[2])),t},Y.internal.getHeight=function(e){var t=0;return"object"==typeof e&&(t=d(e.Rect[3])),t};var K=r.addField=function(e){if(R.call(this),!(e instanceof M))throw new Error("Invalid argument passed to jsPDF.addField.");return k.call(this,e),e.page=n.internal.getCurrentPageInfo().pageNumber,this};r.addButton=function(e){if(e instanceof U==0)throw new Error("Invalid argument passed to jsPDF.addButton.");return K.call(this,e)},r.addTextField=function(e){if(e instanceof $==0)throw new Error("Invalid argument passed to jsPDF.addTextField.");return K.call(this,e)},r.addChoiceField=function(e){if(e instanceof q==0)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return K.call(this,e)},"object"==typeof t&&void 0===t.ChoiceField&&void 0===t.ListBox&&void 0===t.ComboBox&&void 0===t.EditBox&&void 0===t.Button&&void 0===t.PushButton&&void 0===t.RadioButton&&void 0===t.CheckBox&&void 0===t.TextField&&void 0===t.PasswordField&&(t.ChoiceField=q,t.ListBox=j,t.ComboBox=B,t.EditBox=z,t.Button=U,t.PushButton=H,t.RadioButton=Q,t.CheckBox=G,t.TextField=$,t.PasswordField=J,t.AcroForm={Appearance:Y}),r.AcroFormChoiceField=q,r.AcroFormListBox=j,r.AcroFormComboBox=B,r.AcroFormEditBox=z,r.AcroFormButton=U,r.AcroFormPushButton=H,r.AcroFormRadioButton=Q,r.AcroFormCheckBox=G,r.AcroFormTextField=$,r.AcroFormPasswordField=J,r.AcroFormAppearance=Y,r.AcroForm={ChoiceField:q,ListBox:j,ComboBox:B,EditBox:z,Button:U,PushButton:H,RadioButton:Q,CheckBox:G,TextField:$,PasswordField:J,Appearance:Y},e.AcroForm={ChoiceField:q,ListBox:j,ComboBox:B,EditBox:z,Button:U,PushButton:H,RadioButton:Q,CheckBox:G,TextField:$,PasswordField:J,Appearance:Y}}(n(18).jsPDF,"undefined"!=typeof window&&window||void 0!==e&&e)}).call(t,n(59))},function(e,t,n){!function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p,f,m,g,v,y,b,_;t=function(){return function(t){return e.prototype=t,new e};function e(){}}(),c=function(e){var t,n,r,i,o,a,s;for(n=0,r=e.length,t=void 0,i=!1,a=!1;!i&&n!==r;)(t=e[n]=e[n].trimLeft())&&(i=!0),n++;for(n=r-1;r&&!a&&-1!==n;)(t=e[n]=e[n].trimRight())&&(a=!0),n--;for(o=/\s+$/g,s=!0,n=0;n!==r;)"\u2028"!=e[n]&&(t=e[n].replace(/\s+/g," "),s&&(t=t.trimLeft()),t&&(s=o.test(t)),e[n]=t),n++;return e},h=function(e){var t,n,i;for(t=void 0,n=(i=e.split(",")).shift();!t&&n;)t=r[n.trim().toLowerCase()],n=i.shift();return t},p=function(e){var t;return(e="auto"===e?"0px":e).indexOf("em")>-1&&!isNaN(Number(e.replace("em","")))&&(e=18.719*Number(e.replace("em",""))+"px"),e.indexOf("pt")>-1&&!isNaN(Number(e.replace("pt","")))&&(e=1.333*Number(e.replace("pt",""))+"px"),(t=f[e])?t:void 0!==(t={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[e])||(t=parseFloat(e))?f[e]=t/16:(t=e.match(/([\d\.]+)(px)/),f[e]=Array.isArray(t)&&3===t.length?parseFloat(t[1])/16:1)},u=function(e){var t,n,r,u,c;return c=e,u=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(c,null):c.currentStyle?c.currentStyle:c.style,n=void 0,(t={})["font-family"]=h((r=function(e){return e=e.replace(/-\D/g,function(e){return e.charAt(1).toUpperCase()}),u[e]})("font-family"))||"times",t["font-style"]=i[r("font-style")]||"normal",t["text-align"]=o[r("text-align")]||"left","bold"===(n=a[r("font-weight")]||"normal")&&(t["font-style"]="normal"===t["font-style"]?n:n+t["font-style"]),t["font-size"]=p(r("font-size"))||1,t["line-height"]=p(r("line-height"))||1,t.display="inline"===r("display")?"inline":"block",t["margin-top"]=(n="block"===t.display)&&p(r("margin-top"))||0,t["margin-bottom"]=n&&p(r("margin-bottom"))||0,t["padding-top"]=n&&p(r("padding-top"))||0,t["padding-bottom"]=n&&p(r("padding-bottom"))||0,t["margin-left"]=n&&p(r("margin-left"))||0,t["margin-right"]=n&&p(r("margin-right"))||0,t["padding-left"]=n&&p(r("padding-left"))||0,t["padding-right"]=n&&p(r("padding-right"))||0,t["page-break-before"]=r("page-break-before")||"auto",t.float=s[r("cssFloat")]||"none",t.clear=l[r("clear")]||"none",t.color=r("color"),t},m=function(e,t,n){var r,i,o,a,s;if(o=!1,i=void 0,a=void 0,r=n["#"+e.id])if("function"==typeof r)o=r(e,t);else for(i=0,a=r.length;!o&&i!==a;)o=r[i](e,t),i++;if(r=n[e.nodeName],!o&&r)if("function"==typeof r)o=r(e,t);else for(i=0,a=r.length;!o&&i!==a;)o=r[i](e,t),i++;for(s="string"==typeof e.className?e.className.split(" "):[],i=0;i<s.length;i++)if(r=n["."+s[i]],!o&&r)if("function"==typeof r)o=r(e,t);else for(i=0,a=r.length;!o&&i!==a;)o=r[i](e,t),i++;return o},_=function(e,t){var n,r,i,o,a,s,l,u;n=[],r=[],i=0,u=0;for(var c=0;c<e.rows[0].cells.length;c++)u+=e.rows[0].cells[c].colSpan;for(s=e.clientWidth;i<u;){for(l=e.rows[0].cells[i],c=0;c<l.colSpan;c++)r[i+c]={name:l.textContent.toLowerCase().replace(/\s+/g,"")+"_"+c,prompt:l.textContent.replace(/\r?\n/g,""),width:l.clientWidth/s*t.settings.width/l.colSpan};i+=c}for(i=1;i<e.rows.length;){for(a=e.rows[i],o={},c=0;c<a.cells.length;)o[r[c].name]=a.cells[c].textContent.replace(/\r?\n/g,""),c++;n.push(o),i++}return{rows:n,headers:r}};var w={SCRIPT:1,STYLE:1,NOSCRIPT:1,OBJECT:1,EMBED:1,SELECT:1},C=1;n=function(e,r,i){var o,a,s,l,c,d,h,p;for(a=e.childNodes,o=void 0,(c="block"===(s=u(e)).display)&&(r.setBlockBoundary(),r.setBlockStyle(s)),l=0,d=a.length;l<d;){if("object"==typeof(o=a[l])){if(r.executeWatchFunctions(o),1===o.nodeType&&"HEADER"===o.nodeName){var f=o,v=r.pdf.margins_doc.top;r.pdf.internal.events.subscribe("addPage",function(e){r.y=v,n(f,r,i),r.pdf.margins_doc.top=r.y+10,r.y+=10},!1)}if(8===o.nodeType&&"#comment"===o.nodeName)~o.textContent.indexOf("ADD_PAGE")&&(r.pdf.addPage(),r.y=r.pdf.margins_doc.top);else if(1!==o.nodeType||w[o.nodeName])if(3===o.nodeType){var y=o.nodeValue;if(o.nodeValue&&"LI"===o.parentNode.nodeName)if("OL"===o.parentNode.parentNode.nodeName)y=C+++". "+y;else{var b=s["font-size"],x=(3-.75*b)*r.pdf.internal.scaleFactor,S=.75*b*r.pdf.internal.scaleFactor,P=1.74*b/r.pdf.internal.scaleFactor;p=function(e,t){this.pdf.circle(e+x,t+S,P,"FD")}}16&o.ownerDocument.body.compareDocumentPosition(o)&&r.addText(y,s)}else"string"==typeof o&&r.addText(o,s);else{var k;if("IMG"===o.nodeName){var E=o.getAttribute("src");k=g[r.pdf.sHashCode&&r.pdf.sHashCode(E)||E]}if(k){r.pdf.internal.pageSize.getHeight()-r.pdf.margins_doc.bottom<r.y+o.height&&r.y>r.pdf.margins_doc.top&&(r.pdf.addPage(),r.y=r.pdf.margins_doc.top,r.executeWatchFunctions(o));var A=u(o),I=r.x,T=12/r.pdf.internal.scaleFactor,O=(A["margin-left"]+A["padding-left"])*T,R=(A["margin-right"]+A["padding-right"])*T,V=(A["margin-top"]+A["padding-top"])*T,D=(A["margin-bottom"]+A["padding-bottom"])*T;r.pdf.addImage(k,I+=void 0!==A.float&&"right"===A.float?r.settings.width-o.width-R:O,r.y+V,o.width,o.height),k=void 0,"right"===A.float||"left"===A.float?(r.watchFunctions.push((function(e,t,n,i){return r.y>=t?(r.x+=e,r.settings.width+=n,!0):!!(i&&1===i.nodeType&&!w[i.nodeName]&&r.x+i.width>r.pdf.margins_doc.left+r.pdf.margins_doc.width)&&(r.x+=e,r.y=t,r.settings.width+=n,!0)}).bind(this,"left"===A.float?-o.width-O-R:0,r.y+o.height+V+D,o.width)),r.watchFunctions.push((function(e,t,n){return!(r.y<e&&t===r.pdf.internal.getNumberOfPages())||1===n.nodeType&&"both"===u(n).clear&&(r.y=e,!0)}).bind(this,r.y+o.height,r.pdf.internal.getNumberOfPages())),r.settings.width-=o.width+O+R,"left"===A.float&&(r.x+=o.width+O+R)):r.y+=o.height+V+D}else if("TABLE"===o.nodeName)r.pdf.autoTable?(r.y+=10,r.pdf.autoTable({theme:"grid",html:o,startY:r.y,styles:{font:r.pdf.getFont().fontName,fontSize:r.pdf.getFontSize(),textColor:r.pdf.getTextColor()},margin:{top:r.pdf.margins_doc.top,left:r.x,right:r.pdf.internal.pageSize.getWidth()-(r.x+r.settings.width),bottom:r.pdf.margins_doc.bottom}}),r.y=r.pdf.lastAutoTable.finalY):(h=_(o,r),r.y+=10,r.pdf.table(r.x,r.y,h.rows,h.headers,{autoSize:!1,printHeaders:i.printHeaders,margins:r.pdf.margins_doc,css:u(o)}),r.y=r.pdf.internal.__cell__.lastCell.y+r.pdf.internal.__cell__.lastCell.height);else if("OL"===o.nodeName||"UL"===o.nodeName)C=1,m(o,r,i)||n(o,r,i),r.y+=10;else if("LI"===o.nodeName){var N=r.x;r.x+=20/r.pdf.internal.scaleFactor,r.y+=3,m(o,r,i)||n(o,r,i),r.x=N}else"BR"===o.nodeName?(r.y+=s["font-size"]*r.pdf.internal.scaleFactor,r.addText("\u2028",t(s))):m(o,r,i)||n(o,r,i)}}l++}if(i.outY=r.y,c)return r.setBlockBoundary(p)},g={},v=function(e,t,n,r){var i,o=e.getElementsByTagName("img"),a=o.length,s=0;function l(){t.pdf.internal.events.publish("imagesLoaded"),r(i)}function u(e,n,r){if(e){var o=new Image;i=++s,o.crossOrigin="",o.onerror=o.onload=function(){if(o.complete&&(0===o.src.indexOf("data:image/")&&(o.width=n||o.width||0,o.height=r||o.height||0),o.width+o.height)){var i=t.pdf.sHashCode&&t.pdf.sHashCode(e)||e;g[i]=g[i]||o}--s||l()},o.src=e}}for(;a--;)u(o[a].getAttribute("src"),o[a].width,o[a].height);return s||l()},y=function(e,t,r){var i=e.getElementsByTagName("footer");if(i.length>0){i=i[0];var o=t.pdf.internal.write,a=t.y;t.pdf.internal.write=function(){},n(i,t,r);var s=Math.ceil(t.y-a)+5;t.y=a,t.pdf.internal.write=o,t.pdf.margins_doc.bottom+=s;for(var l=function(e){var o=void 0!==e?e.pageNumber:1,a=t.y;t.y=t.pdf.internal.pageSize.getHeight()-t.pdf.margins_doc.bottom,t.pdf.margins_doc.bottom-=s;for(var l=i.getElementsByTagName("span"),u=0;u<l.length;++u)(" "+l[u].className+" ").replace(/[\n\t]/g," ").indexOf(" pageCounter ")>-1&&(l[u].innerHTML=o),(" "+l[u].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(l[u].innerHTML="###jsPDFVarTotalPages###");n(i,t,r),t.pdf.margins_doc.bottom+=s,t.y=a},u=i.getElementsByTagName("span"),c=0;c<u.length;++c)(" "+u[c].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&t.pdf.internal.events.subscribe("htmlRenderingFinished",t.pdf.putTotalPages.bind(t.pdf,"###jsPDFVarTotalPages###"),!0);t.pdf.internal.events.subscribe("addPage",l,!1),l(),w.FOOTER=1}},b=function(e,t,i,o,a,s){if(!t)return!1;"string"==typeof t||t.parentNode||(t=""+t.innerHTML),"string"==typeof t&&(t=function(e){var t,n,r;return r="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),(n=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n.innerHTML='<iframe style="height:1px;width:1px" name="'+r+'" />',document.body.appendChild(n),(t=window.frames[r]).document.open(),t.document.writeln(e),t.document.close(),t.document.body}(t.replace(/<\/?script[^>]*?>/gi,"")));for(var l=Object.keys(e.getFontList()),u=0;u<l.length;++u){var c=l[u],h=c.toLowerCase();r[h]||(r[h]=c)}var p,f=new d(e,i,o,a);return v.call(this,t,f,a.elementHandlers,function(e){y(t,f,a.elementHandlers),n(t,f,a.elementHandlers),f.pdf.internal.events.publish("htmlRenderingFinished"),p=f.dispose(),"function"==typeof s?s(p):e&&console.error("jsPDF Warning: rendering issues? provide a callback to fromHTML!")}),p||{x:f.x,y:f.y}},(d=function(e,t,n,r){return this.pdf=e,this.x=t,this.y=n,this.settings=r,this.watchFunctions=[],this.init(),this}).prototype.init=function(){return this.paragraph={text:[],style:[]},this.pdf.internal.write("q")},d.prototype.dispose=function(){return this.pdf.internal.write("Q"),{x:this.x,y:this.y,ready:!0}},d.prototype.executeWatchFunctions=function(e){var t=!1,n=[];if(this.watchFunctions.length>0){for(var r=0;r<this.watchFunctions.length;++r)!0===this.watchFunctions[r](e)?t=!0:n.push(this.watchFunctions[r]);this.watchFunctions=n}return t},d.prototype.splitFragmentsIntoLines=function(e,n){var r,i,o,a,s,l,u,c,d,h,p,f,m,g;for(h=this.pdf.internal.scaleFactor,a={},i=void 0,d=void 0,o=void 0,s=void 0,g=void 0,c=void 0,u=void 0,l=void 0,f=[p=[]],r=0,m=this.settings.width;e.length;)if(s=e.shift(),g=n.shift(),s)if((o=a[(i=g["font-family"])+(d=g["font-style"])])||(o=this.pdf.internal.getFont(i,d).metadata.Unicode,a[i+d]=o),u=this.pdf.getStringUnitWidth(s,c={widths:o.widths,kerning:o.kerning,fontSize:12*g["font-size"],textIndent:r})*c.fontSize/h,"\u2028"==s)f.push(p=[]);else if(r+u>m){for(l=this.pdf.splitTextToSize(s,m,c),p.push([l.shift(),g]);l.length;)p=[[l.shift(),g]],f.push(p);r=this.pdf.getStringUnitWidth(p[0][0],c)*c.fontSize/h}else p.push([s,g]),r+=u;if(void 0!==g["text-align"]&&("center"===g["text-align"]||"right"===g["text-align"]||"justify"===g["text-align"]))for(var v=0;v<f.length;++v){var y=this.pdf.getStringUnitWidth(f[v][0][0],c)*c.fontSize/h;v>0&&(f[v][0][1]=t(f[v][0][1]));var b=m-y;if("right"===g["text-align"])f[v][0][1]["margin-left"]=b;else if("center"===g["text-align"])f[v][0][1]["margin-left"]=b/2;else if("justify"===g["text-align"]){var _=f[v][0][0].split(" ").length-1;f[v][0][1]["word-spacing"]=b/_,v===f.length-1&&(f[v][0][1]["word-spacing"]=0)}}return f},d.prototype.RenderTextFragment=function(e,t){var n,r;if(r=0,this.pdf.internal.pageSize.getHeight()-this.pdf.margins_doc.bottom<this.y+this.pdf.internal.getFontSize()){this.pdf.internal.write("ET","Q","Q");var i=this.pdf.getCurrentPageInfo().pageNumber;this.pdf.getNumberOfPages()===i?this.pdf.addPage():this.pdf.setPage(i+1),this.y=this.pdf.margins_doc.top,this.pdf.internal.write("q","q","BT",this.getPdfColor(t.color),this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td"),r=Math.max(r,t["line-height"],t["font-size"]),this.pdf.internal.write(0,(-12*r).toFixed(2),"Td")}n=this.pdf.internal.getFont(t["font-family"],t["font-style"]);var o,a=this.getPdfColor(t.color);a!==this.lastTextColor&&(this.pdf.internal.write(a),this.lastTextColor=a),void 0!==t["word-spacing"]&&t["word-spacing"]>0&&this.pdf.internal.write(t["word-spacing"].toFixed(2),"Tw"),o="Identity-H"!==n.encoding?"("+this.pdf.internal.pdfEscape(e)+")":"<"+function(e,t){e=e||"";var n,r="",i=0,o="",a=t.encoding;if("Identity-H"!==t.encoding)return e;for(o=e,i=0;i<o.length;i+=1)t.metadata.hasOwnProperty("cmap")&&(n=t.metadata.cmap.unicode.codeMap[o[i].charCodeAt(0)]),n||o[i].charCodeAt(0)<256&&t.metadata.hasOwnProperty("Unicode")?r+=o[i]:r+="";var s="";return parseInt(t.id.slice(1))<14||"WinAnsiEncoding"===a?s=this.pdf.internal.pdfEscape(r,key).split("").map(function(e){return e.charCodeAt(0).toString(16)}).join(""):"Identity-H"===a&&(s=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=e.length;a<s;++a){if(n=t.metadata.characterToGlyph(e.charCodeAt(a)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(a),-1==r.indexOf(n)&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),"0"==n)return o.join("");n=n.toString(16),o.push(i[4-n.length],n)}return o.join("")}(r,t)),s}(e,n)+">",this.pdf.internal.write("/"+n.id,(12*t["font-size"]).toFixed(2),"Tf",o+" Tj"),void 0!==t["word-spacing"]&&this.pdf.internal.write(0,"Tw")},d.prototype.getPdfColor=function(e){var t,n,r,i=/rgb\s*\(\s*(\d+),\s*(\d+),\s*(\d+\s*)\)/.exec(e);if(null!=i)t=parseInt(i[1]),n=parseInt(i[2]),r=parseInt(i[3]);else{if("string"==typeof e&&"#"!=e.charAt(0)){var o=new RGBColor(e);e=o.ok?o.toHex():"#000000"}t=e.substring(1,3),t=parseInt(t,16),n=e.substring(3,5),n=parseInt(n,16),r=e.substring(5,7),r=parseInt(r,16)}if("string"==typeof t&&/^#[0-9A-Fa-f]{6}$/.test(t)){var a=parseInt(t.substr(1),16);t=a>>16&255,n=a>>8&255,r=255&a}var s=this.f3;return 0===t&&0===n&&0===r||void 0===n?s(t/255)+" g":[s(t/255),s(n/255),s(r/255),"rg"].join(" ")},d.prototype.f3=function(e){return e.toFixed(3)},d.prototype.renderParagraph=function(e){var t,n,r,i,o,a,s,l,u,d,h,p,f;if(r=c(this.paragraph.text),p=this.paragraph.style,this.paragraph={text:[],style:[],blockstyle:{},priorblockstyle:t=this.paragraph.blockstyle},r.join("").trim()){s=this.splitFragmentsIntoLines(r,p),a=void 0,l=void 0,n=12/this.pdf.internal.scaleFactor,this.priorMarginBottom=this.priorMarginBottom||0,h=(Math.max((t["margin-top"]||0)-this.priorMarginBottom,0)+(t["padding-top"]||0))*n,d=((t["margin-bottom"]||0)+(t["padding-bottom"]||0))*n,this.priorMarginBottom=t["margin-bottom"]||0,"always"===t["page-break-before"]&&(this.pdf.addPage(),this.y=0,h=((t["margin-top"]||0)+(t["padding-top"]||0))*n),u=this.pdf.internal.write,i=void 0,o=void 0,this.y+=h,u("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td");for(var m=0;s.length;){for(l=0,i=0,o=(a=s.shift()).length;i!==o;)a[i][0].trim()&&(l=Math.max(l,a[i][1]["line-height"],a[i][1]["font-size"]),f=7*a[i][1]["font-size"]),i++;var g=0,v=0;for(void 0!==a[0][1]["margin-left"]&&a[0][1]["margin-left"]>0&&(g=(v=this.pdf.internal.getCoordinateString(a[0][1]["margin-left"]))-m,m=v),u(g+Math.max(t["margin-left"]||0,0)*n,(-12*l).toFixed(2),"Td"),i=0,o=a.length;i!==o;)a[i][0]&&this.RenderTextFragment(a[i][0],a[i][1]),i++;if(this.y+=l*n,this.executeWatchFunctions(a[0][1])&&s.length>0){var y=[],b=[];s.forEach(function(e){for(var t=0,n=e.length;t!==n;)e[t][0]&&(y.push(e[t][0]+" "),b.push(e[t][1])),++t}),s=this.splitFragmentsIntoLines(c(y),b),u("ET","Q"),u("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td")}}return e&&"function"==typeof e&&e.call(this,this.x-9,this.y-f/2),u("ET","Q"),this.y+=d}},d.prototype.setBlockBoundary=function(e){return this.renderParagraph(e)},d.prototype.setBlockStyle=function(e){return this.paragraph.blockstyle=e},d.prototype.addText=function(e,t){return this.paragraph.text.push(e),this.paragraph.style.push(t)},r={helvetica:"helvetica","sans-serif":"helvetica","times new roman":"times",serif:"times",times:"times",monospace:"courier",courier:"courier"},a={100:"normal",200:"normal",300:"normal",400:"normal",500:"bold",600:"bold",700:"bold",800:"bold",900:"bold",normal:"normal",bold:"bold",bolder:"bold",lighter:"normal"},i={normal:"normal",italic:"italic",oblique:"italic"},o={left:"left",right:"right",center:"center",justify:"justify"},s={none:"none",right:"right",left:"left"},l={none:"none",both:"both"},f={normal:1},e.fromHTML=function(e,t,n,r,i,o){return this.margins_doc=o||{top:0,bottom:0},r||(r={}),r.elementHandlers||(r.elementHandlers={}),b(this,e,isNaN(t)?4:t,isNaN(n)?4:n,r,i)}}(n(18).jsPDF.API)}])},e.exports=r(n("mHM9"),n("i680"))},NauR:function(e,t,n){var r,i,o;!function(a){if("object"==typeof e.exports){var s=a(0,t);void 0!==s&&(e.exports=s)}else i=[n,t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=void 0;t.default=["fr-CA",[["a","p"],["a.m.","p.m."],n],[["a.m.","p.m."],n,n],[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],n,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xe9vr.","mars","avr.","mai","juin","juill.","ao\xfbt","sept.","oct.","nov.","d\xe9c."],["janvier","f\xe9vrier","mars","avril","mai","juin","juillet","ao\xfbt","septembre","octobre","novembre","d\xe9cembre"]],n,[["av. J.-C.","ap. J.-C."],n,["avant J\xe9sus-Christ","apr\xe8s J\xe9sus-Christ"]],0,[6,0],["y-MM-dd","d MMM y","d MMMM y","EEEE d MMMM y"],["HH 'h' mm","HH 'h' mm 'min' ss 's'","HH 'h' mm 'min' ss 's' z","HH 'h' mm 'min' ss 's' zzzz"],["{1} {0}",n,"{1} '\xe0' {0}",n],[",","\xa0",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0\xa0%","#,##0.00\xa0\xa4","#E0"],"CAD","$","dollar canadien",{AUD:["$\xa0AU","$"],BEF:["FB"],BYN:[n,"Br"],CAD:["$"],CYP:["\xa3CY"],EGP:[n,"\xa3E"],FRF:["F"],GEL:[],HKD:["$\xa0HK","$"],IEP:["\xa3IE"],ILP:["\xa3IL"],ILS:[n,"\u20aa"],INR:[n,"\u20b9"],ITL:["\u20a4IT"],KRW:[n,"\u20a9"],LBP:[n,"\xa3L"],MTP:["\xa3MT"],MXN:[n,"$"],NZD:["$\xa0NZ","$"],RHD:["$RH"],RON:[n,"L"],RWF:[n,"FR"],SGD:["$\xa0SG","$"],TOP:[n,"$T"],TWD:[n,"NT$"],USD:["$\xa0US","$"],VND:[n,"\u20ab"],XAF:[],XCD:[n,"$"],XOF:[],XPF:[]},"ltr",function(e){var t=Math.floor(Math.abs(e));return 0===t||1===t?1:5}]})},"S+eF":function(e,t,n){!function(t){"use strict";"function"==typeof bootstrap?bootstrap("promise",t):e.exports=t()}(function(){"use strict";var e=!1;try{throw new Error}catch(W){e=!!W.stack}var t,n=w(),r=function(){},i=function(){var e={task:void 0,next:null},t=e,n=!1,r=void 0,o=!1,a=[];function s(){for(var t,r;e.next;)t=(e=e.next).task,e.task=void 0,(r=e.domain)&&(e.domain=void 0,r.enter()),l(t,r);for(;a.length;)l(t=a.pop());n=!1}function l(e,t){try{e()}catch(W){if(o)throw t&&t.exit(),setTimeout(s,0),t&&t.enter(),W;setTimeout(function(){throw W},0)}t&&t.exit()}if(i=function(e){t=t.next={task:e,domain:o&&process.domain,next:null},n||(n=!0,r())},"object"==typeof process&&"[object process]"===process.toString()&&process.nextTick)o=!0,r=function(){process.nextTick(s)};else if("function"==typeof setImmediate)r="undefined"!=typeof window?setImmediate.bind(window,s):function(){setImmediate(s)};else if("undefined"!=typeof MessageChannel){var u=new MessageChannel;u.port1.onmessage=function(){r=c,u.port1.onmessage=s,s()};var c=function(){u.port2.postMessage(0)};r=function(){setTimeout(s,0),c()}}else r=function(){setTimeout(s,0)};return i.runAfter=function(e){a.push(e),n||(n=!0,r())},i}(),o=Function.call;function a(e){return function(){return o.apply(e,arguments)}}var s,l=a(Array.prototype.slice),u=a(Array.prototype.reduce||function(e,t){var n=0,r=this.length;if(1===arguments.length)for(;;){if(n in this){t=this[n++];break}if(++n>=r)throw new TypeError}for(;n<r;n++)n in this&&(t=e(t,this[n],n));return t}),c=a(Array.prototype.indexOf||function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return t;return-1}),d=a(Array.prototype.map||function(e,t){var n=this,r=[];return u(n,function(i,o,a){r.push(e.call(t,o,a,n))},void 0),r}),h=Object.create||function(e){function t(){}return t.prototype=e,new t},p=Object.defineProperty||function(e,t,n){return e[t]=n.value,e},f=a(Object.prototype.hasOwnProperty),m=Object.keys||function(e){var t=[];for(var n in e)f(e,n)&&t.push(n);return t},g=a(Object.prototype.toString);function v(e){return"[object StopIteration]"===g(e)||e instanceof s}function y(t,n){if(e&&n.stack&&"object"==typeof t&&null!==t&&t.stack){for(var r=[],i=n;i;i=i.source)i.stack&&(!t.__minimumStackCounter__||t.__minimumStackCounter__>i.stackCounter)&&(p(t,"__minimumStackCounter__",{value:i.stackCounter,configurable:!0}),r.unshift(i.stack));r.unshift(t.stack);var o=function(e){for(var t=e.split("\n"),n=[],r=0;r<t.length;++r){var i=t[r];_(i)||-1!==(o=i).indexOf("(module.js:")||-1!==o.indexOf("(node.js:")||!i||n.push(i)}var o;return n.join("\n")}(r.join("\nFrom previous event:\n"));p(t,"stack",{value:o,configurable:!0})}}function b(e){var t=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e);if(t)return[t[1],Number(t[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(e);if(n)return[n[1],Number(n[2])];var r=/.*@(.+):(\d+)$/.exec(e);return r?[r[1],Number(r[2])]:void 0}function _(e){var r=b(e);if(!r)return!1;var i=r[1];return r[0]===t&&i>=n&&i<=Q}function w(){if(e)try{throw new Error}catch(W){var n=W.stack.split("\n"),r=b(n[0].indexOf("@")>0?n[1]:n[2]);if(!r)return;return t=r[0],r[1]}}function C(e){return e instanceof E?e:O(e)?function(e){var t=S();return C.nextTick(function(){try{e.then(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}}),t.promise}(e):q(e)}s="undefined"!=typeof ReturnValue?ReturnValue:function(e){this.value=e},C.resolve=C,C.nextTick=i,C.longStackSupport=!1;var x=1;function S(){var t,n=[],r=[],i=h(S.prototype),o=h(E.prototype);if(o.promiseDispatch=function(e,i,o){var a=l(arguments);n?(n.push(a),"when"===i&&o[1]&&r.push(o[1])):C.nextTick(function(){t.promiseDispatch.apply(t,a)})},o.valueOf=function(){if(n)return o;var e=I(t);return T(e)&&(t=e),e},o.inspect=function(){return t?t.inspect():{state:"pending"}},C.longStackSupport&&e)try{throw new Error}catch(W){o.stack=W.stack.substring(W.stack.indexOf("\n")+1),o.stackCounter=x++}function a(i){t=i,C.longStackSupport&&e&&(o.source=i),u(n,function(e,t){C.nextTick(function(){i.promiseDispatch.apply(i,t)})},void 0),n=void 0,r=void 0}return i.promise=o,i.resolve=function(e){t||a(C(e))},i.fulfill=function(e){t||a(q(e))},i.reject=function(e){t||a(M(e))},i.notify=function(e){t||u(r,function(t,n){C.nextTick(function(){n(e)})},void 0)},i}function P(e){if("function"!=typeof e)throw new TypeError("resolver must be a function.");var t=S();try{e(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}return t.promise}function k(e){return P(function(t,n){for(var r=0,i=e.length;r<i;r++)C(e[r]).then(t,n)})}function E(e,t,n){void 0===t&&(t=function(e){return M(new Error("Promise does not support operation: "+e))}),void 0===n&&(n=function(){return{state:"unknown"}});var r=h(E.prototype);if(r.promiseDispatch=function(n,i,o){var a;try{a=e[i]?e[i].apply(r,o):t.call(r,i,o)}catch(s){a=M(s)}n&&n(a)},r.inspect=n,n){var i=n();"rejected"===i.state&&(r.exception=i.reason),r.valueOf=function(){var e=n();return"pending"===e.state||"rejected"===e.state?r:e.value}}return r}function A(e,t,n,r){return C(e).then(t,n,r)}function I(e){if(T(e)){var t=e.inspect();if("fulfilled"===t.state)return t.value}return e}function T(e){return e instanceof E}function O(e){return(t=e)===Object(t)&&"function"==typeof e.then;var t}"object"==typeof process&&process&&process.env&&process.env.Q_DEBUG&&(C.longStackSupport=!0),C.defer=S,S.prototype.makeNodeResolver=function(){var e=this;return function(t,n){t?e.reject(t):e.resolve(arguments.length>2?l(arguments,1):n)}},C.Promise=P,C.promise=P,P.race=k,P.all=z,P.reject=M,P.resolve=C,C.passByCopy=function(e){return e},E.prototype.passByCopy=function(){return this},C.join=function(e,t){return C(e).join(t)},E.prototype.join=function(e){return C([this,e]).spread(function(e,t){if(e===t)return e;throw new Error("Q can't join: not the same: "+e+" "+t)})},C.race=k,E.prototype.race=function(){return this.then(C.race)},C.makePromise=E,E.prototype.toString=function(){return"[object Promise]"},E.prototype.then=function(e,t,n){var r=this,i=S(),o=!1;return C.nextTick(function(){r.promiseDispatch(function(t){o||(o=!0,i.resolve(function(t){try{return"function"==typeof e?e(t):t}catch(n){return M(n)}}(t)))},"when",[function(e){o||(o=!0,i.resolve(function(e){if("function"==typeof t){y(e,r);try{return t(e)}catch(n){return M(n)}}return M(e)}(e)))}])}),r.promiseDispatch(void 0,"when",[void 0,function(e){var t,r=!1;try{t=function(e){return"function"==typeof n?n(e):e}(e)}catch(W){if(r=!0,!C.onerror)throw W;C.onerror(W)}r||i.notify(t)}]),i.promise},C.tap=function(e,t){return C(e).tap(t)},E.prototype.tap=function(e){return e=C(e),this.then(function(t){return e.fcall(t).thenResolve(t)})},C.when=A,E.prototype.thenResolve=function(e){return this.then(function(){return e})},C.thenResolve=function(e,t){return C(e).thenResolve(t)},E.prototype.thenReject=function(e){return this.then(function(){throw e})},C.thenReject=function(e,t){return C(e).thenReject(t)},C.nearer=I,C.isPromise=T,C.isPromiseAlike=O,C.isPending=function(e){return T(e)&&"pending"===e.inspect().state},E.prototype.isPending=function(){return"pending"===this.inspect().state},C.isFulfilled=function(e){return!T(e)||"fulfilled"===e.inspect().state},E.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},C.isRejected=function(e){return T(e)&&"rejected"===e.inspect().state},E.prototype.isRejected=function(){return"rejected"===this.inspect().state};var R,V=[],D=[],N=[],L=!0;function F(){V.length=0,D.length=0,L||(L=!0)}function M(e){var t=E({when:function(t){return t&&function(e){if(L){var t=c(D,e);-1!==t&&("object"==typeof process&&"function"==typeof process.emit&&C.nextTick.runAfter(function(){var n=c(N,e);-1!==n&&(process.emit("rejectionHandled",V[t],e),N.splice(n,1))}),D.splice(t,1),V.splice(t,1))}}(this),t?t(e):this}},function(){return this},function(){return{state:"rejected",reason:e}});return function(e,t){L&&("object"==typeof process&&"function"==typeof process.emit&&C.nextTick.runAfter(function(){-1!==c(D,e)&&(process.emit("unhandledRejection",t,e),N.push(e))}),D.push(e),V.push(t&&void 0!==t.stack?t.stack:"(no stack) "+t))}(t,e),t}function q(e){return E({when:function(){return e},get:function(t){return e[t]},set:function(t,n){e[t]=n},delete:function(t){delete e[t]},post:function(t,n){return null==t?e.apply(void 0,n):e[t].apply(e,n)},apply:function(t,n){return e.apply(t,n)},keys:function(){return m(e)}},void 0,function(){return{state:"fulfilled",value:e}})}function j(e,t,n){return C(e).spread(t,n)}function B(e,t,n){return C(e).dispatch(t,n)}function z(e){return A(e,function(e){var t=0,n=S();return u(e,function(r,i,o){var a;T(i)&&"fulfilled"===(a=i.inspect()).state?e[o]=a.value:(++t,A(i,function(r){e[o]=r,0==--t&&n.resolve(e)},n.reject,function(e){n.notify({index:o,value:e})}))},void 0),0===t&&n.resolve(e),n.promise})}function U(e){if(0===e.length)return C.resolve();var t=C.defer(),n=0;return u(e,function(r,i,o){n++,A(e[o],function(e){t.resolve(e)},function(e){if(0==--n){var r=e||new Error(""+e);r.message="Q can't get fulfillment value from any promise, all promises were rejected. Last error message: "+r.message,t.reject(r)}},function(e){t.notify({index:o,value:e})})},void 0),t.promise}function H(e){return A(e,function(e){return e=d(e,C),A(z(d(e,function(e){return A(e,r,r)})),function(){return e})})}C.resetUnhandledRejections=F,C.getUnhandledReasons=function(){return V.slice()},C.stopUnhandledRejectionTracking=function(){F(),L=!1},F(),C.reject=M,C.fulfill=q,C.master=function(e){return E({isDef:function(){}},function(t,n){return B(e,t,n)},function(){return C(e).inspect()})},C.spread=j,E.prototype.spread=function(e,t){return this.all().then(function(t){return e.apply(void 0,t)},t)},C.async=function(e){return function(){function t(e,t){var o;if("undefined"==typeof StopIteration){try{o=n[e](t)}catch(a){return M(a)}return o.done?C(o.value):A(o.value,r,i)}try{o=n[e](t)}catch(a){return v(a)?C(a.value):M(a)}return A(o,r,i)}var n=e.apply(this,arguments),r=t.bind(t,"next"),i=t.bind(t,"throw");return r()}},C.spawn=function(e){C.done(C.async(e)())},C.return=function(e){throw new s(e)},C.promised=function(e){return function(){return j([this,z(arguments)],function(t,n){return e.apply(t,n)})}},C.dispatch=B,E.prototype.dispatch=function(e,t){var n=this,r=S();return C.nextTick(function(){n.promiseDispatch(r.resolve,e,t)}),r.promise},C.get=function(e,t){return C(e).dispatch("get",[t])},E.prototype.get=function(e){return this.dispatch("get",[e])},C.set=function(e,t,n){return C(e).dispatch("set",[t,n])},E.prototype.set=function(e,t){return this.dispatch("set",[e,t])},C.del=C.delete=function(e,t){return C(e).dispatch("delete",[t])},E.prototype.del=E.prototype.delete=function(e){return this.dispatch("delete",[e])},C.mapply=C.post=function(e,t,n){return C(e).dispatch("post",[t,n])},E.prototype.mapply=E.prototype.post=function(e,t){return this.dispatch("post",[e,t])},C.send=C.mcall=C.invoke=function(e,t){return C(e).dispatch("post",[t,l(arguments,2)])},E.prototype.send=E.prototype.mcall=E.prototype.invoke=function(e){return this.dispatch("post",[e,l(arguments,1)])},C.fapply=function(e,t){return C(e).dispatch("apply",[void 0,t])},E.prototype.fapply=function(e){return this.dispatch("apply",[void 0,e])},C.try=C.fcall=function(e){return C(e).dispatch("apply",[void 0,l(arguments,1)])},E.prototype.fcall=function(){return this.dispatch("apply",[void 0,l(arguments)])},C.fbind=function(e){var t=C(e),n=l(arguments,1);return function(){return t.dispatch("apply",[this,n.concat(l(arguments))])}},E.prototype.fbind=function(){var e=this,t=l(arguments);return function(){return e.dispatch("apply",[this,t.concat(l(arguments))])}},C.keys=function(e){return C(e).dispatch("keys",[])},E.prototype.keys=function(){return this.dispatch("keys",[])},C.all=z,E.prototype.all=function(){return z(this)},C.any=U,E.prototype.any=function(){return U(this)},C.allResolved=(R=H,function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("allResolved is deprecated, use allSettled instead.",new Error("").stack),R.apply(R,arguments)}),E.prototype.allResolved=function(){return H(this)},C.allSettled=function(e){return C(e).allSettled()},E.prototype.allSettled=function(){return this.then(function(e){return z(d(e,function(e){function t(){return e.inspect()}return(e=C(e)).then(t,t)}))})},C.fail=C.catch=function(e,t){return C(e).then(void 0,t)},E.prototype.fail=E.prototype.catch=function(e){return this.then(void 0,e)},C.progress=function(e,t){return C(e).then(void 0,void 0,t)},E.prototype.progress=function(e){return this.then(void 0,void 0,e)},C.fin=C.finally=function(e,t){return C(e).finally(t)},E.prototype.fin=E.prototype.finally=function(e){if(!e||"function"!=typeof e.apply)throw new Error("Q can't apply finally callback");return e=C(e),this.then(function(t){return e.fcall().then(function(){return t})},function(t){return e.fcall().then(function(){throw t})})},C.done=function(e,t,n,r){return C(e).done(t,n,r)},E.prototype.done=function(e,t,n){var r=function(e){C.nextTick(function(){if(y(e,i),!C.onerror)throw e;C.onerror(e)})},i=e||t||n?this.then(e,t,n):this;"object"==typeof process&&process&&process.domain&&(r=process.domain.bind(r)),i.then(void 0,r)},C.timeout=function(e,t,n){return C(e).timeout(t,n)},E.prototype.timeout=function(e,t){var n=S(),r=setTimeout(function(){t&&"string"!=typeof t||((t=new Error(t||"Timed out after "+e+" ms")).code="ETIMEDOUT"),n.reject(t)},e);return this.then(function(e){clearTimeout(r),n.resolve(e)},function(e){clearTimeout(r),n.reject(e)},n.notify),n.promise},C.delay=function(e,t){return void 0===t&&(t=e,e=void 0),C(e).delay(t)},E.prototype.delay=function(e){return this.then(function(t){var n=S();return setTimeout(function(){n.resolve(t)},e),n.promise})},C.nfapply=function(e,t){return C(e).nfapply(t)},E.prototype.nfapply=function(e){var t=S(),n=l(e);return n.push(t.makeNodeResolver()),this.fapply(n).fail(t.reject),t.promise},C.nfcall=function(e){var t=l(arguments,1);return C(e).nfapply(t)},E.prototype.nfcall=function(){var e=l(arguments),t=S();return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},C.nfbind=C.denodeify=function(e){if(void 0===e)throw new Error("Q can't wrap an undefined function");var t=l(arguments,1);return function(){var n=t.concat(l(arguments)),r=S();return n.push(r.makeNodeResolver()),C(e).fapply(n).fail(r.reject),r.promise}},E.prototype.nfbind=E.prototype.denodeify=function(){var e=l(arguments);return e.unshift(this),C.denodeify.apply(void 0,e)},C.nbind=function(e,t){var n=l(arguments,2);return function(){var r=n.concat(l(arguments)),i=S();function o(){return e.apply(t,arguments)}return r.push(i.makeNodeResolver()),C(o).fapply(r).fail(i.reject),i.promise}},E.prototype.nbind=function(){var e=l(arguments,0);return e.unshift(this),C.nbind.apply(void 0,e)},C.nmapply=C.npost=function(e,t,n){return C(e).npost(t,n)},E.prototype.nmapply=E.prototype.npost=function(e,t){var n=l(t||[]),r=S();return n.push(r.makeNodeResolver()),this.dispatch("post",[e,n]).fail(r.reject),r.promise},C.nsend=C.nmcall=C.ninvoke=function(e,t){var n=l(arguments,2),r=S();return n.push(r.makeNodeResolver()),C(e).dispatch("post",[t,n]).fail(r.reject),r.promise},E.prototype.nsend=E.prototype.nmcall=E.prototype.ninvoke=function(e){var t=l(arguments,1),n=S();return t.push(n.makeNodeResolver()),this.dispatch("post",[e,t]).fail(n.reject),n.promise},C.nodeify=function(e,t){return C(e).nodeify(t)},E.prototype.nodeify=function(e){if(!e)return this;this.then(function(t){C.nextTick(function(){e(null,t)})},function(t){C.nextTick(function(){e(t)})})},C.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var Q=w();return C})},S8lG:function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},i680:function(e,t,n){"use strict";n.r(t),n.d(t,"AcroForm",function(){return dt}),n.d(t,"AcroFormAppearance",function(){return st}),n.d(t,"AcroFormButton",function(){return et}),n.d(t,"AcroFormCheckBox",function(){return it}),n.d(t,"AcroFormChoiceField",function(){return Ye}),n.d(t,"AcroFormComboBox",function(){return Ze}),n.d(t,"AcroFormEditBox",function(){return Xe}),n.d(t,"AcroFormListBox",function(){return Ke}),n.d(t,"AcroFormPasswordField",function(){return at}),n.d(t,"AcroFormPushButton",function(){return tt}),n.d(t,"AcroFormRadioButton",function(){return nt}),n.d(t,"AcroFormTextField",function(){return ot}),n.d(t,"GState",function(){return ye}),n.d(t,"ShadingPattern",function(){return _e}),n.d(t,"TilingPattern",function(){return we}),n.d(t,"jsPDF",function(){return Ce});var r=n("S8lG"),i=n.n(r),o=Uint8Array,a=Uint16Array,s=Uint32Array,l=new o([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),u=new o([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new o([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=function(e,t){for(var n=new a(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new s(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},h=d(l,2),p=h[0],f=h[1];p[28]=258,f[258]=28;for(var m=d(u,0),g=m[0],v=m[1],y=new a(32768),b=0;b<32768;++b){var _=(43690&b)>>>1|(21845&b)<<1;y[b]=((65280&(_=(61680&(_=(52428&_)>>>2|(13107&_)<<2))>>>4|(3855&_)<<4))>>>8|(255&_)<<8)>>>1}var w=function(e,t,n){for(var r=e.length,i=0,o=new a(t);i<r;++i)++o[e[i]-1];var s,l=new a(t);for(i=0;i<t;++i)l[i]=l[i-1]+o[i-1]<<1;if(n){s=new a(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],d=t-e[i],h=l[e[i]-1]++<<d,p=h|(1<<d)-1;h<=p;++h)s[y[h]>>>u]=c}else for(s=new a(r),i=0;i<r;++i)s[i]=y[l[e[i]-1]++]>>>15-e[i];return s},C=new o(288);for(b=0;b<144;++b)C[b]=8;for(b=144;b<256;++b)C[b]=9;for(b=256;b<280;++b)C[b]=7;for(b=280;b<288;++b)C[b]=8;var x=new o(32);for(b=0;b<32;++b)x[b]=5;var S=w(C,9,0),P=w(C,9,1),k=w(x,5,0),E=w(x,5,1),A=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},I=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(7&t)&n},T=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(7&t)},O=function(e){return(e/8>>0)+(7&e&&1)},R=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof a?a:e instanceof s?s:o)(n-t);return r.set(e.subarray(t,n)),r},V=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},D=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},N=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new o(0),0];if(1==i){var l=new o(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var u=n[0],c=n[1],d=0,h=1,p=2;for(n[0]={s:-1,f:u.f+c.f,l:u,r:c};h!=i-1;)u=n[n[d].f<n[p].f?d++:p++],c=n[d!=h&&n[d].f<n[p].f?d++:p++],n[h++]={s:-1,f:u.f+c.f,l:u,r:c};var f=s[0].s;for(r=1;r<i;++r)s[r].s>f&&(f=s[r].s);var m=new a(f+1),g=L(n[h-1],m,0);if(g>t){r=0;var v=0,y=g-t,b=1<<y;for(s.sort(function(e,t){return m[t.s]-m[e.s]||e.f-t.f});r<i;++r){var _=s[r].s;if(!(m[_]>t))break;v+=b-(1<<g-m[_]),m[_]=t}for(v>>>=y;v>0;){var w=s[r].s;m[w]<t?v-=1<<t-m[w]++-1:++r}for(;r>=0&&v;--r){var C=s[r].s;m[C]==t&&(--m[C],++v)}g=t}return[new o(m),g]},L=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},F=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new a(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[l]}return[n.subarray(0,r),t]},M=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},q=function(e,t,n){var r=n.length,i=O(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},j=function(e,t,n,r,i,o,s,d,h,p,f){V(t,f++,n),++i[256];for(var m=N(i,15),g=m[0],v=m[1],y=N(o,15),b=y[0],_=y[1],P=F(g),E=P[0],A=P[1],I=F(b),T=I[0],O=I[1],R=new a(19),L=0;L<E.length;++L)R[31&E[L]]++;for(L=0;L<T.length;++L)R[31&T[L]]++;for(var j=N(R,7),B=j[0],z=j[1],U=19;U>4&&!B[c[U-1]];--U);var H,Q,W,G,$=p+5<<3,J=M(i,C)+M(o,x)+s,Y=M(i,g)+M(o,b)+s+14+3*U+M(R,B)+(2*R[16]+3*R[17]+7*R[18]);if($<=J&&$<=Y)return q(t,f,e.subarray(h,h+p));if(V(t,f,1+(Y<J)),f+=2,Y<J){H=w(g,v,0),Q=g,W=w(b,_,0),G=b;var K=w(B,z,0);for(V(t,f,A-257),V(t,f+5,O-1),V(t,f+10,U-4),f+=14,L=0;L<U;++L)V(t,f+3*L,B[c[L]]);f+=3*U;for(var Z=[E,T],X=0;X<2;++X){var ee=Z[X];for(L=0;L<ee.length;++L)V(t,f,K[te=31&ee[L]]),f+=B[te],te>15&&(V(t,f,ee[L]>>>5&127),f+=ee[L]>>>12)}}else H=S,Q=C,W=k,G=x;for(L=0;L<d;++L)if(r[L]>255){var te;D(t,f,H[257+(te=r[L]>>>18&31)]),f+=Q[te+257],te>7&&(V(t,f,r[L]>>>23&31),f+=l[te]);var ne=31&r[L];D(t,f,W[ne]),f+=G[ne],ne>3&&(D(t,f,r[L]>>>5&8191),f+=u[ne])}else D(t,f,H[r[L]]),f+=Q[r[L]];return D(t,f,H[256]),f+Q[256]},B=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]);new o(0);function z(e,t){void 0===t&&(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length,a=0;a!=o;){for(var s=Math.min(a+5552,o);a<s;++a)i+=r+=n[a];r%=65521,i%=65521}e=r,t=i},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();n.p(e);var r,i,c=(2,4,function(e,t,n,r,i,c){var d=e.length,h=new o(2+d+5*(1+Math.floor(d/7e3))+4),p=h.subarray(2,h.length-4),m=0;if(!t||d<8)for(var g=0;g<=d;g+=65535){var y=g+65535;y<d?m=q(p,m,e.subarray(g,y)):(p[g]=c,m=q(p,m,e.subarray(g,d)))}else{for(var b=B[t-1],_=b>>>13,w=8191&b,C=(1<<n)-1,x=new a(32768),S=new a(C+1),P=Math.ceil(n/3),k=2*P,E=function(t){return(e[t]^e[t+1]<<P^e[t+2]<<k)&C},A=new s(25e3),I=new a(288),T=new a(32),V=0,D=0,N=(g=0,0),L=0,F=0;g<d;++g){var M=E(g),z=32767&g,U=S[M];if(x[z]=U,S[M]=z,L<=g){var H=d-g;if((V>7e3||N>24576)&&H>423){m=j(e,p,0,A,I,T,D,N,F,g-F,m),N=V=D=0,F=g;for(var Q=0;Q<286;++Q)I[Q]=0;for(Q=0;Q<30;++Q)T[Q]=0}var W=2,G=0,$=w,J=z-U&32767;if(H>2&&M==E(g-J))for(var Y=Math.min(_,H)-1,K=Math.min(32767,g),Z=Math.min(258,H);J<=K&&--$&&z!=U;){if(e[g+W]==e[g+W-J]){for(var X=0;X<Z&&e[g+X]==e[g+X-J];++X);if(X>W){if(W=X,G=J,X>Y)break;var ee=Math.min(J,X-2),te=0;for(Q=0;Q<ee;++Q){var ne=g-J+Q+32768&32767,re=ne-x[ne]+32768&32767;re>te&&(te=re,U=ne)}}}J+=(z=U)-(U=x[z])+32768&32767}if(G){A[N++]=268435456|f[W]<<18|v[G];var ie=31&f[W],oe=31&v[G];D+=l[ie]+u[oe],++I[257+ie],++T[oe],L=g+W,++V}else A[N++]=e[g],++I[e[g]]}}m=j(e,p,c,A,I,T,D,N,F,g-F,m)}return R(h,0,2+O(m)+4)}(r=e,null==(i=t).level?6:i.level,null==i.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+i.mem,0,0,!0));return function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}(c,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(c,c.length-4,n.d()),c}var U=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function H(){U.console&&"function"==typeof U.console.log&&U.console.log.apply(U.console,arguments)}var Q={log:H,warn:function(e){U.console&&("function"==typeof U.console.warn?U.console.warn.apply(U.console,arguments):H.call(null,arguments))},error:function(e){U.console&&("function"==typeof U.console.error?U.console.error.apply(U.console,arguments):H(e))}};function W(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){K(r.response,t,n)},r.onerror=function(){Q.error("could not download file")},r.send()}function G(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function $(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var J,Y,K=U.saveAs||("object"!==("undefined"==typeof window?"undefined":i()(window))||window!==U?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=U.URL||U.webkitURL,i=document.createElement("a");i.download=t=t||e.name||"download",i.rel="noopener","string"==typeof e?(i.href=e,i.origin!==location.origin?G(i.href)?W(e,t,n):$(i,i.target="_blank"):$(i)):(i.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){$(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"==typeof e)if(G(e))W(e,t,n);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){$(r)})}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==i()(t)&&(Q.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return W(e,t,n);var o="application/octet-stream"===e.type,a=/constructor/i.test(U.HTMLElement)||U.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||o&&a)&&"object"===("undefined"==typeof FileReader?"undefined":i()(FileReader))){var l=new FileReader;l.onloadend=function(){var e=l.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},l.readAsDataURL(e)}else{var u=U.URL||U.webkitURL,c=u.createObjectURL(e);r?r.location=c:location.href=c,r=null,setTimeout(function(){u.revokeObjectURL(c)},4e4)}});function Z(e){var t;e=e||"",this.ok=!1,"#"==e.charAt(0)&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r<n.length;r++){var i=n[r].process,o=n[r].re.exec(e);o&&(t=i(o),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),"#"+e+t+n}}function X(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];n=te(n,r,i,o,t[0],7,-680876936),o=te(o,n,r,i,t[1],12,-389564586),i=te(i,o,n,r,t[2],17,606105819),r=te(r,i,o,n,t[3],22,-1044525330),n=te(n,r,i,o,t[4],7,-176418897),o=te(o,n,r,i,t[5],12,1200080426),i=te(i,o,n,r,t[6],17,-1473231341),r=te(r,i,o,n,t[7],22,-45705983),n=te(n,r,i,o,t[8],7,1770035416),o=te(o,n,r,i,t[9],12,-1958414417),i=te(i,o,n,r,t[10],17,-42063),r=te(r,i,o,n,t[11],22,-1990404162),n=te(n,r,i,o,t[12],7,1804603682),o=te(o,n,r,i,t[13],12,-40341101),i=te(i,o,n,r,t[14],17,-1502002290),n=ne(n,r=te(r,i,o,n,t[15],22,1236535329),i,o,t[1],5,-165796510),o=ne(o,n,r,i,t[6],9,-1069501632),i=ne(i,o,n,r,t[11],14,643717713),r=ne(r,i,o,n,t[0],20,-373897302),n=ne(n,r,i,o,t[5],5,-701558691),o=ne(o,n,r,i,t[10],9,38016083),i=ne(i,o,n,r,t[15],14,-660478335),r=ne(r,i,o,n,t[4],20,-405537848),n=ne(n,r,i,o,t[9],5,568446438),o=ne(o,n,r,i,t[14],9,-1019803690),i=ne(i,o,n,r,t[3],14,-187363961),r=ne(r,i,o,n,t[8],20,1163531501),n=ne(n,r,i,o,t[13],5,-1444681467),o=ne(o,n,r,i,t[2],9,-51403784),i=ne(i,o,n,r,t[7],14,1735328473),n=re(n,r=ne(r,i,o,n,t[12],20,-1926607734),i,o,t[5],4,-378558),o=re(o,n,r,i,t[8],11,-2022574463),i=re(i,o,n,r,t[11],16,1839030562),r=re(r,i,o,n,t[14],23,-35309556),n=re(n,r,i,o,t[1],4,-1530992060),o=re(o,n,r,i,t[4],11,1272893353),i=re(i,o,n,r,t[7],16,-155497632),r=re(r,i,o,n,t[10],23,-1094730640),n=re(n,r,i,o,t[13],4,681279174),o=re(o,n,r,i,t[0],11,-358537222),i=re(i,o,n,r,t[3],16,-722521979),r=re(r,i,o,n,t[6],23,76029189),n=re(n,r,i,o,t[9],4,-640364487),o=re(o,n,r,i,t[12],11,-421815835),i=re(i,o,n,r,t[15],16,530742520),n=ie(n,r=re(r,i,o,n,t[2],23,-995338651),i,o,t[0],6,-198630844),o=ie(o,n,r,i,t[7],10,1126891415),i=ie(i,o,n,r,t[14],15,-1416354905),r=ie(r,i,o,n,t[5],21,-57434055),n=ie(n,r,i,o,t[12],6,1700485571),o=ie(o,n,r,i,t[3],10,-1894986606),i=ie(i,o,n,r,t[10],15,-1051523),r=ie(r,i,o,n,t[1],21,-2054922799),n=ie(n,r,i,o,t[8],6,1873313359),o=ie(o,n,r,i,t[15],10,-30611744),i=ie(i,o,n,r,t[6],15,-1560198380),r=ie(r,i,o,n,t[13],21,1309151649),n=ie(n,r,i,o,t[4],6,-145523070),o=ie(o,n,r,i,t[11],10,-1120210379),i=ie(i,o,n,r,t[2],15,718787259),r=ie(r,i,o,n,t[9],21,-343485551),e[0]=he(n,e[0]),e[1]=he(r,e[1]),e[2]=he(i,e[2]),e[3]=he(o,e[3])}function ee(e,t,n,r,i,o){return t=he(he(t,e),he(r,o)),he(t<<i|t>>>32-i,n)}function te(e,t,n,r,i,o,a){return ee(t&n|~t&r,e,t,i,o,a)}function ne(e,t,n,r,i,o,a){return ee(t&r|n&~r,e,t,i,o,a)}function re(e,t,n,r,i,o,a){return ee(t^n^r,e,t,i,o,a)}function ie(e,t,n,r,i,o,a){return ee(n^(t|~r),e,t,i,o,a)}function oe(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)X(r,ae(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(X(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,X(r,i),r}function ae(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}J=U.atob.bind(U),Y=U.btoa.bind(U);var se="0123456789abcdef".split("");function le(e){for(var t="",n=0;n<4;n++)t+=se[e>>8*n+4&15]+se[e>>8*n&15];return t}function ue(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function ce(e){return oe(e).map(ue).join("")}var de="5d41402abc4b2a76b9719d911017c592"!=function(e){for(var t=0;t<e.length;t++)e[t]=le(e[t]);return e.join("")}(oe("hello"));function he(e,t){if(de){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}function pe(e,t){var n,r,i;if(e!==n){for(var o=(i=e,new Array(1+(256/e.length>>0)+1).join(i)),a=[],s=0;s<256;s++)a[s]=s;var l=0;for(s=0;s<256;s++){var u=a[s];l=(l+u+o.charCodeAt(s))%256,a[s]=a[l],a[l]=u}n=e,r=a}else a=r;var c=t.length,d=0,h=0,p="";for(s=0;s<c;s++)h=(h+(u=a[d=(d+1)%256]))%256,a[d]=a[h],a[h]=u,o=a[(a[d]+a[h])%256],p+=String.fromCharCode(t.charCodeAt(s)^o);return p}var fe={print:4,modify:8,copy:16,"annot-forms":32};function me(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach(function(e){if(void 0!==fe.perm)throw new Error("Invalid permission: "+e);i+=fe[e]}),this.padding="(\xbfN^Nu\x8aAd\0NV\xff\xfa\x01\b..\0\xb6\xd0h>\x80/\f\xa9\xfedSiz";var o=(t+this.padding).substr(0,32),a=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,a),this.P=-(1+(255^i)),this.encryptionKey=ce(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=pe(this.encryptionKey,this.padding)}function ge(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);t+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):e[r]}return t}function ve(e){if("object"!==i()(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,n,r){if(r=r||!1,"string"!=typeof e||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[n,!!r],i},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],0===Object.keys(t[n]).length&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var o in t[n]){var a=t[n][o];try{a[0].apply(e,r)}catch(n){U.console&&Q.error("jsPDF PubSub Error",n.message,n)}a[1]&&i.push(o)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function ye(e){if(!(this instanceof ye))return new ye(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function be(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function _e(e,t,n,r,i){if(!(this instanceof _e))return new _e(e,t,n,r,i);this.type="axial"===e?2:3,this.coords=t,this.colors=n,be.call(this,r,i)}function we(e,t,n,r,i){if(!(this instanceof we))return new we(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,be.call(this,r,i)}function Ce(e){var t,n="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],o=arguments[2],a=arguments[3],s=[],l=1,u=16,c="S",d=null;"object"===i()(e=e||{})&&(n=e.orientation,r=e.unit||r,o=e.format||o,a=e.compress||e.compressPdf||a,null!==(d=e.encryption||null)&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),l="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(t=e.precision),void 0!==e.floatPrecision&&(u=e.floatPrecision),c=e.defaultPathOperation||"S"),s=e.filters||(!0===a?["FlateEncode"]:s),r=r||"mm",n=(""+(n||"P")).toLowerCase();var h=e.putOnlyUsedFonts||!1,p={},f={internal:{},__private__:{}};f.__private__.PubSub=ve;var m="1.3",g=f.__private__.getPdfVersion=function(){return m};f.__private__.setPdfVersion=function(e){m=e};var v={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return v};var y=f.__private__.getPageFormat=function(e){return v[e]};o=o||"a4";var b={COMPAT:"compat",ADVANCED:"advanced"},_=b.COMPAT;function w(){this.saveGraphicsState(),ie(new Qe(ke,0,0,-ke,0,jn()*ke).toString()+" cm"),this.setFontSize(this.getFontSize()/ke),c="n",_=b.ADVANCED}function C(){this.restoreGraphicsState(),c="S",_=b.COMPAT}var x=f.__private__.combineFontStyleAndFontWeight=function(e,t){if("bold"==e&&"normal"==t||"bold"==e&&400==t||"normal"==e&&"italic"==t||"bold"==e&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&(e=400==t||"normal"===t?"italic"===e?"italic":"normal":700!=t&&"bold"!==t||"normal"!==e?(700==t?"bold":t)+""+e:"bold"),e};f.advancedAPI=function(e){var t=_===b.COMPAT;return t&&w.call(this),"function"!=typeof e||(e(this),t&&C.call(this)),this},f.compatAPI=function(e){var t=_===b.ADVANCED;return t&&C.call(this),"function"!=typeof e||(e(this),t&&w.call(this)),this},f.isAdvancedAPI=function(){return _===b.ADVANCED};var S,P=function(e){if(_!==b.ADVANCED)throw new Error(e+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},k=f.roundToPrecision=f.__private__.roundToPrecision=function(e,n){var r=t||n;if(isNaN(e)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return e.toFixed(r).replace(/0+$/,"")};S=f.hpf=f.__private__.hpf="number"==typeof u?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return k(e,u)}:"smart"===u?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return k(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return k(e,16)};var E=f.f2=f.__private__.f2=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f2");return k(e,2)},A=f.__private__.f3=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f3");return k(e,3)},I=f.scale=f.__private__.scale=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.scale");return _===b.COMPAT?e*ke:_===b.ADVANCED?e:void 0},T=function(e){return _===b.COMPAT?jn()-e:_===b.ADVANCED?e:void 0},O=function(e){return I(T(e))};f.__private__.setPrecision=f.setPrecision=function(e){"number"==typeof parseInt(e,10)&&(t=parseInt(e,10))};var R,V="00000000000000000000000000000000",D=f.__private__.getFileId=function(){return V},N=f.__private__.setFileId=function(e){return V=void 0!==e&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():V.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==d&&(Gt=new me(d.userPermissions,d.userPassword,d.ownerPassword,V)),V};f.setFileId=function(e){return N(e),this},f.getFileId=function(){return D()};var L=f.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),n=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),i=Math.abs(t%60),o=[n,B(r),"'",B(i),"'"].join("");return["D:",e.getFullYear(),B(e.getMonth()+1),B(e.getDate()),B(e.getHours()),B(e.getMinutes()),B(e.getSeconds()),o].join("")},F=f.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),a=parseInt(e.substr(14,2),10);return new Date(t,n,r,i,o,a,0)},M=f.__private__.setCreationDate=function(e){var t;if(void 0===e&&(e=new Date),e instanceof Date)t=L(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=e}return R=t},q=f.__private__.getCreationDate=function(e){var t=R;return"jsDate"===e&&(t=F(R)),t};f.setCreationDate=function(e){return M(e),this},f.getCreationDate=function(e){return q(e)};var j,B=f.__private__.padd2=function(e){return("0"+parseInt(e)).slice(-2)},z=f.__private__.padd2Hex=function(e){return("00"+(e=e.toString())).substr(e.length)},H=0,W=[],G=[],$=0,J=[],X=[],ee=!1,te=G,ne=function(){H=0,$=0,G=[],W=[],J=[],Xe=Ye(),et=Ye()};f.__private__.setCustomOutputDestination=function(e){ee=!0,te=e};var re=function(e){ee||(te=e)};f.__private__.resetCustomOutputDestination=function(){ee=!1,te=G};var ie=f.__private__.out=function(e){return e=e.toString(),$+=e.length+1,te.push(e),te},oe=f.__private__.write=function(e){return ie(1===arguments.length?e.toString():Array.prototype.join.call(arguments," "))},ae=f.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},se=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return se};var le=e.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(e){return le=_===b.ADVANCED?e/ke:e,this};var ue,ce=f.__private__.getFontSize=f.getFontSize=function(){return _===b.COMPAT?le:le*ke},de=e.R2L||!1;f.__private__.setR2L=f.setR2L=function(e){return de=e,this},f.__private__.getR2L=f.getR2L=function(){return de};var he,pe=f.__private__.setZoomMode=function(e){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(e))ue=e;else if(isNaN(e)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(e))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+e+'" is not recognized.');ue=e}else ue=parseInt(e,10)};f.__private__.getZoomMode=function(){return ue};var fe,be=f.__private__.setPageMode=function(e){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(e))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+e+'" is not recognized.');he=e};f.__private__.getPageMode=function(){return he};var xe=f.__private__.setLayoutMode=function(e){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(e))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+e+'" is not recognized.');fe=e};f.__private__.getLayoutMode=function(){return fe},f.__private__.setDisplayMode=f.setDisplayMode=function(e,t,n){return pe(e),xe(t),be(n),this};var Se={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(e){if(-1===Object.keys(Se).indexOf(e))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Se[e]},f.__private__.getDocumentProperties=function(){return Se},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(e){for(var t in Se)Se.hasOwnProperty(t)&&e[t]&&(Se[t]=e[t]);return this},f.__private__.setDocumentProperty=function(e,t){if(-1===Object.keys(Se).indexOf(e))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Se[e]=t};var Pe,ke,Ee,Ae,Ie,Te={},Oe={},Re=[],Ve={},De={},Ne={},Le={},Fe=null,Me=0,qe=[],je=new ve(f),Be=e.hotfixes||[],ze={},Ue={},He=[],Qe=function e(t,n,r,i,o,a){if(!(this instanceof e))return new e(t,n,r,i,o,a);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(o)&&(o=0),isNaN(a)&&(a=0),this._matrix=[t,n,r,i,o,a]};Object.defineProperty(Qe.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Qe.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Qe.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Qe.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Qe.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Qe.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Qe.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Qe.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Qe.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Qe.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Qe.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Qe.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Qe.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Qe.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Qe.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Qe.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Qe.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(S).join(e)},Qe.prototype.multiply=function(e){return new Qe(e.sx*this.sx+e.shy*this.shx,e.sx*this.shy+e.shy*this.sy,e.shx*this.sx+e.sy*this.shx,e.shx*this.shy+e.sy*this.sy,e.tx*this.sx+e.ty*this.shx+this.tx,e.tx*this.shy+e.ty*this.sy+this.ty)},Qe.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,o=this.ty,a=Math.sqrt(e*e+t*t),s=(e/=a)*n+(t/=a)*r;n-=e*s,r-=t*s;var l=Math.sqrt(n*n+r*r);return s/=l,e*(r/=l)<t*(n/=l)&&(e=-e,t=-t,s=-s,a=-a),{scale:new Qe(a,0,0,l,0,0),translate:new Qe(1,0,0,1,i,o),rotate:new Qe(e,t,-t,e,0,0),skew:new Qe(1,0,s,1,0,0)}},Qe.prototype.toString=function(e){return this.join(" ")},Qe.prototype.inversed=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,o=this.ty,a=1/(e*r-t*n),s=r*a,l=-t*a,u=-n*a,c=e*a;return new Qe(s,l,u,c,-s*i-u*o,-l*i-c*o)},Qe.prototype.applyToPoint=function(e){return new Rn(e.x*this.sx+e.y*this.shx+this.tx,e.x*this.shy+e.y*this.sy+this.ty)},Qe.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e),n=this.applyToPoint(new Rn(e.x+e.w,e.y+e.h));return new Vn(t.x,t.y,n.x-t.x,n.y-t.y)},Qe.prototype.clone=function(){return new Qe(this.sx,this.shy,this.shx,this.sy,this.tx,this.ty)},f.Matrix=Qe;var We=f.matrixMult=function(e,t){return t.multiply(e)},Ge=new Qe(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Ge;var $e=function(e,t){if(!De[e]){var n=(t instanceof _e?"Sh":"P")+(Object.keys(Ve).length+1).toString(10);t.id=n,De[e]=n,Ve[n]=t,je.publish("addPattern",t)}};f.ShadingPattern=_e,f.TilingPattern=we,f.addShadingPattern=function(e,t){return P("addShadingPattern()"),$e(e,t),this},f.beginTilingPattern=function(e){P("beginTilingPattern()"),Nn(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},f.endTilingPattern=function(e,t){P("endTilingPattern()"),t.stream=X[j].join("\n"),$e(e,t),je.publish("endTilingPattern",t),He.pop().restore()};var Je=f.__private__.newObject=function(){var e=Ye();return Ke(e,!0),e},Ye=f.__private__.newObjectDeferred=function(){return H++,W[H]=function(){return $},H},Ke=function(e,t){return t="boolean"==typeof t&&t,W[e]=$,t&&ie(e+" 0 obj"),e},Ze=f.__private__.newAdditionalObject=function(){var e={objId:Ye(),content:""};return J.push(e),e},Xe=Ye(),et=Ye(),tt=f.__private__.decodeColorString=function(e){var t=e.split(" ");if(2!==t.length||"g"!==t[1]&&"G"!==t[1])5!==t.length||"k"!==t[4]&&"K"!==t[4]||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]);else{var n=parseFloat(t[0]);t=[n,n,n,"r"]}for(var r="#",i=0;i<3;i++)r+=("0"+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return r},nt=f.__private__.encodeColorString=function(e){var t;"string"==typeof e&&(e={ch1:e});var n=e.ch1,r=e.ch2,o=e.ch3,a=e.ch4,s="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var l=new Z(n);if(l.ok)n=l.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var u=parseInt(n.substr(1),16);n=u>>16&255,r=u>>8&255,o=255&u}if(void 0===r||void 0===a&&n===r&&r===o)if("string"==typeof n)t=n+" "+s[0];else switch(e.precision){case 2:t=E(n/255)+" "+s[0];break;case 3:default:t=A(n/255)+" "+s[0]}else if(void 0===a||"object"===i()(a)){if(a&&!isNaN(a.a)&&0===a.a)return["1.","1.","1.",s[1]].join(" ");if("string"==typeof n)t=[n,r,o,s[1]].join(" ");else switch(e.precision){case 2:t=[E(n/255),E(r/255),E(o/255),s[1]].join(" ");break;default:case 3:t=[A(n/255),A(r/255),A(o/255),s[1]].join(" ")}}else if("string"==typeof n)t=[n,r,o,a,s[2]].join(" ");else switch(e.precision){case 2:t=[E(n),E(r),E(o),E(a),s[2]].join(" ");break;case 3:default:t=[A(n),A(r),A(o),A(a),s[2]].join(" ")}return t},rt=f.__private__.getFilters=function(){return s},it=f.__private__.putStream=function(e){var t=(e=e||{}).data||"",n=e.filters||rt(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,o=t.length,a=e.objectId,s=function(e){return e};if(null!==d&&void 0===a)throw new Error("ObjectId must be passed to putStream for file encryption");null!==d&&(s=Gt.encryptor(a,0));var l={};!0===n&&(n=["FlateEncode"]);var u=e.additionalKeyValues||[],c=(l=void 0!==Ce.API.processDataByFilters?Ce.API.processDataByFilters(t,n):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==l.data.length&&(u.push({key:"Length",value:l.data.length}),!0===i&&u.push({key:"Length1",value:o})),0!=c.length)if(c.split("/").length-1==1)u.push({key:"Filter",value:c});else{u.push({key:"Filter",value:"["+c+"]"});for(var h=0;h<u.length;h+=1)if("DecodeParms"===u[h].key){for(var p=[],f=0;f<l.reverseChain.split("/").length-1;f+=1)p.push("null");p.push(u[h].value),u[h].value="["+p.join(" ")+"]"}}ie("<<");for(var m=0;m<u.length;m++)ie("/"+u[m].key+" "+u[m].value);ie(">>"),0!==l.data.length&&(ie("stream"),ie(s(l.data)),ie("endstream"))},ot=f.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;Ke(r,!0),ie("<</Type /Page"),ie("/Parent "+e.rootDictionaryObjId+" 0 R"),ie("/Resources "+e.resourceDictionaryObjId+" 0 R"),ie("/MediaBox ["+parseFloat(S(e.mediaBox.bottomLeftX))+" "+parseFloat(S(e.mediaBox.bottomLeftY))+" "+S(e.mediaBox.topRightX)+" "+S(e.mediaBox.topRightY)+"]"),null!==e.cropBox&&ie("/CropBox ["+S(e.cropBox.bottomLeftX)+" "+S(e.cropBox.bottomLeftY)+" "+S(e.cropBox.topRightX)+" "+S(e.cropBox.topRightY)+"]"),null!==e.bleedBox&&ie("/BleedBox ["+S(e.bleedBox.bottomLeftX)+" "+S(e.bleedBox.bottomLeftY)+" "+S(e.bleedBox.topRightX)+" "+S(e.bleedBox.topRightY)+"]"),null!==e.trimBox&&ie("/TrimBox ["+S(e.trimBox.bottomLeftX)+" "+S(e.trimBox.bottomLeftY)+" "+S(e.trimBox.topRightX)+" "+S(e.trimBox.topRightY)+"]"),null!==e.artBox&&ie("/ArtBox ["+S(e.artBox.bottomLeftX)+" "+S(e.artBox.bottomLeftY)+" "+S(e.artBox.topRightX)+" "+S(e.artBox.topRightY)+"]"),"number"==typeof e.userUnit&&1!==e.userUnit&&ie("/UserUnit "+e.userUnit),je.publish("putPage",{objId:r,pageContext:qe[t],pageNumber:t,page:n}),ie("/Contents "+i+" 0 R"),ie(">>"),ie("endobj");var o=n.join("\n");return _===b.ADVANCED&&(o+="\nQ"),Ke(i,!0),it({data:o,filters:rt(),objectId:i}),ie("endobj"),r},at=f.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Me;e++)qe[e].objId=Ye(),qe[e].contentsObjId=Ye();for(e=1;e<=Me;e++)n.push(ot({number:e,data:X[e],objId:qe[e].objId,contentsObjId:qe[e].contentsObjId,mediaBox:qe[e].mediaBox,cropBox:qe[e].cropBox,bleedBox:qe[e].bleedBox,trimBox:qe[e].trimBox,artBox:qe[e].artBox,userUnit:qe[e].userUnit,rootDictionaryObjId:Xe,resourceDictionaryObjId:et}));Ke(Xe,!0),ie("<</Type /Pages");var r="/Kids [";for(t=0;t<Me;t++)r+=n[t]+" 0 R ";ie(r+"]"),ie("/Count "+Me),ie(">>"),ie("endobj"),je.publish("postPutPages")},st=function(e){je.publish("putFont",{font:e,out:ie,newObject:Je,putStream:it}),!0!==e.isAlreadyPutted&&(e.objectNumber=Je(),ie("<<"),ie("/Type /Font"),ie("/BaseFont /"+ge(e.postScriptName)),ie("/Subtype /Type1"),"string"==typeof e.encoding&&ie("/Encoding /"+e.encoding),ie("/FirstChar 32"),ie("/LastChar 255"),ie(">>"),ie("endobj"))},lt=function(){for(var e in Te)Te.hasOwnProperty(e)&&(!1===h||!0===h&&p.hasOwnProperty(e))&&st(Te[e])},ut=function(e){e.objectNumber=Je();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[S(e.x),S(e.y),S(e.x+e.width),S(e.y+e.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"});var n=e.pages[1].join("\n");it({data:n,additionalKeyValues:t,objectId:e.objectNumber}),ie("endobj")},ct=function(){for(var e in ze)ze.hasOwnProperty(e)&&ut(ze[e])},dt=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);r.push(1),0!=e[0].offset&&e.unshift({offset:0,color:e[0].color}),1!=e[e.length-1].offset&&e.push({offset:1,color:e[e.length-1].color});for(var o="",a=0,s=0;s<r.length;s++){for(n=r[s];n>e[a+1].offset;)a++;var l=e[a].offset,u=(n-l)/(e[a+1].offset-l),c=e[a].color,d=e[a+1].color;o+=z(Math.round((1-u)*c[0]+u*d[0]).toString(16))+z(Math.round((1-u)*c[1]+u*d[1]).toString(16))+z(Math.round((1-u)*c[2]+u*d[2]).toString(16))}return o.trim()},ht=function(e,t){t||(t=21);var n=Je(),r=dt(e.colors,t),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+t+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),it({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),ie("endobj"),e.objectNumber=Je(),ie("<< /ShadingType "+e.type),ie("/ColorSpace /DeviceRGB");var o="/Coords ["+S(parseFloat(e.coords[0]))+" "+S(parseFloat(e.coords[1]))+" ";o+=2===e.type?S(parseFloat(e.coords[2]))+" "+S(parseFloat(e.coords[3])):S(parseFloat(e.coords[2]))+" "+S(parseFloat(e.coords[3]))+" "+S(parseFloat(e.coords[4]))+" "+S(parseFloat(e.coords[5])),ie(o+="]"),e.matrix&&ie("/Matrix ["+e.matrix.toString()+"]"),ie("/Function "+n+" 0 R"),ie("/Extend [true true]"),ie(">>"),ie("endobj")},pt=function(e,t){var n=Ye(),r=Je();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+e.boundingBox.map(S).join(" ")+"]"}),i.push({key:"XStep",value:S(e.xStep)}),i.push({key:"YStep",value:S(e.yStep)}),i.push({key:"Resources",value:n+" 0 R"}),e.matrix&&i.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),it({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),ie("endobj")},ft=function(e){var t;for(t in Ve)Ve.hasOwnProperty(t)&&(Ve[t]instanceof _e?ht(Ve[t]):Ve[t]instanceof we&&pt(Ve[t],e))},mt=function(e){for(var t in e.objectNumber=Je(),ie("<<"),e)switch(t){case"opacity":ie("/ca "+E(e[t]));break;case"stroke-opacity":ie("/CA "+E(e[t]))}ie(">>"),ie("endobj")},gt=function(){var e;for(e in Ne)Ne.hasOwnProperty(e)&&mt(Ne[e])},vt=function(){for(var e in ie("/XObject <<"),ze)ze.hasOwnProperty(e)&&ze[e].objectNumber>=0&&ie("/"+e+" "+ze[e].objectNumber+" 0 R");je.publish("putXobjectDict"),ie(">>")},yt=function(){Gt.oid=Je(),ie("<<"),ie("/Filter /Standard"),ie("/V "+Gt.v),ie("/R "+Gt.r),ie("/U <"+Gt.toHexString(Gt.U)+">"),ie("/O <"+Gt.toHexString(Gt.O)+">"),ie("/P "+Gt.P),ie(">>"),ie("endobj")},bt=function(){for(var e in ie("/Font <<"),Te)Te.hasOwnProperty(e)&&(!1===h||!0===h&&p.hasOwnProperty(e))&&ie("/"+e+" "+Te[e].objectNumber+" 0 R");ie(">>")},_t=function(){if(Object.keys(Ve).length>0){for(var e in ie("/Shading <<"),Ve)Ve.hasOwnProperty(e)&&Ve[e]instanceof _e&&Ve[e].objectNumber>=0&&ie("/"+e+" "+Ve[e].objectNumber+" 0 R");je.publish("putShadingPatternDict"),ie(">>")}},wt=function(e){if(Object.keys(Ve).length>0){for(var t in ie("/Pattern <<"),Ve)Ve.hasOwnProperty(t)&&Ve[t]instanceof f.TilingPattern&&Ve[t].objectNumber>=0&&Ve[t].objectNumber<e&&ie("/"+t+" "+Ve[t].objectNumber+" 0 R");je.publish("putTilingPatternDict"),ie(">>")}},Ct=function(){if(Object.keys(Ne).length>0){var e;for(e in ie("/ExtGState <<"),Ne)Ne.hasOwnProperty(e)&&Ne[e].objectNumber>=0&&ie("/"+e+" "+Ne[e].objectNumber+" 0 R");je.publish("putGStateDict"),ie(">>")}},xt=function(e){Ke(e.resourcesOid,!0),ie("<<"),ie("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),bt(),_t(),wt(e.objectOid),Ct(),vt(),ie(">>"),ie("endobj")},St=function(){var e=[];lt(),gt(),ct(),ft(e),je.publish("putResources"),e.forEach(xt),xt({resourcesOid:et,objectOid:Number.MAX_SAFE_INTEGER}),je.publish("postPutResources")},Pt=function(){je.publish("putAdditionalObjects");for(var e=0;e<J.length;e++){var t=J[e];Ke(t.objId,!0),ie(t.content),ie("endobj")}je.publish("postPutAdditionalObjects")},kt=function(e){Oe[e.fontName]=Oe[e.fontName]||{},Oe[e.fontName][e.fontStyle]=e.id},Et=function(e,t,n,r,i){var o={id:"F"+(Object.keys(Te).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return je.publish("addFont",{font:o,instance:this}),Te[o.id]=o,kt(o),o.id},At=function(e){for(var t=0,n=se.length;t<n;t++){var r=Et.call(this,e[t][0],e[t][1],e[t][2],se[t][3],!0);!1===h&&(p[r]=!0);var i=e[t][0].split("-");kt({id:r,fontName:i[0],fontStyle:i[1]||""})}je.publish("addFonts",{fonts:Te,dictionary:Oe})},It=function(e){return e.foo=function(){try{return e.apply(this,arguments)}catch(e){var t=e.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var n="Error in function "+t.split("\n")[0].split("<")[0]+": "+e.message;if(!U.console)throw new Error(n);U.console.error(n,e),U.alert&&alert(n)}},e.foo.bar=e,e.foo},Tt=function(e,t){var n,r,i,o,a,s,l,u,c;if(i=(t=t||{}).sourceEncoding||"Unicode",a=t.outputEncoding,(t.autoencode||a)&&Te[Pe].metadata&&Te[Pe].metadata[i]&&Te[Pe].metadata[i].encoding&&(o=Te[Pe].metadata[i].encoding,!a&&Te[Pe].encoding&&(a=Te[Pe].encoding),!a&&o.codePages&&(a=o.codePages[0]),"string"==typeof a&&(a=o[a]),a)){for(l=!1,s=[],n=0,r=e.length;n<r;n++)(u=a[e.charCodeAt(n)])?s.push(String.fromCharCode(u)):s.push(e[n]),s[n].charCodeAt(0)>>8&&(l=!0);e=s.join("")}for(n=e.length;void 0===l&&0!==n;)e.charCodeAt(n-1)>>8&&(l=!0),n--;if(!l)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((c=(u=e.charCodeAt(n))>>8)>>8)throw new Error("Character at position "+n+" of string '"+e+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(c),s.push(u-(c<<8))}return String.fromCharCode.apply(void 0,s)},Ot=f.__private__.pdfEscape=f.pdfEscape=function(e,t){return Tt(e,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Rt=f.__private__.beginPage=function(e){X[++Me]=[],qe[Me]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},Nt(Me),re(X[j])},Vt=function(e,t){var r,i,a;switch(n=t||n,"string"==typeof e&&(r=y(e.toLowerCase()),Array.isArray(r)&&(i=r[0],a=r[1])),Array.isArray(e)&&(i=e[0]*ke,a=e[1]*ke),isNaN(i)&&(i=o[0],a=o[1]),(i>14400||a>14400)&&(Q.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),a=Math.min(14400,a)),o=[i,a],n.substr(0,1)){case"l":a>i&&(o=[a,i]);break;case"p":i>a&&(o=[a,i])}Rt(o),mn(pn),ie(xn),0!==In&&ie(In+" J"),0!==Tn&&ie(Tn+" j"),je.publish("addPage",{pageNumber:Me})},Dt=function(e){e>0&&e<=Me&&(X.splice(e,1),qe.splice(e,1),Me--,j>Me&&(j=Me),this.setPage(j))},Nt=function(e){e>0&&e<=Me&&(j=e)},Lt=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return X.length-1},Ft=function(e,t,n){var r,i=void 0;return n=n||{},t=void 0!==t?t:Te[Pe].fontStyle,r=(e=void 0!==e?e:Te[Pe].fontName).toLowerCase(),void 0!==Oe[r]&&void 0!==Oe[r][t]?i=Oe[r][t]:void 0!==Oe[e]&&void 0!==Oe[e][t]?i=Oe[e][t]:!1===n.disableWarning&&Q.warn("Unable to look up font label for font '"+e+"', '"+t+"'. Refer to getFontList() for available fonts."),i||n.noFallback||null==(i=Oe.times[t])&&(i=Oe.times.normal),i},Mt=f.__private__.putInfo=function(){var e=Je(),t=function(e){return e};for(var n in null!==d&&(t=Gt.encryptor(e,0)),ie("<<"),ie("/Producer ("+Ot(t("jsPDF "+Ce.version))+")"),Se)Se.hasOwnProperty(n)&&Se[n]&&ie("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+Ot(t(Se[n]))+")");ie("/CreationDate ("+Ot(t(R))+")"),ie(">>"),ie("endobj")},qt=f.__private__.putCatalog=function(e){var t=(e=e||{}).rootDictionaryObjId||Xe;switch(Je(),ie("<<"),ie("/Type /Catalog"),ie("/Pages "+t+" 0 R"),ue||(ue="fullwidth"),ue){case"fullwidth":ie("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ie("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ie("/OpenAction [3 0 R /Fit]");break;case"original":ie("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+ue;"%"===n.substr(n.length-1)&&(ue=parseInt(ue)/100),"number"==typeof ue&&ie("/OpenAction [3 0 R /XYZ null null "+E(ue)+"]")}switch(fe||(fe="continuous"),fe){case"continuous":ie("/PageLayout /OneColumn");break;case"single":ie("/PageLayout /SinglePage");break;case"two":case"twoleft":ie("/PageLayout /TwoColumnLeft");break;case"tworight":ie("/PageLayout /TwoColumnRight")}he&&ie("/PageMode /"+he),je.publish("putCatalog"),ie(">>"),ie("endobj")},jt=f.__private__.putTrailer=function(){ie("trailer"),ie("<<"),ie("/Size "+(H+1)),ie("/Root "+H+" 0 R"),ie("/Info "+(H-1)+" 0 R"),null!==d&&ie("/Encrypt "+Gt.oid+" 0 R"),ie("/ID [ <"+V+"> <"+V+"> ]"),ie(">>")},Bt=f.__private__.putHeader=function(){ie("%PDF-"+m),ie("%\xba\xdf\xac\xe0")},zt=f.__private__.putXRef=function(){var e="0000000000";ie("xref"),ie("0 "+(H+1)),ie("0000000000 65535 f ");for(var t=1;t<=H;t++)ie("function"==typeof W[t]?(e+W[t]()).slice(-10)+" 00000 n ":void 0!==W[t]?(e+W[t]).slice(-10)+" 00000 n ":"0000000000 00000 n ")},Ut=f.__private__.buildDocument=function(){ne(),re(G),je.publish("buildDocument"),Bt(),at(),Pt(),St(),null!==d&&yt(),Mt(),qt();var e=$;return zt(),jt(),ie("startxref"),ie(""+e),ie("%%EOF"),re(X[j]),G.join("\n")},Ht=f.__private__.getBlob=function(e){return new Blob([ae(e)],{type:"application/pdf"})},Qt=f.output=f.__private__.output=It(function(e,t){switch("string"==typeof(t=t||{})?t={filename:t}:t.filename=t.filename||"generated.pdf",e){case void 0:return Ut();case"save":f.save(t.filename);break;case"arraybuffer":return ae(Ut());case"blob":return Ht(Ut());case"bloburi":case"bloburl":if(void 0!==U.URL&&"function"==typeof U.URL.createObjectURL)return U.URL&&U.URL.createObjectURL(Ht(Ut()))||void 0;Q.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=Ut();try{n=Y(r)}catch(e){n=Y(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+t.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(U)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",o=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';t.pdfObjectUrl&&(i=t.pdfObjectUrl,o="");var a='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+i+'"'+o+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(t)+");<\/script></body></html>",s=U.open();return null!==s&&s.document.write(a),s}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(U)){var l='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(t.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+t.filename+'" width="500px" height="400px" /></body></html>',u=U.open();if(null!==u){u.document.write(l);var c=this;u.document.documentElement.querySelector("#pdfViewer").onload=function(){u.document.title=t.filename,u.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(c.output("bloburl"))}}return u}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(U))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var d='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",t)+'"></iframe></body></html>',h=U.open();if(null!==h&&(h.document.write(d),h.document.title=t.filename),h||"undefined"==typeof safari)return h;break;case"datauri":case"dataurl":return U.document.location.href=this.output("datauristring",t);default:return null}}),Wt=function(e){return!0===Array.isArray(Be)&&Be.indexOf(e)>-1};switch(r){case"pt":ke=1;break;case"mm":ke=72/25.4;break;case"cm":ke=72/2.54;break;case"in":ke=72;break;case"px":ke=1==Wt("px_scaling")?.75:96/72;break;case"pc":case"em":ke=12;break;case"ex":ke=6;break;default:if("number"!=typeof r)throw new Error("Invalid unit: "+r);ke=r}var Gt=null;M(),N();var $t=function(e){return null!==d?Gt.encryptor(e,0):function(e){return e}},Jt=f.__private__.getPageInfo=f.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:qe[e].objId,pageNumber:e,pageContext:qe[e]}},Yt=f.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var t in qe)if(qe[t].objId===e)break;return Jt(t)},Kt=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:qe[j].objId,pageNumber:j,pageContext:qe[j]}};f.addPage=function(){return Vt.apply(this,arguments),this},f.setPage=function(){return Nt.apply(this,arguments),re.call(this,X[j]),this},f.insertPage=function(e){return this.addPage(),this.movePage(j,e),this},f.movePage=function(e,t){var n,r;if(e>t){n=X[e],r=qe[e];for(var i=e;i>t;i--)X[i]=X[i-1],qe[i]=qe[i-1];X[t]=n,qe[t]=r,this.setPage(t)}else if(e<t){n=X[e],r=qe[e];for(var o=e;o<t;o++)X[o]=X[o+1],qe[o]=qe[o+1];X[t]=n,qe[t]=r,this.setPage(t)}return this},f.deletePage=function(){return Dt.apply(this,arguments),this},f.__private__.text=f.text=function(e,t,n,r,o){var a,s,l,u,c,d,h,f,m,g=(r=r||{}).scope||this;if("number"==typeof e&&"number"==typeof t&&("string"==typeof n||Array.isArray(n))){var v=n;n=t,t=e,e=v}if(arguments[3]instanceof Qe==0?(l=arguments[4],u=arguments[5],"object"===i()(h=arguments[3])&&null!==h||("string"==typeof l&&(u=l,l=null),"string"==typeof h&&(u=h,h=null),"number"==typeof h&&(l=h,h=null),r={flags:h,angle:l,align:u})):(P("The transform parameter of text() with a Matrix value"),m=o),isNaN(t)||isNaN(n)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0===e.length)return g;var y="",w=!1,C="number"==typeof r.lineHeightFactor?r.lineHeightFactor:hn,x=g.internal.scaleFactor;function k(e){return e=e.split("\t").join(Array(r.TabLen||9).join(" ")),Ot(e,h)}function E(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)"string"==typeof(t=n.shift())?r.push(t):Array.isArray(e)&&(1===t.length||void 0===t[1]&&void 0===t[2])?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function A(e,t){var n;if("string"==typeof e)n=t(e)[0];else if(Array.isArray(e)){for(var r,i,o=e.concat(),a=[],s=o.length;s--;)"string"==typeof(r=o.shift())?a.push(t(r)[0]):Array.isArray(r)&&"string"==typeof r[0]&&(i=t(r[0],r[1],r[2]),a.push([i[0],i[1],i[2]]));n=a}return n}var T=!1,O=!0;if("string"==typeof e)T=!0;else if(Array.isArray(e)){var R=e.concat();s=[];for(var V,D=R.length;D--;)("string"!=typeof(V=R.shift())||Array.isArray(V)&&"string"!=typeof V[0])&&(O=!1);T=O}if(!1===T)throw new Error('Type of text must be string or Array. "'+e+'" is not recognized.');"string"==typeof e&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var N=le/g.internal.scaleFactor,L=N*(C-1);switch(r.baseline){case"bottom":n-=L;break;case"top":n+=N-L;break;case"hanging":n+=N-2*L;break;case"middle":n+=N/2-L}if((d=r.maxWidth||0)>0&&("string"==typeof e?e=g.splitTextToSize(e,d):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce(function(e,t){return e.concat(g.splitTextToSize(t,d))},[]))),je.publish("preProcessText",a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:Ot,activeFontKey:Pe,fonts:Te,activeFontSize:le}}),e=a.text,l=(r=a.options).angle,m instanceof Qe==0&&l&&"number"==typeof l){l*=Math.PI/180,0===r.rotationDirection&&(l=-l),_===b.ADVANCED&&(l=-l);var F=Math.cos(l),M=Math.sin(l);m=new Qe(F,M,-M,F,0,0)}else l&&l instanceof Qe&&(m=l);_!==b.ADVANCED||m||(m=Ge),void 0!==(c=r.charSpace||En)&&(y+=S(I(c))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(f=r.horizontalScale)&&(y+=S(100*f)+" Tz\n");var q=-1,j=void 0!==r.renderingMode?r.renderingMode:r.stroke,B=g.internal.getCurrentPageInfo().pageContext;switch(j){case 0:case!1:case"fill":q=0;break;case 1:case!0:case"stroke":q=1;break;case 2:case"fillThenStroke":q=2;break;case 3:case"invisible":q=3;break;case 4:case"fillAndAddForClipping":q=4;break;case 5:case"strokeAndAddPathForClipping":q=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":q=6;break;case 7:case"addToPathForClipping":q=7}var z=void 0!==B.usedRenderingMode?B.usedRenderingMode:-1;-1!==q?y+=q+" Tr\n":-1!==z&&(y+="0 Tr\n"),-1!==q&&(B.usedRenderingMode=q),u=r.align||"left";var U,H=le*C,Q=g.internal.pageSize.getWidth(),W=Te[Pe];c=r.charSpace||En,d=r.maxWidth||0,h=Object.assign({autoencode:!0,noBOM:!0},r.flags);var G=[];if("[object Array]"===Object.prototype.toString.call(e)){var $;s=E(e),"left"!==u&&(U=s.map(function(e){return g.getStringUnitWidth(e,{font:W,charSpace:c,fontSize:le,doKerning:!1})*le/x}));var J,Y=0;if("right"===u){t-=U[0],e=[],D=s.length;for(var K=0;K<D;K++)0===K?(J=bn(t),$=_n(n)):(J=I(Y-U[K]),$=-H),e.push([s[K],J,$]),Y=U[K]}else if("center"===u){t-=U[0]/2,e=[],D=s.length;for(var Z=0;Z<D;Z++)0===Z?(J=bn(t),$=_n(n)):(J=I((Y-U[Z])/2),$=-H),e.push([s[Z],J,$]),Y=U[Z]}else if("left"===u){e=[],D=s.length;for(var X=0;X<D;X++)e.push(s[X])}else{if("justify"!==u)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');e=[],D=s.length,d=0!==d?d:Q;for(var ee=0;ee<D;ee++)$=0===ee?_n(n):-H,J=0===ee?bn(t):0,G.push(ee<D-1?S(I((d-U[ee])/(s[ee].split(" ").length-1))):0),e.push([s[ee],J,$])}}var te="boolean"==typeof r.R2L?r.R2L:de;!0===te&&(e=A(e,function(e,t,n){return[e.split("").reverse().join(""),t,n]})),je.publish("postProcessText",a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:Ot,activeFontKey:Pe,fonts:Te,activeFontSize:le}}),e=a.text,w=a.mutex.isHex||!1;var ne=Te[Pe].encoding;"WinAnsiEncoding"!==ne&&"StandardEncoding"!==ne||(e=A(e,function(e,t,n){return[k(e),t,n]})),s=E(e),e=[];for(var re,oe,ae,se=0,ue=1,ce=Array.isArray(s[0])?ue:se,he="",pe=function(e,t,n){var i="";return n instanceof Qe?(n="number"==typeof r.angle?We(n,new Qe(1,0,0,1,e,t)):We(new Qe(1,0,0,1,e,t),n),_===b.ADVANCED&&(n=We(new Qe(1,0,0,-1,0,0),n)),i=n.join(" ")+" Tm\n"):i=S(e)+" "+S(t)+" Td\n",i},fe=0;fe<s.length;fe++){switch(he="",ce){case ue:ae=(w?"<":"(")+s[fe][0]+(w?">":")"),re=parseFloat(s[fe][1]),oe=parseFloat(s[fe][2]);break;case se:ae=(w?"<":"(")+s[fe]+(w?">":")"),re=bn(t),oe=_n(n)}void 0!==G&&void 0!==G[fe]&&(he=G[fe]+" Tw\n"),0===fe?e.push(he+pe(re,oe,m)+ae):ce===se?e.push(he+ae):ce===ue&&e.push(he+pe(re,oe,m)+ae)}e=e.join(ce===se?" Tj\nT* ":" Tj\n"),e+=" Tj\n";var me="BT\n/";return me+=Pe+" "+le+" Tf\n",me+=S(le*C)+" TL\n",me+=Pn+"\n",me+=y,me+=e,ie(me+="ET"),p[Pe]=!0,g};var Zt=f.__private__.clip=f.clip=function(e){return ie("evenodd"===e?"W*":"W"),this};f.clipEvenOdd=function(){return Zt("evenodd")},f.__private__.discardPath=f.discardPath=function(){return ie("n"),this};var Xt=f.__private__.isValidStyle=function(e){var t=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(e)&&(t=!0),t};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(e){return Xt(e)&&(c=e),this};var en=f.__private__.getStyle=f.getStyle=function(e){var t=c;switch(e){case"D":case"S":t="S";break;case"F":t="f";break;case"FD":case"DF":t="B";break;case"f":case"f*":case"B":case"B*":t=e}return t},tn=f.close=function(){return ie("h"),this};f.stroke=function(){return ie("S"),this},f.fill=function(e){return nn("f",e),this},f.fillEvenOdd=function(e){return nn("f*",e),this},f.fillStroke=function(e){return nn("B",e),this},f.fillStrokeEvenOdd=function(e){return nn("B*",e),this};var nn=function(e,t){"object"===i()(t)?an(t,e):ie(e)},rn=function(e){null===e||_===b.ADVANCED&&void 0===e||(e=en(e),ie(e))};function on(e,t,n,r,i){var o=new we(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix);o.stream=this.stream;var a=e+"$$"+this.cloneIndex+++"$$";return $e(a,o),o}var an=function(e,t){var n=De[e.key],r=Ve[n];if(r instanceof _e)ie("q"),ie(sn(t)),r.gState&&f.setGState(r.gState),ie(e.matrix.toString()+" cm"),ie("/"+n+" sh"),ie("Q");else if(r instanceof we){var i=new Qe(1,0,0,-1,0,jn());e.matrix&&(i=i.multiply(e.matrix||Ge),n=on.call(r,e.key,e.boundingBox,e.xStep,e.yStep,i).id),ie("q"),ie("/Pattern cs"),ie("/"+n+" scn"),r.gState&&f.setGState(r.gState),ie(t),ie("Q")}},sn=function(e){switch(e){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},ln=f.moveTo=function(e,t){return ie(S(I(e))+" "+S(O(t))+" m"),this},un=f.lineTo=function(e,t){return ie(S(I(e))+" "+S(O(t))+" l"),this},cn=f.curveTo=function(e,t,n,r,i,o){return ie([S(I(e)),S(O(t)),S(I(n)),S(O(r)),S(I(i)),S(O(o)),"c"].join(" ")),this};f.__private__.line=f.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Xt(i))throw new Error("Invalid arguments passed to jsPDF.line");return _===b.COMPAT?this.lines([[n-e,r-t]],e,t,[1,1],i||"S"):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},f.__private__.lines=f.lines=function(e,t,n,r,i,o){var a,s,l,u,c,d,h,p;if("number"==typeof e&&(p=n,n=t,t=e,e=p),r=r||[1,1],o=o||!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!Xt(i)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(ln(t,n),a=r[0],s=r[1],u=e.length,d=t,h=n,l=0;l<u;l++)2===(c=e[l]).length?un(d=c[0]*a+d,h=c[1]*s+h):cn(c[0]*a+d,c[1]*s+h,c[2]*a+d,c[3]*s+h,d=c[4]*a+d,h=c[5]*s+h);return o&&tn(),rn(i),this},f.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case"m":ln(r[0],r[1]);break;case"l":un(r[0],r[1]);break;case"c":cn.apply(this,r);break;case"h":tn()}}return this},f.__private__.rect=f.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Xt(i))throw new Error("Invalid arguments passed to jsPDF.rect");return _===b.COMPAT&&(r=-r),ie([S(I(e)),S(O(t)),S(I(n)),S(I(r)),"re"].join(" ")),rn(i),this},f.__private__.triangle=f.triangle=function(e,t,n,r,i,o,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(o)||!Xt(a))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[n-e,r-t],[i-n,o-r],[e-i,t-o]],e,t,[1,1],a,!0),this},f.__private__.roundedRect=f.roundedRect=function(e,t,n,r,i,o,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(o)||!Xt(a))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),o=Math.min(o,.5*r),this.lines([[n-2*i,0],[i*s,0,i,o-o*s,i,o],[0,r-2*o],[0,o*s,-i*s,o,-i,o],[2*i-n,0],[-i*s,0,-i,-o*s,-i,-o],[0,2*o-r],[0,-o*s,i*s,-o,i,-o]],e+i,t,[1,1],a,!0),this},f.__private__.ellipse=f.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Xt(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var o=4/3*(Math.SQRT2-1)*n,a=4/3*(Math.SQRT2-1)*r;return ln(e+n,t),cn(e+n,t-a,e+o,t-r,e,t-r),cn(e-o,t-r,e-n,t-a,e-n,t),cn(e-n,t+a,e-o,t+r,e,t+r),cn(e+o,t+r,e+n,t+a,e+n,t),rn(i),this},f.__private__.circle=f.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!Xt(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(e,t,n,n,r)},f.setFont=function(e,t,n){return n&&(t=x(t,n)),Pe=Ft(e,t,{disableWarning:!1}),this};var dn=f.__private__.getFont=f.getFont=function(){return Te[Ft.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var e,t,n={};for(e in Oe)if(Oe.hasOwnProperty(e))for(t in n[e]=[],Oe[e])Oe[e].hasOwnProperty(t)&&n[e].push(t);return n},f.addFont=function(e,t,n,r,i){var o=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==o.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==o.indexOf(arguments[3])&&(n=x(n,r)),Et.call(this,e,t,n,i=i||"Identity-H")};var hn,pn=e.lineWidth||.200025,fn=f.__private__.getLineWidth=f.getLineWidth=function(){return pn},mn=f.__private__.setLineWidth=f.setLineWidth=function(e){return pn=e,ie(S(I(e))+" w"),this};f.__private__.setLineDash=Ce.API.setLineDash=Ce.API.setLineDashPattern=function(e,t){if(e=e||[],t=t||0,isNaN(t)||!Array.isArray(e))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return e=e.map(function(e){return S(I(e))}).join(" "),t=S(I(t)),ie("["+e+"] "+t+" d"),this};var gn=f.__private__.getLineHeight=f.getLineHeight=function(){return le*hn};f.__private__.getLineHeight=f.getLineHeight=function(){return le*hn};var vn=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(e){return"number"==typeof(e=e||1.15)&&(hn=e),this},yn=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return hn};vn(e.lineHeight);var bn=f.__private__.getHorizontalCoordinate=function(e){return I(e)},_n=f.__private__.getVerticalCoordinate=function(e){return _===b.ADVANCED?e:qe[j].mediaBox.topRightY-qe[j].mediaBox.bottomLeftY-I(e)},wn=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(e){return S(bn(e))},Cn=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(e){return S(_n(e))},xn=e.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return tt(xn)},f.__private__.setStrokeColor=f.setDrawColor=function(e,t,n,r){return xn=nt({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"draw",precision:2}),ie(xn),this};var Sn=e.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return tt(Sn)},f.__private__.setFillColor=f.setFillColor=function(e,t,n,r){return Sn=nt({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"fill",precision:2}),ie(Sn),this};var Pn=e.textColor||"0 g",kn=f.__private__.getTextColor=f.getTextColor=function(){return tt(Pn)};f.__private__.setTextColor=f.setTextColor=function(e,t,n,r){return Pn=nt({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"text",precision:3}),this};var En=e.charSpace,An=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(En||0)};f.__private__.setCharSpace=f.setCharSpace=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return En=e,this};var In=0;f.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},f.__private__.setLineCap=f.setLineCap=function(e){var t=f.CapJoinStyles[e];if(void 0===t)throw new Error("Line cap style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return In=t,ie(t+" J"),this};var Tn=0;f.__private__.setLineJoin=f.setLineJoin=function(e){var t=f.CapJoinStyles[e];if(void 0===t)throw new Error("Line join style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Tn=t,ie(t+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(e){if(e=e||0,isNaN(e))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ie(S(I(e))+" M"),this},f.GState=ye,f.setGState=function(e){(e="string"==typeof e?Ne[Le[e]]:On(null,e)).equals(Fe)||(ie("/"+e.id+" gs"),Fe=e)};var On=function(e,t){if(!e||!Le[e]){var n=!1;for(var r in Ne)if(Ne.hasOwnProperty(r)&&Ne[r].equals(t)){n=!0;break}if(n)t=Ne[r];else{var i="GS"+(Object.keys(Ne).length+1).toString(10);Ne[i]=t,t.id=i}return e&&(Le[e]=t.id),je.publish("addGState",t),t}};f.addGState=function(e,t){return On(e,t),this},f.saveGraphicsState=function(){return ie("q"),Re.push({key:Pe,size:le,color:Pn}),this},f.restoreGraphicsState=function(){ie("Q");var e=Re.pop();return Pe=e.key,le=e.size,Pn=e.color,Fe=null,this},f.setCurrentTransformationMatrix=function(e){return ie(e.toString()+" cm"),this},f.comment=function(e){return ie("#"+e),this};var Rn=function(e,t){var n=e||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}});var r=t||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(e){i=e.toString()}}),this},Vn=function(e,t,n,r){Rn.call(this,e,t),this.type="rect";var i=n||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}});var o=r||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return o},set:function(e){isNaN(e)||(o=parseFloat(e))}}),this},Dn=function(){this.page=Me,this.currentPage=j,this.pages=X.slice(0),this.pagesContext=qe.slice(0),this.x=Ee,this.y=Ae,this.matrix=Ie,this.width=Mn(j),this.height=jn(j),this.outputDestination=te,this.id="",this.objectNumber=-1};Dn.prototype.restore=function(){Me=this.page,qe=this.pagesContext,X=this.pages,Ee=this.x,Ae=this.y,Ie=this.matrix,qn(j=this.currentPage,this.width),Bn(j,this.height),te=this.outputDestination};var Nn=function(e,t,n,r,i){He.push(new Dn),Me=j=0,X=[],Ee=e,Ae=t,Ie=i,Rt([n,r])},Ln=function(e){if(Ue[e])He.pop().restore();else{var t=new Dn,n="Xo"+(Object.keys(ze).length+1).toString(10);t.id=n,Ue[e]=n,ze[n]=t,je.publish("addFormObject",t),He.pop().restore()}};for(var Fn in f.beginFormObject=function(e,t,n,r,i){return Nn(e,t,n,r,i),this},f.endFormObject=function(e){return Ln(e),this},f.doFormObject=function(e,t){var n=ze[Ue[e]];return ie("q"),ie(t.toString()+" cm"),ie("/"+n.id+" Do"),ie("Q"),this},f.getFormObject=function(e){var t=ze[Ue[e]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},f.save=function(e,t){return e=e||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(K(Ht(Ut()),e),"function"==typeof K.unload&&U.setTimeout&&setTimeout(K.unload,911),this):new Promise(function(t,n){try{var r=K(Ht(Ut()),e);"function"==typeof K.unload&&U.setTimeout&&setTimeout(K.unload,911),t(r)}catch(e){n(e.message)}})},Ce.API)Ce.API.hasOwnProperty(Fn)&&("events"===Fn&&Ce.API.events.length?function(e,t){var n,r;for(r=t.length-1;-1!==r;r--)e.subscribe.apply(e,[t[r][0]].concat("function"==typeof(n=t[r][1])?[n]:n))}(je,Ce.API.events):f[Fn]=Ce.API[Fn]);var Mn=f.getPageWidth=function(e){return(qe[e=e||j].mediaBox.topRightX-qe[e].mediaBox.bottomLeftX)/ke},qn=f.setPageWidth=function(e,t){qe[e].mediaBox.topRightX=t*ke+qe[e].mediaBox.bottomLeftX},jn=f.getPageHeight=function(e){return(qe[e=e||j].mediaBox.topRightY-qe[e].mediaBox.bottomLeftY)/ke},Bn=f.setPageHeight=function(e,t){qe[e].mediaBox.topRightY=t*ke+qe[e].mediaBox.bottomLeftY};return f.internal={pdfEscape:Ot,getStyle:en,getFont:dn,getFontSize:ce,getCharSpace:An,getTextColor:kn,getLineHeight:gn,getLineHeightFactor:yn,getLineWidth:fn,write:oe,getHorizontalCoordinate:bn,getVerticalCoordinate:_n,getCoordinateString:wn,getVerticalCoordinateString:Cn,collections:{},newObject:Je,newAdditionalObject:Ze,newObjectDeferred:Ye,newObjectDeferredBegin:Ke,getFilters:rt,putStream:it,events:je,scaleFactor:ke,pageSize:{getWidth:function(){return Mn(j)},setWidth:function(e){qn(j,e)},getHeight:function(){return jn(j)},setHeight:function(e){Bn(j,e)}},encryptionOptions:d,encryption:Gt,getEncryptor:$t,output:Qt,getNumberOfPages:Lt,pages:X,out:ie,f2:E,f3:A,getPageInfo:Jt,getPageInfoByObjId:Yt,getCurrentPageInfo:Kt,getPDFVersion:g,Point:Rn,Rectangle:Vn,Matrix:Qe,hasHotfix:Wt},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return Mn(j)},set:function(e){qn(j,e)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return jn(j)},set:function(e){Bn(j,e)},enumerable:!0,configurable:!0}),At.call(f,se),Pe="F1",Vt(o,n),je.publish("initialized"),f}me.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},me.prototype.toHexString=function(e){return e.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},me.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},me.prototype.processOwnerPassword=function(e,t){return pe(ce(t).substr(0,5),e)},me.prototype.encryptor=function(e,t){var n=ce(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return pe(n,e)}},ye.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||i()(e)!==i()(this))return!1;var r=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t))return!1;if(this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return 0===r},Ce.API={events:[]},Ce.version="2.5.1";var xe=Ce.API,Se=1,Pe=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ke=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ee=function(e){return e.toFixed(2)},Ae=function(e){return e.toFixed(5)};xe.__acroform__={};var Ie=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Te=function(e){return e*Se},Oe=function(e){var t=new Ge,n=st.internal.getHeight(e)||0,r=st.internal.getWidth(e)||0;return t.BBox=[0,0,Number(Ee(r)),Number(Ee(n))],t},Re=xe.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},Ve=xe.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},De=xe.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(e&1<<t)?0:1},Ne=xe.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return De(e,t-1)},Le=xe.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Re(e,t-1)},Fe=xe.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Ve(e,t-1)},Me=xe.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=e[0],o=e[1],a=e[2],s=e[3],l={};return l.lowerLeft_X=n(i)||0,l.lowerLeft_Y=r(o+s)||0,l.upperRight_X=n(i+a)||0,l.upperRight_Y=r(o)||0,[Number(Ee(l.lowerLeft_X)),Number(Ee(l.lowerLeft_Y)),Number(Ee(l.upperRight_X)),Number(Ee(l.upperRight_Y))]},qe=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=je(e,e._V||e.DV),r=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+r+" "+Ee(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var i=Oe(e);return i.scope=e.scope,i.stream=t.join("\n"),i}},je=function(e,t){var n=0===e.fontSize?e.maxFontSize:e.fontSize,r={text:"",fontSize:""},i=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" ");i=i.map(e.multiline?function(e){return e.split("\n")}:function(e){return[e]});var o=n,a=st.internal.getHeight(e)||0;a=a<0?-a:a;var s=st.internal.getWidth(e)||0;s=s<0?-s:s;var l=function(t,n,r){return t+1<i.length&&Be(n+" "+i[t+1][0],e,r).width<=s-4};o++;e:for(;o>0;){t="",o--;var u,c,d=Be("3",e,o).height,h=e.multiline?a-o:(a-d)/2,p=h+=2,f=0,m=0,g=0;if(o<=0){t="(...) Tj\n",t+="% Width of Text: "+Be(t,e,o=12).width+", FieldWidth:"+s+"\n";break}for(var v="",y=0,b=0;b<i.length;b++)if(i.hasOwnProperty(b)){var _=!1;if(1!==i[b].length&&g!==i[b].length-1){if((d+2)*(y+2)+2>a)continue e;v+=i[b][g],_=!0,m=b,b--}else{v=" "==(v+=i[b][g]+" ").substr(v.length-1)?v.substr(0,v.length-1):v;var w=parseInt(b),C=l(w,v,o),x=b>=i.length-1;if(C&&!x){v+=" ",g=0;continue}if(C||x){if(x)m=w;else if(e.multiline&&(d+2)*(y+2)+2>a)continue e}else{if(!e.multiline)continue e;if((d+2)*(y+2)+2>a)continue e;m=w}}for(var S="",P=f;P<=m;P++){var k=i[P];if(e.multiline){if(P===m){S+=k[g]+" ",g=(g+1)%k.length;continue}if(P===f){S+=k[k.length-1]+" ";continue}}S+=k[0]+" "}switch(S=" "==S.substr(S.length-1)?S.substr(0,S.length-1):S,c=Be(S,e,o).width,e.textAlign){case"right":u=s-c-2;break;case"center":u=(s-c)/2;break;case"left":default:u=2}t+=Ee(u)+" "+Ee(p)+" Td\n",t+="("+Pe(S)+") Tj\n",t+=-Ee(u)+" 0 Td\n",p=-(o+2),c=0,f=_?m:m+1,y++,v=""}break}return r.text=t,r.fontSize=o,r},Be=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},ze={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Ue=function(e,t){var n={type:"reference",object:e};void 0===t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===n.type&&e.object===n.object})&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},He=xe.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var o="[",a=0;a<e.length;a++)switch(0!==a&&(o+=" "),i()(e[a])){case"boolean":case"number":case"object":o+=e[a].toString();break;case"string":"/"!==e[a].substr(0,1)?(void 0!==t&&n&&(r=n.internal.getEncryptor(t)),o+="("+Pe(r(e[a].toString()))+")"):o+=e[a].toString()}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Qe=function(e,t,n){var r=function(e){return e};return void 0!==t&&n&&(r=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+Pe(r(e))+")"},We=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};We.prototype.toString=function(){return this.objId+" 0 R"},We.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},We.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return"content"!=e&&"appearanceStreamContent"!=e&&"scope"!=e&&"objId"!=e&&"_"!=e.substring(0,1)});for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:He(i,this.objId,this.scope)}):i instanceof We?(i.scope=this.scope,e.push({key:r,value:i.objId+" 0 R"})):"function"!=typeof i&&e.push({key:r,value:i}))}return e};var Ge=function(){We.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};Ie(Ge,We);var $e=function(){We.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Pe(t(e))+")"}},set:function(t){e=t}})};Ie($e,We);var Je=function e(){We.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(t,3))},set:function(e){this.F=!0===Boolean(e)?Le(t,3):Fe(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute Ff supplied.');n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==r.length)return r},set:function(e){r=void 0!==e?e:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=e;break;default:throw new Error('Invalid value "'+e+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof rt)return;o="FieldObject"+e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Pe(t(o))+")"},set:function(e){o=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(e){o=e}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(e){a=e}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){s=e}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(e){l=e}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===u?50/Se:u},set:function(e){u=e}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(e){c=e}});var d="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof rt||this instanceof ot))return Qe(d,this.objId,this.scope)},set:function(e){e=e.toString(),d=e}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof et==0?Qe(h,this.objId,this.scope):h},set:function(e){e=e.toString(),h=this instanceof et==0?"("===e.substr(0,1)?ke(e.substr(1,e.length-2)):ke(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof et==1?ke(h.substr(1,h.length-1)):h},set:function(e){e=e.toString(),h=this instanceof et==1?"/"+e:e}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(e){this.V=e}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof et==0?Qe(p,this.objId,this.scope):p},set:function(e){e=e.toString(),p=this instanceof et==0?"("===e.substr(0,1)?ke(e.substr(1,e.length-2)):ke(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof et==1?ke(p.substr(1,p.length-1)):p},set:function(e){e=e.toString(),p=this instanceof et==1?"/"+e:e}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var f,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(e){e=Boolean(e),m=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(f)return f},set:function(e){f=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,1))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,1):Fe(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,2))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,2):Fe(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,3))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,3):Fe(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==g)return g},set:function(e){if(-1===[0,1,2].indexOf(e))throw new Error('Invalid value "'+e+'" for attribute Q supplied.');g=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(g){case 0:default:e="left";break;case 1:e="center";break;case 2:e="right"}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case"right":case 2:g=2;break;case"center":case 1:g=1;break;case"left":case 0:default:g=0}}})};Ie(Je,We);var Ye=function(){Je.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return He(t,this.objId,this.scope)},set:function(e){var n,r;r=[],"string"==typeof(n=e)&&(r=function(e,t,n){n||(n=1);for(var r,i=[];r=t.exec(e);)i.push(r[n]);return i}(n,/\((.*?)\)/g)),t=r}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,n){for(n=n||!1,e=(e=e||"").toString();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),!1!==n););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,18))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,18):Fe(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,19))},set:function(e){!0===this.combo&&(this.Ff=!0===Boolean(e)?Le(this.Ff,19):Fe(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,20))},set:function(e){!0===Boolean(e)?(this.Ff=Le(this.Ff,20),t.sort()):this.Ff=Fe(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,22))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,22):Fe(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,23))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,23):Fe(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,27))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,27):Fe(this.Ff,27)}}),this.hasAppearanceStream=!1};Ie(Ye,Je);var Ke=function(){Ye.call(this),this.fontName="helvetica",this.combo=!1};Ie(Ke,Ye);var Ze=function(){Ke.call(this),this.combo=!0};Ie(Ze,Ke);var Xe=function(){Ze.call(this),this.edit=!0};Ie(Xe,Ze);var et=function(){Je.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,15))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,15):Fe(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,16))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,16):Fe(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,17))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,17):Fe(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,26))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,26):Fe(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(t).length){var n,r=[];for(n in r.push("<<"),t)r.push("/"+n+" ("+Pe(e(t[n]))+")");return r.push(">>"),r.join("\n")}},set:function(e){"object"===i()(e)&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};Ie(et,Je);var tt=function(){et.call(this),this.pushButton=!0};Ie(tt,et);var nt=function(){et.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};Ie(nt,et);var rt=function(){var e,t;Je.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push("<<"),r)n.push("/"+t+" ("+Pe(e(r[t]))+")");return n.push(">>"),n.join("\n")},set:function(e){"object"===i()(e)&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(e){"string"==typeof e&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+e}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=st.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ie(rt,Je),nt.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},nt.prototype.createOption=function(e){var t=new rt;return t.Parent=this,t.optionName=e,this.Kids.push(t),lt.call(this.scope,t),t};var it=function(){et.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=st.CheckBox.createAppearanceStream()};Ie(it,et);var ot=function(){Je.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,13))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,13):Fe(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,21))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,21):Fe(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,23))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,23):Fe(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,24))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,24):Fe(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,25))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,25):Fe(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,26))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,26):Fe(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Ie(ot,Je);var at=function(){ot.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ne(this.Ff,14))},set:function(e){this.Ff=!0===Boolean(e)?Le(this.Ff,14):Fe(this.Ff,14)}}),this.password=!0};Ie(at,ot);var st={CheckBox:{createAppearanceStream:function(){return{N:{On:st.CheckBox.YesNormal},D:{On:st.CheckBox.YesPushDown,Off:st.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=Oe(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),o=je(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+Ee(st.internal.getWidth(e))+" "+Ee(st.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+Ee(o.fontSize)+" Tf "+i),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join("\n"),t},YesNormal:function(e){var t=Oe(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],o=st.internal.getHeight(e),a=st.internal.getWidth(e),s=je(e,e.caption);return i.push("1 g"),i.push("0 0 "+Ee(a)+" "+Ee(o)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Ee(a-1)+" "+Ee(o-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+Ee(s.fontSize)+" Tf "+r),i.push(s.text),i.push("ET"),i.push("Q"),t.stream=i.join("\n"),t},OffPushDown:function(e){var t=Oe(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Ee(st.internal.getWidth(e))+" "+Ee(st.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:st.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=st.RadioButton.Circle.YesNormal,t.D[e]=st.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=Oe(e);t.scope=e.scope;var n=[],r=st.internal.getWidth(e)<=st.internal.getHeight(e)?st.internal.getWidth(e)/4:st.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((r*st.internal.Bezier_C).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+Ae(st.internal.getWidth(e)/2)+" "+Ae(st.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),n.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),n.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),n.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=Oe(e);t.scope=e.scope;var n=[],r=st.internal.getWidth(e)<=st.internal.getHeight(e)?st.internal.getWidth(e)/4:st.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),o=Number((i*st.internal.Bezier_C).toFixed(5)),a=Number((r*st.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Ae(st.internal.getWidth(e)/2)+" "+Ae(st.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+Ae(st.internal.getWidth(e)/2)+" "+Ae(st.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=Oe(e);t.scope=e.scope;var n=[],r=st.internal.getWidth(e)<=st.internal.getHeight(e)?st.internal.getWidth(e)/4:st.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),o=Number((i*st.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Ae(st.internal.getWidth(e)/2)+" "+Ae(st.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:st.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=st.RadioButton.Cross.YesNormal,t.D[e]=st.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=Oe(e);t.scope=e.scope;var n=[],r=st.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+Ee(st.internal.getWidth(e)-2)+" "+Ee(st.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Ee(r.x1.x)+" "+Ee(r.x1.y)+" m"),n.push(Ee(r.x2.x)+" "+Ee(r.x2.y)+" l"),n.push(Ee(r.x4.x)+" "+Ee(r.x4.y)+" m"),n.push(Ee(r.x3.x)+" "+Ee(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=Oe(e);t.scope=e.scope;var n=st.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+Ee(st.internal.getWidth(e))+" "+Ee(st.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Ee(st.internal.getWidth(e)-2)+" "+Ee(st.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(Ee(n.x1.x)+" "+Ee(n.x1.y)+" m"),r.push(Ee(n.x2.x)+" "+Ee(n.x2.y)+" l"),r.push(Ee(n.x4.x)+" "+Ee(n.x4.y)+" m"),r.push(Ee(n.x3.x)+" "+Ee(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=Oe(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Ee(st.internal.getWidth(e))+" "+Ee(st.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};st.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=st.internal.getWidth(e),n=st.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},st.internal.getWidth=function(e){var t=0;return"object"===i()(e)&&(t=Te(e.Rect[2])),t},st.internal.getHeight=function(e){var t=0;return"object"===i()(e)&&(t=Te(e.Rect[3])),t};var lt=xe.addField=function(e){if(function(e,t){if(t.scope=e,void 0!==e.internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(Je.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(ze)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Se=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new $e,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){var t;(t=e).internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}),e.internal.events.subscribe("buildDocument",function(){!function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&Ue(r,e)}}(e)}),e.internal.events.subscribe("putCatalog",function(){!function(e){if(void 0===e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(e)}),e.internal.events.subscribe("postPutPages",function(t){!function(e,t){var n=!e;for(var r in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var o=e[r],a=[],s=o.Rect;if(o.Rect&&(o.Rect=Me(o.Rect,t)),t.internal.newObjectDeferredBegin(o.objId,!0),o.DA=st.createDefaultAppearanceStream(o),"object"===i()(o)&&"function"==typeof o.getKeyValueListForStream&&(a=o.getKeyValueListForStream()),o.Rect=s,o.hasAppearanceStream&&!o.appearanceStreamContent){var l=qe(o);a.push({key:"AP",value:"<</N "+l+">>"}),t.internal.acroformPlugin.xForms.push(l)}if(o.appearanceStreamContent){var u="";for(var c in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(c)){var d=o.appearanceStreamContent[c];if(u+="/"+c+" ",u+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var r in d)if(d.hasOwnProperty(r)){var h=d[r];"function"==typeof h&&(h=h.call(t,o)),u+="/"+r+" "+h+" ",t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h)}}else"function"==typeof(h=d)&&(h=h.call(t,o)),u+="/"+r+" "+h,t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h);u+=">>"}a.push({key:"AP",value:"<<\n"+u+">>"})}t.internal.putStream({additionalKeyValues:a,objectId:o.objId}),t.internal.out("endobj")}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=n,o=e[n];t.internal.newObjectDeferredBegin(o.objId,!0),"object"===i()(o)&&"function"==typeof o.putStream&&o.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)}(t,e)}),e.internal.acroformPlugin.isInitialized=!0}}(this,e),!(e instanceof Je))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};xe.AcroFormChoiceField=Ye,xe.AcroFormListBox=Ke,xe.AcroFormComboBox=Ze,xe.AcroFormEditBox=Xe,xe.AcroFormButton=et,xe.AcroFormPushButton=tt,xe.AcroFormRadioButton=nt,xe.AcroFormCheckBox=it,xe.AcroFormTextField=ot,xe.AcroFormPasswordField=at,xe.AcroFormAppearance=st,xe.AcroForm={ChoiceField:Ye,ListBox:Ke,ComboBox:Ze,EditBox:Xe,Button:et,PushButton:tt,RadioButton:nt,CheckBox:it,TextField:ot,PasswordField:at,Appearance:st};var ut,ct,dt=Ce.AcroForm={ChoiceField:Ye,ListBox:Ke,ComboBox:Ze,EditBox:Xe,Button:et,PushButton:tt,RadioButton:nt,CheckBox:it,TextField:ot,PasswordField:at,Appearance:st};function ht(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}!function(e){e.__addimage__={};var t="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},r=e.__addimage__.getImageFileTypeByImageData=function(e,r){var i,o,a,s,l,u=t;if("RGBA"===(r=r||t)||void 0!==e.data&&e.data instanceof Uint8ClampedArray&&"height"in e&&"width"in e)return"RGBA";if(x(e))for(l in n)for(a=n[l],i=0;i<a.length;i+=1){for(s=!0,o=0;o<a[i].length;o+=1)if(void 0!==a[i][o]&&a[i][o]!==e[o]){s=!1;break}if(!0===s){u=l;break}}else for(l in n)for(a=n[l],i=0;i<a.length;i+=1){for(s=!0,o=0;o<a[i].length;o+=1)if(void 0!==a[i][o]&&a[i][o]!==e.charCodeAt(o)){s=!1;break}if(!0===s){u=l;break}}return u===t&&r!==t&&(u=r),u},o=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var o=[];if(o.push({key:"Type",value:"/XObject"}),o.push({key:"Subtype",value:"/Image"}),o.push({key:"Width",value:t.width}),o.push({key:"Height",value:t.height}),t.colorSpace===v.INDEXED?o.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(o.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===v.DEVICE_CMYK&&o.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),o.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&o.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)){for(var a="",s=0,l=t.transparency.length;s<l;s++)a+=t.transparency[s]+" "+t.transparency[s]+" ";o.push({key:"Mask",value:"["+a+"]"})}if(void 0!==t.sMask&&o.push({key:"SMask",value:t.objectId+1+" 0 R"}),r({data:t.data,additionalKeyValues:o,alreadyAppliedFilters:void 0!==t.filter?["/"+t.filter]:void 0,objectId:t.objectId}),n("endobj"),"sMask"in t&&void 0!==t.sMask){var u={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:t.bitsPerComponent,decodeParameters:"/Predictor "+t.predictor+" /Colors 1 /BitsPerComponent "+t.bitsPerComponent+" /Columns "+t.width,data:t.sMask};"filter"in t&&(u.filter=t.filter),e.call(this,u)}if(t.colorSpace===v.INDEXED){var c=this.internal.newObject();r({data:P(new Uint8Array(t.palette)),objectId:c}),n("endobj")}},a=function(){var e=this.internal.collections.addImage_images;for(var t in e)o.call(this,e[t])},s=function(){var e,t=this.internal.collections.addImage_images,n=this.internal.write;for(var r in t)n("/I"+(e=t[r]).index,e.objectId,"0","R")},l=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",s))},u=function(){var e=this.internal.collections.addImage_images;return l.call(this),e},c=function(){return Object.keys(this.internal.collections.addImage_images).length},d=function(t){return"function"==typeof e["process"+t.toUpperCase()]},h=function(e){return"object"===i()(e)&&1===e.nodeType},p=function(t,n){if("IMG"===t.nodeName&&t.hasAttribute("src")){var r=""+t.getAttribute("src");if(0===r.indexOf("data:image/"))return J(unescape(r).split("base64,").pop());var i=e.loadFile(r,!0);if(void 0!==i)return i}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var o;switch(n){case"PNG":o="image/png";break;case"WEBP":o="image/webp";break;case"JPEG":case"JPG":default:o="image/jpeg"}return J(t.toDataURL(o,1).split("base64,").pop())}},f=function(e){var t=this.internal.collections.addImage_images;if(t)for(var n in t)if(e===t[n].alias)return t[n]},m=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),0===e&&(e=t*n.width/n.height),0===t&&(t=e*n.height/n.width),[e,t]},g=function(e,t,n,r,i,o){var a=m.call(this,n,r,i),s=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,c=u.call(this);if(n=a[0],r=a[1],c[i.index]=i,o){o*=Math.PI/180;var d=Math.cos(o),h=Math.sin(o),p=function(e){return e.toFixed(4)},f=[p(d),p(h),p(-1*h),p(d),0,0,"cm"]}this.internal.write("q"),o?(this.internal.write([1,"0","0",1,s(e),l(t+r),"cm"].join(" ")),this.internal.write(f.join(" ")),this.internal.write([s(n),"0","0",s(r),"0","0","cm"].join(" "))):this.internal.write([s(n),"0","0",s(r),s(e),l(t+r),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},v=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},b=e.__addimage__.sHashCode=function(e){var t,n,r=0;if("string"==typeof e)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(x(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},_=e.__addimage__.validateStringAsBase64=function(e){(e=e||"").toString().trim();var t=!0;return 0===e.length&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},w=e.__addimage__.extractImageFromDataUrl=function(e){var t=(e=e||"").split("base64,"),n=null;if(2===t.length){var r=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(t[0]);Array.isArray(r)&&(n={mimeType:r[1],charset:r[2],data:t[1]})}return n},C=e.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};e.__addimage__.isArrayBuffer=function(e){return C()&&e instanceof ArrayBuffer};var x=e.__addimage__.isArrayBufferView=function(e){return C()&&"undefined"!=typeof Uint32Array&&(e instanceof Int8Array||e instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)},S=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},P=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t="",n=x(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,n,r,o,a,s,u,c,d;if("number"==typeof arguments[1]?(n=t,r=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],u=arguments[5],c=arguments[6],d=arguments[7]):(n=arguments[1],r=arguments[2],o=arguments[3],a=arguments[4],s=arguments[5],u=arguments[6],c=arguments[7],d=arguments[8]),"object"===i()(e=arguments[0])&&!h(e)&&"imageData"in e){var p=e;e=p.imageData,n=p.format||n||t,r=p.x||r||0,o=p.y||o||0,a=p.w||p.width||a,s=p.h||p.height||s,u=p.alias||u,c=p.compression||c,d=p.rotation||p.angle||d}var f=this.internal.getFilters();if(void 0===c&&-1!==f.indexOf("FlateEncode")&&(c="SLOW"),isNaN(r)||isNaN(o))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var m=k.call(this,e,n,u,c);return g.call(this,r,o,a,s,m,d),this};var k=function(n,i,o,a){var s,l,u;if("string"==typeof n&&r(n)===t){n=unescape(n);var m=E(n,!1);(""!==m||void 0!==(m=e.loadFile(n,!0)))&&(n=m)}if(h(n)&&(n=p(n,i)),i=r(n,i),!d(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if((null==(u=o)||0===u.length)&&(o=function(e){return"string"==typeof e||x(e)?b(e):x(e.data)?b(e.data):null}(n)),(s=f.call(this,o))||(C()&&(n instanceof Uint8Array||"RGBA"===i||(l=n,n=S(n))),s=this["process"+i.toUpperCase()](n,c.call(this),o,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(a),l)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},E=e.__addimage__.convertBase64ToBinaryString=function(e,t){var n;t="boolean"!=typeof t||t;var r,i="";if("string"==typeof e){r=null!==(n=w(e))?n.data:e;try{i=J(r)}catch(e){if(t)throw _(r)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+e.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return i};e.getImageProperties=function(n){var i,o,a="";if(h(n)&&(n=p(n)),"string"==typeof n&&r(n)===t&&(""===(a=E(n,!1))&&(a=e.loadFile(n)||""),n=a),o=r(n),!d(o))throw new Error("addImage does not support files of type '"+o+"', please ensure that a plugin for '"+o+"' support is added.");if(!C()||n instanceof Uint8Array||(n=S(n)),!(i=this["process"+o.toUpperCase()](n)))throw new Error("An unknown error occurred whilst processing the image");return i.fileType=o,i}}(Ce.API),ut=Ce.API,ct=function(e){if(void 0!==e&&""!=e)return!0},Ce.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),ut.events.push(["putPage",function(e){for(var t,n,r,i=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,a=this.internal.getPageInfoByObjId(e.objId),s=e.pageContext.annotations,l=!1,u=0;u<s.length&&!l;u++)switch((t=s[u]).type){case"link":(ct(t.options.url)||ct(t.options.pageNumber))&&(l=!0);break;case"reference":case"text":case"freetext":l=!0}if(0!=l){this.internal.write("/Annots [");for(var c=0;c<s.length;c++){t=s[c];var d=this.internal.pdfEscape,h=this.internal.getEncryptor(e.objId);switch(t.type){case"reference":this.internal.write(" "+t.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),f=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(p.objId),g=t.title||"Note";r="<</Type /Annot /Subtype /Text "+(n="/Rect ["+i(t.bounds.x)+" "+o(t.bounds.y+t.bounds.h)+" "+i(t.bounds.x+t.bounds.w)+" "+o(t.bounds.y)+"] ")+"/Contents ("+d(m(t.contents))+")",r+=" /Popup "+f.objId+" 0 R",r+=" /P "+a.objId+" 0 R",r+=" /T ("+d(m(g))+") >>",p.content=r;var v=p.objId+" 0 R";r="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+i(t.bounds.x+30)+" "+o(t.bounds.y+t.bounds.h)+" "+i(t.bounds.x+t.bounds.w+30)+" "+o(t.bounds.y)+"] ")+" /Parent "+v,t.open&&(r+=" /Open true"),f.content=r+=" >>",this.internal.write(p.objId,"0 R",f.objId,"0 R");break;case"freetext":n="/Rect ["+i(t.bounds.x)+" "+o(t.bounds.y)+" "+i(t.bounds.x+t.bounds.w)+" "+o(t.bounds.y+t.bounds.h)+"] ";var y=t.color||"#000000";r="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+d(h(t.contents))+")",r+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",r+=" /Border [0 0 0]",this.internal.write(r+=" >>");break;case"link":if(t.options.name){var b=this.annotations._nameMap[t.options.name];t.options.pageNumber=b.page,t.options.top=b.y}else t.options.top||(t.options.top=0);if(n="/Rect ["+t.finalBounds.x+" "+t.finalBounds.y+" "+t.finalBounds.w+" "+t.finalBounds.h+"] ",r="",t.options.url)r="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+d(h(t.options.url))+") >>";else if(t.options.pageNumber)switch(r="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(t.options.pageNumber).objId+" 0 R",t.options.magFactor=t.options.magFactor||"XYZ",t.options.magFactor){case"Fit":r+=" /Fit]";break;case"FitH":r+=" /FitH "+t.options.top+"]";break;case"FitV":t.options.left=t.options.left||0,r+=" /FitV "+t.options.left+"]";break;case"XYZ":default:var _=o(t.options.top);t.options.left=t.options.left||0,void 0===t.options.zoom&&(t.options.zoom=0),r+=" /XYZ "+t.options.left+" "+_+" "+t.options.zoom+"]"}""!=r&&this.internal.write(r+=" >>")}}this.internal.write("]")}}]),ut.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":t.pageContext.annotations.push(e)}},ut.link=function(e,t,n,r,i){var o=this.internal.getCurrentPageInfo(),a=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:a(e),y:s(t),w:a(e+n),h:s(t+r)},options:i,type:"link"})},ut.textWithLink=function(e,t,n,r){var i,o,a=this.getTextWidth(e),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==r.maxWidth){var l=this.splitTextToSize(e,o=r.maxWidth).length;i=Math.ceil(s*l)}else o=a,i=s;return this.text(e,t,n,r),"center"===r.align&&(t-=a/2),"right"===r.align&&(t-=a),this.link(t,(n+=.2*s)-s,o,i,r),a},ut.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor},function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var o=e.__arabicParser__.isInArabicSubstitutionA=function(e){return void 0!==t[e.charCodeAt(0)]},a=e.__arabicParser__.isArabicLetter=function(e){return"string"==typeof e&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return a(e)&&o(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return a(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return a(e)&&o(e)&&t[e.charCodeAt(0)].length>=1};var u=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return a(e)&&o(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return a(e)&&o(e)&&t[e.charCodeAt(0)].length>=3};var c=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return a(e)&&o(e)&&4==t[e.charCodeAt(0)].length},d=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,i="",o=0;for(t=0;t<e.length;t+=1)void 0!==r[e.charCodeAt(t)]?(o++,"number"==typeof(r=r[e.charCodeAt(t)])&&(i+=String.fromCharCode(r),r=n,o=0),t===e.length-1&&(r=n,i+=e.charAt(t-(o-1)),t-=o-1,o=0)):(r=n,i+=e.charAt(t-o),t-=o,o=0);return i};e.__arabicParser__.isArabicDiacritic=function(e){return void 0!==e&&void 0!==r[e.charCodeAt(0)]};var h=e.__arabicParser__.getCorrectForm=function(e,t,n){return a(e)?!1===o(e)?-1:!u(e)||!a(t)&&!a(n)||!a(n)&&s(t)||s(e)&&!a(t)||s(e)&&l(t)||s(e)&&s(t)?0:c(e)&&a(t)&&!s(t)&&a(n)&&u(n)?3:s(e)||!a(n)?1:2:-1},p=function(e){var n=0,r=0,i=0,o="",s="",l="",u=(e=e||"").split("\\s+"),c=[];for(n=0;n<u.length;n+=1){for(c.push(""),r=0;r<u[n].length;r+=1)s=u[n][r-1],l=u[n][r+1],a(o=u[n][r])?(i=h(o,s,l),c[n]+=-1!==i?String.fromCharCode(t[o.charCodeAt(0)][i]):o):c[n]+=o;c[n]=d(c[n])}return c.join(" ")},f=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t="string"==typeof arguments[0]?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([p(t[r][0]),t[r][1],t[r][2]]):n.push([p(t[r])]);e=n}else e=p(t);return"string"==typeof arguments[0]?e:(arguments[0].text=e,arguments[0])};e.events.push(["preProcessText",f])}(Ce.API),Ce.API.autoPrint=function(e){var t;switch((e=e||{}).variant=e.variant||"non-conform",e.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})}return this},function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var n;if("2d"!==(e=e||"2d"))return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(Ce.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var o=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return o},set:function(e){o=e}});var a=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return a},set:function(e){a=e}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return r.call(this),this.internal.__cell__.headerFunction="function"==typeof e?e:void 0,this},e.getTextDimensions=function(e,t){r.call(this);var n=(t=t||{}).fontSize||this.getFontSize(),i=t.font||this.getFont(),o=t.scaleFactor||this.internal.scaleFactor,a=0,s=0,l=0,u=this;if(!Array.isArray(e)&&"string"!=typeof e){if("number"!=typeof e)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");e=String(e)}var c=t.maxWidth;c>0?"string"==typeof e?e=this.splitTextToSize(e,c):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce(function(e,t){return e.concat(u.splitTextToSize(t,c))},[])):e=Array.isArray(e)?e:[e];for(var d=0;d<e.length;d++)a<(l=this.getStringUnitWidth(e[d],{font:i})*n)&&(a=l);return 0!==a&&(s=e.length),{w:a/=o,h:Math.max((s*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/o,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=e.cell=function(){var e;e=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),r.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||t,l=this.internal.__cell__.tableHeaderRow,u=this.internal.__cell__.printHeaders;return void 0!==i.lineNumber&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=s.top,u&&l&&(this.printHeaderRow(e.lineNumber,!0),e.y+=l[0].height)):e.y=i.y+i.height||e.y),void 0!==e.text[0]&&(this.rect(e.x,e.y,e.width,e.height,!0===n?"FD":void 0),"right"===e.align?this.text(e.text,e.x+e.width-o,e.y+o,{align:"right",baseline:"top"}):"center"===e.align?this.text(e.text,e.x+e.width/2,e.y+o,{align:"center",baseline:"top",maxWidth:e.width-o-o}):this.text(e.text,e.x+o,e.y+o,{align:"left",baseline:"top",maxWidth:e.width-o-o})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,u,c,d){if(r.call(this),!u)throw new Error("No data for PDF table.");var h,p,f,m,g=[],v=[],y=[],b={},_={},w=[],C=[],x=(d=d||{}).autoSize||!1,S=!1!==d.printHeaders,P=d.css&&void 0!==d.css["font-size"]?16*d.css["font-size"]:d.fontSize||12,k=d.margins||Object.assign({width:this.getPageWidth()},t),E="number"==typeof d.padding?d.padding:3,A=d.headerBackgroundColor||"#c8c8c8",I=d.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=S,this.internal.__cell__.margins=k,this.internal.__cell__.table_font_size=P,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=A,this.internal.__cell__.headerTextColor=I,this.setFontSize(P),null==c)v=g=Object.keys(u[0]),y=g.map(function(){return"left"});else if(Array.isArray(c)&&"object"===i()(c[0]))for(g=c.map(function(e){return e.name}),v=c.map(function(e){return e.prompt||e.name||""}),y=c.map(function(e){return e.align||"left"}),h=0;h<c.length;h+=1)_[c[h].name]=c[h].width*(19.049976/25.4);else Array.isArray(c)&&"string"==typeof c[0]&&(v=g=c,y=g.map(function(){return"left"}));if(x||Array.isArray(c)&&"string"==typeof c[0])for(h=0;h<g.length;h+=1){for(b[m=g[h]]=u.map(function(e){return e[m]}),this.setFont(void 0,"bold"),w.push(this.getTextDimensions(v[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=b[m],this.setFont(void 0,"normal"),f=0;f<p.length;f+=1)w.push(this.getTextDimensions(p[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);_[m]=Math.max.apply(null,w)+E+E,w=[]}if(S){var T={};for(h=0;h<g.length;h+=1)T[g[h]]={},T[g[h]].text=v[h],T[g[h]].align=y[h];var O=l.call(this,T,_);C=g.map(function(t){return new a(e,n,_[t],O,T[t].text,void 0,T[t].align)}),this.setTableHeaderRow(C),this.printHeaderRow(1,!1)}var R=c.reduce(function(e,t){return e[t.name]=t.align,e},{});for(h=0;h<u.length;h+=1){"rowStart"in d&&d.rowStart instanceof Function&&d.rowStart({row:h,data:u[h]},this);var V=l.call(this,u[h],_);for(f=0;f<g.length;f+=1){var D=u[h][g[f]];"cellStart"in d&&d.cellStart instanceof Function&&d.cellStart({row:h,col:f,data:D},this),s.call(this,new a(e,n,_[g[f]],V,D,h+2,R[g[f]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var l=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map(function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty("text")?i.text:i,t[r]-n-n)},this).map(function(e){return this.getLineHeightFactor()*e.length*r/i+n+n},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){r.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var i;if(n=!0,"function"==typeof this.internal.__cell__.headerFunction){var o=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(o[0],o[1],o[2],o[3],void 0,-1)}this.setFont(void 0,"bold");for(var l=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){i=this.internal.__cell__.tableHeaderRow[u].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,l.push(i)),i.lineNumber=e;var c=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,i),this.setTextColor(c)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,"normal"),n=!1}}(Ce.API);var pt={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ft=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],mt=ht(ft),gt=[100,200,300,400,500,600,700,800,900],vt=ht(gt);function yt(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=function(e){return pt[e=e||"normal"]?e:"normal"}(e.style),r=function(e){if(!e)return 400;if("number"==typeof e)return e>=100&&e<=900&&e%100==0?e:400;if(/^\d00$/.test(e))return parseInt(e);switch(e){case"bold":return 700;case"normal":default:return 400}}(e.weight),i=function(e){return"number"==typeof mt[e=e||"normal"]?e:"normal"}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(" ")}}}function bt(e,t,n,r){var i;for(i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var _t={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},wt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Ct(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function xt(e){return e.trimLeft()}function St(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function Pt(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===t?null:[t[0],e.substring(t[0].length)]}var kt,Et,At,It=["times"];!function(e){var t,n,r,o,a,s,l,u,c,d=function(e){return this.isStrokeTransparent=(e=e||{}).isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||"#000000",this.fillStyle=e.fillStyle||"#000000",this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||"10px sans-serif",this.textBaseline=e.textBaseline||"alphabetic",this.textAlign=e.textAlign||"left",this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||"miter",this.lineCap=e.lineCap||"butt",this.path=e.path||[],this.transform=void 0!==e.transform?e.transform.clone():new u,this.globalCompositeOperation=e.globalCompositeOperation||"normal",this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new s,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new s,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof e.ignoreClearRect||e.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new h(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,s=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,c=new d}]);var h=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=Boolean(e)}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=Boolean(e)}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var o=0;Object.defineProperty(this,"posY",{get:function(){return o},set:function(e){isNaN(e)||(o=e)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(e){var t;"number"==typeof e?t=[e,e,e,e]:((t=new Array(4))[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),c.margin=t}});var a=!1;Object.defineProperty(this,"autoPaging",{get:function(){return a},set:function(e){a=e}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(e){s=e}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(e){e instanceof d&&(c=e)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(e){c.path=e}});var u=[];Object.defineProperty(this,"ctxStack",{get:function(){return u},set:function(e){u=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t;t=p(e),this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=0===t.a,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=p(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=0===t.a,this.ctx.strokeOpacity=t.a,0===t.a?this.pdf.setDrawColor(255,255,255):this.pdf.setDrawColor(t.r,t.g,t.b)}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){-1!==["butt","round","square"].indexOf(e)&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){-1!==["bevel","round","miter"].indexOf(e)&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){-1!==["right","end","center","left","start"].indexOf(e)&&(this.ctx.textAlign=e)}});var h=null;function f(e,t){if(null===h){var n=function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=null;switch(e){case"bold":r={family:n,weight:"bold"};break;case"italic":r={family:n,style:"italic"};break;case"bolditalic":r={family:n,weight:"bold",style:"italic"};break;case"":case"normal":r={family:n}}null!==r&&(r.ref={name:n,style:e},t.push(r))})}),t}(e.getFontList());h=function(e){for(var t={},n=0;n<e.length;++n){var r=yt(e[n]),i=r.family,o=r.stretch,a=r.style,s=r.weight;t[i]=t[i]||{},t[i][o]=t[i][o]||{},t[i][o][a]=t[i][o][a]||{},t[i][o][a][s]=r}return t}(n.concat(t))}return h}var m=null;Object.defineProperty(this,"fontFaces",{get:function(){return m},set:function(e){h=null,m=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,null!==(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(e))){var n=t[1],r=t[3],i=t[4],o=t[6],a=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i="px"===a?Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor):"em"===a?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(e){var t,n,r=[],i=e.trim();if(""===i)return It;if(i in wt)return[wt[i]];for(;""!==i;){switch(n=null,t=(i=xt(i)).charAt(0)){case'"':case"'":n=St(i.substring(1),t);break;default:n=Pt(i)}if(null===n)return It;if(r.push(n[0]),""!==(i=xt(n[1]))&&","!==i.charAt(0))return It;i=i.replace(/^,/,"")}return r}(o);if(this.fontFaces){var l=function(e,t,n){for(var r=(n=n||{}).defaultFontFamily||"times",i=Object.assign({},_t,n.genericFontFamilies||{}),o=null,a=null,s=0;s<t.length;++s)if(i[(o=yt(t[s])).family]&&(o.family=i[o.family]),e.hasOwnProperty(o.family)){a=e[o.family];break}if(!(a=a||e[r]))throw new Error("Could not find a font-family for the rule '"+Ct(o)+"' and default family '"+r+"'.");if(a=function(e,t){if(t[e])return t[e];var n=mt[e],r=bt(t,ft,n,n<=mt.normal?-1:1);if(!r)throw new Error("Could not find a matching font-stretch value for "+e);return r}(o.stretch,a),a=function(e,t){if(t[e])return t[e];for(var n=pt[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw new Error("Could not find a matching font-style for "+e)}(o.style,a),!(a=function(e,t){if(t[e])return t[e];if(400===e&&t[500])return t[500];if(500===e&&t[400])return t[400];var n=bt(t,gt,vt[e],e<400?-1:1);if(!n)throw new Error("Could not find a matching font-weight for value "+e);return n}(o.weight,a)))throw new Error("Failed to resolve a font for the rule '"+Ct(o)+"'.");return a}(f(this.pdf,this.fontFaces),s.map(function(e){return{family:e,stretch:"normal",weight:r,style:n}}));this.pdf.setFont(l.ref.name,l.ref.style)}else{var u="";("bold"===r||parseInt(r,10)>=700||"bold"===n)&&(u="bold"),"italic"===n&&(u+="italic"),0===u.length&&(u="normal");for(var c="",d={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},h=0;h<s.length;h++){if(void 0!==this.pdf.internal.getFont(s[h],u,{noFallback:!0,disableWarning:!0})){c=s[h];break}if("bolditalic"===u&&void 0!==this.pdf.internal.getFont(s[h],"bold",{noFallback:!0,disableWarning:!0}))c=s[h],u="bold";else if(void 0!==this.pdf.internal.getFont(s[h],"normal",{noFallback:!0,disableWarning:!0})){c=s[h],u="normal";break}}if(""===c)for(var p=0;p<s.length;p++)if(d[s[p]]){c=d[s[p]];break}this.pdf.setFont(c=""===c?"Times":c,u)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,M.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,M.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=Boolean(e)}})};h.prototype.setLineDash=function(e){this.lineDash=e},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){w.call(this,"fill",!1)},h.prototype.stroke=function(){w.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw Q.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var n=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:"mt",x:n.x,y:n.y}),this.ctx.lastPoint=new s(e,t)},h.prototype.closePath=function(){var e=new s(0,0),t=0;for(t=this.path.length-1;-1!==t;t--)if("begin"===this.path[t].type&&"object"===i()(this.path[t+1])&&"number"==typeof this.path[t+1].x){e=new s(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(e.x,e.y)},h.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw Q.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var n=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:"lt",x:n.x,y:n.y}),this.ctx.lastPoint=new s(n.x,n.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),w.call(this,null,!0)},h.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw Q.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new s(n,r)),o=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:"qct",x1:o.x,y1:o.y,x:i.x,y:i.y}),this.ctx.lastPoint=new s(i.x,i.y)},h.prototype.bezierCurveTo=function(e,t,n,r,i,o){if(isNaN(i)||isNaN(o)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Q.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var a=this.ctx.transform.applyToPoint(new s(i,o)),l=this.ctx.transform.applyToPoint(new s(e,t)),u=this.ctx.transform.applyToPoint(new s(n,r));this.path.push({type:"bct",x1:l.x,y1:l.y,x2:u.x,y2:u.y,x:a.x,y:a.y}),this.ctx.lastPoint=new s(a.x,a.y)},h.prototype.arc=function(e,t,n,r,i,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw Q.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=Boolean(o),!this.ctx.transform.isIdentity){var a=this.ctx.transform.applyToPoint(new s(e,t));e=a.x,t=a.y;var l=this.ctx.transform.applyToPoint(new s(0,n)),u=this.ctx.transform.applyToPoint(new s(0,0));n=Math.sqrt(Math.pow(l.x-u.x,2)+Math.pow(l.y-u.y,2))}Math.abs(i-r)>=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:"arc",x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:o})},h.prototype.arcTo=function(e,t,n,r,i){throw new Error("arcTo not implemented.")},h.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Q.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},h.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Q.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},h.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Q.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");m.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},h.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw Q.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(e,t,n,r))},h.prototype.save=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("q");if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},h.prototype.restore=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("Q");this.pdf.setPage(t),e&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var p=function(e){var t,n,r,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,i=0;else{var o=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(null!==o)t=parseInt(o[1]),n=parseInt(o[2]),r=parseInt(o[3]),i=1;else if(null!==(o=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e)))t=parseInt(o[1]),n=parseInt(o[2]),r=parseInt(o[3]),i=parseFloat(o[4]);else{if(i=1,"string"==typeof e&&"#"!==e.charAt(0)){var a=new Z(e);e=a.ok?a.toHex():"#000000"}4===e.length?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:i,style:e}},f=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},m=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};h.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw Q.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(r=isNaN(r)?void 0:r,!f.call(this)){var i=N(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;I.call(this,{text:e,x:t,y:n,scale:o,angle:i,align:this.textAlign,maxWidth:r})}},h.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw Q.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!m.call(this)){r=isNaN(r)?void 0:r;var i=N(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;I.call(this,{text:e,x:t,y:n,scale:o,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:r})}},h.prototype.measureText=function(e){if("string"!=typeof e)throw Q.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*r/t.internal.scaleFactor,o=function(e){var t=(e=e||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this};return new o({width:i*=Math.round(96*n/72*1e4)/1e4})},h.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw Q.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var n=new u(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},h.prototype.rotate=function(e){if(isNaN(e))throw Q.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var t=new u(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},h.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw Q.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var n=new u(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},h.prototype.transform=function(e,t,n,r,i,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(o))throw Q.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var a=new u(e,t,n,r,i,o);this.ctx.transform=this.ctx.transform.multiply(a)},h.prototype.setTransform=function(e,t,n,r,i,o){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,o=isNaN(o)?0:o,this.ctx.transform=new u(e,t,n,r,i,o)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function(e,t,n,r,i,o,a,s,c){var d=this.pdf.getImageProperties(e),h=1,p=1,f=1,m=1;void 0!==r&&void 0!==s&&(f=s/r,m=c/i,h=d.width/r*s/r,p=d.height/i*c/i),void 0===o&&(o=t,a=n,t=0,n=0),void 0!==r&&void 0===s&&(s=r,c=i),void 0===r&&void 0===s&&(s=d.width,c=d.height);for(var y,w=this.ctx.transform.decompose(),x=N(w.rotate.shx),S=new u,P=(S=(S=(S=S.multiply(w.translate)).multiply(w.skew)).multiply(w.scale)).applyToRectangle(new l(o-t*f,a-n*m,r*h,i*p)),k=v.call(this,P),E=[],A=0;A<k.length;A+=1)-1===E.indexOf(k[A])&&E.push(k[A]);if(_(E),this.autoPaging)for(var I=E[0],T=E[E.length-1],O=I;O<T+1;O++){this.pdf.setPage(O);var R=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],V=1===O?this.posY+this.margin[0]:this.margin[0],D=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],L=1===O?0:this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2]+(O-2)*D;if(0!==this.ctx.clip_path.length){var F=this.path;y=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(y,this.posX+this.margin[3],-L+V+this.ctx.prevPageLastElemOffset),C.call(this,"fill",!0),this.path=F}var M=JSON.parse(JSON.stringify(P));M=b([M],this.posX+this.margin[3],-L+V+this.ctx.prevPageLastElemOffset)[0];var q=(O>I||O<T)&&g.call(this);q&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],R,D,null).clip().discardPath()),this.pdf.addImage(e,"JPEG",M.x,M.y,M.w,M.h,null,null,x),q&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(e,"JPEG",P.x,P.y,P.w,P.h,null,null,x)};var v=function(e,t,n){var r=[];t=t||this.pdf.internal.pageSize.width,n=n||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case"mt":case"lt":r.push(Math.floor((e.y+i)/n)+1);break;case"arc":r.push(Math.floor((e.y+i-e.radius)/n)+1),r.push(Math.floor((e.y+i+e.radius)/n)+1);break;case"qct":var o=L(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((o.y+i)/n)+1),r.push(Math.floor((o.y+o.h+i)/n)+1);break;case"bct":var a=F(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((a.y+i)/n)+1),r.push(Math.floor((a.y+a.h+i)/n)+1);break;case"rect":r.push(Math.floor((e.y+i)/n)+1),r.push(Math.floor((e.y+e.h+i)/n)+1)}for(var s=0;s<r.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<r[s];)y.call(this);return r},y=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,o=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=o},b=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case"bct":e[r].x2+=t,e[r].y2+=n;case"qct":e[r].x1+=t,e[r].y1+=n;case"mt":case"lt":case"arc":default:e[r].x+=t,e[r].y+=n}return e},_=function(e){return e.sort(function(e,t){return e-t})},w=function(e,t){for(var n,r,i=this.fillStyle,o=this.strokeStyle,a=this.lineCap,s=this.lineWidth,l=Math.abs(s*this.ctx.transform.scaleX),u=this.lineJoin,c=JSON.parse(JSON.stringify(this.path)),d=JSON.parse(JSON.stringify(this.path)),h=[],p=0;p<d.length;p++)if(void 0!==d[p].x)for(var f=v.call(this,d[p]),m=0;m<f.length;m+=1)-1===h.indexOf(f[m])&&h.push(f[m]);for(var w=0;w<h.length;w++)for(;this.pdf.internal.getNumberOfPages()<h[w];)y.call(this);if(_(h),this.autoPaging)for(var x=h[0],S=h[h.length-1],P=x;P<S+1;P++){this.pdf.setPage(P),this.fillStyle=i,this.strokeStyle=o,this.lineCap=a,this.lineWidth=l,this.lineJoin=u;var k=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],E=1===P?this.posY+this.margin[0]:this.margin[0],A=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],I=1===P?0:this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2]+(P-2)*A;if(0!==this.ctx.clip_path.length){var T=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(n,this.posX+this.margin[3],-I+E+this.ctx.prevPageLastElemOffset),C.call(this,e,!0),this.path=T}if(r=JSON.parse(JSON.stringify(c)),this.path=b(r,this.posX+this.margin[3],-I+E+this.ctx.prevPageLastElemOffset),!1===t||0===P){var O=(P>x||P<S)&&g.call(this);O&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],k,A,null).clip().discardPath()),C.call(this,e,t),O&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=l,C.call(this,e,t),this.lineWidth=s;this.path=c},C=function(e,t){if(("stroke"!==e||t||!m.call(this))&&("stroke"===e||t||!f.call(this))){for(var n,r,i=[],o=this.path,a=0;a<o.length;a++){var s=o[a];switch(s.type){case"begin":i.push({begin:!0});break;case"close":i.push({close:!0});break;case"mt":i.push({start:s,deltas:[],abs:[]});break;case"lt":var l=i.length;if(o[a-1]&&!isNaN(o[a-1].x)&&(n=[s.x-o[a-1].x,s.y-o[a-1].y],l>0))for(;l>=0;l--)if(!0!==i[l-1].close&&!0!==i[l-1].begin){i[l-1].deltas.push(n),i[l-1].abs.push(s);break}break;case"bct":i[i.length-1].deltas.push(n=[s.x1-o[a-1].x,s.y1-o[a-1].y,s.x2-o[a-1].x,s.y2-o[a-1].y,s.x-o[a-1].x,s.y-o[a-1].y]);break;case"qct":i[i.length-1].deltas.push(n=[o[a-1].x+2/3*(s.x1-o[a-1].x)-o[a-1].x,o[a-1].y+2/3*(s.y1-o[a-1].y)-o[a-1].y,s.x+2/3*(s.x1-s.x)-o[a-1].x,s.y+2/3*(s.y1-s.y)-o[a-1].y,s.x-o[a-1].x,s.y-o[a-1].y]);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}r=t?null:"stroke"===e?"stroke":"fill";for(var u=!1,c=0;c<i.length;c++)if(i[c].arc)for(var d=i[c].abs,h=0;h<d.length;h++){var p=d[h];"arc"===p.type?P.call(this,p.x,p.y,p.radius,p.startAngle,p.endAngle,p.counterclockwise,void 0,t,!u):T.call(this,p.x,p.y),u=!0}else!0===i[c].close?(this.pdf.internal.out("h"),u=!1):!0!==i[c].begin&&(O.call(this,i[c].deltas,i[c].start.x,i[c].start.y),u=!0);r&&k.call(this,r),t&&E.call(this)}},x=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return e-n;case"top":return e+t-n;case"hanging":return e+t-2*n;case"middle":return e+t/2-n;case"ideographic":return e;case"alphabetic":default:return e}},S=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},e.isCanvasGradient=!0,e},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var P=function(e,t,n,r,i,o,a,s,l){for(var u=V.call(this,n,r,i,o),c=0;c<u.length;c++){var d=u[c];0===c&&(l?A.call(this,d.x1+e,d.y1+t):T.call(this,d.x1+e,d.y1+t)),R.call(this,e,t,d.x2,d.y2,d.x3,d.y3,d.x4,d.y4)}s?E.call(this):k.call(this,a)},k=function(e){switch(e){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},E=function(){this.pdf.clip(),this.pdf.discardPath()},A=function(e,t){this.pdf.internal.out(n(e)+" "+r(t)+" m")},I=function(e){var t;switch(e.align){case"right":case"end":t="right";break;case"center":t="center";break;case"left":case"start":default:t="left"}var n=this.pdf.getTextDimensions(e.text),r=x.call(this,e.y),i=S.call(this,r)-n.h,o=this.ctx.transform.applyToPoint(new s(e.x,r)),a=this.ctx.transform.decompose(),c=new u;c=(c=(c=c.multiply(a.translate)).multiply(a.skew)).multiply(a.scale);for(var d,h,p,f=this.ctx.transform.applyToRectangle(new l(e.x,r,n.w,n.h)),m=c.applyToRectangle(new l(e.x,i,n.w,n.h)),y=v.call(this,m),w=[],P=0;P<y.length;P+=1)-1===w.indexOf(y[P])&&w.push(y[P]);if(_(w),this.autoPaging)for(var k=w[0],E=w[w.length-1],A=k;A<E+1;A++){this.pdf.setPage(A);var I=1===A?this.posY+this.margin[0]:this.margin[0],T=this.pdf.internal.pageSize.height-this.margin[2],O=T-this.margin[0],R=this.pdf.internal.pageSize.width-this.margin[1],V=R-this.margin[3],D=1===A?0:this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2]+(A-2)*O;if(0!==this.ctx.clip_path.length){var N=this.path;d=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(d,this.posX+this.margin[3],-1*D+I),C.call(this,"fill",!0),this.path=N}var L=b([JSON.parse(JSON.stringify(m))],this.posX+this.margin[3],-D+I+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(h=this.pdf.internal.getFontSize(),this.pdf.setFontSize(h*e.scale),this.lineWidth=(p=this.lineWidth)*e.scale);var F="text"!==this.autoPaging;if(F||L.y+L.h<=T){if(F||L.y>=I&&L.x<=R){var M=F?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||R-L.x)[0],q=b([JSON.parse(JSON.stringify(f))],this.posX+this.margin[3],-D+I+this.ctx.prevPageLastElemOffset)[0],j=F&&(A>k||A<E)&&g.call(this);j&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],V,O,null).clip().discardPath()),this.pdf.text(M,q.x,q.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),j&&this.pdf.restoreGraphicsState()}}else L.y<T&&(this.ctx.prevPageLastElemOffset+=T-L.y);e.scale>=.01&&(this.pdf.setFontSize(h),this.lineWidth=p)}else e.scale>=.01&&(h=this.pdf.internal.getFontSize(),this.pdf.setFontSize(h*e.scale),this.lineWidth=(p=this.lineWidth)*e.scale),this.pdf.text(e.text,o.x+this.posX,o.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(h),this.lineWidth=p)},T=function(e,t,i,o){o=o||0,this.pdf.internal.out(n(e+(i=i||0))+" "+r(t+o)+" l")},O=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},R=function(e,n,r,i,s,l,u,c){this.pdf.internal.out([t(o(r+e)),t(a(i+n)),t(o(s+e)),t(a(l+n)),t(o(u+e)),t(a(c+n)),"c"].join(" "))},V=function(e,t,n,r){for(var i=2*Math.PI,o=Math.PI/2;t>n;)t-=i;var a=Math.abs(n-t);a<i&&r&&(a=i-a);for(var s=[],l=r?-1:1,u=t;a>1e-5;){var c=u+l*Math.min(a,o);s.push(D.call(this,e,u,c)),a-=Math.abs(c-u),u=c}return s},D=function(e,t,n){var r=(n-t)/2,i=e*Math.cos(r),o=e*Math.sin(r),a=i,s=-o,l=a*a+s*s,u=l+a*i+s*o,c=4/3*(Math.sqrt(2*l*u)-u)/(a*o-s*i),d=a-c*s,h=s+c*a,p=d,f=-h,m=r+t,g=Math.cos(m),v=Math.sin(m);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:d*g-h*v,y2:d*v+h*g,x3:p*g-f*v,y3:p*v+f*g,x4:e*Math.cos(n),y4:e*Math.sin(n)}},N=function(e){return 180*e/Math.PI},L=function(e,t,n,r,i,o){var a=e+.5*(n-e),s=t+.5*(r-t),u=i+.5*(n-i),c=o+.5*(r-o),d=Math.min(e,i,a,u),h=Math.max(e,i,a,u),p=Math.min(t,o,s,c),f=Math.max(t,o,s,c);return new l(d,p,h-d,f-p)},F=function(e,t,n,r,i,o,a,s){var u,c,d,h,p,f,m,g,v,y,b,_,w,C,x=n-e,S=r-t,P=i-n,k=o-r,E=a-i,A=s-o;for(c=0;c<41;c++)v=(m=(d=e+(u=c/40)*x)+u*((p=n+u*P)-d))+u*(p+u*(i+u*E-p)-m),y=(g=(h=t+u*S)+u*((f=r+u*k)-h))+u*(f+u*(o+u*A-f)-g),0==c?(b=v,_=y,w=v,C=y):(b=Math.min(b,v),_=Math.min(_,y),w=Math.max(w,v),C=Math.max(C,y));return new l(Math.round(b),Math.round(_),Math.round(w-b),Math.round(C-_))},M=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e=JSON.stringify({lineDash:this.ctx.lineDash,lineDashOffset:this.ctx.lineDashOffset});this.prevLineDash!==e&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=e)}}}(Ce.API),function(e){var t=function(e){var t,n,r,i,o,a,s,l,u,c;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t="\0\0\0\0".slice(e.length%4||4)).length;i>r;r+=4)0!==(o=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))?(a=(o=((o=((o=((o=(o-(c=o%85))/85)-(u=o%85))/85)-(l=o%85))/85)-(s=o%85))/85)%85,n.push(a+33,s+33,l+33,u+33,c+33)):n.push(122);return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+"~>"},n=function(e){var t,n,r,i,o,a=String,s="length",l=255,u="charCodeAt",c="slice",d="replace";for(e[c](-2),e=e[c](0,-2)[d](/\s/g,"")[d]("z","!!!!!"),r=[],i=0,o=(e+=t="uuuuu"[c](e[s]%5||5))[s];o>i;i+=5)n=52200625*(e[u](i)-33)+614125*(e[u](i+1)-33)+7225*(e[u](i+2)-33)+85*(e[u](i+3)-33)+(e[u](i+4)-33),r.push(l&n>>24,l&n>>16,l&n>>8,l&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[s]),a.fromCharCode.apply(a,r)},r=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(e=e.replace(/\s/g,"")).indexOf(">")&&(e=e.substr(0,e.indexOf(">"))),e.length%2&&(e+="0"),!1===t.test(e))return"";for(var n="",r=0;r<e.length;r+=2)n+=String.fromCharCode("0x"+(e[r]+e[r+1]));return n},i=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=z(t)).reduce(function(e,t){return e+String.fromCharCode(t)},"")};e.processDataByFilters=function(e,o){var a=0,s=e||"",l=[];for("string"==typeof(o=o||[])&&(o=[o]),a=0;a<o.length;a+=1)switch(o[a]){case"ASCII85Decode":case"/ASCII85Decode":s=n(s),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=t(s),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=r(s),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map(function(e){return("0"+e.charCodeAt().toString(16)).slice(-2)}).join("")+">",l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=i(s),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[a]+'" is not implemented')}return{data:s,reverseChain:l.reverse().join(" ")}}}(Ce.API),function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,i=0,o=function(e){var t=e.length,n=[],r=String.fromCharCode;for(i=0;i<t;i+=1)n.push(r(255&e.charCodeAt(i)));return n.join("")};if(r.open("GET",e,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){n(200===r.status?o(this.responseText):void 0)}),r.send(null),t&&200===r.status)return o(r.responseText)}(e,t,n)}catch(e){}return r}(e,t,n)},e.loadImageFile=e.loadFile}(Ce.API),function(e){function t(){return(U.html2canvas?Promise.resolve(U.html2canvas):n.e(10).then(n.t.bind(null,"wOnQ",7))).catch(function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))}).then(function(e){return e.default?e.default:e})}function r(){return(U.DOMPurify?Promise.resolve(U.DOMPurify):n.e(9).then(n.t.bind(null,"wMS7",7))).catch(function(e){return Promise.reject(new Error("Could not load dompurify: "+e))}).then(function(e){return e.default?e.default:e})}var o=function(e){var t=i()(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},a=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},s=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(s.prototype=Object.create(Promise.prototype)).constructor=s,s.convert=function(e,t){return e.__proto__=t||s.prototype,e},s.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},s.prototype.from=function(e,t){return this.then(function(){switch(t=t||function(e){switch(o(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(r).then(function(t){return this.set({src:a("div",{innerHTML:e,dompurify:t})})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}})},s.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},s.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},t=function e(t,n){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&1===i.nodeType&&"SCRIPT"===i.nodeName||r.appendChild(e(i,n));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},s.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},s.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var o=0;o<n.length;++o){var a=n[o],s=a.src.find(function(e){return"truetype"===e.format});s&&t.addFont(s.url,a.ref.name,a.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e})},s.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},s.prototype.output=function(e,t,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},s.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},s.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+e+'" is not supported.'}})},s.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},s.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},s.prototype.set=function(e){if("object"!==o(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in s.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},s.prototype.get=function(e,t){return this.then(function(){var n=e in s.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},s.prototype.setMargin=function(e){return this.then(function(){switch(o(e)){case"number":e=[e,e,e,e];case"array":if(2===e.length&&(e=[e[0],e[1],e[0],e[1]]),4===e.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e}).then(this.setPageSize)},s.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e=e||Ce.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},s.prototype.setProgress=function(e,t,n,r){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},s.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},s.prototype.thenCore=function(e,t,n){n=n||Promise.prototype.then,e&&(e=e.bind(this)),t&&(t=t.bind(this));var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:s.convert(Object.assign({},this),Promise.prototype),i=n.call(r,e,t);return s.convert(i,this.__proto__)},s.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},s.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},s.prototype.catch=function(e){e&&(e=e.bind(this));var t=Promise.prototype.catch.call(this,e);return s.convert(t,this)},s.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},s.prototype.error=function(e){return this.then(function(){throw new Error(e)})},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,Ce.getPageSize=function(e,t,n){if("object"===i()(e)){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t=t||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var o,a=(""+n).toLowerCase(),s={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":o=1;break;case"mm":o=72/25.4;break;case"cm":o=72/2.54;break;case"in":o=72;break;case"px":o=.75;break;case"pc":case"em":o=12;break;case"ex":o=6;break;default:throw"Invalid unit: "+t}var l,u=0,c=0;if(s.hasOwnProperty(a))u=s[a][1]/o,c=s[a][0]/o;else try{u=n[1],c=n[0]}catch(ut){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",c>u&&(l=c,c=u,u=l);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",u>c&&(l=c,c=u,u=l)}return{width:c,height:u,unit:t,k:o,orientation:e}},e.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(yt):null;var n=new s(t);return t.worker?n:n.from(e).doCallback()}}(Ce.API),Ce.API.addJS=function(e){return At=e,this.internal.events.subscribe("postPutResources",function(){kt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(kt+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Et=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+At+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==kt&&void 0!==Et&&this.internal.out("/Names <</JavaScript "+kt+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),i=0;i<r.length;i++){var o=r[i],a=n.exec(o);null!=a&&e.internal.newObjectDeferredBegin(a[1],!1),e.internal.write(o)}if(this.outline.createNamedDestinations){var s=this.internal.pages.length,l=[];for(i=0;i<s;i++){var u=e.internal.newObject();l.push(u);var c=e.internal.getPageInfo(i+1);e.internal.write("<< /D["+c.objId+" 0 R /XYZ null null null]>> endobj")}var d=e.internal.newObject();for(e.internal.write("<< /Names [ "),i=0;i<l.length;i++)e.internal.write("(page_"+(i+1)+")"+l[i]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+d+" 0 R"),e.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return null==e&&(e=this.root),e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line("/Type /Outlines"),e.children.length>0&&(this.line("/First "+this.makeRef(e.children[0])),this.line("/Last "+this.makeRef(e.children[e.children.length-1]))),this.line("/Count "+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var i=t.children[r];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(t)),r>0&&this.line("/Prev "+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[r+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var o=this.count=this.count_r({count:0},i);if(o>0&&this.line("/Count "+o),i.options&&i.options.pageNumber){var a=e.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+a.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var s=0;s<t.children.length;s++)this.renderItems(t.children[s])},e.outline.line=function(e){this.ctx.val+=e+"\r\n"},e.outline.makeRef=function(e){return e.id+" 0 R"},e.outline.makeString=function(t){return"("+e.internal.pdfEscape(t)+")"},e.outline.objStart=function(e){this.ctx.val+="\r\n"+e.id+" 0 obj\r\n<<\r\n"},e.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(Ce.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,o,a){var s,l=this.decode.DCT_DECODE,u=null;if("string"==typeof e||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=this.__addimage__.isArrayBuffer(e=o||e)?new Uint8Array(e):e,(s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,o={width:0,height:0,numcomponents:1},a=4;a<i;a+=2){if(-1!==t.indexOf(e.charCodeAt((a+=r)+1))){n=256*e.charCodeAt(a+5)+e.charCodeAt(a+6),o={width:256*e.charCodeAt(a+7)+e.charCodeAt(a+8),height:n,numcomponents:e.charCodeAt(a+9)};break}r=256*e.charCodeAt(a+2)+e.charCodeAt(a+3)}return o}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e)).numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}u={data:e,width:s.width,height:s.height,colorSpace:a,bitsPerComponent:8,filter:l,index:n,alias:r}}return u}}(Ce.API);var Tt,Ot,Rt,Vt,Dt,Nt=function(){var e,t,n;function r(e){var t,n,r,i,o,a,s,l,u,c,d,h,p;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},o=null;;){switch(t=this.readUInt32(),l=(function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":o&&this.animation.frames.push(o),this.pos+=4,o={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},i=this.readUInt16(),r=this.readUInt16()||100,o.delay=1e3*i/r,o.disposeOp=this.data[this.pos++],o.blendOp=this.data[this.pos++],o.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=o?o.data:void 0)||this.imgData,d=0;0<=t?d<t:d>t;0<=t?++d:--d)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(n=this.palette.length/3,this.transparency.indexed=this.read(t),this.transparency.indexed.length>n)throw new Error("More transparent colors than palette size");if((u=n-this.transparency.indexed.length)>0)for(h=0;0<=u?h<u:h>u;0<=u?++h:--h)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":a=(c=this.read(t)).indexOf(0),s=String.fromCharCode.apply(String,c.slice(0,a)),this.text[s]=String.fromCharCode.apply(String,c.slice(a+1));break;case"IEND":return o&&this.animation.frames.push(o),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,this.pixelBitlength=this.bits*(this.colors+(this.hasAlphaChannel?1:0)),this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}r.prototype.read=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)n.push(this.data[this.pos++]);return n},r.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},r.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},r.prototype.decodePixels=function(e){var t,n=this.pixelBitlength/8,r=new Uint8Array(this.width*this.height*n),i=0,a=this;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);function s(t,o,s,l){var u,c,d,h,p,f,m,g,v,y,b,_,w,C,x,S,P,k,E,A,I=Math.ceil((a.width-t)/s),T=Math.ceil((a.height-o)/l),O=a.width==I&&a.height==T;for(w=n*I,b=O?r:new Uint8Array(w*T),f=e.length,_=0,c=0;_<T&&i<f;){switch(e[i++]){case 0:for(h=S=0;S<w;h=S+=1)b[c++]=e[i++];break;case 1:for(h=P=0;P<w;h=P+=1)u=e[i++],p=h<n?0:b[c-n],b[c++]=(u+p)%256;break;case 2:for(h=k=0;k<w;h=k+=1)u=e[i++],d=(h-h%n)/n,b[c++]=((C=_&&b[(_-1)*w+d*n+h%n])+u)%256;break;case 3:for(h=E=0;E<w;h=E+=1)u=e[i++],d=(h-h%n)/n,p=h<n?0:b[c-n],C=_&&b[(_-1)*w+d*n+h%n],b[c++]=(u+Math.floor((p+C)/2))%256;break;case 4:for(h=A=0;A<w;h=A+=1)u=e[i++],d=(h-h%n)/n,0===_?C=x=0:(C=b[(_-1)*w+d*n+h%n],x=d&&b[(_-1)*w+(d-1)*n+h%n]),m=(p=h<n?0:b[c-n])+C-x,g=Math.abs(m-p),v=Math.abs(m-C),y=Math.abs(m-x),b[c++]=(u+(g<=v&&g<=y?p:v<=y?C:x))%256;break;default:throw new Error("Invalid filter algorithm: "+e[i-1])}if(!O){var R=((o+_*l)*a.width+t)*n,V=_*w;for(h=0;h<I;h+=1){for(var D=0;D<n;D+=1)r[R++]=b[V++];R+=(s-1)*n}}_++}}return e=function(e,t,n){var r=e.length,i=!t||n,a=!n||n.i;n||(n={}),t||(t=new o(3*r));var s=function(e){var n=t.length;if(e>n){var r=new o(Math.max(2*n,e));r.set(t),t=r}},d=n.f||0,h=n.p||0,f=n.b||0,m=n.l,v=n.d,y=n.m,b=n.n,_=8*r;do{if(!m){n.f=d=I(e,h,1);var C=I(e,h+1,3);if(h+=3,!C){var x=e[(B=O(h)+4)-4]|e[B-3]<<8,S=B+x;if(S>r){if(a)throw"unexpected EOF";break}i&&s(f+x),t.set(e.subarray(B,S),f),n.b=f+=x,n.p=h=8*S;continue}if(1==C)m=P,v=E,y=9,b=5;else{if(2!=C)throw"invalid block type";var k=I(e,h,31)+257,V=I(e,h+10,15)+4,D=k+I(e,h+5,31)+1;h+=14;for(var N=new o(D),L=new o(19),F=0;F<V;++F)L[c[F]]=I(e,h+3*F,7);h+=3*V;var M=A(L),q=(1<<M)-1;if(!a&&h+D*(M+7)>_)break;var j=w(L,M,1);for(F=0;F<D;){var B,z=j[I(e,h,q)];if(h+=15&z,(B=z>>>4)<16)N[F++]=B;else{var U=0,H=0;for(16==B?(H=3+I(e,h,3),h+=2,U=N[F-1]):17==B?(H=3+I(e,h,7),h+=3):18==B&&(H=11+I(e,h,127),h+=7);H--;)N[F++]=U}}var Q=N.subarray(0,k),W=N.subarray(k);y=A(Q),b=A(W),m=w(Q,y,1),v=w(W,b,1)}if(h>_)throw"unexpected EOF"}i&&s(f+131072);for(var G=(1<<y)-1,$=(1<<b)-1,J=y+b+18;a||h+J<_;){var Y=(U=m[T(e,h)&G])>>>4;if((h+=15&U)>_)throw"unexpected EOF";if(!U)throw"invalid length/literal";if(Y<256)t[f++]=Y;else{if(256==Y){m=null;break}var K=Y-254;Y>264&&(K=I(e,h,(1<<(ee=l[F=Y-257]))-1)+p[F],h+=ee);var Z=v[T(e,h)&$],X=Z>>>4;if(!Z)throw"invalid distance";if(h+=15&Z,W=g[X],X>3){var ee=u[X];W+=T(e,h)&(1<<ee)-1,h+=ee}if(h>_)throw"unexpected EOF";i&&s(f+131072);for(var te=f+K;f<te;f+=4)t[f]=t[f-W],t[f+1]=t[f+1-W],t[f+2]=t[f+2-W],t[f+3]=t[f+3-W];f=te}}n.l=m,n.p=h,n.b=f,m&&(d=1,n.m=y,n.d=v,n.n=b)}while(!d);return f==t.length?t:R(t,0,f)}((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(t=e),t.subarray(2,-4)),undefined),1==a.interlaceMethod?(s(0,0,8,8),s(4,0,8,8),s(0,4,4,8),s(2,0,4,4),s(0,2,2,4),s(1,0,2,2),s(0,1,1,2)):s(0,0,1,1),r},r.prototype.decodePalette=function(){var e,t,n,r,i,o,a,s,l;for(n=this.palette,o=this.transparency.indexed||[],i=new Uint8Array((o.length||0)+n.length),r=0,e=0,t=a=0,s=n.length;a<s;t=a+=3)i[r++]=n[t],i[r++]=n[t+1],i[r++]=n[t+2],i[r++]=null!=(l=o[e++])?l:255;return i},r.prototype.copyToImageData=function(e,t){var n,r,i,o,a,s,l,u,c,d,h;if(r=this.colors,c=null,n=this.hasAlphaChannel,this.palette.length&&(c=null!=(h=this._decodedPalette)?h:this._decodedPalette=this.decodePalette(),r=4,n=!0),u=(i=e.data||e).length,a=c||t,o=s=0,1===r)for(;o<u;)l=c?4*t[o/4]:s,d=a[l++],i[o++]=d,i[o++]=d,i[o++]=d,i[o++]=n?a[l++]:255,s=l;else for(;o<u;)l=c?4*t[o/4]:s,i[o++]=a[l++],i[o++]=a[l++],i[o++]=a[l++],i[o++]=n?a[l++]:255,s=l},r.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e};var i=function(){if("[object Window]"===Object.prototype.toString.call(U)){try{t=U.document.createElement("canvas"),n=t.getContext("2d")}catch(e){return!1}return!0}return!1};return i(),e=function(e){var r;if(!0===i())return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(r=new Image).src=t.toDataURL(),r;throw new Error("This method requires a Browser with Canvas-capability.")},r.prototype.decodeFrames=function(t){var n,r,i,o,a,s,l,u;if(this.animation){for(u=[],r=a=0,s=(l=this.animation.frames).length;a<s;r=++a)i=t.createImageData((n=l[r]).width,n.height),o=this.decodePixels(new Uint8Array(n.data)),this.copyToImageData(i,o),n.imageData=i,u.push(n.image=e(i));return u}},r.prototype.renderFrame=function(e,t){var n,r,i;return n=(r=this.animation.frames)[t],i=r[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?e.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&e.putImageData(i.imageData,i.xOffset,i.yOffset),0===n.blendOp&&e.clearRect(n.xOffset,n.yOffset,n.width,n.height),e.drawImage(n.image,n.xOffset,n.yOffset)},r.prototype.animate=function(e){var t,n,r,i,o,a,s=this;return n=0,i=(a=this.animation).numFrames,r=a.frames,o=a.numPlays,(t=function(){var a,l;if(a=n++%i,l=r[a],s.renderFrame(e,a),i>1&&n/i<o)return s.animation._timeout=setTimeout(t,l.delay)})()},r.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},r.prototype.render=function(e){var t,n;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(n=t.createImageData(this.width,this.height),this.copyToImageData(n,this.decodePixels()),t.putImageData(n,0,0))},r}();function Lt(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],o=1<<1+(7&i);t++,t++;var a=null,s=null;i>>7&&(a=t,s=o,t+=3*o);var l=!0,u=[],c=0,d=null,h=0,p=null;for(this.width=n,this.height=r;l&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(0===k)break;t+=k}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error("Invalid graphics extension block.");var f=e[t++];c=e[t++]|e[t++]<<8,d=e[t++],0==(1&f)&&(d=null),h=f>>2&7,t++;break;case 254:for(;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(0===k)break;t+=k}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var m=e[t++]|e[t++]<<8,g=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,b=e[t++],_=b>>6&1,w=1<<1+(7&b),C=a,x=s,S=!1;b>>7&&(S=!0,C=t,x=w,t+=3*w);var P=t;for(t++;;){var k;if(!((k=e[t++])>=0))throw Error("Invalid block size");if(0===k)break;t+=k}u.push({x:m,y:g,width:v,height:y,has_local_palette:S,palette_offset:C,palette_size:x,data_offset:P,data_length:t-P,transparent_index:d,interlaced:!!_,delay:c,disposal:h});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return p},this.frameInfo=function(e){if(e<0||e>=u.length)throw new Error("Frame index out of range.");return u[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=this.frameInfo(t),o=i.width*i.height,a=new Uint8Array(o);Ft(e,i.data_offset,a,o);var s=i.palette_offset,l=i.transparent_index;null===l&&(l=256);var u=i.width,c=n-u,d=u,h=4*(i.y*n+i.x),p=4*((i.y+i.height)*n+i.x),f=h,m=4*c;!0===i.interlaced&&(m+=4*n*7);for(var g=8,v=0,y=a.length;v<y;++v){var b=a[v];if(0===d&&(d=u,(f+=m)>=p&&(m=4*c+4*n*(g-1),f=h+(u+c)*(g<<1),g>>=1)),b===l)f+=4;else{var _=e[s+3*b],w=e[s+3*b+1];r[f++]=e[s+3*b+2],r[f++]=w,r[f++]=_,r[f++]=255}--d}},this.decodeAndBlitFrameRGBA=function(t,r){var i=this.frameInfo(t),o=i.width*i.height,a=new Uint8Array(o);Ft(e,i.data_offset,a,o);var s=i.palette_offset,l=i.transparent_index;null===l&&(l=256);var u=i.width,c=n-u,d=u,h=4*(i.y*n+i.x),p=4*((i.y+i.height)*n+i.x),f=h,m=4*c;!0===i.interlaced&&(m+=4*n*7);for(var g=8,v=0,y=a.length;v<y;++v){var b=a[v];if(0===d&&(d=u,(f+=m)>=p&&(m=4*c+4*n*(g-1),f=h+(u+c)*(g<<1),g>>=1)),b===l)f+=4;else{var _=e[s+3*b+1],w=e[s+3*b+2];r[f++]=e[s+3*b],r[f++]=_,r[f++]=w,r[f++]=255}--d}}}function Ft(e,t,n,r){for(var i=e[t++],o=1<<i,a=o+1,s=a+1,l=i+1,u=(1<<l)-1,c=0,d=0,h=0,p=e[t++],f=new Int32Array(4096),m=null;;){for(;c<16&&0!==p;)d|=e[t++]<<c,c+=8,1===p?p=e[t++]:--p;if(c<l)break;var g=d&u;if(d>>=l,c-=l,g!==o){if(g===a)break;for(var v=g<s?g:m,y=0,b=v;b>o;)b=f[b]>>8,++y;var _=b;if(h+y+(v!==g?1:0)>r)return void Q.log("Warning, gif stream longer than expected.");n[h++]=_;var w=h+=y;for(v!==g&&(n[h++]=_),b=v;y--;)n[--w]=255&(b=f[b]),b>>=8;null!==m&&s<4096&&(f[s++]=m<<8|_,s>=u+1&&l<12&&(++l,u=u<<1|1)),m=g}else s=a+1,u=(1<<(l=i+1))-1,m=null}return h!==r&&Q.log("Warning, gif stream shorter than expected."),n}function Mt(e){var t,n,r,i,o,a=Math.floor,s=new Array(64),l=new Array(64),u=new Array(64),c=new Array(64),d=new Array(65535),h=new Array(65535),p=new Array(64),f=new Array(64),m=[],g=0,v=7,y=new Array(64),b=new Array(64),_=new Array(64),w=new Array(256),C=new Array(2048),x=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],S=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],k=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],E=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],A=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],O=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function R(e,t){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=e[o];a++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=o,r++,n++;n*=2}return i}function V(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(g|=1<<v),n--,--v<0&&(255==g?(D(255),D(0)):D(g),v=7,g=0)}function D(e){m.push(e)}function N(e){D(e>>8&255),D(255&e)}function L(e,t,n,r,i){for(var o,a=i[0],s=i[240],l=function(e,t){var n,r,i,o,a,s,l,u,c,d,h=0;for(c=0;c<8;++c){var f=(n=e[h])+(u=e[h+7]),m=n-u,g=(r=e[h+1])+(l=e[h+6]),v=r-l,y=(i=e[h+2])+(s=e[h+5]),b=i-s,_=(o=e[h+3])+(a=e[h+4]),w=o-a,C=f+_,x=f-_,S=g+y,P=g-y;e[h]=C+S,e[h+4]=C-S;var k=.707106781*(P+x);e[h+2]=x+k,e[h+6]=x-k;var E=.382683433*((C=w+b)-(P=v+m)),A=.5411961*C+E,I=1.306562965*P+E,T=.707106781*(S=b+v),O=m+T,R=m-T;e[h+5]=R+A,e[h+3]=R-A,e[h+1]=O+I,e[h+7]=O-I,h+=8}for(h=0,c=0;c<8;++c){var V=(n=e[h])+(u=e[h+56]),D=n-u,N=(r=e[h+8])+(l=e[h+48]),L=r-l,F=(i=e[h+16])+(s=e[h+40]),M=i-s,q=(o=e[h+24])+(a=e[h+32]),j=o-a,B=V+q,z=V-q,U=N+F,H=N-F;e[h]=B+U,e[h+32]=B-U;var Q=.707106781*(H+z);e[h+16]=z+Q,e[h+48]=z-Q;var W=.382683433*((B=j+M)-(H=L+D)),G=.5411961*B+W,$=1.306562965*H+W,J=.707106781*(U=M+L),Y=D+J,K=D-J;e[h+40]=K+G,e[h+24]=K-G,e[h+8]=Y+$,e[h+56]=Y-$,h++}for(c=0;c<64;++c)p[c]=(d=e[c]*t[c])>0?d+.5|0:d-.5|0;return p}(e,t),u=0;u<64;++u)f[x[u]]=l[u];var c=f[0]-n;n=f[0],0==c?V(r[0]):(V(r[h[o=32767+c]]),V(d[o]));for(var m=63;m>0&&0==f[m];)m--;if(0==m)return V(a),n;for(var g,v=1;v<=m;){for(var y=v;0==f[v]&&v<=m;)++v;var b=v-y;if(b>=16){g=b>>4;for(var _=1;_<=g;++_)V(s);b&=15}V(i[(b<<4)+h[o=32767+f[v]]]),V(d[o]),v++}return 63!=m&&V(a),n}function F(e){e=Math.min(Math.max(e,1),100),o!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=a((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),s[x[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var d=a((i[o]*e+50)/100);d=Math.min(Math.max(d,1),255),l[x[o]]=d}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],p=0,f=0;f<8;f++)for(var m=0;m<8;m++)u[p]=1/(s[x[p]]*h[f]*h[m]*8),c[p]=1/(l[x[p]]*h[f]*h[m]*8),p++}(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),o=e)}this.encode=function(e,o){o&&F(o),m=new Array,g=0,v=7,N(65496),N(65504),N(16),D(74),D(70),D(73),D(70),D(0),D(1),D(1),D(0),N(1),N(1),D(0),D(0),function(){N(65499),N(132),D(0);for(var e=0;e<64;e++)D(s[e]);D(1);for(var t=0;t<64;t++)D(l[t])}(),function(e,t){N(65472),N(17),D(8),N(t),N(e),D(3),D(1),D(17),D(0),D(2),D(17),D(1),D(3),D(17),D(1)}(e.width,e.height),function(){N(65476),N(418),D(0);for(var e=0;e<16;e++)D(S[e+1]);for(var t=0;t<=11;t++)D(P[t]);D(16);for(var n=0;n<16;n++)D(k[n+1]);for(var r=0;r<=161;r++)D(E[r]);D(1);for(var i=0;i<16;i++)D(A[i+1]);for(var o=0;o<=11;o++)D(I[o]);D(17);for(var a=0;a<16;a++)D(T[a+1]);for(var s=0;s<=161;s++)D(O[s])}(),N(65498),N(12),D(3),D(1),D(0),D(2),D(17),D(3),D(17),D(0),D(63),D(0);var a=0,d=0,h=0;g=0,v=7,this.encode.displayName="_encode_";for(var p,f,w,x,R,M,q,j,B,z=e.data,U=e.height,H=4*e.width,Q=0;Q<U;){for(p=0;p<H;){for(R=H*Q+p,q=-1,j=0,B=0;B<64;B++)M=R+(j=B>>3)*H+(q=4*(7&B)),Q+j>=U&&(M-=H*(Q+1+j-U)),p+q>=H&&(M-=p+q-H+4),f=z[M++],w=z[M++],x=z[M++],y[B]=(C[f]+C[w+256>>0]+C[x+512>>0]>>16)-128,b[B]=(C[f+768>>0]+C[w+1024>>0]+C[x+1280>>0]>>16)-128,_[B]=(C[f+1280>>0]+C[w+1536>>0]+C[x+1792>>0]>>16)-128;a=L(y,u,a,t,r),d=L(b,c,d,n,i),h=L(_,c,h,n,i),p+=32}Q+=8}if(v>=0){var W=[];W[1]=v+1,W[0]=(1<<v+1)-1,V(W)}return N(65497),new Uint8Array(m)},e=e||50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)w[t]=e(t)}(),t=R(S,P),n=R(A,I),r=R(k,E),i=R(T,O),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)h[32767+r]=n,d[32767+r]=[],d[32767+r][1]=n,d[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)h[32767+i]=n,d[32767+i]=[],d[32767+i][1]=n,d[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)C[e]=19595*e,C[e+256>>0]=38470*e,C[e+512>>0]=7471*e+32768,C[e+768>>0]=-11059*e,C[e+1024>>0]=-21709*e,C[e+1280>>0]=32768*e+8421375,C[e+1536>>0]=-27439*e,C[e+1792>>0]=-5329*e}(),F(e)}function qt(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function jt(e){function t(e){if(!e)throw Error("assert :P")}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var o=0;o<i;o++)e[t+o]=n[r+o]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function o(e){return new Int32Array(e)}function a(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var o=i[r],a=0;a<o&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));a++)e(n[a],r+1,i)}(n,0,e),n}var l=function(){var e=this;function l(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function u(e,n,r,i,o){t(!(i%r));do{e[n+(i-=r)]=o}while(0<i)}function c(e,n,r,i,a){if(t(2328>=a),512>=a)var s=o(512);else if(null==(s=o(a)))return 0;return function(e,n,r,i,a,s){var c,h,p=n,f=1<<r,m=o(16),g=o(16);for(t(0!=a),t(null!=i),t(null!=e),t(0<r),h=0;h<a;++h){if(15<i[h])return 0;++m[i[h]]}if(m[0]==a)return 0;for(g[1]=0,c=1;15>c;++c){if(m[c]>1<<c)return 0;g[c+1]=g[c]+m[c]}for(h=0;h<a;++h)c=i[h],0<i[h]&&(s[g[c]++]=h);if(1==g[15])return(i=new d).g=0,i.value=s[0],u(e,p,1,f,i),f;var v,y=-1,b=f-1,_=0,w=1,C=1,x=1<<r;for(h=0,c=1,a=2;c<=r;++c,a<<=1){if(w+=C<<=1,0>(C-=m[c]))return 0;for(;0<m[c];--m[c])(i=new d).g=c,i.value=s[h++],u(e,p+_,a,x,i),_=l(_,c)}for(c=r+1,a=2;15>=c;++c,a<<=1){if(w+=C<<=1,0>(C-=m[c]))return 0;for(;0<m[c];--m[c]){if(i=new d,(_&b)!=y){for(p+=x,v=1<<(y=c)-r;15>y&&!(0>=(v-=m[y]));)++y,v<<=1;f+=x=1<<(v=y-r),e[n+(y=_&b)].g=v+r,e[n+y].value=p-n-y}i.g=c-r,i.value=s[h++],u(e,p+(_>>r),a,x,i),_=l(_,c)}}return w!=2*g[15]-1?0:f}(e,n,r,i,a,s)}function d(){this.value=this.g=0}function h(){this.value=this.g=0}function p(){this.G=a(5,d),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(qn,h)}function f(e,n,r,i){t(null!=e),t(null!=n),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,k(e)}function m(e,t){for(var n=0;0<t--;)n|=A(e,128)<<t;return n}function g(e,t){var n=m(e,t);return E(e)?-n:n}function v(e,n,r,i){var o,a=0;for(t(null!=e),t(null!=n),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),o=0;o<i;++o)a+=n[r+o]<<8*o;e.Ra=a,e.bb=i,e.oa=n,e.pa=r}function y(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<zn-8>>>0,++e.bb,e.u-=8;x(e)&&(e.h=1,e.u=0)}function b(e,n){if(t(0<=n),!e.h&&n<=Bn){var r=C(e)&jn[n];return e.u+=n,y(e),r}return e.h=1,e.u=0}function _(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function w(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function C(e){return e.Ra>>>(e.u&zn-1)>>>0}function x(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>zn}function S(e,t){e.u=t,e.h=x(e)}function P(e){e.u>=Un&&(t(e.u>=Un),y(e))}function k(e){t(null!=e&&null!=e.oa),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(null!=e&&null!=e.oa),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function E(e){return m(e,1)}function A(e,t){var n=e.Ca;0>e.b&&k(e);var r=e.b,i=n*t>>>8,o=(e.I>>>r>i)+0;for(o?(n-=i,e.I-=i+1<<r>>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return e.b-=r=7^i+Hn[r],e.Ca=(n<<r)-1,o}function I(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=n>>0&255}function T(e,t){return e[t+0]<<0|e[t+1]<<8}function O(e,t){return T(e,t)|e[t+2]<<16}function R(e,t){return T(e,t)|T(e,t+2)<<16}function V(e,n){var r=1<<n;return t(null!=e),t(0<n),e.X=o(r),null==e.X?0:(e.Mb=32-n,e.Xa=n,1)}function D(e,n){t(null!=e),t(null!=n),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function N(){this.X=[],this.Xa=this.Mb=0}function L(e,n,r,i){t(null!=r),t(null!=i);var o=r[0],a=i[0];return 0==o&&(o=(e*a+n/2)/n),0==a&&(a=(n*o+e/2)/e),0>=o||0>=a?0:(r[0]=o,i[0]=a,1)}function F(e,t){return e+(1<<t)-1>>>t}function M(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function q(t,n){e[n]=function(n,r,i,o,a,s,l){var u;for(u=0;u<a;++u){var c=e[t](s[l+u-1],i,o+u);s[l+u]=M(n[r+u],c)}}}function j(){this.ud=this.hd=this.jd=0}function B(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function z(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function U(e,t){return z(e+(e-t+.5>>1))}function H(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function Q(e,t,n,r,i,o,a){for(r=o[a-1],n=0;n<i;++n)o[a+n]=r=M(e[t+n],r)}function W(e,t,n,r,i){var o;for(o=0;o<n;++o){var a=e[t+o],s=a>>8&255,l=16711935&(l=(l=16711935&a)+((s<<16)+s));r[i+o]=(4278255360&a)+l>>>0}}function G(e,t){t.jd=e>>0&255,t.hd=e>>8&255,t.ud=e>>16&255}function $(e,t,n,r,i,o){var a;for(a=0;a<r;++a){var s=t[n+a],l=s>>>8,u=s,c=255&(c=(c=s>>>16)+((e.jd<<24>>24)*(l<<24>>24)>>>5));u=255&(u=(u+=(e.hd<<24>>24)*(l<<24>>24)>>>5)+((e.ud<<24>>24)*(c<<24>>24)>>>5)),i[o+a]=(4278255360&s)+(c<<16)+u}}function J(t,n,r,i,o){e[n]=function(e,t,n,r,a,s,l,u,c){for(r=l;r<u;++r)for(l=0;l<c;++l)a[s++]=o(n[i(e[t++])])},e[t]=function(t,n,a,s,l,u,c){var d=8>>t.b,h=t.Ea,p=t.K[0],f=t.w;if(8>d)for(t=(1<<t.b)-1,f=(1<<d)-1;n<a;++n){var m,g=0;for(m=0;m<h;++m)m&t||(g=i(s[l++])),u[c++]=o(p[g&f]),g>>=d}else e["VP8LMapColor"+r](s,l,p,f,u,c,n,a,h)}}function Y(e,t,n,r,i){for(n=t+n;t<n;){var o=e[t++];r[i++]=o>>16&255,r[i++]=o>>8&255,r[i++]=o>>0&255}}function K(e,t,n,r,i){for(n=t+n;t<n;){var o=e[t++];r[i++]=o>>16&255,r[i++]=o>>8&255,r[i++]=o>>0&255,r[i++]=o>>24&255}}function Z(e,t,n,r,i){for(n=t+n;t<n;){var o=(a=e[t++])>>16&240|a>>12&15,a=a>>0&240|a>>28&15;r[i++]=o,r[i++]=a}}function X(e,t,n,r,i){for(n=t+n;t<n;){var o=(a=e[t++])>>16&248|a>>13&7,a=a>>5&224|a>>3&31;r[i++]=o,r[i++]=a}}function ee(e,t,n,r,i){for(n=t+n;t<n;){var o=e[t++];r[i++]=o>>0&255,r[i++]=o>>8&255,r[i++]=o>>16&255}}function te(e,t,n,i,o,a){if(0==a)for(n=t+n;t<n;)I(i,((a=e[t++])[0]>>24|a[1]>>8&65280|a[2]<<8&16711680|a[3]<<24)>>>0),o+=32;else r(i,o,e,t,n)}function ne(t,n){e[n][0]=e[t+"0"],e[n][1]=e[t+"1"],e[n][2]=e[t+"2"],e[n][3]=e[t+"3"],e[n][4]=e[t+"4"],e[n][5]=e[t+"5"],e[n][6]=e[t+"6"],e[n][7]=e[t+"7"],e[n][8]=e[t+"8"],e[n][9]=e[t+"9"],e[n][10]=e[t+"10"],e[n][11]=e[t+"11"],e[n][12]=e[t+"12"],e[n][13]=e[t+"13"],e[n][14]=e[t+"0"],e[n][15]=e[t+"0"]}function re(e){return e==Ur||e==Hr||e==Qr||e==Wr}function ie(){this.eb=[],this.size=this.A=this.fb=0}function oe(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ae(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ie,this.f.kb=new oe,this.sd=null}function se(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function le(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ue(e){return alert("todo:WebPSamplerProcessPlane"),e.T}function ce(e,t){var n=e.T,i=t.ba.f.RGBA,o=i.eb,a=i.fb+e.ka*i.A,s=vi[t.ba.S],l=e.y,u=e.O,c=e.f,d=e.N,h=e.ea,p=e.W,f=t.cc,m=t.dc,g=t.Mc,v=t.Nc,y=e.ka,b=e.ka+e.T,_=e.U,w=_+1>>1;for(0==y?s(l,u,null,null,c,d,h,p,c,d,h,p,o,a,null,null,_):(s(t.ec,t.fc,l,u,f,m,g,v,c,d,h,p,o,a-i.A,o,a,_),++n);y+2<b;y+=2)s(l,(u+=2*e.fa)-e.fa,l,u,f=c,m=d,g=h,v=p,c,d+=e.Rc,h,p+=e.Rc,o,(a+=2*i.A)-i.A,o,a,_);return u+=e.fa,e.j+b<e.o?(r(t.ec,t.fc,l,u,_),r(t.cc,t.dc,c,d,w),r(t.Mc,t.Nc,h,p,w),n--):1&b||s(l,u,null,null,c,d,h,p,c,d,h,p,o,a+i.A,null,null,_),n}function de(e,n,r){var i=e.F,o=[e.J];if(null!=i){var a=e.U,s=n.ba.S,l=s==jr||s==Qr;n=n.ba.f.RGBA;var u=[0],c=e.ka;u[0]=e.T,e.Kb&&(0==c?--u[0]:(--c,o[0]-=e.width),e.j+e.ka+e.T==e.o&&(u[0]=e.o-e.j-c));var d=n.eb;e=Pr(i,o[0],e.width,a,u,d,(c=n.fb+c*n.A)+(l?0:3),n.A),t(r==u),e&&re(s)&&xr(d,c,l,a,u,n.A)}return 0}function he(e){var t=e.ma,n=t.ba.S,r=11>n,i=n==Fr||n==qr||n==jr||n==Br||12==n||re(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Ln(t.Oa,e,i?11:12))return 0;if(i&&re(n)&&bn(),e.da)alert("todo:use_scaling");else{if(r){if(t.Ib=ue,e.Kb){if(t.memory=o(e.U+2*(n=e.U+1>>1)),null==t.memory)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=ce,bn()}}else alert("todo:EmitYUV");i&&(t.Jb=de,r&&vn())}if(r&&!Oi){for(e=0;256>e;++e)Ri[e]=89858*(e-128)+ki>>Pi,Ni[e]=-22014*(e-128)+ki,Di[e]=-45773*(e-128),Vi[e]=113618*(e-128)+ki>>Pi;for(e=Ei;e<Ai;++e)Li[e-Ei]=Qe(t=76283*(e-16)+ki>>Pi,255),Fi[e-Ei]=Qe(t+8>>4,15);Oi=1}return 1}function pe(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),0>=r||0>=i?0:(r=n.Ib(e,n),null!=n.Jb&&n.Jb(e,n,r),n.Dc+=r,1)}function fe(e){e.ma.memory=null}function me(e,t,n,r){return 47!=b(e,8)?0:(t[0]=b(e,14)+1,n[0]=b(e,14)+1,r[0]=b(e,1),0!=b(e,3)?0:!e.h)}function ge(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<<n)+b(t,n)+1}function ve(e,t){return 120<t?t-120:1<=(n=((n=Zr[t-1])>>4)*e+(8-(15&n)))?n:1;var n}function ye(e,t,n){var r=C(n),i=e[t+=255&r].g-8;return 0<i&&(S(n,n.u+8),r=C(n),t+=e[t].value,t+=r&(1<<i)-1),S(n,n.u+e[t].g),e[t].value}function be(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(8>=r.g),e.g}function _e(e,n,r){var i=e.xc;return t((n=0==i?0:e.vc[e.md*(r>>i)+(n>>i)])<e.Wb),e.Ya[n]}function we(e,n,i,o){var a=e.ab,s=e.c*n,l=e.C;n=l+n;var u=i,c=o;for(o=e.Ta,i=e.Ua;0<a--;){var d=e.gc[a],h=l,p=n,f=u,m=c,g=(c=o,u=i,d.Ea);switch(t(h<p),t(p<=d.nc),d.hc){case 2:Gn(f,m,(p-h)*g,c,u);break;case 0:var v=h,y=p,b=c,_=u,w=(k=d).Ea;0==v&&(Qn(f,m,null,null,1,b,_),Q(f,m+1,0,0,w-1,b,_+1),m+=w,_+=w,++v);for(var C=1<<k.b,x=C-1,S=F(w,k.b),P=k.K,k=k.w+(v>>k.b)*S;v<y;){var E=P,A=k,I=1;for(Wn(f,m,b,_-w,1,b,_);I<w;){var T=(I&~x)+C;T>w&&(T=w),(0,Zn[E[A++]>>8&15])(f,m+ +I,b,_+I-w,T-I,b,_+I),I=T}m+=w,_+=w,++v&x||(k+=S)}p!=d.nc&&r(c,u-g,c,u+(p-h-1)*g,g);break;case 1:for(g=f,y=m,w=(f=d.Ea)-(_=f&~(b=(m=1<<d.b)-1)),v=F(f,d.b),C=d.K,d=d.w+(h>>d.b)*v;h<p;){for(x=C,S=d,P=new j,k=y+_,E=y+f;y<k;)G(x[S++],P),Xn(P,g,y,m,c,u),y+=m,u+=m;y<E&&(G(x[S++],P),Xn(P,g,y,w,c,u),y+=w,u+=w),++h&b||(d+=v)}break;case 3:if(f==c&&m==u&&0<d.b){for(y=c,f=g=u+(p-h)*g-(_=(p-h)*F(d.Ea,d.b)),m=c,b=u,v=[],_=(w=_)-1;0<=_;--_)v[_]=m[b+_];for(_=w-1;0<=_;--_)y[f+_]=v[_];$n(d,h,p,c,g,c,u)}else $n(d,h,p,f,m,c,u)}u=o,c=i}c!=i&&r(o,i,u,c,s)}function Ce(e,n){var r=e.V,i=e.Ba+e.c*e.C,o=n-e.C;if(t(n<=e.l.o),t(16>=o),0<o){var a=e.l,s=e.Ta,l=e.Ua,u=a.width;if(we(e,o,r,i),o=l=[l],t((r=e.C)<(i=n)),t(a.v<a.va),i>a.o&&(i=a.o),r<a.j){var c=a.j-r;r=a.j,o[0]+=c*u}if(r>=i?r=0:(o[0]+=4*a.v,a.ka=r-a.j,a.U=a.va-a.v,a.T=i-r,r=1),r){if(l=l[0],11>(r=e.ca).S){var d=r.f.RGBA,h=(i=r.S,o=a.U,a=a.T,c=d.eb,d.A),p=a;for(d=d.fb+e.Ma*d.A;0<p--;){var f=s,m=l,g=o,v=c,y=d;switch(i){case Lr:er(f,m,g,v,y);break;case Fr:tr(f,m,g,v,y);break;case Ur:tr(f,m,g,v,y),xr(v,y,0,g,1,0);break;case Mr:ir(f,m,g,v,y);break;case qr:te(f,m,g,v,y,1);break;case Hr:te(f,m,g,v,y,1),xr(v,y,0,g,1,0);break;case jr:te(f,m,g,v,y,0);break;case Qr:te(f,m,g,v,y,0),xr(v,y,1,g,1,0);break;case Br:nr(f,m,g,v,y);break;case Wr:nr(f,m,g,v,y),Sr(v,y,g,1,0);break;case zr:rr(f,m,g,v,y);break;default:t(0)}l+=u,d+=h}e.Ma+=a}else alert("todo:EmitRescaledRowsYUVA");t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function xe(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Se(e,n,r,i,o,a){if(0!=e.Z){var s=e.qd,l=e.rd;for(t(null!=gi[e.Z]);n<r;++n)gi[e.Z](s,l,i,o,i,o,a),s=i,l=o,o+=a;e.qd=s,e.rd=l}}function Pe(e,n){var r=e.l.ma,i=0==r.Z||1==r.Z?e.l.j:e.C;if(i=e.C<i?i:e.C,t(n<=e.l.o),n>i){var o=e.l.width,a=r.ca,s=r.tb+o*i,l=e.V,u=e.Ba+e.c*i,c=e.gc;t(1==e.ab),t(3==c[0].hc),Yn(c[0],i,n,l,u,a,s),Se(r,i,n,a,s,o)}e.C=e.Ma=n}function ke(e,n,r,i,o,a,s){var l=e.$/i,u=e.$%i,c=e.m,d=e.s,h=r+e.$,p=h;o=r+i*o;var f=r+i*a,m=280+d.ua,g=e.Pb?l:16777216,v=0<d.ua?d.Wa:null,y=d.wc,b=h<f?_e(d,u,l):null;t(e.C<a),t(f<=o);var _=!1;e:for(;;){for(;_||h<f;){var w=0;if(l>=g){var k=h-r;t((g=e).Pb),g.wd=g.m,g.xd=k,0<g.s.ua&&D(g.s.Wa,g.s.vb),g=l+ei}if(u&y||(b=_e(d,u,l)),t(null!=b),b.Qb&&(n[h]=b.qb,_=!0),!_)if(P(c),b.jc){k=n;var E=h,A=b.pd[C(w=c)&qn-1];t(b.jc),256>A.g?(S(w,w.u+A.g),k[E]=A.value,w=0):(S(w,w.u+A.g-256),t(256<=A.value),w=A.value),0==w&&(_=!0)}else w=ye(b.G[0],b.H[0],c);if(c.h)break;if(_||256>w){if(!_)if(b.nd)n[h]=(b.qb|w<<8)>>>0;else{if(P(c),_=ye(b.G[1],b.H[1],c),P(c),k=ye(b.G[2],b.H[2],c),E=ye(b.G[3],b.H[3],c),c.h)break;n[h]=(E<<24|_<<16|w<<8|k)>>>0}if(_=!1,++h,++u>=i&&(u=0,++l,null!=s&&l<=a&&!(l%16)&&s(e,l),null!=v))for(;p<h;)w=n[p++],v.X[(506832829*w&4294967295)>>>v.Mb]=w}else if(280>w){if(w=ge(w-256,c),k=ye(b.G[4],b.H[4],c),P(c),k=ve(i,k=ge(k,c)),c.h)break;if(h-r<k||o-h<w)break e;for(E=0;E<w;++E)n[h+E]=n[h+E-k];for(h+=w,u+=w;u>=i;)u-=i,++l,null!=s&&l<=a&&!(l%16)&&s(e,l);if(t(h<=o),u&y&&(b=_e(d,u,l)),null!=v)for(;p<h;)w=n[p++],v.X[(506832829*w&4294967295)>>>v.Mb]=w}else{if(!(w<m))break e;for(_=w-280,t(null!=v);p<h;)w=n[p++],v.X[(506832829*w&4294967295)>>>v.Mb]=w;w=h,t(!(_>>>(k=v).Xa)),n[w]=k.X[_],_=!0}_||t(c.h==x(c))}if(e.Pb&&c.h&&h<o)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&D(e.s.vb,e.s.Wa);else{if(c.h)break e;null!=s&&s(e,l>a?a:l),e.a=0,e.$=h-r}return 1}return e.a=3,0}function Ee(e){t(null!=e),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;null!=n&&(n.X=null),e.vb=null,t(null!=e)}function Ae(){var t=new sn;return null==t?null:(t.a=0,t.xb=mi,ne("Predictor","VP8LPredictors"),ne("Predictor","VP8LPredictors_C"),ne("PredictorAdd","VP8LPredictorsAdd"),ne("PredictorAdd","VP8LPredictorsAdd_C"),Gn=W,Xn=$,er=Y,tr=K,nr=Z,rr=X,ir=ee,e.VP8LMapColor32b=Jn,e.VP8LMapColor8b=Kn,t)}function Ie(e,n,r,s,l){var u=1,h=[e],f=[n],m=s.m,g=s.s,v=null,y=0;e:for(;;){if(r)for(;u&&b(m,1);){var _=h,w=f,x=s,k=1,E=x.m,A=x.gc[x.ab],I=b(E,2);if(x.Oc&1<<I)u=0;else{switch(x.Oc|=1<<I,A.hc=I,A.Ea=_[0],A.nc=w[0],A.K=[null],++x.ab,t(4>=x.ab),I){case 0:case 1:A.b=b(E,3)+2,k=Ie(F(A.Ea,A.b),F(A.nc,A.b),0,x,A.K),A.K=A.K[0];break;case 3:var T,O=b(E,8)+1,R=16<O?0:4<O?1:2<O?2:3;if(_[0]=F(A.Ea,R),A.b=R,T=k=Ie(O,1,0,x,A.K)){var D,N=O,L=A,q=1<<(8>>L.b),j=o(q);if(null==j)T=0;else{var B=L.K[0],z=L.w;for(j[0]=L.K[0][0],D=1;D<1*N;++D)j[D]=M(B[z+D],j[D-1]);for(;D<4*q;++D)j[D]=0;L.K[0]=null,L.K[0]=j,T=1}}k=T;break;case 2:break;default:t(0)}u=k}}if(h=h[0],f=f[0],u&&b(m,1)&&!(u=1<=(y=b(m,4))&&11>=y)){s.a=3;break e}var U;if(U=u)t:{var H,Q,W,G=s,$=h,J=f,Y=y,K=r,Z=G.m,X=G.s,ee=[null],te=1,ne=0,re=Xr[Y];n:for(;;){if(K&&b(Z,1)){var ie=b(Z,3)+2,oe=F($,ie),ae=F(J,ie),se=oe*ae;if(!Ie(oe,ae,0,G,ee))break n;for(ee=ee[0],X.xc=ie,H=0;H<se;++H){var le=ee[H]>>8&65535;ee[H]=le,le>=te&&(te=le+1)}}if(Z.h)break n;for(Q=0;5>Q;++Q){var ue=Jr[Q];!Q&&0<Y&&(ue+=1<<Y),ne<ue&&(ne=ue)}var ce=a(te*re,d),de=te,he=a(de,p);if(null==he)var pe=null;else t(65536>=de),pe=he;var fe=o(ne);if(null==pe||null==fe||null==ce){G.a=1;break n}var me=ce;for(H=W=0;H<te;++H){var ge=pe[H],ve=ge.G,ye=ge.H,_e=0,we=1,Ce=0;for(Q=0;5>Q;++Q){ue=Jr[Q],ve[Q]=me,ye[Q]=W,!Q&&0<Y&&(ue+=1<<Y);r:{var xe,Se=ue,Pe=G,Ae=fe,Te=me,Oe=W,Re=0,Ve=Pe.m,De=b(Ve,1);if(i(Ae,0,0,Se),De){var Ne=b(Ve,1)+1,Le=b(Ve,1),Fe=b(Ve,0==Le?1:8);Ae[Fe]=1,2==Ne&&(Ae[Fe=b(Ve,8)]=1);var Me=1}else{var qe=o(19),je=b(Ve,4)+4;if(19<je){Pe.a=3;var Be=0;break r}for(xe=0;xe<je;++xe)qe[Kr[xe]]=b(Ve,3);var ze=void 0,Ue=void 0,He=Pe,Qe=qe,We=Se,Ge=Ae,$e=0,Je=He.m,Ye=8,Ke=a(128,d);i:for(;c(Ke,0,7,Qe,19);){if(b(Je,1)){var Ze=2+2*b(Je,3);if((ze=2+b(Je,Ze))>We)break i}else ze=We;for(Ue=0;Ue<We&&ze--;){P(Je);var Xe=Ke[0+(127&C(Je))];S(Je,Je.u+Xe.g);var et=Xe.value;if(16>et)Ge[Ue++]=et,0!=et&&(Ye=et);else{var tt=16==et,nt=et-16,rt=$r[nt],it=b(Je,Gr[nt])+rt;if(Ue+it>We)break i;for(var ot=tt?Ye:0;0<it--;)Ge[Ue++]=ot}}$e=1;break i}$e||(He.a=3),Me=$e}(Me=Me&&!Ve.h)&&(Re=c(Te,Oe,8,Ae,Se)),Me&&0!=Re?Be=Re:(Pe.a=3,Be=0)}if(0==Be)break n;if(we&&1==Yr[Q]&&(we=0==me[W].g),_e+=me[W].g,W+=Be,3>=Q){var at,st=fe[0];for(at=1;at<ue;++at)fe[at]>st&&(st=fe[at]);Ce+=st}}if(ge.nd=we,ge.Qb=0,we&&(ge.qb=(ve[3][ye[3]+0].value<<24|ve[1][ye[1]+0].value<<16|ve[2][ye[2]+0].value)>>>0,0==_e&&256>ve[0][ye[0]+0].value&&(ge.Qb=1,ge.qb+=ve[0][ye[0]+0].value<<8)),ge.jc=!ge.Qb&&6>Ce,ge.jc){var lt,ut=ge;for(lt=0;lt<qn;++lt){var ct=lt,dt=ut.pd[ct],ht=ut.G[0][ut.H[0]+ct];256<=ht.value?(dt.g=ht.g+256,dt.value=ht.value):(dt.g=0,dt.value=0,ct>>=be(ht,8,dt),ct>>=be(ut.G[1][ut.H[1]+ct],16,dt),ct>>=be(ut.G[2][ut.H[2]+ct],0,dt),be(ut.G[3][ut.H[3]+ct],24,dt))}}}X.vc=ee,X.Wb=te,X.Ya=pe,X.yc=ce,U=1;break t}U=0}if(!(u=U)){s.a=3;break e}if(0<y){if(g.ua=1<<y,!V(g.Wa,y)){s.a=1,u=0;break e}}else g.ua=0;var pt=s,ft=h,mt=f,gt=pt.s,vt=gt.xc;if(pt.c=ft,pt.i=mt,gt.md=F(ft,vt),gt.wc=0==vt?-1:(1<<vt)-1,r){s.xb=fi;break e}if(null==(v=o(h*f))){s.a=1,u=0;break e}u=(u=ke(s,v,0,h,f,f,null))&&!m.h;break e}return u?(null!=l?l[0]=v:(t(null==v),t(r)),s.$=0,r||Ee(g)):Ee(g),u}function Te(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=o(i),null==e.V?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Oe(e,n){var r=e.C,i=n-r,o=e.V,a=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,l=e.l.ma,u=e.l.width,c=u*s,d=l.ca,h=l.tb+u*r,p=e.Ta,f=e.Ua;we(e,s,o,a),kr(p,f,d,h,c),Se(l,r,r+s,d,h,u),i-=s,o+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function Re(){this.ub=this.yd=this.td=this.Rb=0}function Ve(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function De(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Ne(){this.Yb=function(){var e=[];return function e(t,n,r){for(var i=r[n],o=0;o<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));o++)e(t[o],n+1,r)}(e,0,[3,11]),e}()}function Le(){this.jb=o(3),this.Wc=s([4,8],Ne),this.Xc=s([4,17],Ne)}function Fe(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function Me(){this.ld=this.La=this.dd=this.tc=0}function qe(){this.Na=this.la=0}function je(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Be(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ze(){this.uc=this.M=this.Nb=0,this.wa=Array(new Me),this.Y=0,this.ya=Array(new Be),this.aa=0,this.l=new We}function Ue(){this.y=o(16),this.f=o(8),this.ea=o(8)}function He(){this.cb=this.a=0,this.sc="",this.m=new _,this.Od=new Re,this.Kc=new Ve,this.ed=new Fe,this.Qa=new De,this.Ic=this.$c=this.Aa=0,this.D=new ze,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,_),this.ia=0,this.pb=a(4,je),this.Pa=new Le,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ue),this.Hd=0,this.rb=Array(new qe),this.sb=0,this.wa=Array(new Me),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Be),this.L=this.aa=0,this.gd=s([4,2],Me),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Qe(e,t){return 0>e?0:e>t?t:e}function We(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ge(){var e=new He;return null!=e&&(e.a=0,e.sc="OK",e.cb=0,e.Xb=0,ri||(ri=Ke)),e}function $e(e,t,n){return 0==e.a&&(e.a=t,e.sc=n,e.cb=0),0}function Je(e,t,n){return 3<=n&&157==e[t+0]&&1==e[t+1]&&42==e[t+2]}function Ye(e,n){if(null==e)return 0;if(e.a=0,e.sc="OK",null==n)return $e(e,2,"null VP8Io passed to VP8GetHeaders()");var r=n.data,o=n.w,a=n.ha;if(4>a)return $e(e,7,"Truncated header.");var s=r[o+0]|r[o+1]<<8|r[o+2]<<16,l=e.Od;if(l.Rb=!(1&s),l.td=s>>1&7,l.yd=s>>4&1,l.ub=s>>5,3<l.td)return $e(e,3,"Incorrect keyframe parameters.");if(!l.yd)return $e(e,4,"Frame not displayable.");o+=3,a-=3;var u=e.Kc;if(l.Rb){if(7>a)return $e(e,7,"cannot parse picture header");if(!Je(r,o,a))return $e(e,3,"Bad code word");u.c=16383&(r[o+4]<<8|r[o+3]),u.Td=r[o+4]>>6,u.i=16383&(r[o+6]<<8|r[o+5]),u.Ud=r[o+6]>>6,o+=7,a-=7,e.za=u.c+15>>4,e.Ub=u.i+15>>4,n.width=u.c,n.height=u.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((s=e.Pa).jb,0,255,s.jb.length),t(null!=(s=e.Qa)),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(l.ub>a)return $e(e,7,"bad partition length");f(s=e.m,r,o,l.ub),o+=l.ub,a-=l.ub,l.Rb&&(u.Ld=E(s),u.Kd=E(s)),u=e.Qa;var c,d=e.Pa;if(t(null!=s),t(null!=u),u.Cb=E(s),u.Cb){if(u.Bb=E(s),E(s)){for(u.Fb=E(s),c=0;4>c;++c)u.Zb[c]=E(s)?g(s,7):0;for(c=0;4>c;++c)u.Lb[c]=E(s)?g(s,6):0}if(u.Bb)for(c=0;3>c;++c)d.jb[c]=E(s)?m(s,8):255}else u.Bb=0;if(s.Ka)return $e(e,3,"cannot parse segment header");if((u=e.ed).zd=E(s),u.Tb=m(s,6),u.wb=m(s,3),u.Pc=E(s),u.Pc&&E(s)){for(d=0;4>d;++d)E(s)&&(u.vd[d]=g(s,6));for(d=0;4>d;++d)E(s)&&(u.od[d]=g(s,6))}if(e.L=0==u.Tb?0:u.zd?1:2,s.Ka)return $e(e,3,"cannot parse filter header");var h=a;if(a=c=o,o=c+h,u=h,e.Xb=(1<<m(e.m,2))-1,h<3*(d=e.Xb))r=7;else{for(c+=3*d,u-=3*d,h=0;h<d;++h){var p=r[a+0]|r[a+1]<<8|r[a+2]<<16;p>u&&(p=u),f(e.Jc[+h],r,c,p),c+=p,u-=p,a+=3}f(e.Jc[+d],r,c,u),r=c<o?0:5}if(0!=r)return $e(e,r,"cannot parse partitions");for(r=m(c=e.m,7),a=E(c)?g(c,4):0,o=E(c)?g(c,4):0,u=E(c)?g(c,4):0,d=E(c)?g(c,4):0,c=E(c)?g(c,4):0,h=e.Qa,p=0;4>p;++p){if(h.Cb){var v=h.Zb[p];h.Fb||(v+=r)}else{if(0<p){e.pb[p]=e.pb[0];continue}v=r}var y=e.pb[p];y.Sc[0]=ti[Qe(v+a,127)],y.Sc[1]=ni[Qe(v+0,127)],y.Eb[0]=2*ti[Qe(v+o,127)],y.Eb[1]=101581*ni[Qe(v+u,127)]>>16,8>y.Eb[1]&&(y.Eb[1]=8),y.Qc[0]=ti[Qe(v+d,117)],y.Qc[1]=ni[Qe(v+c,127)],y.lc=v+c}if(!l.Rb)return $e(e,4,"Not a key frame.");for(E(s),l=e.Pa,r=0;4>r;++r){for(a=0;8>a;++a)for(o=0;3>o;++o)for(u=0;11>u;++u)d=A(s,ui[r][a][o][u])?m(s,8):si[r][a][o][u],l.Wc[r][a].Yb[o][u]=d;for(a=0;17>a;++a)l.Xc[r][a]=l.Wc[r][ci[a]]}return e.kc=E(s),e.kc&&(e.Bd=m(s,8)),e.cb=1}function Ke(e,t,n,r,i,o,a){var s=t[i].Yb[n];for(n=0;16>i;++i){if(!A(e,s[n+0]))return i;for(;!A(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,16==i)return 16;var l=t[i+1].Yb;if(A(e,s[n+2])){var u=e,c=0;if(A(u,(h=s)[(d=n)+3]))if(A(u,h[d+6])){for(s=0,d=2*(c=A(u,h[d+8]))+(h=A(u,h[d+9+c])),c=0,h=ii[d];h[s];++s)c+=c+A(u,h[s]);c+=3+(8<<d)}else A(u,h[d+7])?(c=7+2*A(u,165),c+=A(u,145)):c=5+A(u,159);else c=A(u,h[d+4])?3+A(u,h[d+5]):2;s=l[2]}else c=1,s=l[1];l=a+oi[i],0>(u=e).b&&k(u);var d,h=u.b,p=(d=u.Ca>>1)-(u.I>>h)>>31;--u.b,u.Ca+=p,u.Ca|=1,u.I-=(d+1&p)<<h,o[l]=((c^p)-p)*r[(0<i)+0]}return 16}function Ze(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function Xe(e,n){if(null==e)return 0;if(null==n)return $e(e,2,"NULL VP8Io parameter in VP8Decode().");if(!e.cb&&!Ye(e,n))return 0;if(t(e.cb),null==n.ac||n.ac(n)){n.ob&&(e.L=0);var s=qi[e.L];if(2==e.L?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var l=e.ed;for(s=0;4>s;++s){var u;if(e.Qa.Cb){var c=e.Qa.Lb[s];e.Qa.Fb||(c+=l.Tb)}else c=l.Tb;for(u=0;1>=u;++u){var d=e.gd[s][u],h=c;if(l.Pc&&(h+=l.vd[0],u&&(h+=l.od[0])),0<(h=0>h?0:63<h?63:h)){var p=h;0<l.wb&&(p=4<l.wb?p>>2:p>>1)>9-l.wb&&(p=9-l.wb),1>p&&(p=1),d.dd=p,d.tc=2*h+p,d.ld=40<=h?2:15<=h?1:0}else d.tc=0;d.La=u}}}s=0}else $e(e,6,"Frame setup failed"),s=e.a;if(s=0==s){if(s){e.$c=0,0<e.Aa||(e.Ic=Bi);e:{l=4*(p=e.za);var f=32*p,m=p+1,g=0<e.L?p*(0<e.Aa?2:1):0,v=(2==e.Aa?2:1)*p;if((d=l+832+(u=3*(16*(s=e.Ic)+qi[e.L])/2*f)+(c=null!=e.Fa&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=d)s=0;else{if(d>e.Vb){if(e.Vb=0,e.Ec=o(d),e.Fc=0,null==e.Ec){s=$e(e,1,"no memory during frame initialization.");break e}e.Vb=d}h=e.Fc,e.Ac=d=e.Ec,e.Bc=h,h+=l,e.Gd=a(f,Ue),e.Hd=0,e.rb=a(m+1,qe),e.sb=1,e.wa=g?a(g,Me):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=p),t(!0),e.oc=d,e.pc=h,h+=832,e.ya=a(v,Be),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,2==e.Aa&&(e.D.aa+=p),e.R=16*p,e.B=8*p,p=(f=qi[e.L])*e.R,f=f/2*e.B,e.sa=d,e.ta=h+p,e.qa=e.sa,e.ra=e.ta+16*s*e.R+f,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+f,e.$c=0,h+=u,e.mb=c?d:null,e.nb=c?h:null,t(h+c<=e.Fc+e.Vb),Ze(e),i(e.Ac,e.Bc,0,l),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Or){for(s=-255;255>=s;++s)Er[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)Ar[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Ir[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)Tr[255+s]=0>s?0:255<s?255:s;Or=1}or=ut,ar=ot,lr=at,ur=st,cr=lt,sr=it,dr=$t,hr=Jt,pr=Zt,fr=Xt,mr=Yt,gr=Kt,vr=en,yr=tn,br=zt,_r=Ut,wr=Ht,Cr=Qt,hi[0]=St,hi[1]=dt,hi[2]=Ct,hi[3]=xt,hi[4]=Pt,hi[5]=Et,hi[6]=kt,hi[7]=At,hi[8]=Tt,hi[9]=It,di[0]=vt,di[1]=pt,di[2]=ft,di[3]=mt,di[4]=yt,di[5]=bt,di[6]=_t,pi[0]=Dt,pi[1]=ht,pi[2]=Ot,pi[3]=Rt,pi[4]=Lt,pi[5]=Nt,pi[6]=Ft,s=1}else s=0}s&&(s=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var a,s=e.Jc[e.M&e.Xb],l=e.m,u=e;for(a=0;a<u.za;++a){var c=l,d=u,h=d.Ac,p=d.Bc+4*a,f=d.zc,m=d.ya[d.aa+a];if(m.$b=d.Qa.Bb?A(c,d.Pa.jb[0])?2+A(c,d.Pa.jb[2]):A(c,d.Pa.jb[1]):0,d.kc&&(m.Ad=A(c,d.Bd)),m.Za=!A(c,145)+0,m.Za){var g=m.Ob,v=0;for(d=0;4>d;++d){var y,b=f[0+d];for(y=0;4>y;++y){for(var _=ai[A(c,(b=li[h[p+y]][b])[0])];0<_;)_=ai[2*_+A(c,b[_])];h[p+y]=b=-_}r(g,v,h,p,4),v+=4,f[0+d]=b}}else b=A(c,156)?A(c,128)?1:3:A(c,163)?2:0,m.Ob[0]=b,i(h,p,b,4),i(f,0,b,4);m.Dd=A(c,142)?A(c,114)?A(c,183)?1:3:2:0}if(u.m.Ka)return $e(e,7,"Premature end-of-partition0 encountered.");for(;e.ja<e.za;++e.ja){if(u=s,c=(l=e).rb[l.sb-1],h=l.rb[l.sb+l.ja],a=l.ya[l.aa+l.ja],p=l.kc?a.Ad:0)c.la=h.la=0,a.Za||(c.Na=h.Na=0),a.Hc=0,a.Gc=0,a.ia=0;else{var w,C;if(c=h,h=u,p=l.Pa.Xc,m=l.pb[(f=l.ya[l.aa+l.ja]).$b],v=l.rb[l.sb-1],b=y=0,i(d=f.ad,g=0,0,384),f.Za)var x=0,S=p[3];else{_=o(16);var P=c.Na+v.Na;if(P=ri(h,p[1],P,m.Eb,0,_,0),c.Na=v.Na=(0<P)+0,1<P)or(_,0,d,g);else{var k=_[0]+3>>3;for(_=0;256>_;_+=16)d[g+_]=k}x=1,S=p[0]}var E=15&c.la,I=15&v.la;for(_=0;4>_;++_){var T=1&I;for(k=C=0;4>k;++k)E=E>>1|(T=(P=ri(h,S,P=T+(1&E),m.Sc,x,d,g))>x)<<7,C=C<<2|(3<P?3:1<P?2:0!=d[g+0]),g+=16;E>>=4,I=I>>1|T<<7,y=(y<<8|C)>>>0}for(S=E,x=I>>4,w=0;4>w;w+=2){for(C=0,E=c.la>>4+w,I=v.la>>4+w,_=0;2>_;++_){for(T=1&I,k=0;2>k;++k)E=E>>1|(T=0<(P=ri(h,p[2],P=T+(1&E),m.Qc,0,d,g)))<<3,C=C<<2|(3<P?3:1<P?2:0!=d[g+0]),g+=16;E>>=2,I=I>>1|T<<5}b|=C<<4*w,S|=E<<4<<w,x|=(240&I)<<w}c.la=S,v.la=x,f.Hc=y,f.Gc=b,f.ia=43690&b?0:m.ia,p=!(y|b)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[a.$b][a.Za],l.wa[l.Y+l.ja].La|=!p),u.Ka)return $e(e,7,"Premature end-of-file encountered.")}if(Ze(e),l=n,u=1,a=(s=e).D,c=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)e:{if(a.M=s.M,a.uc=c,Dn(s,a),u=1,a=(C=s.D).Nb,c=(b=qi[s.L])*s.R,p=s.sa,f=s.ta-c+(_=16*a*s.R),m=s.qa,d=s.ra-(h=b/2*s.B)+(k=8*a*s.B),g=s.Ha,v=s.Ia-h+k,I=0==(E=C.M),y=E>=s.Va-1,2==s.Aa&&Dn(s,C),C.uc)for(T=(P=s).D.M,t(P.D.uc),C=P.yb;C<P.Hb;++C){S=T;var O=(R=(B=P).D).Nb,R=R.wa[R.Y+(x=C)],V=B.sa,D=B.ta+16*O*(w=B.R)+16*x,N=R.dd,L=R.tc;if(0!=L)if(t(3<=L),1==B.L)0<x&&_r(V,D,w,L+4),R.La&&Cr(V,D,w,L),0<S&&br(V,D,w,L+4),R.La&&wr(V,D,w,L);else{var F=B.B,M=B.qa,q=B.ra+8*O*F+8*x,j=B.Ha,B=B.Ia+8*O*F+8*x;O=R.ld,0<x&&(hr(V,D,w,L+4,N,O),fr(M,q,j,B,F,L+4,N,O)),R.La&&(gr(V,D,w,L,N,O),yr(M,q,j,B,F,L,N,O)),0<S&&(dr(V,D,w,L+4,N,O),pr(M,q,j,B,F,L+4,N,O)),R.La&&(mr(V,D,w,L,N,O),vr(M,q,j,B,F,L,N,O))}}if(s.ia&&alert("todo:DitherRow"),null!=l.put){if(C=16*E,E=16*(E+1),I?(l.y=s.sa,l.O=s.ta+_,l.f=s.qa,l.N=s.ra+k,l.ea=s.Ha,l.W=s.Ia+k):(C-=b,l.y=p,l.O=f,l.f=m,l.N=d,l.ea=g,l.W=v),y||(E-=b),E>l.o&&(E=l.o),l.F=null,l.J=null,null!=s.Fa&&0<s.Fa.length&&C<E&&(l.J=hn(s,l,C,E-C),l.F=s.mb,null==l.F&&0==l.F.length)){u=$e(s,3,"Could not decode alpha data.");break e}C<l.j&&(b=l.j-C,C=l.j,t(!(1&b)),l.O+=s.R*b,l.N+=s.B*(b>>1),l.W+=s.B*(b>>1),null!=l.F&&(l.J+=l.width*b)),C<E&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,null!=l.F&&(l.J+=l.v),l.ka=C-l.j,l.U=l.va-l.v,l.T=E-C,u=l.put(l))}a+1!=s.Ic||y||(r(s.sa,s.ta-c,p,f+16*s.R,c),r(s.qa,s.ra-h,m,d+8*s.B,h),r(s.Ha,s.Ia-h,g,v+8*s.B,h))}if(!u)return $e(e,6,"Output aborted.")}return 1}(e,n)),null!=n.bc&&n.bc(n),s&=1}return s?(e.cb=0,s):0}function et(e,t,n,r,i){e[t+n+32*r]=-256&(i=e[t+n+32*r]+(i>>3))?0>i?0:255:i}function tt(e,t,n,r,i,o){et(e,t,0,n,r+i),et(e,t,1,n,r+o),et(e,t,2,n,r-o),et(e,t,3,n,r-i)}function nt(e){return(20091*e>>16)+e}function rt(e,t,n,r){var i,a=0,s=o(16);for(i=0;4>i;++i){var l=e[t+0]+e[t+8],u=e[t+0]-e[t+8],c=(35468*e[t+4]>>16)-nt(e[t+12]),d=nt(e[t+4])+(35468*e[t+12]>>16);s[a+0]=l+d,s[a+1]=u+c,s[a+2]=u-c,s[a+3]=l-d,a+=4,t++}for(i=a=0;4>i;++i)l=(e=s[a+0]+4)+s[a+8],u=e-s[a+8],c=(35468*s[a+4]>>16)-nt(s[a+12]),et(n,r,0,0,l+(d=nt(s[a+4])+(35468*s[a+12]>>16))),et(n,r,1,0,u+c),et(n,r,2,0,u-c),et(n,r,3,0,l-d),a++,r+=32}function it(e,t,n,r){var i=e[t+0]+4,o=35468*e[t+4]>>16,a=nt(e[t+4]),s=35468*e[t+1]>>16;tt(n,r,0,i+a,e=nt(e[t+1]),s),tt(n,r,1,i+o,e,s),tt(n,r,2,i-o,e,s),tt(n,r,3,i-a,e,s)}function ot(e,t,n,r,i){rt(e,t,n,r),i&&rt(e,t+16,n,r+4)}function at(e,t,n,r){ar(e,t+0,n,r,1),ar(e,t+32,n,r+128,1)}function st(e,t,n,r){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)et(n,r,t,i,e)}function lt(e,t,n,r){e[t+0]&&ur(e,t+0,n,r),e[t+16]&&ur(e,t+16,n,r+4),e[t+32]&&ur(e,t+32,n,r+128),e[t+48]&&ur(e,t+48,n,r+128+4)}function ut(e,t,n,r){var i,a=o(16);for(i=0;4>i;++i){var s=e[t+0+i]+e[t+12+i],l=e[t+4+i]+e[t+8+i],u=e[t+4+i]-e[t+8+i],c=e[t+0+i]-e[t+12+i];a[0+i]=s+l,a[8+i]=s-l,a[4+i]=c+u,a[12+i]=c-u}for(i=0;4>i;++i)s=(e=a[0+4*i]+3)+a[3+4*i],u=a[1+4*i]-a[2+4*i],c=e-a[3+4*i],n[r+0]=s+(l=a[1+4*i]+a[2+4*i])>>3,n[r+16]=c+u>>3,n[r+32]=s-l>>3,n[r+48]=c-u>>3,r+=64}function ct(e,t,n){var r,i=t-32,o=Dr,a=255-e[i-1];for(r=0;r<n;++r){var s,l=o,u=a+e[t-1];for(s=0;s<n;++s)e[t+s]=l[u+e[i+s]];t+=32}}function dt(e,t){ct(e,t,4)}function ht(e,t){ct(e,t,8)}function pt(e,t){ct(e,t,16)}function ft(e,t){var n;for(n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function mt(e,t){var n;for(n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function gt(e,t,n){var r;for(r=0;16>r;++r)i(t,n+32*r,e,16)}function vt(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];gt(r>>5,e,t)}function yt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];gt(r>>4,e,t)}function bt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];gt(r>>4,e,t)}function _t(e,t){gt(128,e,t)}function wt(e,t,n){return e+2*t+n+2>>2}function Ct(e,t){var n,i=t-32;for(i=new Uint8Array([wt(e[i-1],e[i+0],e[i+1]),wt(e[i+0],e[i+1],e[i+2]),wt(e[i+1],e[i+2],e[i+3]),wt(e[i+2],e[i+3],e[i+4])]),n=0;4>n;++n)r(e,t+32*n,i,0,i.length)}function xt(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],o=e[t-1+96];I(e,t+0,16843009*wt(e[t-1-32],n,r)),I(e,t+32,16843009*wt(n,r,i)),I(e,t+64,16843009*wt(r,i,o)),I(e,t+96,16843009*wt(i,o,o))}function St(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)i(e,t+32*n,r,4)}function Pt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],o=e[t-1-32],a=e[t+0-32],s=e[t+1-32],l=e[t+2-32],u=e[t+3-32];e[t+0+96]=wt(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=wt(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=wt(o,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=wt(a,o,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=wt(s,a,o),e[t+3+32]=e[t+2+0]=wt(l,s,a),e[t+3+0]=wt(u,l,s)}function kt(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],o=e[t+4-32],a=e[t+5-32],s=e[t+6-32],l=e[t+7-32];e[t+0+0]=wt(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=wt(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=wt(r,i,o),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=wt(i,o,a),e[t+3+32]=e[t+2+64]=e[t+1+96]=wt(o,a,s),e[t+3+64]=e[t+2+96]=wt(a,s,l),e[t+3+96]=wt(s,l,l)}function Et(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],o=e[t-1-32],a=e[t+0-32],s=e[t+1-32],l=e[t+2-32],u=e[t+3-32];e[t+0+0]=e[t+1+64]=o+a+1>>1,e[t+1+0]=e[t+2+64]=a+s+1>>1,e[t+2+0]=e[t+3+64]=s+l+1>>1,e[t+3+0]=l+u+1>>1,e[t+0+96]=wt(i,r,n),e[t+0+64]=wt(r,n,o),e[t+0+32]=e[t+1+96]=wt(n,o,a),e[t+1+32]=e[t+2+96]=wt(o,a,s),e[t+2+32]=e[t+3+96]=wt(a,s,l),e[t+3+32]=wt(s,l,u)}function At(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],o=e[t+3-32],a=e[t+4-32],s=e[t+5-32],l=e[t+6-32],u=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+o+1>>1,e[t+3+0]=e[t+2+64]=o+a+1>>1,e[t+0+32]=wt(n,r,i),e[t+1+32]=e[t+0+96]=wt(r,i,o),e[t+2+32]=e[t+1+96]=wt(i,o,a),e[t+3+32]=e[t+2+96]=wt(o,a,s),e[t+3+64]=wt(a,s,l),e[t+3+96]=wt(s,l,u)}function It(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],o=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+o+1>>1,e[t+1+0]=wt(n,r,i),e[t+3+0]=e[t+1+32]=wt(r,i,o),e[t+3+32]=e[t+1+64]=wt(i,o,o),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=o}function Tt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],o=e[t-1+96],a=e[t-1-32],s=e[t+0-32],l=e[t+1-32],u=e[t+2-32];e[t+0+0]=e[t+2+32]=n+a+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=o+i+1>>1,e[t+3+0]=wt(s,l,u),e[t+2+0]=wt(a,s,l),e[t+1+0]=e[t+3+32]=wt(n,a,s),e[t+1+32]=e[t+3+64]=wt(r,n,a),e[t+1+64]=e[t+3+96]=wt(i,r,n),e[t+1+96]=wt(o,i,r)}function Ot(e,t){var n;for(n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Rt(e,t){var n;for(n=0;8>n;++n)i(e,t,e[t-1],8),t+=32}function Vt(e,t,n){var r;for(r=0;8>r;++r)i(t,n+32*r,e,8)}function Dt(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Vt(r>>4,e,t)}function Nt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Vt(r>>3,e,t)}function Lt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Vt(r>>3,e,t)}function Ft(e,t){Vt(128,e,t)}function Mt(e,t,n){var r=e[t-n],i=e[t+0],o=3*(i-r)+Rr[1020+e[t-2*n]-e[t+n]],a=Vr[112+(o+4>>3)];e[t-n]=Dr[255+r+Vr[112+(o+3>>3)]],e[t+0]=Dr[255+i-a]}function qt(e,t,n,r){return Nr[255+e[t-2*n]-e[t-n]]>r||Nr[255+e[t+n]-e[t+0]]>r}function jt(e,t,n,r){return 4*Nr[255+e[t-n]-e[t+0]]+Nr[255+e[t-2*n]-e[t+n]]<=r}function Bt(e,t,n,r,i){var o=e[t-3*n],a=e[t-2*n],s=e[t-n],l=e[t+0],u=e[t+n],c=e[t+2*n];return 4*Nr[255+s-l]+Nr[255+a-u]>r?0:Nr[255+e[t-4*n]-o]<=i&&Nr[255+o-a]<=i&&Nr[255+a-s]<=i&&Nr[255+e[t+3*n]-c]<=i&&Nr[255+c-u]<=i&&Nr[255+u-l]<=i}function zt(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)jt(e,t+r,n,i)&&Mt(e,t+r,n)}function Ut(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)jt(e,t+r*n,1,i)&&Mt(e,t+r*n,1)}function Ht(e,t,n,r){var i;for(i=3;0<i;--i)zt(e,t+=4*n,n,r)}function Qt(e,t,n,r){var i;for(i=3;0<i;--i)Ut(e,t+=4,n,r)}function Wt(e,t,n,r,i,o,a,s){for(o=2*o+1;0<i--;){if(Bt(e,t,n,o,a))if(qt(e,t,n,s))Mt(e,t,n);else{var l=e,u=t,c=n,d=l[u-2*c],h=l[u-c],p=l[u+0],f=l[u+c],m=l[u+2*c],g=27*(y=Rr[1020+3*(p-h)+Rr[1020+d-f]])+63>>7,v=18*y+63>>7,y=9*y+63>>7;l[u-3*c]=Dr[255+l[u-3*c]+y],l[u-2*c]=Dr[255+d+v],l[u-c]=Dr[255+h+g],l[u+0]=Dr[255+p-g],l[u+c]=Dr[255+f-v],l[u+2*c]=Dr[255+m-y]}t+=r}}function Gt(e,t,n,r,i,o,a,s){for(o=2*o+1;0<i--;){if(Bt(e,t,n,o,a))if(qt(e,t,n,s))Mt(e,t,n);else{var l=e,u=t,c=n,d=l[u-c],h=l[u+0],p=l[u+c],f=Vr[112+(4+(m=3*(h-d))>>3)],m=Vr[112+(m+3>>3)],g=f+1>>1;l[u-2*c]=Dr[255+l[u-2*c]+g],l[u-c]=Dr[255+d+m],l[u+0]=Dr[255+h-f],l[u+c]=Dr[255+p-g]}t+=r}}function $t(e,t,n,r,i,o){Wt(e,t,n,1,16,r,i,o)}function Jt(e,t,n,r,i,o){Wt(e,t,1,n,16,r,i,o)}function Yt(e,t,n,r,i,o){var a;for(a=3;0<a;--a)Gt(e,t+=4*n,n,1,16,r,i,o)}function Kt(e,t,n,r,i,o){var a;for(a=3;0<a;--a)Gt(e,t+=4,1,n,16,r,i,o)}function Zt(e,t,n,r,i,o,a,s){Wt(e,t,i,1,8,o,a,s),Wt(n,r,i,1,8,o,a,s)}function Xt(e,t,n,r,i,o,a,s){Wt(e,t,1,i,8,o,a,s),Wt(n,r,1,i,8,o,a,s)}function en(e,t,n,r,i,o,a,s){Gt(e,t+4*i,i,1,8,o,a,s),Gt(n,r+4*i,i,1,8,o,a,s)}function tn(e,t,n,r,i,o,a,s){Gt(e,t+4,1,i,8,o,a,s),Gt(n,r+4,1,i,8,o,a,s)}function nn(){this.ba=new ae,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new le,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function rn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function on(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function an(){this.ua=0,this.Wa=new N,this.vb=new N,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new p,this.yc=new d}function sn(){this.xb=this.a=0,this.l=new We,this.ca=new ae,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new w,this.Pb=0,this.wd=new w,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new an,this.ab=0,this.gc=a(4,on),this.Oc=0}function ln(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new We,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function un(e,t,n,r,i,o,a){for(e=null==e?0:e[t+0],t=0;t<a;++t)i[o+t]=e+n[r+t]&255,e=i[o+t]}function cn(e,t,n,r,i,o,a){var s;if(null==e)un(null,null,n,r,i,o,a);else for(s=0;s<a;++s)i[o+s]=e[t+s]+n[r+s]&255}function dn(e,t,n,r,i,o,a){if(null==e)un(null,null,n,r,i,o,a);else{var s,l=e[t+0],u=l,c=l;for(s=0;s<a;++s)u=c+(l=e[t+s])-u,c=n[r+s]+(-256&u?0>u?0:255:u)&255,u=l,i[o+s]=c}}function hn(e,n,i,a){var s=n.width,l=n.o;if(t(null!=e&&null!=n),0>i||0>=a||i+a>l)return null;if(!e.Cc){if(null==e.ga){var u;if(e.ga=new ln,(u=null==e.ga)||(u=n.width*n.o,t(0==e.Gb.length),e.Gb=o(u),e.Uc=0,null==e.Gb?u=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,u=1),u=!u),!u){var c=e.Fa,d=e.P,h=e.qc,p=e.mb,f=e.nb,m=d+1,g=h-1,y=(u=e.ga).l;if(t(null!=c&&null!=p&&null!=n),gi[0]=null,gi[1]=un,gi[2]=cn,gi[3]=dn,u.ca=p,u.tb=f,u.c=n.width,u.i=n.height,t(0<u.c&&0<u.i),1>=h)n=0;else if(u.$a=c[d+0]>>0&3,u.Z=c[d+0]>>2&3,u.Lc=c[d+0]>>4&3,d=c[d+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||d)n=0;else if(y.put=pe,y.ac=he,y.bc=fe,y.ma=u,y.width=n.width,y.height=n.height,y.Da=n.Da,y.v=n.v,y.va=n.va,y.j=n.j,y.o=n.o,u.$a)e:{t(1==u.$a),n=Ae();t:for(;;){if(null==n){n=0;break e}if(t(null!=u),u.mc=n,n.c=u.c,n.i=u.i,n.l=u.l,n.l.ma=u,n.l.width=u.c,n.l.height=u.i,n.a=0,v(n.m,c,m,g),!Ie(u.c,u.i,1,n,null))break t;if(1==n.ab&&3==n.gc[0].hc&&xe(n.s)?(u.ic=1,c=n.c*n.i,n.Ta=null,n.Ua=0,n.V=o(c),n.Ba=0,null==n.V?(n.a=1,n=0):n=1):(u.ic=0,n=Te(n,u.c)),!n)break t;n=1;break e}u.mc=null,n=0}else n=g>=u.c*u.i;u=!n}if(u)return null;1!=e.ga.Lc?e.Ga=0:a=l-i}t(null!=e.ga),t(i+a<=l);e:{if(n=(c=e.ga).c,l=c.l.o,0==c.$a){if(m=e.rc,g=e.Vc,y=e.Fa,h=e.mb,p=e.nb+i*n,t((d=e.P+1+i*n)<=e.P+e.qc),0!=c.Z)for(t(null!=gi[c.Z]),u=0;u<a;++u)gi[c.Z](m,g,y,d,h,p,n),m=h,g=p,p+=n,d+=n;else for(u=0;u<a;++u)r(h,p,y,d,n),m=h,g=p,p+=n,d+=n;e.rc=m,e.Vc=g}else{if(t(null!=c.mc),n=i+a,t(null!=(u=c.mc)),t(n<=u.i),u.C>=n)n=1;else if(c.ic||vn(),c.ic){c=u.V,m=u.Ba;var b=u.i,_=(y=1,d=u.$/(g=u.c),h=u.$%g,p=u.m,f=u.s,u.$),w=g*b,C=g*n,S=f.wc,k=_<C?_e(f,h,d):null;t(_<=w),t(n<=b),t(xe(f));t:for(;;){for(;!p.h&&_<C;){if(h&S||(k=_e(f,h,d)),t(null!=k),P(p),256>(b=ye(k.G[0],k.H[0],p)))c[m+_]=b,++_,++h>=g&&(h=0,++d<=n&&!(d%16)&&Pe(u,d));else{if(!(280>b)){y=0;break t}b=ge(b-256,p);var E,A=ye(k.G[4],k.H[4],p);if(P(p),!(_>=(A=ve(g,A=ge(A,p)))&&w-_>=b)){y=0;break t}for(E=0;E<b;++E)c[m+_+E]=c[m+_+E-A];for(_+=b,h+=b;h>=g;)h-=g,++d<=n&&!(d%16)&&Pe(u,d);_<C&&h&S&&(k=_e(f,h,d))}t(p.h==x(p))}Pe(u,d>n?n:d);break t}!y||p.h&&_<w?(y=0,u.a=p.h?5:3):u.$=_,n=y}else n=ke(u,u.V,u.Ba,u.c,u.i,n,Oe);if(!n){a=0;break e}}i+a>=l&&(e.Cc=1),a=1}if(!a)return null;if(e.Cc&&(null!=(a=e.ga)&&(a.mc=null),e.ga=null,0<e.Ga))return alert("todo:WebPDequantizeLevels"),null}return e.nb+i*s}function pn(e,t,n,r,i,o){for(;0<i--;){var a,s=e,l=t+(n?1:0),u=e,c=t+(n?0:3);for(a=0;a<r;++a){var d=u[c+4*a];255!=d&&(s[l+4*a+0]=s[l+4*a+0]*(d*=32897)>>23,s[l+4*a+1]=s[l+4*a+1]*d>>23,s[l+4*a+2]=s[l+4*a+2]*d>>23)}t+=o}}function fn(e,t,n,r,i){for(;0<r--;){var o;for(o=0;o<n;++o){var a=e[t+2*o+0],s=15&(u=e[t+2*o+1]),l=4369*s,u=(240&u|u>>4)*l>>16;e[t+2*o+0]=(240&a|a>>4)*l>>16&240|(15&a|a<<4)*l>>16>>4&15,e[t+2*o+1]=240&u|s}t+=i}}function mn(e,t,n,r,i,o,a,s){var l,u,c=255;for(u=0;u<i;++u){for(l=0;l<r;++l){var d=e[t+l];o[a+4*l]=d,c&=d}t+=n,a+=s}return 255!=c}function gn(e,t,n,r,i){var o;for(o=0;o<i;++o)n[r+o]=e[t+o]>>8}function vn(){xr=pn,Sr=fn,Pr=mn,kr=gn}function yn(n,r,i){e[n]=function(e,n,o,a,s,l,u,c,d,h,p,f,m,g,v,y,b){var _,w=b-1>>1,C=s[l+0]|u[c+0]<<16,x=d[h+0]|p[f+0]<<16;t(null!=e);var S=3*C+x+131074>>2;for(r(e[n+0],255&S,S>>16,m,g),null!=o&&r(o[a+0],255&(S=3*x+C+131074>>2),S>>16,v,y),_=1;_<=w;++_){var P=s[l+_]|u[c+_]<<16,k=d[h+_]|p[f+_]<<16,E=C+P+x+k+524296,A=E+2*(P+x)>>3;S=A+C>>1,C=(E=E+2*(C+k)>>3)+P>>1,r(e[n+2*_-1],255&S,S>>16,m,g+(2*_-1)*i),r(e[n+2*_-0],255&C,C>>16,m,g+(2*_-0)*i),null!=o&&(C=A+k>>1,r(o[a+2*_-1],255&(S=E+x>>1),S>>16,v,y+(2*_-1)*i),r(o[a+2*_+0],255&C,C>>16,v,y+(2*_+0)*i)),C=P,x=k}1&b||(r(e[n+b-1],255&(S=3*C+x+131074>>2),S>>16,m,g+(b-1)*i),null!=o&&r(o[a+b-1],255&(S=3*x+C+131074>>2),S>>16,v,y+(b-1)*i))}}function bn(){vi[Lr]=yi,vi[Fr]=_i,vi[Mr]=bi,vi[qr]=wi,vi[jr]=Ci,vi[Br]=xi,vi[zr]=Si,vi[Ur]=_i,vi[Hr]=wi,vi[Qr]=Ci,vi[Wr]=xi}function _n(e){return e&~Ti?0>e?0:255:e>>Ii}function wn(e,t){return _n((19077*e>>8)+(26149*t>>8)-14234)}function Cn(e,t,n){return _n((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function xn(e,t){return _n((19077*e>>8)+(33050*t>>8)-17685)}function Sn(e,t,n,r,i){r[i+0]=wn(e,n),r[i+1]=Cn(e,t,n),r[i+2]=xn(e,t)}function Pn(e,t,n,r,i){r[i+0]=xn(e,t),r[i+1]=Cn(e,t,n),r[i+2]=wn(e,n)}function kn(e,t,n,r,i){var o=Cn(e,t,n);t=o<<3&224|xn(e,t)>>3,r[i+0]=248&wn(e,n)|o>>5,r[i+1]=t}function En(e,t,n,r,i){var o=240&xn(e,t)|15;r[i+0]=240&wn(e,n)|Cn(e,t,n)>>4,r[i+1]=o}function An(e,t,n,r,i){r[i+0]=255,Sn(e,t,n,r,i+1)}function In(e,t,n,r,i){Pn(e,t,n,r,i),r[i+3]=255}function Tn(e,t,n,r,i){Sn(e,t,n,r,i),r[i+3]=255}function Qe(e,t){return 0>e?0:e>t?t:e}function On(t,n,r){e[t]=function(e,t,i,o,a,s,l,u,c){for(var d=u+(-2&c)*r;u!=d;)n(e[t+0],i[o+0],a[s+0],l,u),n(e[t+1],i[o+0],a[s+0],l,u+r),t+=2,++o,++s,u+=2*r;1&c&&n(e[t+0],i[o+0],a[s+0],l,u)}}function Rn(e,t,n){return 0==n?0==e?0==t?6:5:0==t?4:0:n}function Vn(e,t,n,r,i){switch(e>>>30){case 3:ar(t,n,r,i,0);break;case 2:sr(t,n,r,i);break;case 1:ur(t,n,r,i)}}function Dn(e,t){var n,o,a=t.M,s=t.Nb,l=e.oc,u=e.pc+40,c=e.oc,d=e.pc+584,h=e.oc,p=e.pc+600;for(n=0;16>n;++n)l[u+32*n-1]=129;for(n=0;8>n;++n)c[d+32*n-1]=129,h[p+32*n-1]=129;for(0<a?l[u-1-32]=c[d-1-32]=h[p-1-32]=129:(i(l,u-32-1,127,21),i(c,d-32-1,127,9),i(h,p-32-1,127,9)),o=0;o<e.za;++o){var f=t.ya[t.aa+o];if(0<o){for(n=-1;16>n;++n)r(l,u+32*n-4,l,u+32*n+12,4);for(n=-1;8>n;++n)r(c,d+32*n-4,c,d+32*n+4,4),r(h,p+32*n-4,h,p+32*n+4,4)}var m=e.Gd,g=e.Hd+o,v=f.ad,y=f.Hc;if(0<a&&(r(l,u-32,m[g].y,0,16),r(c,d-32,m[g].f,0,8),r(h,p-32,m[g].ea,0,8)),f.Za){var b=l,_=u-32+16;for(0<a&&(o>=e.za-1?i(b,_,m[g].y[15],4):r(b,_,m[g+1].y,0,4)),n=0;4>n;n++)b[_+128+n]=b[_+256+n]=b[_+384+n]=b[_+0+n];for(n=0;16>n;++n,y<<=2)hi[f.Ob[n]](b=l,_=u+Mi[n]),Vn(y,v,16*+n,b,_)}else if(b=Rn(o,a,f.Ob[0]),di[b](l,u),0!=y)for(n=0;16>n;++n,y<<=2)Vn(y,v,16*+n,l,u+Mi[n]);for(n=f.Gc,b=Rn(o,a,f.Dd),pi[b](c,d),pi[b](h,p),y=v,b=c,_=d,255&(f=n>>0)&&(170&f?lr(y,256,b,_):cr(y,256,b,_)),f=h,y=p,255&(n>>=8)&&(170&n?lr(v,320,f,y):cr(v,320,f,y)),a<e.Ub-1&&(r(m[g].y,0,l,u+480,16),r(m[g].f,0,c,d+224,8),r(m[g].ea,0,h,p+224,8)),m=e.sa,g=e.ta+16*o+16*s*e.R,v=e.qa,f=e.ra+8*o+(n=8*s*e.B),y=e.Ha,b=e.Ia+8*o+n,n=0;16>n;++n)r(m,g+n*e.R,l,u+32*n,16);for(n=0;8>n;++n)r(v,f+n*e.B,c,d+32*n,8),r(y,b+n*e.B,h,p+32*n,8)}}function Nn(e,r,i,o,a,s,l,u,c){var d=[0],h=[0],p=0,f=null!=c?c.kd:0,m=null!=c?c:new rn;if(null==e||12>i)return 7;m.data=e,m.w=r,m.ha=i,r=[r],i=[i],m.gb=[m.gb];e:{var g=r,y=i,b=m.gb;if(t(null!=e),t(null!=y),t(null!=b),b[0]=0,12<=y[0]&&!n(e,g[0],"RIFF")){if(n(e,g[0]+8,"WEBP")){b=3;break e}var _=R(e,g[0]+4);if(12>_||4294967286<_){b=3;break e}if(f&&_>y[0]-8){b=7;break e}b[0]=_,g[0]+=12,y[0]-=12}b=0}if(0!=b)return b;for(_=0<m.gb[0],i=i[0];;){e:{var C=e;y=r,b=i;var x=d,S=h,P=g=[0];if((A=p=[p])[0]=0,8>b[0])b=7;else{if(!n(C,y[0],"VP8X")){if(10!=R(C,y[0]+4)){b=3;break e}if(18>b[0]){b=7;break e}var k=R(C,y[0]+8),E=1+O(C,y[0]+12);if(2147483648<=E*(C=1+O(C,y[0]+15))){b=3;break e}null!=P&&(P[0]=k),null!=x&&(x[0]=E),null!=S&&(S[0]=C),y[0]+=18,b[0]-=18,A[0]=1}b=0}}if(p=p[0],0!=b)return b;if(y=!!(2&(g=g[0])),!_&&p)return 3;if(null!=s&&(s[0]=!!(16&g)),null!=l&&(l[0]=y),null!=u&&(u[0]=0),l=d[0],g=h[0],p&&y&&null==c){b=0;break}if(4>i){b=7;break}if(_&&p||!_&&!p&&!n(e,r[0],"ALPH")){i=[i],m.na=[m.na],m.P=[m.P],m.Sa=[m.Sa];e:{b=r,_=i;var A=m.gb;x=m.na,S=m.P,P=m.Sa,E=22,t(null!=(k=e)),t(null!=_),C=b[0];var I=_[0];for(t(null!=x),t(null!=P),x[0]=null,S[0]=null,P[0]=0;;){if(b[0]=C,_[0]=I,8>I){b=7;break e}var T=R(k,C+4);if(4294967286<T){b=3;break e}var V=8+T+1&-2;if(E+=V,0<A&&E>A){b=3;break e}if(!n(k,C,"VP8 ")||!n(k,C,"VP8L")){b=0;break e}if(I[0]<V){b=7;break e}n(k,C,"ALPH")||(x[0]=k,S[0]=C+8,P[0]=T),C+=V,I-=V}}if(i=i[0],m.na=m.na[0],m.P=m.P[0],m.Sa=m.Sa[0],0!=b)break}i=[i],m.Ja=[m.Ja],m.xa=[m.xa];e:if(A=e,b=r,_=i,x=m.gb[0],S=m.Ja,P=m.xa,k=b[0],C=!n(A,k,"VP8 "),E=!n(A,k,"VP8L"),t(null!=A),t(null!=_),t(null!=S),t(null!=P),8>_[0])b=7;else{if(C||E){if(A=R(A,k+4),12<=x&&A>x-12){b=3;break e}if(f&&A>_[0]-8){b=7;break e}S[0]=A,b[0]+=8,_[0]-=8,P[0]=E}else P[0]=5<=_[0]&&47==A[k+0]&&!(A[k+4]>>5),S[0]=_[0];b=0}if(i=i[0],m.Ja=m.Ja[0],m.xa=m.xa[0],r=r[0],0!=b)break;if(4294967286<m.Ja)return 3;if(null==u||y||(u[0]=m.xa?2:1),l=[l],g=[g],m.xa){if(5>i){b=7;break}u=l,f=g,y=s,null==e||5>i?e=0:5<=i&&47==e[r+0]&&!(e[r+4]>>5)?(_=[0],A=[0],x=[0],v(S=new w,e,r,i),me(S,_,A,x)?(null!=u&&(u[0]=_[0]),null!=f&&(f[0]=A[0]),null!=y&&(y[0]=x[0]),e=1):e=0):e=0}else{if(10>i){b=7;break}u=g,null==e||10>i||!Je(e,r+3,i-3)?e=0:(f=e[r+0]|e[r+1]<<8|e[r+2]<<16,y=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&f||3<(f>>1&7)||!(f>>4&1)||f>>5>=m.Ja||!y||!e?e=0:(l&&(l[0]=y),u&&(u[0]=e),e=1))}if(!e)return 3;if(l=l[0],g=g[0],p&&(d[0]!=l||h[0]!=g))return 3;null!=c&&(c[0]=m,c.offset=r-c.w,t(4294967286>r-c.w),t(c.offset==c.ha-i));break}return 0==b||7==b&&p&&null==c?(null!=s&&(s[0]|=null!=m.na&&0<m.na.length),null!=o&&(o[0]=l),null!=a&&(a[0]=g),0):b}function Ln(e,t,n){var r=t.width,i=t.height,o=0,a=0,s=r,l=i;if(t.Da=null!=e&&0<e.Da,t.Da&&(s=e.cd,l=e.bd,o=e.v,a=e.j,11>n||(o&=-2,a&=-2),0>o||0>a||0>=s||0>=l||o+s>r||a+l>i))return 0;if(t.v=o,t.j=a,t.va=o+s,t.o=a+l,t.U=s,t.T=l,t.da=null!=e&&0<e.da,t.da){if(!L(s,l,n=[e.ib],o=[e.hb]))return 0;t.ib=n[0],t.hb=o[0]}return t.ob=null!=e&&e.ob,t.Kb=null==e||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}function Fn(e){if(null==e)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else(t=e.f.kb).O+=((e=e.height)-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,null!=t.F&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Mn(e,t,n,r){if(null==r||0>=e||0>=t)return 2;if(null!=n){if(n.Da){var i=n.cd,a=n.bd,s=-2&n.v,l=-2&n.j;if(0>s||0>l||0>=i||0>=a||s+i>e||l+a>t)return 2;e=i,t=a}if(n.da){if(!L(e,t,i=[n.ib],a=[n.hb]))return 2;e=i[0],t=a[0]}}r.width=e,r.height=t;e:{var u=r.width,c=r.height;if(e=r.S,0>=u||0>=c||!(e>=Lr&&13>e))e=2;else{if(0>=r.Rd&&null==r.sd){s=a=i=t=0;var d=(l=u*zi[e])*c;if(11>e||(a=(c+1)/2*(t=(u+1)/2),12==e&&(s=(i=u)*c)),null==(c=o(d+2*a+s))){e=1;break e}r.sd=c,11>e?((u=r.f.RGBA).eb=c,u.fb=0,u.A=l,u.size=d):((u=r.f.kb).y=c,u.O=0,u.fa=l,u.Fd=d,u.f=c,u.N=0+d,u.Ab=t,u.Cd=a,u.ea=c,u.W=0+d+a,u.Db=t,u.Ed=a,12==e&&(u.F=c,u.J=0+d+2*a),u.Tc=s,u.lb=i)}if(t=1,a=r.width,s=r.height,(i=r.S)>=Lr&&13>i)if(11>i)e=r.f.RGBA,t&=(l=Math.abs(e.A))*(s-1)+a<=e.size,t&=l>=a*zi[i],t&=null!=e.eb;else{e=r.f.kb,l=(a+1)/2,d=(s+1)/2,u=Math.abs(e.fa),c=Math.abs(e.Ab);var h=Math.abs(e.Db),p=Math.abs(e.lb);t&=u*(s-1)+a<=e.Fd,t&=c*(d-1)+l<=e.Cd,t=(t&=h*(d-1)+l<=e.Ed)&u>=a&c>=l&h>=l,t&=null!=e.y,t&=null!=e.f,t&=null!=e.ea,12==i&&(t&=p>=a,t&=p*(s-1)+a<=e.Tc,t&=null!=e.F)}else t=0;e=t?0:2}}return 0!=e||null!=n&&n.fd&&(e=Fn(r)),e}var qn=64,jn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Bn=24,zn=32,Un=8,Hn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];q("Predictor0","PredictorAdd0"),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return B(B(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return B(e,t[n-1])},e.Predictor7=function(e,t,n){return B(e,t[n+0])},e.Predictor8=function(e,t,n){return B(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return B(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return B(B(e,t[n-1]),B(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=H(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+H(r>>16&255,e>>16&255,t>>16&255)+H(r>>8&255,e>>8&255,t>>8&255)+H(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(z((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|z((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|z((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|z((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(U((e=B(e,t[n+0]))>>24&255,r>>24&255)<<24|U(e>>16&255,r>>16&255)<<16|U(e>>8&255,r>>8&255)<<8|U(e>>0&255,r>>0&255))>>>0};var Qn=e.PredictorAdd0;e.PredictorAdd1=Q,q("Predictor2","PredictorAdd2"),q("Predictor3","PredictorAdd3"),q("Predictor4","PredictorAdd4"),q("Predictor5","PredictorAdd5"),q("Predictor6","PredictorAdd6"),q("Predictor7","PredictorAdd7"),q("Predictor8","PredictorAdd8"),q("Predictor9","PredictorAdd9"),q("Predictor10","PredictorAdd10"),q("Predictor11","PredictorAdd11"),q("Predictor12","PredictorAdd12"),q("Predictor13","PredictorAdd13");var Wn=e.PredictorAdd2;J("ColorIndexInverseTransform","MapARGB","32b",function(e){return e>>8&255},function(e){return e}),J("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(e){return e},function(e){return e>>8&255});var Gn,$n=e.ColorIndexInverseTransform,Jn=e.MapARGB,Yn=e.VP8LColorIndexInverseTransformAlpha,Kn=e.MapAlpha,Zn=e.VP8LPredictorsAdd=[];Zn.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var Xn,er,tr,nr,rr,ir,or,ar,sr,lr,ur,cr,dr,hr,pr,fr,mr,gr,vr,yr,br,_r,wr,Cr,xr,Sr,Pr,kr,Er=o(511),Ar=o(2041),Ir=o(225),Tr=o(767),Or=0,Rr=Ar,Vr=Ir,Dr=Tr,Nr=Er,Lr=0,Fr=1,Mr=2,qr=3,jr=4,Br=5,zr=6,Ur=7,Hr=8,Qr=9,Wr=10,Gr=[2,3,7],$r=[3,3,11],Jr=[280,256,256,256,40],Yr=[0,1,1,1,0],Kr=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zr=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Xr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],ei=8,ti=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],ni=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ri=null,ii=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],oi=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ai=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],si=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],li=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],ui=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ci=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],di=[],hi=[],pi=[],fi=1,mi=2,gi=[],vi=[];yn("UpsampleRgbLinePair",Sn,3),yn("UpsampleBgrLinePair",Pn,3),yn("UpsampleRgbaLinePair",Tn,4),yn("UpsampleBgraLinePair",In,4),yn("UpsampleArgbLinePair",An,4),yn("UpsampleRgba4444LinePair",En,2),yn("UpsampleRgb565LinePair",kn,2);var yi=e.UpsampleRgbLinePair,bi=e.UpsampleBgrLinePair,_i=e.UpsampleRgbaLinePair,wi=e.UpsampleBgraLinePair,Ci=e.UpsampleArgbLinePair,xi=e.UpsampleRgba4444LinePair,Si=e.UpsampleRgb565LinePair,Pi=16,ki=1<<Pi-1,Ei=-227,Ai=482,Ii=6,Ti=(256<<Ii)-1,Oi=0,Ri=o(256),Vi=o(256),Di=o(256),Ni=o(256),Li=o(Ai-Ei),Fi=o(Ai-Ei);On("YuvToRgbRow",Sn,3),On("YuvToBgrRow",Pn,3),On("YuvToRgbaRow",Tn,4),On("YuvToBgraRow",In,4),On("YuvToArgbRow",An,4),On("YuvToRgba4444Row",En,2),On("YuvToRgb565Row",kn,2);var Mi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],qi=[0,2,8],ji=[8,7,6,4,4,2,2,2,1,1,1,1],Bi=1;this.WebPDecodeRGBA=function(e,n,r,i,o){var a=Fr,s=new nn,l=new ae;s.ba=l,l.S=a,l.width=[l.width],l.height=[l.height];var u=l.width,c=l.height,d=new se;if(null==d||null==e)var h=2;else t(null!=d),h=Nn(e,n,r,d.width,d.height,d.Pd,d.Qd,d.format,null);if(0!=h?u=0:(null!=u&&(u[0]=d.width[0]),null!=c&&(c[0]=d.height[0]),u=1),u){l.width=l.width[0],l.height=l.height[0],null!=i&&(i[0]=l.width),null!=o&&(o[0]=l.height);e:{if(i=new We,(o=new rn).data=e,o.w=n,o.ha=r,o.kd=1,n=[0],t(null!=o),(0==(e=Nn(o.data,o.w,o.ha,null,null,null,n,null,o))||7==e)&&n[0]&&(e=4),0==(n=e)){if(t(null!=s),i.data=o.data,i.w=o.w+o.offset,i.ha=o.ha-o.offset,i.put=pe,i.ac=he,i.bc=fe,i.ma=s,o.xa){if(null==(e=Ae())){s=1;break e}if(function(e,n){var r=[0],i=[0],o=[0];t:for(;;){if(null==e)return 0;if(null==n)return e.a=2,0;if(e.l=n,e.a=0,v(e.m,n.data,n.w,n.ha),!me(e.m,r,i,o)){e.a=3;break t}if(e.xb=mi,n.width=r[0],n.height=i[0],!Ie(r[0],i[0],1,e,null))break t;return 1}return t(0!=e.a),0}(e,i)){if(i=0==(n=Mn(i.width,i.height,s.Oa,s.ba))){t:{i=e;n:for(;;){if(null==i){i=0;break t}if(t(null!=i.s.yc),t(null!=i.s.Ya),t(0<i.s.Wb),t(null!=(r=i.l)),t(null!=(o=r.ma)),0!=i.xb){if(i.ca=o.ba,i.tb=o.tb,t(null!=i.ca),!Ln(o.Oa,r,qr)){i.a=2;break n}if(!Te(i,r.width))break n;if(r.da)break n;if((r.da||re(i.ca.S))&&vn(),11>i.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=i.ca.f.kb.F&&vn()),i.Pb&&0<i.s.ua&&null==i.s.vb.X&&!V(i.s.vb,i.s.Wa.Xa)){i.a=1;break n}i.xb=0}if(!ke(i,i.V,i.Ba,i.c,i.i,r.o,Ce))break n;o.Dc=i.Ma,i=1;break t}t(0!=i.a),i=0}i=!i}i&&(n=e.a)}else n=e.a}else{if(null==(e=new Ge)){s=1;break e}if(e.Fa=o.na,e.P=o.P,e.qc=o.Sa,Ye(e,i)){if(0==(n=Mn(i.width,i.height,s.Oa,s.ba))){if(e.Aa=0,r=s.Oa,t(null!=(o=e)),null!=r){if(0<(u=0>(u=r.Md)?0:100<u?255:255*u/100)){for(c=d=0;4>c;++c)12>(h=o.pb[c]).lc&&(h.ia=u*ji[0>h.lc?0:h.lc]>>3),d|=h.ia;d&&(alert("todo:VP8InitRandom"),o.ia=1)}o.Ga=r.Id,100<o.Ga?o.Ga=100:0>o.Ga&&(o.Ga=0)}Xe(e,i)||(n=e.a)}}else n=e.a}0==n&&null!=s.Oa&&s.Oa.fd&&(n=Fn(s.ba))}s=n}a=0!=s?null:11>a?l.f.RGBA.eb:l.f.kb.y}else a=null;return a};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(e,t){for(var n="",r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function c(e,t){return(e[t+0]<<0|e[t+1]<<8|e[t+2]<<16)>>>0}function d(e,t){return(e[t+0]<<0|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new l;var h=[0],p=[0],f=[],m=new l,g=e,v=function(e,t){var n={},r=0,i=!1,o=0,a=0;if(n.frames=[],!function(e,t,n,r){for(var i=0;i<4;i++)if(e[t+i]!="RIFF".charCodeAt(i))return!0;return!1}(e,t)){var s,l;for(d(e,t+=4),t+=8;t<e.length;){var h=u(e,t),p=d(e,t+=4);t+=4;var f=p+(1&p);switch(h){case"VP8 ":case"VP8L":void 0===n.frames[r]&&(n.frames[r]={}),(v=n.frames[r]).src_off=i?a:t-8,v.src_size=o+p+8,r++,i&&(i=!1,o=0,a=0);break;case"VP8X":(v=n.header={}).feature_flags=e[t];var m=t+4;v.canvas_width=1+c(e,m),v.canvas_height=1+c(e,m+=3),m+=3;break;case"ALPH":i=!0,o=f+8,a=t-8;break;case"ANIM":(v=n.header).bgcolor=d(e,t),v.loop_count=(s=e)[(l=m=t+4)+0]<<0|s[l+1]<<8,m+=2;break;case"ANMF":var g,v;(v=n.frames[r]={}).offset_x=2*c(e,t),v.offset_y=2*c(e,t+=3),v.width=1+c(e,t+=3),v.height=1+c(e,t+=3),v.duration=c(e,t+=3),t+=3,g=e[t++],v.dispose=1&g,v.blend=g>>1&1}"ANMF"!=h&&(t+=f)}return n}}(g,0);v.response=g,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,b=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,h=[y.canvas_height],p=[y.canvas_width];for(var _=0;_<b.length&&0!=b[_].blend;_++);}var w=b[0],C=m.WebPDecodeRGBA(g,w.src_off,w.src_size,p,h);w.rgba=C,w.imgwidth=p[0],w.imgheight=h[0];for(var x=0;x<p[0]*h[0]*4;x++)f[x]=C[x];return this.width=p,this.height=h,this.data=f,this}!function(e){var t=function(t,r,l,u){var c=4,d=o;switch(u){case e.image_compression.FAST:c=1,d=i;break;case e.image_compression.MEDIUM:c=6,d=a;break;case e.image_compression.SLOW:c=9,d=s}var h=z(t=n(t,r,l,d),{level:c});return e.__addimage__.arrayBufferToBinaryString(h)},n=function(e,t,n,r){for(var i,o,a,s=e.length/t,l=new Uint8Array(e.length+s),d=u(),h=0;h<s;h+=1){if(i=e.subarray(a=h*t,a+t),r)l.set(r(i,n,o),a+h);else{for(var p,f=d.length,m=[];p<f;p+=1)m[p]=d[p](i,n,o);var g=c(m.concat());l.set(m[g],a+h)}o=i}return l},r=function(e){var t=Array.apply([],e);return t.unshift(0),t},i=function(e,t){var n=[],r=e.length;n[0]=1;for(var i=0;i<r;i+=1)n[i+1]=e[i]-(e[i-t]||0)+256&255;return n},o=function(e,t,n){var r=[],i=e.length;r[0]=2;for(var o=0;o<i;o+=1)r[o+1]=e[o]-(n&&n[o]||0)+256&255;return r},a=function(e,t,n){var r=[],i=e.length;r[0]=3;for(var o=0;o<i;o+=1)r[o+1]=e[o]+256-((e[o-t]||0)+(n&&n[o]||0)>>>1)&255;return r},s=function(e,t,n){var r,i=[],o=e.length;i[0]=4;for(var a=0;a<o;a+=1)r=l(e[a-t]||0,n&&n[a]||0,n&&n[a-t]||0),i[a+1]=e[a]-r+256&255;return i},l=function(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),o=Math.abs(e+t-n-n);return r<=i&&r<=o?e:i<=o?t:n},u=function(){return[r,i,o,a,s]},c=function(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))};e.processPNG=function(n,r,i,o){var a,s,l,u,c,d,h,p,f,m,g,v,y,b,_,w=this.decode.FLATE_DECODE,C="";if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){if(n=(l=new Nt(n)).imgData,s=l.bits,a=l.colorSpace,c=l.colors,-1!==[4,6].indexOf(l.colorType)){if(8===l.bits){f=(p=32==l.pixelBitlength?new Uint32Array(l.decodePixels().buffer):16==l.pixelBitlength?new Uint16Array(l.decodePixels().buffer):new Uint8Array(l.decodePixels().buffer)).length,g=new Uint8Array(f*l.colors),m=new Uint8Array(f);var x,S=l.pixelBitlength-l.bits;for(b=0,_=0;b<f;b++){for(y=p[b],x=0;x<S;)g[_++]=y>>>x&255,x+=l.bits;m[b]=y>>>x&255}}if(16===l.bits){f=(p=new Uint32Array(l.decodePixels().buffer)).length,g=new Uint8Array(f*(32/l.pixelBitlength)*l.colors),m=new Uint8Array(f*(32/l.pixelBitlength)),v=l.colors>1,b=0,_=0;for(var P=0;b<f;)y=p[b++],g[_++]=y>>>0&255,v&&(g[_++]=y>>>16&255,y=p[b++],g[_++]=y>>>0&255),m[P++]=y>>>16&255;s=8}o!==e.image_compression.NONE?(n=t(g,l.width*l.colors,l.colors,o),h=t(m,l.width,1,o)):(n=g,h=m,w=void 0)}if(3===l.colorType&&(a=this.color_spaces.INDEXED,d=l.palette,l.transparency.indexed)){var k=l.transparency.indexed,E=0;for(b=0,f=k.length;b<f;++b)E+=k[b];if((E/=255)==f-1&&-1!==k.indexOf(0))u=[k.indexOf(0)];else if(E!==f){for(p=l.decodePixels(),m=new Uint8Array(p.length),b=0,f=p.length;b<f;b++)m[b]=k[p[b]];h=t(m,l.width,1)}}var A=function(t){var n;switch(t){case e.image_compression.FAST:n=11;break;case e.image_compression.MEDIUM:n=13;break;case e.image_compression.SLOW:n=14;break;default:n=12}return n}(o);return w===this.decode.FLATE_DECODE&&(C="/Predictor "+A+" "),C+="/Colors "+c+" /BitsPerComponent "+s+" /Columns "+l.width,(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(h&&this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),{alias:i,data:n,index:r,filter:w,decodeParameters:C,transparency:u,palette:d,sMask:h,predictor:A,width:l.width,height:l.height,bitsPerComponent:s,colorSpace:a}}}}(Ce.API),function(e){e.processGIF89A=function(t,n,r,i){var o=new Lt(t),a=o.width,s=o.height,l=[];o.decodeAndBlitFrameRGBA(0,l);var u={data:l,width:a,height:s},c=new Mt(100).encode(u,100);return e.processJPEG.call(this,c,n,r,i)},e.processGIF87A=e.processGIF89A}(Ce.API),qt.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},qt.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP;this.data=new Uint8Array(this.width*this.height*4),this[e]()}catch(e){Q.log("bit decode error:"+e)}},qt.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var o=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var l=this.palette[o>>7-s&1];this.data[a+4*s]=l.blue,this.data[a+4*s+1]=l.green,this.data[a+4*s+2]=l.red,this.data[a+4*s+3]=255}0!==n&&(this.pos+=4-n)}},qt.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var o=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+2*i*4,s=15&o,l=this.palette[o>>4];if(this.data[a]=l.blue,this.data[a+1]=l.green,this.data[a+2]=l.red,this.data[a+3]=255,2*i+1>=this.width)break;this.data[a+4]=(l=this.palette[s]).blue,this.data[a+4+1]=l.green,this.data[a+4+2]=l.red,this.data[a+4+3]=255}0!==t&&(this.pos+=4-t)}},qt.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+4*r;if(i<this.palette.length){var a=this.palette[i];this.data[o]=a.red,this.data[o+1]=a.green,this.data[o+2]=a.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}0!==e&&(this.pos+=4-e)}},qt.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(o&t)/t*255|0,s=(o>>5&t)/t*255|0,l=o>>15?255:0,u=r*this.width*4+4*i;this.data[u]=(o>>10&t)/t*255|0,this.data[u+1]=s,this.data[u+2]=a,this.data[u+3]=l}this.pos+=e}},qt.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o<this.width;o++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(a&t)/t*255|0,l=(a>>5&n)/n*255|0,u=i*this.width*4+4*o;this.data[u]=(a>>11)/t*255|0,this.data[u+1]=l,this.data[u+2]=s,this.data[u+3]=255}this.pos+=e}},qt.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;this.data[a]=o,this.data[a+1]=i,this.data[a+2]=r,this.data[a+3]=255}this.pos+=this.width%4}},qt.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=o,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=a}},qt.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var o=new qt(t,!1),a=o.width,s=o.height,l={data:o.getData(),width:a,height:s},u=new Mt(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)}}(Ce.API),jt.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var o=new jt(t,!1),a=o.width,s=o.height,l={data:o.getData(),width:a,height:s},u=new Mt(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)}}(Ce.API),Ce.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,o=new Uint8Array(i/4*3),a=new Uint8Array(i/4),s=0,l=0,u=0;u<i;u+=4){var c=r[u+1],d=r[u+2],h=r[u+3];o[s++]=r[u],o[s++]=c,o[s++]=d,a[l++]=h}var p=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(a),data:p,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Ce.API.setLanguage=function(e){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ot=(Tt=Ce.API).getCharWidthsArray=function(e,t){var n,r,o=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),s=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:o.metadata.Unicode.widths,u=l.fof?l.fof:1,c=t.kerning?t.kerning:o.metadata.Unicode.kerning,d=c.fof?c.fof:1,h=!1!==t.doKerning,p=0,f=e.length,m=0,g=l[0]||u,v=[];for(n=0;n<f;n++)r=e.charCodeAt(n),"function"==typeof o.metadata.widthOfString?v.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(r))+s*(1e3/a)||0)/1e3):(p=h&&"object"===i()(c[r])&&!isNaN(parseInt(c[r][m],10))?c[r][m]/d:0,v.push((l[r]||g)/u+p)),m=r;return v},Rt=Tt.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return Tt.processArabic&&(e=Tt.processArabic(e)),"function"==typeof r.metadata.widthOfString?r.metadata.widthOfString(e,n,i)/n:Ot.apply(this,arguments).reduce(function(e,t){return e+t},0)},Vt=function(e,t,n,r){for(var i=[],o=0,a=e.length,s=0;o!==a&&s+t[o]<n;)s+=t[o],o++;i.push(e.slice(0,o));var l=o;for(s=0;o!==a;)s+t[o]>r&&(i.push(e.slice(l,o)),s=0,l=o),s+=t[o],o++;return l!==o&&i.push(e.slice(l,o)),i},Dt=function(e,t,n){n||(n={});var r,i,o,a,s,l,u=[],c=[u],d=n.textIndent||0,h=0,p=0,f=e.split(" "),m=Ot.apply(this,[" ",n])[0];if(l=-1===n.lineIndent?f[0].length+2:n.lineIndent||0){var g=Array(l).join(" "),v=[];f.map(function(e){(e=e.split(/\s*\n/)).length>1?v=v.concat(e.map(function(e,t){return(t&&e.length?"\n":"")+e})):v.push(e[0])}),f=v,l=Rt.apply(this,[g,n])}for(o=0,a=f.length;o<a;o++){var y=0;if(r=f[o],l&&"\n"==r[0]&&(r=r.substr(1),y=1),d+h+(p=(i=Ot.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||y){if(p>t){for(s=Vt.apply(this,[r,i,t-(d+h),t]),u.push(s.shift()),u=[s.pop()];s.length;)c.push([s.shift()]);p=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[r];c.push(u),d=p+l,h=m}else u.push(r),d+=h+p,h=m}return c.map(l?function(e,t){return(t?g:"")+e.join(" ")}:function(e){return e.join(" ")})},Tt.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle);return t.metadata.Unicode?{widths:t.metadata.Unicode.widths||{0:1},kerning:t.metadata.Unicode.kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var a=1*this.internal.scaleFactor*t/i;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,o.lineIndent=n.lineIndent;var s,l,u=[];for(s=0,l=r.length;s<l;s++)u=u.concat(Dt.apply(this,[r[s],a,o]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",n={},r={},o=0;o<t.length;o++)n[t[o]]="0123456789abcdef"[o],r["0123456789abcdef"[o]]=t[o];var a=function(e){return"0x"+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,o,l,u=["{"];for(var c in e){if(t=e[c],isNaN(parseInt(c,10))?n="'"+c+"'":(c=parseInt(c,10),n=(n=a(c).slice(2)).slice(0,-1)+r[n.slice(-1)]),"number"==typeof t)t<0?(o=a(t).slice(3),l="-"):(o=a(t).slice(2),l=""),o=l+o.slice(0,-1)+r[o.slice(-1)];else{if("object"!==i()(t))throw new Error("Don't know what to do with value type "+i()(t)+".");o=s(t)}u.push(n+o)}return u.push("}"),u.join("")},l=e.__fontmetrics__.uncompress=function(e){if("string"!=typeof e)throw new Error("Invalid argument passed to uncompress.");for(var t,r,i,o,a={},s=1,l=a,u=[],c="",d="",h=e.length-1,p=1;p<h;p+=1)"'"==(o=e[p])?t?(i=t.join(""),t=void 0):t=[]:t?t.push(o):"{"==o?(u.push([l,i]),l={},i=void 0):"}"==o?((r=u.pop())[0][r[1]]=l,i=void 0,l=r[0]):"-"==o?s=-1:void 0===i?n.hasOwnProperty(o)?(c+=n[o],i=parseInt(c,16)*s,s=1,c=""):c+=o:n.hasOwnProperty(o)?(d+=n[o],l[i]=parseInt(d,16)*s,s=1,i=void 0,d=""):d+=o;return a},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},d={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(e){var t=e.font,n=d.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=c.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(Ce.API),function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,o=n.instance;if(!i.isStandardFont){if(void 0===o)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(r=!1===o.existsFileInVFS(i.postScriptName)?o.loadFile(i.postScriptName):o.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(J(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]}(i,r)}}])}(Ce),function(e){function t(){return(U.canvg?Promise.resolve(U.canvg):n.e(8).then(n.bind(null,"DXPr"))).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e})}Ce.API.addSvgAsImage=function(e,n,r,i,o,a,s,l){if(isNaN(n)||isNaN(r))throw Q.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw Q.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=i,u.height=o;var c=u.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,u.width,u.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return t().then(function(t){return t.fromString(c,e,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(e){return e.render(d)}).then(function(){h.addImage(u.toDataURL("image/jpeg",1),n,r,i,o,s,l)})}}(),Ce.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},Ce.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,o,a,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(s),u=[],c=0,d=0,h=0;function p(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var f=l.length;for(h=0;h<f;h+=1)n[l[h]].value=n[l[h]].defaultValue,n[l[h]].explicitSet=!1}if("object"===i()(e))for(o in e)if(a=e[o],p(l,o)&&void 0!==a){if("boolean"===n[o].type&&"boolean"==typeof a)n[o].value=a;else if("name"===n[o].type&&p(n[o].valueSet,a))n[o].value=a;else if("integer"===n[o].type&&Number.isInteger(a))n[o].value=a;else if("array"===n[o].type){for(c=0;c<a.length;c+=1)if(r=!0,1===a[c].length&&"number"==typeof a[c][0])u.push(String(a[c]-1));else if(a[c].length>1){for(d=0;d<a[c].length;d+=1)"number"!=typeof a[c][d]&&(r=!1);!0===r&&u.push([a[c][0]-1,a[c][1]-1].join(" "))}n[o].value="["+u.join(" ")+"]"}else n[o].value=n[o].defaultValue;n[o].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&t.push("name"===n[e].type?"/"+e+" /"+n[e].value:"/"+e+" "+n[e].value);0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},function(e){var t=function(){var e='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',t=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),n=unescape(encodeURIComponent(e)),r=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),i=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),o=unescape(encodeURIComponent("</x:xmpmeta>")),a=n.length+r.length+i.length+t.length+o.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+a+" >>"),this.internal.write("stream"),this.internal.write(t+n+r+i+o),this.internal.write("endstream"),this.internal.write("endobj")},n=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(e,r){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:e,namespaceuri:r||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",t)),this}}(Ce.API),function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=e.length;a<s;++a){if(n=t.metadata.characterToGlyph(e.charCodeAt(a)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(a),-1==r.indexOf(n)&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),"0"==n)return o.join("");n=n.toString(16),o.push(i[4-n.length],n)}return o.join("")},r=function(e){var t,n,r,i,o,a,s;for(o="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",r=[],a=0,s=(n=Object.keys(e).sort(function(e,t){return e-t})).length;a<s;a++)t=n[a],r.length>=100&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),null!=e[t]&&"function"==typeof e[t].toString&&(i=("0000"+e[t].toString(16)).slice(-4),t=("0000"+(+t).toString(16)).slice(-4),r.push("<"+t+"><"+i+">"));return r.length&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),o+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};t.events.push(["putFont",function(t){!function(t){var n=t.font,i=t.out,o=t.newObject,a=t.putStream;if(n.metadata instanceof e.API.TTFFont&&"Identity-H"===n.encoding){for(var s=n.metadata.Unicode.widths,l=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),u="",c=0;c<l.length;c++)u+=String.fromCharCode(l[c]);var d=o();a({data:u,addLength1:!0,objectId:d}),i("endobj");var h=o();a({data:r(n.metadata.toUnicode),addLength1:!0,objectId:h}),i("endobj");var p=o();i("<<"),i("/Type /FontDescriptor"),i("/FontName /"+ge(n.fontName)),i("/FontFile2 "+d+" 0 R"),i("/FontBBox "+e.API.PDFObject.convert(n.metadata.bbox)),i("/Flags "+n.metadata.flags),i("/StemV "+n.metadata.stemV),i("/ItalicAngle "+n.metadata.italicAngle),i("/Ascent "+n.metadata.ascender),i("/Descent "+n.metadata.decender),i("/CapHeight "+n.metadata.capHeight),i(">>"),i("endobj");var f=o();i("<<"),i("/Type /Font"),i("/BaseFont /"+ge(n.fontName)),i("/FontDescriptor "+p+" 0 R"),i("/W "+e.API.PDFObject.convert(s)),i("/CIDToGIDMap /Identity"),i("/DW 1000"),i("/Subtype /CIDFontType2"),i("/CIDSystemInfo"),i("<<"),i("/Supplement 0"),i("/Registry (Adobe)"),i("/Ordering ("+n.encoding+")"),i(">>"),i(">>"),i("endobj"),n.objectNumber=o(),i("<<"),i("/Type /Font"),i("/Subtype /Type0"),i("/ToUnicode "+h+" 0 R"),i("/BaseFont /"+ge(n.fontName)),i("/Encoding /"+n.encoding),i("/DescendantFonts ["+f+" 0 R]"),i(">>"),i("endobj"),n.isAlreadyPutted=!0}}(t)}]),t.events.push(["putFont",function(t){!function(t){var n=t.font,i=t.out,o=t.newObject,a=t.putStream;if(n.metadata instanceof e.API.TTFFont&&"WinAnsiEncoding"===n.encoding){for(var s=n.metadata.rawData,l="",u=0;u<s.length;u++)l+=String.fromCharCode(s[u]);var c=o();a({data:l,addLength1:!0,objectId:c}),i("endobj");var d=o();a({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),i("endobj");var h=o();i("<<"),i("/Descent "+n.metadata.decender),i("/CapHeight "+n.metadata.capHeight),i("/StemV "+n.metadata.stemV),i("/Type /FontDescriptor"),i("/FontFile2 "+c+" 0 R"),i("/Flags 96"),i("/FontBBox "+e.API.PDFObject.convert(n.metadata.bbox)),i("/FontName /"+ge(n.fontName)),i("/ItalicAngle "+n.metadata.italicAngle),i("/Ascent "+n.metadata.ascender),i(">>"),i("endobj"),n.objectNumber=o();for(var p=0;p<n.metadata.hmtx.widths.length;p++)n.metadata.hmtx.widths[p]=parseInt(n.metadata.hmtx.widths[p]*(1e3/n.metadata.head.unitsPerEm));i("<</Subtype/TrueType/Type/Font/ToUnicode "+d+" 0 R/BaseFont/"+ge(n.fontName)+"/FontDescriptor "+h+" 0 R/Encoding/"+n.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(n.metadata.hmtx.widths)+">>"),i("endobj"),n.isAlreadyPutted=!0}}(t)}]);var i=function(e){var t,r=e.text||"",i=e.x,o=e.y,a=e.options||{},s=e.mutex||{},l=s.pdfEscape,u=s.activeFontKey,c=s.fonts,d=u,h="",p=0,f="",m=c[d].encoding;if("Identity-H"!==c[d].encoding)return{text:r,x:i,y:o,options:a,mutex:s};for(f=r,d=u,Array.isArray(r)&&(f=r[0]),p=0;p<f.length;p+=1)c[d].metadata.hasOwnProperty("cmap")&&(t=c[d].metadata.cmap.unicode.codeMap[f[p].charCodeAt(0)]),t||f[p].charCodeAt(0)<256&&c[d].metadata.hasOwnProperty("Unicode")?h+=f[p]:h+="";var g="";return parseInt(d.slice(1))<14||"WinAnsiEncoding"===m?g=l(h,d).split("").map(function(e){return e.charCodeAt(0).toString(16)}).join(""):"Identity-H"===m&&(g=n(h,c[d])),s.isHex=!0,{text:g,x:i,y:o,options:a,mutex:s}};t.events.push(["postProcessText",function(e){var t=e.text||"",n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var o=0;for(o=0;o<t.length;o+=1)Array.isArray(t[o])&&3===t[o].length?n.push([i(Object.assign({},r,{text:t[o][0]})).text,t[o][1],t[o][2]]):n.push(i(Object.assign({},r,{text:t[o]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(Ce),function(e){var t=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]?this.internal.vFS[e]:null}}(Ce.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,o,a,s,l,u=t,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},f=["(",")","(","<",">","<","[","]","[","{","}","{","\xab","\xbb","\xab","\u2039","\u203a","\u2039","\u2045","\u2046","\u2045","\u207d","\u207e","\u207d","\u208d","\u208e","\u208d","\u2264","\u2265","\u2264","\u2329","\u232a","\u2329","\ufe59","\ufe5a","\ufe59","\ufe5b","\ufe5c","\ufe5b","\ufe5d","\ufe5e","\ufe5d","\ufe64","\ufe65","\ufe64"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,v=0;this.__bidiEngine__={};var y=function(e){var t=e.charCodeAt(),n=t>>8,r=p[n];return void 0!==r?u[256*r+(255&t)]:252===n||253===n?"AL":m.test(n)?"L":8===n?"R":"N"},b=function(e){for(var t,n=0;n<e.length;n++){if("L"===(t=y(e.charAt(n))))return!1;if("R"===t)return!0}return!1},_=function(e,t,a,s){var l,u,c,d,h=t[s];switch(h){case"L":case"R":g=!1;break;case"N":case"AN":break;case"EN":g&&(h="AN");break;case"AL":g=!0,h="R";break;case"WS":h="N";break;case"CS":s<1||s+1>=t.length||"EN"!==(l=a[s-1])&&"AN"!==l||"EN"!==(u=t[s+1])&&"AN"!==u?h="N":g&&(u="AN"),h=u===l?u:"N";break;case"ES":h="EN"===(l=s>0?a[s-1]:"B")&&s+1<t.length&&"EN"===t[s+1]?"EN":"N";break;case"ET":if(s>0&&"EN"===a[s-1]){h="EN";break}if(g){h="N";break}for(c=s+1,d=t.length;c<d&&"ET"===t[c];)c++;h=c<d&&"EN"===t[c]?"EN":"N";break;case"NSM":if(i&&!o){for(d=t.length,c=s+1;c<d&&"NSM"===t[c];)c++;if(c<d){var p=e[s];if(l=t[c],(p>=1425&&p<=2303||64286===p)&&("R"===l||"AL"===l)){h="R";break}}}h=s<1||"B"===(l=t[s-1])?"N":a[s-1];break;case"B":g=!1,n=!0,h=v;break;case"S":r=!0,h="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":g=!1;break;case"BN":h="N"}return h},w=function(e,t,n){var r=e.split("");return n&&C(r,n,{hiLevel:v}),r.reverse(),t&&t.reverse(),r.join("")},C=function(e,t,i){var o,a,s,l,u,p=-1,f=e.length,m=0,b=[],w=v?d:c,C=[];for(g=!1,n=!1,r=!1,a=0;a<f;a++)C[a]=y(e[a]);for(s=0;s<f;s++){if(u=m,b[s]=_(e,C,b,s),o=240&(m=w[u][h[b[s]]]),t[s]=l=w[m&=15][5],o>0)if(16===o){for(a=p;a<s;a++)t[a]=1;p=-1}else p=-1;if(w[m][6])-1===p&&(p=s);else if(p>-1){for(a=p;a<s;a++)t[a]=l;p=-1}"B"===C[s]&&(t[s]=0),i.hiLevel|=l}r&&function(e,t,n){for(var r=0;r<n;r++)if("S"===e[r]){t[r]=v;for(var i=r-1;i>=0&&"WS"===e[i];i--)t[i]=v}}(C,t,f)},x=function(e,t,r,i,o){if(!(o.hiLevel<e)){if(1===e&&1===v&&!n)return t.reverse(),void(r&&r.reverse());for(var a,s,l,u,c=t.length,d=0;d<c;){if(i[d]>=e){for(l=d+1;l<c&&i[l]>=e;)l++;for(u=d,s=l-1;u<s;u++,s--)a=t[u],t[u]=t[s],t[s]=a,r&&(a=r[u],r[u]=r[s],r[s]=a);d=l}d++}}},S=function(e,t,n){var r=e.split(""),i={hiLevel:v};return n||(n=[]),C(r,n,i),function(e,t,n){if(0!==n.hiLevel&&l)for(var r,i=0;i<e.length;i++)1===t[i]&&(r=f.indexOf(e[i]))>=0&&(e[i]=f[r+1])}(r,n,i),x(2,r,t,n,i),x(1,r,t,n,i),r.join("")};return this.__bidiEngine__.doBidiReorder=function(e,t,n){if(function(e,t){if(t)for(var n=0;n<e.length;n++)t[n]=n;void 0===o&&(o=b(e)),void 0===s&&(s=b(e))}(e,t),i||!a||s)if(i&&a&&o^s)v=o?1:0,e=w(e,t,n);else if(!i&&a&&s)v=o?1:0,e=S(e,t,n),e=w(e,t);else if(!i||o||a||s){if(i&&!a&&o^s)e=w(e,t),o?(v=0,e=S(e,t,n)):(v=1,e=S(e,t,n),e=w(e,t));else if(i&&o&&!a&&s)v=1,e=S(e,t,n),e=w(e,t);else if(!i&&!a&&o^s){var r=l;o?(v=1,e=S(e,t,n),v=0,l=!1,e=S(e,t,n),l=r):(v=0,e=S(e,t,n),e=w(e,t),v=1,l=!1,e=S(e,t,n),l=r,e=w(e,t))}}else v=0,e=S(e,t,n);else v=o?1:0,e=S(e,t,n);return e},this.__bidiEngine__.setOptions=function(e){e&&(i=e.isInputVisual,a=e.isOutputVisual,o=e.isInputRtl,s=e.isOutputRtl,l=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(e){var t=e.text,r=e.options||{},i=[];if(r.isInputVisual="boolean"!=typeof r.isInputVisual||r.isInputVisual,n.setOptions(r),"[object Array]"===Object.prototype.toString.call(t)){var o=0;for(i=[],o=0;o<t.length;o+=1)"[object Array]"===Object.prototype.toString.call(t[o])?i.push([n.doBidiReorder(t[o][0]),t[o][1],t[o][2]]):i.push([n.doBidiReorder(t[o])]);e.text=i}else e.text=n.doBidiReorder(t);n.setOptions({isInputVisual:!0})}])}(Ce),Ce.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new zt(e),this.contents.pos=4,"ttcf"===t.readString(4))throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new ln(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new Ut(this.contents),this.head=new Wt(this),this.name=new Xt(this),this.cmap=new $t(this),this.toUnicode={},this.hhea=new Jt(this),this.maxp=new en(this),this.hmtx=new tn(this),this.post=new Kt(this),this.os2=new Yt(this),this.loca=new sn(this),this.glyf=new rn(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var e,t,n,r;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var e,t,n,r;for(r=[],e=0,t=(n=this.bbox).length;e<t;e++)r.push(Math.round(n[e]*this.scaleFactor));return r}).call(this),this.stemV=0,this.post.exists?(t=255&(n=this.post.italic_angle),0!=(32768&(e=n>>16))&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+t)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(r=this.familyClass)||2===r||3===r||4===r||5===r||7===r,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(e){var t;return(null!=(t=this.cmap.unicode)?t.codeMap[e]:void 0)||0},e.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,n){var r,i,o,a;for(o=0,i=0,a=(e=""+e).length;0<=a?i<a:i>a;i=0<=a?++i:--i)r=e.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(r))+n*(1e3/t)||0;return o*(t/1e3)},e.prototype.lineHeight=function(e,t){return null==t&&(t=!1),(this.ascender+(t?this.lineGap:0)-this.decender)/1e3*e},e}();var Bt,zt=function(){function e(e){this.data=null!=e?e:[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(e){var t,n,r;for(r=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)r.push(this.writeByte(e.charCodeAt(t)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e,t,n,r,i,o,a,s;return e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*i+65536*o+256*a+s},e.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(e){var t,n,r;for(r=[],t=0,n=e.length;t<n;t++)r.push(this.writeByte(e[t]));return r},e}(),Ut=function(){var e;function t(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:n>r;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var n,r,i,o,a,s,l,u,c,d,h,p;for(p in d=Object.keys(t).length,a=Math.log(2),u=16*Math.floor(Math.log(d)/a),i=Math.floor(u/a),l=16*d-u,(r=new zt).writeInt(this.scalarType),r.writeShort(d),r.writeShort(u),r.writeShort(i),r.writeShort(l),s=r.pos+16*d,o=null,h=[],t)for(c=t[p],r.writeString(p),r.writeInt(e(c)),r.writeInt(s),r.writeInt(c.length),h=h.concat(c),"head"===p&&(o=s),s+=c.length;s%4;)h.push(0),s++;return r.write(h),n=2981146554-e(r.data),r.pos=o+8,r.writeUInt32(n),r.data},e=function(e){var t,n,r,i;for(e=nn.call(e);e.length%4;)e.push(0);for(r=new zt(e),n=0,t=0,i=e.length;t<i;t=t+=4)n+=r.readUInt32();return 4294967295&n},t}(),Ht={}.hasOwnProperty,Qt=function(e,t){for(var n in t)Ht.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};Bt=function(){function e(e){var t;this.file=e,this.exists=!!(t=this.file.directory.tables[this.tag]),t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var Wt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var t;return(t=new zt).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},t}(),Gt=function(){function e(e,t){var n,r,i,o,a,s,l,u,c,d,h,p,f,m,g,v,y;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),c=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(h=e.readUInt16(),d=h/2,e.pos+=6,i=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,f=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),u=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,a=function(){var t,n;for(n=[],s=t=0;0<=r?t<r:t>r;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=g=0,y=i.length;g<y;s=++g)for(m=i[s],n=v=p=f[s];p<=m?v<=m:v>=m;n=p<=m?++v:--v)0===u[s]?o=n+l[s]:0!==(o=a[u[s]/2+(n-p)-(d-s)]||0)&&(o+=l[s]),this.codeMap[n]=65535&o}e.pos=c}return e.encode=function(e,t){var n,r,i,o,a,s,l,u,c,d,h,p,f,m,g,v,y,b,_,w,C,x,S,P,k,E,A,I,T,O,R,V,D,N,L,F,M,q,j,B,z,U,H,Q,W;switch(A=new zt,o=Object.keys(e).sort(function(e,t){return e-t}),t){case"macroman":for(f=0,m=function(){var e=[];for(p=0;p<256;++p)e.push(0);return e}(),v={0:0},i={},I=0,V=o.length;I<V;I++)null==v[U=e[r=o[I]]]&&(v[U]=++f),i[r]={old:e[r],new:v[e[r]]},m[r]=v[e[r]];return A.writeUInt16(1),A.writeUInt16(0),A.writeUInt32(12),A.writeUInt16(0),A.writeUInt16(262),A.writeUInt16(0),A.write(m),{charMap:i,subtable:A.data,maxGlyphID:f+1};case"unicode":for(k=[],c=[],y=0,v={},n={},g=l=null,T=0,D=o.length;T<D;T++)null==v[b=e[r=o[T]]]&&(v[b]=++y),n[r]={old:b,new:v[b]},a=v[b]-r,null!=g&&a===l||(g&&c.push(g),k.push(r),l=a),g=r;for(g&&c.push(g),c.push(65535),k.push(65535),S=2*(x=k.length),C=2*Math.pow(Math.log(x)/Math.LN2,2),d=Math.log(C/2)/Math.LN2,w=2*x-C,s=[],_=[],h=[],p=O=0,N=k.length;O<N;p=++O){if(u=c[p],65535===(P=k[p])){s.push(0),_.push(0);break}if(P-(E=n[P].new)>=32768)for(s.push(0),_.push(2*(h.length+x-p)),r=R=P;P<=u?R<=u:R>=u;r=P<=u?++R:--R)h.push(n[r].new);else s.push(E-P),_.push(0)}for(A.writeUInt16(3),A.writeUInt16(1),A.writeUInt32(12),A.writeUInt16(4),A.writeUInt16(16+8*x+2*h.length),A.writeUInt16(0),A.writeUInt16(S),A.writeUInt16(C),A.writeUInt16(d),A.writeUInt16(w),B=0,L=c.length;B<L;B++)A.writeUInt16(r=c[B]);for(A.writeUInt16(0),z=0,F=k.length;z<F;z++)A.writeUInt16(r=k[z]);for(H=0,M=s.length;H<M;H++)A.writeUInt16(a=s[H]);for(Q=0,q=_.length;Q<q;Q++)A.writeUInt16(_[Q]);for(W=0,j=h.length;W<j;W++)A.writeUInt16(f=h[W]);return{charMap:n,subtable:A.data,maxGlyphID:y+1}}},e}(),$t=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="cmap",t.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t=new Gt(e,this.offset),this.tables.push(t),t.isUnicode&&null==this.unicode&&(this.unicode=t);return!0},t.encode=function(e,t){var n,r;return null==t&&(t="macroman"),n=Gt.encode(e,t),(r=new zt).writeUInt16(0),r.writeUInt16(1),n.table=r.data.concat(n.subtable),n},t}(),Jt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="hhea",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},t}(),Yt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="OS/2",t.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n}(),this.charRange=function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t}(),Kt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="post",t.prototype.parse=function(e){var t,n,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:break;case 131072:var i;for(n=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)t=e.readByte(),r.push(this.names.push(e.readString(t)));return r;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 196608:break;case 262144:return this.map=(function(){var t,n,r;for(r=[],i=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:t>n;i=0<=n?++t:--t)r.push(e.readUInt32());return r}).call(this)}},t}(),Zt=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},Xt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="name",t.prototype.parse=function(e){var t,n,r,i,o,a,s,l,u,c,d;for(e.pos=this.offset,e.readShort(),t=e.readShort(),a=e.readShort(),n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+a+e.readShort()});for(s={},i=u=0,c=n.length;u<c;i=++u)e.pos=(r=n[i]).offset,l=e.readString(r.length),o=new Zt(l,r),null==s[d=r.nameID]&&(s[d]=[]),s[r.nameID].push(o);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(e){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},t}(),en=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t}(),tn=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="hmtx",t.prototype.parse=function(e){var t,n,r,i,o,a;for(e.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;t=0<=o?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i;for(i=[],t=n=0;0<=r?n<r:n>r;t=0<=r?++n:--n)i.push(e.readInt16());return i}(),this.widths=(function(){var e,t,n,r;for(r=[],e=0,t=(n=this.metrics).length;e<t;e++)r.push(n[e].advance);return r}).call(this),n=this.widths[this.widths.length-1],a=[],t=i=0;0<=r?i<r:i>r;t=0<=r?++i:--i)a.push(this.widths.push(n));return a},t.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},t}(),nn=[].slice,rn=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var t,n,r,i,o,a,s,l,u,c;return e in this.cache?this.cache[e]:(t=this.file.contents,n=(i=this.file.loca).indexOf(e),0===(r=i.lengthOf(e))?this.cache[e]=null:(t.pos=this.offset+n,o=(a=new zt(t.read(r))).readShort(),l=a.readShort(),c=a.readShort(),s=a.readShort(),u=a.readShort(),this.cache[e]=-1===o?new an(a,l,c,s,u):new on(a,o,l,c,s,u),this.cache[e]))},t.prototype.encode=function(e,t,n){var r,i,o,a,s;for(o=[],i=[],a=0,s=t.length;a<s;a++)r=e[t[a]],i.push(o.length),r&&(o=o.concat(r.encode(n)));return i.push(o.length),{table:o,offsets:i}},t}(),on=function(){function e(e,t,n,r,i,o){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=o,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),an=function(){function e(e,t,n,r,i){var o,a;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;a=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&a;)o.pos+=1&a?4:2,128&a?o.pos+=8:64&a?o.pos+=4:8&a&&(o.pos+=2)}return e.prototype.encode=function(){var e,t,n;for(t=new zt(nn.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),sn=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Qt(t,Bt),t.prototype.tag="loca",t.prototype.parse=function(e){var t;return e.pos=this.offset,this.offsets=0===this.file.head.indexToLocFormat?(function(){var n,r;for(r=[],t=0,n=this.length;t<n;t+=2)r.push(2*e.readUInt16());return r}).call(this):(function(){var n,r;for(r=[],t=0,n=this.length;t<n;t+=4)r.push(e.readUInt32());return r}).call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},t.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),r=0,i=0,o=0;o<n.length;++o)if(n[o]=r,i<t.length&&t[i]==o){++i,n[o]=r;var a=this.offsets[o+1]-this.offsets[o];a>0&&(r+=a)}for(var s=new Array(4*n.length),l=0;l<n.length;++l)s[4*l+3]=255&n[l],s[4*l+2]=(65280&n[l])>>8,s[4*l+1]=(16711680&n[l])>>16,s[4*l]=(4278190080&n[l])>>24;return s},t}(),ln=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,n,r;for(t in n=this.font.cmap.tables[0].codeMap,e={},r=this.subset)e[t]=n[r[t]];return e},e.prototype.glyphsFor=function(e){var t,n,r,i,o,a,s;for(r={},o=0,a=e.length;o<a;o++)r[i=e[o]]=this.font.glyf.glyphFor(i);for(i in t=[],r)(null!=(n=r[i])?n.compound:void 0)&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in s=this.glyphsFor(t))r[i]=n=s[i];return r},e.prototype.encode=function(e,t){var n,r,i,o,a,s,l,u,c,d,h,p,f,m;for(r in n=$t.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),d={0:0},m=n.charMap)d[(a=m[r]).old]=a.new;for(h in c=n.maxGlyphID,o)h in d||(d[h]=c++);return l=function(e){var t,n;for(t in n={},e)n[e[t]]=t;return n}(d),u=Object.keys(l).sort(function(e,t){return e-t}),p=function(){var e,t,n;for(n=[],e=0,t=u.length;e<t;e++)n.push(l[u[e]]);return n}(),i=this.font.glyf.encode(o,p,d),s=this.font.loca.encode(i.offsets,p),f={cmap:this.font.cmap.raw(),glyf:i.table,loca:s,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(f["OS/2"]=this.font.os2.raw()),this.font.directory.encode(f)},e}();Ce.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join("0")+e).slice(-t)},t.convert=function(n){var r,i;if(Array.isArray(n))return"["+function(){var e,r,i;for(i=[],e=0,r=n.length;e<r;e++)i.push(t.convert(n[e]));return i}().join(" ")+"]";if("string"==typeof n)return"/"+n;if(null!=n?n.isString:void 0)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(n)){for(r in i=["<<"],n)i.push("/"+r+" "+t.convert(n[r]));return i.push(">>"),i.join("\n")}return""+n},t}(),t.default=Ce},kLqA:function(e,t,n){"use strict";t.__esModule=!0;var r=function(){function e(t){if(!t)throw new TypeError("Invalid argument; `value` has no value.");this.value=e.EMPTY,t&&e.isGuid(t)&&(this.value=t)}return e.isGuid=function(t){var n=t.toString();return t&&(t instanceof e||e.validator.test(n))},e.create=function(){return new e([e.gen(2),e.gen(1),e.gen(1),e.gen(1),e.gen(3)].join("-"))},e.createEmpty=function(){return new e("emptyguid")},e.parse=function(t){return new e(t)},e.raw=function(){return[e.gen(2),e.gen(1),e.gen(1),e.gen(1),e.gen(3)].join("-")},e.gen=function(e){for(var t="",n=0;n<e;n++)t+=(65536*(1+Math.random())|0).toString(16).substring(1);return t},e.prototype.equals=function(t){return e.isGuid(t)&&this.value===t.toString()},e.prototype.isEmpty=function(){return this.value===e.EMPTY},e.prototype.toString=function(){return this.value},e.prototype.toJSON=function(){return{value:this.value}},e.validator=new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$","i"),e.EMPTY="00000000-0000-0000-0000-000000000000",e}();t.Guid=r},mHM9:function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,(function(t){return e[t]}).bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/entries/core.ts")}({"./node_modules/process/browser.js":function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(h);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new f(e,t)),1!==u.length||c||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/setimmediate/setImmediate.js":function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,l=1,u={},c=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&f(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(f,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[l]=i,r(l),l++},h.clearImmediate=p}function p(e){delete u[e]}function f(e){if(c)setTimeout(f,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n("./node_modules/webpack/buildin/global.js"),n("./node_modules/process/browser.js"))},"./node_modules/signature_pad/dist/signature_pad.mjs":function(e,t,n){"use strict";function r(e,t,n){this.x=e,this.y=t,this.time=n||(new Date).getTime()}function i(e,t,n,r){this.startPoint=e,this.control1=t,this.control2=n,this.endPoint=r}function o(e,t){var n=this,r=t||{};this.velocityFilterWeight=r.velocityFilterWeight||.7,this.minWidth=r.minWidth||.5,this.maxWidth=r.maxWidth||2.5,this.throttle="throttle"in r?r.throttle:16,this.minDistance="minDistance"in r?r.minDistance:5,this._strokeMoveUpdate=this.throttle?function(e,t,n){var r,i,o,a=null,s=0;n||(n={});var l=function(){s=!1===n.leading?0:Date.now(),a=null,o=e.apply(r,i),a||(r=i=null)};return function(){var u=Date.now();s||!1!==n.leading||(s=u);var c=t-(u-s);return r=this,i=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(l,c)),o}}(o.prototype._strokeUpdate,this.throttle):o.prototype._strokeUpdate,this.dotSize=r.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=r.penColor||"black",this.backgroundColor=r.backgroundColor||"rgba(0,0,0,0)",this.onBegin=r.onBegin,this.onEnd=r.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(e){1===e.which&&(n._mouseButtonDown=!0,n._strokeBegin(e))},this._handleMouseMove=function(e){n._mouseButtonDown&&n._strokeMoveUpdate(e)},this._handleMouseUp=function(e){1===e.which&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(e))},this._handleTouchStart=function(e){1===e.targetTouches.length&&n._strokeBegin(e.changedTouches[0])},this._handleTouchMove=function(e){e.preventDefault(),n._strokeMoveUpdate(e.targetTouches[0])},this._handleTouchEnd=function(e){e.target===n._canvas&&(e.preventDefault(),n._strokeEnd(e))},this.on()}n.r(t),r.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},r.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},r.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time},i.prototype.length=function(){for(var e=0,t=void 0,n=void 0,r=0;r<=10;r+=1){var i=r/10,o=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){var s=o-t,l=a-n;e+=Math.sqrt(s*s+l*l)}t=o,n=a}return e},i.prototype._point=function(e,t,n,r,i){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+i*e*e*e},o.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},o.prototype.fromDataURL=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Image,i=n.ratio||window.devicePixelRatio||1,o=n.width||this._canvas.width/i,a=n.height||this._canvas.height/i;this._reset(),r.src=e,r.onload=function(){t._ctx.drawImage(r,0,0,o,a)},this._isEmpty=!1},o.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this._canvas).toDataURL.apply(t,[e].concat(r))}},o.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},o.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},o.prototype.isEmpty=function(){return this._isEmpty},o.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),"function"==typeof this.onBegin&&this.onBegin(e)},o.prototype._strokeUpdate=function(e){var t=this._createPoint(e.clientX,e.clientY),n=this._data[this._data.length-1],r=n&&n[n.length-1],i=r&&t.distanceTo(r)<this.minDistance;if(!r||!i){var o=this._addPoint(t),a=o.curve,s=o.widths;a&&s&&this._drawCurve(a,s.start,s.end),this._data[this._data.length-1].push({x:t.x,y:t.y,time:t.time,color:this.penColor})}},o.prototype._strokeEnd=function(e){var t=this.points[0];if(!(this.points.length>2)&&t&&this._drawDot(t),t){var n=this._data[this._data.length-1];t.equals(n[n.length-1])||n.push({x:t.x,y:t.y,time:t.time,color:this.penColor})}"function"==typeof this.onEnd&&this.onEnd(e)},o.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},o.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},o.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},o.prototype._createPoint=function(e,t,n){var i=this._canvas.getBoundingClientRect();return new r(e-i.left,t-i.top,n||(new Date).getTime())},o.prototype._addPoint=function(e){var t=this.points,n=void 0;if(t.push(e),t.length>2){3===t.length&&t.unshift(t[0]);var r=(n=this._calculateCurveControlPoints(t[0],t[1],t[2])).c2;n=this._calculateCurveControlPoints(t[1],t[2],t[3]);var o=new i(t[1],r,n.c1,t[2]),a=this._calculateCurveWidths(o);return t.shift(),{curve:o,widths:a}}return{}},o.prototype._calculateCurveControlPoints=function(e,t,n){var i=e.x-t.x,o=e.y-t.y,a=t.x-n.x,s=t.y-n.y,l=(e.x+t.x)/2,u=(e.y+t.y)/2,c=(t.x+n.x)/2,d=(t.y+n.y)/2,h=Math.sqrt(i*i+o*o),p=Math.sqrt(a*a+s*s),f=p/(h+p),m=t.x-(c+(l-c)*f),g=t.y-(d+(u-d)*f);return{c1:new r(l+m,u+g),c2:new r(c+m,d+g)}},o.prototype._calculateCurveWidths=function(e){var t={start:null,end:null},n=this.velocityFilterWeight*e.endPoint.velocityFrom(e.startPoint)+(1-this.velocityFilterWeight)*this._lastVelocity,r=this._strokeWidth(n);return t.start=this._lastWidth,t.end=r,this._lastVelocity=n,this._lastWidth=r,t},o.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},o.prototype._drawPoint=function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1},o.prototype._drawCurve=function(e,t,n){var r=this._ctx,i=n-t,o=Math.floor(e.length());r.beginPath();for(var a=0;a<o;a+=1){var s=a/o,l=s*s,u=l*s,c=1-s,d=c*c,h=d*c,p=h*e.startPoint.x;p+=3*d*s*e.control1.x,p+=3*c*l*e.control2.x;var f=h*e.startPoint.y;f+=3*d*s*e.control1.y,f+=3*c*l*e.control2.y,this._drawPoint(p+=u*e.endPoint.x,f+=u*e.endPoint.y,t+u*i)}r.closePath(),r.fill()},o.prototype._drawDot=function(e){var t=this._ctx,n="function"==typeof this.dotSize?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,n),t.closePath(),t.fill()},o.prototype._fromData=function(e,t,n){for(var i=0;i<e.length;i+=1){var o=e[i];if(o.length>1)for(var a=0;a<o.length;a+=1){var s=o[a],l=new r(s.x,s.y,s.time),u=s.color;if(0===a)this.penColor=u,this._reset(),this._addPoint(l);else if(a!==o.length-1){var c=this._addPoint(l),d=c.curve,h=c.widths;d&&h&&t(d,h,u)}}else this._reset(),n(o[0])}},o.prototype._toSVG=function(){var e=this,t=this._data,n=this._canvas,r=Math.max(window.devicePixelRatio||1,1),i=n.width/r,o=n.height/r,a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"width",n.width),a.setAttributeNS(null,"height",n.height),this._fromData(t,function(e,t,n){var r=document.createElement("path");if(!(isNaN(e.control1.x)||isNaN(e.control1.y)||isNaN(e.control2.x)||isNaN(e.control2.y))){var i="M "+e.startPoint.x.toFixed(3)+","+e.startPoint.y.toFixed(3)+" C "+e.control1.x.toFixed(3)+","+e.control1.y.toFixed(3)+" "+e.control2.x.toFixed(3)+","+e.control2.y.toFixed(3)+" "+e.endPoint.x.toFixed(3)+","+e.endPoint.y.toFixed(3);r.setAttribute("d",i),r.setAttribute("stroke-width",(2.25*t.end).toFixed(3)),r.setAttribute("stroke",n),r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),a.appendChild(r)}},function(t){var n=document.createElement("circle"),r="function"==typeof e.dotSize?e.dotSize():e.dotSize;n.setAttribute("r",r),n.setAttribute("cx",t.x),n.setAttribute("cy",t.y),n.setAttribute("fill",t.color),a.appendChild(n)});var s='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+i+" "+o+'" width="'+i+'" height="'+o+'">',l=a.innerHTML;if(void 0===l){var u=document.createElement("dummy"),c=a.childNodes;u.innerHTML="";for(var d=0;d<c.length;d+=1)u.appendChild(c[d].cloneNode(!0));l=u.innerHTML}return"data:image/svg+xml;base64,"+btoa(s+l+"</svg>")},o.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(e,n){return t._drawCurve(e,n.start,n.end)},function(e){return t._drawDot(e)}),this._data=e},o.prototype.toData=function(){return this._data},t.default=o},"./node_modules/timers-browserify/main.js":function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n("./node_modules/setimmediate/setImmediate.js"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}e.exports=n},"./src/actions/action.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"createDropdownActionModel",function(){return p}),n.d(t,"createDropdownActionModelAdvanced",function(){return f}),n.d(t,"Action",function(){return m}),n.d(t,"ActionDropdownViewModel",function(){return g});var r,i=n("./src/base.ts"),o=n("./src/surveyStrings.ts"),a=n("./src/jsonobject.ts"),s=n("./src/list.ts"),l=n("./src/popup.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=n("./src/actions/container.ts"),d=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};function p(e,t,n){return f(e,t,t,n)}function f(e,t,n,r){var i=new s.ListModel(t.items,function(e){t.onSelectionChanged(e),o.toggleVisibility()},t.allowSelection,t.selectedItem,t.onFilterStringChangedCallback);i.locOwner=r;var o=new l.PopupModel("sv-list",{model:i},null==n?void 0:n.verticalPosition,null==n?void 0:n.horizontalPosition,null==n?void 0:n.showPointer,null==n?void 0:n.isModal,null==n?void 0:n.onCancel,null==n?void 0:n.onApply,null==n?void 0:n.onHide,null==n?void 0:n.onShow,null==n?void 0:n.cssClass,null==n?void 0:n.title);o.displayMode=null==n?void 0:n.displayMode;var a=Object.assign({},e,{component:"sv-action-bar-item-dropdown",popupModel:o,action:function(){e.action&&e.action(),o.toggleVisibility()}}),u=new m(a);return u.data=i,u}var m=function(e){function t(t){var n=e.call(this)||this;if(n.innerItem=t,n.iconSize=24,n.locTitleChanged=function(){n.setPropertyValue("title",n.locTitle.renderedHtml||void 0)},n.locTitle=t?t.locTitle:null,t)for(var r in t)n[r]=t[r];return n.locTitleName&&n.locTitleChanged(),n.locStrChangedInPopupModel(),n}return d(t,e),t.prototype.raiseUpdate=function(){this.updateCallback&&this.updateCallback()},t.prototype.createLocTitle=function(){return this.createLocalizableString("title",this,!0)},Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.locTitleValue},set:function(e){e||this.locTitleValue||(e=this.createLocTitle()),this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleValue=e,this.locTitleValue.onStringChanged.add(this.locTitleChanged),this.locTitleChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitleName",{get:function(){return this.locTitle.localizationName},set:function(e){this.locTitle.localizationName=e},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.locTooltipChanged(),this.locStrChangedInPopupModel()},t.prototype.locStrChangedInPopupModel=function(){if(this.popupModel&&this.popupModel.contentComponentData&&this.popupModel.contentComponentData.model){var e=this.popupModel.contentComponentData.model;Array.isArray(e.actions)&&e.actions.forEach(function(e){e.locStrsChanged&&e.locStrsChanged()})}},t.prototype.locTooltipChanged=function(){this.locTooltipName&&(this.tooltip=o.surveyLocalization.getString(this.locTooltipName,this.locTitle.locale))},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.cssClassesValue||c.defaultActionBarCss},set:function(e){this.cssClassesValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return void 0!==this.enabled&&!this.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitle",{get:function(){return("small"!=this.mode&&(this.showTitle||void 0===this.showTitle)||!this.iconName)&&!!this.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.visible&&"popup"!==this.mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canShrink",{get:function(){return!!this.iconName},enumerable:!1,configurable:!0}),t.prototype.getActionRootCss=function(){return(new u.CssClassBuilder).append("sv-action").append(this.css).append("sv-action--space",this.needSpace).append("sv-action--hidden",!this.isVisible).toString()},t.prototype.getActionBarItemTitleCss=function(){return(new u.CssClassBuilder).append(this.cssClasses.itemTitle).append(this.cssClasses.itemTitleWithIcon,!!this.iconName).toString()},t.prototype.getActionBarItemCss=function(){return(new u.CssClassBuilder).append(this.cssClasses.item).append(this.cssClasses.itemAsIcon,!this.hasTitle).append(this.cssClasses.itemActive,!!this.active).append(this.cssClasses.itemPressed,!!this.pressed).append(this.innerCss).toString()},t.prototype.getLocale=function(){return this.owner?this.owner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.owner?this.owner.getMarkdownHtml(e,t):e},t.prototype.getProcessedText=function(e){return this.owner?this.owner.getProcessedText(e):e},t.prototype.getRenderer=function(e){return this.owner?this.owner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.owner?this.owner.getRendererContext(e):e},h([Object(a.property)()],t.prototype,"id",void 0),h([Object(a.property)()],t.prototype,"iconName",void 0),h([Object(a.property)()],t.prototype,"iconSize",void 0),h([Object(a.property)({defaultValue:!0,onSet:function(e,t){t.raiseUpdate()}})],t.prototype,"visible",void 0),h([Object(a.property)()],t.prototype,"tooltip",void 0),h([Object(a.property)({onSet:function(e,t){t.locTooltipChanged()}})],t.prototype,"locTooltipName",void 0),h([Object(a.property)()],t.prototype,"enabled",void 0),h([Object(a.property)()],t.prototype,"showTitle",void 0),h([Object(a.property)()],t.prototype,"action",void 0),h([Object(a.property)()],t.prototype,"css",void 0),h([Object(a.property)()],t.prototype,"innerCss",void 0),h([Object(a.property)()],t.prototype,"data",void 0),h([Object(a.property)()],t.prototype,"popupModel",void 0),h([Object(a.property)()],t.prototype,"needSeparator",void 0),h([Object(a.property)()],t.prototype,"active",void 0),h([Object(a.property)()],t.prototype,"pressed",void 0),h([Object(a.property)()],t.prototype,"template",void 0),h([Object(a.property)()],t.prototype,"component",void 0),h([Object(a.property)()],t.prototype,"items",void 0),h([Object(a.property)()],t.prototype,"visibleIndex",void 0),h([Object(a.property)({defaultValue:"large"})],t.prototype,"mode",void 0),h([Object(a.property)()],t.prototype,"disableTabStop",void 0),h([Object(a.property)()],t.prototype,"disableShrink",void 0),h([Object(a.property)()],t.prototype,"disableHide",void 0),h([Object(a.property)({defaultValue:!1})],t.prototype,"needSpace",void 0),h([Object(a.property)({onSet:function(e,t){t.locTitleValue.text!==e&&(t.locTitleValue.text=e)}})],t.prototype,"title",void 0),t}(i.Base),g=function(){function e(e){this.item=e,this.funcKey="sv-dropdown-action",this.setupPopupCallbacks()}return e.prototype.setupPopupCallbacks=function(){var e=this,t=this.popupModel=this.item.popupModel;t&&t.registerFunctionOnPropertyValueChanged("isVisible",function(){e.item.pressed=!!t.isVisible},this.funcKey)},e.prototype.removePopupCallbacks=function(){this.popupModel&&this.popupModel.unRegisterFunctionOnPropertyValueChanged("isVisible",this.funcKey)},e.prototype.dispose=function(){this.removePopupCallbacks()},e}()},"./src/actions/adaptive-container.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveActionContainer",function(){return u});var r,i=n("./src/utils/responsivity-manager.ts"),o=n("./src/actions/action.ts"),a=n("./src/actions/container.ts"),s=n("./src/surveyStrings.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(){var n=e.call(this)||this;return n.minVisibleItemsCount=0,n.isResponsivenessDisabled=!1,n.dotsItem=Object(o.createDropdownActionModelAdvanced)({id:"dotsItem-id"+t.ContainerID++,css:"sv-dots",innerCss:"sv-dots__item",iconName:"icon-more",visible:!1,tooltip:s.surveyLocalization.getString("more")},{items:[],onSelectionChanged:function(e){n.hiddenItemSelected(e)},allowSelection:!1}),n}return l(t,e),t.prototype.hideItemsGreaterN=function(e){var t=this.visibleActions.filter(function(e){return!e.disableHide});e=Math.max(e,this.minVisibleItemsCount)-(this.visibleActions.length-t.length);var n=[];t.forEach(function(t){e<=0&&(t.mode="popup",n.push(t.innerItem)),e--}),this.hiddenItemsListModel.setItems(n)},t.prototype.getVisibleItemsCount=function(e){for(var t=this.visibleActions.map(function(e){return e.minDimension}),n=0,r=0;r<t.length;r++)if((n+=t[r])>e)return r;return r},t.prototype.updateItemMode=function(e,t){for(var n=this.visibleActions,r=n.length-1;r>=0;r--)t>e&&!n[r].disableShrink?(t-=n[r].maxDimension-n[r].minDimension,n[r].mode="small"):n[r].mode="large"},Object.defineProperty(t.prototype,"hiddenItemsListModel",{get:function(){return this.dotsItem.data},enumerable:!1,configurable:!0}),t.prototype.hiddenItemSelected=function(e){e&&"function"==typeof e.action&&e.action()},t.prototype.onSet=function(){var t=this;this.actions.forEach(function(e){return e.updateCallback=function(){return t.raiseUpdate(!1)}}),e.prototype.onSet.call(this)},t.prototype.onPush=function(t){var n=this;t.updateCallback=function(){return n.raiseUpdate(!1)},e.prototype.onPush.call(this,t)},t.prototype.getRenderedActions=function(){return 1===this.actions.length&&this.actions[0].iconName?this.actions:this.actions.concat([this.dotsItem])},t.prototype.raiseUpdate=function(t){this.isResponsivenessDisabled||e.prototype.raiseUpdate.call(this,t)},t.prototype.fit=function(e,t){if(!(e<=0)){this.dotsItem.visible=!1;var n=0,r=0;this.visibleActions.forEach(function(e){n+=e.minDimension,r+=e.maxDimension}),e>=r?this.setActionsMode("large"):e<n?(this.setActionsMode("small"),this.hideItemsGreaterN(this.getVisibleItemsCount(e-t)),this.dotsItem.visible=!0):this.updateItemMode(e,r)}},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new i.ResponsivityManager(e,this,".sv-action:not(.sv-dots)>.sv-action__content")},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.prototype.setActionsMode=function(e){this.actions.forEach(function(t){return t.mode=e})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.resetResponsivityManager()},t.ContainerID=1,t}(a.ActionContainer)},"./src/actions/container.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"defaultActionBarCss",function(){return d}),n.d(t,"ActionContainer",function(){return h});var r,i=n("./src/jsonobject.ts"),o=n("./src/base.ts"),a=n("./src/actions/action.ts"),s=n("./src/utils/cssClassBuilder.ts"),l=n("./src/utils/utils.ts"),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},d={root:"sv-action-bar",defaultSizeMode:"sv-action-bar--default-size-mode",smallSizeMode:"sv-action-bar--small-size-mode",item:"sv-action-bar-item",itemActive:"sv-action-bar-item--active",itemPressed:"sv-action-bar-item--pressed",itemIcon:"sv-action-bar-item__icon",itemTitle:"sv-action-bar-item__title",itemTitleWithIcon:"sv-action-bar-item__title--with-icon"},h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sizeMode="default",t}return u(t,e),t.prototype.getMarkdownHtml=function(e,t){return this.locOwner?this.locOwner.getMarkdownHtml(e,t):null},t.prototype.getRenderer=function(e){return this.locOwner?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.locOwner?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getLocale=function(){return this.locOwner?this.locOwner.getLocale():""},t.prototype.getRenderedActions=function(){return this.actions},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.actions.forEach(function(e){return e.locStrsChanged()})},t.prototype.raiseUpdate=function(e){this.isEmpty=!this.actions.some(function(e){return e.visible}),this.updateCallback&&this.updateCallback(e)},t.prototype.onSet=function(){var e=this;this.actions.forEach(function(t){e.setActionCssClasses(t)}),this.raiseUpdate(!0)},t.prototype.onPush=function(e){this.setActionCssClasses(e),e.owner=this,this.raiseUpdate(!0)},t.prototype.onRemove=function(e){e.owner=null,this.raiseUpdate(!0)},t.prototype.setActionCssClasses=function(e){e.cssClasses=this.cssClasses},Object.defineProperty(t.prototype,"hasActions",{get:function(){return(this.actions||[]).length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedActions",{get:function(){return this.getRenderedActions()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleActions",{get:function(){return this.actions.filter(function(e){return!1!==e.visible})},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){var e="small"===this.sizeMode?this.cssClasses.smallSizeMode:this.cssClasses.defaultSizeMode;return(new s.CssClassBuilder).append(this.cssClasses.root+(e?" "+e:"")+(this.containerCss?" "+this.containerCss:"")).append(this.cssClasses.root+"--empty",this.isEmpty).toString()},t.prototype.getDefaultCssClasses=function(){return d},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.cssClassesValue||(this.cssClassesValue=this.getDefaultCssClasses()),this.cssClassesValue},set:function(e){var t=this;this.cssClassesValue={},this.copyCssClasses(this.cssClassesValue,this.getDefaultCssClasses()),Object(l.mergeValues)(e,this.cssClasses),this.actions.forEach(function(e){t.setActionCssClasses(e)})},enumerable:!1,configurable:!0}),t.prototype.createAction=function(e){return e instanceof a.Action?e:new a.Action(e)},t.prototype.addAction=function(e,t){void 0===t&&(t=!0);var n=this.createAction(e);return this.actions.push(n),this.sortItems(),n},t.prototype.sortItems=function(){this.actions=[].concat(this.actions.filter(function(e){return void 0===e.visibleIndex||e.visibleIndex>=0})).sort(function(e,t){return e.visibleIndex-t.visibleIndex})},t.prototype.setItems=function(e,t){var n=this;void 0===t&&(t=!0),this.actions=e.map(function(e){return n.createAction(e)}),t&&this.sortItems()},t.prototype.initResponsivityManager=function(e){},t.prototype.resetResponsivityManager=function(){},t.prototype.getActionById=function(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].id===e)return this.actions[t];return null},c([Object(i.propertyArray)({onSet:function(e,t){t.onSet()},onPush:function(e,t,n){n.onPush(e)},onRemove:function(e,t,n){n.onRemove(e)}})],t.prototype,"actions",void 0),c([Object(i.property)({defaultValue:!1})],t.prototype,"isEmpty",void 0),t}(o.Base)},"./src/base.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"Bindings",function(){return h}),n.d(t,"Dependencies",function(){return p}),n.d(t,"ComputedUpdater",function(){return f}),n.d(t,"Base",function(){return m}),n.d(t,"ArrayChanges",function(){return g}),n.d(t,"Event",function(){return v}),n.d(t,"EventBase",function(){return y});var r,i=n("./src/localizablestring.ts"),o=n("./src/helpers.ts"),a=n("./src/jsonobject.ts"),s=n("./src/settings.ts"),l=n("./src/conditions.ts"),u=n("./src/surveyStrings.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},h=function(){function e(e){this.obj=e,this.properties=null,this.values=null}return e.prototype.getType=function(){return"bindings"},e.prototype.getNames=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)this.properties[t].isVisible("",this.obj)&&e.push(this.properties[t].name);return e},e.prototype.getProperties=function(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)e.push(this.properties[t]);return e},e.prototype.setBinding=function(e,t){this.values||(this.values={});var n=this.getJson();n!==t&&(t?this.values[e]=t:(delete this.values[e],0==Object.keys(this.values).length&&(this.values=null)),this.onChangedJSON(n))},e.prototype.clearBinding=function(e){this.setBinding(e,"")},e.prototype.isEmpty=function(){if(!this.values)return!0;for(var e in this.values)return!1;return!0},e.prototype.getValueNameByPropertyName=function(e){if(this.values)return this.values[e]},e.prototype.getPropertiesByValueName=function(e){if(!this.values)return[];var t=[];for(var n in this.values)this.values[n]==e&&t.push(n);return t},e.prototype.getJson=function(){if(!this.isEmpty()){var e={};for(var t in this.values)e[t]=this.values[t];return e}},e.prototype.setJson=function(e){var t=this.getJson();if(this.values=null,e)for(var n in this.values={},e)this.values[n]=e[n];this.onChangedJSON(t)},e.prototype.fillProperties=function(){if(null===this.properties){this.properties=[];for(var e=a.Serializer.getPropertiesByObj(this.obj),t=0;t<e.length;t++)e[t].isBindable&&this.properties.push(e[t])}},e.prototype.onChangedJSON=function(e){this.obj&&this.obj.onBindingChanged(e,this.getJson())},e}(),p=function(){function e(t,n,r){this.currentDependency=t,this.target=n,this.property=r,this.dependencies=[],this.id=""+ ++e.DependenciesCount}return e.prototype.addDependency=function(e,t){this.target===e&&this.property===t||this.dependencies.some(function(n){return n.obj===e&&n.prop===t})||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerFunctionOnPropertiesValueChanged([t],this.currentDependency,this.id))},e.prototype.dispose=function(){this.dependencies.forEach(function(e){e.obj.unRegisterFunctionOnPropertiesValueChanged([e.prop],e.id)})},e.DependenciesCount=0,e}(),f=function(){function e(t){this._updater=t,this.dependencies=void 0,this.type=e.ComputedUpdaterType}return Object.defineProperty(e.prototype,"updater",{get:function(){return this._updater},enumerable:!1,configurable:!0}),e.prototype.setDependencies=function(e){this.clearDependencies(),this.dependencies=e},e.prototype.getDependencies=function(){return this.dependencies},e.prototype.clearDependencies=function(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)},e.prototype.dispose=function(){this.clearDependencies()},e.ComputedUpdaterType="__dependency_computed",e}(),m=function(){function e(){this.propertyHash={},this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.bindingsValue=new h(this),a.CustomPropertiesCollection.createProperties(this),this.onBaseCreating(),this.isCreating=!1}return e.finishCollectDependencies=function(){var t=e.currentDependencis;return e.currentDependencis=void 0,t},e.startCollectDependencies=function(t,n,r){if(void 0!==e.currentDependencis)throw new Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");e.currentDependencis=new p(t,n,r)},e.collectDependency=function(t,n){void 0!==e.currentDependencis&&e.currentDependencis.addDependency(t,n)},Object.defineProperty(e,"commentPrefix",{get:function(){return s.settings.commentPrefix},set:function(e){s.settings.commentPrefix=e},enumerable:!1,configurable:!0}),e.prototype.isValueEmpty=function(e,t){return void 0===t&&(t=!0),t&&(e=this.trimValue(e)),o.Helpers.isValueEmpty(e)},e.prototype.trimValue=function(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e},e.prototype.isPropertyEmpty=function(e){return""!==e&&this.isValueEmpty(e)},e.prototype.dispose=function(){for(var e=0;e<this.eventList.length;e++)this.eventList[e].clear();this.onPropertyValueChangedCallback=void 0,this.isDisposedValue=!0},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!0===this.isDisposedValue},enumerable:!1,configurable:!0}),e.prototype.addEvent=function(){var e=new y;return this.eventList.push(e),e},e.prototype.onBaseCreating=function(){},e.prototype.getType=function(){return"base"},e.prototype.isDescendantOf=function(e){return a.Serializer.isDescendantOf(this.getType(),e)},e.prototype.getSurvey=function(e){return void 0===e&&(e=!1),null},Object.defineProperty(e.prototype,"isDesignMode",{get:function(){var e=this.getSurvey();return!!e&&e.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inSurvey",{get:function(){return!!this.getSurvey(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return this.bindingsValue},enumerable:!1,configurable:!0}),e.prototype.checkBindings=function(e,t){},e.prototype.updateBindings=function(e,t){var n=this.bindings.getValueNameByPropertyName(e);n&&this.updateBindingValue(n,t)},e.prototype.updateBindingValue=function(e,t){},e.prototype.getTemplate=function(){return this.getType()},Object.defineProperty(e.prototype,"isLoadingFromJson",{get:function(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()},enumerable:!1,configurable:!0}),e.prototype.getIsLoadingFromJson=function(){return!(!this.loadingOwner||!this.loadingOwner.isLoadingFromJson)||this.isLoadingFromJsonValue},e.prototype.startLoadingFromJson=function(e){this.isLoadingFromJsonValue=!0},e.prototype.endLoadingFromJson=function(){this.isLoadingFromJsonValue=!1},e.prototype.toJSON=function(){return(new a.JsonObject).toJsonObject(this)},e.prototype.fromJSON=function(e){(new a.JsonObject).toObject(e,this),this.onSurveyLoad()},e.prototype.onSurveyLoad=function(){},e.prototype.clone=function(){var e=a.Serializer.createClass(this.getType());return e.fromJSON(this.toJSON()),e},e.prototype.getPropertyByName=function(e){return a.Serializer.findProperty(this.getType(),e)},e.prototype.isPropertyVisible=function(e){var t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)},e.createProgressInfo=function(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}},e.prototype.getProgressInfo=function(){return e.createProgressInfo()},e.prototype.localeChanged=function(){},e.prototype.locStrsChanged=function(){if(this.arraysInfo)for(var t in this.arraysInfo)if((r=this.arraysInfo[t])&&r.isItemValues){var n=this.getPropertyValue(t);n&&e.itemValueLocStrChanged&&e.itemValueLocStrChanged(n)}if(this.localizableStrings)for(var t in this.localizableStrings){var r;(r=this.getLocalizableString(t))&&r.strChanged()}},e.prototype.getPropertyValue=function(e,t){void 0===t&&(t=null);var n=this.getPropertyValueCore(this.propertyHash,e);if(this.isPropertyEmpty(n)){if(null!=t)return t;var r=a.Serializer.findProperty(this.getType(),e);if(r&&(!r.isCustom||!this.isCreating)){if(!this.isPropertyEmpty(r.defaultValue)&&!Array.isArray(r.defaultValue))return r.defaultValue;if("boolean"==r.type||"switch"==r.type)return!1;if(r.isCustom&&r.onGetValue)return r.onGetValue(this)}}return n},e.prototype.getPropertyValueCore=function(t,n){return e.collectDependency(this,n),this.getPropertyValueCoreHandler?this.getPropertyValueCoreHandler(t,n):t[n]},e.prototype.geValueFromHash=function(){return this.propertyHash.value},e.prototype.setPropertyValueCore=function(e,t,n){this.setPropertyValueCoreHandler?this.isDisposedValue?console.warn("Attempt to set property '"+t+"' of a disposed object '"+this.getType()+"'"):this.setPropertyValueCoreHandler(e,t,n):e[t]=n},Object.defineProperty(e.prototype,"isEditingSurveyElement",{get:function(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement},enumerable:!1,configurable:!0}),e.prototype.iteratePropertiesHash=function(e){var t=this,n=[];for(var r in this.propertyHash)"value"===r&&this.isEditingSurveyElement&&Array.isArray(this.value)||n.push(r);n.forEach(function(n){return e(t.propertyHash,n)})},e.prototype.checkAndSetPropertyValue=function(e,t){var n=this.isLoadingFromJson?void 0:this.getPropertyByName(e);n&&(t=n.settingValue(this,t)),this.setPropertyValue(e,t)},e.prototype.setPropertyValue=function(e,t){if(!this.isLoadingFromJson){var n=this.getPropertyByName(e);n&&(t=n.settingValue(this,t))}var r=this.getPropertyValue(e);if(r&&Array.isArray(r)&&this.arraysInfo&&(!t||Array.isArray(t))){if(this.isTwoValueEquals(r,t))return;this.setArrayPropertyDirectly(e,t)}else this.setPropertyValueDirectly(e,t),this.isDisposedValue||this.isTwoValueEquals(r,t)||this.propertyValueChanged(e,r,t)},e.prototype.setArrayPropertyDirectly=function(e,t,n){void 0===n&&(n=!0);var r=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!r&&r.isItemValues,r?n&&r.onPush:null)},e.prototype.setPropertyValueDirectly=function(e,t){this.setPropertyValueCore(this.propertyHash,e,t)},e.prototype.clearPropertyValue=function(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]},e.prototype.onPropertyValueChangedCallback=function(e,t,n,r,i){},e.prototype.itemValuePropertyChanged=function(e,t,n,r){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:n,newValue:r,propertyName:e.ownerPropertyName})},e.prototype.onPropertyValueChanged=function(e,t,n){},e.prototype.propertyValueChanged=function(e,t,n,r,i){if(!this.isLoadingFromJson&&(this.updateBindings(e,n),this.onPropertyValueChanged(e,t,n),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:n}),this.doPropertyValueChangedCallback(e,t,n,r,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var o=0;o<this.onPropChangeFunctions.length;o++)this.onPropChangeFunctions[o].name==e&&this.onPropChangeFunctions[o].func(n)},e.prototype.onBindingChanged=function(e,t){this.isLoadingFromJson||this.doPropertyValueChangedCallback("bindings",e,t)},Object.defineProperty(e.prototype,"isInternal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.doPropertyValueChangedCallback=function(e,t,n,r,i){if(!this.isInternal){i||(i=this);var o=this.getSurvey();o||(o=this),o.onPropertyValueChangedCallback&&o.onPropertyValueChangedCallback(e,t,n,i,r),o!==this&&this.onPropertyValueChangedCallback&&this.onPropertyValueChangedCallback(e,t,n,i,r)}},e.prototype.addExpressionProperty=function(e,t,n){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:n}},e.prototype.getDataFilteredValues=function(){return{}},e.prototype.getDataFilteredProperties=function(){return{}},e.prototype.runConditionCore=function(e,t){if(this.expressionInfo)for(var n in this.expressionInfo)this.runConditionItemCore(n,e,t)},e.prototype.canRunConditions=function(){return!this.isDesignMode},e.prototype.checkConditionPropertyChanged=function(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredValues(),this.getDataFilteredProperties())},e.prototype.runConditionItemCore=function(e,t,n){var r=this,i=this.expressionInfo[e],o=this.getPropertyValue(e);o&&(i.canRun&&!i.canRun(this)||(i.runner||(i.runner=new l.ExpressionRunner(o),i.runner.onRunComplete=function(e){i.onExecute(r,e)}),i.runner.expression=o,i.runner.run(t,n)))},e.prototype.registerFunctionOnPropertyValueChanged=function(e,t,n){if(void 0===n&&(n=null),this.onPropChangeFunctions||(this.onPropChangeFunctions=[]),n)for(var r=0;r<this.onPropChangeFunctions.length;r++){var i=this.onPropChangeFunctions[r];if(i.name==e&&i.key==n)return void(i.func=t)}this.onPropChangeFunctions.push({name:e,func:t,key:n})},e.prototype.registerFunctionOnPropertiesValueChanged=function(e,t,n){void 0===n&&(n=null);for(var r=0;r<e.length;r++)this.registerFunctionOnPropertyValueChanged(e[r],t,n)},e.prototype.unRegisterFunctionOnPropertyValueChanged=function(e,t){if(void 0===t&&(t=null),this.onPropChangeFunctions)for(var n=0;n<this.onPropChangeFunctions.length;n++){var r=this.onPropChangeFunctions[n];if(r.name==e&&r.key==t)return void this.onPropChangeFunctions.splice(n,1)}},e.prototype.unRegisterFunctionOnPropertiesValueChanged=function(e,t){void 0===t&&(t=null);for(var n=0;n<e.length;n++)this.unRegisterFunctionOnPropertyValueChanged(e[n],t)},e.prototype.createCustomLocalizableObj=function(e){this.getLocalizableString(e)||this.createLocalizableString(e,this,!1,!0)},e.prototype.getLocale=function(){var e=this.getSurvey();return e?e.getLocale():""},e.prototype.getLocalizationString=function(e){return u.surveyLocalization.getString(e,this.getLocale())},e.prototype.getLocalizationFormatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getLocalizationString(e);return r&&r.format?r.format.apply(r,t):""},e.prototype.createLocalizableString=function(e,t,n,r){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!1);var a=new i.LocalizableString(t,n,e);return r&&(a.localizationName=!0===r?e:r),a.onStrChanged=function(t,n){o.propertyValueChanged(e,t,n)},this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[e]=a,a},e.prototype.getLocalizableString=function(e){return this.localizableStrings?this.localizableStrings[e]:null},e.prototype.getLocalizableStringText=function(e,t){void 0===t&&(t="");var n=this.getLocalizableString(e);return n?n.text||t:""},e.prototype.setLocalizableStringText=function(e,t){var n=this.getLocalizableString(e);n&&(n.text=t)},e.prototype.addUsedLocales=function(e){if(this.localizableStrings)for(var t in this.localizableStrings)(i=this.getLocalizableString(t))&&this.AddLocStringToUsedLocales(i,e);if(this.arraysInfo)for(var t in this.arraysInfo){var n=this.getPropertyValue(t);if(n&&n.length)for(var r=0;r<n.length;r++){var i;(i=n[r])&&i.addUsedLocales&&i.addUsedLocales(e)}}},e.prototype.searchText=function(e,t){var n=[];this.getSearchableLocalizedStrings(n);for(var r=0;r<n.length;r++)n[r].setFindText(e)&&t.push({element:this,str:n[r]})},e.prototype.getSearchableLocalizedStrings=function(e){if(this.localizableStrings){var t=[];this.getSearchableLocKeys(t);for(var n=0;n<t.length;n++){var r=this.getLocalizableString(t[n]);r&&e.push(r)}}if(this.arraysInfo){var i=[];for(this.getSearchableItemValueKeys(i),n=0;n<i.length;n++){var o=this.getPropertyValue(i[n]);if(o)for(var a=0;a<o.length;a++)e.push(o[a].locText)}}},e.prototype.getSearchableLocKeys=function(e){},e.prototype.getSearchableItemValueKeys=function(e){},e.prototype.AddLocStringToUsedLocales=function(e,t){for(var n=e.getLocales(),r=0;r<n.length;r++)t.indexOf(n[r])<0&&t.push(n[r])},e.prototype.createItemValues=function(e){var t=this,n=this.createNewArray(e,function(n){if(n.locOwner=t,n.ownerPropertyName=e,"function"==typeof n.getSurvey){var r=n.getSurvey();r&&"function"==typeof r.makeReactive&&r.makeReactive(n)}});return this.arraysInfo[e].isItemValues=!0,n},e.prototype.notifyArrayChanged=function(e,t){e.onArrayChanged&&e.onArrayChanged(t)},e.prototype.createNewArrayCore=function(e){var t=null;return this.createArrayCoreHandler&&(t=this.createArrayCoreHandler(this.propertyHash,e)),t||(t=new Array,this.setPropertyValueCore(this.propertyHash,e,t)),t},e.prototype.ensureArray=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!this.arraysInfo||!this.arraysInfo[e])return this.createNewArray(e,t,n)},e.prototype.createNewArray=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=this.createNewArrayCore(e);this.arraysInfo||(this.arraysInfo={}),this.arraysInfo[e]={onPush:t,isItemValues:!1};var i=this;return r.push=function(n){var o=Object.getPrototypeOf(r).push.call(r,n);if(!i.isDisposedValue){t&&t(n,r.length-1);var a=new g(r.length-1,0,[n],[]);i.propertyValueChanged(e,r,r,a),i.notifyArrayChanged(r,a)}return o},r.shift=function(){var t=Object.getPrototypeOf(r).shift.call(r);if(!i.isDisposedValue&&t){n&&n(t);var o=new g(r.length-1,1,[],[]);i.propertyValueChanged(e,r,r,o),i.notifyArrayChanged(r,o)}return t},r.unshift=function(n){var o=Object.getPrototypeOf(r).unshift.call(r,n);if(!i.isDisposedValue){t&&t(n,r.length-1);var a=new g(0,0,[n],[]);i.propertyValueChanged(e,r,r,a),i.notifyArrayChanged(r,a)}return o},r.pop=function(){var t=Object.getPrototypeOf(r).pop.call(r);if(!i.isDisposedValue){n&&n(t);var o=new g(r.length-1,1,[],[]);i.propertyValueChanged(e,r,r,o),i.notifyArrayChanged(r,o)}return t},r.splice=function(o,a){for(var s,l=[],u=2;u<arguments.length;u++)l[u-2]=arguments[u];o||(o=0),a||(a=0);var c=(s=Object.getPrototypeOf(r).splice).call.apply(s,d([r,o,a],l,!1));if(l||(l=[]),!i.isDisposedValue){if(n&&c)for(var h=0;h<c.length;h++)n(c[h]);if(t)for(h=0;h<l.length;h++)t(l[h],o+h);var p=new g(o,a,l,c);i.propertyValueChanged(e,r,r,p),i.notifyArrayChanged(r,p)}return c},r},e.prototype.getItemValueType=function(){},e.prototype.setArray=function(t,n,r,i,o){var a=[].concat(n);if(Object.getPrototypeOf(n).splice.call(n,0,n.length),r)for(var s=0;s<r.length;s++){var l=r[s];i&&e.createItemValue&&(l=e.createItemValue(l,this.getItemValueType())),Object.getPrototypeOf(n).push.call(n,l),o&&o(n[s])}var u=new g(0,a.length,n,a);this.propertyValueChanged(t,a,n,u),this.notifyArrayChanged(n,u)},e.prototype.isTwoValueEquals=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),o.Helpers.isTwoValueEquals(e,t,!1,!n,r)},e.copyObject=function(e,t){for(var n in t){var r=t[n];"object"==typeof r&&this.copyObject(r={},t[n]),e[n]=r}},e.prototype.copyCssClasses=function(t,n){n&&("string"==typeof n||n instanceof String?t.root=n:e.copyObject(t,n))},e.prototype.getValueInLowCase=function(e){return e&&"string"==typeof e?e.toLowerCase():e},e.currentDependencis=void 0,e}(),g=function(e,t,n,r){this.index=e,this.deleteCount=t,this.itemsToAdd=n,this.deletedItems=r},v=function(){function e(){}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.callbacks?this.callbacks.length:0},enumerable:!1,configurable:!0}),e.prototype.fireByCreatingOptions=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t()),!this.callbacks)return},e.prototype.fire=function(e,t){if(this.callbacks)for(var n=0;n<this.callbacks.length;n++)if(this.callbacks[n](e,t),!this.callbacks)return},e.prototype.clear=function(){this.callbacks=void 0},e.prototype.add=function(e){this.hasFunc(e)||(this.callbacks||(this.callbacks=new Array),this.callbacks.push(e),this.fireCallbackChanged())},e.prototype.remove=function(e){if(this.hasFunc(e)){var t=this.callbacks.indexOf(e,0);this.callbacks.splice(t,1),this.fireCallbackChanged()}},e.prototype.hasFunc=function(e){return null!=this.callbacks&&this.callbacks.indexOf(e,0)>-1},e.prototype.fireCallbackChanged=function(){this.onCallbacksChanged&&this.onCallbacksChanged()},e}(),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t}(v)},"./src/calculatedValue.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"CalculatedValue",function(){return u});var r,i=n("./src/helpers.ts"),o=n("./src/base.ts"),a=n("./src/conditions.ts"),s=n("./src/jsonobject.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this)||this;return r.expressionIsRunning=!1,r.isCalculated=!1,t&&(r.name=t),n&&(r.expression=n),r}return l(t,e),t.prototype.setOwner=function(e){this.data=e,this.rerunExpression()},t.prototype.getType=function(){return"calculatedvalue"},t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.data&&this.data.getSurvey?this.data.getSurvey():null},Object.defineProperty(t.prototype,"owner",{get:function(){return this.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.getPropertyValue("name","")},set:function(e){this.setPropertyValue("name",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"includeIntoResult",{get:function(){return this.getPropertyValue("includeIntoResult",!1)},set:function(e){this.setPropertyValue("includeIntoResult",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.getPropertyValue("expression","")},set:function(e){this.setPropertyValue("expression",e),this.rerunExpression()},enumerable:!1,configurable:!0}),t.prototype.locCalculation=function(){this.expressionIsRunning=!0},t.prototype.unlocCalculation=function(){this.expressionIsRunning=!1},t.prototype.resetCalculation=function(){this.isCalculated=!1},t.prototype.doCalculation=function(e,t,n){this.isCalculated||(this.runExpressionCore(e,t,n),this.isCalculated=!0)},t.prototype.runExpression=function(e,t){this.runExpressionCore(null,e,t)},Object.defineProperty(t.prototype,"value",{get:function(){if(this.data)return this.data.getVariable(this.name)},enumerable:!1,configurable:!0}),t.prototype.setValue=function(e){this.data&&this.data.setVariable(this.name,e)},Object.defineProperty(t.prototype,"canRunExpression",{get:function(){return!(!this.data||this.isLoadingFromJson||!this.expression||this.expressionIsRunning||!this.name)},enumerable:!1,configurable:!0}),t.prototype.rerunExpression=function(){this.canRunExpression&&this.runExpression(this.data.getFilteredValues(),this.data.getFilteredProperties())},t.prototype.runExpressionCore=function(e,t,n){this.canRunExpression&&(this.ensureExpression(t),this.locCalculation(),e&&this.runDependentExpressions(e,t,n),this.expressionRunner.run(t,n))},t.prototype.runDependentExpressions=function(e,t,n){var r=this.expressionRunner.getVariables();if(r)for(var i=0;i<e.length;i++){var o=e[i];o===this||r.indexOf(o.name)<0||(o.doCalculation(e,t,n),t[o.name]=o.value)}},t.prototype.ensureExpression=function(e){var t=this;this.expressionRunner||(this.expressionRunner=new a.ExpressionRunner(this.expression),this.expressionRunner.onRunComplete=function(e){i.Helpers.isTwoValueEquals(e,t.value)||t.setValue(e),t.unlocCalculation()})},t}(o.Base);s.Serializer.addClass("calculatedvalue",[{name:"!name",isUnique:!0},"expression:expression","includeIntoResult:boolean"],function(){return new u},"base")},"./src/choicesRestful.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ChoicesRestful",function(){return d}),n.d(t,"ChoicesRestfull",function(){return h});var r,i=n("./src/base.ts"),o=n("./src/itemvalue.ts"),a=n("./src/jsonobject.ts"),s=n("./src/error.ts"),l=n("./src/settings.ts"),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(){function e(){this.parser=new DOMParser}return e.prototype.assignValue=function(e,t,n){Array.isArray(e[t])?e[t].push(n):e[t]=void 0!==e[t]?[e[t]].concat(n):"object"==typeof n&&1===Object.keys(n).length&&Object.keys(n)[0]===t?n[t]:n},e.prototype.xml2Json=function(e,t){if(e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++){var r=e.children[n],i={};this.xml2Json(r,i),this.assignValue(t,r.nodeName,i)}else this.assignValue(t,e.nodeName,e.textContent)},e.prototype.parseXmlString=function(e){var t=this.parser.parseFromString(e,"text/xml"),n={};return this.xml2Json(t,n),n},e}(),d=function(e){function t(){var t=e.call(this)||this;return t.lastObjHash="",t.isRunningValue=!1,t.processedUrl="",t.processedPath="",t.isUsingCacheFromUrl=void 0,t.error=null,t.createItemValue=function(e){return new o.ItemValue(e)},t}return u(t,e),Object.defineProperty(t,"EncodeParameters",{get:function(){return l.settings.webserviceEncodeParameters},set:function(e){l.settings.webserviceEncodeParameters=e},enumerable:!1,configurable:!0}),t.clearCache=function(){t.itemsResult={},t.sendingSameRequests={}},t.addSameRequest=function(e){if(!e.isUsingCache)return!1;var n=t.sendingSameRequests[e.objHash];return n?(n.push(e),e.isRunningValue=!0,!0):(t.sendingSameRequests[e.objHash]=[],!1)},t.unregisterSameRequests=function(e,n){if(e.isUsingCache){var r=t.sendingSameRequests[e.objHash];if(delete t.sendingSameRequests[e.objHash],r)for(var i=0;i<r.length;i++)r[i].isRunningValue=!1,r[i].getResultCallback&&r[i].getResultCallback(n)}},t.getCachedItemsResult=function(e){var n=t.itemsResult[e.objHash];return!!n&&(e.getResultCallback&&e.getResultCallback(n),!0)},t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.owner?this.owner.survey:null},t.prototype.run=function(e){if(void 0===e&&(e=null),this.url&&this.getResultCallback){if(this.processedText(e),!this.processedUrl)return this.doEmptyResultCallback({}),void(this.lastObjHash=this.objHash);this.lastObjHash!==this.objHash&&(this.lastObjHash=this.objHash,this.error=null,this.useChangedItemsResults()||t.addSameRequest(this)||this.sendRequest())}},Object.defineProperty(t.prototype,"isUsingCache",{get:function(){return!0===this.isUsingCacheFromUrl||!1!==this.isUsingCacheFromUrl&&l.settings.useCachingForChoicesRestful},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRunning",{get:function(){return this.getIsRunning()},enumerable:!1,configurable:!0}),t.prototype.getIsRunning=function(){return this.isRunningValue},Object.defineProperty(t.prototype,"isWaitingForParameters",{get:function(){return this.url&&!this.processedUrl},enumerable:!1,configurable:!0}),t.prototype.useChangedItemsResults=function(){return t.getCachedItemsResult(this)},t.prototype.doEmptyResultCallback=function(e){var t=[];this.updateResultCallback&&(t=this.updateResultCallback(t,e)),this.getResultCallback(t)},t.prototype.processedText=function(e){var n=this.url;if(n&&(n=n.replace(t.cacheText,"").replace(t.noCacheText,"")),e){var r=e.processTextEx(n,!1,l.settings.webserviceEncodeParameters),i=e.processTextEx(this.path,!1,l.settings.webserviceEncodeParameters);r.hasAllValuesOnLastRun&&i.hasAllValuesOnLastRun?(this.processedUrl=r.text,this.processedPath=i.text):(this.processedUrl="",this.processedPath="")}else this.processedUrl=n,this.processedPath=this.path;this.onProcessedUrlCallback&&this.onProcessedUrlCallback(this.processedUrl,this.processedPath)},t.prototype.parseResponse=function(e){var t;if(e&&"function"==typeof e.indexOf&&0===e.indexOf("<"))t=(new c).parseXmlString(e);else try{t=JSON.parse(e)}catch(n){t=(e||"").split("\n").map(function(e){return e.trim(" ")}).filter(function(e){return!!e})}return t},t.prototype.sendRequest=function(){var e=new XMLHttpRequest;e.open("GET",this.processedUrl),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var n=this,r=this.objHash;e.onload=function(){n.beforeLoadRequest(),200===e.status?n.onLoad(n.parseResponse(e.response),r):n.onError(e.statusText,e.responseText)};var i={request:e};t.onBeforeSendRequest&&t.onBeforeSendRequest(this,i),this.beforeSendRequest(),i.request.send()},t.prototype.getType=function(){return"choicesByUrl"},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!(this.url||this.path||this.valueName||this.titleName||this.imageLinkName)},enumerable:!1,configurable:!0}),t.prototype.getCustomPropertiesNames=function(){for(var e=this.getCustomProperties(),t=new Array,n=0;n<e.length;n++)t.push(this.getCustomPropertyName(e[n].name));return t},t.prototype.getCustomPropertyName=function(e){return e+"Name"},t.prototype.getCustomProperties=function(){for(var e=a.Serializer.getProperties(this.itemValueType),t=[],n=0;n<e.length;n++)"value"!==e[n].name&&"text"!==e[n].name&&"visibleIf"!==e[n].name&&"enableIf"!==e[n].name&&t.push(e[n]);return t},t.prototype.setData=function(e){this.clear(),e.url&&(this.url=e.url),e.path&&(this.path=e.path),e.valueName&&(this.valueName=e.valueName),e.titleName&&(this.titleName=e.titleName),e.imageLinkName&&(this.imageLinkName=e.imageLinkName),void 0!==e.allowEmptyResponse&&(this.allowEmptyResponse=e.allowEmptyResponse),void 0!==e.attachOriginalItems&&(this.attachOriginalItems=e.attachOriginalItems);for(var t=this.getCustomPropertiesNames(),n=0;n<t.length;n++)e[t[n]]&&(this[t[n]]=e[t[n]])},t.prototype.getData=function(){if(this.isEmpty)return null;var e={};this.url&&(e.url=this.url),this.path&&(e.path=this.path),this.valueName&&(e.valueName=this.valueName),this.titleName&&(e.titleName=this.titleName),this.imageLinkName&&(e.imageLinkName=this.imageLinkName),this.allowEmptyResponse&&(e.allowEmptyResponse=this.allowEmptyResponse),this.attachOriginalItems&&(e.attachOriginalItems=this.attachOriginalItems);for(var t=this.getCustomPropertiesNames(),n=0;n<t.length;n++)this[t[n]]&&(e[t[n]]=this[t[n]]);return e},Object.defineProperty(t.prototype,"url",{get:function(){return this.getPropertyValue("url","")},set:function(e){this.setPropertyValue("url",e),this.isUsingCacheFromUrl=void 0,e&&(e.indexOf(t.cacheText)>-1?this.isUsingCacheFromUrl=!0:e.indexOf(t.noCacheText)>-1&&(this.isUsingCacheFromUrl=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.getPropertyValue("path","")},set:function(e){this.setPropertyValue("path",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueName",{get:function(){return this.getPropertyValue("valueName","")},set:function(e){this.setPropertyValue("valueName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleName",{get:function(){return this.getPropertyValue("titleName","")},set:function(e){this.setPropertyValue("titleName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageLinkName",{get:function(){return this.getPropertyValue("imageLinkName","")},set:function(e){this.setPropertyValue("imageLinkName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEmptyResponse",{get:function(){return this.getPropertyValue("allowEmptyResponse")},set:function(e){this.setPropertyValue("allowEmptyResponse",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachOriginalItems",{get:function(){return this.getPropertyValue("attachOriginalItems")},set:function(e){this.setPropertyValue("attachOriginalItems",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemValueType",{get:function(){if(!this.owner)return"itemvalue";var e=a.Serializer.findProperty(this.owner.getType(),"choices");return e?"itemvalue[]"==e.type?"itemvalue":e.type:"itemvalue"},enumerable:!1,configurable:!0}),t.prototype.clear=function(){this.url="",this.path="",this.valueName="",this.titleName="",this.imageLinkName="";for(var e=this.getCustomPropertiesNames(),t=0;t<e.length;t++)this[e[t]]&&(this[e[t]]="")},t.prototype.beforeSendRequest=function(){this.isRunningValue=!0,this.beforeSendRequestCallback&&this.beforeSendRequestCallback()},t.prototype.beforeLoadRequest=function(){this.isRunningValue=!1},t.prototype.onLoad=function(e,n){void 0===n&&(n=null),n||(n=this.objHash);var r=new Array,i=this.getResultAfterPath(e);if(i&&i.length)for(var o=0;o<i.length;o++){var a=i[o];if(a){var l=this.getItemValueCallback?this.getItemValueCallback(a):this.getValue(a),u=this.createItemValue(l);this.setTitle(u,a),this.setCustomProperties(u,a),this.attachOriginalItems&&(u.originalItem=a);var c=this.getImageLink(a);c&&(u.imageLink=c),r.push(u)}}else this.allowEmptyResponse||(this.error=new s.WebRequestEmptyError(null,this.owner));this.updateResultCallback&&(r=this.updateResultCallback(r,e)),this.isUsingCache&&(t.itemsResult[n]=r),this.callResultCallback(r,n),t.unregisterSameRequests(this,r)},t.prototype.callResultCallback=function(e,t){t==this.objHash&&this.getResultCallback(e)},t.prototype.setCustomProperties=function(e,t){for(var n=this.getCustomProperties(),r=0;r<n.length;r++){var i=n[r],o=this.getValueCore(t,this.getPropertyBinding(i.name));this.isValueEmpty(o)||(e[i.name]=o)}},t.prototype.getPropertyBinding=function(e){return this[this.getCustomPropertyName(e)]?this[this.getCustomPropertyName(e)]:this[e]?this[e]:e},t.prototype.onError=function(e,n){this.error=new s.WebRequestError(e,n,this.owner),this.doEmptyResultCallback(n),t.unregisterSameRequests(this,[])},t.prototype.getResultAfterPath=function(e){if(!e)return e;if(!this.processedPath)return e;for(var t=this.getPathes(),n=0;n<t.length;n++)if(!(e=e[t[n]]))return null;return e},t.prototype.getPathes=function(){var e=[];return 0==(e=this.processedPath.indexOf(";")>-1?this.path.split(";"):this.processedPath.split(",")).length&&e.push(this.processedPath),e},t.prototype.getValue=function(e){return e?this.valueName?this.getValueCore(e,this.valueName):e instanceof Object?Object.keys(e).length<1?null:e[Object.keys(e)[0]]:e:null},t.prototype.setTitle=function(e,t){var n=this.getValueCore(t,this.titleName?this.titleName:"title");n&&("string"==typeof n?e.text=n:e.locText.setJson(n))},t.prototype.getImageLink=function(e){return this.getValueCore(e,this.imageLinkName?this.imageLinkName:"imageLink")},t.prototype.getValueCore=function(e,t){if(!e)return null;if(t.indexOf(".")<0)return e[t];for(var n=t.split("."),r=0;r<n.length;r++)if(!(e=e[n[r]]))return null;return e},Object.defineProperty(t.prototype,"objHash",{get:function(){return this.processedUrl+";"+this.processedPath+";"+this.valueName+";"+this.titleName+";"+this.imageLinkName},enumerable:!1,configurable:!0}),t.cacheText="{CACHE}",t.noCacheText="{NOCACHE}",t.itemsResult={},t.sendingSameRequests={},t}(i.Base),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),Object.defineProperty(t,"EncodeParameters",{get:function(){return d.EncodeParameters},set:function(e){d.EncodeParameters=e},enumerable:!1,configurable:!0}),t.clearCache=function(){d.clearCache()},Object.defineProperty(t,"onBeforeSendRequest",{get:function(){return d.onBeforeSendRequest},set:function(e){d.onBeforeSendRequest=e},enumerable:!1,configurable:!0}),t}(d);a.Serializer.addClass("choicesByUrl",["url","path","valueName","titleName",{name:"imageLinkName",visibleIf:function(e){return!!e&&!!e.owner&&"imagepicker"==e.owner.getType()}},{name:"allowEmptyResponse:boolean"},{name:"attachOriginalItems:boolean",visible:!1}],function(){return new d})},"./src/conditionProcessValue.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ProcessValue",function(){return i});var r=n("./src/helpers.ts"),i=function(){function e(){this.values=null,this.properties=null}return e.prototype.getFirstName=function(e,t){if(void 0===t&&(t=null),!e)return e;var n="";if(t&&(n=this.getFirstPropertyName(e,t)))return n;for(var r=0;r<e.length;r++){var i=e[r];if("."==i||"["==i)break;n+=i}return n},e.prototype.hasValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).hasValue},e.prototype.getValue=function(e,t){return void 0===t&&(t=null),t||(t=this.values),this.getValueCore(e,t).value},e.prototype.setValue=function(e,t,n){if(t){var r=this.getNonNestedObject(e,t,!0);r&&(t=r.text,(e=r.value)&&t&&(e[t]=n))}},e.prototype.getValueInfo=function(e){if(e.path)return e.value=this.getValueFromPath(e.path,this.values),e.hasValue=null!==e.value&&!r.Helpers.isValueEmpty(e.value),void(!e.hasValue&&e.path.length>1&&"length"==e.path[e.path.length-1]&&(e.hasValue=!0,e.value=0));var t=this.getValueCore(e.name,this.values);e.value=t.value,e.hasValue=t.hasValue,e.path=t.hasValue?t.path:null},e.prototype.getValueFromPath=function(e,t){if(2===e.length&&"@survey"===e[0])return this.getValueFromSurvey(e[1]);for(var n=0;t&&n<e.length;){var i=e[n];if(r.Helpers.isNumber(i)&&Array.isArray(t)&&i>=t.length)return null;t=t[i],n++}return t},e.prototype.getValueCore=function(e,t){var n=this.getValueFromValues(e,t);if(e&&!n.hasValue){var r=this.getValueFromSurvey(e);void 0!==r&&(n.hasValue=!0,n.value=r,n.path=["@survey",e])}return n},e.prototype.getValueFromSurvey=function(e){if(this.properties&&this.properties.survey)return this.properties.survey.getBuiltInVariableValue(e.toLocaleLowerCase())},e.prototype.getValueFromValues=function(e,t){var n={hasValue:!1,value:null,path:null},i=t;if(!i&&0!==i&&!1!==i)return n;e&&e.lastIndexOf(".length")>-1&&e.lastIndexOf(".length")===e.length-".length".length&&(n.value=0,n.hasValue=!0);var o=this.getNonNestedObject(i,e,!1);return o?(n.path=o.path,n.value=o.text?this.getObjectValue(o.value,o.text):o.value,n.hasValue=!r.Helpers.isValueEmpty(n.value),n):n},e.prototype.getNonNestedObject=function(e,t,n){for(var i=this.getFirstPropertyName(t,e,n),o=i?[i]:null;t!=i&&e;){if("["==t[0]){var a=this.getObjInArray(e,t);if(!a)return null;e=a.value,t=a.text,o.push(a.index)}else{if(!i&&t==this.getFirstName(t))return{value:e,text:t,path:o};if(e=this.getObjectValue(e,i),r.Helpers.isValueEmpty(e)&&!n)return null;t=t.substring(i.length)}t&&"."==t[0]&&(t=t.substring(1)),(i=this.getFirstPropertyName(t,e,n))&&o.push(i)}return{value:e,text:t,path:o}},e.prototype.getObjInArray=function(e,t){if(!Array.isArray(e))return null;for(var n=1,r="";n<t.length&&"]"!=t[n];)r+=t[n],n++;return t=n<t.length?t.substring(n+1):"",(n=this.getIntValue(r))<0||n>=e.length?null:{value:e[n],text:t,index:n}},e.prototype.getFirstPropertyName=function(e,t,n){if(void 0===n&&(n=!1),!e)return e;if(t||(t={}),t.hasOwnProperty(e))return e;var r=e.toLowerCase(),i=r[0],o=i.toUpperCase();for(var a in t){var s=a[0];if(s===o||s===i){var l=a.toLowerCase();if(l==r)return a;if(r.length<=l.length)continue;var u=r[l.length];if("."!=u&&"["!=u)continue;if(l==r.substring(0,l.length))return a}}if(n&&"["!==e[0]){var c=e.indexOf(".");return c>-1&&(t[e=e.substring(0,c)]={}),e}return""},e.prototype.getObjectValue=function(e,t){return t?e[t]:null},e.prototype.getIntValue=function(e){return"0"==e||(0|e)>0&&e%1==0?Number(e):-1},e}()},"./src/conditions.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ExpressionExecutor",function(){return s}),n.d(t,"ExpressionRunnerBase",function(){return l}),n.d(t,"ConditionRunner",function(){return u}),n.d(t,"ExpressionRunner",function(){return c});var r,i=n("./src/conditionProcessValue.ts"),o=n("./src/conditionsParser.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){function e(e){this.processValue=new i.ProcessValue,this.parser=new o.ConditionsParser,this.isAsyncValue=!1,this.hasFunctionValue=!1,this.setExpression(e)}return Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(e){this.expression!==e&&(this.expressionValue=e,this.operand=this.parser.parseExpression(e),this.hasFunctionValue=!!this.canRun()&&this.operand.hasFunction(),this.isAsyncValue=!!this.hasFunction()&&this.operand.hasAsyncFunction())},e.prototype.getVariables=function(){if(!this.operand)return[];var e=[];return this.operand.setVariables(e),e},e.prototype.hasFunction=function(){return this.hasFunctionValue},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.isAsyncValue},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return!!this.operand},e.prototype.run=function(e,t){var n=this;if(void 0===t&&(t=null),!this.operand)return null;if(this.processValue.values=e,this.processValue.properties=t,!this.isAsync)return this.runValues();this.asyncFuncList=[],this.operand.addToAsyncList(this.asyncFuncList);for(var r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].onAsyncReady=function(){n.doAsyncFunctionReady()};for(r=0;r<this.asyncFuncList.length;r++)this.asyncFuncList[r].evaluateAsync(this.processValue);return!1},e.prototype.doAsyncFunctionReady=function(){for(var e=0;e<this.asyncFuncList.length;e++)if(!this.asyncFuncList[e].isReady)return;this.runValues()},e.prototype.runValues=function(){var e=this.operand.evaluate(this.processValue);return this.onComplete&&this.onComplete(e),e},e.createExpressionExecutor=function(t){return new e(t)},e}(),l=function(){function e(e){this.expression=e}return Object.defineProperty(e.prototype,"expression",{get:function(){return this.expressionExecutor?this.expressionExecutor.expression:""},set:function(e){var t=this;this.expressionExecutor&&e===this.expression||(this.expressionExecutor=s.createExpressionExecutor(e),this.expressionExecutor.onComplete=function(e){t.doOnComplete(e)})},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return this.expressionExecutor.getVariables()},e.prototype.hasFunction=function(){return this.expressionExecutor.hasFunction()},Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.expressionExecutor.isAsync},enumerable:!1,configurable:!0}),e.prototype.canRun=function(){return this.expressionExecutor.canRun()},e.prototype.runCore=function(e,t){return void 0===t&&(t=null),this.expressionExecutor.run(e,t)},e.prototype.doOnComplete=function(e){},e}(),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),1==this.runCore(e,t)},t.prototype.doOnComplete=function(e){this.onRunComplete&&this.onRunComplete(1==e)},t}(l),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.run=function(e,t){return void 0===t&&(t=null),this.runCore(e,t)},t.prototype.doOnComplete=function(e){this.onRunComplete&&this.onRunComplete(e)},t}(l)},"./src/conditionsParser.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ConditionsParserError",function(){return i}),n.d(t,"ConditionsParser",function(){return o});var r=n("./src/expressions/expressionParser.ts"),i=function(e,t){this.at=e,this.code=t},o=function(){function e(){}return e.prototype.patchExpression=function(e){return e.replace(/=>/g,">=").replace(/=</g,"<=").replace(/<>/g,"!=").replace(/==/g,"= ").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")},e.prototype.createCondition=function(e){return this.parseExpression(e)},e.prototype.parseExpression=function(t){try{var n=e.parserCache[t];return void 0===n&&((n=Object(r.parse)(this.patchExpression(t))).hasAsyncFunction()||(e.parserCache[t]=n)),n}catch(o){o instanceof r.SyntaxError&&(this.conditionError=new i(o.location.start.offset,o.message))}},Object.defineProperty(e.prototype,"error",{get:function(){return this.conditionError},enumerable:!1,configurable:!0}),e.parserCache={},e}()},"./src/defaultCss/cssbootstrap.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"defaultBootstrapCss",function(){return i});var r=n("./src/defaultCss/cssstandard.ts"),i={root:"sv_main sv_bootstrap_css",container:"sv_container",header:"panel-heading card-header",body:"panel-body card-block mt-4",bodyEmpty:"panel-body card-block mt-4 sv_body_empty",footer:"panel-footer card-footer",title:"",description:"",logo:"sv_logo",logoImage:"sv_logo__image",headerText:"sv_header__text",navigationButton:"btn sv_nav_btn",completedPage:"",navigation:{complete:"sv_complete_btn",prev:"sv_prev_btn",next:"sv_next_btn",start:"sv_start_btn",preview:"sv_preview_btn",edit:"sv_edit_btn"},progress:"progress center-block mx-auto mb-4",progressBar:"progress-bar",progressTextUnderBar:"sv-hidden",progressTextInBar:"sv-hidden",progressButtonsContainerCenter:"sv_progress-buttons__container-center",progressButtonsContainer:"sv_progress-buttons__container",progressButtonsImageButtonLeft:"sv_progress-buttons__image-button-left",progressButtonsImageButtonRight:"sv_progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sv_progress-buttons__image-button--hidden",progressButtonsListContainer:"sv_progress-buttons__list-container",progressButtonsList:"sv_progress-buttons__list",progressButtonsListElementPassed:"sv_progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sv_progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sv_progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sv_progress-buttons__page-title",progressButtonsPageDescription:"sv_progress-buttons__page-description",page:{root:"",title:"",description:"small"},pageTitle:"",pageDescription:"small",row:"sv_row",question:{mainRoot:"sv_qstn",flowRoot:"sv_q_flow sv_qstn",header:"",headerLeft:"title-left",content:"",contentLeft:"content-left",titleLeftRoot:"sv_qstn_left",title:"",titleExpandable:"sv_q_title_expandable",titleExpanded:"sv_q_title_expanded",titleCollapsed:"sv_q_title_collapsed",number:"sv_q_num",description:"small",descriptionUnderInput:"small",requiredText:"sv_q_required_text",comment:"form-control",required:"",titleRequired:"",hasError:"has-error",indent:20,formGroup:"form-group"},panel:{title:"sv_p_title",titleExpandable:"sv_p_title_expandable",titleExpanded:"sv_p_title_expanded",titleCollapsed:"sv_p_title_collapsed",titleOnError:"",icon:"sv_panel_icon",iconExpanded:"sv_expanded",description:"small sv_p_description",container:"sv_p_container",footer:"sv_p_footer",number:"sv_q_num",requiredText:"sv_q_required_text"},error:{root:"alert alert-danger",icon:"glyphicon glyphicon-exclamation-sign",item:"",locationTop:"sv_qstn_error_top",locationBottom:"sv_qstn_error_bottom"},boolean:{root:"sv_qbln form-inline checkbox",rootRadio:"sv_qbln form-inline checkbox",item:"sv-boolean",control:"sv-visuallyhidden",controlCheckbox:"sv-visuallyhidden",itemChecked:"sv-boolean--checked checked",itemIndeterminate:"sv-boolean--indeterminate",itemDisabled:"sv-boolean--disabled",switch:"sv-boolean__switch",slider:"sv-boolean__slider",label:"sv-boolean__label ",disabledLabel:"sv-boolean__label--disabled",materialDecorator:"sv-item__decorator sv-boolean__decorator",itemDecorator:"sv-item__svg sv-boolean__svg",checkedPath:"sv-boolean__checked-path",uncheckedPath:"sv-boolean__unchecked-path",indeterminatePath:"sv-boolean__indeterminate-path"},checkbox:{root:"sv_qcbc sv_qcbx form-inline",item:"checkbox",itemChecked:"checked",itemSelectAll:"sv_q_checkbox_selectall",itemNone:"sv_q_checkbox_none",itemInline:"sv_q_checkbox_inline",itemControl:"",itemDecorator:"sv-hidden",label:"",labelChecked:"",controlLabel:"",materialDecorator:"checkbox-material",other:"sv_q_checkbox_other form-control",column:"sv_q_select_column"},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sv-ranking--disabled",item:"sv-ranking-item",itemContent:"sv-ranking-item__content",itemIndex:"sv-ranking-item__index",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking-item--drag"},comment:"form-control",dropdown:{root:"sv_q_dd_root",selectWrapper:"sv_q_dd_select_wrapper",control:"form-control sv_q_dd_control",other:"sv_q_dd_other form-control",cleanButton:"sv_q_dd_clean-button",cleanButtonSvg:"sv_q_dd_clean-button-svg",cleanButtonIconId:"icon-clear_16x16"},tagbox:{root:"sv_q_dd_root",selectWrapper:"sv_q_dd_select_wrapper",control:"form-control sv_q_dd_control",other:"sv_q_dd_other form-control",cleanButton:"sv_q_dd_clean-button",cleanButtonSvg:"sv_q_dd_clean-button-svg",cleanButtonIconId:"icon-clear_16x16"},html:{root:""},image:{root:"sv_q_image",image:"sv_image_image"},matrix:{root:"table sv_q_matrix",label:"sv_q_m_label",itemChecked:"checked",itemDecorator:"sv-hidden",cellText:"sv_q_m_cell_text",cellTextSelected:"sv_q_m_cell_selected bg-primary",cellLabel:"sv_q_m_cell_label",cellResponsiveTitle:"sv-hidden"},matrixdropdown:{root:"table",cell:"sv_matrix_cell",headerCell:"sv_matrix_cell_header",row:"sv_matrix_row",rowAdditional:"sv-matrix__row--additional",detailRow:"sv_matrix_detail_row",detailRowText:"sv_matrix_cell_detail_rowtext",detailCell:"sv_matrix_cell_detail",detailButton:"sv_matrix_cell_detail_button",detailButtonExpanded:"sv_matrix_cell_detail_button_expanded",detailIcon:"sv_detail_panel_icon",detailIconExpanded:"sv_detail_expanded",detailPanelCell:"sv_matrix_cell_detail_panel",actionsCell:"sv_matrix_cell sv_matrix_cell_actions"},matrixdynamic:{root:"table",button:"button",buttonAdd:"",buttonRemove:"",iconAdd:"",iconRemove:"",iconDrag:"sv-matrixdynamic__drag-icon",headerCell:"sv_matrix_cell_header",row:"sv_matrix_row",detailRow:"sv_matrix_detail_row",detailCell:"sv_matrix_cell_detail",detailButton:"sv_matrix_cell_detail_button",detailButtonExpanded:"sv_matrix_cell_detail_button_expanded",detailIcon:"sv_detail_panel_icon",detailIconExpanded:"sv_detail_expanded",detailPanelCell:"sv_matrix_cell_detail_panel",actionsCell:"sv_matrix_cell sv_matrix_cell_actions",emptyRowsSection:"sv_matrix_empty_rows_section",emptyRowsText:"sv_matrix_empty_rows_text",emptyRowsButton:"",ghostRow:"sv-matrix-row--drag-drop-ghost-mod"},paneldynamic:{root:"",navigation:"sv-paneldynamic__navigation",progressTop:"sv-paneldynamic__progress sv-paneldynamic__progress--top",progressBottom:"sv-paneldynamic__progress sv-paneldynamic__progress--bottom",title:"sv-title sv-question__title",button:"button",buttonAdd:"button sv-paneldynamic__add-btn",buttonRemove:"sv_p_remove_btn",buttonRemoveRight:"button sv-paneldynamic__remove-btn--right",buttonPrev:"sv-paneldynamic__prev-btn",buttonNext:"sv-paneldynamic__next-btn",buttonPrevDisabled:"sv-paneldynamic__prev-btn--disabled",buttonNextDisabled:"sv-paneldynamic__next-btn--disabled",progressContainer:"sv-paneldynamic__progress-container",progress:"sv-progress",progressBar:"sv-progress__bar",progressText:"sv-paneldynamic__progress-text",panelWrapper:"sv_p_wrapper",panelWrapperInRow:"sv_p_wrapper_in_row",footer:"",progressBtnIcon:"icon-progressbutton"},multipletext:{root:"sv_q_mt table",itemTitle:"sv_q_mt_title",item:"sv_q_mt_item",itemLabel:"sv_q_mt_label",row:"form-group bmd-form-group",itemValue:"sv_q_mt_item_value form-control"},radiogroup:{root:"sv_qcbc form-inline",item:"radio",itemChecked:"checked",itemInline:"sv_q_radiogroup_inline",label:"",labelChecked:"",itemControl:"",itemDecorator:"sv-hidden",controlLabel:"",materialDecorator:"circle",other:"sv_q_radiogroup_other form-control",clearButton:"sv_q_radiogroup_clear button",column:"sv_q_select_column"},buttongroup:{root:"sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemHover:"sv-button-group__item--hover",itemSelected:"sv-button-group__item--selected",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden"},imagepicker:{root:"sv_imgsel",item:"sv_q_imgsel",itemChecked:"checked",itemInline:"sv_q_imagepicker_inline",label:"sv_q_imgsel_label",itemControl:"sv_q_imgsel_control_item",image:"sv_q_imgsel_image",itemText:"sv_q_imgsel_text",clearButton:"sv_q_radiogroup_clear"},rating:{root:"btn-group",item:"btn btn-default btn-secondary",selected:"active",minText:"sv_q_rating_min_text",itemText:"sv_q_rating_item_text",maxText:"sv_q_rating_max_text",disabled:""},text:"form-control",expression:"form-control",file:{root:"sv_q_file",placeholderInput:"sv_q_file_placeholder",preview:"sv_q_file_preview",removeButton:"sv_q_file_remove_button",fileInput:"sv_q_file_input",removeFile:"sv_q_file_remove",fileDecorator:"sv-hidden",fileSign:"sv_q_file_sign",removeButtonBottom:"sv-hidden",dragAreaPlaceholder:"sv-hidden",fileList:""},signaturepad:{root:"sv_q_signaturepad sjs_sp_container",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"alert alert-info",error:"alert alert-danger",success:"alert alert-success",saveAgainButton:""},window:{root:"modal-content",body:"modal-body",header:{root:"modal-header panel-title",title:"pull-left",button:"glyphicon pull-right",buttonExpanded:"glyphicon pull-right glyphicon-chevron-up",buttonCollapsed:"glyphicon pull-right glyphicon-chevron-down"}}};r.surveyCss.bootstrap=i},"./src/defaultCss/cssbootstrapmaterial.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"defaultBootstrapMaterialCss",function(){return i});var r=n("./src/defaultCss/cssstandard.ts"),i={root:"sv_main sv_bootstrapmaterial_css",container:"sv_container",header:"card-heading",body:"card-body",bodyEmpty:"card-body sv_body_empty",footer:"card-footer",title:"",description:"",logo:"sv_logo",logoImage:"sv_logo__image",headerText:"sv_header__text",navigationButton:"btn-primary sv_nav_btn",completedPage:"",navigation:{complete:"sv_complete_btn",prev:"sv_prev_btn",next:"sv_next_btn",start:"sv_start_btn",preview:"sv_preview_btn",edit:"sv_edit_btn"},progress:"progress center-block mx-auto mb-4",progressBar:"progress-bar",progressTextUnderBar:"sv-hidden",progressTextInBar:"sv-hidden",progressButtonsContainerCenter:"sv_progress-buttons__container-center",progressButtonsContainer:"sv_progress-buttons__container",progressButtonsImageButtonLeft:"sv_progress-buttons__image-button-left",progressButtonsImageButtonRight:"sv_progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sv_progress-buttons__image-button--hidden",progressButtonsListContainer:"sv_progress-buttons__list-container",progressButtonsList:"sv_progress-buttons__list",progressButtonsListElementPassed:"sv_progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sv_progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sv_progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sv_progress-buttons__page-title",progressButtonsPageDescription:"sv_progress-buttons__page-description",page:{root:"",title:"",description:"small"},pageTitle:"",pageDescription:"small",row:"sv_row",question:{mainRoot:"sv_qstn form-group bmd-form-group",flowRoot:"sv_q_flow form-group bmd-form-group",header:"",headerLeft:"title-left",content:"",contentLeft:"content-left",titleLeftRoot:"sv_qstn_left",requiredText:"sv_q_required_text",title:"",titleExpandable:"sv_q_title_expandable",titleExpanded:"sv_q_title_expanded",titleCollapsed:"sv_q_title_collapsed",number:"sv_q_num",description:"small",descriptionUnderInput:"small",comment:"form-control",required:"",titleRequired:"",hasError:"has-error",indent:20,formGroup:"form-group bmd-form-group"},panel:{title:"sv_p_title",titleExpandable:"sv_p_title_expandable",titleExpanded:"sv_p_title_expanded",titleCollapsed:"sv_p_title_collapsed",titleOnError:"",icon:"sv_panel_icon",iconExpanded:"sv_expanded",description:"small sv_p_description",container:"sv_p_container",footer:"sv_p_footer",number:"sv_q_num",requiredText:"sv_q_required_text"},error:{root:"alert alert-danger",icon:"glyphicon glyphicon-exclamation-sign",item:"",locationTop:"sv_qstn_error_top",locationBottom:"sv_qstn_error_bottom"},boolean:{root:"sv_qbln checkbox",rootRadio:"sv_qbln form-inline checkbox",item:"sv-boolean",control:"sv-visuallyhidden",controlCheckbox:"sv-visuallyhidden",itemChecked:"sv-boolean--checked checked",itemIndeterminate:"sv-boolean--indeterminate",itemDisabled:"sv-boolean--disabled",switch:"sv-boolean__switch",slider:"sv-boolean__slider",label:"sv-boolean__label ",disabledLabel:"sv-boolean__label--disabled",materialDecorator:"sv-item__decorator sv-boolean__decorator",itemDecorator:"sv-item__svg sv-boolean__svg",checkedPath:"sv-boolean__checked-path",uncheckedPath:"sv-boolean__unchecked-path",indeterminatePath:"sv-boolean__indeterminate-path"},checkbox:{root:"sv_qcbx",item:"checkbox",itemChecked:"checked",itemSelectAll:"sv_q_checkbox_selectall",itemNone:"sv_q_checkbox_none",itemInline:"sv_q_checkbox_inline",itemDecorator:"sv-hidden",itemControl:"",label:"",labelChecked:"",controlLabel:"",materialDecorator:"checkbox-decorator",other:"sv_q_checkbox_other form-control",column:"sv_q_select_column"},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sv-ranking--disabled",item:"sv-ranking-item",itemContent:"sv-ranking-item__content",itemIndex:"sv-ranking-item__index",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking-item--drag"},comment:"form-control",dropdown:{root:"sv_q_dd_root",selectWrapper:"sv_q_dd_select_wrapper",control:"form-control sv_q_dd_control",other:"sv_q_dd_other form-control",cleanButton:"sv_q_dd_clean-button",cleanButtonSvg:"sv_q_dd_clean-button-svg",cleanButtonIconId:"icon-clear_16x16"},tagbox:{root:"sv_q_dd_root",selectWrapper:"sv_q_dd_select_wrapper",control:"form-control sv_q_dd_control",other:"sv_q_dd_other form-control",cleanButton:"sv_q_dd_clean-button",cleanButtonSvg:"sv_q_dd_clean-button-svg",cleanButtonIconId:"icon-clear_16x16"},html:{root:""},image:{root:"sv_q_image",image:"sv_image_image"},matrix:{root:"table sv_q_matrix",row:"form-group bmd-form-group",label:"sv_q_m_label radio-inline",cellText:"sv_q_m_cell_text",cellTextSelected:"sv_q_m_cell_selected bg-primary",cellLabel:"sv_q_m_cell_label",itemValue:"form-control",itemChecked:"checked",itemDecorator:"sv-hidden",materialDecorator:"bmd-radio",cellResponsiveTitle:"sv-hidden"},matrixdropdown:{root:"table",itemValue:"form-group bmd-form-group",headerCell:"sv_matrix_cell_header",row:"sv_matrix_row",rowAdditional:"sv-matrix__row--additional",detailRow:"sv_matrix_detail_row",detailRowText:"sv_matrix_cell_detail_rowtext",detailCell:"sv_matrix_cell_detail",detailButton:"sv_matrix_cell_detail_button",detailButtonExpanded:"sv_matrix_cell_detail_button_expanded",detailIcon:"sv_detail_panel_icon",detailIconExpanded:"sv_detail_expanded",detailPanelCell:"sv_matrix_cell_detail_panel",actionsCell:"sv_matrix_cell sv_matrix_cell_actions"},matrixdynamic:{mainRoot:"sv_qstn",flowRoot:"sv_q_flow",root:"table",button:"btn btn-primary",itemValue:"form-group bmd-form-group",buttonAdd:"",buttonRemove:"",iconAdd:"",iconRemove:"",iconDrag:"sv-matrixdynamic__drag-icon",headerCell:"sv_matrix_cell_header",row:"sv_matrix_row",detailRow:"sv_matrix_detail_row",detailCell:"sv_matrix_cell_detail",detailButton:"sv_matrix_cell_detail_button",detailButtonExpanded:"sv_matrix_cell_detail_button_expanded",detailIcon:"sv_detail_panel_icon",detailIconExpanded:"sv_detail_expanded",detailPanelCell:"sv_matrix_cell_detail_panel",actionsCell:"sv_matrix_cell sv_matrix_cell_actions",emptyRowsSection:"sv_matrix_empty_rows_section",emptyRowsText:"sv_matrix_empty_rows_text",emptyRowsButton:"",ghostRow:"sv-matrix-row--drag-drop-ghost-mod"},paneldynamic:{root:"",navigation:"sv-paneldynamic__navigation",progressTop:"sv-paneldynamic__progress sv-paneldynamic__progress--top",progressBottom:"sv-paneldynamic__progress sv-paneldynamic__progress--bottom",title:"sv-title sv-question__title",button:"button",buttonAdd:"button sv-paneldynamic__add-btn btn btn-primary",buttonRemove:"button sv-paneldynamic__remove-btn btn btn-primary",buttonRemoveRight:"sv-paneldynamic__remove-btn--right",buttonPrev:"sv-paneldynamic__prev-btn",buttonNext:"sv-paneldynamic__next-btn",buttonPrevDisabled:"sv-paneldynamic__prev-btn--disabled",buttonNextDisabled:"sv-paneldynamic__next-btn--disabled",progressContainer:"sv-paneldynamic__progress-container",progress:"sv-progress",progressBar:"sv-progress__bar",progressText:"sv-paneldynamic__progress-text",panelWrapper:"sv_p_wrapper",panelWrapperInRow:"sv_p_wrapper_in_row",progressBtnIcon:"icon-progressbutton",footer:""},multipletext:{root:"sv_q_mt table",itemTitle:"sv_q_mt_title",item:"sv_q_mt_item",itemLabel:"sv_q_mt_label",row:"form-group bmd-form-group",itemValue:"sv_q_mt_item_value form-control"},radiogroup:{root:"",item:"radio",itemChecked:"checked",itemInline:"sv_q_radiogroup_inline",itemDecorator:"sv-hidden",label:"",labelChecked:"",itemControl:"",controlLabel:"sv_q_radiogroup_control_label",materialDecorator:"bmd-radio",other:"sv_q_radiogroup_other form-control",clearButton:"sv_q_radiogroup_clear button btn btn-primary",column:"sv_q_select_column"},buttongroup:{root:"sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemSelected:"sv-button-group__item--selected",itemHover:"sv-button-group__item--hover",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden"},imagepicker:{root:"sv_imgsel",item:"sv_q_imgsel",itemChecked:"checked",itemInline:"sv_q_imagepicker_inline",label:"sv_q_imgsel_label",itemControl:"sv_q_imgsel_control_item",image:"sv_q_imgsel_image",itemText:"sv_q_imgsel_text",clearButton:"sv_q_radiogroup_clear"},rating:{root:"btn-group",item:"btn btn-default btn-secondary",selected:"active",minText:"sv_q_rating_min_text",itemText:"sv_q_rating_item_text",maxText:"sv_q_rating_max_text",disabled:""},text:"form-control",expression:"form-control",file:{root:"form-group bmd-form-group is-fileinput sv_q_file",placeholderInput:"",preview:"sv_q_file_preview",removeButton:"sv_q_file_remove_button",fileInput:"sv_q_file_input",fileSign:"sv_q_file_sign",removeFile:"sv_q_file_remove",fileDecorator:"sv-hidden",removeButtonBottom:"sv-hidden",dragAreaPlaceholder:"sv-hidden",fileList:""},signaturepad:{root:"sv_q_signaturepad sjs_sp_container",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"alert alert-info",error:"alert alert-danger",success:"alert alert-success",saveAgainButton:""},window:{root:"modal-content",body:"modal-body",header:{root:"modal-header card-title",title:"pull-left",button:"glyphicon pull-right",buttonExpanded:"glyphicon pull-right glyphicon-chevron-up",buttonCollapsed:"glyphicon pull-right glyphicon-chevron-down"}}};r.surveyCss.bootstrapmaterial=i},"./src/defaultCss/cssmodern.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"modernCss",function(){return i});var r=n("./src/defaultCss/cssstandard.ts"),i={root:"sv-root-modern",timerRoot:"sv-body__timer",container:"sv-container-modern",header:"sv-title sv-container-modern__title",headerClose:"sv-container-modern__close",body:"sv-body",bodyEmpty:"sv-body sv-body--empty",footer:"sv-footer sv-body__footer sv-clearfix",title:"",description:"",logo:"sv-logo",logoImage:"sv-logo__image",headerText:"sv-header__text",navigationButton:"sv-btn sv-btn--navigation",completedPage:"sv-completedpage",navigation:{complete:"sv-footer__complete-btn",prev:"sv-footer__prev-btn",next:"sv-footer__next-btn",start:"sv-footer__start-btn",preview:"sv-footer__preview-btn",edit:"sv-footer__edit-btn"},panel:{title:"sv-title sv-panel__title",titleExpandable:"sv-panel__title--expandable",titleExpanded:"sv-panel__title--expanded",titleCollapsed:"sv-panel__title--collapsed",titleOnError:"sv-panel__title--error",description:"sv-description sv-panel__description",container:"sv-panel sv-row__panel",content:"sv-panel__content",icon:"sv-panel__icon",iconExpanded:"sv-panel__icon--expanded",footer:"sv-panel__footer",requiredText:"sv-panel__required-text",number:"sv-question__num"},paneldynamic:{root:"sv-paneldynamic",navigation:"sv-paneldynamic__navigation",title:"sv-title sv-question__title",button:"sv-btn",buttonRemove:"sv-paneldynamic__remove-btn",buttonRemoveRight:"sv-paneldynamic__remove-btn--right",buttonAdd:"sv-paneldynamic__add-btn",progressTop:"sv-paneldynamic__progress sv-paneldynamic__progress--top",progressBottom:"sv-paneldynamic__progress sv-paneldynamic__progress--bottom",buttonPrev:"sv-paneldynamic__prev-btn",buttonNext:"sv-paneldynamic__next-btn",buttonPrevDisabled:"sv-paneldynamic__prev-btn--disabled",buttonNextDisabled:"sv-paneldynamic__next-btn--disabled",progressContainer:"sv-paneldynamic__progress-container",progress:"sv-progress",progressBar:"sv-progress__bar",progressText:"sv-paneldynamic__progress-text",separator:"sv-paneldynamic__separator",panelWrapper:"sv-paneldynamic__panel-wrapper",panelWrapperInRow:"sv-paneldynamic__panel-wrapper--in-row",progressBtnIcon:"icon-progressbutton",footer:""},progress:"sv-progress sv-body__progress",progressBar:"sv-progress__bar",progressText:"sv-progress__text",progressTextInBar:"sv-hidden",progressButtonsContainerCenter:"sv_progress-buttons__container-center",progressButtonsContainer:"sv_progress-buttons__container",progressButtonsImageButtonLeft:"sv_progress-buttons__image-button-left",progressButtonsImageButtonRight:"sv_progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sv_progress-buttons__image-button--hidden",progressButtonsListContainer:"sv_progress-buttons__list-container",progressButtonsList:"sv_progress-buttons__list",progressButtonsListElementPassed:"sv_progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sv_progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sv_progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sv_progress-buttons__page-title",progressButtonsPageDescription:"sv_progress-buttons__page-description",page:{root:"sv-page sv-body__page",title:"sv-title sv-page__title",description:"sv-description sv-page__description"},pageTitle:"sv-title sv-page__title",pageDescription:"sv-description sv-page__description",row:"sv-row sv-clearfix",question:{mainRoot:"sv-question sv-row__question",flowRoot:"sv-question sv-row__question sv-row__question--flow",asCell:"sv-table__cell",header:"sv-question__header",headerLeft:"sv-question__header--location--left",headerTop:"sv-question__header--location--top",headerBottom:"sv-question__header--location--bottom",content:"sv-question__content",contentLeft:"sv-question__content--left",titleLeftRoot:"",answered:"sv-question--answered",titleOnAnswer:"sv-question__title--answer",titleOnError:"sv-question__title--error",title:"sv-title sv-question__title",titleExpandable:"sv-question__title--expandable",titleExpanded:"sv-question__title--expanded",titleCollapsed:"sv-question__title--collapsed",icon:"sv-question__icon",iconExpanded:"sv-question__icon--expanded",requiredText:"sv-question__required-text",number:"sv-question__num",description:"sv-description sv-question__description",descriptionUnderInput:"sv-description sv-question__description",comment:"sv-comment",required:"sv-question--required",titleRequired:"sv-question__title--required",indent:20,footer:"sv-question__footer",formGroup:"sv-question__form-group",hasError:"",disabled:"sv-question--disabled"},image:{root:"sv-image",image:"sv_image_image"},error:{root:"sv-question__erbox",icon:"",item:"",locationTop:"sv-question__erbox--location--top",locationBottom:"sv-question__erbox--location--bottom"},checkbox:{root:"sv-selectbase",item:"sv-item sv-checkbox sv-selectbase__item",itemSelectAll:"sv-checkbox--selectall",itemNone:"sv-checkbox--none",itemDisabled:"sv-item--disabled sv-checkbox--disabled",itemChecked:"sv-checkbox--checked",itemHover:"sv-checkbox--allowhover",itemInline:"sv-selectbase__item--inline",label:"sv-selectbase__label",labelChecked:"",itemControl:"sv-visuallyhidden sv-item__control",itemDecorator:"sv-item__svg sv-checkbox__svg",itemSvgIconId:"#icon-moderncheck",controlLabel:"sv-item__control-label",materialDecorator:"sv-item__decorator sv-selectbase__decorator sv-checkbox__decorator",other:"sv-comment sv-question__other",column:"sv-selectbase__column"},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sv-ranking--disabled",item:"sv-ranking-item",itemContent:"sv-ranking-item__content",itemIndex:"sv-ranking-item__index",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking-item--drag"},radiogroup:{root:"sv-selectbase",item:"sv-item sv-radio sv-selectbase__item",itemInline:"sv-selectbase__item--inline",label:"sv-selectbase__label",labelChecked:"",itemDisabled:"sv-item--disabled sv-radio--disabled",itemChecked:"sv-radio--checked",itemHover:"sv-radio--allowhover",itemControl:"sv-visuallyhidden sv-item__control",itemDecorator:"sv-item__svg sv-radio__svg",itemSvgIconId:"#icon-modernradio",controlLabel:"sv-item__control-label",materialDecorator:"sv-item__decorator sv-selectbase__decorator sv-radio__decorator",other:"sv-comment sv-question__other",clearButton:"sv-btn sv-selectbase__clear-btn",column:"sv-selectbase__column"},buttongroup:{root:"sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemSelected:"sv-button-group__item--selected",itemHover:"sv-button-group__item--hover",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden"},boolean:{root:"sv_qbln",rootRadio:"sv_qbln",small:"sv-row__question--small",item:"sv-boolean sv-item",control:"sv-visuallyhidden",itemChecked:"sv-boolean--checked",itemIndeterminate:"sv-boolean--indeterminate",itemDisabled:"sv-item--disabled sv-boolean--disabled",switch:"sv-boolean__switch",slider:"sv-boolean__slider",label:"sv-boolean__label",disabledLabel:"sv-boolean__label--disabled",rootCheckbox:"sv_qbln",checkboxItem:"sv-boolean sv-item",checkboxItemChecked:"sv-boolean--checked",controlCheckbox:"sv-visuallyhidden",checkboxControlLabel:"sv-boolean__label",checkboxItemIndeterminate:"sv-boolean--indeterminate",checkboxItemDisabled:"sv-item--disabled sv-boolean--disabled",checkboxMaterialDecorator:"sv-item__decorator sv-boolean__decorator ",checkboxItemDecorator:"sv-item__svg  sv-boolean__svg",indeterminatePath:"sv-boolean__indeterminate-path",svgIconCheckedId:"#icon-modernbooleancheckchecked",svgIconUncheckedId:"#icon-modernbooleancheckunchecked",svgIconIndId:"#icon-modernbooleancheckind"},text:{root:"sv-text",small:"sv-row__question--small",onError:"sv-text--error"},multipletext:{root:"sv-multipletext",item:"sv-multipletext__item",itemLabel:"sv-multipletext__item-label",itemTitle:"sv-multipletext__item-title",row:"sv-multipletext__row",cell:"sv-multipletext__cell"},dropdown:{root:"",small:"sv-row__question--small",control:"sv-dropdown",selectWrapper:"",other:"sv-comment sv-question__other",onError:"sv-dropdown--error",cleanButton:"sv-dropdown_clean-button",cleanButtonSvg:"sv-dropdown_clean-button-svg",cleanButtonIconId:"icon-clear_16x16",filterStringInput:"sv-dropdown__filter-string-input",controlValue:"sv-dropdown__value"},tagbox:{root:"",small:"sv-row__question--small",selectWrapper:"sv_select_wrapper sv-tagbox_wrapper",other:"sv-input sv-comment sv-selectbase__other",cleanButton:"sv-tagbox_clean-button sv-dropdown_clean-button",cleanButtonSvg:"sv-tagbox_clean-button-svg sv-dropdown_clean-button-svg",cleanButtonIconId:"icon-clear_16x16",cleanItemButton:"sv-tagbox__item_clean-button",cleanItemButtonSvg:"sv-tagbox__item_clean-button-svg",cleanItemButtonIconId:"icon-clear_16x16",control:"sv-input sv-tagbox sv-dropdown",controlValue:"sv-tagbox__value sv-dropdown__value",controlEmpty:"sv-dropdown--empty sv-tagbox--empty",placeholderInput:"sv-tagbox__placeholder",filterStringInput:"sv-tagbox__filter-string-input sv-dropdown__filter-string-input"},imagepicker:{root:"sv-selectbase sv-imagepicker",column:"sv-selectbase__column",item:"sv-imagepicker__item",itemInline:"sv-imagepicker__item--inline",itemChecked:"sv-imagepicker__item--checked",itemDisabled:"sv-imagepicker__item--disabled",itemHover:"sv-imagepicker__item--allowhover",label:"sv-imagepicker__label",itemControl:"sv-imagepicker__control sv-visuallyhidden",image:"sv-imagepicker__image",itemText:"sv-imagepicker__text",clearButton:"sv-btn",other:"sv-comment sv-question__other"},matrix:{tableWrapper:"sv-matrix",root:"sv-table sv-matrix-root",rowError:"sv-matrix__row--error",cell:"sv-table__cell sv-matrix__cell",headerCell:"sv-table__cell sv-table__cell--header",label:"sv-item sv-radio sv-matrix__label",itemValue:"sv-visuallyhidden sv-item__control sv-radio__control",itemChecked:"sv-radio--checked",itemDisabled:"sv-item--disabled sv-radio--disabled",itemHover:"sv-radio--allowhover",materialDecorator:"sv-item__decorator sv-radio__decorator",itemDecorator:"sv-item__svg sv-radio__svg",cellText:"sv-matrix__text",cellTextSelected:"sv-matrix__text--checked",cellTextDisabled:"sv-matrix__text--disabled",cellResponsiveTitle:"sv-hidden",itemSvgIconId:"#icon-modernradio"},matrixdropdown:{root:"sv-table sv-matrixdropdown",cell:"sv-table__cell",headerCell:"sv-table__cell sv-table__cell--header",row:"sv-table__row",rowAdditional:"sv-table__row--additional",detailRow:"sv-table__row--detail",detailRowText:"sv-table__cell--detail-rowtext",detailCell:"sv-table__cell--detail",choiceCell:"sv-table__cell--choice",detailButton:"sv-table__cell--detail-button",detailButtonExpanded:"sv-table__cell--detail-button--expanded",detailIcon:"sv-detail-panel__icon",detailIconExpanded:"sv-detail-panel__icon--expanded",detailPanelCell:"sv-table__cell--detail-panel",actionsCell:"sv-table__cell sv-table__cell--actions"},matrixdynamic:{root:"sv-table sv-matrixdynamic",cell:"sv-table__cell",headerCell:"sv-table__cell sv-table__cell--header",button:"sv-btn",buttonAdd:"sv-matrixdynamic__add-btn",buttonRemove:"sv-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",iconDrag:"sv-matrixdynamic__drag-icon",row:"sv-table__row",detailRow:"sv-table__row--detail",detailCell:"sv-table__cell--detail",choiceCell:"sv-table__cell--choice",detailButton:"sv-table__cell--detail-button",detailButtonExpanded:"sv-table__cell--detail-button--expanded",detailIcon:"sv-detail-panel__icon",detailIconExpanded:"sv-detail-panel__icon--expanded",detailPanelCell:"sv-table__cell--detail-panel",actionsCell:"sv-table__cell sv-table__cell--actions",emptyRowsSection:"sv-table__empty--rows--section",emptyRowsText:"sv-table__empty--rows--text",emptyRowsButton:"",ghostRow:"sv-matrix-row--drag-drop-ghost-mod"},rating:{root:"sv-rating",item:"sv-rating__item",selected:"sv-rating__item--selected",minText:"sv-rating__min-text",itemText:"sv-rating__item-text",maxText:"sv-rating__max-text",itemDisabled:"sv-rating--disabled",filterStringInput:"sv-dropdown__filter-string-input"},comment:{root:"sv-comment",small:"sv-row__question--small"},expression:"",file:{root:"sv-file",other:"sv-comment sv-question__other",placeholderInput:"sv-visuallyhidden",preview:"sv-file__preview",fileSignBottom:"sv-file__sign",fileDecorator:"sv-file__decorator",fileInput:"sv-visuallyhidden",noFileChosen:"sv-description sv-file__no-file-chosen",chooseFile:"sv-btn sv-file__choose-btn",controlDisabled:"sv-file__choose-btn--disabled",removeButton:"sv-hidden",removeButtonBottom:"sv-btn sv-file__clean-btn",removeFile:"sv-hidden",removeFileSvg:"sv-file__remove-svg",removeFileSvgIconId:"icon-removefile",wrapper:"sv-file__wrapper",dragAreaPlaceholder:"sv-hidden",fileList:""},signaturepad:{root:"sv-signaturepad sjs_sp_container",small:"sv-row__question--small",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},variables:{themeMark:"--sv-modern-mark"}};r.surveyCss.modern=i},"./src/defaultCss/cssstandard.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"surveyCss",function(){return r}),n.d(t,"defaultStandardCss",function(){return i});var r={currentType:"",getCss:function(){var e=this.currentType?this[this.currentType]:i;return e||(e=i),e}},i={root:"sv_main sv_default_css",container:"sv_container",header:"sv_header",body:"sv_body",bodyEmpty:"sv_body sv_body_empty",footer:"sv_nav",title:"",description:"",logo:"sv_logo",logoImage:"sv_logo__image",headerText:"sv_header__text",navigationButton:"sv_nav_btn",completedPage:"sv_completed_page",navigation:{complete:"sv_complete_btn",prev:"sv_prev_btn",next:"sv_next_btn",start:"sv_start_btn",preview:"sv_preview_btn",edit:"sv_edit_btn"},progress:"sv_progress",progressBar:"sv_progress_bar",progressTextInBar:"sv-hidden",progressButtonsContainerCenter:"sv_progress-buttons__container-center",progressButtonsContainer:"sv_progress-buttons__container",progressButtonsImageButtonLeft:"sv_progress-buttons__image-button-left",progressButtonsImageButtonRight:"sv_progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sv_progress-buttons__image-button--hidden",progressButtonsListContainer:"sv_progress-buttons__list-container",progressButtonsList:"sv_progress-buttons__list",progressButtonsListElementPassed:"sv_progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sv_progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sv_progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sv_progress-buttons__page-title",progressButtonsPageDescription:"sv_progress-buttons__page-description",page:{root:"sv_p_root",title:"sv_page_title",description:""},pageTitle:"sv_page_title",pageDescription:"",row:"sv_row",question:{mainRoot:"sv_q sv_qstn",flowRoot:"sv_q_flow sv_qstn",header:"",headerLeft:"title-left",content:"",contentLeft:"content-left",titleLeftRoot:"sv_qstn_left",requiredText:"sv_q_required_text",title:"sv_q_title",titleExpandable:"sv_q_title_expandable",titleExpanded:"sv_q_title_expanded",titleCollapsed:"sv_q_title_collapsed",number:"sv_q_num",description:"sv_q_description",comment:"",required:"",titleRequired:"",hasError:"",indent:20,footer:"sv_q_footer",formGroup:"form-group",asCell:"sv_matrix_cell",icon:"sv_question_icon",iconExpanded:"sv_expanded",disabled:"sv_q--disabled"},panel:{title:"sv_p_title",titleExpandable:"sv_p_title_expandable",titleExpanded:"sv_p_title_expanded",titleCollapsed:"sv_p_title_collapsed",titleOnError:"",icon:"sv_panel_icon",iconExpanded:"sv_expanded",description:"sv_p_description",container:"sv_p_container",footer:"sv_p_footer",number:"sv_q_num",requiredText:"sv_q_required_text"},error:{root:"sv_q_erbox",icon:"",item:"",locationTop:"sv_qstn_error_top",locationBottom:"sv_qstn_error_bottom"},boolean:{root:"sv_qcbc sv_qbln",rootRadio:"sv_qcbc sv_qbln",item:"sv-boolean",control:"sv-visuallyhidden",itemChecked:"sv-boolean--checked checked",itemIndeterminate:"sv-boolean--indeterminate",itemDisabled:"sv-boolean--disabled",switch:"sv-boolean__switch",slider:"sv-boolean__slider",label:"sv-boolean__label ",disabledLabel:"sv-boolean__label--disabled",rootCheckbox:"sv_qcbc sv_qbln",checkboxItem:"sv-boolean",checkboxItemChecked:"sv-boolean--checked",controlCheckbox:"sv-visuallyvisible",checkboxControlLabel:"sv-boolean__label",checkboxItemIndeterminate:"sv-boolean--indeterminate",checkboxItemDisabled:"sv-item--disabled sv-boolean--disabled",checkboxMaterialDecorator:"sv-item__decorator sv-boolean__decorator",checkboxItemDecorator:"sv-item__svg sv-boolean__svg"},checkbox:{root:"sv_qcbc sv_qcbx",item:"sv_q_checkbox",itemSelectAll:"sv_q_checkbox_selectall",itemNone:"sv_q_checkbox_none",itemChecked:"checked",itemInline:"sv_q_checkbox_inline",label:"sv_q_checkbox_label",labelChecked:"",itemControl:"sv_q_checkbox_control_item",itemDecorator:"sv-hidden",controlLabel:"sv_q_checkbox_control_label",other:"sv_q_other sv_q_checkbox_other",column:"sv_q_select_column"},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sv-ranking--disabled",item:"sv-ranking-item",itemContent:"sv-ranking-item__content",itemIndex:"sv-ranking-item__index",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking-item--drag"},comment:"",dropdown:{root:"",control:"sv_q_dropdown_control",selectWrapper:"sv_select_wrapper",other:"sv_q_dd_other",cleanButton:"sv_q_dropdown_clean-button",cleanButtonSvg:"sv_q_dropdown_clean-button-svg",cleanButtonIconId:"icon-clear_16x16",controlValue:"sv_q_dropdown__value",filterStringInput:"sv_q_dropdown__filter-string-input"},html:{root:""},image:{root:"sv_q_image",image:"sv_image_image"},matrix:{root:"sv_q_matrix",label:"sv_q_m_label",itemChecked:"checked",itemDecorator:"sv-hidden",cell:"sv_q_m_cell",cellText:"sv_q_m_cell_text",cellTextSelected:"sv_q_m_cell_selected",cellLabel:"sv_q_m_cell_label",cellResponsiveTitle:"sv-hidden"},matrixdropdown:{root:"sv_q_matrix_dropdown",cell:"sv_matrix_cell",headerCell:"sv_matrix_cell_header",row:"sv_matrix_row",rowAdditional:"sv-matrix__row--additional",detailRow:"sv_matrix_detail_row",detailRowText:"sv_matrix_cell_detail_rowtext",detailCell:"sv_matrix_cell_detail",choiceCell:"sv-table__cell--choice",detailButton:"sv_matrix_cell_detail_button",detailButtonExpanded:"sv_matrix_cell_detail_button_expanded",detailIcon:"sv_detail_panel_icon",detailIconExpanded:"sv_detail_expanded",detailPanelCell:"sv_matrix_cell_detail_panel",actionsCell:"sv_matrix_cell sv_matrix_cell_actions"},matrixdynamic:{root:"sv_q_matrix_dynamic",button:"sv_matrix_dynamic_button",buttonAdd:"",buttonRemove:"",iconAdd:"",iconRemove:"",iconDrag:"sv-matrixdynamic__drag-icon",cell:"sv_matrix_cell",headerCell:"sv_matrix_cell_header",row:"sv_matrix_row",detailRow:"sv_matrix_detail_row",detailCell:"sv_matrix_cell_detail",choiceCell:"sv-table__cell--choice",detailButton:"sv_matrix_cell_detail_button",detailButtonExpanded:"sv_matrix_cell_detail_button_expanded",detailIcon:"sv_detail_panel_icon",detailIconExpanded:"sv_detail_expanded",detailPanelCell:"sv_matrix_cell_detail_panel",actionsCell:"sv_matrix_cell sv_matrix_cell_actions",emptyRowsSection:"sv_matrix_empty_rows_section",emptyRowsText:"sv_matrix_empty_rows_text",emptyRowsButton:"",ghostRow:"sv-matrix-row--drag-drop-ghost-mod"},paneldynamic:{root:"sv_panel_dynamic",title:"sv_p_title",button:"",buttonAdd:"sv-paneldynamic__add-btn",buttonRemove:"sv_p_remove_btn",buttonRemoveRight:"sv_p_remove_btn_right",buttonPrev:"sv-paneldynamic__prev-btn",buttonPrevDisabled:"sv-paneldynamic__prev-btn--disabled",buttonNextDisabled:"sv-paneldynamic__next-btn--disabled",buttonNext:"sv-paneldynamic__next-btn",progressContainer:"sv-paneldynamic__progress-container",progress:"sv-progress",progressBar:"sv-progress__bar",progressText:"sv-paneldynamic__progress-text",panelWrapper:"sv_p_wrapper",panelWrapperInRow:"sv_p_wrapper_in_row",footer:"",progressBtnIcon:"icon-progressbutton"},multipletext:{root:"sv_q_mt",itemTitle:"sv_q_mt_title",item:"sv_q_mt_item",row:"sv_q_mt_row",itemLabel:"sv_q_mt_label",itemValue:"sv_q_mt_item_value sv_q_text_root"},radiogroup:{root:"sv_qcbc",item:"sv_q_radiogroup",itemChecked:"checked",itemInline:"sv_q_radiogroup_inline",itemDecorator:"sv-hidden",label:"sv_q_radiogroup_label",labelChecked:"",itemControl:"sv_q_radiogroup_control_item",controlLabel:"",other:"sv_q_other sv_q_radiogroup_other",clearButton:"sv_q_radiogroup_clear",column:"sv_q_select_column"},buttongroup:{root:"sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemHover:"sv-button-group__item--hover",itemSelected:"sv-button-group__item--selected",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden"},imagepicker:{root:"sv_imgsel",item:"sv_q_imgsel",itemChecked:"checked",label:"sv_q_imgsel_label",itemControl:"sv_q_imgsel_control_item",image:"sv_q_imgsel_image",itemInline:"sv_q_imagepicker_inline",itemText:"sv_q_imgsel_text",clearButton:"sv_q_radiogroup_clear",column:"sv_q_select_column"},rating:{root:"sv_q_rating",item:"sv_q_rating_item",selected:"active",minText:"sv_q_rating_min_text",itemText:"sv_q_rating_item_text",maxText:"sv_q_rating_max_text"},text:"sv_q_text_root",expression:"",file:{root:"sv_q_file",placeholderInput:"sv-visuallyhidden",preview:"sv_q_file_preview",removeButton:"sv_q_file_remove_button",fileInput:"sv-visuallyhidden",removeFile:"sv_q_file_remove",fileDecorator:"sv-file__decorator",fileSign:"sv_q_file_sign",chooseFile:"sv_q_file_choose_button",noFileChosen:"sv_q_file_placeholder",dragAreaPlaceholder:"sv-hidden",fileList:""},signaturepad:{root:"sv_q_signaturepad sjs_sp_container",controls:"sjs_sp_controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},variables:{themeMark:"--sv-default-mark"},tagbox:{root:"",small:"sv_q_row__question--small",selectWrapper:"sv_select_wrapper sv_q_tagbox_wrapper",other:"sv_q_input sv_q_comment sv_q_selectbase__other",cleanButton:"sv_q_tagbox_clean-button sv_q_dropdown_clean-button",cleanButtonSvg:"sv_q_tagbox_clean-button-svg sv_q_dropdown_clean-button-svg",cleanButtonIconId:"icon-clear_16x16",cleanItemButton:"sv_q_tagbox-item_clean-button",cleanItemButtonSvg:"sv_q_tagbox-item_clean-button-svg",cleanItemButtonIconId:"icon-clear_16x16",control:"sv_q_input sv_q_tagbox sv_q_dropdown_control",controlValue:"sv_q_tagbox__value sv_q_dropdown__value",controlEmpty:"sv_q_dropdown--empty sv_q_tagbox--empty",placeholderInput:"sv_q_tagbox__placeholder",filterStringInput:"sv_q_tagbox__filter-string-input sv_q_dropdown__filter-string-input"}};r.standard=i},"./src/defaultCss/defaultV2Css.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"defaultV2Css",function(){return i});var r=n("./src/defaultCss/cssstandard.ts"),i={root:"sd-root-modern",rootMobile:"sd-root-modern--mobile",container:"sd-container-modern",header:"sd-title sd-container-modern__title",body:"sd-body",bodyEmpty:"sd-body sd-body--empty",footer:"sd-footer sd-body__navigation sd-clearfix",title:"sd-title",description:"sd-description",logo:"sd-logo",logoImage:"sd-logo__image",headerText:"sd-header__text",headerClose:"sd-hidden",navigationButton:"",bodyNavigationButton:"sd-btn",completedPage:"sd-completedpage",timerRoot:"sd-body__timer",navigation:{complete:"sd-btn--action sd-navigation__complete-btn",prev:"sd-navigation__prev-btn",next:"sd-navigation__next-btn",start:"sd-navigation__start-btn",preview:"sd-navigation__preview-btn",edit:""},panel:{title:"sd-title sd-element__title sd-panel__title",titleExpandable:"sd-element__title--expandable",titleExpanded:"sd-element__title--expanded",titleCollapsed:"sd-element__title--collapsed",titleOnExpand:"sd-panel__title--expanded",titleOnError:"sd-panel__title--error",titleBar:"sd-action-title-bar",description:"sd-description sd-panel__description",container:"sd-element sd-element--complex sd-panel sd-row__panel",withFrame:"sd-element--with-frame",content:"sd-panel__content",icon:"sd-panel__icon",iconExpanded:"sd-panel__icon--expanded",footer:"sd-panel__footer",requiredText:"sd-panel__required-text",header:"sd-panel__header sd-element__header sd-element__header--location-top",collapsed:"sd-element--collapsed",expanded:"sd-element--expanded",nested:"sd-element--nested",invisible:"sd-element--invisible",navigationButton:""},paneldynamic:{mainRoot:"sd-element  sd-question sd-question--paneldynamic sd-element--complex sd-question--complex sd-row__question",empty:"sd-question--empty",root:"sd-paneldynamic",navigation:"sd-paneldynamic__navigation",title:"sd-title sd-element__title sd-question__title",button:"sd-action sd-paneldynamic__btn",buttonRemove:"sd-action--negative sd-paneldynamic__remove-btn",buttonAdd:"sd-paneldynamic__add-btn",buttonPrev:"sd-paneldynamic__prev-btn sd-action--icon sd-action",buttonPrevDisabled:"sd-action--disabled",buttonNextDisabled:"sd-action--disabled",buttonNext:"sd-paneldynamic__next-btn sd-action--icon sd-action",progressContainer:"sd-paneldynamic__progress-container",progress:"sd-progress",progressBar:"sd-progress__bar",progressText:"sd-paneldynamic__progress-text",separator:"sd-paneldynamic__separator",panelWrapper:"sd-paneldynamic__panel-wrapper",footer:"sd-paneldynamic__footer",footerButtonsContainer:"sd-paneldynamic__buttons-container",panelWrapperInRow:"sd-paneldynamic__panel-wrapper--in-row",progressBtnIcon:"icon-progressbuttonv2",noEntriesPlaceholder:"sd-paneldynamic__placeholder sd-question__placeholder"},progress:"sd-progress sd-body__progress",progressBar:"sd-progress__bar",progressText:"sd-progress__text",progressButtonsContainerCenter:"sd-progress-buttons__container-center",progressButtonsContainer:"sd-progress-buttons__container",progressButtonsImageButtonLeft:"sd-progress-buttons__image-button-left",progressButtonsImageButtonRight:"sd-progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sd-progress-buttons__image-button--hidden",progressButtonsListContainer:"sd-progress-buttons__list-container",progressButtonsList:"sd-progress-buttons__list",progressButtonsListElementPassed:"sd-progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sd-progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sd-progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sd-progress-buttons__page-title",progressButtonsPageDescription:"sd-progress-buttons__page-description",progressTextInBar:"sd-hidden",page:{root:"sd-page sd-body__page",emptyHeaderRoot:"sd-page__empty-header",title:"sd-title sd-page__title",description:"sd-description sd-page__description"},pageTitle:"sd-title sd-page__title",pageDescription:"sd-description sd-page__description",row:"sd-row sd-clearfix",rowMultiple:"sd-row--multiple",pageRow:"sd-page__row",question:{mainRoot:"sd-element sd-question sd-row__question",flowRoot:"sd-element sd-question sd-row__question sd-row__question--flow",withFrame:"sd-element--with-frame",asCell:"sd-table__cell",answered:"sd-question--answered",header:"sd-question__header sd-element__header",headerLeft:"sd-question__header--location--left",headerTop:"sd-question__header--location-top sd-element__header--location-top",headerBottom:"sd-question__header--location--bottom",content:"sd-question__content",contentLeft:"sd-question__content--left",titleLeftRoot:"sd-question--left",titleOnAnswer:"sd-question__title--answer",titleOnError:"sd-question__title--error",title:"sd-title sd-element__title sd-question__title",titleExpandable:"sd-element__title--expandable",titleExpanded:"sd-element__title--expanded",titleCollapsed:"sd-element__title--collapsed",titleBar:"sd-action-title-bar",requiredText:"sd-question__required-text",number:"sd-element__num",description:"sd-description sd-question__description",descriptionUnderInput:"sd-description sd-question__description",comment:"sd-input sd-comment",other:"sd-input sd-comment",required:"sd-question--required",titleRequired:"sd-question__title--required",indent:20,footer:"sd-question__footer",formGroup:"sd-question__form-group",hasError:"sd-question--error",collapsed:"sd-element--collapsed",expanded:"sd-element--expanded",nested:"sd-element--nested",invisible:"sd-element--invisible",composite:"sd-element--complex"},image:{mainRoot:"sd-question sd-question--image",root:"sd-image",image:"sd-image__image",adaptive:"sd-image__image--adaptive",withFrame:""},html:{mainRoot:"sd-question sd-row__question sd-question--html",root:"sd-html",withFrame:""},error:{root:"sd-question__erbox",icon:"",item:"",tooltip:"sd-question__erbox--tooltip",outsideQuestion:"sd-question__erbox--outside-question",aboveQuestion:"sd-question__erbox--above-question",belowQuestion:"sd-question__erbox--below-question",locationTop:"sd-question__erbox--location--top",locationBottom:"sd-question__erbox--location--bottom"},checkbox:{root:"sd-selectbase",rootRow:"sd-selectbase--row",rootMultiColumn:"sd-selectbase--multi-column",item:"sd-item sd-checkbox sd-selectbase__item",itemOnError:"sd-item--error",itemSelectAll:"sd-checkbox--selectall",itemNone:"sd-checkbox--none",itemDisabled:"sd-item--disabled sd-checkbox--disabled",itemChecked:"sd-item--checked sd-checkbox--checked",itemHover:"sd-item--allowhover sd-checkbox--allowhover",itemInline:"sd-selectbase__item--inline",label:"sd-selectbase__label",labelChecked:"",itemControl:"sd-visuallyhidden sd-item__control sd-checkbox__control",itemDecorator:"sd-item__svg sd-checkbox__svg",itemSvgIconId:"#icon-v2check",controlLabel:"sd-item__control-label",materialDecorator:"sd-item__decorator sd-checkbox__decorator",other:"sd-input sd-comment sd-selectbase__other",column:"sd-selectbase__column"},radiogroup:{root:"sd-selectbase",rootRow:"sd-selectbase--row",rootMultiColumn:"sd-selectbase--multi-column",item:"sd-item sd-radio sd-selectbase__item",itemOnError:"sd-item--error",itemInline:"sd-selectbase__item--inline",label:"sd-selectbase__label",labelChecked:"",itemDisabled:"sd-item--disabled sd-radio--disabled",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",controlLabel:"sd-item__control-label",materialDecorator:"sd-item__decorator sd-radio__decorator",other:"sd-input sd-comment sd-selectbase__other",clearButton:"",column:"sd-selectbase__column"},boolean:{mainRoot:"sd-element sd-question sd-row__question sd-question--boolean",root:"sv_qcbc sv_qbln sd-scrollable-container",rootRadio:"sv_qcbc sv_qbln sd-scrollable-container sd-scrollable-container--compact",item:"sd-boolean",itemOnError:"sd-boolean--error",control:"sd-boolean__control sd-visuallyhidden",itemChecked:"sd-boolean--checked",itemIndeterminate:"sd-boolean--indeterminate",itemDisabled:"sd-boolean--disabled",label:"sd-boolean__label",switch:"sd-boolean__switch",disabledLabel:"sd-checkbox__label--disabled",sliderText:"sd-boolean__thumb-text",slider:"sd-boolean__thumb",radioItem:"sd-item",radioItemChecked:"sd-item--checked sd-radio--checked",radioLabel:"sd-selectbase__label",radioControlLabel:"sd-item__control-label",radioFieldset:"sd-selectbase",itemRadioDecorator:"sd-item__svg sd-radio__svg",materialRadioDecorator:"sd-item__decorator sd-radio__decorator",itemRadioControl:"sd-visuallyhidden sd-item__control sd-radio__control",rootCheckbox:"sd-selectbase",checkboxItem:"sd-item sd-selectbase__item sd-checkbox",checkboxLabel:"sd-selectbase__label",checkboxItemOnError:"sd-item--error",checkboxItemIndeterminate:"sd-checkbox--intermediate",checkboxItemChecked:"sd-item--checked sd-checkbox--checked",checkboxItemDecorator:"sd-item__svg sd-checkbox__svg",checkboxItemDisabled:"sd-checkbox--disabled",controlCheckbox:"sd-visuallyhidden sd-item__control sd-checkbox__control",checkboxMaterialDecorator:"sd-item__decorator sd-checkbox__decorator",checkboxControlLabel:"sd-item__control-label",svgIconCheckedId:"#icon-v2check"},text:{root:"sd-input sd-text",small:"sd-row__question--small",controlDisabled:"sd-input--disabled",onError:"sd-input--error"},multipletext:{root:"sd-multipletext",itemLabel:"sd-multipletext__item-container sd-input",itemLabelOnError:"sd-multipletext__item-container--error",item:"sd-multipletext__item",itemTitle:"sd-multipletext__item-title",row:"sd-multipletext__row",cell:"sd-multipletext__cell"},dropdown:{root:"sd-selectbase",small:"sd-row__question--small",selectWrapper:"",other:"sd-input sd-comment sd-selectbase__other",onError:"sd-input--error",label:"sd-selectbase__label",item:"sd-item sd-radio sd-selectbase__item",itemDisabled:"sd-item--disabled sd-radio--disabled",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",cleanButton:"sd-dropdown_clean-button",cleanButtonSvg:"sd-dropdown_clean-button-svg",cleanButtonIconId:"icon-clear",control:"sd-input sd-dropdown",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlEmpty:"sd-dropdown--empty",controlLabel:"sd-item__control-label",filterStringInput:"sd-dropdown__filter-string-input",materialDecorator:"sd-item__decorator sd-radio__decorator"},imagepicker:{mainRoot:"sd-element sd-question sd-row__question",root:"sd-selectbase sd-imagepicker",rootColumn:"sd-imagepicker--column",item:"sd-imagepicker__item",itemOnError:"sd-imagepicker__item--error",itemInline:"sd-imagepicker__item--inline",itemChecked:"sd-imagepicker__item--checked",itemDisabled:"sd-imagepicker__item--disabled",itemHover:"sd-imagepicker__item--allowhover",label:"sd-imagepicker__label",itemDecorator:"sd-imagepicker__item-decorator",imageContainer:"sd-imagepicker__image-container",itemControl:"sd-imagepicker__control sd-visuallyhidden",image:"sd-imagepicker__image",itemText:"sd-imagepicker__text",other:"sd-input sd-comment",itemNoImage:"sd-imagepicker__no-image",itemNoImageSvgIcon:"sd-imagepicker__no-image-svg",itemNoImageSvgIconId:"#icon-no-image",column:"sd-selectbase__column sd-imagepicker__column"},matrix:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",tableWrapper:"sd-matrix",root:"sd-table sd-matrix__table",rootVerticalAlignTop:"sd-table--align-top",rootVerticalAlignMiddle:"sd-table--align-middle",rootAlternateRows:"sd-table--alternate-rows",rowError:"sd-matrix__row--error",cell:"sd-table__cell sd-matrix__cell",row:"sd-table__row",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-matrix__cell sd-table__cell--row-text",label:"sd-item sd-radio sd-matrix__label",itemOnError:"sd-item--error",itemValue:"sd-visuallyhidden sd-item__control sd-radio__control",itemChecked:"sd-item--checked sd-radio--checked",itemDisabled:"sd-item--disabled sd-radio--disabled",itemHover:"sd-radio--allowhover",materialDecorator:"sd-item__decorator sd-radio__decorator",itemDecorator:"sd-item__svg sd-radio__svg",cellText:"sd-matrix__text",cellTextSelected:"sd-matrix__text--checked",cellTextDisabled:"sd-matrix__text--disabled",cellResponsiveTitle:"sd-matrix__responsive-title"},matrixdropdown:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",rootScroll:"sd-question--scroll",root:"sd-table sd-matrixdropdown",rootVerticalAlignTop:"sd-table--align-top",rootVerticalAlignMiddle:"sd-table--align-middle",rootAlternateRows:"sd-table--alternate-rows",cell:"sd-table__cell",row:"sd-table__row",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-table__cell--row-text",cellRequiredText:"sd-question__required-text",detailButton:"sd-table__cell--detail-button",detailButtonExpanded:"sd-table__cell--detail-button--expanded",detailIcon:"sd-detail-panel__icon",detailIconExpanded:"sd-detail-panel__icon--expanded",detailIconId:"icon-expanddetail",detailIconExpandedId:"icon-collapsedetail",actionsCell:"sd-table__cell sd-table__cell--actions",emptyCell:"sd-table__cell--empty",verticalCell:"sd-table__cell--vertical",cellQuestionWrapper:"sd-table__question-wrapper"},matrixdynamic:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",rootScroll:"sd-question--scroll",empty:"sd-question--empty",root:"sd-table sd-matrixdynamic",cell:"sd-table__cell",row:"sd-table__row",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-table__cell--row-text",cellRequiredText:"sd-question__required-text",button:"sd-action sd-matrixdynamic__btn",detailRow:"sd-table__row sd-table__row--detail",detailButton:"sd-table__cell--detail-button",detailButtonExpanded:"sd-table__cell--detail-button--expanded",detailIcon:"sd-detail-panel__icon",detailIconExpanded:"sd-detail-panel__icon--expanded",detailIconId:"icon-expanddetail",detailIconExpandedId:"icon-collapsedetail",detailPanelCell:"sd-table__cell--detail-panel",actionsCell:"sd-table__cell sd-table__cell--actions",buttonAdd:"sd-matrixdynamic__add-btn",buttonRemove:"sd-action--negative sd-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",dragElementDecorator:"sd-drag-element__svg",iconDragElement:"#icon-v2dragelement_16x16",footer:"sd-matrixdynamic__footer",emptyRowsSection:"sd-matrixdynamic__placeholder sd-question__placeholder",iconDrag:"sv-matrixdynamic__drag-icon",ghostRow:"sv-matrix-row--drag-drop-ghost-mod",emptyCell:"sd-table__cell--empty",verticalCell:"sd-table__cell--vertical",cellQuestionWrapper:"sd-table__question-wrapper"},rating:{rootDropdown:"sd-scrollable-container sd-scrollable-container--compact sd-selectbase",root:"sd-scrollable-container sd-rating",rootWrappable:"sd-scrollable-container sd-rating sd-rating--wrappable",item:"sd-rating__item",itemOnError:"sd-rating__item--error",itemHover:"sd-rating__item--allowhover",selected:"sd-rating__item--selected",minText:"sd-rating__item-text sd-rating__min-text",itemText:"sd-rating__item-text",maxText:"sd-rating__item-text sd-rating__max-text",itemDisabled:"sd-rating__item--disabled",control:"sd-input sd-dropdown",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlEmpty:"sd-dropdown--empty",filterStringInput:"sd-dropdown__filter-string-input",onError:"sd-input--error"},comment:{root:"sd-input sd-comment",small:"sd-row__question--small",controlDisabled:"sd-input--disabled",onError:"sd-input--error"},expression:"",file:{root:"sd-file",other:"sd-input sd-comment",placeholderInput:"sd-visuallyhidden",preview:"sd-file__preview",fileSign:"",fileList:"sd-file__list",fileSignBottom:"sd-file__sign",fileDecorator:"sd-file__decorator",onError:"sd-file__decorator--error",fileDecoratorDrag:"sd-file__decorator--drag",fileInput:"sd-visuallyhidden",noFileChosen:"sd-description sd-file__no-file-chosen",chooseFile:"sd-file__choose-btn",chooseFileAsText:"sd-action sd-file__choose-btn--text",chooseFileAsTextDisabled:"sd-action--disabled",chooseFileAsIcon:"sd-context-btn sd-file__choose-btn--icon",chooseFileIconId:"icon-choosefile",disabled:"sd-file__choose-btn--disabled",removeButton:"sd-context-btn sd-context-btn--negative sd-file__btn sd-file__clean-btn",removeButtonBottom:"",removeButtonIconId:"icon-clear",removeFile:"sd-hidden",removeFileSvg:"",removeFileSvgIconId:"icon-delete",wrapper:"sd-file__wrapper",defaultImage:"sd-file__default-image",defaultImageIconId:"icon-defaultfile",leftIconId:"icon-arrowleft",rightIconId:"icon-arrowright",removeFileButton:"sd-context-btn sd-context-btn--negative sd-file__remove-file-button",dragAreaPlaceholder:"sd-file__drag-area-placeholder",imageWrapper:"sd-file__image-wrapper",single:"sd-file--single",singleImage:"sd-file--single-image",mobile:"sd-file--mobile"},signaturepad:{mainRoot:"sd-element sd-question sd-question--signature sd-row__question",root:"sd-signaturepad sjs_sp_container",small:"sd-row__question--small",controls:"sjs_sp_controls sd-signaturepad__controls",placeholder:"sjs_sp_placeholder",clearButton:"sjs_sp_clear sd-context-btn sd-context-btn--negative sd-signaturepad__clear",clearButtonIconId:"icon-clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sd-ranking--disabled",rootDesignMode:"sv-ranking--design-mode",item:"sv-ranking-item",itemContent:"sv-ranking-item__content sd-ranking-item__content",itemIndex:"sv-ranking-item__index",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking--drag",itemOnError:"sv-ranking-item--error"},buttongroup:{root:"sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemHover:"sv-button-group__item--hover",itemSelected:"sv-button-group__item--selected",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden"},list:{root:"sv-list__container sd-list",item:"sv-list__item sd-list__item",itemBody:"sv-list__item-body sd-list__item-body",itemSelected:"sv-list__item--selected sd-list__item--selected"},actionBar:{root:"sd-action-bar",item:"sd-action",defaultSizeMode:"",smallSizeMode:"",itemPressed:"sd-action--pressed",itemAsIcon:"sd-action--icon",itemIcon:"sd-action__icon",itemTitle:"sd-action__title"},variables:{mobileWidth:"--sd-mobile-width",imagepickerGapBetweenItems:"--sd-imagepicker-gap",themeMark:"--sv-defaultV2-mark"},tagbox:{root:"sd-selectbase",small:"sd-row__question--small",selectWrapper:"",other:"sd-input sd-comment sd-selectbase__other",onError:"sd-input--error",label:"sd-selectbase__label",item:"sd-item sd-radio sd-selectbase__item",itemDisabled:"sd-item--disabled sd-radio--disabled",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",cleanButton:"sd-tagbox_clean-button sd-dropdown_clean-button",cleanButtonSvg:"sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",cleanButtonIconId:"icon-clear",cleanItemButton:"sd-tagbox-item_clean-button",cleanItemButtonSvg:"sd-tagbox-item_clean-button-svg",cleanItemButtonIconId:"icon-clear_16x16",control:"sd-input sd-tagbox sd-dropdown",controlValue:"sd-tagbox__value sd-dropdown__value",controlValueItems:"sd-tagbox__value-items",placeholderInput:"sd-tagbox__placeholder",controlDisabled:"sd-input--disabled",controlEmpty:"sd-dropdown--empty sd-tagbox--empty",controlLabel:"sd-item__control-label",filterStringInput:"sd-tagbox__filter-string-input sd-dropdown__filter-string-input",materialDecorator:"sd-item__decorator sd-radio__decorator"}};r.surveyCss.defaultV2=i},"./src/defaultTitle.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DefaultTitleModel",function(){return i});var r=n("./src/utils/cssClassBuilder.ts"),i=function(){function e(){}return e.getIconCss=function(e,t){return(new r.CssClassBuilder).append(e.icon).append(e.iconExpanded,!t).toString()},e}()},"./src/dragdrop/choices.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragDropChoices",function(){return a});var r,i=n("./src/dragdrop/core.ts"),o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.doDragOver=function(){"imagepicker"!==t.parentElement.getType()&&(t.draggedElementShortcut.querySelector(".svc-item-value-controls__button").style.cursor="grabbing")},t.doBanDropHere=function(){"imagepicker"!==t.parentElement.getType()&&(t.draggedElementShortcut.querySelector(".svc-item-value-controls__button").style.cursor="not-allowed")},t}return o(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"item-value"},enumerable:!1,configurable:!0}),t.prototype.createDraggedElementShortcut=function(e,t,n){if("imagepicker"===this.parentElement.getType())return this.createImagePickerShortcut(e,t,n);var r=document.createElement("div");r.style.cssText=' \n          cursor: grabbing;\n          position: absolute;\n          z-index: 1000;\n          font-family: "Open Sans";\n        ';var i=t.closest("[data-sv-drop-target-item-value]").cloneNode(!0);i.style.cssText="\n      min-width: 100px;\n      box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n      background-color: white;\n      border-radius: 36px;\n      padding-right: 16px;\n      margin-left: 0;\n    ",i.querySelector(".svc-item-value-controls__drag-icon").style.visibility="visible",i.querySelector(".svc-item-value-controls__remove").style.backgroundColor="transparent",i.classList.remove("svc-item-value--moveup"),i.classList.remove("svc-item-value--movedown"),this.draggedElement.isDragDropMoveDown=!1,this.draggedElement.isDragDropMoveUp=!1,r.appendChild(i);var o=t.getBoundingClientRect();return r.shortcutXOffset=n.clientX-o.x,r.shortcutYOffset=n.clientY-o.y,this.isBottom=null,r},t.prototype.createImagePickerShortcut=function(e,t,n){var r=document.createElement("div");r.style.cssText=" \n      cursor: grabbing;\n      position: absolute;\n      z-index: 1000;\n      box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n      padding: 4px;\n      border-radius: 4px;\n      background: white;\n    ";var i=t.closest("[data-sv-drop-target-item-value]"),o=i.querySelector(".svc-image-item-value-controls"),a=i.querySelector(".sd-imagepicker__image-container"),s=i.querySelector("img").cloneNode(!0);return o.style.display="none",a.style.width=s.width+"px",a.style.height=s.height+"px",s.style.objectFit="cover",s.style.borderRadius="4px",r.appendChild(s),r},t.prototype.findDropTargetNodeByDragOverNode=function(e){return e.closest(this.dropTargetDataAttributeName)},t.prototype.getDropTargetByDataAttributeValue=function(e){return this.parentElement.choices.filter(function(t){return""+t.value==e})[0]},t.prototype.getVisibleChoices=function(){var e=this.parentElement;return"ranking"===e.getType()?e.rankingChoices:e.visibleChoices},t.prototype.isDropTargetValid=function(e){var t=this.getVisibleChoices();if("imagepicker"!==this.parentElement.getType()){var n=t.indexOf(this.dropTarget),r=t.indexOf(this.draggedElement);if(r>n&&this.dropTarget.isDragDropMoveUp)return this.dropTarget.isDragDropMoveUp=!1,!1;if(r<n&&this.dropTarget.isDragDropMoveDown)return this.dropTarget.isDragDropMoveDown=!1,!1}return-1!==t.indexOf(e)},t.prototype.calculateIsBottom=function(e){var t=this.getVisibleChoices();return t.indexOf(this.dropTarget)-t.indexOf(this.draggedElement)>0},t.prototype.afterDragOver=function(t){if(!this.isDropTargetDoesntChanged(this.isBottom)&&this.dropTarget!==this.draggedElement){var n=this.getVisibleChoices(),r=n.indexOf(this.dropTarget),i=n.indexOf(this.draggedElement);n.splice(i,1),n.splice(r,0,this.draggedElement),"imagepicker"!==this.parentElement.getType()&&(i!==r&&(t.classList.remove("svc-item-value--moveup"),t.classList.remove("svc-item-value--movedown"),this.dropTarget.isDragDropMoveDown=!1,this.dropTarget.isDragDropMoveUp=!1),i>r&&(this.dropTarget.isDragDropMoveDown=!0),i<r&&(this.dropTarget.isDragDropMoveUp=!0),e.prototype.ghostPositionChanged.call(this))}},t.prototype.doDrop=function(){var e=this.parentElement.choices,t=this.getVisibleChoices().filter(function(t){return-1!==e.indexOf(t)}),n=e.indexOf(this.draggedElement),r=t.indexOf(this.draggedElement);return e.splice(n,1),e.splice(r,0,this.draggedElement),this.parentElement},t.prototype.doClear=function(){this.updateVisibleChoices()},t.prototype.updateVisibleChoices=function(){var e=this.parentElement;"ranking"===this.parentElement.getType()?e.updateRankingChoices():e.updateVisibleChoices()},t}(i.DragDropCore)},"./src/dragdrop/core.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragDropCore",function(){return u});var r,i=n("./src/base.ts"),o=n("./src/jsonobject.ts"),a=n("./src/utils/utils.ts"),s=n("./src/utils/devices.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});"undefined"!=typeof window&&window.addEventListener("touchmove",function(e){u.PreventScrolling&&e.preventDefault()},{passive:!1});var u=function(e){function t(n,r,o){var a=e.call(this)||this;return a.surveyValue=n,a.creator=r,a.longTap=o,a.onGhostPositionChanged=new i.EventBase,a.onBeforeDrop=new i.EventBase,a.onAfterDrop=new i.EventBase,a.draggedElement=null,a.dropTarget=null,a.prevDropTarget=null,a.draggedElementShortcut=null,a.scrollIntervalId=null,a.allowDropHere=!1,a.stopLongTapIfMoveEnough=function(e){e.preventDefault(),a.currentX=e.pageX,a.currentY=e.pageY,a.isMicroMovement||(document.body.style.setProperty("touch-action",""),document.body.style.setProperty("user-select",""),document.body.style.setProperty("-webkit-user-select",""),a.stopLongTap())},a.stopLongTap=function(e){clearTimeout(a.timeoutID),a.timeoutID=null,document.removeEventListener("pointerup",a.stopLongTap),document.removeEventListener("pointermove",a.stopLongTapIfMoveEnough)},a.onContextMenu=function(e){e.preventDefault(),e.stopPropagation()},a.dragOver=function(e){a.moveShortcutElement(e),a.draggedElementShortcut.style.cursor="grabbing";var t=a.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(t){a.dropTarget=a.getDropTargetByNode(t,e);var n=a.isDropTargetValid(a.dropTarget,t);if(a.doDragOver(t,e),n){var r=a.calculateIsBottom(e.clientY,t);a.allowDropHere=!0,a.isDropTargetDoesntChanged(r)||(a.isBottom=null,a.isBottom=r,a.afterDragOver(t,e),a.prevDropTarget=a.dropTarget)}else a.banDropHere()}else a.banDropHere()},a.drop=function(){if(a.allowDropHere){a.onBeforeDrop.fire(a,null);var e=a.doDrop();a.onAfterDrop.fire(a,{draggedElement:e})}a.clear()},a.handlePointerCancel=function(e){a.clear()},a.handleEscapeButton=function(e){27==e.keyCode&&a.clear()},a.banDropHere=function(){a.allowDropHere=!1,a.doBanDropHere(),a.dropTarget=null,a.draggedElementShortcut.style.cursor="not-allowed",a.isBottom=null},a.doBanDropHere=function(){},a.clear=function(){cancelAnimationFrame(a.scrollIntervalId),document.removeEventListener("pointermove",a.dragOver),document.removeEventListener("pointercancel",a.handlePointerCancel),document.removeEventListener("keydown",a.handleEscapeButton),document.removeEventListener("pointerup",a.drop),a.draggedElementShortcut.removeEventListener("pointerup",a.drop),s.IsTouch&&a.draggedElementShortcut.removeEventListener("contextmenu",a.onContextMenu),document.body.removeChild(a.draggedElementShortcut),a.doClear(),a.dropTarget=null,a.draggedElementShortcut=null,a.draggedElement=null,a.isBottom=null,a.parentElement=null,a.scrollIntervalId=null,s.IsTouch&&(a.savedTargetNode&&document.body.removeChild(a.savedTargetNode),t.PreventScrolling=!1),document.body.style.setProperty("touch-action",""),document.body.style.setProperty("user-select",""),document.body.style.setProperty("-webkit-user-select","")},a}return l(t,e),t.prototype.ghostPositionChanged=function(){this.onGhostPositionChanged.fire({},{})},Object.defineProperty(t.prototype,"dropTargetDataAttributeName",{get:function(){return"[data-sv-drop-target-".concat(this.draggedElementType,"]")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue||this.creator.survey},enumerable:!1,configurable:!0}),t.prototype.startDrag=function(e,t,n,r,i){void 0===i&&(i=!1),s.IsTouch?this.startLongTapProcessing(e,t,n,r,i):this.doStartDrag(e,t,n,r)},t.prototype.startLongTapProcessing=function(e,t,n,r,i){var o=this;void 0===i&&(i=!1),this.startX=e.pageX,this.startY=e.pageY,document.body.style.setProperty("touch-action","none","important"),document.body.style.setProperty("user-select","none","important"),document.body.style.setProperty("-webkit-user-select","none","important"),this.timeoutID=setTimeout(function(){o.doStartDrag(e,t,n,r),i||(o.savedTargetNode=e.target,o.savedTargetNode.style.cssText="\n          position: absolute;\n          height: 1px!important;\n          width: 1px!important;\n          overflow: hidden;\n          clip: rect(1px 1px 1px 1px);\n          clip: rect(1px, 1px, 1px, 1px);\n        ",document.body.appendChild(o.savedTargetNode)),o.stopLongTap()},this.longTap?500:0),document.addEventListener("pointerup",this.stopLongTap),document.addEventListener("pointermove",this.stopLongTapIfMoveEnough)},Object.defineProperty(t.prototype,"isMicroMovement",{get:function(){var e=Math.abs(this.currentX-this.startX),t=Math.abs(this.currentY-this.startY);return e<5&&t<5},enumerable:!1,configurable:!0}),t.prototype.doStartDrag=function(e,n,r,i){if(s.IsTouch&&(t.PreventScrolling=!0),3!==e.which){this.draggedElement=n,this.parentElement=r,this.onStartDrag();var o=this.getShortcutText(this.draggedElement);this.draggedElementShortcut=this.createDraggedElementShortcut(o,i,e),document.body.append(this.draggedElementShortcut),this.moveShortcutElement(e),document.addEventListener("pointermove",this.dragOver),document.addEventListener("pointercancel",this.handlePointerCancel),document.addEventListener("keydown",this.handleEscapeButton),document.addEventListener("pointerup",this.drop),s.IsTouch?this.draggedElementShortcut.addEventListener("contextmenu",this.onContextMenu):this.draggedElementShortcut.addEventListener("pointerup",this.drop)}},t.prototype.isDropTargetDoesntChanged=function(e){return this.dropTarget===this.prevDropTarget&&e===this.isBottom},t.prototype.onStartDrag=function(){},t.prototype.getShortcutText=function(e){return e.shortcutText},t.prototype.createDraggedElementShortcut=function(e,t,n){var r=document.createElement("div");return r.innerText=e,r.className=this.getDraggedElementClass(),r},t.prototype.getDraggedElementClass=function(){return"sv-dragged-element-shortcut"},t.prototype.doDragOver=function(e,t){},t.prototype.afterDragOver=function(e,t){},t.prototype.getGhostPosition=function(e){return this.dropTarget!==e?null:this.isBottom?"bottom":"top"},t.prototype.moveShortcutElement=function(e){this.doScroll(e.clientY,e.clientX);var t=this.draggedElementShortcut.offsetHeight,n=this.draggedElementShortcut.offsetWidth,r=this.draggedElementShortcut.shortcutXOffset||n/2,i=this.draggedElementShortcut.shortcutYOffset||t/2;0!==document.querySelectorAll("[dir='rtl']").length&&(r=n/2,i=t/2);var o=document.documentElement.clientHeight,a=document.documentElement.clientWidth,s=this.getShortcutBottomCoordinate(e.clientY,t,i);return this.getShortcutRightCoordinate(e.clientX,n,r)>=a?(this.draggedElementShortcut.style.left=e.pageX-e.clientX+a-n+"px",void(this.draggedElementShortcut.style.top=e.pageY-i+"px")):e.clientX-r<=0?(this.draggedElementShortcut.style.left=e.pageX-e.clientX+"px",void(this.draggedElementShortcut.style.top=e.pageY-i+"px")):s>=o?(this.draggedElementShortcut.style.left=e.pageX-r+"px",void(this.draggedElementShortcut.style.top=e.pageY-e.clientY+o-t+"px")):e.clientY-i<=0?(this.draggedElementShortcut.style.left=e.pageX-r+"px",void(this.draggedElementShortcut.style.top=e.pageY-e.clientY+"px")):(this.draggedElementShortcut.style.left=e.pageX-r+"px",void(this.draggedElementShortcut.style.top=e.pageY-i+"px"))},t.prototype.getShortcutBottomCoordinate=function(e,t,n){return e+t-n},t.prototype.getShortcutRightCoordinate=function(e,t,n){return e+t-n},t.prototype.doScroll=function(e,t){var n=this;cancelAnimationFrame(this.scrollIntervalId),this.draggedElementShortcut.hidden=!0;var r=document.elementFromPoint(t,e);this.draggedElementShortcut.hidden=!1;var i,o,s,l,u=Object(a.findScrollableParent)(r);"HTML"===u.tagName?(i=0,o=document.documentElement.clientHeight,s=0,l=document.documentElement.clientWidth):(i=u.getBoundingClientRect().top,o=u.getBoundingClientRect().bottom,s=u.getBoundingClientRect().left,l=u.getBoundingClientRect().right);this.scrollIntervalId=requestAnimationFrame(function r(){e-i<=50?u.scrollTop-=15:o-e<=50?u.scrollTop+=15:l-t<=50?u.scrollLeft+=15:t-s<=50&&(u.scrollLeft-=15),n.scrollIntervalId=requestAnimationFrame(r)})},t.prototype.getDataAttributeValueByNode=function(e){var t=this,n="svDropTarget";return this.draggedElementType.split("-").forEach(function(e){n+=t.capitalizeFirstLetter(e)}),e.dataset[n]},t.prototype.getDropTargetByNode=function(e,t){var n=this.getDataAttributeValueByNode(e);return this.getDropTargetByDataAttributeValue(n,e,t)},t.prototype.capitalizeFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.prototype.calculateVerticalMiddleOfHTMLElement=function(e){var t=e.getBoundingClientRect();return t.y+t.height/2},t.prototype.calculateHorizontalMiddleOfHTMLElement=function(e){var t=e.getBoundingClientRect();return t.x+t.width/2},t.prototype.findDropTargetNodeFromPoint=function(e,t){this.draggedElementShortcut.hidden=!0;var n=document.elementFromPoint(e,t);return this.draggedElementShortcut.hidden=!1,n?this.findDropTargetNodeByDragOverNode(n):null},t.prototype.findDropTargetNodeByDragOverNode=function(e){return e.querySelector(this.dropTargetDataAttributeName)||e.closest(this.dropTargetDataAttributeName)},t.prototype.doClear=function(){},t.PreventScrolling=!1,function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Object(o.property)({defaultValue:null,onSet:function(e,t){t.ghostPositionChanged()}})],t.prototype,"isBottom",void 0),t}(i.Base)},"./src/dragdrop/matrix-rows.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragDropMatrixRows",function(){return a});var r,i=n("./src/dragdrop/core.ts"),o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fromIndex=null,t.toIndex=null,t.doDrop=function(){return t.parentElement.moveRowByIndex(t.fromIndex,t.toIndex),t.parentElement},t}return o(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"matrix-row"},enumerable:!1,configurable:!0}),t.prototype.createDraggedElementShortcut=function(e,t,n){var r=this,i=document.createElement("div");i.style.cssText=' \n          cursor: grabbing;\n          position: absolute;\n          z-index: 1000;\n          font-family: "Open Sans";\n        ';var o=t.closest("[data-sv-drop-target-matrix-row]"),a=o.cloneNode(!0);a.style.cssText="\n      box-shadow: rgb(0 0 0 / 10%) 0px 8px 16px;\n      background-color: white;\n      display: flex;\n      flex-grow: 0;\n      flex-shrink: 0;\n      align-items: center;\n      line-height: 0;\n      width: ".concat(o.offsetWidth,"px;\n    "),a.classList.remove("sv-matrix__drag-drop--moveup"),a.classList.remove("sv-matrix__drag-drop--movedown"),this.draggedElement.isDragDropMoveDown=!1,this.draggedElement.isDragDropMoveUp=!1,i.appendChild(a);var s=t.getBoundingClientRect();return i.shortcutXOffset=n.clientX-s.x,i.shortcutYOffset=n.clientY-s.y,this.parentElement.renderedTable.rows.forEach(function(e,t){e.row===r.draggedElement&&(e.isGhostRow=!0)}),this.fromIndex=this.parentElement.visibleRows.indexOf(this.draggedElement),i},t.prototype.getDropTargetByDataAttributeValue=function(e){return this.parentElement.renderedTable.rows.filter(function(t){return t.row.id===e})[0].row},t.prototype.isDropTargetValid=function(e){return!0},t.prototype.findDropTargetNodeByDragOverNode=function(e){return e.closest(this.dropTargetDataAttributeName)},t.prototype.calculateIsBottom=function(e){var t=this.parentElement.renderedTable.rows.map(function(e){return e.row});return t.indexOf(this.dropTarget)-t.indexOf(this.draggedElement)>0},t.prototype.afterDragOver=function(t){var n=this;if(!this.isDropTargetDoesntChanged(this.isBottom)&&this.dropTarget!==this.draggedElement){var r,i,o,a=this.parentElement.renderedTable.rows;a.forEach(function(e,t){e.row===n.dropTarget&&(r=t),e.row===n.draggedElement&&(i=t,(o=e).isGhostRow=!0)}),a.splice(i,1),a.splice(r,0,o),this.toIndex=r,e.prototype.ghostPositionChanged.call(this)}},t.prototype.doClear=function(){this.parentElement.resetRenderedTable(),this.fromIndex=null,this.toIndex=null},t}(i.DragDropCore)},"./src/dragdrop/ranking-choices.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragDropRankingChoices",function(){return l});var r,i=n("./src/dragdrop/choices.ts"),o=n("./src/utils/cssClassBuilder.ts"),a=n("./src/utils/devices.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isDragOverRootNode=!1,t.doDragOver=function(){t.draggedElementShortcut.querySelector(".sv-ranking-item").style.cursor="grabbing"},t.doBanDropHere=function(){t.isDragOverRootNode?t.allowDropHere=!0:t.draggedElementShortcut.querySelector(".sv-ranking-item").style.cursor="not-allowed"},t.doDrop=function(){return t.parentElement.setValue(),t.parentElement},t.doClear=function(){t.parentElement.dropTargetNodeMove=null,t.parentElement.updateRankingChoices(!0)},t}return s(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"ranking-item"},enumerable:!1,configurable:!0}),t.prototype.createDraggedElementShortcut=function(e,t,n){var r=document.createElement("div");r.className=this.shortcutClass+" sv-ranking-shortcut",r.style.cssText=' \n          cursor: grabbing;\n          position: absolute;\n          z-index: 1000;\n          border-radius: 36px;\n          min-width: 100px;\n          box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n          background-color: white;\n          padding-right: 16px;\n          padding-left: 20px;\n          font-family: "Open Sans";\n        ';var i=t.cloneNode(!0);r.appendChild(i);var o=t.getBoundingClientRect();return r.shortcutXOffset=n.clientX-o.x,r.shortcutYOffset=n.clientY-o.y,r},Object.defineProperty(t.prototype,"shortcutClass",{get:function(){return(new o.CssClassBuilder).append(this.parentElement.cssClasses.root).append(this.parentElement.cssClasses.rootMobileMod,a.IsMobile).toString()},enumerable:!1,configurable:!0}),t.prototype.getDropTargetByDataAttributeValue=function(e){return this.parentElement.rankingChoices[e]},t.prototype.findDropTargetNodeByDragOverNode=function(e){return this.isDragOverRootNode=this.getIsDragOverRootNode(e),e.closest(this.dropTargetDataAttributeName)},t.prototype.getIsDragOverRootNode=function(e){return"string"==typeof e.className&&-1!==e.className.indexOf("sv-ranking")},t.prototype.isDropTargetValid=function(e,t){var n=this.parentElement.rankingChoices,r=n.indexOf(this.dropTarget),i=n.indexOf(this.draggedElement);return i>r&&t.classList.contains("sv-dragdrop-moveup")||i<r&&t.classList.contains("sv-dragdrop-movedown")?(this.parentElement.dropTargetNodeMove=null,!1):-1!==n.indexOf(e)},t.prototype.calculateIsBottom=function(e){var t=this.parentElement.rankingChoices;return t.indexOf(this.dropTarget)-t.indexOf(this.draggedElement)>0},t.prototype.afterDragOver=function(e){var t=this.parentElement.rankingChoices,n=t.indexOf(this.dropTarget),r=t.indexOf(this.draggedElement);t.splice(r,1),t.splice(n,0,this.draggedElement),this.parentElement.setPropertyValue("rankingChoices",t),this.updateDraggedElementShortcut(n+1),r!==n&&(e.classList.remove("sv-dragdrop-moveup"),e.classList.remove("sv-dragdrop-movedown"),this.parentElement.dropTargetNodeMove=null),r>n&&(this.parentElement.dropTargetNodeMove="down"),r<n&&(this.parentElement.dropTargetNodeMove="up")},t.prototype.updateDraggedElementShortcut=function(e){var t=e+"";this.draggedElementShortcut.querySelector(".sv-ranking-item__index").innerText=t},t.prototype.ghostPositionChanged=function(){this.parentElement.currentDropTarget=this.draggedElement,e.prototype.ghostPositionChanged.call(this)},t}(i.DragDropChoices)},"./src/dragdrop/survey-elements.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragDropSurveyElements",function(){return l});var r,i=n("./src/survey-element.ts"),o=n("./src/jsonobject.ts"),a=n("./src/dragdrop/core.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isEdge=!1,t.prevIsEdge=null,t.ghostSurveyElement=null,t.isDraggedElementSelected=!1,t.doBanDropHere=function(){t.removeGhostElementFromSurvey(),t.isEdge=null},t.doDrop=function(){return t.dropTarget?(document.activeElement.blur(),t.insertRealElementIntoSurvey()):null},t.doClear=function(){t.removeGhostElementFromSurvey(),t.isEdge=null,t.ghostSurveyElement=null,t.draggedElement&&(t.draggedElement.isDragMe=!1),t.isRight=null},t}return s(t,e),Object.defineProperty(t.prototype,"draggedElementType",{get:function(){return"survey-element"},enumerable:!1,configurable:!0}),t.prototype.startDragToolboxItem=function(e,t,n){var r=this.createElementFromJson(t);r.toolboxItemTitle=n,this.startDrag(e,r,null,null,!0)},t.prototype.startDragSurveyElement=function(e,t,n){this.isDraggedElementSelected=n,this.startDrag(e,t)},t.prototype.getShortcutText=function(t){return t.toolboxItemTitle||e.prototype.getShortcutText.call(this,t)},t.prototype.createDraggedElementShortcut=function(e,t,n){var r=document.createElement("div"),i=document.createElement("span");return i.className="svc-dragged-element-shortcut__text",i.innerText=e,r.appendChild(this.createDraggedElementIcon()),r.appendChild(i),r.className=this.getDraggedElementClass(),r},t.prototype.createDraggedElementIcon=function(){var e=document.createElement("span"),t=this.draggedElement.getType(),n='<svg class="sv-svg-icon" role="img" style="width: 24px; height: 24px;"><use xlink:href="#icon-'.concat(t,'"></use></svg>');return e.className="svc-dragged-element-shortcut__icon",e.innerHTML=n,e},t.prototype.getDraggedElementClass=function(){var e="svc-dragged-element-shortcut";return this.isDraggedElementSelected&&(e+=" svc-dragged-element-shortcut--selected"),e},t.prototype.createElementFromJson=function(e){var t=this.createNewElement(e);return t.setSurveyImpl?t.setSurveyImpl(this.survey):t.setData(this.survey),t.renderWidth="100%",t},t.prototype.createNewElement=function(e){var t=o.Serializer.createClass(e.type);return(new o.JsonObject).toObject(e,t),t},t.prototype.getDropTargetByDataAttributeValue=function(e,n,r){if(this.isEdge=this.calculateIsEdge(n,r.clientY),!e){var i=n.parentElement.closest(this.dropTargetDataAttributeName);e=this.getDataAttributeValueByNode(i)}if(!e)throw new Error("Can't find drop target survey element name");if(e===t.ghostSurveyElementName)return this.prevDropTarget;if("newGhostPage"===e)return t.newGhostPage;var o,a,s=this.survey.getPageByName(e);if(s)return 0!==s.elements.length?null:s;if(this.survey.pages.forEach(function(t){(a=t.getElementByName(e))&&(o=a)}),"paneldynamic"!==o.getType()||this.isEdge||(o=o.template),"matrixdropdown"!==o.getType()&&"matrixdynamic"!==o.getType()||"none"===o.detailPanelMode||this.isEdge?o.isPanel&&(o=this.getPanelDropTarget(n,o,r)):o=o.detailPanel,!o.page){var l=n.parentElement.closest("[data-sv-drop-target-page]"),u=this.survey.getPageByName(e=l.dataset.svDropTargetPage);o.__page=u}return o},t.prototype.isDropTargetValid=function(){return!(!this.dropTarget||this.dropTarget===this.draggedElement||"paneldynamic"===this.draggedElement.getType()&&this.dropTarget===this.draggedElement.template||t.restrictDragQuestionBetweenPages&&this.shouldRestricDragQuestionBetweenPages(this.dropTarget))},t.prototype.calculateIsBottom=function(e,n){return this.getDataAttributeValueByNode(n)===t.ghostSurveyElementName?this.isBottom:e>=this.calculateVerticalMiddleOfHTMLElement(n)},t.prototype.calculateIsRight=function(e,n){return this.getDataAttributeValueByNode(n)===t.ghostSurveyElementName?this.isRight:e>=this.calculateHorizontalMiddleOfHTMLElement(n)},t.prototype.isDropTargetDoesntChanged=function(e){return this.dropTarget===this.ghostSurveyElement||this.dropTarget===this.prevDropTarget&&e===this.isBottom&&this.isEdge===this.prevIsEdge&&this.isRight===this.prevIsRight},t.prototype.shouldRestricDragQuestionBetweenPages=function(e){var t=this.draggedElement.page;return t&&t!==(e.isPage?e:e.page)},t.prototype.getPanelDropTarget=function(e,t,n){return this.isEdge||0===t.questions.length||(e=this.findDeepestDropTargetChild(e),t=this.getDropTargetByNode(e,n)),t},t.prototype.findDeepestDropTargetChild=function(e){for(var t=this.dropTargetDataAttributeName,n=e;e;)n=e,e=e.querySelector(t);return n},t.prototype.calculateIsEdge=function(e,n){var r=e.getBoundingClientRect();return n-r.top<=t.edgeHeight||r.bottom-n<=t.edgeHeight},t.prototype.doDragOver=function(e,t){this.isRight=this.calculateIsRight(t.clientX,e)},t.prototype.afterDragOver=function(e,t){this.prevIsEdge=this.isEdge,this.prevIsRight=this.isRight,this.insertGhostElementIntoSurvey()},t.prototype.onStartDrag=function(){this.ghostSurveyElement=this.createGhostSurveyElement(),this.draggedElement.isDragMe=!0},t.prototype.insertGhostElementIntoSurvey=function(){this.removeGhostElementFromSurvey();var e=this.calcTargetRowMultiple();if(this.ghostSurveyElement=this.createGhostSurveyElement(e),this.ghostSurveyElement.name=t.ghostSurveyElementName,this.parentElement=this.dropTarget.isPage?this.dropTarget:this.dropTarget.page||this.dropTarget.__page,this.isDragOverInsideEmptyPanel())this.dropTarget.dragTypeOverMe=i.DragTypeOverMeEnum.InsideEmptyPanel;else{if(this.isEdge||!e)return this.parentElement.dragDropStart(this.draggedElement,this.ghostSurveyElement,t.nestedPanelDepth),this.parentElement.dragDropMoveTo(this.dropTarget,e?this.isRight:this.isBottom,this.isEdge);this.dropTarget.dragTypeOverMe=this.isRight?i.DragTypeOverMeEnum.MultilineRight:i.DragTypeOverMeEnum.MultilineLeft}},t.prototype.calcTargetRowMultiple=function(){var e=this.getTargetParent(this.dropTarget),t=this.getTargetRow(this.dropTarget),n=t&&t.elements.length>1;return this.isEdge&&n&&(!e.isPanel||e.name)?(e.__page=this.dropTarget.page||this.dropTarget.__page,this.dropTarget=e,!1):n},t.prototype.getTargetParent=function(e){var t=e.isPage||e.isPanel?e:e.parent;return"paneldynamic"===e.getType()&&(t=e.templateValue),t},t.prototype.getTargetRow=function(e){var t;return this.getTargetParent(e).rows.forEach(function(n){-1!==n.elements.indexOf(e)&&(t=n)}),t},t.prototype.isDragOverInsideEmptyPanel=function(){return this.dropTarget.isPanel&&0===this.dropTarget.questions.length&&!this.isEdge},t.prototype.removeGhostElementFromSurvey=function(){var e=this.prevDropTarget||this.dropTarget;e&&(e.dragTypeOverMe=null),this.parentElement&&this.parentElement.dragDropFinish(!0)},t.prototype.insertRealElementIntoSurvey=function(){this.removeGhostElementFromSurvey();var e=this.calcTargetRowMultiple();this.dropTarget.isPage&&this.dropTarget._isGhost&&this.dropTarget._addGhostPageViewModel();var n=(new o.JsonObject).toJsonObject(this.draggedElement);n.type=this.draggedElement.getType();var r=this.createFakeTargetElement(this.draggedElement.name,n);return this.parentElement.dragDropStart(this.draggedElement,r,t.nestedPanelDepth),this.parentElement.dragDropMoveTo(this.dropTarget,e?this.isRight:this.isBottom,this.isEdge),this.parentElement.dragDropFinish()},t.prototype.createFakeTargetElement=function(e,t){if(!e||!t)return null;var n=null;return n=o.Serializer.createClass(t.type),(new o.JsonObject).toObject(t,n),n.name=e,n.setSurveyImpl?n.setSurveyImpl(this.survey):n.setData(this.survey),n.renderWidth="100%",n},t.prototype.createGhostSurveyElement=function(e){void 0===e&&(e=!1);var n="sv-drag-drop-ghost",r="300px";e&&(r="4px",n+=" sv-drag-drop-ghost--vertical");var i={type:"html",minWidth:r,name:t.ghostSurveyElementName,html:'<div class="'.concat(n,'"></div>')},o=this.createElementFromJson(i);return o.startWithNewLine=!e,e&&(o.maxWidth="4px",o.renderWidth="0px",o.paddingRight="0px",o.paddingLeft="0px"),o},t.newGhostPage=null,t.restrictDragQuestionBetweenPages=!1,t.edgeHeight=30,t.nestedPanelDepth=-1,t.ghostSurveyElementName="sv-drag-drop-ghost-survey-element-name",t}(a.DragDropCore)},"./src/dropdownListModel.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DropdownListModel",function(){return h});var r,i=n("./src/actions/action.ts"),o=n("./src/base.ts"),a=n("./src/jsonobject.ts"),s=n("./src/list.ts"),l=n("./src/popup.ts"),u=n("./src/utils/utils.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},h=function(e){function t(t,n){var r,i=this;return(i=e.call(this)||this).question=t,i.onSelectionChanged=n,i.focusFirstInputSelector=".sv-list__item--selected",i.popupCssClasses="sv-single-select-list",i.listModel=i.createListModel(),i.listModel.cssClasses=null===(r=t.survey)||void 0===r?void 0:r.getCss().list,i.setSearchEnabled(i.question.searchEnabled),i.createPopup(),i}return c(t,e),t.prototype.updatePopupFocusFirstInputSelector=function(){this._popupModel.focusFirstInputSelector=!this.listModel.showFilter&&this.question.value?this.focusFirstInputSelector:""},t.prototype.createPopup=function(){var e=this;this._popupModel=new l.PopupModel("sv-list",{model:this.listModel},"bottom","center",!1),this._popupModel.positionMode="fixed",this._popupModel.isFocusedContent=!1,this._popupModel.setWidthByTarget=!0,this.updatePopupFocusFirstInputSelector(),this.listModel.registerFunctionOnPropertyValueChanged("showFilter",function(){e.updatePopupFocusFirstInputSelector()}),this._popupModel.cssClass=this.popupCssClasses,this._popupModel.onVisibilityChanged.add(function(t,n){n.isVisible&&e.question.onOpenedCallBack&&(e.updatePopupFocusFirstInputSelector(),e.question.onOpenedCallBack()),n.isVisible||e.onHidePopup()})},t.prototype.setFilter=function(e){this.listModel.filterString=e,this.listModel.focusedItem&&this.listModel.isItemVisible(this.listModel.focusedItem)||this.listModel.focusFirstVisibleItem()},t.prototype.onHidePopup=function(){this.resetFilterString(),this.listModel.refresh()},t.prototype.getAvailableItems=function(){var e=this;return this.question.visibleChoices.map(function(t){return new i.Action({id:t.value,data:t,locTitle:t.locText,component:new o.ComputedUpdater(function(){return e.question.itemComponent}),visible:new o.ComputedUpdater(function(){return t.isVisible}),enabled:new o.ComputedUpdater(function(){return t.isEnabled})})})},t.prototype.createListModel=function(){var e=this,t=this.getAvailableItems(),n=this.onSelectionChanged;n||(n=function(t){e.question.value=t.id,e.filterString=t.id.toString(),e._popupModel.toggleVisibility()});var r=new s.ListModel(t,n,!0,this.question.selectedItem);return r.locOwner=this.question,r},t.prototype.resetFilterString=function(){this.filterString&&(this.filterString=void 0)},Object.defineProperty(t.prototype,"popupModel",{get:function(){return this._popupModel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputReadOnly",{get:function(){return this.question.isInputReadOnly||this.searchEnabled},enumerable:!1,configurable:!0}),t.prototype.setSearchEnabled=function(e){this.listModel.searchEnabled=!1,this.searchEnabled=e},t.prototype.updateItems=function(){this._popupModel.contentComponentData.model.setItems(this.getAvailableItems())},t.prototype.onClick=function(e){if(0!==this.question.visibleChoices.length&&(this._popupModel.toggleVisibility(),this.listModel.focusNextVisibleItem(),this.searchEnabled&&e&&e.target)){var t=e.target.querySelector("input");t&&t.focus()}},t.prototype.onClear=function(e){this.question.clearValue(),this.resetFilterString(),this.listModel.selectedItem=void 0,e.preventDefault(),e.stopPropagation()},t.prototype.keyHandler=function(e){var t=e.which||e.keyCode;this.popupModel.isVisible&&38===e.keyCode?(this.listModel.focusPrevVisibleItem(),this.scrollToFocusedItem(),e.preventDefault(),e.stopPropagation()):40===e.keyCode?(this.popupModel.isVisible||this.popupModel.toggleVisibility(),this.listModel.focusNextVisibleItem(),this.scrollToFocusedItem(),e.preventDefault(),e.stopPropagation()):!this.popupModel.isVisible||13!==e.keyCode&&32!==e.keyCode?46===t?this.onClear(e):27===e.keyCode?this.popupModel.isVisible=!1:(38!==e.keyCode&&40!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation()),Object(u.doKey2ClickUp)(e,{processEsc:!1,disableTabStop:this.question.isInputReadOnly})):(this.listModel.selectFocusedItem(),e.preventDefault(),e.stopPropagation())},t.prototype.onBlur=function(e){this.resetFilterString(),this._popupModel.isVisible=!1,Object(u.doKey2ClickBlur)(e)},t.prototype.scrollToFocusedItem=function(){setTimeout(function(){var e=void 0;if(document.querySelectorAll(".sv-popup").forEach(function(t){var n=window.getComputedStyle(t);"none"!==n.display&&"hidden"!==n.visibility&&(e=t)}),e){var t=e.querySelector("."+s.defaultListCss.itemFocused);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}},0)},d([Object(a.property)({defaultValue:!0})],t.prototype,"searchEnabled",void 0),d([Object(a.property)({defaultValue:"",onSet:function(e,t){t.filterString&&!t.popupModel.isVisible&&(t.popupModel.isVisible=!0),t.setFilter(t.filterString)}})],t.prototype,"filterString",void 0),t}(o.Base)},"./src/dropdownMultiSelectListModel.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DropdownMultiSelectListModel",function(){return c});var r,i=n("./src/dropdownListModel.ts"),o=n("./src/itemvalue.ts"),a=n("./src/jsonobject.ts"),s=n("./src/multiSelectListModel.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.setHideSelectedItems(t.hideSelectedItems),r.syncFilterStringPlacholder(),r.closeOnSelect=t.closeOnSelect,r}return l(t,e),t.prototype.syncFilterStringPlacholder=function(e){var t=e||this.getSelectedActions();this.filterStringPlaceholder=t.length?void 0:this.question.placeholder},t.prototype.getSelectedActions=function(e){var t=this;return(e||this.listModel.actions).filter(function(e){return t.question.isAllSelected&&"selectall"===e.id||!!o.ItemValue.getItemByValue(t.question.selectedItems,e.id)})},t.prototype.syncSelectedItemsFromQuestion=function(){var e=this.getSelectedActions();this.listModel.setSelectedItems(this.getSelectedActions()),this.syncFilterStringPlacholder(e)},t.prototype.popupTargetModified=function(){var e=this;setTimeout(function(){e.popupModel.targetModified()},1)},t.prototype.createListModel=function(){var e=this,t=this.getAvailableItems(),n=this.onSelectionChanged;return n||(n=function(t,n){e.resetFilterString(),"selectall"===t.id?e.selectAllItems():"added"===n&&"none"==t.id?e.selectNoneItem():"added"===n?e.selectItem(t.id):"removed"===n&&e.deselectItem(t.id),e.popupTargetModified(),e.closeOnSelect&&(e.popupModel.isVisible=!1)}),new s.MultiSelectListModel(t,n,!0,this.getSelectedActions(t))},t.prototype.selectAllItems=function(){this.question.toggleSelectAll(),this.syncSelectedItemsFromQuestion()},t.prototype.selectNoneItem=function(){this.question.renderedValue=["none"],this.syncSelectedItemsFromQuestion()},t.prototype.selectItem=function(e){var t=[].concat(this.question.renderedValue||[]);t.push(e),this.question.renderedValue=t,this.syncSelectedItemsFromQuestion()},t.prototype.deselectItem=function(e){var t=[].concat(this.question.renderedValue||[]);t.splice(t.indexOf(e),1),this.question.renderedValue=t,this.syncSelectedItemsFromQuestion()},t.prototype.onClear=function(t){e.prototype.onClear.call(this,t),this.syncSelectedItemsFromQuestion()},t.prototype.setHideSelectedItems=function(e){this.listModel.hideSelectedItems=e,this.syncSelectedItemsFromQuestion()},t.prototype.removeLastSelectedItem=function(){this.deselectItem(this.question.renderedValue[this.question.renderedValue.length-1]),this.popupTargetModified()},t.prototype.inputKeyHandler=function(e){8!==e.keyCode||this.filterString||(this.removeLastSelectedItem(),e.preventDefault(),e.stopPropagation())},u([Object(a.property)({defaultValue:""})],t.prototype,"filterStringPlaceholder",void 0),u([Object(a.property)({defaultValue:!0})],t.prototype,"closeOnSelect",void 0),t}(i.DropdownListModel)},"./src/dxSurveyService.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"dxSurveyService",function(){return i});var r=n("./src/settings.ts"),i=function(){function e(){}return Object.defineProperty(e,"serviceUrl",{get:function(){return r.settings.surveyServiceUrl},set:function(e){r.settings.surveyServiceUrl=e},enumerable:!1,configurable:!0}),e.prototype.loadSurvey=function(t,n){var r=new XMLHttpRequest;r.open("GET",e.serviceUrl+"/getSurvey?surveyId="+t),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.onload=function(){var e=JSON.parse(r.response);n(200==r.status,e,r.response)},r.send()},e.prototype.getSurveyJsonAndIsCompleted=function(t,n,r){var i=new XMLHttpRequest;i.open("GET",e.serviceUrl+"/getSurveyAndIsCompleted?surveyId="+t+"&clientId="+n),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.onload=function(){var e=JSON.parse(i.response);r(200==i.status,e?e.survey:null,e?e.isCompleted:null,i.response)},i.send()},e.prototype.sendResult=function(t,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=!1);var a=new XMLHttpRequest;a.open("POST",e.serviceUrl+"/post/"),a.setRequestHeader("Content-Type","application/json; charset=utf-8");var s={postId:t,surveyResult:JSON.stringify(n)};i&&(s.clientId=i),o&&(s.isPartialCompleted=!0);var l=JSON.stringify(s);a.onload=a.onerror=function(){r&&r(200===a.status,a.response,a)},a.send(l)},e.prototype.sendFile=function(t,n,r){var i=new XMLHttpRequest;i.onload=i.onerror=function(){r&&r(200==i.status,JSON.parse(i.response))},i.open("POST",e.serviceUrl+"/upload/",!0);var o=new FormData;o.append("file",n),o.append("postId",t),i.send(o)},e.prototype.getResult=function(t,n,r){var i=new XMLHttpRequest;i.open("GET",e.serviceUrl+"/getResult?resultId="+t+"&name="+n),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.onload=function(){var e=null,t=null;if(200==i.status)for(var n in t=[],(e=JSON.parse(i.response)).QuestionResult)t.push({name:n,value:e.QuestionResult[n]});r(200==i.status,e,t,i.response)},i.send()},e.prototype.isCompleted=function(t,n,r){var i=new XMLHttpRequest;i.open("GET",e.serviceUrl+"/isCompleted?resultId="+t+"&clientId="+n),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.onload=function(){var e=null;200==i.status&&(e=JSON.parse(i.response)),r(200==i.status,e,i.response)},i.send()},e}()},"./src/element-helper.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ElementHelper",function(){return r});var r=function(){function e(){}return e.focusElement=function(e){e&&e.focus()},e.visibility=function(e){var t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&(!e.parentElement||this.visibility(e.parentElement))},e.getNextElementPreorder=function(e){var t=e.nextElementSibling?e.nextElementSibling:e.parentElement.firstElementChild;return this.visibility(t)?t:this.getNextElementPreorder(t)},e.getNextElementPostorder=function(e){var t=e.previousElementSibling?e.previousElementSibling:e.parentElement.lastElementChild;return this.visibility(t)?t:this.getNextElementPostorder(t)},e}()},"./src/entries/chunks/model.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"Version",function(){return Se}),n.d(t,"checkLibraryVersion",function(){return ke});var r=n("./src/settings.ts");n.d(t,"settings",function(){return r.settings});var i=n("./src/helpers.ts");n.d(t,"Helpers",function(){return i.Helpers});var o=n("./src/validator.ts");n.d(t,"AnswerCountValidator",function(){return o.AnswerCountValidator}),n.d(t,"EmailValidator",function(){return o.EmailValidator}),n.d(t,"NumericValidator",function(){return o.NumericValidator}),n.d(t,"RegexValidator",function(){return o.RegexValidator}),n.d(t,"SurveyValidator",function(){return o.SurveyValidator}),n.d(t,"TextValidator",function(){return o.TextValidator}),n.d(t,"ValidatorResult",function(){return o.ValidatorResult}),n.d(t,"ExpressionValidator",function(){return o.ExpressionValidator}),n.d(t,"ValidatorRunner",function(){return o.ValidatorRunner});var a=n("./src/itemvalue.ts");n.d(t,"ItemValue",function(){return a.ItemValue});var s=n("./src/base.ts");n.d(t,"Base",function(){return s.Base}),n.d(t,"Event",function(){return s.Event}),n.d(t,"ArrayChanges",function(){return s.ArrayChanges}),n.d(t,"ComputedUpdater",function(){return s.ComputedUpdater});var l=n("./src/survey-error.ts");n.d(t,"SurveyError",function(){return l.SurveyError});var u=n("./src/survey-element.ts");n.d(t,"SurveyElementCore",function(){return u.SurveyElementCore}),n.d(t,"SurveyElement",function(){return u.SurveyElement}),n.d(t,"DragTypeOverMeEnum",function(){return u.DragTypeOverMeEnum});var c=n("./src/calculatedValue.ts");n.d(t,"CalculatedValue",function(){return c.CalculatedValue});var d=n("./src/error.ts");n.d(t,"CustomError",function(){return d.CustomError}),n.d(t,"AnswerRequiredError",function(){return d.AnswerRequiredError}),n.d(t,"OneAnswerRequiredError",function(){return d.OneAnswerRequiredError}),n.d(t,"RequreNumericError",function(){return d.RequreNumericError}),n.d(t,"ExceedSizeError",function(){return d.ExceedSizeError});var h=n("./src/localizablestring.ts");n.d(t,"LocalizableString",function(){return h.LocalizableString}),n.d(t,"LocalizableStrings",function(){return h.LocalizableStrings});var p=n("./src/expressionItems.ts");n.d(t,"HtmlConditionItem",function(){return p.HtmlConditionItem}),n.d(t,"UrlConditionItem",function(){return p.UrlConditionItem});var f=n("./src/choicesRestful.ts");n.d(t,"ChoicesRestful",function(){return f.ChoicesRestful}),n.d(t,"ChoicesRestfull",function(){return f.ChoicesRestfull});var m=n("./src/functionsfactory.ts");n.d(t,"FunctionFactory",function(){return m.FunctionFactory}),n.d(t,"registerFunction",function(){return m.registerFunction});var g=n("./src/conditions.ts");n.d(t,"ConditionRunner",function(){return g.ConditionRunner}),n.d(t,"ExpressionRunner",function(){return g.ExpressionRunner}),n.d(t,"ExpressionExecutor",function(){return g.ExpressionExecutor});var v=n("./src/expressions/expressions.ts");n.d(t,"Operand",function(){return v.Operand}),n.d(t,"Const",function(){return v.Const}),n.d(t,"BinaryOperand",function(){return v.BinaryOperand}),n.d(t,"Variable",function(){return v.Variable}),n.d(t,"FunctionOperand",function(){return v.FunctionOperand}),n.d(t,"ArrayOperand",function(){return v.ArrayOperand});var y=n("./src/conditionsParser.ts");n.d(t,"ConditionsParser",function(){return y.ConditionsParser});var b=n("./src/conditionProcessValue.ts");n.d(t,"ProcessValue",function(){return b.ProcessValue});var _=n("./src/jsonobject.ts");n.d(t,"JsonError",function(){return _.JsonError}),n.d(t,"JsonIncorrectTypeError",function(){return _.JsonIncorrectTypeError}),n.d(t,"JsonMetadata",function(){return _.JsonMetadata}),n.d(t,"JsonMetadataClass",function(){return _.JsonMetadataClass}),n.d(t,"JsonMissingTypeError",function(){return _.JsonMissingTypeError}),n.d(t,"JsonMissingTypeErrorBase",function(){return _.JsonMissingTypeErrorBase}),n.d(t,"JsonObject",function(){return _.JsonObject}),n.d(t,"JsonObjectProperty",function(){return _.JsonObjectProperty}),n.d(t,"JsonRequiredPropertyError",function(){return _.JsonRequiredPropertyError}),n.d(t,"JsonUnknownPropertyError",function(){return _.JsonUnknownPropertyError}),n.d(t,"Serializer",function(){return _.Serializer}),n.d(t,"property",function(){return _.property}),n.d(t,"propertyArray",function(){return _.propertyArray});var w=n("./src/question_matrixdropdownbase.ts");n.d(t,"MatrixDropdownCell",function(){return w.MatrixDropdownCell}),n.d(t,"MatrixDropdownRowModelBase",function(){return w.MatrixDropdownRowModelBase}),n.d(t,"QuestionMatrixDropdownModelBase",function(){return w.QuestionMatrixDropdownModelBase});var C=n("./src/question_matrixdropdowncolumn.ts");n.d(t,"MatrixDropdownColumn",function(){return C.MatrixDropdownColumn}),n.d(t,"matrixDropdownColumnTypes",function(){return C.matrixDropdownColumnTypes});var x=n("./src/question_matrixdropdownrendered.ts");n.d(t,"QuestionMatrixDropdownRenderedCell",function(){return x.QuestionMatrixDropdownRenderedCell}),n.d(t,"QuestionMatrixDropdownRenderedRow",function(){return x.QuestionMatrixDropdownRenderedRow}),n.d(t,"QuestionMatrixDropdownRenderedTable",function(){return x.QuestionMatrixDropdownRenderedTable});var S=n("./src/question_matrixdropdown.ts");n.d(t,"MatrixDropdownRowModel",function(){return S.MatrixDropdownRowModel}),n.d(t,"QuestionMatrixDropdownModel",function(){return S.QuestionMatrixDropdownModel});var P=n("./src/question_matrixdynamic.ts");n.d(t,"MatrixDynamicRowModel",function(){return P.MatrixDynamicRowModel}),n.d(t,"QuestionMatrixDynamicModel",function(){return P.QuestionMatrixDynamicModel});var k=n("./src/question_matrix.ts");n.d(t,"MatrixRowModel",function(){return k.MatrixRowModel}),n.d(t,"MatrixCells",function(){return k.MatrixCells}),n.d(t,"QuestionMatrixModel",function(){return k.QuestionMatrixModel});var E=n("./src/question_multipletext.ts");n.d(t,"MultipleTextItemModel",function(){return E.MultipleTextItemModel}),n.d(t,"QuestionMultipleTextModel",function(){return E.QuestionMultipleTextModel});var A=n("./src/panel.ts");n.d(t,"PanelModel",function(){return A.PanelModel}),n.d(t,"PanelModelBase",function(){return A.PanelModelBase}),n.d(t,"QuestionRowModel",function(){return A.QuestionRowModel});var I=n("./src/flowpanel.ts");n.d(t,"FlowPanelModel",function(){return I.FlowPanelModel});var T=n("./src/page.ts");n.d(t,"PageModel",function(){return T.PageModel}),n("./src/template-renderer.ts");var O=n("./src/defaultTitle.ts");n.d(t,"DefaultTitleModel",function(){return O.DefaultTitleModel});var R=n("./src/question.ts");n.d(t,"Question",function(){return R.Question});var V=n("./src/questionnonvalue.ts");n.d(t,"QuestionNonValue",function(){return V.QuestionNonValue});var D=n("./src/question_empty.ts");n.d(t,"QuestionEmptyModel",function(){return D.QuestionEmptyModel});var N=n("./src/question_baseselect.ts");n.d(t,"QuestionCheckboxBase",function(){return N.QuestionCheckboxBase}),n.d(t,"QuestionSelectBase",function(){return N.QuestionSelectBase});var L=n("./src/question_checkbox.ts");n.d(t,"QuestionCheckboxModel",function(){return L.QuestionCheckboxModel});var F=n("./src/question_tagbox.ts");n.d(t,"QuestionTagboxModel",function(){return F.QuestionTagboxModel});var M=n("./src/question_ranking.ts");n.d(t,"QuestionRankingModel",function(){return M.QuestionRankingModel});var q=n("./src/question_comment.ts");n.d(t,"QuestionCommentModel",function(){return q.QuestionCommentModel});var j=n("./src/question_dropdown.ts");n.d(t,"QuestionDropdownModel",function(){return j.QuestionDropdownModel});var B=n("./src/questionfactory.ts");n.d(t,"QuestionFactory",function(){return B.QuestionFactory}),n.d(t,"ElementFactory",function(){return B.ElementFactory});var z=n("./src/question_file.ts");n.d(t,"QuestionFileModel",function(){return z.QuestionFileModel});var U=n("./src/question_html.ts");n.d(t,"QuestionHtmlModel",function(){return U.QuestionHtmlModel});var H=n("./src/question_radiogroup.ts");n.d(t,"QuestionRadiogroupModel",function(){return H.QuestionRadiogroupModel});var Q=n("./src/question_rating.ts");n.d(t,"QuestionRatingModel",function(){return Q.QuestionRatingModel}),n.d(t,"RenderedRatingItem",function(){return Q.RenderedRatingItem});var W=n("./src/question_expression.ts");n.d(t,"QuestionExpressionModel",function(){return W.QuestionExpressionModel});var G=n("./src/question_text.ts");n.d(t,"QuestionTextModel",function(){return G.QuestionTextModel});var $=n("./src/question_boolean.ts");n.d(t,"QuestionBooleanModel",function(){return $.QuestionBooleanModel});var J=n("./src/question_imagepicker.ts");n.d(t,"QuestionImagePickerModel",function(){return J.QuestionImagePickerModel}),n.d(t,"ImageItemValue",function(){return J.ImageItemValue});var Y=n("./src/question_image.ts");n.d(t,"QuestionImageModel",function(){return Y.QuestionImageModel});var K=n("./src/question_signaturepad.ts");n.d(t,"QuestionSignaturePadModel",function(){return K.QuestionSignaturePadModel});var Z=n("./src/question_paneldynamic.ts");n.d(t,"QuestionPanelDynamicModel",function(){return Z.QuestionPanelDynamicModel}),n.d(t,"QuestionPanelDynamicItem",function(){return Z.QuestionPanelDynamicItem});var X=n("./src/surveytimer.ts");n.d(t,"SurveyTimer",function(){return X.SurveyTimer});var ee=n("./src/surveyTimerModel.ts");n.d(t,"SurveyTimerModel",function(){return ee.SurveyTimerModel});var te=n("./src/surveyProgress.ts");n.d(t,"SurveyProgressModel",function(){return te.SurveyProgressModel});var ne=n("./src/surveyProgressButtons.ts");n.d(t,"SurveyProgressButtonsModel",function(){return ne.SurveyProgressButtonsModel});var re=n("./src/survey.ts");n.d(t,"SurveyModel",function(){return re.SurveyModel});var ie=n("./src/trigger.ts");n.d(t,"SurveyTrigger",function(){return ie.SurveyTrigger}),n.d(t,"SurveyTriggerComplete",function(){return ie.SurveyTriggerComplete}),n.d(t,"SurveyTriggerSetValue",function(){return ie.SurveyTriggerSetValue}),n.d(t,"SurveyTriggerVisible",function(){return ie.SurveyTriggerVisible}),n.d(t,"SurveyTriggerCopyValue",function(){return ie.SurveyTriggerCopyValue}),n.d(t,"SurveyTriggerRunExpression",function(){return ie.SurveyTriggerRunExpression}),n.d(t,"Trigger",function(){return ie.Trigger});var oe=n("./src/popup-survey.ts");n.d(t,"PopupSurveyModel",function(){return oe.PopupSurveyModel}),n.d(t,"SurveyWindowModel",function(){return oe.SurveyWindowModel});var ae=n("./src/textPreProcessor.ts");n.d(t,"TextPreProcessor",function(){return ae.TextPreProcessor});var se=n("./src/dxSurveyService.ts");n.d(t,"dxSurveyService",function(){return se.dxSurveyService});var le=n("./src/localization/english.ts");n.d(t,"englishStrings",function(){return le.englishStrings});var ue=n("./src/surveyStrings.ts");n.d(t,"surveyLocalization",function(){return ue.surveyLocalization}),n.d(t,"surveyStrings",function(){return ue.surveyStrings});var ce=n("./src/questionCustomWidgets.ts");n.d(t,"QuestionCustomWidget",function(){return ce.QuestionCustomWidget}),n.d(t,"CustomWidgetCollection",function(){return ce.CustomWidgetCollection});var de=n("./src/question_custom.ts");n.d(t,"QuestionCustomModel",function(){return de.QuestionCustomModel}),n.d(t,"QuestionCompositeModel",function(){return de.QuestionCompositeModel}),n.d(t,"ComponentQuestionJSON",function(){return de.ComponentQuestionJSON}),n.d(t,"ComponentCollection",function(){return de.ComponentCollection});var he=n("./src/stylesmanager.ts");n.d(t,"StylesManager",function(){return he.StylesManager});var pe=n("./src/list.ts");n.d(t,"ListModel",function(){return pe.ListModel});var fe=n("./src/multiSelectListModel.ts");n.d(t,"MultiSelectListModel",function(){return fe.MultiSelectListModel});var me=n("./src/popup.ts");n.d(t,"PopupModel",function(){return me.PopupModel}),n.d(t,"PopupBaseViewModel",function(){return me.PopupBaseViewModel}),n.d(t,"createPopupModalViewModel",function(){return me.createPopupModalViewModel}),n.d(t,"createDialogOptions",function(){return me.createDialogOptions});var ge=n("./src/dropdownListModel.ts");n.d(t,"DropdownListModel",function(){return ge.DropdownListModel});var ve=n("./src/dropdownMultiSelectListModel.ts");n.d(t,"DropdownMultiSelectListModel",function(){return ve.DropdownMultiSelectListModel});var ye=n("./src/question_buttongroup.ts");n.d(t,"QuestionButtonGroupModel",function(){return ye.QuestionButtonGroupModel}),n.d(t,"ButtonGroupItemModel",function(){return ye.ButtonGroupItemModel}),n.d(t,"ButtonGroupItemValue",function(){return ye.ButtonGroupItemValue});var be=n("./src/utils/devices.ts");n.d(t,"IsMobile",function(){return be.IsMobile}),n.d(t,"IsTouch",function(){return be.IsTouch});var _e=n("./src/utils/utils.ts");n.d(t,"confirmAction",function(){return _e.confirmAction}),n.d(t,"detectIEOrEdge",function(){return _e.detectIEOrEdge}),n.d(t,"doKey2ClickUp",function(){return _e.doKey2ClickUp}),n.d(t,"doKey2ClickDown",function(){return _e.doKey2ClickDown}),n.d(t,"doKey2ClickBlur",function(){return _e.doKey2ClickBlur}),n.d(t,"loadFileFromBase64",function(){return _e.loadFileFromBase64}),n.d(t,"increaseHeightByContent",function(){return _e.increaseHeightByContent}),n.d(t,"createSvg",function(){return _e.createSvg}),n.d(t,"sanitizeEditableContent",function(){return _e.sanitizeEditableContent});var we=n("./src/utils/cssClassBuilder.ts");n.d(t,"CssClassBuilder",function(){return we.CssClassBuilder});var Ce=n("./src/defaultCss/cssstandard.ts");n.d(t,"surveyCss",function(){return Ce.surveyCss});var xe=n("./src/dragdrop/survey-elements.ts");n.d(t,"DragDropSurveyElements",function(){return xe.DragDropSurveyElements});var Se,Pe=n("./src/dragdrop/choices.ts");function ke(e,t){Se!=e&&console.error("survey-core has version '"+Se+"' and "+t+" has version '"+e+"'. SurveyJS libraries should have the same versions to work correctly.")}n.d(t,"DragDropChoices",function(){return Pe.DragDropChoices}),Se="".concat("1.9.50")},"./src/entries/core-wo-model.ts":function(e,t,n){"use strict";n.r(t);var r=n("./src/entries/chunks/model.ts");n.d(t,"Version",function(){return r.Version}),n.d(t,"checkLibraryVersion",function(){return r.checkLibraryVersion}),n.d(t,"settings",function(){return r.settings}),n.d(t,"Helpers",function(){return r.Helpers}),n.d(t,"AnswerCountValidator",function(){return r.AnswerCountValidator}),n.d(t,"EmailValidator",function(){return r.EmailValidator}),n.d(t,"NumericValidator",function(){return r.NumericValidator}),n.d(t,"RegexValidator",function(){return r.RegexValidator}),n.d(t,"SurveyValidator",function(){return r.SurveyValidator}),n.d(t,"TextValidator",function(){return r.TextValidator}),n.d(t,"ValidatorResult",function(){return r.ValidatorResult}),n.d(t,"ExpressionValidator",function(){return r.ExpressionValidator}),n.d(t,"ValidatorRunner",function(){return r.ValidatorRunner}),n.d(t,"ItemValue",function(){return r.ItemValue}),n.d(t,"Base",function(){return r.Base}),n.d(t,"Event",function(){return r.Event}),n.d(t,"ArrayChanges",function(){return r.ArrayChanges}),n.d(t,"ComputedUpdater",function(){return r.ComputedUpdater}),n.d(t,"SurveyError",function(){return r.SurveyError}),n.d(t,"SurveyElementCore",function(){return r.SurveyElementCore}),n.d(t,"SurveyElement",function(){return r.SurveyElement}),n.d(t,"DragTypeOverMeEnum",function(){return r.DragTypeOverMeEnum}),n.d(t,"CalculatedValue",function(){return r.CalculatedValue}),n.d(t,"CustomError",function(){return r.CustomError}),n.d(t,"AnswerRequiredError",function(){return r.AnswerRequiredError}),n.d(t,"OneAnswerRequiredError",function(){return r.OneAnswerRequiredError}),n.d(t,"RequreNumericError",function(){return r.RequreNumericError}),n.d(t,"ExceedSizeError",function(){return r.ExceedSizeError}),n.d(t,"LocalizableString",function(){return r.LocalizableString}),n.d(t,"LocalizableStrings",function(){return r.LocalizableStrings}),n.d(t,"HtmlConditionItem",function(){return r.HtmlConditionItem}),n.d(t,"UrlConditionItem",function(){return r.UrlConditionItem}),n.d(t,"ChoicesRestful",function(){return r.ChoicesRestful}),n.d(t,"ChoicesRestfull",function(){return r.ChoicesRestfull}),n.d(t,"FunctionFactory",function(){return r.FunctionFactory}),n.d(t,"registerFunction",function(){return r.registerFunction}),n.d(t,"ConditionRunner",function(){return r.ConditionRunner}),n.d(t,"ExpressionRunner",function(){return r.ExpressionRunner}),n.d(t,"ExpressionExecutor",function(){return r.ExpressionExecutor}),n.d(t,"Operand",function(){return r.Operand}),n.d(t,"Const",function(){return r.Const}),n.d(t,"BinaryOperand",function(){return r.BinaryOperand}),n.d(t,"Variable",function(){return r.Variable}),n.d(t,"FunctionOperand",function(){return r.FunctionOperand}),n.d(t,"ArrayOperand",function(){return r.ArrayOperand}),n.d(t,"ConditionsParser",function(){return r.ConditionsParser}),n.d(t,"ProcessValue",function(){return r.ProcessValue}),n.d(t,"JsonError",function(){return r.JsonError}),n.d(t,"JsonIncorrectTypeError",function(){return r.JsonIncorrectTypeError}),n.d(t,"JsonMetadata",function(){return r.JsonMetadata}),n.d(t,"JsonMetadataClass",function(){return r.JsonMetadataClass}),n.d(t,"JsonMissingTypeError",function(){return r.JsonMissingTypeError}),n.d(t,"JsonMissingTypeErrorBase",function(){return r.JsonMissingTypeErrorBase}),n.d(t,"JsonObject",function(){return r.JsonObject}),n.d(t,"JsonObjectProperty",function(){return r.JsonObjectProperty}),n.d(t,"JsonRequiredPropertyError",function(){return r.JsonRequiredPropertyError}),n.d(t,"JsonUnknownPropertyError",function(){return r.JsonUnknownPropertyError}),n.d(t,"Serializer",function(){return r.Serializer}),n.d(t,"property",function(){return r.property}),n.d(t,"propertyArray",function(){return r.propertyArray}),n.d(t,"MatrixDropdownCell",function(){return r.MatrixDropdownCell}),n.d(t,"MatrixDropdownRowModelBase",function(){return r.MatrixDropdownRowModelBase}),n.d(t,"QuestionMatrixDropdownModelBase",function(){return r.QuestionMatrixDropdownModelBase}),n.d(t,"MatrixDropdownColumn",function(){return r.MatrixDropdownColumn}),n.d(t,"matrixDropdownColumnTypes",function(){return r.matrixDropdownColumnTypes}),n.d(t,"QuestionMatrixDropdownRenderedCell",function(){return r.QuestionMatrixDropdownRenderedCell}),n.d(t,"QuestionMatrixDropdownRenderedRow",function(){return r.QuestionMatrixDropdownRenderedRow}),n.d(t,"QuestionMatrixDropdownRenderedTable",function(){return r.QuestionMatrixDropdownRenderedTable}),n.d(t,"MatrixDropdownRowModel",function(){return r.MatrixDropdownRowModel}),n.d(t,"QuestionMatrixDropdownModel",function(){return r.QuestionMatrixDropdownModel}),n.d(t,"MatrixDynamicRowModel",function(){return r.MatrixDynamicRowModel}),n.d(t,"QuestionMatrixDynamicModel",function(){return r.QuestionMatrixDynamicModel}),n.d(t,"MatrixRowModel",function(){return r.MatrixRowModel}),n.d(t,"MatrixCells",function(){return r.MatrixCells}),n.d(t,"QuestionMatrixModel",function(){return r.QuestionMatrixModel}),n.d(t,"MultipleTextItemModel",function(){return r.MultipleTextItemModel}),n.d(t,"QuestionMultipleTextModel",function(){return r.QuestionMultipleTextModel}),n.d(t,"PanelModel",function(){return r.PanelModel}),n.d(t,"PanelModelBase",function(){return r.PanelModelBase}),n.d(t,"QuestionRowModel",function(){return r.QuestionRowModel}),n.d(t,"FlowPanelModel",function(){return r.FlowPanelModel}),n.d(t,"PageModel",function(){return r.PageModel}),n.d(t,"DefaultTitleModel",function(){return r.DefaultTitleModel}),n.d(t,"Question",function(){return r.Question}),n.d(t,"QuestionNonValue",function(){return r.QuestionNonValue}),n.d(t,"QuestionEmptyModel",function(){return r.QuestionEmptyModel}),n.d(t,"QuestionCheckboxBase",function(){return r.QuestionCheckboxBase}),n.d(t,"QuestionSelectBase",function(){return r.QuestionSelectBase}),n.d(t,"QuestionCheckboxModel",function(){return r.QuestionCheckboxModel}),n.d(t,"QuestionTagboxModel",function(){return r.QuestionTagboxModel}),n.d(t,"QuestionRankingModel",function(){return r.QuestionRankingModel}),n.d(t,"QuestionCommentModel",function(){return r.QuestionCommentModel}),n.d(t,"QuestionDropdownModel",function(){return r.QuestionDropdownModel}),n.d(t,"QuestionFactory",function(){return r.QuestionFactory}),n.d(t,"ElementFactory",function(){return r.ElementFactory}),n.d(t,"QuestionFileModel",function(){return r.QuestionFileModel}),n.d(t,"QuestionHtmlModel",function(){return r.QuestionHtmlModel}),n.d(t,"QuestionRadiogroupModel",function(){return r.QuestionRadiogroupModel}),n.d(t,"QuestionRatingModel",function(){return r.QuestionRatingModel}),n.d(t,"RenderedRatingItem",function(){return r.RenderedRatingItem}),n.d(t,"QuestionExpressionModel",function(){return r.QuestionExpressionModel}),n.d(t,"QuestionTextModel",function(){return r.QuestionTextModel}),n.d(t,"QuestionBooleanModel",function(){return r.QuestionBooleanModel}),n.d(t,"QuestionImagePickerModel",function(){return r.QuestionImagePickerModel}),n.d(t,"ImageItemValue",function(){return r.ImageItemValue}),n.d(t,"QuestionImageModel",function(){return r.QuestionImageModel}),n.d(t,"QuestionSignaturePadModel",function(){return r.QuestionSignaturePadModel}),n.d(t,"QuestionPanelDynamicModel",function(){return r.QuestionPanelDynamicModel}),n.d(t,"QuestionPanelDynamicItem",function(){return r.QuestionPanelDynamicItem}),n.d(t,"SurveyTimer",function(){return r.SurveyTimer}),n.d(t,"SurveyTimerModel",function(){return r.SurveyTimerModel}),n.d(t,"SurveyProgressModel",function(){return r.SurveyProgressModel}),n.d(t,"SurveyProgressButtonsModel",function(){return r.SurveyProgressButtonsModel}),n.d(t,"SurveyModel",function(){return r.SurveyModel}),n.d(t,"SurveyTrigger",function(){return r.SurveyTrigger}),n.d(t,"SurveyTriggerComplete",function(){return r.SurveyTriggerComplete}),n.d(t,"SurveyTriggerSetValue",function(){return r.SurveyTriggerSetValue}),n.d(t,"SurveyTriggerVisible",function(){return r.SurveyTriggerVisible}),n.d(t,"SurveyTriggerCopyValue",function(){return r.SurveyTriggerCopyValue}),n.d(t,"SurveyTriggerRunExpression",function(){return r.SurveyTriggerRunExpression}),n.d(t,"Trigger",function(){return r.Trigger}),n.d(t,"PopupSurveyModel",function(){return r.PopupSurveyModel}),n.d(t,"SurveyWindowModel",function(){return r.SurveyWindowModel}),n.d(t,"TextPreProcessor",function(){return r.TextPreProcessor}),n.d(t,"dxSurveyService",function(){return r.dxSurveyService}),n.d(t,"englishStrings",function(){return r.englishStrings}),n.d(t,"surveyLocalization",function(){return r.surveyLocalization}),n.d(t,"surveyStrings",function(){return r.surveyStrings}),n.d(t,"QuestionCustomWidget",function(){return r.QuestionCustomWidget}),n.d(t,"CustomWidgetCollection",function(){return r.CustomWidgetCollection}),n.d(t,"QuestionCustomModel",function(){return r.QuestionCustomModel}),n.d(t,"QuestionCompositeModel",function(){return r.QuestionCompositeModel}),n.d(t,"ComponentQuestionJSON",function(){return r.ComponentQuestionJSON}),n.d(t,"ComponentCollection",function(){return r.ComponentCollection}),n.d(t,"StylesManager",function(){return r.StylesManager}),n.d(t,"ListModel",function(){return r.ListModel}),n.d(t,"MultiSelectListModel",function(){return r.MultiSelectListModel}),n.d(t,"PopupModel",function(){return r.PopupModel}),n.d(t,"PopupBaseViewModel",function(){return r.PopupBaseViewModel}),n.d(t,"createPopupModalViewModel",function(){return r.createPopupModalViewModel}),n.d(t,"createDialogOptions",function(){return r.createDialogOptions}),n.d(t,"DropdownListModel",function(){return r.DropdownListModel}),n.d(t,"DropdownMultiSelectListModel",function(){return r.DropdownMultiSelectListModel}),n.d(t,"QuestionButtonGroupModel",function(){return r.QuestionButtonGroupModel}),n.d(t,"ButtonGroupItemModel",function(){return r.ButtonGroupItemModel}),n.d(t,"ButtonGroupItemValue",function(){return r.ButtonGroupItemValue}),n.d(t,"IsMobile",function(){return r.IsMobile}),n.d(t,"IsTouch",function(){return r.IsTouch}),n.d(t,"confirmAction",function(){return r.confirmAction}),n.d(t,"detectIEOrEdge",function(){return r.detectIEOrEdge}),n.d(t,"doKey2ClickUp",function(){return r.doKey2ClickUp}),n.d(t,"doKey2ClickDown",function(){return r.doKey2ClickDown}),n.d(t,"doKey2ClickBlur",function(){return r.doKey2ClickBlur}),n.d(t,"loadFileFromBase64",function(){return r.loadFileFromBase64}),n.d(t,"increaseHeightByContent",function(){return r.increaseHeightByContent}),n.d(t,"createSvg",function(){return r.createSvg}),n.d(t,"sanitizeEditableContent",function(){return r.sanitizeEditableContent}),n.d(t,"CssClassBuilder",function(){return r.CssClassBuilder}),n.d(t,"surveyCss",function(){return r.surveyCss}),n.d(t,"DragDropSurveyElements",function(){return r.DragDropSurveyElements}),n.d(t,"DragDropChoices",function(){return r.DragDropChoices});var i=n("./src/defaultCss/cssstandard.ts");n.d(t,"defaultStandardCss",function(){return i.defaultStandardCss});var o=n("./src/defaultCss/cssbootstrap.ts");n.d(t,"defaultBootstrapCss",function(){return o.defaultBootstrapCss});var a=n("./src/defaultCss/cssbootstrapmaterial.ts");n.d(t,"defaultBootstrapMaterialCss",function(){return a.defaultBootstrapMaterialCss});var s=n("./src/defaultCss/defaultV2Css.ts");n.d(t,"defaultV2Css",function(){return s.defaultV2Css});var l=n("./src/defaultCss/cssmodern.ts");n.d(t,"modernCss",function(){return l.modernCss});var u=n("./src/svgbundle.ts");n.d(t,"SvgIconRegistry",function(){return u.SvgIconRegistry}),n.d(t,"SvgRegistry",function(){return u.SvgRegistry}),n.d(t,"SvgBundleViewModel",function(){return u.SvgBundleViewModel});var c=n("./src/rendererFactory.ts");n.d(t,"RendererFactory",function(){return c.RendererFactory});var d=n("./src/utils/responsivity-manager.ts");n.d(t,"ResponsivityManager",function(){return d.ResponsivityManager}),n.d(t,"VerticalResponsivityManager",function(){return d.VerticalResponsivityManager});var h=n("./src/utils/utils.ts");n.d(t,"unwrap",function(){return h.unwrap});var p=n("./src/actions/action.ts");n.d(t,"createDropdownActionModel",function(){return p.createDropdownActionModel}),n.d(t,"createDropdownActionModelAdvanced",function(){return p.createDropdownActionModelAdvanced}),n.d(t,"Action",function(){return p.Action}),n.d(t,"ActionDropdownViewModel",function(){return p.ActionDropdownViewModel});var f=n("./src/actions/adaptive-container.ts");n.d(t,"AdaptiveActionContainer",function(){return f.AdaptiveActionContainer});var m=n("./src/actions/container.ts");n.d(t,"defaultActionBarCss",function(){return m.defaultActionBarCss}),n.d(t,"ActionContainer",function(){return m.ActionContainer});var g=n("./src/utils/tooltip.ts");n.d(t,"TooltipManager",function(){return g.TooltipManager});var v=n("./src/utils/dragOrClickHelper.ts");n.d(t,"DragOrClickHelper",function(){return v.DragOrClickHelper})},"./src/entries/core.ts":function(e,t,n){"use strict";n.r(t);var r=n("./src/entries/core-wo-model.ts");n.d(t,"Version",function(){return r.Version}),n.d(t,"checkLibraryVersion",function(){return r.checkLibraryVersion}),n.d(t,"settings",function(){return r.settings}),n.d(t,"Helpers",function(){return r.Helpers}),n.d(t,"AnswerCountValidator",function(){return r.AnswerCountValidator}),n.d(t,"EmailValidator",function(){return r.EmailValidator}),n.d(t,"NumericValidator",function(){return r.NumericValidator}),n.d(t,"RegexValidator",function(){return r.RegexValidator}),n.d(t,"SurveyValidator",function(){return r.SurveyValidator}),n.d(t,"TextValidator",function(){return r.TextValidator}),n.d(t,"ValidatorResult",function(){return r.ValidatorResult}),n.d(t,"ExpressionValidator",function(){return r.ExpressionValidator}),n.d(t,"ValidatorRunner",function(){return r.ValidatorRunner}),n.d(t,"ItemValue",function(){return r.ItemValue}),n.d(t,"Base",function(){return r.Base}),n.d(t,"Event",function(){return r.Event}),n.d(t,"ArrayChanges",function(){return r.ArrayChanges}),n.d(t,"ComputedUpdater",function(){return r.ComputedUpdater}),n.d(t,"SurveyError",function(){return r.SurveyError}),n.d(t,"SurveyElementCore",function(){return r.SurveyElementCore}),n.d(t,"SurveyElement",function(){return r.SurveyElement}),n.d(t,"DragTypeOverMeEnum",function(){return r.DragTypeOverMeEnum}),n.d(t,"CalculatedValue",function(){return r.CalculatedValue}),n.d(t,"CustomError",function(){return r.CustomError}),n.d(t,"AnswerRequiredError",function(){return r.AnswerRequiredError}),n.d(t,"OneAnswerRequiredError",function(){return r.OneAnswerRequiredError}),n.d(t,"RequreNumericError",function(){return r.RequreNumericError}),n.d(t,"ExceedSizeError",function(){return r.ExceedSizeError}),n.d(t,"LocalizableString",function(){return r.LocalizableString}),n.d(t,"LocalizableStrings",function(){return r.LocalizableStrings}),n.d(t,"HtmlConditionItem",function(){return r.HtmlConditionItem}),n.d(t,"UrlConditionItem",function(){return r.UrlConditionItem}),n.d(t,"ChoicesRestful",function(){return r.ChoicesRestful}),n.d(t,"ChoicesRestfull",function(){return r.ChoicesRestfull}),n.d(t,"FunctionFactory",function(){return r.FunctionFactory}),n.d(t,"registerFunction",function(){return r.registerFunction}),n.d(t,"ConditionRunner",function(){return r.ConditionRunner}),n.d(t,"ExpressionRunner",function(){return r.ExpressionRunner}),n.d(t,"ExpressionExecutor",function(){return r.ExpressionExecutor}),n.d(t,"Operand",function(){return r.Operand}),n.d(t,"Const",function(){return r.Const}),n.d(t,"BinaryOperand",function(){return r.BinaryOperand}),n.d(t,"Variable",function(){return r.Variable}),n.d(t,"FunctionOperand",function(){return r.FunctionOperand}),n.d(t,"ArrayOperand",function(){return r.ArrayOperand}),n.d(t,"ConditionsParser",function(){return r.ConditionsParser}),n.d(t,"ProcessValue",function(){return r.ProcessValue}),n.d(t,"JsonError",function(){return r.JsonError}),n.d(t,"JsonIncorrectTypeError",function(){return r.JsonIncorrectTypeError}),n.d(t,"JsonMetadata",function(){return r.JsonMetadata}),n.d(t,"JsonMetadataClass",function(){return r.JsonMetadataClass}),n.d(t,"JsonMissingTypeError",function(){return r.JsonMissingTypeError}),n.d(t,"JsonMissingTypeErrorBase",function(){return r.JsonMissingTypeErrorBase}),n.d(t,"JsonObject",function(){return r.JsonObject}),n.d(t,"JsonObjectProperty",function(){return r.JsonObjectProperty}),n.d(t,"JsonRequiredPropertyError",function(){return r.JsonRequiredPropertyError}),n.d(t,"JsonUnknownPropertyError",function(){return r.JsonUnknownPropertyError}),n.d(t,"Serializer",function(){return r.Serializer}),n.d(t,"property",function(){return r.property}),n.d(t,"propertyArray",function(){return r.propertyArray}),n.d(t,"MatrixDropdownCell",function(){return r.MatrixDropdownCell}),n.d(t,"MatrixDropdownRowModelBase",function(){return r.MatrixDropdownRowModelBase}),n.d(t,"QuestionMatrixDropdownModelBase",function(){return r.QuestionMatrixDropdownModelBase}),n.d(t,"MatrixDropdownColumn",function(){return r.MatrixDropdownColumn}),n.d(t,"matrixDropdownColumnTypes",function(){return r.matrixDropdownColumnTypes}),n.d(t,"QuestionMatrixDropdownRenderedCell",function(){return r.QuestionMatrixDropdownRenderedCell}),n.d(t,"QuestionMatrixDropdownRenderedRow",function(){return r.QuestionMatrixDropdownRenderedRow}),n.d(t,"QuestionMatrixDropdownRenderedTable",function(){return r.QuestionMatrixDropdownRenderedTable}),n.d(t,"MatrixDropdownRowModel",function(){return r.MatrixDropdownRowModel}),n.d(t,"QuestionMatrixDropdownModel",function(){return r.QuestionMatrixDropdownModel}),n.d(t,"MatrixDynamicRowModel",function(){return r.MatrixDynamicRowModel}),n.d(t,"QuestionMatrixDynamicModel",function(){return r.QuestionMatrixDynamicModel}),n.d(t,"MatrixRowModel",function(){return r.MatrixRowModel}),n.d(t,"MatrixCells",function(){return r.MatrixCells}),n.d(t,"QuestionMatrixModel",function(){return r.QuestionMatrixModel}),n.d(t,"MultipleTextItemModel",function(){return r.MultipleTextItemModel}),n.d(t,"QuestionMultipleTextModel",function(){return r.QuestionMultipleTextModel}),n.d(t,"PanelModel",function(){return r.PanelModel}),n.d(t,"PanelModelBase",function(){return r.PanelModelBase}),n.d(t,"QuestionRowModel",function(){return r.QuestionRowModel}),n.d(t,"FlowPanelModel",function(){return r.FlowPanelModel}),n.d(t,"PageModel",function(){return r.PageModel}),n.d(t,"DefaultTitleModel",function(){return r.DefaultTitleModel}),n.d(t,"Question",function(){return r.Question}),n.d(t,"QuestionNonValue",function(){return r.QuestionNonValue}),n.d(t,"QuestionEmptyModel",function(){return r.QuestionEmptyModel}),n.d(t,"QuestionCheckboxBase",function(){return r.QuestionCheckboxBase}),n.d(t,"QuestionSelectBase",function(){return r.QuestionSelectBase}),n.d(t,"QuestionCheckboxModel",function(){return r.QuestionCheckboxModel}),n.d(t,"QuestionTagboxModel",function(){return r.QuestionTagboxModel}),n.d(t,"QuestionRankingModel",function(){return r.QuestionRankingModel}),n.d(t,"QuestionCommentModel",function(){return r.QuestionCommentModel}),n.d(t,"QuestionDropdownModel",function(){return r.QuestionDropdownModel}),n.d(t,"QuestionFactory",function(){return r.QuestionFactory}),n.d(t,"ElementFactory",function(){return r.ElementFactory}),n.d(t,"QuestionFileModel",function(){return r.QuestionFileModel}),n.d(t,"QuestionHtmlModel",function(){return r.QuestionHtmlModel}),n.d(t,"QuestionRadiogroupModel",function(){return r.QuestionRadiogroupModel}),n.d(t,"QuestionRatingModel",function(){return r.QuestionRatingModel}),n.d(t,"RenderedRatingItem",function(){return r.RenderedRatingItem}),n.d(t,"QuestionExpressionModel",function(){return r.QuestionExpressionModel}),n.d(t,"QuestionTextModel",function(){return r.QuestionTextModel}),n.d(t,"QuestionBooleanModel",function(){return r.QuestionBooleanModel}),n.d(t,"QuestionImagePickerModel",function(){return r.QuestionImagePickerModel}),n.d(t,"ImageItemValue",function(){return r.ImageItemValue}),n.d(t,"QuestionImageModel",function(){return r.QuestionImageModel}),n.d(t,"QuestionSignaturePadModel",function(){return r.QuestionSignaturePadModel}),n.d(t,"QuestionPanelDynamicModel",function(){return r.QuestionPanelDynamicModel}),n.d(t,"QuestionPanelDynamicItem",function(){return r.QuestionPanelDynamicItem}),n.d(t,"SurveyTimer",function(){return r.SurveyTimer}),n.d(t,"SurveyTimerModel",function(){return r.SurveyTimerModel}),n.d(t,"SurveyProgressModel",function(){return r.SurveyProgressModel}),n.d(t,"SurveyProgressButtonsModel",function(){return r.SurveyProgressButtonsModel}),n.d(t,"SurveyModel",function(){return r.SurveyModel}),n.d(t,"SurveyTrigger",function(){return r.SurveyTrigger}),n.d(t,"SurveyTriggerComplete",function(){return r.SurveyTriggerComplete}),n.d(t,"SurveyTriggerSetValue",function(){return r.SurveyTriggerSetValue}),n.d(t,"SurveyTriggerVisible",function(){return r.SurveyTriggerVisible}),n.d(t,"SurveyTriggerCopyValue",function(){return r.SurveyTriggerCopyValue}),n.d(t,"SurveyTriggerRunExpression",function(){return r.SurveyTriggerRunExpression}),n.d(t,"Trigger",function(){return r.Trigger}),n.d(t,"PopupSurveyModel",function(){return r.PopupSurveyModel}),n.d(t,"SurveyWindowModel",function(){return r.SurveyWindowModel}),n.d(t,"TextPreProcessor",function(){return r.TextPreProcessor}),n.d(t,"dxSurveyService",function(){return r.dxSurveyService}),n.d(t,"englishStrings",function(){return r.englishStrings}),n.d(t,"surveyLocalization",function(){return r.surveyLocalization}),n.d(t,"surveyStrings",function(){return r.surveyStrings}),n.d(t,"QuestionCustomWidget",function(){return r.QuestionCustomWidget}),n.d(t,"CustomWidgetCollection",function(){return r.CustomWidgetCollection}),n.d(t,"QuestionCustomModel",function(){return r.QuestionCustomModel}),n.d(t,"QuestionCompositeModel",function(){return r.QuestionCompositeModel}),n.d(t,"ComponentQuestionJSON",function(){return r.ComponentQuestionJSON}),n.d(t,"ComponentCollection",function(){return r.ComponentCollection}),n.d(t,"StylesManager",function(){return r.StylesManager}),n.d(t,"ListModel",function(){return r.ListModel}),n.d(t,"MultiSelectListModel",function(){return r.MultiSelectListModel}),n.d(t,"PopupModel",function(){return r.PopupModel}),n.d(t,"PopupBaseViewModel",function(){return r.PopupBaseViewModel}),n.d(t,"createPopupModalViewModel",function(){return r.createPopupModalViewModel}),n.d(t,"createDialogOptions",function(){return r.createDialogOptions}),n.d(t,"DropdownListModel",function(){return r.DropdownListModel}),n.d(t,"DropdownMultiSelectListModel",function(){return r.DropdownMultiSelectListModel}),n.d(t,"QuestionButtonGroupModel",function(){return r.QuestionButtonGroupModel}),n.d(t,"ButtonGroupItemModel",function(){return r.ButtonGroupItemModel}),n.d(t,"ButtonGroupItemValue",function(){return r.ButtonGroupItemValue}),n.d(t,"IsMobile",function(){return r.IsMobile}),n.d(t,"IsTouch",function(){return r.IsTouch}),n.d(t,"confirmAction",function(){return r.confirmAction}),n.d(t,"detectIEOrEdge",function(){return r.detectIEOrEdge}),n.d(t,"doKey2ClickUp",function(){return r.doKey2ClickUp}),n.d(t,"doKey2ClickDown",function(){return r.doKey2ClickDown}),n.d(t,"doKey2ClickBlur",function(){return r.doKey2ClickBlur}),n.d(t,"loadFileFromBase64",function(){return r.loadFileFromBase64}),n.d(t,"increaseHeightByContent",function(){return r.increaseHeightByContent}),n.d(t,"createSvg",function(){return r.createSvg}),n.d(t,"sanitizeEditableContent",function(){return r.sanitizeEditableContent}),n.d(t,"CssClassBuilder",function(){return r.CssClassBuilder}),n.d(t,"surveyCss",function(){return r.surveyCss}),n.d(t,"DragDropSurveyElements",function(){return r.DragDropSurveyElements}),n.d(t,"DragDropChoices",function(){return r.DragDropChoices}),n.d(t,"defaultStandardCss",function(){return r.defaultStandardCss}),n.d(t,"defaultBootstrapCss",function(){return r.defaultBootstrapCss}),n.d(t,"defaultBootstrapMaterialCss",function(){return r.defaultBootstrapMaterialCss}),n.d(t,"defaultV2Css",function(){return r.defaultV2Css}),n.d(t,"modernCss",function(){return r.modernCss}),n.d(t,"SvgIconRegistry",function(){return r.SvgIconRegistry}),n.d(t,"SvgRegistry",function(){return r.SvgRegistry}),n.d(t,"SvgBundleViewModel",function(){return r.SvgBundleViewModel}),n.d(t,"RendererFactory",function(){return r.RendererFactory}),n.d(t,"ResponsivityManager",function(){return r.ResponsivityManager}),n.d(t,"VerticalResponsivityManager",function(){return r.VerticalResponsivityManager}),n.d(t,"unwrap",function(){return r.unwrap}),n.d(t,"createDropdownActionModel",function(){return r.createDropdownActionModel}),n.d(t,"createDropdownActionModelAdvanced",function(){return r.createDropdownActionModelAdvanced}),n.d(t,"Action",function(){return r.Action}),n.d(t,"ActionDropdownViewModel",function(){return r.ActionDropdownViewModel}),n.d(t,"AdaptiveActionContainer",function(){return r.AdaptiveActionContainer}),n.d(t,"defaultActionBarCss",function(){return r.defaultActionBarCss}),n.d(t,"ActionContainer",function(){return r.ActionContainer}),n.d(t,"TooltipManager",function(){return r.TooltipManager}),n.d(t,"DragOrClickHelper",function(){return r.DragOrClickHelper});var i=n("./src/survey.ts");n.d(t,"Model",function(){return i.SurveyModel})},"./src/error.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"AnswerRequiredError",function(){return s}),n.d(t,"OneAnswerRequiredError",function(){return l}),n.d(t,"RequreNumericError",function(){return u}),n.d(t,"ExceedSizeError",function(){return c}),n.d(t,"WebRequestError",function(){return d}),n.d(t,"WebRequestEmptyError",function(){return h}),n.d(t,"OtherEmptyError",function(){return p}),n.d(t,"UploadingFileError",function(){return f}),n.d(t,"RequiredInAllRowsError",function(){return m}),n.d(t,"MinRowCountError",function(){return g}),n.d(t,"KeyDuplicationError",function(){return v}),n.d(t,"CustomError",function(){return y});var r,i=n("./src/surveyStrings.ts"),o=n("./src/survey-error.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"required"},t.prototype.getDefaultText=function(){return this.getLocalizationString("requiredError")},t}(o.SurveyError),l=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"requireoneanswer"},t.prototype.getDefaultText=function(){return this.getLocalizationString("requiredErrorInPanel")},t}(o.SurveyError),u=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"requirenumeric"},t.prototype.getDefaultText=function(){return this.getLocalizationString("numericError")},t}(o.SurveyError),c=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,null,n)||this;return r.maxSize=t,r.locText.text=r.getText(),r}return a(t,e),t.prototype.getErrorType=function(){return"exceedsize"},t.prototype.getDefaultText=function(){return i.surveyLocalization.getString("exceedMaxSize").format(this.getTextSize())},t.prototype.getTextSize=function(){if(0===this.maxSize)return"0 Byte";var e=Math.floor(Math.log(this.maxSize)/Math.log(1024));return(this.maxSize/Math.pow(1024,e)).toFixed([0,0,2,3,3][e])+" "+["Bytes","KB","MB","GB","TB"][e]},t}(o.SurveyError),d=function(e){function t(t,n,r){void 0===r&&(r=null);var i=e.call(this,null,r)||this;return i.status=t,i.response=n,i}return a(t,e),t.prototype.getErrorType=function(){return"webrequest"},t.prototype.getDefaultText=function(){var e=this.getLocalizationString("urlRequestError");return e?e.format(this.status,this.response):""},t}(o.SurveyError),h=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"webrequestempty"},t.prototype.getDefaultText=function(){return this.getLocalizationString("urlGetChoicesError")},t}(o.SurveyError),p=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"otherempty"},t.prototype.getDefaultText=function(){return this.getLocalizationString("otherRequiredError")},t}(o.SurveyError),f=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"uploadingfile"},t.prototype.getDefaultText=function(){return this.getLocalizationString("uploadingFile")},t}(o.SurveyError),m=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"requiredinallrowserror"},t.prototype.getDefaultText=function(){return this.getLocalizationString("requiredInAllRowsError")},t}(o.SurveyError),g=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,null,n)||this;return r.minRowCount=t,r}return a(t,e),t.prototype.getErrorType=function(){return"minrowcounterror"},t.prototype.getDefaultText=function(){return i.surveyLocalization.getString("minRowCountError").format(this.minRowCount)},t}(o.SurveyError),v=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"keyduplicationerror"},t.prototype.getDefaultText=function(){return this.getLocalizationString("keyDuplicationError")},t}(o.SurveyError),y=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,t,n)||this;return r.text=t,r}return a(t,e),t.prototype.getErrorType=function(){return"custom"},t}(o.SurveyError)},"./src/expressionItems.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ExpressionItem",function(){return l}),n.d(t,"HtmlConditionItem",function(){return u}),n.d(t,"UrlConditionItem",function(){return c});var r,i=n("./src/jsonobject.ts"),o=n("./src/base.ts"),a=n("./src/conditions.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this)||this;return n.createLocalizableString("html",n),n.expression=t,n}return s(t,e),t.prototype.getType=function(){return"expressionitem"},t.prototype.runCondition=function(e,t){return!!this.expression&&new a.ConditionRunner(this.expression).run(e,t)},Object.defineProperty(t.prototype,"expression",{get:function(){return this.getPropertyValue("expression","")},set:function(e){this.setPropertyValue("expression",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locHtml",{get:function(){return this.getLocalizableString("html")},enumerable:!1,configurable:!0}),t.prototype.getLocale=function(){return this.locOwner?this.locOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.locOwner?this.locOwner.getMarkdownHtml(e,t):null},t.prototype.getRenderer=function(e){return this.locOwner?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.locOwner?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.locOwner},t}(o.Base),u=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this,t)||this;return r.createLocalizableString("html",r),r.html=n,r}return s(t,e),t.prototype.getType=function(){return"htmlconditionitem"},Object.defineProperty(t.prototype,"html",{get:function(){return this.getLocalizableStringText("html")},set:function(e){this.setLocalizableStringText("html",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locHtml",{get:function(){return this.getLocalizableString("html")},enumerable:!1,configurable:!0}),t}(l),c=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this,t)||this;return r.createLocalizableString("url",r),r.url=n,r}return s(t,e),t.prototype.getType=function(){return"urlconditionitem"},Object.defineProperty(t.prototype,"url",{get:function(){return this.getLocalizableStringText("url")},set:function(e){this.setLocalizableStringText("url",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locUrl",{get:function(){return this.getLocalizableString("url")},enumerable:!1,configurable:!0}),t}(l);i.Serializer.addClass("expressionitem",["expression:condition"],function(){return new l},"base"),i.Serializer.addClass("htmlconditionitem",[{name:"html:html",serializationProperty:"locHtml"}],function(){return new u},"expressionitem"),i.Serializer.addClass("urlconditionitem",[{name:"url:string",serializationProperty:"locUrl"}],function(){return new c},"expressionitem")},"./src/expressions/expressionParser.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SyntaxError",function(){return a}),n.d(t,"parse",function(){return s});var r,i=n("./src/expressions/expressions.ts"),o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(n,r,i,o){var a=e.call(this)||this;return a.message=n,a.expected=r,a.found=i,a.location=o,a.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return o(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace("/[\0-\x0f]/g",function(e){return"\\x0"+n(e)}).replace("/[\x10-\x1f\x7f-\x9f]/g",function(e){return"\\x"+n(e)})}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace("/[\0-\x0f]/g",function(e){return"\\x0"+n(e)}).replace("/[\x10-\x1f\x7f-\x9f]/g",function(e){return"\\x"+n(e)})}function o(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map(function(e){return Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e)});return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(o);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+((a=t)?'"'+r(a)+'"':"end of input")+" found.";var a},t}(Error),s=function(e,t){t=void 0!==t?t:{};var n,r,o,s,l,u,c,d,h={},p={Expression:Ge},f=Ge,m=function(e,t){return vt(e,t,!0)},g=Ue("||",!1),v=Ue("or",!0),y=Ue("&&",!1),b=Ue("and",!0),_=function(e,t){return vt(e,t)},w=Ue("<=",!1),C=Ue("lessorequal",!0),x=Ue(">=",!1),S=Ue("greaterorequal",!0),P=Ue("=",!1),k=Ue("equal",!0),E=Ue("!=",!1),A=Ue("notequal",!0),I=Ue("<",!1),T=Ue("less",!0),O=Ue(">",!1),R=Ue("greater",!0),V=Ue("+",!1),D=Ue("-",!1),N=Ue("*",!1),L=Ue("/",!1),F=Ue("%",!1),M=Ue("^",!1),q=Ue("power",!0),j=Ue("*=",!1),B=Ue("contains",!0),z=Ue("contain",!0),U=Ue("notcontains",!0),H=Ue("notcontain",!0),Q=Ue("anyof",!0),W=Ue("allof",!0),G=Ue("(",!1),$=Ue(")",!1),J=Ue("!",!1),Y=Ue("negate",!0),K=Ue("empty",!0),Z=Ue("notempty",!0),X=Ue("undefined",!1),ee=Ue("null",!1),te=Ue("{",!1),ne=Ue("}",!1),re=Ue("''",!1),ie=Ue('""',!1),oe=Ue("'",!1),ae=function(e){return"'"+e+"'"},se=Ue('"',!1),le=Ue("[",!1),ue=Ue("]",!1),ce=Ue(",",!1),de=Ue("true",!0),he=Ue("false",!0),pe=Ue("0x",!1),fe=/^[\-]/,me=He(["-"],!1,!1),ge=Ue(".",!1),ve=Ue("0",!1),ye=function(e){return e.join("")},be=Ue("\\'",!1),_e=Ue('\\"',!1),we=/^[^"']/,Ce=He(['"',"'"],!0,!1),xe=function(){return ze()},Se=/^[^{}]/,Pe=He(["{","}"],!0,!1),ke=/^[0-9]/,Ee=He([["0","9"]],!1,!1),Ae=/^[1-9]/,Ie=He([["1","9"]],!1,!1),Te=/^[a-zA-Z_]/,Oe=He([["a","z"],["A","Z"],"_"],!1,!1),Re={type:"other",description:"whitespace"},Ve=/^[ \t\n\r]/,De=He([" ","\t","\n","\r"],!1,!1),Ne=0,Le=0,Fe=[{line:1,column:1}],Me=0,qe=[],je=0,Be={};if(void 0!==t.startRule){if(!(t.startRule in p))throw new Error("Can't start parsing from rule \""+t.startRule+'".');f=p[t.startRule]}function ze(){return e.substring(Le,Ne)}function Ue(e,t){return{type:"literal",text:e,ignoreCase:t}}function He(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Qe(t){var n,r=Fe[t];if(r)return r;for(n=t-1;!Fe[n];)n--;for(r={line:(r=Fe[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Fe[t]=r,r}function We(e){Ne<Me||(Ne>Me&&(Me=Ne,qe=[]),qe.push(e))}function Ge(){var e,t,n,r,i,o,a,s,l=34*Ne+0,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,gt()!==h)if((t=Je())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=$e())!==h&&(a=gt())!==h&&(s=Je())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=$e())!==h&&(a=gt())!==h&&(s=Je())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);n!==h&&(r=gt())!==h?(Le=e,e=m(t,n)):(Ne=e,e=h)}else Ne=e,e=h;else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function $e(){var t,n,r=34*Ne+1,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"||"===e.substr(Ne,2)?(n="||",Ne+=2):(n=h,0===je&&We(g)),n===h&&("or"===e.substr(Ne,2).toLowerCase()?(n=e.substr(Ne,2),Ne+=2):(n=h,0===je&&We(v))),n!==h&&(Le=t,n="or"),Be[r]={nextPos:Ne,result:t=n},t)}function Je(){var e,t,n,r,i,o,a,s,l=34*Ne+2,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,(t=Ke())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=Ye())!==h&&(a=gt())!==h&&(s=Ke())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=Ye())!==h&&(a=gt())!==h&&(s=Ke())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);n!==h?(Le=e,e=t=m(t,n)):(Ne=e,e=h)}else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function Ye(){var t,n,r=34*Ne+3,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"&&"===e.substr(Ne,2)?(n="&&",Ne+=2):(n=h,0===je&&We(y)),n===h&&("and"===e.substr(Ne,3).toLowerCase()?(n=e.substr(Ne,3),Ne+=3):(n=h,0===je&&We(b))),n!==h&&(Le=t,n="and"),Be[r]={nextPos:Ne,result:t=n},t)}function Ke(){var e,t,n,r,i,o,a,s,l=34*Ne+4,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,(t=Xe())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=Ze())!==h&&(a=gt())!==h&&(s=Xe())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=Ze())!==h&&(a=gt())!==h&&(s=Xe())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);n!==h?(Le=e,e=t=_(t,n)):(Ne=e,e=h)}else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function Ze(){var t,n,r=34*Ne+5,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"<="===e.substr(Ne,2)?(n="<=",Ne+=2):(n=h,0===je&&We(w)),n===h&&("lessorequal"===e.substr(Ne,11).toLowerCase()?(n=e.substr(Ne,11),Ne+=11):(n=h,0===je&&We(C))),n!==h&&(Le=t,n="lessorequal"),(t=n)===h&&(t=Ne,">="===e.substr(Ne,2)?(n=">=",Ne+=2):(n=h,0===je&&We(x)),n===h&&("greaterorequal"===e.substr(Ne,14).toLowerCase()?(n=e.substr(Ne,14),Ne+=14):(n=h,0===je&&We(S))),n!==h&&(Le=t,n="greaterorequal"),(t=n)===h&&(t=Ne,61===e.charCodeAt(Ne)?(n="=",Ne++):(n=h,0===je&&We(P)),n===h&&("equal"===e.substr(Ne,5).toLowerCase()?(n=e.substr(Ne,5),Ne+=5):(n=h,0===je&&We(k))),n!==h&&(Le=t,n="equal"),(t=n)===h&&(t=Ne,"!="===e.substr(Ne,2)?(n="!=",Ne+=2):(n=h,0===je&&We(E)),n===h&&("notequal"===e.substr(Ne,8).toLowerCase()?(n=e.substr(Ne,8),Ne+=8):(n=h,0===je&&We(A))),n!==h&&(Le=t,n="notequal"),(t=n)===h&&(t=Ne,60===e.charCodeAt(Ne)?(n="<",Ne++):(n=h,0===je&&We(I)),n===h&&("less"===e.substr(Ne,4).toLowerCase()?(n=e.substr(Ne,4),Ne+=4):(n=h,0===je&&We(T))),n!==h&&(Le=t,n="less"),(t=n)===h&&(t=Ne,62===e.charCodeAt(Ne)?(n=">",Ne++):(n=h,0===je&&We(O)),n===h&&("greater"===e.substr(Ne,7).toLowerCase()?(n=e.substr(Ne,7),Ne+=7):(n=h,0===je&&We(R))),n!==h&&(Le=t,n="greater"),t=n))))),Be[r]={nextPos:Ne,result:t},t)}function Xe(){var e,t,n,r,i,o,a,s,l=34*Ne+6,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,(t=tt())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=et())!==h&&(a=gt())!==h&&(s=tt())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=et())!==h&&(a=gt())!==h&&(s=tt())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);n!==h?(Le=e,e=t=m(t,n)):(Ne=e,e=h)}else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function et(){var t,n,r=34*Ne+7,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,43===e.charCodeAt(Ne)?(n="+",Ne++):(n=h,0===je&&We(V)),n!==h&&(Le=t,n="plus"),(t=n)===h&&(t=Ne,45===e.charCodeAt(Ne)?(n="-",Ne++):(n=h,0===je&&We(D)),n!==h&&(Le=t,n="minus"),t=n),Be[r]={nextPos:Ne,result:t},t)}function tt(){var e,t,n,r,i,o,a,s,l=34*Ne+8,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,(t=rt())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=nt())!==h&&(a=gt())!==h&&(s=rt())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=nt())!==h&&(a=gt())!==h&&(s=rt())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);n!==h?(Le=e,e=t=m(t,n)):(Ne=e,e=h)}else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function nt(){var t,n,r=34*Ne+9,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,42===e.charCodeAt(Ne)?(n="*",Ne++):(n=h,0===je&&We(N)),n!==h&&(Le=t,n="mul"),(t=n)===h&&(t=Ne,47===e.charCodeAt(Ne)?(n="/",Ne++):(n=h,0===je&&We(L)),n!==h&&(Le=t,n="div"),(t=n)===h&&(t=Ne,37===e.charCodeAt(Ne)?(n="%",Ne++):(n=h,0===je&&We(F)),n!==h&&(Le=t,n="mod"),t=n)),Be[r]={nextPos:Ne,result:t},t)}function rt(){var e,t,n,r,i,o,a,s,l=34*Ne+10,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,(t=ot())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=it())!==h&&(a=gt())!==h&&(s=ot())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=it())!==h&&(a=gt())!==h&&(s=ot())!==h?r=i=[i,o,a,s]:(Ne=r,r=h);n!==h?(Le=e,e=t=m(t,n)):(Ne=e,e=h)}else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function it(){var t,n,r=34*Ne+11,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,94===e.charCodeAt(Ne)?(n="^",Ne++):(n=h,0===je&&We(M)),n===h&&("power"===e.substr(Ne,5).toLowerCase()?(n=e.substr(Ne,5),Ne+=5):(n=h,0===je&&We(q))),n!==h&&(Le=t,n="power"),Be[r]={nextPos:Ne,result:t=n},t)}function ot(){var e,t,n,r,i,o,a,s,l=34*Ne+12,u=Be[l];if(u)return Ne=u.nextPos,u.result;if(e=Ne,(t=st())!==h){for(n=[],r=Ne,(i=gt())!==h&&(o=at())!==h&&(a=gt())!==h?((s=st())===h&&(s=null),s!==h?r=i=[i,o,a,s]:(Ne=r,r=h)):(Ne=r,r=h);r!==h;)n.push(r),r=Ne,(i=gt())!==h&&(o=at())!==h&&(a=gt())!==h?((s=st())===h&&(s=null),s!==h?r=i=[i,o,a,s]:(Ne=r,r=h)):(Ne=r,r=h);n!==h?(Le=e,e=t=_(t,n)):(Ne=e,e=h)}else Ne=e,e=h;return Be[l]={nextPos:Ne,result:e},e}function at(){var t,n,r=34*Ne+13,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"*="===e.substr(Ne,2)?(n="*=",Ne+=2):(n=h,0===je&&We(j)),n===h&&("contains"===e.substr(Ne,8).toLowerCase()?(n=e.substr(Ne,8),Ne+=8):(n=h,0===je&&We(B)),n===h&&("contain"===e.substr(Ne,7).toLowerCase()?(n=e.substr(Ne,7),Ne+=7):(n=h,0===je&&We(z)))),n!==h&&(Le=t,n="contains"),(t=n)===h&&(t=Ne,"notcontains"===e.substr(Ne,11).toLowerCase()?(n=e.substr(Ne,11),Ne+=11):(n=h,0===je&&We(U)),n===h&&("notcontain"===e.substr(Ne,10).toLowerCase()?(n=e.substr(Ne,10),Ne+=10):(n=h,0===je&&We(H))),n!==h&&(Le=t,n="notcontains"),(t=n)===h&&(t=Ne,"anyof"===e.substr(Ne,5).toLowerCase()?(n=e.substr(Ne,5),Ne+=5):(n=h,0===je&&We(Q)),n!==h&&(Le=t,n="anyof"),(t=n)===h&&(t=Ne,"allof"===e.substr(Ne,5).toLowerCase()?(n=e.substr(Ne,5),Ne+=5):(n=h,0===je&&We(W)),n!==h&&(Le=t,n="allof"),t=n))),Be[r]={nextPos:Ne,result:t},t)}function st(){var t,n,r,o,a=34*Ne+14,s=Be[a];return s?(Ne=s.nextPos,s.result):(t=Ne,40===e.charCodeAt(Ne)?(n="(",Ne++):(n=h,0===je&&We(G)),n!==h&&gt()!==h&&(r=Ge())!==h&&gt()!==h?(41===e.charCodeAt(Ne)?(o=")",Ne++):(o=h,0===je&&We($)),o===h&&(o=null),o!==h?(Le=t,t=n=r):(Ne=t,t=h)):(Ne=t,t=h),t===h&&(t=function(){var t,n,r,o,a,s=34*Ne+15,l=Be[s];return l?(Ne=l.nextPos,l.result):(t=Ne,(n=pt())!==h?(40===e.charCodeAt(Ne)?(r="(",Ne++):(r=h,0===je&&We(G)),r!==h&&(o=ut())!==h?(41===e.charCodeAt(Ne)?(a=")",Ne++):(a=h,0===je&&We($)),a===h&&(a=null),a!==h?(Le=t,t=n=new i.FunctionOperand(n,o)):(Ne=t,t=h)):(Ne=t,t=h)):(Ne=t,t=h),Be[s]={nextPos:Ne,result:t},t)}())===h&&(t=function(){var t,n,r,o=34*Ne+16,a=Be[o];return a?(Ne=a.nextPos,a.result):(t=Ne,33===e.charCodeAt(Ne)?(n="!",Ne++):(n=h,0===je&&We(J)),n===h&&("negate"===e.substr(Ne,6).toLowerCase()?(n=e.substr(Ne,6),Ne+=6):(n=h,0===je&&We(Y))),n!==h&&gt()!==h&&(r=Ge())!==h?(Le=t,t=n=new i.UnaryOperand(r,"negate")):(Ne=t,t=h),t===h&&(t=Ne,(n=lt())!==h&&gt()!==h&&(r=function(){var t,n,r=34*Ne+17,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"empty"===e.substr(Ne,5).toLowerCase()?(n=e.substr(Ne,5),Ne+=5):(n=h,0===je&&We(K)),n!==h&&(Le=t,n="empty"),(t=n)===h&&(t=Ne,"notempty"===e.substr(Ne,8).toLowerCase()?(n=e.substr(Ne,8),Ne+=8):(n=h,0===je&&We(Z)),n!==h&&(Le=t,n="notempty"),t=n),Be[r]={nextPos:Ne,result:t},t)}())!==h?(Le=t,t=n=new i.UnaryOperand(n,r)):(Ne=t,t=h)),Be[o]={nextPos:Ne,result:t},t)}())===h&&(t=lt())===h&&(t=function(){var t,n,r,i,o=34*Ne+20,a=Be[o];return a?(Ne=a.nextPos,a.result):(t=Ne,91===e.charCodeAt(Ne)?(n="[",Ne++):(n=h,0===je&&We(le)),n!==h&&(r=ut())!==h?(93===e.charCodeAt(Ne)?(i="]",Ne++):(i=h,0===je&&We(ue)),i!==h?(Le=t,t=n=r):(Ne=t,t=h)):(Ne=t,t=h),Be[o]={nextPos:Ne,result:t},t)}()),Be[a]={nextPos:Ne,result:t},t)}function lt(){var t,n,r,o,a=34*Ne+18,s=Be[a];return s?(Ne=s.nextPos,s.result):(t=Ne,gt()!==h?("undefined"===e.substr(Ne,9)?(n="undefined",Ne+=9):(n=h,0===je&&We(X)),n===h&&("null"===e.substr(Ne,4)?(n="null",Ne+=4):(n=h,0===je&&We(ee))),n!==h?(Le=t,t=null):(Ne=t,t=h)):(Ne=t,t=h),t===h&&(t=Ne,gt()!==h&&(n=function(){var t,n,r,i,o=34*Ne+19,a=Be[o];return a?(Ne=a.nextPos,a.result):(t=Ne,(n=function(){var t,n,r=34*Ne+22,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"true"===e.substr(Ne,4).toLowerCase()?(n=e.substr(Ne,4),Ne+=4):(n=h,0===je&&We(de)),n!==h&&(Le=t,n=!0),(t=n)===h&&(t=Ne,"false"===e.substr(Ne,5).toLowerCase()?(n=e.substr(Ne,5),Ne+=5):(n=h,0===je&&We(he)),n!==h&&(Le=t,n=!1),t=n),Be[r]={nextPos:Ne,result:t},t)}())!==h&&(Le=t,n=n),(t=n)===h&&(t=Ne,(n=function(){var t,n,r,i,o=34*Ne+23,a=Be[o];return a?(Ne=a.nextPos,a.result):(t=Ne,"0x"===e.substr(Ne,2)?(n="0x",Ne+=2):(n=h,0===je&&We(pe)),n!==h&&(r=ft())!==h?(Le=t,t=n=parseInt(ze(),16)):(Ne=t,t=h),t===h&&(t=Ne,fe.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(me)),n===h&&(n=null),n!==h&&(r=function(){var t,n,r,i=34*Ne+24,o=Be[i];return o?(Ne=o.nextPos,o.result):(t=Ne,(n=ft())!==h?(46===e.charCodeAt(Ne)?(r=".",Ne++):(r=h,0===je&&We(ge)),r!==h&&ft()!==h?(Le=t,t=n=parseFloat(ze())):(Ne=t,t=h)):(Ne=t,t=h),t===h&&(t=Ne,(n=function(){var t,n,r=34*Ne+31,i=Be[r];if(i)return Ne=i.nextPos,i.result;if(t=[],Ae.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Ie)),n!==h)for(;n!==h;)t.push(n),Ae.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Ie));else t=h;return Be[r]={nextPos:Ne,result:t},t}())!==h?((r=ft())===h&&(r=null),r!==h?(Le=t,t=n=parseInt(ze(),10)):(Ne=t,t=h)):(Ne=t,t=h),t===h&&(t=Ne,48===e.charCodeAt(Ne)?(n="0",Ne++):(n=h,0===je&&We(ve)),n!==h&&(Le=t,n=0),t=n)),Be[i]={nextPos:Ne,result:t},t)}())!==h?(Le=t,i=r,t=n=null==n?i:-i):(Ne=t,t=h)),Be[o]={nextPos:Ne,result:t},t)}())!==h&&(Le=t,n=n),(t=n)===h&&(t=Ne,(n=pt())!==h&&(Le=t,n=n),(t=n)===h&&(t=Ne,"''"===e.substr(Ne,2)?(n="''",Ne+=2):(n=h,0===je&&We(re)),n!==h&&(Le=t,n=""),(t=n)===h&&(t=Ne,'""'===e.substr(Ne,2)?(n='""',Ne+=2):(n=h,0===je&&We(ie)),n!==h&&(Le=t,n=""),(t=n)===h&&(t=Ne,39===e.charCodeAt(Ne)?(n="'",Ne++):(n=h,0===je&&We(oe)),n!==h&&(r=ct())!==h?(39===e.charCodeAt(Ne)?(i="'",Ne++):(i=h,0===je&&We(oe)),i!==h?(Le=t,t=n=ae(r)):(Ne=t,t=h)):(Ne=t,t=h),t===h&&(t=Ne,34===e.charCodeAt(Ne)?(n='"',Ne++):(n=h,0===je&&We(se)),n!==h&&(r=ct())!==h?(34===e.charCodeAt(Ne)?(i='"',Ne++):(i=h,0===je&&We(se)),i!==h?(Le=t,t=n=ae(r)):(Ne=t,t=h)):(Ne=t,t=h))))))),Be[o]={nextPos:Ne,result:t},t)}())!==h?(Le=t,t=new i.Const(n)):(Ne=t,t=h),t===h&&(t=Ne,gt()!==h?(123===e.charCodeAt(Ne)?(n="{",Ne++):(n=h,0===je&&We(te)),n!==h&&(r=function(){var e,t,n,r=34*Ne+25,i=Be[r];if(i)return Ne=i.nextPos,i.result;if(e=Ne,t=[],(n=ht())!==h)for(;n!==h;)t.push(n),n=ht();else t=h;return t!==h&&(Le=e,t=ye(t)),Be[r]={nextPos:Ne,result:e=t},e}())!==h?(125===e.charCodeAt(Ne)?(o="}",Ne++):(o=h,0===je&&We(ne)),o!==h?(Le=t,t=new i.Variable(r)):(Ne=t,t=h)):(Ne=t,t=h)):(Ne=t,t=h))),Be[a]={nextPos:Ne,result:t},t)}function ut(){var t,n,r,o,a,s,l,u,c=34*Ne+21,d=Be[c];if(d)return Ne=d.nextPos,d.result;if(t=Ne,(n=Ge())===h&&(n=null),n!==h){for(r=[],o=Ne,(a=gt())!==h?(44===e.charCodeAt(Ne)?(s=",",Ne++):(s=h,0===je&&We(ce)),s!==h&&(l=gt())!==h&&(u=Ge())!==h?o=a=[a,s,l,u]:(Ne=o,o=h)):(Ne=o,o=h);o!==h;)r.push(o),o=Ne,(a=gt())!==h?(44===e.charCodeAt(Ne)?(s=",",Ne++):(s=h,0===je&&We(ce)),s!==h&&(l=gt())!==h&&(u=Ge())!==h?o=a=[a,s,l,u]:(Ne=o,o=h)):(Ne=o,o=h);r!==h?(Le=t,t=n=function(e,t){if(null==e)return new i.ArrayOperand([]);var n=[e];if(Array.isArray(t))for(var r=function(e){return[].concat.apply([],e)}(t),o=3;o<r.length;o+=4)n.push(r[o]);return new i.ArrayOperand(n)}(n,r)):(Ne=t,t=h)}else Ne=t,t=h;return Be[c]={nextPos:Ne,result:t},t}function ct(){var e,t,n,r=34*Ne+26,i=Be[r];if(i)return Ne=i.nextPos,i.result;if(e=Ne,t=[],(n=dt())!==h)for(;n!==h;)t.push(n),n=dt();else t=h;return t!==h&&(Le=e,t=ye(t)),Be[r]={nextPos:Ne,result:e=t},e}function dt(){var t,n,r=34*Ne+27,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,"\\'"===e.substr(Ne,2)?(n="\\'",Ne+=2):(n=h,0===je&&We(be)),n!==h&&(Le=t,n="'"),(t=n)===h&&(t=Ne,'\\"'===e.substr(Ne,2)?(n='\\"',Ne+=2):(n=h,0===je&&We(_e)),n!==h&&(Le=t,n='"'),(t=n)===h&&(t=Ne,we.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Ce)),n!==h&&(Le=t,n=xe()),t=n)),Be[r]={nextPos:Ne,result:t},t)}function ht(){var t,n,r=34*Ne+28,i=Be[r];return i?(Ne=i.nextPos,i.result):(t=Ne,Se.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Pe)),n!==h&&(Le=t,n=xe()),Be[r]={nextPos:Ne,result:t=n},t)}function pt(){var e,t,n,r,i,o,a=34*Ne+29,s=Be[a];if(s)return Ne=s.nextPos,s.result;if(e=Ne,mt()!==h){if(t=[],n=Ne,(r=ft())!==h){for(i=[],o=mt();o!==h;)i.push(o),o=mt();i!==h?n=r=[r,i]:(Ne=n,n=h)}else Ne=n,n=h;for(;n!==h;)if(t.push(n),n=Ne,(r=ft())!==h){for(i=[],o=mt();o!==h;)i.push(o),o=mt();i!==h?n=r=[r,i]:(Ne=n,n=h)}else Ne=n,n=h;t!==h?(Le=e,e=xe()):(Ne=e,e=h)}else Ne=e,e=h;return Be[a]={nextPos:Ne,result:e},e}function ft(){var t,n,r=34*Ne+30,i=Be[r];if(i)return Ne=i.nextPos,i.result;if(t=[],ke.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Ee)),n!==h)for(;n!==h;)t.push(n),ke.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Ee));else t=h;return Be[r]={nextPos:Ne,result:t},t}function mt(){var t,n,r=34*Ne+32,i=Be[r];if(i)return Ne=i.nextPos,i.result;if(t=[],Te.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Oe)),n!==h)for(;n!==h;)t.push(n),Te.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(Oe));else t=h;return Be[r]={nextPos:Ne,result:t},t}function gt(){var t,n,r=34*Ne+33,i=Be[r];if(i)return Ne=i.nextPos,i.result;for(je++,t=[],Ve.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(De));n!==h;)t.push(n),Ve.test(e.charAt(Ne))?(n=e.charAt(Ne),Ne++):(n=h,0===je&&We(De));return je--,t===h&&(n=h,0===je&&We(Re)),Be[r]={nextPos:Ne,result:t},t}function vt(e,t,n){return void 0===n&&(n=!1),t.reduce(function(e,t){return new i.BinaryOperand(t[1],e,t[3],n)},e)}if((n=f())!==h&&Ne===e.length)return n;throw n!==h&&Ne<e.length&&We({type:"end"}),r=qe,o=Me<e.length?e.charAt(Me):null,u=Me<e.length?Me+1:Me,c=Qe(l=Me),d=Qe(u),s={start:{offset:l,line:c.line,column:c.column},end:{offset:u,line:d.line,column:d.column}},new a(a.buildMessage(r,o),r,o,s)}},"./src/expressions/expressions.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"Operand",function(){return l}),n.d(t,"BinaryOperand",function(){return u}),n.d(t,"UnaryOperand",function(){return c}),n.d(t,"ArrayOperand",function(){return d}),n.d(t,"Const",function(){return h}),n.d(t,"Variable",function(){return p}),n.d(t,"FunctionOperand",function(){return f}),n.d(t,"OperandMaker",function(){return m});var r,i=n("./src/helpers.ts"),o=n("./src/functionsfactory.ts"),a=n("./src/conditionProcessValue.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(){function e(){}return e.prototype.toString=function(e){return void 0===e&&(e=void 0),""},e.prototype.hasFunction=function(){return!1},e.prototype.hasAsyncFunction=function(){return!1},e.prototype.addToAsyncList=function(e){},e.prototype.isEqual=function(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)},e.prototype.areOperatorsEquals=function(e,t){return!e&&!t||!!e&&e.isEqual(t)},e}(),u=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=!1);var o=e.call(this)||this;return o.operatorName=t,o.left=n,o.right=r,o.isArithmeticValue=i,o.consumer=i?m.binaryFunctions.arithmeticOp(t):m.binaryFunctions[t],null==o.consumer&&m.throwInvalidOperatorError(t),o}return s(t,e),t.prototype.getType=function(){return"binary"},Object.defineProperty(t.prototype,"isArithmetic",{get:function(){return this.isArithmeticValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConjunction",{get:function(){return"or"==this.operatorName||"and"==this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"conjunction",{get:function(){return this.isConjunction?this.operatorName:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftOperand",{get:function(){return this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightOperand",{get:function(){return this.right},enumerable:!1,configurable:!0}),t.prototype.isContentEqual=function(e){var t=e;return t.operator===this.operator&&this.areOperatorsEquals(this.left,t.left)&&this.areOperatorsEquals(this.right,t.right)},t.prototype.evaluateParam=function(e,t){return null==e?null:e.evaluate(t)},t.prototype.evaluate=function(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e))},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"("+m.safeToString(this.left,e)+" "+m.operatorToString(this.operatorName)+" "+m.safeToString(this.right,e)+")"},t.prototype.setVariables=function(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)},t.prototype.hasFunction=function(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()},t.prototype.hasAsyncFunction=function(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()},t.prototype.addToAsyncList=function(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)},t}(l),c=function(e){function t(t,n){var r=e.call(this)||this;return r.expressionValue=t,r.operatorName=n,r.consumer=m.unaryFunctions[n],null==r.consumer&&m.throwInvalidOperatorError(n),r}return s(t,e),Object.defineProperty(t.prototype,"operator",{get:function(){return this.operatorName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.expressionValue},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"unary"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return m.operatorToString(this.operatorName)+" "+this.expression.toString(e)},t.prototype.isContentEqual=function(e){return e.operator==this.operator&&this.areOperatorsEquals(this.expression,e.expression)},t.prototype.evaluate=function(e){var t=this.expression.evaluate(e);return this.consumer.call(this,t)},t.prototype.setVariables=function(e){this.expression.setVariables(e)},t}(l),d=function(e){function t(t){var n=e.call(this)||this;return n.values=t,n}return s(t,e),t.prototype.getType=function(){return"array"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return"["+this.values.map(function(t){return t.toString(e)}).join(", ")+"]"},t.prototype.evaluate=function(e){return this.values.map(function(t){return t.evaluate(e)})},t.prototype.setVariables=function(e){this.values.forEach(function(t){t.setVariables(e)})},t.prototype.hasFunction=function(){return this.values.some(function(e){return e.hasFunction()})},t.prototype.hasAsyncFunction=function(){return this.values.some(function(e){return e.hasAsyncFunction()})},t.prototype.addToAsyncList=function(e){this.values.forEach(function(t){return t.addToAsyncList(e)})},t.prototype.isContentEqual=function(e){var t=e;if(t.values.length!==this.values.length)return!1;for(var n=0;n<this.values.length;n++)if(!t.values[n].isEqual(this.values[n]))return!1;return!0},t}(l),h=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return s(t,e),t.prototype.getType=function(){return"const"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.value.toString()},Object.defineProperty(t.prototype,"correctValue",{get:function(){return this.getCorrectValue(this.value)},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(){return this.getCorrectValue(this.value)},t.prototype.setVariables=function(e){},t.prototype.getCorrectValue=function(e){return e&&"string"==typeof e?this.isBooleanValue(e)?"true"===e.toLowerCase():e.length>1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1])?e.substring(1,e.length-1):m.isNumeric(e)?0==e.indexOf("0x")?parseInt(e):e.length>1&&"0"==e[0]?e:parseFloat(e):e:e},t.prototype.isContentEqual=function(e){return e.value==this.value},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t.prototype.isBooleanValue=function(e){return e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},t}(l),p=function(e){function t(n){var r=e.call(this,n)||this;return r.variableName=n,r.valueInfo={},r.useValueAsItIs=!1,r.variableName&&r.variableName.length>1&&r.variableName[0]===t.DisableConversionChar&&(r.variableName=r.variableName.substring(1),r.useValueAsItIs=!0),r}return s(t,e),t.prototype.getType=function(){return"variable"},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var n=e(this);if(n)return n}return"{"+(this.useValueAsItIs?t.DisableConversionChar:"")+this.variableName+"}"},Object.defineProperty(t.prototype,"variable",{get:function(){return this.variableName},enumerable:!1,configurable:!0}),t.prototype.evaluate=function(e){return this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),this.valueInfo.hasValue?this.getCorrectValue(this.valueInfo.value):null},t.prototype.setVariables=function(e){e.push(this.variableName)},t.prototype.getCorrectValue=function(t){return this.useValueAsItIs?t:e.prototype.getCorrectValue.call(this,t)},t.prototype.isContentEqual=function(e){return e.variable==this.variable},t.DisableConversionChar="#",t}(h),f=function(e){function t(t,n){var r=e.call(this)||this;return r.originalValue=t,r.parameters=n,r.isReadyValue=!1,Array.isArray(n)&&0===n.length&&(r.parameters=new d([])),r}return s(t,e),t.prototype.getType=function(){return"function"},t.prototype.evaluateAsync=function(e){var t=this;this.isReadyValue=!1;var n=new a.ProcessValue;n.values=i.Helpers.createCopy(e.values),n.properties=i.Helpers.createCopy(e.properties),n.properties.returnResult=function(e){t.asynResult=e,t.isReadyValue=!0,t.onAsyncReady()},this.evaluateCore(n)},t.prototype.evaluate=function(e){return this.isReady?this.asynResult:this.evaluateCore(e)},t.prototype.evaluateCore=function(e){return o.FunctionFactory.Instance.run(this.originalValue,this.parameters.evaluate(e),e.properties)},t.prototype.toString=function(e){if(void 0===e&&(e=void 0),e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e)+")"},t.prototype.setVariables=function(e){this.parameters.setVariables(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReadyValue},enumerable:!1,configurable:!0}),t.prototype.hasFunction=function(){return!0},t.prototype.hasAsyncFunction=function(){return o.FunctionFactory.Instance.isAsyncFunction(this.originalValue)},t.prototype.addToAsyncList=function(e){this.hasAsyncFunction()&&e.push(this)},t.prototype.isContentEqual=function(e){return e.originalValue==this.originalValue&&this.areOperatorsEquals(e.parameters,this.parameters)},t}(l),m=function(){function e(){}return e.throwInvalidOperatorError=function(e){throw new Error("Invalid operator: '"+e+"'")},e.safeToString=function(e,t){return null==e?"":e.toString(t)},e.toOperandString=function(t){return!t||e.isNumeric(t)||e.isBooleanValue(t)||(t="'"+t+"'"),t},e.isSpaceString=function(e){return!!e&&!e.replace(" ","")},e.isNumeric=function(t){return(!t||!(t.indexOf("-")>-1||t.indexOf("+")>1||t.indexOf("*")>-1||t.indexOf("^")>-1||t.indexOf("/")>-1||t.indexOf("%")>-1))&&!e.isSpaceString(t)&&i.Helpers.isNumber(t)},e.isBooleanValue=function(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())},e.countDecimals=function(e){if(i.Helpers.isNumber(e)&&Math.floor(e)!==e){var t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0},e.plusMinus=function(t,n,r){var i=e.countDecimals(t),o=e.countDecimals(n);if(i>0||o>0){var a=Math.max(i,o);r=parseFloat(r.toFixed(a))}return r},e.isTwoValueEquals=function(e,t){return"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),i.Helpers.isTwoValueEquals(e,t,!0)},e.operatorToString=function(t){var n=e.signs[t];return null==n?t:n},e.unaryFunctions={empty:function(e){return i.Helpers.isValueEmpty(e)},notempty:function(t){return!e.unaryFunctions.empty(t)},negate:function(e){return!e}},e.binaryFunctions={arithmeticOp:function(t){return function(n,r){i.Helpers.isValueEmpty(n)&&!e.isSpaceString(n)&&(n="string"==typeof r?"":0),i.Helpers.isValueEmpty(r)&&!e.isSpaceString(r)&&(r="string"==typeof n?"":0);var o=e.binaryFunctions[t];return null==o?null:o.call(this,n,r)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return i.Helpers.isNumber(e)&&i.Helpers.isNumber(t)?i.Helpers.correctAfterPlusMinis(e,t,e+t):e+t},minus:function(e,t){return i.Helpers.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return i.Helpers.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(e,t){return null!=e&&null!=t&&e>t},less:function(e,t){return null!=e&&null!=t&&e<t},greaterorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.greater(t,n)},lessorequal:function(t,n){return!!e.binaryFunctions.equal(t,n)||e.binaryFunctions.less(t,n)},equal:function(t,n){return e.isTwoValueEquals(t,n)},notequal:function(t,n){return!e.binaryFunctions.equal(t,n)},contains:function(t,n){return e.binaryFunctions.containsCore(t,n,!0)},notcontains:function(t,n){return!t&&!i.Helpers.isValueEmpty(n)||e.binaryFunctions.containsCore(t,n,!1)},anyof:function(t,n){if(i.Helpers.isValueEmpty(t)&&i.Helpers.isValueEmpty(n))return!0;if(i.Helpers.isValueEmpty(t)||!Array.isArray(t)&&0===t.length)return!1;if(i.Helpers.isValueEmpty(n))return!0;if(!Array.isArray(t))return e.binaryFunctions.contains(n,t);if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(e.binaryFunctions.contains(t,n[r]))return!0;return!1},allof:function(t,n){if(!t&&!i.Helpers.isValueEmpty(n))return!1;if(!Array.isArray(n))return e.binaryFunctions.contains(t,n);for(var r=0;r<n.length;r++)if(!e.binaryFunctions.contains(t,n[r]))return!1;return!0},containsCore:function(t,n,r){if(!t&&0!==t&&!1!==t)return!1;if(t.length||(t=t.toString(),("string"==typeof n||n instanceof String)&&(t=t.toUpperCase(),n=n.toUpperCase())),"string"==typeof t||t instanceof String){if(!n)return!1;n=n.toString();var i=t.indexOf(n)>-1;return r?i:!i}for(var o=Array.isArray(n)?n:[n],a=0;a<o.length;a++){var s=0;for(n=o[a];s<t.length&&!e.isTwoValueEquals(t[s],n);s++);if(s==t.length)return!r}return r}},e.signs={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"},e}()},"./src/flowpanel.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"FlowPanelModel",function(){return s});var r,i=n("./src/jsonobject.ts"),o=n("./src/panel.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t){void 0===t&&(t="");var n=e.call(this,t)||this;n.createLocalizableString("content",n,!0);var r=n;return n.registerFunctionOnPropertyValueChanged("content",function(){r.onContentChanged()}),n}return a(t,e),t.prototype.getType=function(){return"flowpanel"},t.prototype.getChildrenLayoutType=function(){return"flow"},t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.onContentChanged()},Object.defineProperty(t.prototype,"content",{get:function(){return this.getLocalizableStringText("content")},set:function(e){this.setLocalizableStringText("content",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locContent",{get:function(){return this.getLocalizableString("content")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"html",{get:function(){return this.getPropertyValue("html","")},set:function(e){this.setPropertyValue("html",e)},enumerable:!1,configurable:!0}),t.prototype.onContentChanged=function(){var e;e=this.onCustomHtmlProducing?this.onCustomHtmlProducing():this.produceHtml(),this.html=e,this.contentChangedCallback&&this.contentChangedCallback()},t.prototype.produceHtml=function(){for(var e=[],t=/{(.*?(element:)[^$].*?)}/g,n=this.content,r=0,i=null;null!==(i=t.exec(n));){i.index>r&&(e.push(n.substring(r,i.index)),r=i.index);var o=this.getQuestionFromText(i[0]);e.push(o?this.getHtmlForQuestion(o):n.substring(r,i.index+i[0].length)),r=i.index+i[0].length}return r<n.length&&e.push(n.substring(r,n.length)),e.join("").replace(new RegExp("<br>","g"),"<br/>")},t.prototype.getQuestionFromText=function(e){return e=(e=e.substring(1,e.length-1)).replace(t.contentElementNamePrefix,"").trim(),this.getQuestionByName(e)},t.prototype.getHtmlForQuestion=function(e){return this.onGetHtmlForQuestion?this.onGetHtmlForQuestion(e):""},t.prototype.getQuestionHtmlId=function(e){return this.name+"_"+e.id},t.prototype.onAddElement=function(t,n){e.prototype.onAddElement.call(this,t,n),this.addElementToContent(t),t.renderWidth=""},t.prototype.onRemoveElement=function(t){var n=this.getElementContentText(t);this.content=this.content.replace(n,""),e.prototype.onRemoveElement.call(this,t)},t.prototype.dragDropMoveElement=function(e,t,n){},t.prototype.addElementToContent=function(e){if(!this.isLoadingFromJson){var t=this.getElementContentText(e);this.insertTextAtCursor(t)||(this.content=this.content+t)}},t.prototype.insertTextAtCursor=function(e,t){if(void 0===t&&(t=null),!this.isDesignMode||"undefined"==typeof document||!window.getSelection)return!1;var n=window.getSelection();if(n.getRangeAt&&n.rangeCount){var r=n.getRangeAt(0);if(r.deleteContents(),r.insertNode(document.createTextNode(e)),this.getContent){var i=this.getContent(t);this.content=i}return!0}return!1},t.prototype.getElementContentText=function(e){return"{"+t.contentElementNamePrefix+e.name+"}"},t.contentElementNamePrefix="element:",t}(o.PanelModel);i.Serializer.addClass("flowpanel",[{name:"content:html",serializationProperty:"locContent"}],function(){return new s},"panel")},"./src/functionsfactory.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"FunctionFactory",function(){return o}),n.d(t,"registerFunction",function(){return a});var r=n("./src/helpers.ts"),i=n("./src/settings.ts"),o=function(){function e(){this.functionHash={},this.isAsyncHash={}}return e.prototype.register=function(e,t,n){void 0===n&&(n=!1),this.functionHash[e]=t,n&&(this.isAsyncHash[e]=!0)},e.prototype.unregister=function(e){delete this.functionHash[e],delete this.isAsyncHash[e]},e.prototype.hasFunction=function(e){return!!this.functionHash[e]},e.prototype.isAsyncFunction=function(e){return!!this.isAsyncHash[e]},e.prototype.clear=function(){this.functionHash={}},e.prototype.getAll=function(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()},e.prototype.run=function(e,t,n){void 0===n&&(n=null);var r=this.functionHash[e];if(!r)return null;var i={func:r};if(n)for(var o in n)i[o]=n[o];return i.func(t)},e.Instance=new e,e}(),a=o.Instance.register;function s(e,t){if(null!=e)if(Array.isArray(e))for(var n=0;n<e.length;n++)s(e[n],t);else r.Helpers.isNumber(e)&&(e=parseFloat(e)),t.push(e)}function l(e){var t=[];s(e,t);for(var n=0,i=0;i<t.length;i++)n=r.Helpers.correctAfterPlusMinis(n,t[i],n+t[i]);return n}function u(e,t){var n=[];s(e,n);for(var r=void 0,i=0;i<n.length;i++)void 0===r&&(r=n[i]),t?r>n[i]&&(r=n[i]):r<n[i]&&(r=n[i]);return r}function c(e,t,n,i,o){return!e||r.Helpers.isValueEmpty(e[t])?n:i(n,o?"string"==typeof(a=e[t])?r.Helpers.isNumber(a)?parseFloat(a):void 0:a:1);var a}function d(e,t,n){void 0===n&&(n=!0);var r=function(e){if(2!=e.length)return null;var t=e[0];if(!t)return null;if(!Array.isArray(t)&&!Array.isArray(Object.keys(t)))return null;var n=e[1];return"string"==typeof n||n instanceof String?{data:t,name:n}:null}(e);if(r){var i=void 0;if(Array.isArray(r.data))for(var o=0;o<r.data.length;o++)i=c(r.data[o],r.name,i,t,n);else for(var a in r.data)i=c(r.data[a],r.name,i,t,n);return i}}function h(e){var t=d(e,function(e,t){return null==e&&(e=0),null==t||null==t?e:r.Helpers.correctAfterPlusMinis(e,t,e+t)});return void 0!==t?t:0}function p(e){var t=d(e,function(e,t){return null==e&&(e=0),null==t||null==t?e:e+1},!1);return void 0!==t?t:0}function f(e){if(!e)return!1;for(var t=e.questions,n=0;n<t.length;n++)if(t[n].hasErrors(!1))return!1;return!0}o.Instance.register("sum",l),o.Instance.register("min",function(e){return u(e,!0)}),o.Instance.register("max",function(e){return u(e,!1)}),o.Instance.register("count",function(e){var t=[];return s(e,t),t.length}),o.Instance.register("avg",function(e){var t=[];s(e,t);var n=l(e);return t.length>0?n/t.length:0}),o.Instance.register("sumInArray",h),o.Instance.register("minInArray",function(e){return d(e,function(e,t){return null==e?t:null==t||null==t||e<t?e:t})}),o.Instance.register("maxInArray",function(e){return d(e,function(e,t){return null==e?t:null==t||null==t||e>t?e:t})}),o.Instance.register("countInArray",p),o.Instance.register("avgInArray",function(e){var t=p(e);return 0==t?0:h(e)/t}),o.Instance.register("iif",function(e){return e||3===e.length?e[0]?e[1]:e[2]:""}),o.Instance.register("getDate",function(e){return!e&&e.length<1?null:e[0]?new Date(e[0]):null}),o.Instance.register("age",function(e){if(!e&&e.length<1)return null;if(!e[0])return null;var t=new Date(e[0]),n=new Date,r=n.getFullYear()-t.getFullYear(),i=n.getMonth()-t.getMonth();return(i<0||0===i&&n.getDate()<t.getDate())&&(r-=r>0?1:0),r}),o.Instance.register("isContainerReady",function(e){if(!e&&e.length<1)return!1;if(!e[0]||!this.survey)return!1;var t=e[0],n=this.survey.getPageByName(t);if(n||(n=this.survey.getPanelByName(t)),!n){var r=this.survey.getQuestionByName(t);if(!r||!Array.isArray(r.panels))return!1;if(!(e.length>1)){for(var i=0;i<r.panels.length;i++)if(!f(r.panels[i]))return!1;return!0}e[1]<r.panels.length&&(n=r.panels[e[1]])}return f(n)}),o.Instance.register("isDisplayMode",function(){return this.survey&&this.survey.isDisplayMode}),o.Instance.register("currentDate",function(){return new Date}),o.Instance.register("today",function(e){var t=new Date;return i.settings.useLocalTimeZone?t.setHours(0,0,0,0):t.setUTCHours(0,0,0,0),Array.isArray(e)&&1==e.length&&t.setDate(t.getDate()+e[0]),t}),o.Instance.register("getYear",function(e){if(1===e.length&&e[0])return new Date(e[0]).getFullYear()}),o.Instance.register("currentYear",function(){return(new Date).getFullYear()}),o.Instance.register("diffDays",function(e){if(!Array.isArray(e)||2!==e.length)return 0;if(!e[0]||!e[1])return 0;var t=new Date(e[0]),n=new Date(e[1]),r=Math.abs(n-t);return Math.ceil(r/864e5)})},"./src/helpers.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"Helpers",function(){return i});var r=n("./src/settings.ts"),i=function(){function e(){}return e.isValueEmpty=function(t){if(Array.isArray(t)&&0===t.length)return!0;if(t&&"object"==typeof t&&t.constructor===Object){for(var n in t)if(!e.isValueEmpty(t[n]))return!1;return!0}return!t&&0!==t&&!1!==t},e.isArrayContainsEqual=function(t,n){if(!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++){for(var i=0;i<n.length&&!e.isTwoValueEquals(t[r],n[i]);i++);if(i===n.length)return!1}return!0},e.isArraysEqual=function(t,n,r,i,o){if(void 0===r&&(r=!1),!Array.isArray(t)||!Array.isArray(n))return!1;if(t.length!==n.length)return!1;if(r){for(var a=[],s=[],l=0;l<t.length;l++)a.push(t[l]),s.push(n[l]);a.sort(),s.sort(),t=a,n=s}for(l=0;l<t.length;l++)if(!e.isTwoValueEquals(t[l],n[l],r,i,o))return!1;return!0},e.isTwoValueEquals=function(t,n,i,o,a){if(void 0===i&&(i=!1),t===n)return!0;if(Array.isArray(t)&&0===t.length&&void 0===n)return!0;if(Array.isArray(n)&&0===n.length&&void 0===t)return!0;if(null==t&&""===n)return!0;if(null==n&&""===t)return!0;if(void 0===a&&(a=r.settings.comparator.trimStrings),void 0===o&&(o=r.settings.comparator.caseSensitive),"string"==typeof t&&"string"==typeof n)return a&&(t=t.trim(),n=n.trim()),o||(t=t.toLowerCase(),n=n.toLowerCase()),t===n;if(t instanceof Date&&n instanceof Date)return t.getTime()==n.getTime();if(e.isConvertibleToNumber(t)&&e.isConvertibleToNumber(n)&&parseInt(t)===parseInt(n)&&parseFloat(t)===parseFloat(n))return!0;if(!e.isValueEmpty(t)&&e.isValueEmpty(n)||e.isValueEmpty(t)&&!e.isValueEmpty(n))return!1;if((!0===t||!1===t)&&"string"==typeof n)return t.toString()===n.toLocaleLowerCase();if((!0===n||!1===n)&&"string"==typeof t)return n.toString()===t.toLocaleLowerCase();if(!(t instanceof Object||n instanceof Object))return t==n;if(!(t instanceof Object&&n instanceof Object))return!1;if(t.equals)return t.equals(n);if(t.toJSON&&n.toJSON&&t.getType&&n.getType)return!t.isDiposed&&!n.isDiposed&&t.getType()===n.getType()&&(!t.name||t.name===n.name)&&this.isTwoValueEquals(t.toJSON(),n.toJSON(),i,o,a);if(Array.isArray(t)&&Array.isArray(n))return e.isArraysEqual(t,n,i,o,a);if(t.equalsTo&&n.equalsTo)return t.equalsTo(n);for(var s in t)if(t.hasOwnProperty(s)){if(!n.hasOwnProperty(s))return!1;if(t[s]!==n[s]){if("object"!=typeof t[s])return!1;if(!this.isTwoValueEquals(t[s],n[s]))return!1}}for(s in n)if(n.hasOwnProperty(s)&&!t.hasOwnProperty(s))return!1;return!0},e.randomizeArray=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e},e.getUnbindValue=function(e){return e&&e instanceof Object?JSON.parse(JSON.stringify(e)):e},e.createCopy=function(e){var t={};if(!e)return t;for(var n in e)t[n]=e[n];return t},e.isConvertibleToNumber=function(e){return null!=e&&!Array.isArray(e)&&!isNaN(e)},e.isNumber=function(e){return!("string"==typeof e&&e&&0==e.indexOf("0x")&&e.length>32)&&!isNaN(parseFloat(e))&&isFinite(e)},e.getMaxLength=function(e,t){return e<0&&(e=t),e>0?e:null},e.getNumberByIndex=function(t,n){if(t<0)return"";var r=1,i="",o=".",a=!0,s="A",l="";if(n){for(var u=(l=n).length-1,c=!1,d=0;d<l.length;d++)if(e.isCharDigit(l[d])){c=!0;break}for(var h=function(){return c&&!e.isCharDigit(l[u])||e.isCharNotLetterAndDigit(l[u])};u>=0&&h();)u--;var p="";for(u<l.length-1&&(p=l.substring(u+1),l=l.substring(0,u+1)),u=l.length-1;u>=0&&!h()&&(u--,c););s=l.substring(u+1),i=l.substring(0,u+1),parseInt(s)?r=parseInt(s):1==s.length&&(a=!1),(p||i)&&(o=p)}return a?i+(t+r).toString()+o:i+String.fromCharCode(s.charCodeAt(0)+t)+o},e.isCharNotLetterAndDigit=function(t){return t.toUpperCase()==t.toLowerCase()&&!e.isCharDigit(t)},e.isCharDigit=function(e){return e>="0"&&e<="9"},e.countDecimals=function(t){if(e.isNumber(t)&&Math.floor(t)!==t){var n=t.toString().split(".");return n.length>1&&n[1].length||0}return 0},e.correctAfterPlusMinis=function(t,n,r){var i=e.countDecimals(t),o=e.countDecimals(n);if(i>0||o>0){var a=Math.max(i,o);r=parseFloat(r.toFixed(a))}return r},e.correctAfterMultiple=function(t,n,r){var i=e.countDecimals(t)+e.countDecimals(n);return i>0&&(r=parseFloat(r.toFixed(i))),r},e.convertArrayValueToObject=function(t,n,r){void 0===r&&(r=void 0);var i=new Array;if(!t||!Array.isArray(t))return i;for(var o=0;o<t.length;o++){var a=void 0;Array.isArray(r)&&(a=e.findObjByPropValue(r,n,t[o])),a||((a={})[n]=t[o]),i.push(a)}return i},e.findObjByPropValue=function(t,n,r){for(var i=0;i<t.length;i++)if(e.isTwoValueEquals(t[i][n],r))return t[i]},e.convertArrayObjectToValue=function(t,n){var r=new Array;if(!t||!Array.isArray(t))return r;for(var i=0;i<t.length;i++){var o=t[i]?t[i][n]:void 0;e.isValueEmpty(o)||r.push(o)}return r},e}();String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==e[n]?e[n]:t})})},"./src/images sync \\.svg$":function(e,t,n){var r={"./ArrowDown_34x34.svg":"./src/images/ArrowDown_34x34.svg","./ArrowLeft.svg":"./src/images/ArrowLeft.svg","./ArrowRight.svg":"./src/images/ArrowRight.svg","./Arrow_downGREY_10x10.svg":"./src/images/Arrow_downGREY_10x10.svg","./ChooseFile.svg":"./src/images/ChooseFile.svg","./Clear.svg":"./src/images/Clear.svg","./DefaultFile.svg":"./src/images/DefaultFile.svg","./Delete.svg":"./src/images/Delete.svg","./Down_34x34.svg":"./src/images/Down_34x34.svg","./Left.svg":"./src/images/Left.svg","./ModernBooleanCheckChecked.svg":"./src/images/ModernBooleanCheckChecked.svg","./ModernBooleanCheckInd.svg":"./src/images/ModernBooleanCheckInd.svg","./ModernBooleanCheckUnchecked.svg":"./src/images/ModernBooleanCheckUnchecked.svg","./ModernCheck.svg":"./src/images/ModernCheck.svg","./ModernRadio.svg":"./src/images/ModernRadio.svg","./More.svg":"./src/images/More.svg","./ProgressButton.svg":"./src/images/ProgressButton.svg","./ProgressButtonV2.svg":"./src/images/ProgressButtonV2.svg","./RemoveFile.svg":"./src/images/RemoveFile.svg","./Right.svg":"./src/images/Right.svg","./V2Check.svg":"./src/images/V2Check.svg","./V2DragElement_16x16.svg":"./src/images/V2DragElement_16x16.svg","./clear_16x16.svg":"./src/images/clear_16x16.svg","./collapseDetail.svg":"./src/images/collapseDetail.svg","./expandDetail.svg":"./src/images/expandDetail.svg","./no-image.svg":"./src/images/no-image.svg","./search.svg":"./src/images/search.svg"};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id="./src/images sync \\.svg$"},"./src/images/ArrowDown_34x34.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 34 34" xml:space="preserve"><polygon class="st0" points="12,16 14,14 17,17 20,14 22,16 17,21 "></polygon></svg>'},"./src/images/ArrowLeft.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999Z"></path></svg>'},"./src/images/ArrowRight.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M1 6.99999H11.6L7.3 2.69999L8.7 1.29999L15.4 7.99999L8.7 14.7L7.3 13.3L11.6 8.99999H1V6.99999Z"></path></svg>'},"./src/images/Arrow_downGREY_10x10.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 10 10" xml:space="preserve"><polygon class="st0" points="2,2 0,4 5,9 10,4 8,2 5,5 "></polygon></svg>'},"./src/images/ChooseFile.svg":function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 9V7C22 5.9 21.1 5 20 5H12L10 3H4C2.9 3 2 3.9 2 5V9V10V21H22L24 9H22ZM4 5H9.2L10.6 6.4L11.2 7H12H20V9H4V5ZM20.3 19H4V11H21.6L20.3 19Z"></path></svg>'},"./src/images/Clear.svg":function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.6 8.6L16.4 2.4C16 2 15.5 1.8 15 1.8C14.5 1.8 14 2 13.6 2.4L1.4 14.6C0.600003 15.4 0.600003 16.6 1.4 17.4L6 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.8L2.8 16L6.2 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.6 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"></path></svg>'},"./src/images/DefaultFile.svg":function(e,t){e.exports='<svg viewBox="0 0 56 68" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_9011_41219)"><path d="M54.83 10.83L45.17 1.17C44.7982 0.798664 44.357 0.504208 43.8714 0.303455C43.3858 0.102703 42.8654 -0.000411943 42.34 1.2368e-06H6C4.4087 1.2368e-06 2.88257 0.632142 1.75735 1.75736C0.632136 2.88258 0 4.4087 0 6V62C0 63.5913 0.632136 65.1174 1.75735 66.2426C2.88257 67.3679 4.4087 68 6 68H50C51.5913 68 53.1174 67.3679 54.2426 66.2426C55.3679 65.1174 56 63.5913 56 62V13.66C56.0004 13.1346 55.8973 12.6142 55.6965 12.1286C55.4958 11.643 55.2013 11.2018 54.83 10.83ZM44 2.83L53.17 12H48C46.9391 12 45.9217 11.5786 45.1716 10.8284C44.4214 10.0783 44 9.06087 44 8V2.83ZM54 62C54 63.0609 53.5786 64.0783 52.8284 64.8284C52.0783 65.5786 51.0609 66 50 66H6C4.93913 66 3.92172 65.5786 3.17157 64.8284C2.42142 64.0783 2 63.0609 2 62V6C2 4.93914 2.42142 3.92172 3.17157 3.17157C3.92172 2.42143 4.93913 2 6 2H42V8C42 9.5913 42.6321 11.1174 43.7574 12.2426C44.8826 13.3679 46.4087 14 48 14H54V62ZM14 24H42V26H14V24ZM14 30H42V32H14V30ZM14 36H42V38H14V36ZM14 42H42V44H14V42Z" fill="#909090"></path></g><defs><clipPath id="clip0_9011_41219"><rect width="56" height="68" fill="white"></rect></clipPath></defs></svg>'},"./src/images/Delete.svg":function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 4H20H16V2C16 0.9 15.1 0 14 0H10C8.9 0 8 0.9 8 2V4H4H2V6H4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V6H22V4ZM10 2H14V4H10V2ZM18 20H6V6H8H16H18V20ZM14 8H16V18H14V8ZM11 8H13V18H11V8ZM8 8H10V18H8V8Z"></path></svg>'},"./src/images/Down_34x34.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 34 34" xml:space="preserve"><g><path class="st0" d="M33,34H0V0h33c0.6,0,1,0.4,1,1v32C34,33.6,33.6,34,33,34z"></path><polygon class="st1" points="12,16 14,14 17,17 20,14 22,16 17,21 "></polygon></g></svg>'},"./src/images/Left.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><polygon points="11,12 9,14 3,8 9,2 11,4 7,8 "></polygon></svg>'},"./src/images/ModernBooleanCheckChecked.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><polygon points="19,10 14,10 14,5 10,5 10,10 5,10 5,14 10,14 10,19 14,19 14,14 19,14 "></polygon></svg>'},"./src/images/ModernBooleanCheckInd.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M22,0H2C0.9,0,0,0.9,0,2v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z M21,18L6,3h15V18z M3,6l15,15H3V6z"></path></svg>'},"./src/images/ModernBooleanCheckUnchecked.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="4"></rect></svg>'},"./src/images/ModernCheck.svg":function(e,t){e.exports='<svg viewBox="0 0 24 24"><path d="M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z"></path></svg>'},"./src/images/ModernRadio.svg":function(e,t){e.exports='<svg viewBox="-12 -12 24 24"><circle r="6" cx="0" cy="0"></circle></svg>'},"./src/images/More.svg":function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 12C6 13.1 5.1 14 4 14C2.9 14 2 13.1 2 12C2 10.9 2.9 10 4 10C5.1 10 6 10.9 6 12ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM20 10C18.9 10 18 10.9 18 12C18 13.1 18.9 14 20 14C21.1 14 22 13.1 22 12C22 10.9 21.1 10 20 10Z"></path></svg>'},"./src/images/ProgressButton.svg":function(e,t){e.exports='<svg viewBox="0 0 10 10"><polygon points="2,2 0,4 5,9 10,4 8,2 5,5 "></polygon></svg>'},"./src/images/ProgressButtonV2.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16"><path d="M15 8.99999H4.39998L8.69998 13.3L7.29998 14.7L0.599976 7.99999L7.29998 1.29999L8.69998 2.69999L4.39998 6.99999H15V8.99999Z"></path></svg>'},"./src/images/RemoveFile.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16"><path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M11,10l-1,1L8,9l-2,2l-1-1l2-2L5,6l1-1l2,2l2-2l1,1L9,8 L11,10z"></path></svg>'},"./src/images/Right.svg":function(e,t){e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><polygon points="5,4 7,2 13,8 7,14 5,12 9,8 "></polygon></svg>'},"./src/images/V2Check.svg":function(e,t){e.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.00001 15.8L2.60001 10.4L4.00001 9L8.00001 13L16 5L17.4 6.4L8.00001 15.8Z"></path></svg>'},"./src/images/V2DragElement_16x16.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 4C2 3.73478 2.10536 3.48043 2.29289 3.29289C2.48043 3.10536 2.73478 3 3 3H13C13.2652 3 13.5196 3.10536 13.7071 3.29289C13.8946 3.48043 14 3.73478 14 4C14 4.26522 13.8946 4.51957 13.7071 4.70711C13.5196 4.89464 13.2652 5 13 5H3C2.73478 5 2.48043 4.89464 2.29289 4.70711C2.10536 4.51957 2 4.26522 2 4ZM13 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H13C13.2652 9 13.5196 8.89464 13.7071 8.70711C13.8946 8.51957 14 8.26522 14 8C14 7.73478 13.8946 7.48043 13.7071 7.29289C13.5196 7.10536 13.2652 7 13 7ZM13 11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H13C13.2652 13 13.5196 12.8946 13.7071 12.7071C13.8946 12.5196 14 12.2652 14 12C14 11.7348 13.8946 11.4804 13.7071 11.2929C13.5196 11.1054 13.2652 11 13 11Z"></path></svg>'},"./src/images/clear_16x16.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.35 3.34999L12.65 2.64999L8.05002 7.24999L3.35002 2.64999L2.65002 3.34999L7.25002 8.04999L2.65002 12.65L3.35002 13.35L8.05002 8.74999L12.65 13.35L13.35 12.65L8.75002 8.04999L13.35 3.34999Z"></path></svg>'},"./src/images/collapseDetail.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H3V9H13V7Z"></path></svg>'},"./src/images/expandDetail.svg":function(e,t){e.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z"></path></svg>'},"./src/images/no-image.svg":function(e,t){e.exports='<svg viewBox="0 0 48 48"><g opacity="0.5"><path d="M14 17.01C14 16.4167 14.1759 15.8366 14.5056 15.3433C14.8352 14.8499 15.3038 14.4654 15.8519 14.2384C16.4001 14.0113 17.0033 13.9519 17.5853 14.0676C18.1672 14.1834 18.7018 14.4691 19.1213 14.8887C19.5409 15.3082 19.8266 15.8428 19.9424 16.4247C20.0581 17.0067 19.9987 17.6099 19.7716 18.1581C19.5446 18.7062 19.1601 19.1748 18.6667 19.5044C18.1734 19.8341 17.5933 20.01 17 20.01C16.2044 20.01 15.4413 19.6939 14.8787 19.1313C14.3161 18.5687 14 17.8056 14 17.01ZM27.09 24.14L20 36.01H36L27.09 24.14ZM36.72 8.14L35.57 10.01H36C36.5304 10.01 37.0391 10.2207 37.4142 10.5958C37.7893 10.9709 38 11.4796 38 12.01V36.01C38 36.5404 37.7893 37.0491 37.4142 37.4242C37.0391 37.7993 36.5304 38.01 36 38.01H18.77L17.57 40.01H36C37.0609 40.01 38.0783 39.5886 38.8284 38.8384C39.5786 38.0883 40 37.0709 40 36.01V12.01C39.9966 11.0765 39.6668 10.1737 39.0678 9.45778C38.4688 8.74188 37.6382 8.25802 36.72 8.09V8.14ZM36.86 4.5L12.86 44.5L11.14 43.5L13.23 40.01H12C10.9391 40.01 9.92172 39.5886 9.17157 38.8384C8.42143 38.0883 8 37.0709 8 36.01V12.01C8 10.9491 8.42143 9.93172 9.17157 9.18157C9.92172 8.43143 10.9391 8.01 12 8.01H32.43L35.14 3.5L36.86 4.5ZM14.43 38.01L15.63 36.01H12L19 27.01L20.56 27.8L31.23 10.01H12C11.4696 10.01 10.9609 10.2207 10.5858 10.5958C10.2107 10.9709 10 11.4796 10 12.01V36.01C10 36.5404 10.2107 37.0491 10.5858 37.4242C10.9609 37.7993 11.4696 38.01 12 38.01H14.43Z"></path></g></svg>'},"./src/images/search.svg":function(e,t){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14 2C9.6 2 6 5.6 6 10C6 11.8 6.6 13.5 7.7 14.9L2.3 20.3C1.9 20.7 1.9 21.3 2.3 21.7C2.5 21.9 2.7 22 3 22C3.3 22 3.5 21.9 3.7 21.7L9.1 16.3C10.5 17.4 12.2 18 14 18C18.4 18 22 14.4 22 10C22 5.6 18.4 2 14 2ZM14 16C10.7 16 8 13.3 8 10C8 6.7 10.7 4 14 4C17.3 4 20 6.7 20 10C20 13.3 17.3 16 14 16Z"></path></svg>'},"./src/itemvalue.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ItemValue",function(){return d});var r,i=n("./src/localizablestring.ts"),o=n("./src/jsonobject.ts"),a=n("./src/helpers.ts"),s=n("./src/conditions.ts"),l=n("./src/base.ts"),u=n("./src/settings.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r="itemvalue");var s=e.call(this)||this;return s.typeName=r,s.ownerPropertyName="",s.locTextValue=new i.LocalizableString(s,!0,"text"),s.locTextValue.onStrChanged=function(e,t){t==s.value&&(t=void 0),s.propertyValueChanged("text",e,t)},s.locTextValue.onGetTextCallback=function(e){return e||(a.Helpers.isValueEmpty(s.value)?null:s.value.toString())},n&&(s.locText.text=n),t&&"object"==typeof t?s.setData(t):s.value=t,"itemvalue"!=s.getType()&&o.CustomPropertiesCollection.createProperties(s),s.onCreating(),s}return c(t,e),t.prototype.getMarkdownHtml=function(e,t){return this.locOwner?this.locOwner.getMarkdownHtml(e,t):null},t.prototype.getRenderer=function(e){return this.locOwner?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.locOwner?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.locOwner?this.locOwner.getProcessedText(e):e},Object.defineProperty(t,"Separator",{get:function(){return u.settings.itemValueSeparator},set:function(e){u.settings.itemValueSeparator=e},enumerable:!1,configurable:!0}),t.setData=function(e,t,n){e.length=0;for(var r=0;r<t.length;r++){var i=t[r],a=i&&"function"==typeof i.getType?i.getType():null!=n?n:"itemvalue",s=o.Serializer.createClass(a);s.setData(i),i.originalItem&&(s.originalItem=i.originalItem),e.push(s)}},t.getData=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].getData());return t},t.getItemByValue=function(e,t){if(!Array.isArray(e))return null;for(var n=a.Helpers.isValueEmpty(t),r=0;r<e.length;r++){if(n&&a.Helpers.isValueEmpty(e[r].value))return e[r];if(a.Helpers.isTwoValueEquals(e[r].value,t,!1,!0,!1))return e[r]}return null},t.getTextOrHtmlByValue=function(e,n){var r=t.getItemByValue(e,n);return null!==r?r.locText.textOrHtml:""},t.locStrsChanged=function(e){for(var t=0;t<e.length;t++)e[t].locStrsChanged()},t.runConditionsForItems=function(e,n,r,i,o,a,s){return void 0===a&&(a=!0),t.runConditionsForItemsCore(e,n,r,i,o,!0,a,s)},t.runEnabledConditionsForItems=function(e,n,r,i,o){return t.runConditionsForItemsCore(e,null,n,r,i,!1,!0,o)},t.runConditionsForItemsCore=function(e,t,n,r,i,o,a,s){void 0===a&&(a=!0),r||(r={});for(var l=r.item,u=r.choice,c=!1,d=0;d<e.length;d++){var h=e[d];r.item=h.value,r.choice=h.value;var p=!(!a||!h.getConditionRunner)&&h.getConditionRunner(o);p||(p=n);var f=!0;p&&(f=p.run(r,i)),s&&(f=s(h,f)),t&&f&&t.push(h),f!=(o?h.isVisible:h.isEnabled)&&(c=!0,o?h.setIsVisible&&h.setIsVisible(f):h.setIsEnabled&&h.setIsEnabled(f))}return l?r.item=l:delete r.item,u?r.choice=u:delete r.choice,c},t.prototype.onCreating=function(){},t.prototype.getType=function(){return this.typeName?this.typeName:"itemvalue"},t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.locOwner&&this.locOwner.getSurvey?this.locOwner.getSurvey():null},t.prototype.getLocale=function(){return this.locOwner&&this.locOwner.getLocale?this.locOwner.getLocale():""},Object.defineProperty(t.prototype,"locText",{get:function(){return this.locTextValue},enumerable:!1,configurable:!0}),t.prototype.setLocText=function(e){this.locTextValue=e},Object.defineProperty(t.prototype,"locOwner",{get:function(){return this._locOwner},set:function(e){this._locOwner=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.getPropertyValue("value")},set:function(e){var t=void 0;if(!a.Helpers.isValueEmpty(e)){var n=e.toString(),r=n.indexOf(u.settings.itemValueSeparator);r>-1&&(e=n.slice(0,r),t=n.slice(r+1))}this.setPropertyValue("value",e),t&&(this.text=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasText",{get:function(){return!!this.locText.pureText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pureText",{get:function(){return this.locText.pureText},set:function(e){this.text=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.locText.calculatedText},set:function(e){this.locText.text=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calculatedText",{get:function(){return this.locText.calculatedText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shortcutText",{get:function(){return this.text},enumerable:!1,configurable:!0}),t.prototype.canSerializeValue=function(){var e=this.value;return null!=e&&!Array.isArray(e)&&"object"!=typeof e},t.prototype.getData=function(){var e=this.toJSON();if(e.value&&e.value.pos&&delete e.value.pos,a.Helpers.isValueEmpty(e.value))return e;var t=this.canSerializeValue();return t&&(u.settings.itemValueAlwaysSerializeAsObject||u.settings.itemValueAlwaysSerializeText)||1!=Object.keys(e).length?(u.settings.itemValueAlwaysSerializeText&&void 0===e.text&&t&&(e.text=this.value.toString()),e):this.value},t.prototype.toJSON=function(){var e={},t=o.Serializer.getProperties(this.getType());t&&0!=t.length||(t=o.Serializer.getProperties("itemvalue"));for(var n=new o.JsonObject,r=0;r<t.length;r++){var i=t[r];"text"===i.name&&!this.locText.hasNonDefaultText()&&a.Helpers.isTwoValueEquals(this.value,this.text,!1,!0,!1)||n.valueToJson(this,e,i)}return e},t.prototype.setData=function(e){var t;a.Helpers.isValueEmpty(e)||(void 0!==e.value?(t="function"==typeof e.toJSON?e.toJSON():e,(new o.JsonObject).toObject(t,this)):this.value=e,this.locText.strChanged())},Object.defineProperty(t.prototype,"visibleIf",{get:function(){return this.getPropertyValue("visibleIf","")},set:function(e){this.setPropertyValue("visibleIf",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableIf",{get:function(){return this.getPropertyValue("enableIf","")},set:function(e){this.setPropertyValue("enableIf",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.getPropertyValue("isVisible",!0)},enumerable:!1,configurable:!0}),t.prototype.setIsVisible=function(e){this.setPropertyValue("isVisible",e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this.getPropertyValue("isEnabled",!0)},enumerable:!1,configurable:!0}),t.prototype.setIsEnabled=function(e){this.setPropertyValue("isEnabled",e)},t.prototype.addUsedLocales=function(e){this.AddLocStringToUsedLocales(this.locTextValue,e)},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.locText.strChanged()},t.prototype.onPropertyValueChanged=function(e,t,n){"value"!==e||this.hasText||this.locText.strChanged(),this.locOwner&&this.locOwner.itemValuePropertyChanged&&this.locOwner.itemValuePropertyChanged(this,e,t,n)},t.prototype.getConditionRunner=function(e){return e?this.getVisibleConditionRunner():this.getEnableConditionRunner()},t.prototype.getVisibleConditionRunner=function(){return this.visibleIf?(this.visibleConditionRunner||(this.visibleConditionRunner=new s.ConditionRunner(this.visibleIf)),this.visibleConditionRunner.expression=this.visibleIf,this.visibleConditionRunner):null},t.prototype.getEnableConditionRunner=function(){return this.enableIf?(this.enableConditionRunner||(this.enableConditionRunner=new s.ConditionRunner(this.enableIf)),this.enableConditionRunner.expression=this.enableIf,this.enableConditionRunner):null},t}(l.Base);l.Base.createItemValue=function(e,t){var n=null;return(n=t?o.JsonObject.metaData.createClass(t,{}):"function"==typeof e.getType?new d(null,void 0,e.getType()):new d(null)).setData(e),n},l.Base.itemValueLocStrChanged=function(e){d.locStrsChanged(e)},o.JsonObjectProperty.getItemValuesDefaultValue=function(e,t){var n=new Array;return d.setData(n,Array.isArray(e)?e:[],t),n},o.Serializer.addClass("itemvalue",["!value",{name:"text",serializationProperty:"locText"},{name:"visibleIf:condition",showMode:"form"},{name:"enableIf:condition",showMode:"form",visibleIf:function(e){return!e||"rateValues"!==e.ownerPropertyName}}],function(e){return new d(e)})},"./src/jsonobject.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"property",function(){return u}),n.d(t,"propertyArray",function(){return d}),n.d(t,"JsonObjectProperty",function(){return h}),n.d(t,"CustomPropertiesCollection",function(){return p}),n.d(t,"JsonMetadataClass",function(){return f}),n.d(t,"JsonMetadata",function(){return m}),n.d(t,"JsonError",function(){return g}),n.d(t,"JsonUnknownPropertyError",function(){return v}),n.d(t,"JsonMissingTypeErrorBase",function(){return y}),n.d(t,"JsonMissingTypeError",function(){return b}),n.d(t,"JsonIncorrectTypeError",function(){return _}),n.d(t,"JsonRequiredPropertyError",function(){return w}),n.d(t,"JsonObject",function(){return C}),n.d(t,"Serializer",function(){return x});var r,i=n("./src/surveyStrings.ts"),o=n("./src/base.ts"),a=n("./src/helpers.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function l(e,t,n){var r=e.getLocalizableString(n);r||(r=e.createLocalizableString(n,e,!0),"object"==typeof t.localizable&&"function"==typeof t.localizable.onGetTextCallback&&(r.onGetTextCallback=t.localizable.onGetTextCallback))}function u(e){return function(t,n){var r=function(e,t){if(t&&"object"==typeof t&&t.type===o.ComputedUpdater.ComputedUpdaterType){o.Base.startCollectDependencies(function(){return e[n]=t.updater()},e,n);var r=t.updater(),i=o.Base.finishCollectDependencies();return t.setDependencies(i),r}return t};e&&e.localizable?(Object.defineProperty(t,n,{get:function(){return function(e,t,n){l(e,t,n);var r=e.getLocalizableStringText(n);if(r)return r;if("object"==typeof t.localizable&&t.localizable.defaultStr){var o=e.getLocale?e.getLocale():"";return i.surveyLocalization.getString(t.localizable.defaultStr,o)}return""}(this,e,n)},set:function(t){l(this,e,n);var i=r(this,t);this.setLocalizableStringText(n,i),e&&e.onSet&&e.onSet(i,this)}}),Object.defineProperty(t,"object"==typeof e.localizable&&e.localizable.name?e.localizable.name:"loc"+n.charAt(0).toUpperCase()+n.slice(1),{get:function(){return l(this,e,n),this.getLocalizableString(n)}})):Object.defineProperty(t,n,{get:function(){var t=this.getPropertyValue(n);if(void 0!==t)return t;if(e){if("function"==typeof e.getDefaultValue)return e.getDefaultValue(this);if(void 0!==e.defaultValue)return e.defaultValue}},set:function(t){var i=r(this,t);this.setPropertyValue(n,i),e&&e.onSet&&e.onSet(i,this)}})}}function c(e,t,n){e.ensureArray(n,function(n,r){var i=t?t.onPush:null;i&&i(n,r,e)},function(n,r){var i=t?t.onRemove:null;i&&i(n,r,e)})}function d(e){return function(t,n){Object.defineProperty(t,n,{get:function(){return c(this,e,n),this.getPropertyValue(n)},set:function(t){c(this,e,n);var r=this.getPropertyValue(n);t!==r&&(r?r.splice.apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([0,r.length],t||[],!1)):this.setPropertyValue(n,t),e&&e.onSet&&e.onSet(t,this))}})}}var h=function(){function e(t,n,r){void 0===r&&(r=!1),this.name=n,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=t,this.isRequiredValue=r,this.idValue=e.Index++}return Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classInfo",{get:function(){return this.classInfoValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.typeValue?this.typeValue:"string"},set:function(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRequired",{get:function(){return this.isRequiredValue},set:function(e){this.isRequiredValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnique",{get:function(){return this.isUniqueValue},set:function(e){this.isUniqueValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniquePropertyName",{get:function(){return this.uniquePropertyValue},set:function(e){this.uniquePropertyValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasToUseGetValue",{get:function(){return this.onGetValue||this.serializationProperty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultValue",{get:function(){var t=this.defaultValueValue;return e.getItemValuesDefaultValue&&C.metaData.isDescendantOf(this.className,"itemvalue")&&(t=e.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),t},set:function(e){this.defaultValueValue=e},enumerable:!1,configurable:!0}),e.prototype.isDefaultValue=function(e){return a.Helpers.isValueEmpty(this.defaultValue)?!1===e&&("boolean"==this.type||"switch"==this.type)||""===e||a.Helpers.isValueEmpty(e):a.Helpers.isTwoValueEquals(e,this.defaultValue,!1,!0,!1)},e.prototype.getValue=function(e){return this.onGetValue?this.onGetValue(e):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].getJson():e[this.name]},e.prototype.getPropertyValue=function(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)},Object.defineProperty(e.prototype,"hasToUseSetValue",{get:function(){return this.onSetValue||this.serializationProperty},enumerable:!1,configurable:!0}),e.prototype.settingValue=function(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)},e.prototype.setValue=function(e,t,n){this.onSetValue?this.onSetValue(e,t,n):this.serializationProperty&&e[this.serializationProperty]?e[this.serializationProperty].setJson(t):(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),"boolean"!=this.type&&"switch"!=this.type||(t="true"===t.toLowerCase())),e[this.name]=t)},e.prototype.getObjType=function(e){return this.classNamePart?e.replace(this.classNamePart,""):e},e.prototype.getClassName=function(e){return e&&(e=e.toLowerCase()),this.classNamePart&&e.indexOf(this.classNamePart)<0?e+this.classNamePart:e},Object.defineProperty(e.prototype,"choices",{get:function(){return this.getChoices(null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasChoices",{get:function(){return!!this.choicesValue||!!this.choicesfunc},enumerable:!1,configurable:!0}),e.prototype.getChoices=function(e,t){return void 0===t&&(t=null),null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null},e.prototype.setChoices=function(e,t){void 0===t&&(t=null),this.choicesValue=e,this.choicesfunc=t},e.prototype.getBaseValue=function(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""},e.prototype.setBaseValue=function(e){this.baseValue=e},Object.defineProperty(e.prototype,"readOnly",{get:function(){return null!=this.readOnlyValue&&this.readOnlyValue},set:function(e){this.readOnlyValue=e},enumerable:!1,configurable:!0}),e.prototype.isVisible=function(e,t){return void 0===t&&(t=null),!(!this.visible||this.layout&&this.layout!=e)&&(!this.visibleIf||!t||this.visibleIf(t))},Object.defineProperty(e.prototype,"visible",{get:function(){return null==this.visibleValue||this.visibleValue},set:function(e){this.visibleValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLocalizable",{get:function(){return null!=this.isLocalizableValue&&this.isLocalizableValue},set:function(e){this.isLocalizableValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataList",{get:function(){return Array.isArray(this.dataListValue)?this.dataListValue:[]},set:function(e){this.dataListValue=e},enumerable:!1,configurable:!0}),e.prototype.mergeWith=function(t){for(var n=e.mergableValues,r=0;r<n.length;r++)this.mergeValue(t,n[r])},e.prototype.addDependedProperty=function(e){this.dependedProperties||(this.dependedProperties=[]),this.dependedProperties.indexOf(e)<0&&this.dependedProperties.push(e)},e.prototype.getDependedProperties=function(){return this.dependedProperties?this.dependedProperties:[]},e.prototype.schemaType=function(){return this.className||this.baseClassName?"array":"boolean"==this.type||"number"==this.type?this.type:"string"},e.prototype.mergeValue=function(e,t){null==this[t]&&null!=e[t]&&(this[t]=e[t])},e.Index=1,e.mergableValues=["typeValue","choicesValue","baseValue","readOnlyValue","visibleValue","isSerializable","isLightSerializable","isCustom","isBindable","isUnique","uniquePropertyName","isDynamicChoices","isLocalizableValue","className","alternativeName","layout","classNamePart","baseClassName","defaultValue","serializationProperty","onGetValue","onSetValue","onSettingValue","displayName","category","categoryIndex","visibleIndex","nextToProperty","showMode","dependedProperties","visibleIf","onExecuteExpression","onPropertyEditorUpdate","maxLength","maxValue","minValue","dataListValue"],e}(),p=function(){function e(){}return e.addProperty=function(t,n){t=t.toLowerCase();var r=e.properties;r[t]||(r[t]=[]),r[t].push(n)},e.removeProperty=function(t,n){t=t.toLowerCase();var r=e.properties;if(r[t])for(var i=r[t],o=0;o<i.length;o++)if(i[o].name==n){r[t].splice(o,1);break}},e.removeAllProperties=function(t){t=t.toLowerCase(),delete e.properties[t]},e.addClass=function(t,n){t=t.toLowerCase(),n&&(n=n.toLowerCase()),e.parentClasses[t]=n},e.getProperties=function(t){t=t.toLowerCase();for(var n=[],r=e.properties;t;){var i=r[t];if(i)for(var o=0;o<i.length;o++)n.push(i[o]);t=e.parentClasses[t]}return n},e.createProperties=function(t){t&&t.getType&&e.createPropertiesCore(t,t.getType())},e.createPropertiesCore=function(t,n){var r=e.properties;r[n]&&e.createPropertiesInObj(t,r[n]);var i=e.parentClasses[n];i&&e.createPropertiesCore(t,i)},e.createPropertiesInObj=function(t,n){for(var r=0;r<n.length;r++)e.createPropertyInObj(t,n[r])},e.createPropertyInObj=function(t,n){if(!(e.checkIsPropertyExists(t,n.name)||n.serializationProperty&&e.checkIsPropertyExists(t,n.serializationProperty))){if(n.isLocalizable&&n.serializationProperty&&t.createCustomLocalizableObj){t.createCustomLocalizableObj(n.name);var r={get:function(){return t.getLocalizableString(n.name)}};Object.defineProperty(t,n.serializationProperty,r);var i={get:function(){return t.getLocalizableStringText(n.name,n.defaultValue)},set:function(e){t.setLocalizableStringText(n.name,e)}};Object.defineProperty(t,n.name,i)}else{var o=n.defaultValue,a=n.isArray||"multiplevalues"===n.type;"function"==typeof t.createNewArray&&(C.metaData.isDescendantOf(n.className,"itemvalue")?(t.createNewArray(n.name,function(e){e.locOwner=t,e.ownerPropertyName=n.name}),a=!0):a&&t.createNewArray(n.name),a&&(Array.isArray(o)&&t.setPropertyValue(n.name,o),o=null)),t.getPropertyValue&&t.setPropertyValue&&(i={get:function(){return n.onGetValue?n.onGetValue(t):t.getPropertyValue(n.name,o)},set:function(e){n.onSetValue?n.onSetValue(t,e,null):t.setPropertyValue(n.name,e)}},Object.defineProperty(t,n.name,i))}"condition"!==n.type&&"expression"!==n.type||n.onExecuteExpression&&t.addExpressionProperty(n.name,n.onExecuteExpression)}},e.checkIsPropertyExists=function(e,t){return e.hasOwnProperty(t)||e[t]},e.properties={},e.parentClasses={},e}(),f=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),this.name=e,this.creator=n,this.parentName=r,this.properties=null,e=e.toLowerCase(),this.isCustomValue=!n&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),p.addClass(e,this.parentName),n&&this.makeParentRegularClass()),this.properties=new Array;for(var i=0;i<t.length;i++)this.createProperty(t[i],this.isCustom)}return e.prototype.find=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].name==e)return this.properties[t];return null},Object.defineProperty(e.prototype,"isCustom",{get:function(){return this.isCustomValue},enumerable:!1,configurable:!0}),e.prototype.isOverridedProp=function(e){return!!this.parentName&&!!x.findProperty(this.parentName,e)},e.prototype.hasRegularChildClass=function(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e<this.properties.length;e++)this.properties[e].isCustom=!1;p.removeAllProperties(this.name),this.makeParentRegularClass()}},e.prototype.makeParentRegularClass=function(){if(this.parentName){var e=x.findClass(this.parentName);e&&e.hasRegularChildClass()}},e.prototype.createProperty=function(t,n){void 0===n&&(n=!1);var r="string"==typeof t?t:t.name;if(r){var i=null,o=r.indexOf(e.typeSymbol);o>-1&&(i=r.substring(o+1),r=r.substring(0,o));var s=this.getIsPropertyNameRequired(r)||!!t.isRequired;r=this.getPropertyName(r);var l=new h(this,r,s);return i&&(l.type=i),"object"==typeof t&&(t.type&&(l.type=t.type),a.Helpers.isValueEmpty(t.default)||(l.defaultValue=t.default),a.Helpers.isValueEmpty(t.isSerializable)||(l.isSerializable=t.isSerializable),a.Helpers.isValueEmpty(t.isLightSerializable)||(l.isLightSerializable=t.isLightSerializable),a.Helpers.isValueEmpty(t.maxLength)||(l.maxLength=t.maxLength),a.Helpers.isValueEmpty(t.displayName)||(l.displayName=t.displayName),a.Helpers.isValueEmpty(t.category)||(l.category=t.category),a.Helpers.isValueEmpty(t.categoryIndex)||(l.categoryIndex=t.categoryIndex),a.Helpers.isValueEmpty(t.nextToProperty)||(l.nextToProperty=t.nextToProperty),a.Helpers.isValueEmpty(t.visibleIndex)||(l.visibleIndex=t.visibleIndex),a.Helpers.isValueEmpty(t.showMode)||(l.showMode=t.showMode),a.Helpers.isValueEmpty(t.maxValue)||(l.maxValue=t.maxValue),a.Helpers.isValueEmpty(t.minValue)||(l.minValue=t.minValue),a.Helpers.isValueEmpty(t.dataList)||(l.dataList=t.dataList),a.Helpers.isValueEmpty(t.isDynamicChoices)||(l.isDynamicChoices=t.isDynamicChoices),a.Helpers.isValueEmpty(t.isBindable)||(l.isBindable=t.isBindable),a.Helpers.isValueEmpty(t.isUnique)||(l.isUnique=t.isUnique),a.Helpers.isValueEmpty(t.uniqueProperty)||(l.uniquePropertyName=t.uniqueProperty),a.Helpers.isValueEmpty(t.isArray)||(l.isArray=t.isArray),!0!==t.visible&&!1!==t.visible||(l.visible=t.visible),t.visibleIf&&(l.visibleIf=t.visibleIf),t.onExecuteExpression&&(l.onExecuteExpression=t.onExecuteExpression),t.onPropertyEditorUpdate&&(l.onPropertyEditorUpdate=t.onPropertyEditorUpdate),!0===t.readOnly&&(l.readOnly=!0),t.choices&&l.setChoices("function"!=typeof t.choices?t.choices:null,"function"==typeof t.choices?t.choices:null),t.baseValue&&l.setBaseValue(t.baseValue),t.onGetValue&&(l.onGetValue=t.onGetValue),t.onSetValue&&(l.onSetValue=t.onSetValue),t.onSettingValue&&(l.onSettingValue=t.onSettingValue),t.isLocalizable&&(t.serializationProperty="loc"+l.name),t.serializationProperty&&(l.serializationProperty=t.serializationProperty,l.serializationProperty&&0==l.serializationProperty.indexOf("loc")&&(l.isLocalizable=!0)),t.isLocalizable&&(l.isLocalizable=t.isLocalizable),t.className&&(l.className=t.className),t.baseClassName&&(l.baseClassName=t.baseClassName),t.classNamePart&&(l.classNamePart=t.classNamePart),t.alternativeName&&(l.alternativeName=t.alternativeName),t.layout&&(l.layout=t.layout),t.dependsOn&&this.addDependsOnProperties(l,t.dependsOn)),this.properties.push(l),n&&!this.isOverridedProp(l.name)&&(l.isCustom=!0,p.addProperty(this.name,l)),l}},e.prototype.addDependsOnProperties=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addDependsOnProperty(e,t[n]);else this.addDependsOnProperty(e,t)},e.prototype.addDependsOnProperty=function(e,t){var n=this.find(t);n||(n=x.findProperty(this.parentName,t)),n&&n.addDependedProperty(e.name)},e.prototype.getIsPropertyNameRequired=function(t){return t.length>0&&t[0]==e.requiredSymbol},e.prototype.getPropertyName=function(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e},e.requiredSymbol="!",e.typeSymbol=":",e}(),m=function(){function e(){this.classes={},this.alternativeNames={},this.childrenClasses={},this.classProperties={},this.classHashProperties={}}return e.prototype.getObjPropertyValue=function(e,t){if(this.isObjWrapper(e)){var n=e.getOriginalObj();if(r=x.findProperty(n.getType(),t))return this.getObjPropertyValueCore(n,r)}var r;return(r=x.findProperty(e.getType(),t))?this.getObjPropertyValueCore(e,r):e[t]},e.prototype.setObjPropertyValue=function(e,t,n){if(e[t]!==n)if(e[t]&&e[t].setJson)e[t].setJson(n);else{if(Array.isArray(n)){for(var r=[],i=0;i<n.length;i++)r.push(n[i]);n=r}e[t]=n}},e.prototype.getObjPropertyValueCore=function(e,t){if(!t.isSerializable)return e[t.name];if(t.isLocalizable){if(t.isArray)return e[t.name];if(t.serializationProperty)return e[t.serializationProperty].text}return e.getPropertyValue(t.name)},e.prototype.isObjWrapper=function(e){return!!e.getOriginalObj&&!!e.getOriginalObj()},e.prototype.addClass=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e=e.toLowerCase();var i=new f(e,t,n,r);return this.classes[e]=i,r&&(r=r.toLowerCase(),this.childrenClasses[r]||(this.childrenClasses[r]=[]),this.childrenClasses[r].push(i)),i},e.prototype.removeClass=function(e){var t=this.findClass(e);if(t&&(delete this.classes[t.name],t.parentName)){var n=this.childrenClasses[t.parentName].indexOf(t);n>-1&&this.childrenClasses[t.parentName].splice(n,1)}},e.prototype.overrideClassCreatore=function(e,t){this.overrideClassCreator(e,t)},e.prototype.overrideClassCreator=function(e,t){e=e.toLowerCase();var n=this.findClass(e);n&&(n.creator=t)},e.prototype.getProperties=function(e){var t=this.findClass(e);return t?this.classProperties[t.name]||(this.fillPropertiesForClass(t.name),this.classProperties[t.name]):[]},e.prototype.getHashProperties=function(e){var t=this.findClass(e);return t?this.classHashProperties[t.name]||(this.fillPropertiesForClass(t.name),this.classHashProperties[t.name]):{}},e.prototype.fillPropertiesForClass=function(e){var t=new Array,n={};this.fillProperties(e,t,n),this.classProperties[e]=t,this.classHashProperties[e]=n},e.prototype.getPropertiesByObj=function(e){if(!e||!e.getType)return[];for(var t={},n=this.getProperties(e.getType()),r=0;r<n.length;r++)t[n[r].name]=n[r];var i=e.getDynamicType?this.getProperties(e.getDynamicType()):null;if(i&&i.length>0)for(r=0;r<i.length;r++){var o=i[r];t[o.name]||(t[o.name]=o)}return Object.keys(t).map(function(e){return t[e]})},e.prototype.getDynamicPropertiesByObj=function(e,t){if(void 0===t&&(t=null),!e||!e.getType||!e.getDynamicType&&!t)return[];var n=t||e.getDynamicType();if(!n)return[];var r=this.getProperties(n);if(!r||0==r.length)return[];for(var i={},o=this.getProperties(e.getType()),a=0;a<o.length;a++)i[o[a].name]=o[a];var s=[];for(a=0;a<r.length;a++){var l=r[a];i[l.name]||s.push(l)}return s},e.prototype.hasOriginalProperty=function(e,t){return!!this.getOriginalProperty(e,t)},e.prototype.getOriginalProperty=function(e,t){return this.findProperty(e.getType(),t)||(this.isObjWrapper(e)?this.findProperty(e.getOriginalObj().getType(),t):null)},e.prototype.getProperty=function(e,t){var n=this.findProperty(e,t);if(!n)return n;var r=this.findClass(e);if(n.classInfo===r)return n;var i=new h(r,t,n.isRequired);return i.mergeWith(n),i.isArray=n.isArray,r.properties.push(i),this.emptyClassPropertiesHash(r),i},e.prototype.findProperty=function(e,t){return this.getHashProperties(e)[t]||null},e.prototype.findProperties=function(e,t){for(var n=[],r=this.getHashProperties(e),i=0;i<t.length;i++){var o=r[t[i]];o&&n.push(o)}return n},e.prototype.getAllPropertiesByName=function(e){for(var t=new Array,n=this.getAllClasses(),r=0;r<n.length;r++)for(var i=this.findClass(n[r]),o=0;o<i.properties.length;o++)if(i.properties[o].name==e){t.push(i.properties[o]);break}return t},e.prototype.getAllClasses=function(){var e=new Array;for(var t in this.classes)e.push(t);return e},e.prototype.createClass=function(e,t){void 0===t&&(t=void 0),e=e.toLowerCase();var n=this.findClass(e);if(!n)return null;if(n.creator)return n.creator(t);for(var r=n.parentName;r;){if(!(n=this.findClass(r)))return null;if(r=n.parentName,n.creator)return this.createCustomType(e,n.creator,t)}return null},e.prototype.createCustomType=function(e,t,n){void 0===n&&(n=void 0),e=e.toLowerCase();var r=t(n),i=e,o=r.getTemplate?r.getTemplate():r.getType();return r.getType=function(){return i},r.getTemplate=function(){return o},p.createProperties(r),r},e.prototype.getChildrenClasses=function(e,t){void 0===t&&(t=!1),e=e.toLowerCase();var n=[];return this.fillChildrenClasses(e,t,n),n},e.prototype.getRequiredProperties=function(e){for(var t=this.getProperties(e),n=[],r=0;r<t.length;r++)t[r].isRequired&&n.push(t[r].name);return n},e.prototype.addProperties=function(e,t){e=e.toLowerCase();for(var n=this.findClass(e),r=0;r<t.length;r++)this.addCustomPropertyCore(n,t[r])},e.prototype.addProperty=function(e,t){return this.addCustomPropertyCore(this.findClass(e),t)},e.prototype.addCustomPropertyCore=function(e,t){if(!e)return null;var n=e.createProperty(t,!0);return n&&this.emptyClassPropertiesHash(e),n},e.prototype.removeProperty=function(e,t){var n=this.findClass(e);if(!n)return!1;var r=n.find(t);r&&(this.removePropertyFromClass(n,r),this.emptyClassPropertiesHash(n),p.removeProperty(n.name,t))},e.prototype.removePropertyFromClass=function(e,t){var n=e.properties.indexOf(t);n<0||e.properties.splice(n,1)},e.prototype.emptyClassPropertiesHash=function(e){this.classProperties[e.name]=null,this.classHashProperties[e.name]=null;for(var t=this.getChildrenClasses(e.name),n=0;n<t.length;n++)this.classProperties[t[n].name]=null,this.classHashProperties[t[n].name]=null},e.prototype.fillChildrenClasses=function(e,t,n){var r=this.childrenClasses[e];if(r)for(var i=0;i<r.length;i++)t&&!r[i].creator||n.push(r[i]),this.fillChildrenClasses(r[i].name,t,n)},e.prototype.findClass=function(e){e=e.toLowerCase();var t=this.classes[e];if(!t){var n=this.alternativeNames[e];if(n&&n!=e)return this.findClass(n)}return t},e.prototype.isDescendantOf=function(e,t){if(!e||!t)return!1;e=e.toLowerCase(),t=t.toLowerCase();var n=this.findClass(e);if(!n)return!1;var r=n;do{if(r.name===t)return!0;r=this.classes[r.parentName]}while(r);return!1},e.prototype.addAlterNativeClassName=function(e,t){this.alternativeNames[t.toLowerCase()]=e.toLowerCase()},e.prototype.generateSchema=function(e){void 0===e&&(e=void 0),e||(e="survey");var t=this.findClass(e);if(!t)return null;var n={$schema:"http://json-schema.org/draft-07/schema#",title:"SurveyJS Library json schema",type:"object",properties:{},definitions:{}};return this.generateSchemaProperties(t,n.properties,n.definitions),n},e.prototype.generateSchemaProperties=function(e,t,n){if(e)for(var r=0;r<e.properties.length;r++){var i=e.properties[r];t[i.name]=this.generateSchemaProperty(i,n)}},e.prototype.generateSchemaProperty=function(e,t){var n={type:e.schemaType()};if(e.hasChoices&&(n.enum=e.getChoices(null)),e.className&&(n.items={$ref:"#"+e.className},this.generateChemaClass(e.className,t)),e.baseClassName){var r=this.getChildrenClasses(e.baseClassName,!0);"question"==e.baseClassName&&r.push(this.findClass("panel")),n.items=[];for(var i=0;i<r.length;i++){var o=r[i].name;n.items.push({$ref:"#"+o}),this.generateChemaClass(o,t)}}return n},e.prototype.generateChemaClass=function(e,t){if(!t[e]){var n=this.findClass(e);if(n){var r=!!n.parentName&&"base"!=n.parentName;r&&this.generateChemaClass(n.parentName,t);var i={type:"object",$id:"#"+e};t[e]=i;var o={};this.generateSchemaProperties(n,o,t),r?i.allOff=[{$ref:"#"+n.parentName},{properties:o}]:i.properties=o}}},e.prototype.fillProperties=function(e,t,n){var r=this.findClass(e);if(r){r.parentName&&this.fillProperties(r.parentName,t,n);for(var i=0;i<r.properties.length;i++){var o=r.properties[i];this.addPropertyCore(o,t,n),n[o.name]=o}}},e.prototype.addPropertyCore=function(e,t,n){if(n[e.name]){for(var r=-1,i=0;i<t.length;i++)if(t[i].name==e.name){r=i;break}e.mergeWith(t[r]),t[r]=e}else t.push(e)},e}(),g=function(){function e(e,t){this.type=e,this.message=t,this.description="",this.at=-1}return e.prototype.getFullDescription=function(){return this.message+(this.description?"\n"+this.description:"")},e}(),v=function(e){function t(t,n){var r=e.call(this,"unknownproperty","The property '"+t+"' in class '"+n+"' is unknown.")||this;r.propertyName=t,r.className=n;var i=C.metaData.getProperties(n);if(i){r.description="The list of available properties are: ";for(var o=0;o<i.length;o++)o>0&&(r.description+=", "),r.description+=i[o].name;r.description+="."}return r}return s(t,e),t}(g),y=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;i.baseClassName=t,i.type=n,i.message=r,i.description="The following types are available: ";for(var o=C.metaData.getChildrenClasses(t,!0),a=0;a<o.length;a++)a>0&&(i.description+=", "),i.description+="'"+o[a].name+"'";return i.description+=".",i}return s(t,e),t}(g),b=function(e){function t(t,n){var r=e.call(this,n,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return s(t,e),t}(y),_=function(e){function t(t,n){var r=e.call(this,n,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+t+"'.")||this;return r.propertyName=t,r.baseClassName=n,r}return s(t,e),t}(y),w=function(e){function t(t,n){var r=e.call(this,"requiredproperty","The property '"+t+"' is required in class '"+n+"'.")||this;return r.propertyName=t,r.className=n,r}return s(t,e),t}(g),C=function(){function e(){this.errors=new Array,this.lightSerializing=!1}return Object.defineProperty(e,"metaData",{get:function(){return e.metaDataValue},enumerable:!1,configurable:!0}),e.prototype.toJsonObject=function(e,t){return void 0===t&&(t=!1),this.toJsonObjectCore(e,null,t)},e.prototype.toObject=function(e,t){this.toObjectCore(e,t);var n=this.getRequiredError(t,e);n&&this.addNewError(n,e)},e.prototype.toObjectCore=function(t,n){if(t){var r=null,i=void 0,o=!0;if(n.getType&&(i=n.getType(),r=e.metaData.getProperties(i),o=!!i&&!e.metaData.isDescendantOf(i,"itemvalue")),r){for(var a in n.startLoadingFromJson&&n.startLoadingFromJson(t),r=this.addDynamicProperties(n,t,r),t)if(a!==e.typePropertyName)if(a!==e.positionPropertyName){var s=this.findProperty(r,a);s?this.valueToObj(t[a],n,s):o&&this.addNewError(new v(a.toString(),i),t)}else n[a]=t[a];n.endLoadingFromJson&&n.endLoadingFromJson()}}},e.prototype.toJsonObjectCore=function(t,n,r){if(void 0===r&&(r=!1),!t||!t.getType)return t;if("function"==typeof t.getData)return t.getData();var i={};return null==n||n.className||(i[e.typePropertyName]=n.getObjType(t.getType())),this.propertiesToJson(t,e.metaData.getProperties(t.getType()),i,r),this.propertiesToJson(t,this.getDynamicProperties(t),i,r),i},e.prototype.getDynamicProperties=function(e){return x.getDynamicPropertiesByObj(e)},e.prototype.addDynamicProperties=function(e,t,n){if(!e.getDynamicPropertyName)return n;var r=e.getDynamicPropertyName();if(!r)return n;t[r]&&(e[r]=t[r]);for(var i=this.getDynamicProperties(e),o=[],a=0;a<n.length;a++)o.push(n[a]);for(a=0;a<i.length;a++)o.push(i[a]);return o},e.prototype.propertiesToJson=function(e,t,n,r){void 0===r&&(r=!1);for(var i=0;i<t.length;i++)this.valueToJson(e,n,t[i],r)},e.prototype.valueToJson=function(e,t,n,r){if(void 0===r&&(r=!1),!(!1===n.isSerializable||!1===n.isLightSerializable&&this.lightSerializing)){var i=n.getValue(e);if(r||!n.isDefaultValue(i)){if(this.isValueArray(i)){for(var o=[],a=0;a<i.length;a++)o.push(this.toJsonObjectCore(i[a],n,r));i=o.length>0?o:null}else i=this.toJsonObjectCore(i,n,r);var s="function"==typeof e.getPropertyValue&&null!==e.getPropertyValue(n.name,null);(r&&s||!n.isDefaultValue(i))&&(x.onSerializingProperty&&x.onSerializingProperty(e,n,i,t)||(t[n.name]=i))}}},e.prototype.valueToObj=function(e,t,n){if(null!=e)if(this.removePos(n,e),null!=n&&n.hasToUseSetValue)n.setValue(t,e,this);else if(this.isValueArray(e))this.valueToArray(e,t,n.name,n);else{var r=this.createNewObj(e,n);r.newObj&&(this.toObjectCore(e,r.newObj),e=r.newObj),r.error||(null!=n?n.setValue(t,e,this):t[n.name]=e)}},e.prototype.removePos=function(e,t){!e||!e.type||e.type.indexOf("value")<0||this.removePosFromObj(t)},e.prototype.removePosFromObj=function(t){if(t){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.removePosFromObj(t[n]);t[e.positionPropertyName]&&delete t[e.positionPropertyName]}},e.prototype.isValueArray=function(e){return e&&Array.isArray(e)},e.prototype.createNewObj=function(t,n){var r={newObj:null,error:null},i=t[e.typePropertyName];return!i&&null!=n&&n.className&&(i=n.className),i=n.getClassName(i),r.newObj=i?e.metaData.createClass(i,t):null,r.error=this.checkNewObjectOnErrors(r.newObj,t,n,i),r},e.prototype.checkNewObjectOnErrors=function(e,t,n,r){var i=null;return e?i=this.getRequiredError(e,t):n.baseClassName&&(i=r?new _(n.name,n.baseClassName):new b(n.name,n.baseClassName)),i&&this.addNewError(i,t),i},e.prototype.getRequiredError=function(t,n){if(!t.getType||"function"==typeof t.getData)return null;var r=t.getType(),i=e.metaData.getRequiredProperties(r);if(!Array.isArray(i))return null;for(var o=0;o<i.length;o++){var s=x.findProperty(r,i[o]);if(s&&a.Helpers.isValueEmpty(s.defaultValue)&&!n[s.name])return new w(s.name,r)}return null},e.prototype.addNewError=function(t,n){n&&n[e.positionPropertyName]&&(t.at=n[e.positionPropertyName].start),this.errors.push(t)},e.prototype.valueToArray=function(e,t,n,r){if(!t[n]||this.isValueArray(t[n])){t[n]&&e.length>0&&t[n].splice(0,t[n].length);var i=t[n]?t[n]:[];this.addValuesIntoArray(e,i,r),t[n]||(t[n]=i)}},e.prototype.addValuesIntoArray=function(e,t,n){for(var r=0;r<e.length;r++){var i=this.createNewObj(e[r],n);i.newObj?(e[r].name&&(i.newObj.name=e[r].name),t.push(i.newObj),this.toObjectCore(e[r],i.newObj)):i.error||t.push(e[r])}},e.prototype.findProperty=function(e,t){if(!e)return null;for(var n=0;n<e.length;n++){var r=e[n];if(r.name==t||r.alternativeName==t)return r}return null},e.typePropertyName="type",e.positionPropertyName="pos",e.metaDataValue=new m,e}(),x=C.metaData},"./src/list.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"defaultListCss",function(){return c}),n.d(t,"ListModel",function(){return d});var r,i=n("./src/jsonobject.ts"),o=n("./src/actions/container.ts"),a=n("./src/utils/cssClassBuilder.ts"),s=n("./src/element-helper.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},c={root:"sv-list__container",item:"sv-list__item",itemSelected:"sv-list__item--selected",itemWithIcon:"sv-list__item--with-icon",itemDisabled:"sv-list__item--disabled",itemFocused:"sv-list__item--focused",itemIcon:"sv-list__item-icon",itemSeparator:"sv-list__item-separator",itemBody:"sv-list__item-body",itemsContainer:"sv-list",filter:"sv-list__filter",filterIcon:"sv-list__filter-icon",filterInput:"sv-list__input",emptyContainer:"sv-list__empty-container",emptyText:"sv-list__empty-text"},d=function(e){function t(n,r,i,o,s){var l=e.call(this)||this;return l.onSelectionChanged=r,l.allowSelection=i,l.onFilterStringChangedCallback=s,l.onItemClick=function(e){l.isItemDisabled(e)||(l.isExpanded=!1,l.allowSelection&&(l.selectedItem=e),l.onSelectionChanged&&l.onSelectionChanged(e))},l.isItemDisabled=function(e){return void 0!==e.enabled&&!e.enabled},l.isItemSelected=function(e){return!!l.allowSelection&&!!l.selectedItem&&l.selectedItem.id==e.id},l.isItemFocused=function(e){return!!l.focusedItem&&l.focusedItem.id==e.id},l.getItemClass=function(e){return(new a.CssClassBuilder).append(l.cssClasses.item).append(l.cssClasses.itemWithIcon,!!e.iconName).append(l.cssClasses.itemDisabled,l.isItemDisabled(e)).append(l.cssClasses.itemFocused,l.isItemFocused(e)).append(l.cssClasses.itemSelected,e.active||l.isItemSelected(e)).toString()},l.getItemIndent=function(e){return((e.level||0)+1)*t.INDENT+"px"},l.setItems(n),l.selectedItem=o,l}return l(t,e),t.prototype.hasText=function(e,t){return!t||(e.title||"").toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1},t.prototype.isItemVisible=function(e){return e.visible&&(!this.shouldProcessFilter||this.hasText(e,this.filterString))},Object.defineProperty(t.prototype,"visibleItems",{get:function(){var e=this;return this.visibleActions.filter(function(t){return e.isItemVisible(t)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldProcessFilter",{get:function(){return!this.onFilterStringChangedCallback},enumerable:!1,configurable:!0}),t.prototype.onFilterStringChanged=function(e){var t=this;this.isEmpty=0===this.renderedActions.filter(function(e){return t.isItemVisible(e)}).length,this.onFilterStringChangedCallback&&this.onFilterStringChangedCallback(e)},t.prototype.onSet=function(){this.showFilter=this.searchEnabled&&(this.actions||[]).length>t.MINELEMENTCOUNT,e.prototype.onSet.call(this)},t.prototype.getDefaultCssClasses=function(){return c},t.prototype.updateItemActiveState=function(){var e=this;this.actions.forEach(function(t){return t.active=e.isItemSelected(t)})},Object.defineProperty(t.prototype,"filterStringPlaceholder",{get:function(){return this.getLocalizationString("filterStringPlaceholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyMessage",{get:function(){return this.getLocalizationString("emptyMessage")},enumerable:!1,configurable:!0}),t.prototype.goToItems=function(e){"ArrowDown"!==e.key&&40!==e.keyCode||(s.ElementHelper.focusElement(s.ElementHelper.getNextElementPreorder(e.target.parentElement.nextElementSibling.firstElementChild)),e.preventDefault())},t.prototype.onMouseMove=function(e){this.resetFocusedItem()},t.prototype.onKeyDown=function(e){var t=e.target;"ArrowDown"===e.key||40===e.keyCode?(s.ElementHelper.focusElement(s.ElementHelper.getNextElementPreorder(t)),e.preventDefault()):"ArrowUp"!==e.key&&38!==e.keyCode||(s.ElementHelper.focusElement(s.ElementHelper.getNextElementPostorder(t)),e.preventDefault())},t.prototype.onPointerDown=function(e,t){},t.prototype.refresh=function(){this.filterString="",this.resetFocusedItem()},t.prototype.resetFocusedItem=function(){this.focusedItem=void 0},t.prototype.focusFirstVisibleItem=function(){this.focusedItem=this.visibleItems[0]},t.prototype.focusLastVisibleItem=function(){this.focusedItem=this.visibleItems[this.visibleItems.length-1]},t.prototype.initFocusedItem=function(){var e=this;this.selectedItem?this.focusedItem=this.visibleItems.filter(function(t){return t.id===e.selectedItem.id})[0]:this.focusFirstVisibleItem()},t.prototype.focusNextVisibleItem=function(){if(this.focusedItem){var e=this.visibleItems,t=e.indexOf(this.focusedItem),n=e[t+1];n?this.focusedItem=n:this.focusFirstVisibleItem()}else this.initFocusedItem()},t.prototype.focusPrevVisibleItem=function(){if(this.focusedItem){var e=this.visibleItems,t=e.indexOf(this.focusedItem),n=e[t-1];n?this.focusedItem=n:this.focusLastVisibleItem()}else this.initFocusedItem()},t.prototype.selectFocusedItem=function(){this.onItemClick(this.focusedItem)},t.INDENT=16,t.MINELEMENTCOUNT=10,u([Object(i.property)({defaultValue:!0,onSet:function(e,t){t.onSet()}})],t.prototype,"searchEnabled",void 0),u([Object(i.property)({defaultValue:!1})],t.prototype,"showFilter",void 0),u([Object(i.property)({defaultValue:!1})],t.prototype,"isExpanded",void 0),u([Object(i.property)({onSet:function(e,t){t.updateItemActiveState()}})],t.prototype,"selectedItem",void 0),u([Object(i.property)()],t.prototype,"focusedItem",void 0),u([Object(i.property)({onSet:function(e,t){t.onFilterStringChanged(t.filterString)}})],t.prototype,"filterString",void 0),t}(o.ActionContainer)},"./src/localizablestring.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"LocalizableString",function(){return s}),n.d(t,"LocalizableStrings",function(){return l});var r=n("./src/helpers.ts"),i=n("./src/surveyStrings.ts"),o=n("./src/settings.ts"),a=n("./src/base.ts"),s=function(){function e(e,t,n){void 0===t&&(t=!1),this.owner=e,this.useMarkdown=t,this.name=n,this.values={},this.htmlValues={},this.onStringChanged=new a.EventBase,this.onCreating()}return Object.defineProperty(e,"defaultLocale",{get:function(){return o.settings.defaultLocaleName},set:function(e){o.settings.defaultLocaleName=e},enumerable:!1,configurable:!0}),e.prototype.getIsMultiple=function(){return!1},Object.defineProperty(e.prototype,"locale",{get:function(){if(this.owner&&this.owner.getLocale){var e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""},enumerable:!1,configurable:!0}),e.prototype.strChanged=function(){this.searchableText=void 0,void 0!==this.renderedText&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.onChanged(),this.onStringChanged.fire(this,{}))},Object.defineProperty(e.prototype,"text",{get:function(){return this.pureText},set:function(e){this.setLocaleText(this.locale,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"calculatedText",{get:function(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText},enumerable:!1,configurable:!0}),e.prototype.calcText=function(){var e=this.pureText;return e&&this.owner&&this.owner.getProcessedText&&e.indexOf("{")>-1&&(e=this.owner.getProcessedText(e)),this.onGetTextCallback&&(e=this.onGetTextCallback(e)),e},Object.defineProperty(e.prototype,"pureText",{get:function(){var e=this.locale;e||(e=o.settings.defaultLocaleName);var t=this.getValue(e);return t||e!=o.settings.defaultLocaleName||(t=this.getValue(i.surveyLocalization.defaultLocale)),t||e===o.settings.defaultLocaleName||(t=this.getValue(o.settings.defaultLocaleName)),!t&&this.getLocalizationName()&&(t=this.getLocalizationStr(),this.onGetLocalizationTextCallback&&(t=this.onGetLocalizationTextCallback(t))),t||(t=""),t},enumerable:!1,configurable:!0}),e.prototype.getLocalizationName=function(){return this.sharedData?this.sharedData.localizationName:this.localizationName},e.prototype.getLocalizationStr=function(){var e=this.getLocalizationName();return e?i.surveyLocalization.getString(e,this.locale):""},Object.defineProperty(e.prototype,"hasHtml",{get:function(){return this.hasHtmlValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.hasHtml?this.getHtmlValue():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textOrHtml",{get:function(){return this.hasHtml?this.getHtmlValue():this.calculatedText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedHtml",{get:function(){return this.textOrHtml},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){return e||(e=o.settings.defaultLocaleName),this.getValue(e)||""},e.prototype.getLocaleTextWithDefault=function(e){var t=this.getLocaleText(e);return!t&&this.onGetDefaultTextCallback?this.onGetDefaultTextCallback():t},e.prototype.setLocaleText=function(e,t){if(this.storeDefaultText||t!=this.getLocaleTextWithDefault(e)){if(!t||!e||e==o.settings.defaultLocaleName||this.getValue(e)||t!=this.getLocaleText(o.settings.defaultLocaleName)){var n=this.locale;e||(e=o.settings.defaultLocaleName),n||(n=o.settings.defaultLocaleName);var r=this.onStrChanged&&e===n?this.pureText:void 0;delete this.htmlValues[e],t?"string"==typeof t&&(e!=o.settings.defaultLocaleName&&t==this.getLocaleText(o.settings.defaultLocaleName)?this.setLocaleText(e,null):(this.setValue(e,t),e==o.settings.defaultLocaleName&&this.deleteValuesEqualsToDefault(t))):this.getValue(e)&&this.deleteValue(e),this.fireStrChanged(r,t)}}else{if(t||e&&e!==o.settings.defaultLocaleName)return;var a=i.surveyLocalization.defaultLocale,s=this.getValue(a);a&&s&&(this.setValue(a,t),this.fireStrChanged(s,t))}},e.prototype.fireStrChanged=function(e,t){this.strChanged(),this.onStrChanged&&e!==t&&this.onStrChanged(e,t)},e.prototype.hasNonDefaultText=function(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=o.settings.defaultLocaleName)},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){if(this.sharedData)return this.sharedData.getJson();var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=o.settings.defaultLocaleName||o.settings.serializeLocalizableStringAsObject?this.values:this.values[e[0]]},e.prototype.setJson=function(e){if(this.sharedData)this.sharedData.setJson(e);else if(this.values={},this.htmlValues={},e){if("string"==typeof e)this.setLocaleText(null,e);else for(var t in e)this.setLocaleText(t,e[t]);this.strChanged()}},Object.defineProperty(e.prototype,"renderAs",{get:function(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||e.defaultRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderAsData",{get:function(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return this.sharedData?this.sharedData.equals(e):!(!e||!e.values)&&r.Helpers.isTwoValueEquals(this.values,e.values,!1,!0,!1)},e.prototype.setFindText=function(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){var t=this.textOrHtml;this.searchableText=t?t.toLowerCase():""}var n=this.searchableText,r=n&&e?n.indexOf(e):void 0;return r<0&&(r=void 0),null==r&&this.searchIndex==r||(this.searchIndex=r,this.onSearchChanged&&this.onSearchChanged()),null!=this.searchIndex}},e.prototype.onChanged=function(){},e.prototype.onCreating=function(){},e.prototype.hasHtmlValue=function(){if(!this.owner||!this.useMarkdown)return!1;var e=this.calculatedText;if(!e)return!1;if(this.getLocalizationName()&&e===this.getLocalizationStr())return!1;var t=this.locale;return t||(t=o.settings.defaultLocaleName),this.htmlValues[t]=this.owner.getMarkdownHtml(e,this.name),!!this.htmlValues[t]},e.prototype.getHtmlValue=function(){var e=this.locale;return e||(e=o.settings.defaultLocaleName),this.htmlValues[e]},e.prototype.deleteValuesEqualsToDefault=function(e){for(var t=this.getValuesKeys(),n=0;n<t.length;n++)t[n]!=o.settings.defaultLocaleName&&this.getValue(t[n])==e&&this.deleteValue(t[n])},e.prototype.getValue=function(e){return this.sharedData?this.sharedData.getValue(e):this.values[e]},e.prototype.setValue=function(e,t){this.sharedData?this.sharedData.setValue(e,t):this.values[e]=t},e.prototype.deleteValue=function(e){this.sharedData?this.sharedData.deleteValue(e):delete this.values[e]},e.prototype.getValuesKeys=function(){return this.sharedData?this.sharedData.getValuesKeys():Object.keys(this.values)},e.SerializeAsObject=!1,e.defaultRenderer="sv-string-viewer",e.editableRenderer="sv-string-editor",e}(),l=function(){function e(e){this.owner=e,this.values={}}return e.prototype.getIsMultiple=function(){return!0},Object.defineProperty(e.prototype,"locale",{get:function(){return this.owner&&this.owner.getLocale?this.owner.getLocale():""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue("")},set:function(e){this.setValue("",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return Array.isArray(this.value)?this.value.join("\n"):""},set:function(e){this.value=e?e.split("\n"):[]},enumerable:!1,configurable:!0}),e.prototype.getLocaleText=function(e){var t=this.getValueCore(e,!e||e===this.locale);return t&&Array.isArray(t)&&0!=t.length?t.join("\n"):""},e.prototype.setLocaleText=function(e,t){var n=t?t.split("\n"):null;this.setValue(e,n)},e.prototype.getValue=function(e){return this.getValueCore(e)},e.prototype.getValueCore=function(e,t){if(void 0===t&&(t=!0),e=this.getLocale(e),this.values[e])return this.values[e];if(t){var n=o.settings.defaultLocaleName;if(e!==n&&this.values[n])return this.values[n]}return[]},e.prototype.setValue=function(e,t){e=this.getLocale(e);var n=r.Helpers.createCopy(this.values);t&&0!=t.length?this.values[e]=t:delete this.values[e],this.onValueChanged&&this.onValueChanged(n,this.values)},e.prototype.hasValue=function(e){return void 0===e&&(e=""),!this.isEmpty&&this.getValue(e).length>0},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==this.getValuesKeys().length},enumerable:!1,configurable:!0}),e.prototype.getLocale=function(e){return e||(e=this.locale)||o.settings.defaultLocaleName},e.prototype.getLocales=function(){var e=this.getValuesKeys();return 0==e.length?[]:e},e.prototype.getJson=function(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=o.settings.defaultLocaleName||o.settings.serializeLocalizableStringAsObject?r.Helpers.createCopy(this.values):this.values[e[0]]},e.prototype.setJson=function(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])},e.prototype.getValuesKeys=function(){return Object.keys(this.values)},e}()},"./src/localization/english.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"englishStrings",function(){return r});var r={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",otherItemText:"Other (describe)",noneItemText:"None",selectAllItemText:"Select All",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"There is no visible page or question in the survey.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"Our records show that you have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Tap to rate here...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",maxError:"The value should not be greater than {0}",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} variant(s).",maxSelectError:"Please select no more than {0} variant(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file chosen",fileDragAreaPlaceholder:"Drop a file here or click the button below to load the file.",confirmDelete:"Do you want to delete the record?",keyDuplicationError:"This value should be unique.",addColumn:"Add column",addRow:"Add row",removeRow:"Remove",emptyRowsText:"There are no rows.",addPanel:"Add new",removePanel:"Remove",choices_Item:"item",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",cleanCaption:"Clean",clearCaption:"Clear",signaturePlaceHolder:"Sign here",chooseFileCaption:"Choose file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",noEntriesText:"There are no entries yet.\nClick the button below to add a new entry.",more:"More"}},"./src/martixBase.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionMatrixBaseModel",function(){return h});var r,i=n("./src/itemvalue.ts"),o=n("./src/question.ts"),a=n("./src/jsonobject.ts"),s=n("./src/conditions.ts"),l=n("./src/helpers.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},h=function(e){function t(t){var n=e.call(this,t)||this;return n.generatedVisibleRows=null,n.generatedTotalRow=null,n.filteredRows=null,n.filteredColumns=null,n.columns=n.createColumnValues(),n.rows=n.createItemValues("rows"),n}return c(t,e),t.prototype.createColumnValues=function(){return this.createItemValues("columns")},t.prototype.getType=function(){return"matrixbase"},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.updateVisibilityBasedOnRows()},Object.defineProperty(t.prototype,"isCompositeQuestion",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showHeader",{get:function(){return this.getPropertyValue("showHeader")},set:function(e){this.setPropertyValue("showHeader",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this.getPropertyValue("columns")},set:function(e){this.setPropertyValue("columns",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleColumns",{get:function(){return this.filteredColumns?this.filteredColumns:this.columns},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this.getPropertyValue("rows")},set:function(e){var t=this.processRowsOnSet(e);this.setPropertyValue("rows",t),this.filterItems()},enumerable:!1,configurable:!0}),t.prototype.processRowsOnSet=function(e){return e},t.prototype.getVisibleRows=function(){return[]},Object.defineProperty(t.prototype,"visibleRows",{get:function(){return this.getVisibleRows()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowsVisibleIf",{get:function(){return this.getPropertyValue("rowsVisibleIf","")},set:function(e){this.setPropertyValue("rowsVisibleIf",e),this.filterItems()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsVisibleIf",{get:function(){return this.getPropertyValue("columnsVisibleIf","")},set:function(e){this.setPropertyValue("columnsVisibleIf",e),this.filterItems()},enumerable:!1,configurable:!0}),t.prototype.runCondition=function(t,n){e.prototype.runCondition.call(this,t,n),this.runItemsCondition(t,n)},t.prototype.filterItems=function(){return this.areInvisibleElementsShowing?(this.onRowsChanged(),!1):!(this.isLoadingFromJson||!this.data)&&this.runItemsCondition(this.getDataFilteredValues(),this.getDataFilteredProperties())},t.prototype.onColumnsChanged=function(){},t.prototype.onRowsChanged=function(){this.updateVisibilityBasedOnRows(),this.fireCallback(this.visibleRowsChangedCallback)},t.prototype.updateVisibilityBasedOnRows=function(){this.hideIfRowsEmpty&&(this.visible=this.rows.length>0&&(!this.filteredRows||this.filteredRows.length>0))},t.prototype.shouldRunColumnExpression=function(){return!this.survey||!this.survey.areInvisibleElementsShowing},t.prototype.hasRowsAsItems=function(){return!0},t.prototype.runItemsCondition=function(e,t){var n=null;if(this.filteredRows&&!l.Helpers.isValueEmpty(this.defaultValue)){n=[];for(var r=0;r<this.filteredRows.length;r++)n.push(this.filteredRows[r])}var i=this.hasRowsAsItems()&&this.runConditionsForRows(e,t),o=this.runConditionsForColumns(e,t);return(i=o||i)&&(this.isClearValueOnHidden&&(this.filteredColumns||this.filteredRows)&&this.clearIncorrectValues(),n&&this.restoreNewVisibleRowsValues(n),this.clearGeneratedRows(),o&&this.onColumnsChanged(),this.onRowsChanged()),i},t.prototype.clearGeneratedRows=function(){this.generatedVisibleRows=null},t.prototype.runConditionsForRows=function(e,t){var n=!!this.survey&&this.survey.areInvisibleElementsShowing,r=!n&&this.rowsVisibleIf?new s.ConditionRunner(this.rowsVisibleIf):null;this.filteredRows=[];var o=i.ItemValue.runConditionsForItems(this.rows,this.filteredRows,r,e,t,!n);return this.filteredRows.length===this.rows.length&&(this.filteredRows=null),o},t.prototype.runConditionsForColumns=function(e,t){var n=this.survey&&!this.survey.areInvisibleElementsShowing&&this.columnsVisibleIf?new s.ConditionRunner(this.columnsVisibleIf):null;this.filteredColumns=[];var r=i.ItemValue.runConditionsForItems(this.columns,this.filteredColumns,n,e,t,this.shouldRunColumnExpression());return this.filteredColumns.length===this.columns.length&&(this.filteredColumns=null),r},t.prototype.clearIncorrectValues=function(){var t=this.value;if(t){var n=null,r=!1,o=this.filteredRows?this.filteredRows:this.rows,a=this.filteredColumns?this.filteredColumns:this.columns;for(var s in t)i.ItemValue.getItemByValue(o,s)&&i.ItemValue.getItemByValue(a,t[s])?(null==n&&(n={}),n[s]=t[s]):r=!0;r&&(this.value=n),e.prototype.clearIncorrectValues.call(this)}},t.prototype.clearInvisibleValuesInRows=function(){if(!this.isEmpty()){for(var e=this.getUnbindValue(this.value),t=this.rows,n=0;n<t.length;n++){var r=t[n].value;e[r]&&!t[n].isVisible&&delete e[r]}this.isTwoValueEquals(e,this.value)||(this.value=e)}},t.prototype.restoreNewVisibleRowsValues=function(e){var t=this.filteredRows?this.filteredRows:this.rows,n=this.defaultValue,r=this.getUnbindValue(this.value),o=!1;for(var a in n)i.ItemValue.getItemByValue(t,a)&&!i.ItemValue.getItemByValue(e,a)&&(null==r&&(r={}),r[a]=n[a],o=!0);o&&(this.value=r)},t.prototype.needResponsiveWidth=function(){return!0},t.prototype.getTableCss=function(){return(new u.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.rootAlternateRows,this.alternateRows).append(this.cssClasses.rootVerticalAlignTop,"top"===this.verticalAlign).append(this.cssClasses.rootVerticalAlignMiddle,"middle"===this.verticalAlign).toString()},d([Object(a.property)({defaultValue:"middle"})],t.prototype,"verticalAlign",void 0),d([Object(a.property)({defaultValue:!1})],t.prototype,"alternateRows",void 0),t}(o.Question);a.Serializer.addClass("matrixbase",["columnsVisibleIf:condition","rowsVisibleIf:condition",{name:"showHeader:boolean",default:!0},{name:"verticalAlign",choices:["top","middle"],default:"middle"},{name:"alternateRows:boolean",default:!1}],void 0,"question")},"./src/multiSelectListModel.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"MultiSelectListModel",function(){return s});var r,i=n("./src/jsonobject.ts"),o=n("./src/list.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,void 0,o)||this;return a.onItemClick=function(e){if(a.isExpanded=!1,a.isItemSelected(e)){var t=a.selectedItems.splice(a.selectedItems.indexOf(e),1)[0];a.onSelectionChanged&&a.onSelectionChanged(t,"removed")}else a.selectedItems.push(e),a.onSelectionChanged&&a.onSelectionChanged(e,"added")},a.isItemDisabled=function(e){return void 0!==e.enabled&&!e.enabled},a.isItemSelected=function(e){return!!a.allowSelection&&a.selectedItems.filter(function(t){return t.id==e.id}).length>0},a.setSelectedItems(i||[]),a}return a(t,e),t.prototype.updateItemState=function(){var e=this;this.actions.forEach(function(t){var n=e.isItemSelected(t);t.active=n,t.visible=!e.hideSelectedItems||!n})},t.prototype.setSelectedItems=function(e){var t=this;this.selectedItems=e,this.updateItemState(),this.isEmpty=0===this.renderedActions.filter(function(e){return t.isItemVisible(e)}).length},t.prototype.initFocusedItem=function(){var e=this;this.hideSelectedItems||!this.selectedItems.length?this.focusFirstVisibleItem():this.selectedItems.length&&(this.focusedItem=this.visibleItems.filter(function(t){return t.id===e.selectedItems[0].id})[0])},t.prototype.selectFocusedItem=function(){e.prototype.selectFocusedItem.call(this),this.hideSelectedItems&&this.focusNextVisibleItem()},function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Object(i.property)()],t.prototype,"hideSelectedItems",void 0),t}(o.ListModel)},"./src/page.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"PageModel",function(){return u});var r,i=n("./src/jsonobject.ts"),o=n("./src/panel.ts"),a=n("./src/utils/cssClassBuilder.ts"),s=n("./src/settings.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t){void 0===t&&(t="");var n=e.call(this,t)||this;return n.hasShownValue=!1,n.timeSpent=0,n.locTitle.onGetTextCallback=function(e){return n.canShowPageNumber()&&e?n.num+". "+e:e},n.createLocalizableString("navigationTitle",n,!0),n.createLocalizableString("navigationDescription",n,!0),n}return l(t,e),t.prototype.getType=function(){return"page"},t.prototype.toString=function(){return this.name},Object.defineProperty(t.prototype,"isPage",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.canShowPageNumber=function(){return this.survey&&this.survey.showPageNumbers},t.prototype.canShowTitle=function(){return this.survey&&this.survey.showPageTitles},Object.defineProperty(t.prototype,"navigationTitle",{get:function(){return this.getLocalizableStringText("navigationTitle")},set:function(e){this.setLocalizableStringText("navigationTitle",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locNavigationTitle",{get:function(){return this.getLocalizableString("navigationTitle")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"navigationDescription",{get:function(){return this.getLocalizableStringText("navigationDescription")},set:function(e){this.setLocalizableStringText("navigationDescription",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locNavigationDescription",{get:function(){return this.getLocalizableString("navigationDescription")},enumerable:!1,configurable:!0}),t.prototype.navigationLocStrChanged=function(){this.locNavigationTitle.strChanged(),this.locNavigationDescription.strChanged()},Object.defineProperty(t.prototype,"passed",{get:function(){return this.getPropertyValue("passed",!1)},set:function(e){this.setPropertyValue("passed",e)},enumerable:!1,configurable:!0}),t.prototype.delete=function(){this.survey&&this.removeSelfFromList(this.survey.pages)},t.prototype.onFirstRendering=function(){this.wasShown||e.prototype.onFirstRendering.call(this)},Object.defineProperty(t.prototype,"visibleIndex",{get:function(){return this.getPropertyValue("visibleIndex",-1)},set:function(e){this.setPropertyValue("visibleIndex",e)},enumerable:!1,configurable:!0}),t.prototype.canRenderFirstRows=function(){return!this.isDesignMode||0==this.visibleIndex},Object.defineProperty(t.prototype,"isStarted",{get:function(){return this.survey&&this.survey.isPageStarted(this)},enumerable:!1,configurable:!0}),t.prototype.calcCssClasses=function(e){var t={page:{},pageTitle:"",pageDescription:"",row:"",rowMultiple:"",pageRow:""};return this.copyCssClasses(t.page,e.page),e.pageTitle&&(t.pageTitle=e.pageTitle),e.pageDescription&&(t.pageDescription=e.pageDescription),e.row&&(t.row=e.row),e.pageRow&&(t.pageRow=e.pageRow),e.rowMultiple&&(t.rowMultiple=e.rowMultiple),this.survey&&this.survey.updatePageCssClasses(this,t),t},Object.defineProperty(t.prototype,"cssTitle",{get:function(){return(new a.CssClassBuilder).append(this.cssClasses.page.title).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssRoot",{get:function(){return(new a.CssClassBuilder).append(this.cssClasses.page.root).append(this.cssClasses.page.emptyHeaderRoot,!(this.survey.renderedHasHeader||this.survey.isShowProgressBarOnTop&&!this.survey.isStaring)).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"navigationButtonsVisibility",{get:function(){return this.getPropertyValue("navigationButtonsVisibility")},set:function(e){this.setPropertyValue("navigationButtonsVisibility",e.toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wasShown",{get:function(){return this.hasShownValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasShown",{get:function(){return this.wasShown},enumerable:!1,configurable:!0}),t.prototype.setWasShown=function(e){if(e!=this.hasShownValue&&(this.hasShownValue=e,!this.isDesignMode&&!0===e)){for(var t=this.elements,n=0;n<t.length;n++)t[n].isPanel&&t[n].randomizeElements(this.areQuestionsRandomized);this.randomizeElements(this.areQuestionsRandomized)}},Object.defineProperty(t.prototype,"areQuestionsRandomized",{get:function(){return"random"==("default"==this.questionsOrder&&this.survey?this.survey.questionsOrder:this.questionsOrder)},enumerable:!1,configurable:!0}),t.prototype.scrollToTop=function(){this.survey&&this.survey.scrollElementToTop(this,null,this,this.id)},t.prototype.getPanels=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=new Array;return this.addPanelsIntoList(n,e,t),n},Object.defineProperty(t.prototype,"maxTimeToFinish",{get:function(){return this.getPropertyValue("maxTimeToFinish",0)},set:function(e){this.setPropertyValue("maxTimeToFinish",e)},enumerable:!1,configurable:!0}),t.prototype.onNumChanged=function(e){},t.prototype.onVisibleChanged=function(){this.isRandomizing||(e.prototype.onVisibleChanged.call(this),null!=this.survey&&this.survey.pageVisibilityChanged(this,this.isVisible))},t.prototype.getDragDropInfo=function(){return this.dragDropInfo},t.prototype.dragDropStart=function(e,t,n){void 0===n&&(n=-1),this.dragDropInfo=new o.DragDropInfo(e,t,n)},t.prototype.dragDropMoveTo=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),!this.dragDropInfo)return!1;if(this.dragDropInfo.destination=e,this.dragDropInfo.isBottom=t,this.dragDropInfo.isEdge=n,this.correctDragDropInfo(this.dragDropInfo),!this.dragDropCanDropTagert())return!1;if(!this.dragDropCanDropSource()||!this.dragDropAllowFromSurvey()){if(this.dragDropInfo.source){var r=this.dragDropFindRow(this.dragDropInfo.target);this.updateRowsRemoveElementFromRow(this.dragDropInfo.target,r)}return!1}return this.dragDropAddTarget(this.dragDropInfo),!0},t.prototype.correctDragDropInfo=function(e){if(e.destination){var t=e.destination.isPanel?e.destination:null;t&&(e.target.isLayoutTypeSupported(t.getChildrenLayoutType())||(e.isEdge=!0))}},t.prototype.dragDropAllowFromSurvey=function(){var e=this.dragDropInfo.destination;if(!e||!this.survey)return!0;var t=null,n=null,r=e.isPage||!this.dragDropInfo.isEdge&&e.isPanel?e:e.parent;if(!e.isPage){var i=e.parent;if(i){var o=i.elements,a=o.indexOf(e);a>-1&&(t=e,n=e,this.dragDropInfo.isBottom?t=a<o.length-1?o[a+1]:null:n=a>0?o[a-1]:null)}}return this.survey.dragAndDropAllow({target:this.dragDropInfo.target,source:this.dragDropInfo.source,parent:r,insertAfter:n,insertBefore:t})},t.prototype.dragDropFinish=function(e){if(void 0===e&&(e=!1),this.dragDropInfo){var t=this.dragDropInfo.target,n=this.dragDropInfo.source,r=this.dragDropInfo.destination,i=this.dragDropFindRow(t),o=this.dragDropGetElementIndex(t,i);this.updateRowsRemoveElementFromRow(t,i);var a=[],l=[];if(!e&&i){if(this.isDesignMode&&s.settings.supportCreatorV2){var u=n&&n.parent&&n.parent.dragDropFindRow(n);i.panel.elements[o]&&i.panel.elements[o].startWithNewLine&&i.elements.length>1&&i.panel.elements[o]===r&&(a.push(t),l.push(i.panel.elements[o])),!(t.startWithNewLine&&i.elements.length>1)||i.panel.elements[o]&&i.panel.elements[o].startWithNewLine||l.push(t),u&&u.elements[0]===n&&u.elements[1]&&a.push(u.elements[1]),i.elements.length<=1&&a.push(t),t.startWithNewLine&&i.elements.length>1&&i.elements[0]!==r&&l.push(t)}n&&n.parent&&(this.survey.startMovingQuestion(),i.panel==n.parent?(i.panel.dragDropMoveElement(n,t,o),o=-1):n.parent.removeElement(n)),o>-1&&i.panel.addElement(t,o),this.survey.stopMovingQuestion()}return a.map(function(e){e.startWithNewLine=!0}),l.map(function(e){e.startWithNewLine=!1}),this.dragDropInfo=null,e?null:t}},t.prototype.dragDropGetElementIndex=function(e,t){if(!t)return-1;var n=t.elements.indexOf(e);if(0==t.index)return n;var r=t.panel.rows[t.index-1];return n+t.panel.elements.indexOf(r.elements[r.elements.length-1])+1},t.prototype.dragDropCanDropTagert=function(){var e=this.dragDropInfo.destination;return!(e&&!e.isPage)||this.dragDropCanDropCore(this.dragDropInfo.target,e)},t.prototype.dragDropCanDropSource=function(){var e=this.dragDropInfo.source;if(!e)return!0;var t=this.dragDropInfo.destination;if(!this.dragDropCanDropCore(e,t))return!1;if(this.isDesignMode&&s.settings.supportCreatorV2){if(this.dragDropFindRow(e)!==this.dragDropFindRow(t)){if(!e.startWithNewLine&&t.startWithNewLine)return!0;if(e.startWithNewLine&&!t.startWithNewLine)return!0}var n=this.dragDropFindRow(t);if(n&&1==n.elements.length)return!0}return this.dragDropCanDropNotNext(e,t,this.dragDropInfo.isEdge,this.dragDropInfo.isBottom)},t.prototype.dragDropCanDropCore=function(e,t){if(!t)return!0;if(this.dragDropIsSameElement(t,e))return!1;if(e.isPanel){var n=e;if(n.containsElement(t)||n.getElementByName(t.name))return!1}return!0},t.prototype.dragDropCanDropNotNext=function(e,t,n,r){if(!t||t.isPanel&&!n)return!0;if(void 0===e.parent||e.parent!==t.parent)return!0;var i=e.parent,o=i.elements.indexOf(e),a=i.elements.indexOf(t);return a<o&&!r&&a--,r&&a++,o<a?a-o>1:o-a>0},t.prototype.dragDropIsSameElement=function(e,t){return e==t||e.name==t.name},t.prototype.ensureRowsVisibility=function(){e.prototype.ensureRowsVisibility.call(this),this.getPanels().forEach(function(e){return e.ensureRowsVisibility()})},function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Object(i.property)({defaultValue:-1,onSet:function(e,t){return t.onNumChanged(e)}})],t.prototype,"num",void 0),t}(o.PanelModelBase);i.Serializer.addClass("page",[{name:"navigationButtonsVisibility",default:"inherit",choices:["inherit","show","hide"]},{name:"maxTimeToFinish:number",default:0,minValue:0},{name:"navigationTitle",visibleIf:function(e){return!!e.survey&&"buttons"===e.survey.progressBarType},serializationProperty:"locNavigationTitle"},{name:"navigationDescription",visibleIf:function(e){return!!e.survey&&"buttons"===e.survey.progressBarType},serializationProperty:"locNavigationDescription"},{name:"title:text",serializationProperty:"locTitle"},{name:"description:text",serializationProperty:"locDescription"}],function(){return new u},"panelbase")},"./src/panel.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragDropInfo",function(){return g}),n.d(t,"QuestionRowModel",function(){return v}),n.d(t,"PanelModelBase",function(){return y}),n.d(t,"PanelModel",function(){return b});var r,i=n("./src/jsonobject.ts"),o=n("./src/helpers.ts"),a=n("./src/base.ts"),s=n("./src/survey-element.ts"),l=n("./src/question.ts"),u=n("./src/questionfactory.ts"),c=n("./src/error.ts"),d=n("./src/settings.ts"),h=n("./src/utils/utils.ts"),p=n("./src/utils/cssClassBuilder.ts"),f=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},g=function(e,t,n){void 0===n&&(n=-1),this.source=e,this.target=t,this.nestedPanelDepth=n},v=function(e){function t(n){var r=e.call(this)||this;return r.panel=n,r._scrollableParent=void 0,r._updateVisibility=void 0,r.idValue=t.getRowId(),r.visible=n.areInvisibleElementsShowing,r.createNewArray("elements"),r.createNewArray("visibleElements"),r}return f(t,e),t.getRowId=function(){return"pr_"+t.rowCounter++},t.prototype.startLazyRendering=function(e,t){var n=this;void 0===t&&(t=h.findScrollableParent),this._scrollableParent=t(e),this._scrollableParent===document.documentElement&&(this._scrollableParent=window);var r=this._scrollableParent.scrollHeight>this._scrollableParent.clientHeight;this.isNeedRender=!r,r&&(this._updateVisibility=function(){var t=Object(h.isElementVisible)(e,50);!n.isNeedRender&&t&&(n.isNeedRender=!0,n.stopLazyRendering())},setTimeout(function(){n._scrollableParent&&n._scrollableParent.addEventListener&&n._scrollableParent.addEventListener("scroll",n._updateVisibility),n.ensureVisibility()},10))},t.prototype.ensureVisibility=function(){this._updateVisibility&&this._updateVisibility()},t.prototype.stopLazyRendering=function(){this._scrollableParent&&this._updateVisibility&&this._scrollableParent.removeEventListener&&this._scrollableParent.removeEventListener("scroll",this._updateVisibility),this._scrollableParent=void 0,this._updateVisibility=void 0},t.prototype.setIsLazyRendering=function(e){this.isLazyRenderingValue=e,this.isNeedRender=!e},t.prototype.isLazyRendering=function(){return!0===this.isLazyRenderingValue},Object.defineProperty(t.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"elements",{get:function(){return this.getPropertyValue("elements")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleElements",{get:function(){return this.getPropertyValue("visibleElements")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this.getPropertyValue("visible",!0)},set:function(e){this.setPropertyValue("visible",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNeedRender",{get:function(){return this.getPropertyValue("isneedrender",!0)},set:function(e){this.setPropertyValue("isneedrender",e)},enumerable:!1,configurable:!0}),t.prototype.updateVisible=function(){var e=this.calcVisible();this.setWidth(),this.visible=e},t.prototype.addElement=function(e){this.elements.push(e),this.updateVisible()},Object.defineProperty(t.prototype,"index",{get:function(){return this.panel.rows.indexOf(this)},enumerable:!1,configurable:!0}),t.prototype.setWidth=function(){var e=this.visibleElements.length;if(0!=e){for(var t=1===this.visibleElements.length,n=0,r=[],i=0;i<this.elements.length;i++)if(this.setElementMaxMinWidth(a=this.elements[i]),a.isVisible){a.isSingleInRow=t;var o=this.getElementWidth(a);o&&(a.renderWidth=this.getRenderedWidthFromWidth(o),r.push(a)),a.rightIndent=n<e-1?1:0,n++}else a.renderWidth="";for(i=0;i<this.elements.length;i++){var a;!(a=this.elements[i]).isVisible||r.indexOf(a)>-1||(a.renderWidth=0==r.length?(100/e).toFixed(6)+"%":this.getRenderedCalcWidth(a,r,e))}}},t.prototype.setElementMaxMinWidth=function(e){e.width&&"string"==typeof e.width&&-1===e.width.indexOf("%")&&(e.minWidth=e.width,e.maxWidth=e.width)},t.prototype.getRenderedCalcWidth=function(e,t,n){for(var r="100%",i=0;i<t.length;i++)r+=" - "+t[i].renderWidth;var o=n-t.length;return o>1&&(r="("+r+")/"+o.toString()),"calc("+r+")"},t.prototype.getElementWidth=function(e){var t=e.width;return t&&"string"==typeof t?t.trim():""},t.prototype.getRenderedWidthFromWidth=function(e){return o.Helpers.isNumber(e)?e+"px":e},t.prototype.calcVisible=function(){for(var e=[],t=0;t<this.elements.length;t++)this.elements[t].isVisible&&e.push(this.elements[t]);return this.needToUpdateVisibleElements(e)&&this.setPropertyValue("visibleElements",e),e.length>0},t.prototype.needToUpdateVisibleElements=function(e){if(e.length!==this.visibleElements.length)return!0;for(var t=0;t<e.length;t++)if(e[t]!==this.visibleElements[t])return!0;return!1},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.stopLazyRendering()},t.prototype.getRowCss=function(){return(new p.CssClassBuilder).append(this.panel.cssClasses.row).append(this.panel.cssClasses.pageRow,this.panel.isPage).append(this.panel.cssClasses.rowMultiple,this.visibleElements.length>1).toString()},t.rowCounter=100,t}(a.Base),y=function(e){function t(n){void 0===n&&(n="");var r=e.call(this,n)||this;return r.isQuestionsReady=!1,r.questionsValue=new Array,r.isRandomizing=!1,r.createNewArray("rows"),r.elementsValue=r.createNewArray("elements",r.onAddElement.bind(r),r.onRemoveElement.bind(r)),r.id=t.getPanelId(),r.addExpressionProperty("visibleIf",function(e,t){r.visible=!0===t},function(e){return!r.areInvisibleElementsShowing}),r.addExpressionProperty("enableIf",function(e,t){r.readOnly=!1===t}),r.addExpressionProperty("requiredIf",function(e,t){r.isRequired=!0===t}),r.createLocalizableString("requiredErrorText",r),r.registerFunctionOnPropertyValueChanged("questionTitleLocation",function(){r.onVisibleChanged.bind(r),r.updateElementCss(!0)}),r.registerFunctionOnPropertiesValueChanged(["questionStartIndex","showQuestionNumbers"],function(){r.updateVisibleIndexes()}),r}return f(t,e),t.getPanelId=function(){return"sp_"+t.panelCounter++},t.prototype.getType=function(){return"panelbase"},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n),this.isDesignMode&&this.onVisibleChanged();for(var r=0;r<this.elements.length;r++)this.elements[r].setSurveyImpl(t,n)},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.updateDescriptionVisibility(this.description),this.markQuestionListDirty(),this.onRowsChanged()},Object.defineProperty(t.prototype,"hasTitle",{get:function(){return this.canShowTitle()&&this.title.length>0||this.showTitle&&this.isDesignMode&&d.settings.allowShowEmptyTitleInDesignMode},enumerable:!1,configurable:!0}),t.prototype.canShowTitle=function(){return!0},Object.defineProperty(t.prototype,"_showDescription",{get:function(){return this.survey&&this.survey.showPageTitles&&this.hasDescription||this.showDescription&&this.isDesignMode&&d.settings.allowShowEmptyTitleInDesignMode&&d.settings.allowShowEmptyDescriptionInDesignMode},enumerable:!1,configurable:!0}),t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this);for(var t=0;t<this.elements.length;t++)this.elements[t].localeChanged()},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this);for(var t=0;t<this.elements.length;t++)this.elements[t].locStrsChanged()},Object.defineProperty(t.prototype,"requiredText",{get:function(){return null!=this.survey&&this.isRequired?this.survey.requiredText:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titlePattern",{get:function(){return this.survey?this.survey.questionTitlePattern:"numTitleRequire"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequireTextOnStart",{get:function(){return this.isRequired&&"requireNumTitle"==this.titlePattern},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequireTextBeforeTitle",{get:function(){return this.isRequired&&"numRequireTitle"==this.titlePattern},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequireTextAfterTitle",{get:function(){return this.isRequired&&"numTitleRequire"==this.titlePattern},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredErrorText",{get:function(){return this.getLocalizableStringText("requiredErrorText")},set:function(e){this.setLocalizableStringText("requiredErrorText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locRequiredErrorText",{get:function(){return this.getLocalizableString("requiredErrorText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionsOrder",{get:function(){return this.getPropertyValue("questionsOrder")},set:function(e){this.setPropertyValue("questionsOrder",e)},enumerable:!1,configurable:!0}),t.prototype.canRandomize=function(e){return e&&"initial"!==this.questionsOrder||"random"===this.questionsOrder},t.prototype.randomizeElements=function(e){if(this.canRandomize(e)&&!this.isRandomizing){this.isRandomizing=!0;for(var t=[],n=this.elements,r=0;r<n.length;r++)t.push(n[r]);var i=o.Helpers.randomizeArray(t);this.setArrayPropertyDirectly("elements",i,!1),this.updateRows(),this.updateVisibleIndexes(),this.isRandomizing=!1}},Object.defineProperty(t.prototype,"parent",{get:function(){return this.getPropertyValue("parent",null)},set:function(e){this.setPropertyValue("parent",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depth",{get:function(){return null==this.parent?0:this.parent.depth+1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleIf",{get:function(){return this.getPropertyValue("visibleIf","")},set:function(e){this.setPropertyValue("visibleIf",e)},enumerable:!1,configurable:!0}),t.prototype.calcCssClasses=function(e){var t={panel:{},error:{},row:"",rowMultiple:""};return this.copyCssClasses(t.panel,e.panel),this.copyCssClasses(t.error,e.error),e.row&&(t.row=e.row),e.rowMultiple&&(t.rowMultiple=e.rowMultiple),this.survey&&this.survey.updatePanelCssClasses(this,t),t},Object.defineProperty(t.prototype,"id",{get:function(){return this.getPropertyValue("id")},set:function(e){this.setPropertyValue("id",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPanel",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getPanel=function(){return this},t.prototype.getLayoutType=function(){return"row"},t.prototype.isLayoutTypeSupported=function(e){return"flow"!==e},Object.defineProperty(t.prototype,"questions",{get:function(){if(!this.isQuestionsReady){this.questionsValue=[];for(var e=0;e<this.elements.length;e++){var t=this.elements[e];if(t.isPanel)for(var n=t.questions,r=0;r<n.length;r++)this.questionsValue.push(n[r]);else this.questionsValue.push(t)}this.isQuestionsReady=!0}return this.questionsValue},enumerable:!1,configurable:!0}),t.prototype.getValidName=function(e){return e?e.trim():e},t.prototype.getQuestionByName=function(e){for(var t=this.questions,n=0;n<t.length;n++)if(t[n].name==e)return t[n];return null},t.prototype.getElementByName=function(e){for(var t=this.elements,n=0;n<t.length;n++){var r=t[n];if(r.name==e)return r;var i=r.getPanel();if(i){var o=i.getElementByName(e);if(o)return o}}return null},t.prototype.getQuestionByValueName=function(e){for(var t=this.questions,n=0;n<t.length;n++)if(t[n].getValueName()==e)return t[n];return null},t.prototype.getValue=function(){for(var e={},t=this.questions,n=0;n<t.length;n++){var r=t[n];if(!r.isEmpty()){var i=r.getValueName();if(e[i]=r.value,this.data){var o=this.data.getComment(i);o&&(e[i+d.settings.commentPrefix]=o)}}}return e},t.prototype.getDisplayValue=function(e){for(var t={},n=this.questions,r=0;r<n.length;r++){var i=n[r];i.isEmpty()||(t[e?i.title:i.getValueName()]=i.getDisplayValue(e))}return t},t.prototype.getComments=function(){var e={};if(!this.data)return e;for(var t=this.questions,n=0;n<t.length;n++){var r=t[n],i=this.data.getComment(r.getValueName());i&&(e[r.getValueName()]=i)}return e},t.prototype.clearIncorrectValues=function(){for(var e=0;e<this.elements.length;e++)this.elements[e].clearIncorrectValues()},t.prototype.clearErrors=function(){for(var e=0;e<this.elements.length;e++)this.elements[e].clearErrors();this.errors=[]},t.prototype.markQuestionListDirty=function(){this.isQuestionsReady=!1,this.parent&&this.parent.markQuestionListDirty()},Object.defineProperty(t.prototype,"elements",{get:function(){return this.elementsValue},enumerable:!1,configurable:!0}),t.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),this.elements},t.prototype.containsElement=function(e){for(var t=0;t<this.elements.length;t++){var n=this.elements[t];if(n==e)return!0;var r=n.getPanel();if(r&&r.containsElement(e))return!0}return!1},Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.getPropertyValue("isRequired",!1)},set:function(e){this.setPropertyValue("isRequired",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredIf",{get:function(){return this.getPropertyValue("requiredIf","")},set:function(e){this.setPropertyValue("requiredIf",e)},enumerable:!1,configurable:!0}),t.prototype.searchText=function(t,n){e.prototype.searchText.call(this,t,n);for(var r=0;r<this.elements.length;r++)this.elements[r].searchText(t,n)},t.prototype.hasErrors=function(e,t,n){return void 0===e&&(e=!0),void 0===t&&(t=!1),void 0===n&&(n=null),this.hasErrorsCore(n=n||{fireCallback:e,focuseOnFirstError:t,firstErrorQuestion:null,result:!1}),n.firstErrorQuestion&&n.firstErrorQuestion.focus(!0),n.result},t.prototype.hasErrorsInPanels=function(e){var t=[];if(this.hasRequiredError(e,t),this.survey){var n=this.survey.validatePanel(this);n&&(t.push(n),e.result=!0)}e.fireCallback&&(this.survey&&this.survey.beforeSettingPanelErrors(this,t),this.errors=t)},t.prototype.getErrorCustomText=function(e,t){return this.survey?this.survey.getSurveyErrorCustomText(this,e,t):e},t.prototype.hasRequiredError=function(e,t){if(this.isRequired){var n=[];if(this.addQuestionsToList(n,!0),0!=n.length){for(var r=0;r<n.length;r++)if(!n[r].isEmpty())return;e.result=!0,t.push(new c.OneAnswerRequiredError(this.requiredErrorText,this)),e.focuseOnFirstError&&!e.firstErrorQuestion&&(e.firstErrorQuestion=n[0])}}},t.prototype.hasErrorsCore=function(e){for(var t=this.elements,n=null,r=0;r<t.length;r++)if((n=t[r]).isVisible)if(n.isPanel)n.hasErrorsCore(e);else{var i=n;if(i.isReadOnly)continue;i.hasErrors(e.fireCallback,e)&&(e.focuseOnFirstError&&null==e.firstErrorQuestion&&(e.firstErrorQuestion=i),e.result=!0)}this.hasErrorsInPanels(e),this.updateContainsErrors()},t.prototype.getContainsErrors=function(){var t=e.prototype.getContainsErrors.call(this);if(t)return t;for(var n=this.elements,r=0;r<n.length;r++)if(n[r].containsErrors)return!0;return!1},t.prototype.updateElementVisibility=function(){for(var e=0;e<this.elements.length;e++){var t=this.elements[e];t.setPropertyValue("isVisible",t.isVisible),t.isPanel&&t.updateElementVisibility()}},t.prototype.getFirstQuestionToFocus=function(e){void 0===e&&(e=!1);for(var t=this.elements,n=0;n<t.length;n++){var r=t[n];if(r.isVisible)if(r.isPanel){var i=r.getFirstQuestionToFocus(e);if(i)return i}else{var o=r.getFirstQuestionToFocus(e);if(o)return o}}return null},t.prototype.focusFirstQuestion=function(){var e=this.getFirstQuestionToFocus();e&&e.focus()},t.prototype.focusFirstErrorQuestion=function(){var e=this.getFirstQuestionToFocus(!0);e&&e.focus()},t.prototype.addQuestionsToList=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.addElementsToList(e,t,n,!1)},t.prototype.addPanelsIntoList=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.addElementsToList(e,t,n,!0)},t.prototype.addElementsToList=function(e,t,n,r){t&&!this.visible||this.addElementsToListCore(e,this.elements,t,n,r)},t.prototype.addElementsToListCore=function(e,t,n,r,i){for(var o=0;o<t.length;o++){var a=t[o];n&&!a.visible||((i&&a.isPanel||!i&&!a.isPanel)&&e.push(a),a.isPanel?a.addElementsToListCore(e,a.elements,n,r,i):r&&this.addElementsToListCore(e,a.getElementsInDesign(!1),n,r,i))}},Object.defineProperty(t.prototype,"isActive",{get:function(){return!this.survey||this.survey.currentPage==this.root},enumerable:!1,configurable:!0}),t.prototype.updateCustomWidgets=function(){for(var e=0;e<this.elements.length;e++)this.elements[e].updateCustomWidgets()},Object.defineProperty(t.prototype,"questionTitleLocation",{get:function(){return this.getPropertyValue("questionTitleLocation")},set:function(e){this.setPropertyValue("questionTitleLocation",e.toLowerCase())},enumerable:!1,configurable:!0}),t.prototype.getQuestionTitleLocation=function(){return this.onGetQuestionTitleLocation?this.onGetQuestionTitleLocation():"default"!=this.questionTitleLocation?this.questionTitleLocation:this.parent?this.parent.getQuestionTitleLocation():this.survey?this.survey.questionTitleLocation:"top"},t.prototype.getStartIndex=function(){return this.parent?this.parent.getQuestionStartIndex():this.survey?this.survey.questionStartIndex:""},t.prototype.getQuestionStartIndex=function(){return this.getStartIndex()},t.prototype.getChildrenLayoutType=function(){return"row"},t.prototype.getProgressInfo=function(){return s.SurveyElement.getProgressInfoByElements(this.elements,this.isRequired)},Object.defineProperty(t.prototype,"root",{get:function(){for(var e=this;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),t.prototype.childVisibilityChanged=function(){this.getIsPageVisible(null)!==this.getPropertyValue("isVisible",!0)&&this.onVisibleChanged()},t.prototype.createRowAndSetLazy=function(e){var t=this.createRow();return t.setIsLazyRendering(this.isLazyRenderInRow(e)),t},t.prototype.createRow=function(){return new v(this)},t.prototype.onSurveyLoad=function(){for(var e=0;e<this.elements.length;e++)this.elements[e].onSurveyLoad();this.onElementVisibilityChanged(this)},t.prototype.onFirstRendering=function(){e.prototype.onFirstRendering.call(this);for(var t=0;t<this.elements.length;t++)this.elements[t].onFirstRendering();this.onRowsChanged()},t.prototype.updateRows=function(){if(!this.isLoadingFromJson){for(var e=0;e<this.elements.length;e++)this.elements[e].isPanel&&this.elements[e].updateRows();this.onRowsChanged()}},Object.defineProperty(t.prototype,"rows",{get:function(){return this.getPropertyValue("rows")},enumerable:!1,configurable:!0}),t.prototype.ensureRowsVisibility=function(){this.rows.forEach(function(e){e.ensureVisibility()})},t.prototype.onRowsChanged=function(){this.isLoadingFromJson||this.setArrayPropertyDirectly("rows",this.buildRows())},t.prototype.onAddElement=function(e,t){e.setSurveyImpl(this.surveyImpl),e.parent=this,this.markQuestionListDirty(),this.updateRowsOnElementAdded(e,t),e.isPanel?this.survey&&this.survey.panelAdded(e,t,this,this.root):this.survey&&this.survey.questionAdded(e,t,this,this.root),this.addElementCallback&&this.addElementCallback(e);var n=this;e.registerFunctionOnPropertiesValueChanged(["visible","isVisible"],function(){n.onElementVisibilityChanged(e)},this.id),e.registerFunctionOnPropertyValueChanged("startWithNewLine",function(){n.onElementStartWithNewLineChanged(e)},this.id),this.onElementVisibilityChanged(this)},t.prototype.onRemoveElement=function(e){e.parent=null,this.markQuestionListDirty(),e.unRegisterFunctionOnPropertiesValueChanged(["visible","isVisible","startWithNewLine"],this.id),this.updateRowsOnElementRemoved(e),this.isRandomizing||(e.isPanel?this.survey&&this.survey.panelRemoved(e):this.survey&&this.survey.questionRemoved(e),this.removeElementCallback&&this.removeElementCallback(e),this.onElementVisibilityChanged(this))},t.prototype.onElementVisibilityChanged=function(e){this.isLoadingFromJson||this.isRandomizing||(this.updateRowsVisibility(e),this.childVisibilityChanged(),this.parent&&this.parent.onElementVisibilityChanged(this))},t.prototype.onElementStartWithNewLineChanged=function(e){this.onRowsChanged()},t.prototype.updateRowsVisibility=function(e){for(var t=this.rows,n=0;n<t.length;n++){var r=t[n];if(r.elements.indexOf(e)>-1){r.updateVisible(),r.visible&&!r.isNeedRender&&(r.isNeedRender=!0);break}}},t.prototype.canBuildRows=function(){return!this.isLoadingFromJson&&"row"==this.getChildrenLayoutType()},t.prototype.buildRows=function(){if(!this.canBuildRows())return[];for(var e=new Array,t=0;t<this.elements.length;t++){var n=this.elements[t],r=0==t||n.startWithNewLine,i=r?this.createRowAndSetLazy(e.length):e[e.length-1];r&&e.push(i),i.addElement(n)}for(t=0;t<e.length;t++)e[t].updateVisible();return e},t.prototype.isLazyRenderInRow=function(e){return!(!this.survey||!this.survey.isLazyRendering)&&(e>=d.settings.lazyRowsRenderingStartRow||!this.canRenderFirstRows())},t.prototype.canRenderFirstRows=function(){return this.isPage},t.prototype.getDragDropInfo=function(){var e=this.getPage(this.parent);return e?e.getDragDropInfo():void 0},t.prototype.updateRowsOnElementAdded=function(e,t){if(this.canBuildRows()){var n=d.settings.supportCreatorV2?this.getDragDropInfo():void 0;n||((n=new g(null,e)).target=e,n.isEdge=this.elements.length>1,this.elements.length<2?n.destination=this:(n.isBottom=t>0,n.destination=0==t?this.elements[1]:this.elements[t-1])),this.dragDropAddTargetToRow(n,null)}},t.prototype.updateRowsOnElementRemoved=function(e){this.canBuildRows()&&this.updateRowsRemoveElementFromRow(e,this.findRowByElement(e))},t.prototype.updateRowsRemoveElementFromRow=function(e,t){if(t&&t.panel){var n=t.elements.indexOf(e);n<0||(t.elements.splice(n,1),t.elements.length>0?(t.elements[0].startWithNewLine=!0,t.updateVisible()):t.index>=0&&t.panel.rows.splice(t.index,1))}},t.prototype.findRowByElement=function(e){for(var t=this.rows,n=0;n<t.length;n++)if(t[n].elements.indexOf(e)>-1)return t[n];return null},t.prototype.elementWidthChanged=function(e){if(!this.isLoadingFromJson){var t=this.findRowByElement(e);t&&t.updateVisible()}},Object.defineProperty(t.prototype,"processedTitle",{get:function(){return this.getRenderedTitle(this.locTitle.textOrHtml)},enumerable:!1,configurable:!0}),t.prototype.getRenderedTitle=function(e){return null!=this.textProcessor?this.textProcessor.processText(e,!0):e},Object.defineProperty(t.prototype,"visible",{get:function(){return this.getPropertyValue("visible",!0)},set:function(e){e!==this.visible&&(this.setPropertyValue("visible",e),this.setPropertyValue("isVisible",this.isVisible),this.isLoadingFromJson||this.onVisibleChanged())},enumerable:!1,configurable:!0}),t.prototype.onVisibleChanged=function(){if(!this.isRandomizing&&(this.setPropertyValue("isVisible",this.isVisible),this.survey&&this.survey.isClearValueOnHiddenContainer&&!this.isLoadingFromJson))for(var e=this.questions,t=0;t<e.length;t++)this.isVisible?e[t].updateValueWithDefaults():e[t].clearValueIfInvisible()},Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.areInvisibleElementsShowing||this.getIsPageVisible(null)},enumerable:!1,configurable:!0}),t.prototype.getIsPageVisible=function(e){if(!this.visible)return!1;for(var t=0;t<this.elements.length;t++)if(this.elements[t]!=e&&this.elements[t].isVisible)return!0;return!1},t.prototype.setVisibleIndex=function(e){if(!this.isVisible||e<0)return this.resetVisibleIndexes(),0;this.lastVisibleIndex=e;var t=e;e+=this.beforeSetVisibleIndex(e);for(var n=this.getPanelStartIndex(e),r=n,i=0;i<this.elements.length;i++)r+=this.elements[i].setVisibleIndex(r);return this.isContinueNumbering()&&(e+=r-n),e-t},t.prototype.updateVisibleIndexes=function(){void 0!==this.lastVisibleIndex&&(this.resetVisibleIndexes(),this.setVisibleIndex(this.lastVisibleIndex))},t.prototype.resetVisibleIndexes=function(){for(var e=0;e<this.elements.length;e++)this.elements[e].setVisibleIndex(-1)},t.prototype.beforeSetVisibleIndex=function(e){return 0},t.prototype.getPanelStartIndex=function(e){return e},t.prototype.isContinueNumbering=function(){return!0},Object.defineProperty(t.prototype,"isReadOnly",{get:function(){return this.readOnly||!!this.parent&&this.parent.isReadOnly||!!this.survey&&this.survey.isDisplayMode},enumerable:!1,configurable:!0}),t.prototype.onReadOnlyChanged=function(){for(var t=0;t<this.elements.length;t++){var n=this.elements[t];n.setPropertyValue("isReadOnly",n.isReadOnly)}e.prototype.onReadOnlyChanged.call(this)},t.prototype.updateElementCss=function(t){e.prototype.updateElementCss.call(this,t);for(var n=0;n<this.elements.length;n++)this.elements[n].updateElementCss(t)},Object.defineProperty(t.prototype,"enableIf",{get:function(){return this.getPropertyValue("enableIf","")},set:function(e){this.setPropertyValue("enableIf",e)},enumerable:!1,configurable:!0}),t.prototype.addElement=function(e,t){return void 0===t&&(t=-1),!!this.canAddElement(e)&&(t<0||t>=this.elements.length?this.elements.push(e):this.elements.splice(t,0,e),!0)},t.prototype.insertElementAfter=function(e,t){var n=this.elements.indexOf(t);n>=0&&this.addElement(e,n+1)},t.prototype.insertElementBefore=function(e,t){var n=this.elements.indexOf(t);n>=0&&this.addElement(e,n)},t.prototype.canAddElement=function(e){return!!e&&e.isLayoutTypeSupported(this.getChildrenLayoutType())},t.prototype.addQuestion=function(e,t){return void 0===t&&(t=-1),this.addElement(e,t)},t.prototype.addPanel=function(e,t){return void 0===t&&(t=-1),this.addElement(e,t)},t.prototype.addNewQuestion=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=-1);var r=u.QuestionFactory.Instance.createQuestion(e,t);return this.addQuestion(r,n)?r:null},t.prototype.addNewPanel=function(e){void 0===e&&(e=null);var t=this.createNewPanel(e);return this.addPanel(t)?t:null},t.prototype.indexOf=function(e){return this.elements.indexOf(e)},t.prototype.createNewPanel=function(e){var t=i.Serializer.createClass("panel");return t.name=e,t},t.prototype.removeElement=function(e){var t=this.elements.indexOf(e);if(t<0){for(var n=0;n<this.elements.length;n++)if(this.elements[n].removeElement(e))return!0;return!1}return this.elements.splice(t,1),!0},t.prototype.removeQuestion=function(e){this.removeElement(e)},t.prototype.runCondition=function(e,t){if(!this.isDesignMode&&!this.isLoadingFromJson){for(var n=this.elements.slice(),r=0;r<n.length;r++)n[r].runCondition(e,t);this.runConditionCore(e,t)}},t.prototype.onAnyValueChanged=function(e){for(var t=this.elements,n=0;n<t.length;n++)t[n].onAnyValueChanged(e)},t.prototype.checkBindings=function(e,t){for(var n=this.elements,r=0;r<n.length;r++)n[r].checkBindings(e,t)},t.prototype.dragDropAddTarget=function(e){var t=this.dragDropFindRow(e.target);this.dragDropAddTargetToRow(e,t)&&this.updateRowsRemoveElementFromRow(e.target,t)},t.prototype.dragDropFindRow=function(e){if(!e||e.isPage)return null;for(var t=e,n=this.rows,r=0;r<n.length;r++)if(n[r].elements.indexOf(t)>-1)return n[r];for(r=0;r<this.elements.length;r++){var i=this.elements[r].getPanel();if(i){var o=i.dragDropFindRow(t);if(o)return o}}return null},t.prototype.dragDropAddTargetToRow=function(e,t){if(!e.destination)return!0;if(this.dragDropAddTargetToEmptyPanel(e))return!0;var n=this.dragDropFindRow(e.destination);return!n||(d.settings.supportCreatorV2&&this.isDesignMode?n.elements.length>1?this.dragDropAddTargetToExistingRow(e,n,t):this.dragDropAddTargetToNewRow(e,n,t):e.target.startWithNewLine?this.dragDropAddTargetToNewRow(e,n,t):this.dragDropAddTargetToExistingRow(e,n,t))},t.prototype.dragDropAddTargetToEmptyPanel=function(e){if(e.destination.isPage)return this.dragDropAddTargetToEmptyPanelCore(this.root,e.target,e.isBottom),!0;var t=e.destination;if(t.isPanel&&!e.isEdge){if(e.target.template===t)return!1;if(e.nestedPanelDepth<0||e.nestedPanelDepth>=t.depth)return this.dragDropAddTargetToEmptyPanelCore(t,e.target,e.isBottom),!0}return!1},t.prototype.dragDropAddTargetToExistingRow=function(e,t,n){var r=t.elements.indexOf(e.destination);if(0==r&&!e.isBottom)if(this.isDesignMode&&d.settings.supportCreatorV2);else if(t.elements[0].startWithNewLine)return t.index>0?(e.isBottom=!0,e.destination=(t=t.panel.rows[t.index-1]).elements[t.elements.length-1],this.dragDropAddTargetToExistingRow(e,t,n)):this.dragDropAddTargetToNewRow(e,t,n);var i=-1;n==t&&(i=t.elements.indexOf(e.target)),e.isBottom&&r++;var o=this.findRowByElement(e.source);return(o!=t||o.elements.indexOf(e.source)!=r)&&r!=i&&(i>-1&&(t.elements.splice(i,1),i<r&&r--),t.elements.splice(r,0,e.target),t.updateVisible(),i<0)},t.prototype.dragDropAddTargetToNewRow=function(e,t,n){var r=t.panel.createRowAndSetLazy(t.panel.rows.length);this.isDesignMode&&d.settings.supportCreatorV2&&r.setIsLazyRendering(!1),r.addElement(e.target);var i=t.index;if(e.isBottom&&i++,n&&n.panel==r.panel&&n.index==i)return!1;var o=this.findRowByElement(e.source);return!(o&&o.panel==r.panel&&1==o.elements.length&&o.index==i||(t.panel.rows.splice(i,0,r),0))},t.prototype.dragDropAddTargetToEmptyPanelCore=function(e,t,n){var r=e.createRow();r.addElement(t),0==e.elements.length||n?e.rows.push(r):e.rows.splice(0,0,r)},t.prototype.dragDropMoveElement=function(e,t,n){n>e.parent.elements.indexOf(e)&&n--,this.removeElement(e),this.addElement(t,n)},t.prototype.needResponsiveWidth=function(){var e=!1;return this.elements.forEach(function(t){t.needResponsiveWidth()&&(e=!0)}),this.rows.forEach(function(t){t.elements.length>1&&(e=!0)}),e},Object.defineProperty(t.prototype,"hasDescriptionUnderTitle",{get:function(){return this.hasDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssHeader",{get:function(){return this.cssClasses.panel.header},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssDescription",{get:function(){return this.cssClasses.panel.description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"no",{get:function(){return""},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){if(e.prototype.dispose.call(this),this.rows){for(var t=0;t<this.rows.length;t++)this.rows[t].dispose();this.rows.splice(0,this.rows.length)}for(t=0;t<this.elements.length;t++)this.elements[t].dispose();this.elements.splice(0,this.elements.length)},t.panelCounter=100,m([Object(i.property)({defaultValue:!0})],t.prototype,"showTitle",void 0),m([Object(i.property)({defaultValue:!0})],t.prototype,"showDescription",void 0),t}(s.SurveyElement),b=function(e){function t(t){void 0===t&&(t="");var n=e.call(this,t)||this;n.focusIn=function(){n.survey.whenPanelFocusIn(n)};var r=n;return n.createNewArray("footerActions"),n.registerFunctionOnPropertyValueChanged("width",function(){r.parent&&r.parent.elementWidthChanged(r)}),n.registerFunctionOnPropertiesValueChanged(["indent","innerIndent","rightIndent"],function(){r.onIndentChanged()}),n}return f(t,e),t.prototype.getType=function(){return"panel"},Object.defineProperty(t.prototype,"contentId",{get:function(){return this.id+"_content"},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(t){return void 0===t&&(t=!1),t?this.parent?this.parent.getSurvey(t):null:e.prototype.getSurvey.call(this,t)},t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.onIndentChanged()},t.prototype.onSetData=function(){e.prototype.onSetData.call(this),this.onIndentChanged()},Object.defineProperty(t.prototype,"isPanel",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.getPage(this.parent)},set:function(e){this.setPage(this.parent,e)},enumerable:!1,configurable:!0}),t.prototype.delete=function(){this.parent&&this.removeSelfFromList(this.parent.elements)},t.prototype.moveTo=function(e,t){return void 0===t&&(t=null),this.moveToBase(this.parent,e,t)},Object.defineProperty(t.prototype,"visibleIndex",{get:function(){return this.getPropertyValue("visibleIndex",-1)},enumerable:!1,configurable:!0}),t.prototype.getTitleOwner=function(){return this},Object.defineProperty(t.prototype,"showNumber",{get:function(){return this.getPropertyValue("showNumber",!1)},set:function(e){this.setPropertyValue("showNumber",e),this.notifySurveyOnVisibilityChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showQuestionNumbers",{get:function(){return this.getPropertyValue("showQuestionNumbers")},set:function(e){this.setPropertyValue("showQuestionNumbers",e),this.notifySurveyOnVisibilityChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionStartIndex",{get:function(){return this.getPropertyValue("questionStartIndex","")},set:function(e){this.setPropertyValue("questionStartIndex",e)},enumerable:!1,configurable:!0}),t.prototype.getQuestionStartIndex=function(){return this.questionStartIndex?this.questionStartIndex:e.prototype.getQuestionStartIndex.call(this)},Object.defineProperty(t.prototype,"no",{get:function(){return this.getPropertyValue("no","")},enumerable:!1,configurable:!0}),t.prototype.setNo=function(e){this.setPropertyValue("no",o.Helpers.getNumberByIndex(this.visibleIndex,this.getStartIndex()))},t.prototype.beforeSetVisibleIndex=function(e){var t=-1;return!this.showNumber||!this.isDesignMode&&this.locTitle.isEmpty||(t=e),this.setPropertyValue("visibleIndex",t),this.setNo(t),t<0?0:1},t.prototype.getPanelStartIndex=function(e){return"off"==this.showQuestionNumbers?-1:"onpanel"==this.showQuestionNumbers?0:e},t.prototype.isContinueNumbering=function(){return"off"!=this.showQuestionNumbers&&"onpanel"!=this.showQuestionNumbers},t.prototype.notifySurveyOnVisibilityChanged=function(){null==this.survey||this.isLoadingFromJson||this.survey.panelVisibilityChanged(this,this.isVisible)},t.prototype.hasErrorsCore=function(t){e.prototype.hasErrorsCore.call(this,t),this.isCollapsed&&t.result&&t.fireCallback&&this.expand()},t.prototype.getRenderedTitle=function(t){if(!t){if(this.isCollapsed||this.isExpanded)return this.name;if(this.isDesignMode)return"["+this.name+"]"}return e.prototype.getRenderedTitle.call(this,t)},Object.defineProperty(t.prototype,"innerIndent",{get:function(){return this.getPropertyValue("innerIndent")},set:function(e){this.setPropertyValue("innerIndent",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startWithNewLine",{get:function(){return this.getPropertyValue("startWithNewLine")},set:function(e){this.setPropertyValue("startWithNewLine",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAdaptiveActions",{get:function(){return this.getPropertyValue("allowAdaptiveActions")},set:function(e){this.setPropertyValue("allowAdaptiveActions",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerPaddingLeft",{get:function(){return this.getPropertyValue("innerPaddingLeft","")},set:function(e){this.setPropertyValue("innerPaddingLeft",e)},enumerable:!1,configurable:!0}),t.prototype.onIndentChanged=function(){this.getSurvey()&&(this.innerPaddingLeft=this.getIndentSize(this.innerIndent),this.paddingLeft=this.getIndentSize(this.indent),this.paddingRight=this.getIndentSize(this.rightIndent))},t.prototype.getIndentSize=function(e){if(e<1)return"";var t=this.survey.css;return t&&t.question.indent?e*t.question.indent+"px":""},t.prototype.clearOnDeletingContainer=function(){this.elements.forEach(function(e){(e instanceof l.Question||e instanceof t)&&e.clearOnDeletingContainer()})},Object.defineProperty(t.prototype,"footerActions",{get:function(){return this.getPropertyValue("footerActions")},enumerable:!1,configurable:!0}),t.prototype.getFooterToolbar=function(){var e=this;if(!this.footerToolbarValue){var t=this.footerActions;this.hasEditButton&&t.push({id:"cancel-preview",title:this.survey.editText,innerCss:this.survey.cssNavigationEdit,action:function(){e.cancelPreview()}}),this.footerToolbarValue=this.createActionContainer(this.allowAdaptiveActions),this.cssClasses.panel&&(this.footerToolbarValue.containerCss=this.cssClasses.panel.footer),this.footerToolbarValue.setItems(t)}return this.footerToolbarValue},Object.defineProperty(t.prototype,"hasEditButton",{get:function(){return!(!this.survey||"preview"!==this.survey.state)&&1===this.depth},enumerable:!1,configurable:!0}),t.prototype.cancelPreview=function(){this.hasEditButton&&this.survey.cancelPreviewByPage(this)},Object.defineProperty(t.prototype,"cssTitle",{get:function(){return(new p.CssClassBuilder).append(this.cssClasses.panel.title).append(this.cssClasses.panel.titleExpandable,"default"!==this.state).append(this.cssClasses.panel.titleExpanded,this.isExpanded).append(this.cssClasses.panel.titleCollapsed,this.isCollapsed).append(this.cssClasses.panel.titleOnError,this.containsErrors).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssError",{get:function(){return this.getCssError(this.cssClasses)},enumerable:!1,configurable:!0}),t.prototype.getCssError=function(e){var t=(new p.CssClassBuilder).append(this.cssClasses.error.root);return t.append("panel-error-root",t.isEmpty()).toString()},t.prototype.onVisibleChanged=function(){e.prototype.onVisibleChanged.call(this),this.notifySurveyOnVisibilityChanged()},t.prototype.needResponsiveWidth=function(){return!this.startWithNewLine||e.prototype.needResponsiveWidth.call(this)},t.prototype.getContainerCss=function(){return(new p.CssClassBuilder).append(this.cssClasses.panel.container).append(this.cssClasses.panel.withFrame,this.hasFrameV2).append(this.cssClasses.panel.nested,!(!(this.parent&&this.parent.isPanel||!this.isSingleInRow)||this.isDesignMode)).append(this.cssClasses.panel.collapsed,!!this.isCollapsed).append(this.cssClasses.panel.expanded,!!this.isExpanded).append(this.cssClasses.panel.invisible,!this.isDesignMode&&this.areInvisibleElementsShowing&&!this.visible).toString()},t}(y);i.Serializer.addClass("panelbase",["name",{name:"elements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"visible:switch",default:!0},"visibleIf:condition","enableIf:condition","requiredIf:condition","readOnly:boolean",{name:"questionTitleLocation",default:"default",choices:["default","top","bottom","left","hidden"]},{name:"title:text",serializationProperty:"locTitle"},{name:"description:text",serializationProperty:"locDescription"},{name:"questionsOrder",default:"default",choices:["default","initial","random"]}],function(){return new y}),i.Serializer.addClass("panel",[{name:"state",default:"default",choices:["default","collapsed","expanded"]},"isRequired:switch",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"startWithNewLine:boolean",default:!0},"width",{name:"minWidth",default:"auto"},{name:"maxWidth",default:d.settings.maxWidth},{name:"innerIndent:number",default:0,choices:[0,1,2,3]},{name:"indent:number",default:0,choices:[0,1,2,3]},{name:"page",isSerializable:!1,visibleIf:function(e){var t=e?e.survey:null;return!t||!t.pages||t.pages.length>1},choices:function(e){var t=e?e.survey:null;return t?t.pages.map(function(e){return{value:e.name,text:e.title}}):[]}},"showNumber:boolean",{name:"showQuestionNumbers",default:"default",choices:["default","onpanel","off"]},"questionStartIndex",{name:"allowAdaptiveActions:boolean",default:!0,visible:!1}],function(){return new b},"panelbase"),u.ElementFactory.Instance.registerElement("panel",function(e){return new b(e)})},"./src/popup-survey.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"PopupSurveyModel",function(){return s}),n.d(t,"SurveyWindowModel",function(){return l});var r,i=n("./src/base.ts"),o=n("./src/survey.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this)||this;return r.closeOnCompleteTimeout=0,r.surveyValue=n||r.createSurvey(t),r.surveyValue.showTitle=!1,"undefined"!=typeof document&&(r.windowElement=document.createElement("div")),r.survey.onComplete.add(function(e,t){r.onSurveyComplete()}),r.registerFunctionOnPropertyValueChanged("isShowing",function(){r.showingChangedCallback&&r.showingChangedCallback()}),r.registerFunctionOnPropertyValueChanged("isExpanded",function(){r.onExpandedChanged()}),r.updateCss(),r.onCreating(),r}return a(t,e),t.prototype.onCreating=function(){},t.prototype.getType=function(){return"popupsurvey"},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowing",{get:function(){return this.getPropertyValue("isShowing",!1)},set:function(e){this.setPropertyValue("isShowing",e)},enumerable:!1,configurable:!0}),t.prototype.show=function(){this.isShowing=!0},t.prototype.hide=function(){this.isShowing=!1},Object.defineProperty(t.prototype,"isExpanded",{get:function(){return this.getPropertyValue("isExpanded",!1)},set:function(e){this.setPropertyValue("isExpanded",e)},enumerable:!1,configurable:!0}),t.prototype.onExpandedChanged=function(){this.expandedChangedCallback&&this.expandedChangedCallback(),this.updateCssButton()},Object.defineProperty(t.prototype,"title",{get:function(){return this.survey.title},set:function(e){this.survey.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.survey.locTitle},enumerable:!1,configurable:!0}),t.prototype.expand=function(){this.isExpanded=!0},t.prototype.collapse=function(){this.isExpanded=!1},t.prototype.changeExpandCollapse=function(){this.isExpanded=!this.isExpanded},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey.css},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssButton",{get:function(){return this.getPropertyValue("cssButton","")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssRoot",{get:function(){return this.getPropertyValue("cssRoot","")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssBody",{get:function(){return this.getPropertyValue("cssBody","")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssHeaderRoot",{get:function(){return this.getPropertyValue("cssHeaderRoot","")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssHeaderTitle",{get:function(){return this.getPropertyValue("cssHeaderTitle","")},enumerable:!1,configurable:!0}),t.prototype.updateCss=function(){if(this.css&&this.css.window){var e=this.css.window;this.setPropertyValue("cssRoot",e.root),this.setPropertyValue("cssBody",e.body);var t=e.header;t&&(this.setPropertyValue("cssHeaderRoot",t.root),this.setPropertyValue("cssHeaderTitle",t.title),this.updateCssButton())}},t.prototype.updateCssButton=function(){var e=this.css.window?this.css.window.header:null;e&&this.setCssButton(this.isExpanded?e.buttonExpanded:e.buttonCollapsed)},t.prototype.setCssButton=function(e){e&&this.setPropertyValue("cssButton",e)},t.prototype.createSurvey=function(e){return new o.SurveyModel(e)},t.prototype.onSurveyComplete=function(){if(!(this.closeOnCompleteTimeout<0))if(0==this.closeOnCompleteTimeout)this.hide();else{var e=this,t=null;t="undefined"!=typeof window?window.setInterval(function(){e.hide(),"undefined"!=typeof window&&window.clearInterval(t)},1e3*this.closeOnCompleteTimeout):0}},t.surveyElementName="PopupSurveyJS",t}(i.Base),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(s)},"./src/popup.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"PopupModel",function(){return c}),n.d(t,"createDialogOptions",function(){return d}),n.d(t,"createPopupModalViewModel",function(){return h}),n.d(t,"PopupBaseViewModel",function(){return f});var r,i=n("./src/base.ts"),o=n("./src/jsonobject.ts"),a=n("./src/utils/popup.ts"),s=n("./src/utils/cssClassBuilder.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},c=function(e){function t(t,n,r,i,o,a,s,l,u,c,d,h){void 0===r&&(r="bottom"),void 0===i&&(i="left"),void 0===o&&(o=!0),void 0===a&&(a=!1),void 0===s&&(s=function(){}),void 0===l&&(l=function(){return!0}),void 0===u&&(u=function(){}),void 0===c&&(c=function(){}),void 0===d&&(d=""),void 0===h&&(h="");var p=e.call(this)||this;return p.focusFirstInputSelector="",p.onVisibilityChanged=p.addEvent(),p.onTargetModified=p.addEvent(),p.contentComponentName=t,p.contentComponentData=n,p.verticalPosition=r,p.horizontalPosition=i,p.showPointer=o,p.isModal=a,p.onCancel=s,p.onApply=l,p.onHide=u,p.onShow=c,p.cssClass=d,p.title=h,p}return l(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.getPropertyValue("isVisible",!1)},set:function(e){if(this.isVisible!==e)if(this.setPropertyValue("isVisible",e),this.onVisibilityChanged.fire(this,{model:this,isVisible:e}),this.isVisible){var t=this.contentComponentData.model;t&&t.refresh&&t.refresh(),this.onShow()}else this.onHide()},enumerable:!1,configurable:!0}),t.prototype.toggleVisibility=function(){this.isVisible=!this.isVisible},t.prototype.targetModified=function(){this.onTargetModified.fire(this,{})},u([Object(o.property)()],t.prototype,"contentComponentName",void 0),u([Object(o.property)()],t.prototype,"contentComponentData",void 0),u([Object(o.property)({defaultValue:"bottom"})],t.prototype,"verticalPosition",void 0),u([Object(o.property)({defaultValue:"left"})],t.prototype,"horizontalPosition",void 0),u([Object(o.property)({defaultValue:!1})],t.prototype,"showPointer",void 0),u([Object(o.property)({defaultValue:!1})],t.prototype,"isModal",void 0),u([Object(o.property)({defaultValue:!0})],t.prototype,"isFocusedContent",void 0),u([Object(o.property)({defaultValue:function(){}})],t.prototype,"onCancel",void 0),u([Object(o.property)({defaultValue:function(){return!0}})],t.prototype,"onApply",void 0),u([Object(o.property)({defaultValue:function(){}})],t.prototype,"onHide",void 0),u([Object(o.property)({defaultValue:function(){}})],t.prototype,"onShow",void 0),u([Object(o.property)({defaultValue:""})],t.prototype,"cssClass",void 0),u([Object(o.property)({defaultValue:""})],t.prototype,"title",void 0),u([Object(o.property)({defaultValue:"popup"})],t.prototype,"displayMode",void 0),u([Object(o.property)({defaultValue:"flex"})],t.prototype,"positionMode",void 0),t}(i.Base);function d(e,t,n,r,i,o,a,s,l){return void 0===i&&(i=function(){}),void 0===o&&(o=function(){}),void 0===l&&(l="popup"),{componentName:e,data:t,onApply:n,onCancel:r,onHide:i,onShow:o,cssClass:a,title:s,displayMode:l}}function h(e){var t=new c(e.componentName,e.data,"top","left",!1,!0,e.onCancel,e.onApply,e.onHide,e.onShow,e.cssClass,e.title);t.displayMode=e.displayMode||"popup";var n=new f(t,void 0);return n.initializePopupContainer(),n}var p='input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^="-"])',f=function(e){function t(t,n){var r=e.call(this)||this;return r.targetElement=n,r.scrollEventCallBack=function(){return r.hidePopup()},r.model=t,r.model.onTargetModified.add(function(e,t){r.updatePosition(!1)}),r}return l(t,e),t.prototype.hidePopup=function(){this.model.isVisible=!1},t.prototype.setupModel=function(e){var t=this;this.model&&this.model.unRegisterFunctionOnPropertiesValueChanged(["isVisible"],"PopupBaseViewModel"),this._model=e;var n=function(){e.isVisible||t.updateOnHiding(),t.isVisible=e.isVisible};e.registerFunctionOnPropertyValueChanged("isVisible",n,"PopupBaseViewModel"),n()},Object.defineProperty(t.prototype,"model",{get:function(){return this._model},set:function(e){this.setupModel(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.model.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentComponentName",{get:function(){return this.model.contentComponentName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentComponentData",{get:function(){return this.model.contentComponentData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPointer",{get:function(){return this.model.showPointer&&!this.isOverlay&&!this.isModal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.model.isModal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocusedContent",{get:function(){return this.model.isFocusedContent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showFooter",{get:function(){return this.isModal||this.isOverlay},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOverlay",{get:function(){return"overlay"===this.model.displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"styleClass",{get:function(){return(new s.CssClassBuilder).append(this.model.cssClass).append("sv-popup--modal",this.isModal&&!this.isOverlay).append("sv-popup--dropdown",!this.isModal&&!this.isOverlay).append("sv-popup--show-pointer",!this.isModal&&!this.isOverlay&&this.showPointer).append("sv-popup--".concat(this.popupDirection),!this.isModal&&!this.isOverlay&&this.showPointer).append("sv-popup--".concat(this.model.displayMode),this.isOverlay).toString()},enumerable:!1,configurable:!0}),t.prototype.onKeyDown=function(e){"Tab"===e.key||9===e.keyCode?this.trapFocus(e):"Escape"!==e.key&&27!==e.keyCode||(this.isModal&&this.model.onCancel(),this.hidePopup())},t.prototype.trapFocus=function(e){var t=this.container.querySelectorAll(p),n=t[0],r=t[t.length-1];e.shiftKey?document.activeElement===n&&(r.focus(),e.preventDefault()):document.activeElement===r&&(n.focus(),e.preventDefault())},t.prototype.updateOnShowing=function(){this.prevActiveElement=document.activeElement,this.isOverlay?(this.top=null,this.left=null,this.height=null,this.width=null,this.minWidth=null):this.isModal||this.updatePosition(),this.isFocusedContent&&this.focusFirstInput(),this.isModal||window.addEventListener("scroll",this.scrollEventCallBack)},t.prototype.updateOnHiding=function(){this.prevActiveElement&&this.prevActiveElement.focus(),this.isModal||window.removeEventListener("scroll",this.scrollEventCallBack),this.isDisposed||(this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.minWidth=void 0)},t.prototype.updatePosition=function(e){if(void 0===e&&(e=!0),this.targetElement){var t=this.targetElement.getBoundingClientRect(),n=this.container.children[0],r=n.children[0],i=n.children[0].querySelector(".sv-popup__scrolling-content"),o=window.getComputedStyle(r),s=parseFloat(o.marginLeft)||0,l=parseFloat(o.marginRight)||0,u=r.offsetHeight-i.offsetHeight+i.scrollHeight,c=r.getBoundingClientRect().width;this.model.setWidthByTarget&&(this.minWidth=t.width+"px"),e&&(this.height="auto");var d=this.model.verticalPosition;window&&(u=Math.ceil(Math.min(u,.9*window.innerHeight)),d=a.PopupUtils.updateVerticalPosition(t,u,this.model.verticalPosition,this.model.showPointer,window.innerHeight)),this.popupDirection=a.PopupUtils.calculatePopupDirection(d,this.model.horizontalPosition);var h=a.PopupUtils.calculatePosition(t,u,c+s+l,d,this.model.horizontalPosition,this.showPointer,this.model.positionMode);if(window){var p=a.PopupUtils.updateVerticalDimensions(h.top,u,window.innerHeight);p&&(this.height=p.height+"px",h.top=p.top);var f=a.PopupUtils.updateHorizontalDimensions(h.left,c,window.innerWidth,this.model.horizontalPosition,this.model.positionMode,{left:s,right:l});f&&(this.width=f.width?f.width+"px":void 0,h.left=f.left)}this.left=h.left+"px",this.top=h.top+"px",this.showPointer&&(this.pointerTarget=a.PopupUtils.calculatePointerTarget(t,h.top,h.left,d,this.model.horizontalPosition,s,l)),this.pointerTarget.top+="px",this.pointerTarget.left+="px"}},t.prototype.focusFirstInput=function(){var e=this;setTimeout(function(){if(e.container){var t=e.container.querySelector(e.model.focusFirstInputSelector||p);t?t.focus():e.container.children[0].focus()}},100)},t.prototype.clickOutside=function(){this.isModal||this.hidePopup()},t.prototype.cancel=function(){this.model.onCancel(),this.hidePopup()},t.prototype.apply=function(){this.model.onApply&&!this.model.onApply()||this.hidePopup()},Object.defineProperty(t.prototype,"cancelButtonText",{get:function(){return this.getLocalizationString("modalCancelButtonText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"applyButtonText",{get:function(){return this.getLocalizationString("modalApplyButtonText")},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.unmountPopupContainer(),this.container=void 0,this.model.onVisibilityChanged.clear(),this.model.onTargetModified.clear()},t.prototype.initializePopupContainer=function(){if(!this.container){var e=document.createElement("div");this.container=e}document.body.appendChild(this.container)},t.prototype.unmountPopupContainer=function(){this.container.remove()},u([Object(o.property)({defaultValue:"0px"})],t.prototype,"top",void 0),u([Object(o.property)({defaultValue:"0px"})],t.prototype,"left",void 0),u([Object(o.property)({defaultValue:"auto"})],t.prototype,"height",void 0),u([Object(o.property)({defaultValue:"auto"})],t.prototype,"width",void 0),u([Object(o.property)({defaultValue:"auto"})],t.prototype,"minWidth",void 0),u([Object(o.property)({defaultValue:!1})],t.prototype,"isVisible",void 0),u([Object(o.property)({defaultValue:"left"})],t.prototype,"popupDirection",void 0),u([Object(o.property)({defaultValue:{left:"0px",top:"0px"}})],t.prototype,"pointerTarget",void 0),t}(i.Base)},"./src/question.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"Question",function(){return y});var r,i=n("./src/helpers.ts"),o=n("./src/jsonobject.ts"),a=n("./src/survey-element.ts"),s=n("./src/error.ts"),l=n("./src/validator.ts"),u=n("./src/localizablestring.ts"),c=n("./src/conditions.ts"),d=n("./src/questionCustomWidgets.ts"),h=n("./src/settings.ts"),p=n("./src/rendererFactory.ts"),f=n("./src/utils/cssClassBuilder.ts"),m=n("./src/utils/utils.ts"),g=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},y=function(e){function t(n){var r=e.call(this,n)||this;return r.customWidgetData={isNeedRender:!0},r.isReadyValue=!0,r.onReadyChanged=r.addEvent(),r.parentQuestionValue=null,r.focusIn=function(){r.survey.whenQuestionFocusIn(r)},r.isRunningValidatorsValue=!1,r.isValueChangedInSurvey=!1,r.allowNotifyValueChanged=!0,r.id=t.getQuestionId(),r.onCreating(),r.createNewArray("validators",function(e){e.errorOwner=r}),r.addExpressionProperty("visibleIf",function(e,t){r.visible=!0===t},function(e){return!r.areInvisibleElementsShowing}),r.addExpressionProperty("enableIf",function(e,t){r.readOnly=!1===t}),r.addExpressionProperty("requiredIf",function(e,t){r.isRequired=!0===t}),r.createLocalizableString("commentText",r,!0,"otherItemText"),r.locTitle.onGetDefaultTextCallback=function(){return r.name},r.locTitle.storeDefaultText=!0,r.createLocalizableString("requiredErrorText",r),r.registerFunctionOnPropertyValueChanged("width",function(){r.updateQuestionCss(),r.parent&&r.parent.elementWidthChanged(r)}),r.registerFunctionOnPropertyValueChanged("isRequired",function(){r.locTitle.strChanged(),r.clearCssClasses()}),r.registerFunctionOnPropertiesValueChanged(["indent","rightIndent"],function(){r.onIndentChanged()}),r.registerFunctionOnPropertiesValueChanged(["hasComment","hasOther"],function(){r.initCommentFromSurvey()}),r.registerFunctionOnPropertyValueChanged("isMobile",function(){r.onMobileChanged()}),r}return g(t,e),t.getQuestionId=function(){return"sq_"+t.questionCounter++},t.prototype.isReadOnlyRenderDiv=function(){return this.isReadOnly&&"div"===h.settings.readOnlyCommentRenderMode},t.prototype.createLocTitleProperty=function(){var t=this,n=e.prototype.createLocTitleProperty.call(this);return n.onGetTextCallback=function(e){return e||(e=t.name),t.survey?t.survey.getUpdatedQuestionTitle(t,e):e},this.locProcessedTitle=new u.LocalizableString(this,!0),this.locProcessedTitle.sharedData=n,n},t.prototype.getSurvey=function(t){return void 0===t&&(t=!1),t?this.parent?this.parent.getSurvey(t):null:this.onGetSurvey?this.onGetSurvey():e.prototype.getSurvey.call(this)},t.prototype.getValueName=function(){return this.valueName?this.valueName.toString():this.name},Object.defineProperty(t.prototype,"valueName",{get:function(){return this.getPropertyValue("valueName","")},set:function(e){var t=this.getValueName();this.setPropertyValue("valueName",e),this.onValueNameChanged(t)},enumerable:!1,configurable:!0}),t.prototype.onValueNameChanged=function(e){this.survey&&(this.survey.questionRenamed(this,this.name,e||this.name),this.initDataFromSurvey())},t.prototype.onNameChanged=function(e){this.locTitle.strChanged(),this.survey&&this.survey.questionRenamed(this,e,this.valueName?this.valueName:e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReadyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaRequired",{get:function(){return this.isRequired?"true":"false"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaInvalid",{get:function(){return this.errors.length>0?"true":"false"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaDescribedBy",{get:function(){return this.errors.length>0?this.id+"_errors":null},enumerable:!1,configurable:!0}),t.prototype.choicesLoaded=function(){},Object.defineProperty(t.prototype,"page",{get:function(){return this.getPage(this.parent)},set:function(e){this.setPage(this.parent,e)},enumerable:!1,configurable:!0}),t.prototype.getPanel=function(){return null},t.prototype.delete=function(){this.parent&&this.removeSelfFromList(this.parent.elements)},Object.defineProperty(t.prototype,"isFlowLayout",{get:function(){return"flow"===this.getLayoutType()},enumerable:!1,configurable:!0}),t.prototype.getLayoutType=function(){return this.parent?this.parent.getChildrenLayoutType():"row"},t.prototype.isLayoutTypeSupported=function(e){return"flow"!==e},Object.defineProperty(t.prototype,"visible",{get:function(){return this.getPropertyValue("visible",!0)},set:function(e){e!=this.visible&&(this.setPropertyValue("visible",e),this.onVisibleChanged(),this.notifySurveyVisibilityChanged())},enumerable:!1,configurable:!0}),t.prototype.onVisibleChanged=function(){this.setPropertyValue("isVisible",this.isVisible),!this.isVisible&&this.errors&&this.errors.length>0&&(this.errors=[])},Object.defineProperty(t.prototype,"useDisplayValuesInTitle",{get:function(){return this.getPropertyValue("useDisplayValuesInTitle")},set:function(e){this.setPropertyValue("useDisplayValuesInTitle",e)},enumerable:!1,configurable:!0}),t.prototype.getUseDisplayValuesInTitle=function(){return this.useDisplayValuesInTitle},Object.defineProperty(t.prototype,"visibleIf",{get:function(){return this.getPropertyValue("visibleIf","")},set:function(e){this.setPropertyValue("visibleIf",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return!(this.survey&&this.survey.areEmptyElementsHidden&&this.isEmpty())&&(this.visible||this.areInvisibleElementsShowing)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleIndex",{get:function(){return this.getPropertyValue("visibleIndex",-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideNumber",{get:function(){return this.getPropertyValue("hideNumber")},set:function(e){this.setPropertyValue("hideNumber",e),this.notifySurveyVisibilityChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAllowTitleLeft",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"question"},Object.defineProperty(t.prototype,"isQuestion",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.moveTo=function(e,t){return void 0===t&&(t=null),this.moveToBase(this.parent,e,t)},t.prototype.getProgressInfo=function(){return this.hasInput?{questionCount:1,answeredQuestionCount:this.isEmpty()?0:1,requiredQuestionCount:this.isRequired?1:0,requiredAnsweredQuestionCount:!this.isEmpty()&&this.isRequired?1:0}:e.prototype.getProgressInfo.call(this)},t.prototype.runConditions=function(){this.data&&!this.isLoadingFromJson&&(this.isDesignMode||this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties()),this.locStrsChanged())},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t),this.survey&&(this.survey.questionCreated(this),!0!==n&&this.runConditions())},Object.defineProperty(t.prototype,"parent",{get:function(){return this.getPropertyValue("parent",null)},set:function(e){this.parent!==e&&(this.delete(),this.setPropertyValue("parent",e),this.updateQuestionCss(),this.onParentChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentQuestion",{get:function(){return this.parentQuestionValue},enumerable:!1,configurable:!0}),t.prototype.setParentQuestion=function(e){this.parentQuestionValue=e,this.onParentQuestionChanged()},t.prototype.onParentQuestionChanged=function(){},t.prototype.onParentChanged=function(){},Object.defineProperty(t.prototype,"hasTitle",{get:function(){return"hidden"!==this.getTitleLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleLocation",{get:function(){return this.getPropertyValue("titleLocation")},set:function(e){var t="hidden"==this.titleLocation||"hidden"==e;this.setPropertyValue("titleLocation",e.toLowerCase()),this.updateQuestionCss(),t&&this.notifySurveyVisibilityChanged()},enumerable:!1,configurable:!0}),t.prototype.getTitleOwner=function(){return this},t.prototype.notifySurveyVisibilityChanged=function(){this.survey&&!this.isLoadingFromJson&&(this.survey.questionVisibilityChanged(this,this.isVisible),this.isClearValueOnHidden&&(this.visible||this.clearValueIfInvisible(),this.isVisible&&this.updateValueWithDefaults()))},t.prototype.getTitleLocation=function(){if(this.isFlowLayout)return"hidden";var e=this.getTitleLocationCore();return"left"!==e||this.isAllowTitleLeft||(e="top"),e},t.prototype.getTitleLocationCore=function(){return"default"!==this.titleLocation?this.titleLocation:this.parent?this.parent.getQuestionTitleLocation():this.survey?this.survey.questionTitleLocation:"top"},Object.defineProperty(t.prototype,"hasTitleOnLeft",{get:function(){return this.hasTitle&&"left"===this.getTitleLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleOnTop",{get:function(){return this.hasTitle&&"top"===this.getTitleLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleOnBottom",{get:function(){return this.hasTitle&&"bottom"===this.getTitleLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleOnLeftTop",{get:function(){if(!this.hasTitle)return!1;var e=this.getTitleLocation();return"left"===e||"top"===e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errorLocation",{get:function(){return this.survey?this.survey.questionErrorLocation:"top"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasInput",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSingleInput",{get:function(){return this.hasInput},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputId",{get:function(){return this.id+"i"},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleValue=function(){return this.name},t.prototype.getDefaultTitleTagName=function(){return h.settings.titleTags.question},Object.defineProperty(t.prototype,"descriptionLocation",{get:function(){return this.getPropertyValue("descriptionLocation")},set:function(e){this.setPropertyValue("descriptionLocation",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasDescriptionUnderTitle",{get:function(){return"underTitle"==this.getDescriptionLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasDescriptionUnderInput",{get:function(){return"underInput"==this.getDescriptionLocation()},enumerable:!1,configurable:!0}),t.prototype.getDescriptionLocation=function(){return"default"!==this.descriptionLocation?this.descriptionLocation:this.survey?this.survey.questionDescriptionLocation:"underTitle"},t.prototype.needClickTitleFunction=function(){return e.prototype.needClickTitleFunction.call(this)||this.hasInput},t.prototype.processTitleClick=function(){var t=this;if(e.prototype.processTitleClick.call(this),!this.isCollapsed)return setTimeout(function(){t.focus()},1),!0},Object.defineProperty(t.prototype,"requiredErrorText",{get:function(){return this.getLocalizableStringText("requiredErrorText")},set:function(e){this.setLocalizableStringText("requiredErrorText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locRequiredErrorText",{get:function(){return this.getLocalizableString("requiredErrorText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"commentText",{get:function(){return this.getLocalizableStringText("commentText")},set:function(e){this.setLocalizableStringText("commentText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locCommentText",{get:function(){return this.getLocalizableString("commentText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"commentOrOtherPlaceHolder",{get:function(){return this.otherPlaceHolder||this.commentPlaceHolder},enumerable:!1,configurable:!0}),t.prototype.getAllErrors=function(){return this.errors.slice()},t.prototype.getErrorByType=function(e){for(var t=0;t<this.errors.length;t++)if(this.errors[t].getErrorType()===e)return this.errors[t];return null},Object.defineProperty(t.prototype,"customWidget",{get:function(){return this.isCustomWidgetRequested||this.customWidgetValue||(this.isCustomWidgetRequested=!0,this.updateCustomWidget()),this.customWidgetValue},enumerable:!1,configurable:!0}),t.prototype.updateCustomWidget=function(){this.customWidgetValue=d.CustomWidgetCollection.Instance.getCustomWidget(this)},t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),this.localeChangedCallback&&this.localeChangedCallback()},Object.defineProperty(t.prototype,"isCompositeQuestion",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.updateCommentElement=function(){this.commentElement&&this.autoGrowComment&&Object(m.increaseHeightByContent)(this.commentElement)},t.prototype.onCommentInput=function(e){this.isInputTextUpdate?e.target&&(this.comment=e.target.value):this.updateCommentElement()},t.prototype.onCommentChange=function(e){this.comment=e.target.value,this.comment!==e.target.value&&(e.target.value=this.comment)},t.prototype.afterRenderQuestionElement=function(e){this.survey&&this.hasSingleInput&&this.survey.afterRenderQuestionInput(this,e)},t.prototype.afterRender=function(e){this.survey&&(this.survey.afterRenderQuestion(this,e),this.afterRenderQuestionCallback&&this.afterRenderQuestionCallback(this,e),(this.supportComment()||this.supportOther())&&(this.commentElement=document.getElementById(this.id)&&document.getElementById(this.id).querySelector("textarea")||null,this.updateCommentElement()),this.checkForResponsiveness(e))},t.prototype.beforeDestroyQuestionElement=function(e){},Object.defineProperty(t.prototype,"processedTitle",{get:function(){return this.locProcessedTitle.textOrHtml||this.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullTitle",{get:function(){return this.locTitle.renderedHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titlePattern",{get:function(){return this.survey?this.survey.questionTitlePattern:"numTitleRequire"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequireTextOnStart",{get:function(){return this.isRequired&&"requireNumTitle"==this.titlePattern},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequireTextBeforeTitle",{get:function(){return this.isRequired&&"numRequireTitle"==this.titlePattern&&""!==this.requiredText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequireTextAfterTitle",{get:function(){return this.isRequired&&"numTitleRequire"==this.titlePattern&&""!==this.requiredText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startWithNewLine",{get:function(){return this.getPropertyValue("startWithNewLine")},set:function(e){this.startWithNewLine!=e&&this.setPropertyValue("startWithNewLine",e)},enumerable:!1,configurable:!0}),t.prototype.calcCssClasses=function(e){var t={error:{}};return this.copyCssClasses(t,e.question),this.copyCssClasses(t.error,e.error),this.updateCssClasses(t,e),this.survey&&this.survey.updateQuestionCssClasses(this,t),t},Object.defineProperty(t.prototype,"cssRoot",{get:function(){return this.ensureElementCss(),this.getPropertyValue("cssRoot","")},enumerable:!1,configurable:!0}),t.prototype.setCssRoot=function(e){this.setPropertyValue("cssRoot",e)},t.prototype.getCssRoot=function(e){return(new f.CssClassBuilder).append(this.isFlowLayout&&!this.isDesignMode?e.flowRoot:e.mainRoot).append(e.titleLeftRoot,!this.isFlowLayout&&this.hasTitleOnLeft).append(e.hasError,this.errors.length>0).append(e.small,!this.width).append(e.answered,this.isAnswered).append(e.expanded,!!this.isExpanded).append(e.collapsed,!!this.isCollapsed).append(e.withFrame,this.hasFrameV2).append(e.nested,(this.hasParent||!this.isSingleInRow)&&this.isDefaultV2Theme).toString()},Object.defineProperty(t.prototype,"cssHeader",{get:function(){return this.ensureElementCss(),this.getPropertyValue("cssHeader","")},enumerable:!1,configurable:!0}),t.prototype.setCssHeader=function(e){this.setPropertyValue("cssHeader",e)},t.prototype.getCssHeader=function(e){return(new f.CssClassBuilder).append(e.header).append(e.headerTop,this.hasTitleOnTop).append(e.headerLeft,this.hasTitleOnLeft).append(e.headerBottom,this.hasTitleOnBottom).toString()},Object.defineProperty(t.prototype,"cssContent",{get:function(){return this.ensureElementCss(),this.getPropertyValue("cssContent","")},enumerable:!1,configurable:!0}),t.prototype.setCssContent=function(e){this.setPropertyValue("cssContent",e)},t.prototype.getCssContent=function(e){return(new f.CssClassBuilder).append(e.content).append(e.contentLeft,this.hasTitleOnLeft).toString()},Object.defineProperty(t.prototype,"cssTitle",{get:function(){return this.ensureElementCss(),this.getPropertyValue("cssTitle","")},enumerable:!1,configurable:!0}),t.prototype.setCssTitle=function(e){this.setPropertyValue("cssTitle",e)},t.prototype.getCssTitle=function(e){return(new f.CssClassBuilder).append(e.title).append(e.titleExpandable,"default"!==this.state).append(e.titleExpanded,this.isExpanded).append(e.titleCollapsed,this.isCollapsed).append(e.titleOnError,this.containsErrors).append(e.titleOnAnswer,!this.containsErrors&&this.isAnswered).toString()},Object.defineProperty(t.prototype,"cssDescription",{get:function(){return this.ensureElementCss(),this.cssClasses.description},enumerable:!1,configurable:!0}),t.prototype.setCssDescription=function(e){this.setPropertyValue("cssDescription","")},t.prototype.getCssDescription=function(e){return(new f.CssClassBuilder).append(this.cssClasses.descriptionUnderInput,this.hasDescriptionUnderInput).append(this.cssClasses.description,this.hasDescriptionUnderTitle).toString()},t.prototype.getIsErrorsModeTooltip=function(){return e.prototype.getIsErrorsModeTooltip.call(this)&&!this.customWidget},t.prototype.showErrorOnCore=function(e){return!this.isErrorsModeTooltip&&!this.showErrorsAboveQuestion&&!this.showErrorsBelowQuestion&&this.errorLocation===e},Object.defineProperty(t.prototype,"showErrorOnTop",{get:function(){return this.showErrorOnCore("top")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showErrorOnBottom",{get:function(){return this.showErrorOnCore("bottom")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showErrorsAboveQuestion",{get:function(){return this.isDefaultV2Theme&&!this.hasParent&&"top"===this.errorLocation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showErrorsBelowQuestion",{get:function(){return this.isDefaultV2Theme&&!this.hasParent&&"bottom"===this.errorLocation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssError",{get:function(){return this.ensureElementCss(),this.getPropertyValue("cssError","")},enumerable:!1,configurable:!0}),t.prototype.setCssError=function(e){this.setPropertyValue("cssError",e)},t.prototype.getCssError=function(e){return(new f.CssClassBuilder).append(e.error.root).append(e.error.outsideQuestion,this.showErrorsBelowQuestion||this.showErrorsAboveQuestion).append(e.error.belowQuestion,this.showErrorsBelowQuestion).append(e.error.aboveQuestion,this.showErrorsAboveQuestion).append(e.error.tooltip,this.isErrorsModeTooltip).append(e.error.locationTop,this.showErrorOnTop).append(e.error.locationBottom,this.showErrorOnBottom).toString()},t.prototype.getRootCss=function(){return(new f.CssClassBuilder).append(this.cssRoot).append(this.cssClasses.disabled,this.isReadOnly).append(this.cssClasses.invisible,!this.isDesignMode&&this.areInvisibleElementsShowing&&!this.visible).toString()},t.prototype.updateElementCss=function(t){e.prototype.updateElementCss.call(this,t),t&&this.updateQuestionCss(!0),this.onIndentChanged()},t.prototype.updateQuestionCss=function(e){this.isLoadingFromJson||!this.survey||!0!==e&&!this.cssClassesValue||this.updateElementCssCore(this.cssClasses)},t.prototype.ensureElementCss=function(){this.cssClassesValue||this.updateQuestionCss(!0)},t.prototype.updateElementCssCore=function(e){this.setCssRoot(this.getCssRoot(e)),this.setCssHeader(this.getCssHeader(e)),this.setCssContent(this.getCssContent(e)),this.setCssTitle(this.getCssTitle(e)),this.setCssDescription(this.getCssDescription(e)),this.setCssError(this.getCssError(e))},t.prototype.updateCssClasses=function(e,t){if(t.question){var n=t[this.getCssType()],r=(new f.CssClassBuilder).append(e.title).append(t.question.titleRequired,this.isRequired);e.title=r.toString();var i=(new f.CssClassBuilder).append(e.root).append(n,this.isRequired&&!!t.question.required);if(null==n)e.root=i.toString();else if("string"==typeof n||n instanceof String)e.root=i.append(n.toString()).toString();else for(var o in e.root=i.toString(),n)e[o]=n[o]}},t.prototype.getCssType=function(){return this.getType()},Object.defineProperty(t.prototype,"renderCssRoot",{get:function(){return this.cssClasses.root||void 0},enumerable:!1,configurable:!0}),t.prototype.onIndentChanged=function(){this.paddingLeft=this.getIndentSize(this.indent),this.paddingRight=this.getIndentSize(this.rightIndent)},t.prototype.getIndentSize=function(e){return e<1||!this.getSurvey()||!this.cssClasses||!this.cssClasses.indent?"":e*this.cssClasses.indent+"px"},t.prototype.focus=function(e){if(void 0===e&&(e=!1),!this.isDesignMode){this.survey&&this.survey.scrollElementToTop(this,this,null,this.id);var t=e?this.getFirstErrorInputElementId():this.getFirstInputElementId();a.SurveyElement.FocusElement(t)&&this.fireCallback(this.focusCallback)}},t.prototype.fireCallback=function(e){e&&e()},t.prototype.getOthersMaxLength=function(){return this.survey&&this.survey.maxOthersLength>0?this.survey.maxOthersLength:null},t.prototype.onCreating=function(){},t.prototype.getFirstQuestionToFocus=function(e){return this.hasInput&&(!e||this.currentErrorCount>0)?this:null},t.prototype.getFirstInputElementId=function(){return this.inputId},t.prototype.getFirstErrorInputElementId=function(){return this.getFirstInputElementId()},t.prototype.getProcessedTextValue=function(e){var n=e.name.toLocaleLowerCase();e.isExists=-1!==Object.keys(t.TextPreprocessorValuesMap).indexOf(n)||void 0!==this[e.name],e.value=this[t.TextPreprocessorValuesMap[n]||e.name]},t.prototype.supportComment=function(){return!1},t.prototype.supportOther=function(){return!1},Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.getPropertyValue("isRequired")},set:function(e){this.setPropertyValue("isRequired",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredIf",{get:function(){return this.getPropertyValue("requiredIf","")},set:function(e){this.setPropertyValue("requiredIf",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasComment",{get:function(){return this.getPropertyValue("hasComment",!1)},set:function(e){this.supportComment()&&(this.setPropertyValue("hasComment",e),this.hasComment&&(this.hasOther=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.getPropertyValue("id")},set:function(e){this.setPropertyValue("id",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaTitleId",{get:function(){return this.id+"_ariaTitle"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"textbox"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasOther",{get:function(){return this.getPropertyValue("hasOther",!1)},set:function(e){this.supportOther()&&this.hasOther!=e&&(this.setPropertyValue("hasOther",e),this.hasOther&&(this.hasComment=!1),this.hasOtherChanged())},enumerable:!1,configurable:!0}),t.prototype.hasOtherChanged=function(){},Object.defineProperty(t.prototype,"requireUpdateCommentValue",{get:function(){return this.hasComment||this.hasOther},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReadOnly",{get:function(){return this.readOnly||!!this.parent&&this.parent.isReadOnly||!!this.survey&&this.survey.isDisplayMode||!!this.parentQuestion&&this.parentQuestion.isReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInputReadOnly",{get:function(){return this.isReadOnly||h.settings.supportCreatorV2&&this.isDesignMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedInputReadOnly",{get:function(){return this.isInputReadOnly?"":void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedInputDisabled",{get:function(){return this.isInputReadOnly?"":void 0},enumerable:!1,configurable:!0}),t.prototype.onReadOnlyChanged=function(){this.setPropertyValue("isInputReadOnly",this.isInputReadOnly),e.prototype.onReadOnlyChanged.call(this)},Object.defineProperty(t.prototype,"enableIf",{get:function(){return this.getPropertyValue("enableIf","")},set:function(e){this.setPropertyValue("enableIf",e)},enumerable:!1,configurable:!0}),t.prototype.surveyChoiceItemVisibilityChange=function(){},t.prototype.runCondition=function(e,t){this.isDesignMode||(t||(t={}),t.question=this,this.runConditionCore(e,t),this.isValueChangedDirectly||(this.defaultValueRunner=this.getDefaultRunner(this.defaultValueRunner,this.defaultValueExpression),this.runDefaultValueExpression(this.defaultValueRunner,e,t)))},Object.defineProperty(t.prototype,"no",{get:function(){return this.getPropertyValue("no")},enumerable:!1,configurable:!0}),t.prototype.calcNo=function(){if(!this.hasTitle||this.hideNumber)return"";var e=i.Helpers.getNumberByIndex(this.visibleIndex,this.getStartIndex());return this.survey&&(e=this.survey.getUpdatedQuestionNo(this,e)),e},t.prototype.getStartIndex=function(){return this.parent?this.parent.getQuestionStartIndex():this.survey?this.survey.questionStartIndex:""},t.prototype.onSurveyLoad=function(){this.fireCallback(this.surveyLoadCallback),this.updateValueWithDefaults(),this.isEmpty()&&this.initDataFromSurvey()},t.prototype.onSetData=function(){e.prototype.onSetData.call(this),this.survey&&(this.initDataFromSurvey(),this.onSurveyValueChanged(this.value),this.updateValueWithDefaults(),this.onIndentChanged(),this.updateQuestionCss(),this.updateIsAnswered())},t.prototype.initDataFromSurvey=function(){if(this.data){var e=this.data.getValue(this.getValueName());i.Helpers.isValueEmpty(e)&&this.isLoadingFromJson||this.updateValueFromSurvey(e),this.initCommentFromSurvey()}},t.prototype.initCommentFromSurvey=function(){this.updateCommentFromSurvey(this.data&&this.requireUpdateCommentValue?this.data.getComment(this.getValueName()):"")},t.prototype.runExpression=function(e){if(this.survey&&e)return this.survey.runExpression(e)},Object.defineProperty(t.prototype,"autoGrowComment",{get:function(){return this.survey&&this.survey.autoGrowComment},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionValue",{get:function(){return this.getPropertyValue("value")},set:function(e){this.setPropertyValue("value",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionComment",{get:function(){return this.getPropertyValue("comment")},set:function(e){this.setPropertyValue("comment",e),this.fireCallback(this.commentChangedCallback)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValueCore()},set:function(e){this.setNewValue(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueForSurvey",{get:function(){return this.valueToDataCallback?this.valueToDataCallback(this.value):this.value},enumerable:!1,configurable:!0}),t.prototype.clearValue=function(){void 0!==this.value&&(this.value=void 0),this.comment&&(this.comment=void 0)},t.prototype.unbindValue=function(){this.clearValue()},t.prototype.createValueCopy=function(){return this.getUnbindValue(this.value)},t.prototype.getUnbindValue=function(e){return this.isValueSurveyElement(e)?e:i.Helpers.getUnbindValue(e)},t.prototype.isValueSurveyElement=function(e){return!!e&&(Array.isArray(e)?e.length>0&&this.isValueSurveyElement(e[0]):!!e.getType&&!!e.onPropertyChanged)},t.prototype.canClearValueAsInvisible=function(){return!(this.isVisible&&this.isParentVisible||this.page&&this.page.isStarted||this.survey&&this.valueName&&this.survey.hasVisibleQuestionByValueName(this.valueName))},Object.defineProperty(t.prototype,"isParentVisible",{get:function(){for(var e=this.parent;e;){if(!e.isVisible)return!1;e=e.parent}return!0},enumerable:!1,configurable:!0}),t.prototype.clearValueIfInvisible=function(e){void 0===e&&(e="onHidden"),"none"!==this.clearIfInvisible&&("onHidden"===e&&"onComplete"===this.clearIfInvisible||("none"!==e||"default"!==this.clearIfInvisible&&"none"!==this.clearIfInvisible)&&this.clearValueIfInvisibleCore())},t.prototype.clearValueIfInvisibleCore=function(){this.canClearValueAsInvisible()&&this.clearValue()},Object.defineProperty(t.prototype,"clearIfInvisible",{get:function(){return this.getPropertyValue("clearIfInvisible")},set:function(e){this.setPropertyValue("clearIfInvisible",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return this.isLoadingFromJson?"":this.getDisplayValue(!0)},enumerable:!1,configurable:!0}),t.prototype.getDisplayValue=function(e,t){void 0===t&&(t=void 0);var n=this.calcDisplayValue(e,t);return this.displayValueCallback?this.displayValueCallback(n):n},t.prototype.calcDisplayValue=function(e,t){if(void 0===t&&(t=void 0),this.customWidget){var n=this.customWidget.getDisplayValue(this,t);if(n)return n}return t=null==t?this.createValueCopy():t,this.isValueEmpty(t)?this.getDisplayValueEmpty():this.getDisplayValueCore(e,t)},t.prototype.getDisplayValueCore=function(e,t){return t},t.prototype.getDisplayValueEmpty=function(){return""},Object.defineProperty(t.prototype,"defaultValue",{get:function(){return this.getPropertyValue("defaultValue")},set:function(e){this.isValueExpression(e)?this.defaultValueExpression=e.substring(1):(this.setPropertyValue("defaultValue",this.convertDefaultValue(e)),this.updateValueWithDefaults())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultValueExpression",{get:function(){return this.getPropertyValue("defaultValueExpression")},set:function(e){this.setPropertyValue("defaultValueExpression",e),this.defaultValueRunner=void 0,this.updateValueWithDefaults()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resizeStyle",{get:function(){return this.autoGrowComment?"none":"both"},enumerable:!1,configurable:!0}),t.prototype.getPlainData=function(e){var t=this;if(e||(e={includeEmpty:!0,includeQuestionTypes:!1}),e.includeEmpty||!this.isEmpty()){var n={name:this.name,title:this.locTitle.renderedHtml,value:this.value,displayValue:this.displayValue,isNode:!1,getString:function(e){return"object"==typeof e?JSON.stringify(e):e}};return!0===e.includeQuestionTypes&&(n.questionType=this.getType()),(e.calculations||[]).forEach(function(e){n[e.propertyName]=t[e.propertyName]}),this.hasComment&&(n.isNode=!0,n.data=[{name:0,isComment:!0,title:"Comment",value:h.settings.commentPrefix,displayValue:this.comment,getString:function(e){return"object"==typeof e?JSON.stringify(e):e},isNode:!1}]),n}},Object.defineProperty(t.prototype,"correctAnswer",{get:function(){return this.getPropertyValue("correctAnswer")},set:function(e){this.setPropertyValue("correctAnswer",this.convertDefaultValue(e))},enumerable:!1,configurable:!0}),t.prototype.convertDefaultValue=function(e){return e},Object.defineProperty(t.prototype,"quizQuestionCount",{get:function(){return this.isVisible&&this.hasInput&&!this.isValueEmpty(this.correctAnswer)?this.getQuizQuestionCount():0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"correctAnswerCount",{get:function(){return this.isEmpty()||this.isValueEmpty(this.correctAnswer)?0:this.getCorrectAnswerCount()},enumerable:!1,configurable:!0}),t.prototype.getQuizQuestionCount=function(){return 1},t.prototype.getCorrectAnswerCount=function(){return this.isTwoValueEquals(this.value,this.correctAnswer,!0,!0)?1:0},t.prototype.isAnswerCorrect=function(){return this.correctAnswerCount==this.quizQuestionCount},t.prototype.updateValueWithDefaults=function(){this.isLoadingFromJson||!this.isDesignMode&&this.isDefaultValueEmpty()||(this.isDesignMode||this.isEmpty())&&(this.isEmpty()&&this.isDefaultValueEmpty()||this.isClearValueOnHidden&&!this.isVisible||this.isDesignMode&&this.isContentElement&&this.isDefaultValueEmpty()||this.setDefaultValue())},Object.defineProperty(t.prototype,"isClearValueOnHidden",{get:function(){return"none"!==this.clearIfInvisible&&"onComplete"!==this.clearIfInvisible&&("onHidden"===this.clearIfInvisible||!!this.survey&&this.survey.isClearValueOnHidden)},enumerable:!1,configurable:!0}),t.prototype.getQuestionFromArray=function(e,t){return null},t.prototype.getDefaultValue=function(){return this.defaultValue},t.prototype.isDefaultValueEmpty=function(){return!this.defaultValueExpression&&this.isValueEmpty(this.defaultValue)},t.prototype.getDefaultRunner=function(e,t){return!e&&t&&(e=new c.ExpressionRunner(t)),e&&(e.expression=t),e},t.prototype.setDefaultValue=function(){var e=this;this.defaultValueRunner=this.getDefaultRunner(this.defaultValueRunner,this.defaultValueExpression),this.setValueAndRunExpression(this.defaultValueRunner,this.getUnbindValue(this.defaultValue),function(t){e.value=t})},t.prototype.isValueExpression=function(e){return!!e&&"string"==typeof e&&e.length>0&&"="==e[0]},t.prototype.setValueAndRunExpression=function(e,t,n,r,i){var o=this;void 0===r&&(r=null),void 0===i&&(i=null);var a=function(e){o.runExpressionSetValue(e,n)};this.runDefaultValueExpression(e,r,i,a)||a(t)},t.prototype.runExpressionSetValue=function(e,t){e instanceof Date&&(e=e.toISOString().slice(0,10)),t(e)},t.prototype.runDefaultValueExpression=function(e,t,n,r){var i=this;return void 0===t&&(t=null),void 0===n&&(n=null),!(!e||!this.data||(r||(r=function(e){i.runExpressionSetValue(e,function(e){i.value=e})}),t||(t=this.data.getFilteredValues()),n||(n=this.data.getFilteredProperties()),e&&e.canRun&&(e.onRunComplete=function(e){null==e&&(e=i.defaultValue),i.isChangingViaDefaultValue=!0,r(e),i.isChangingViaDefaultValue=!1},e.run(t,n)),0))},Object.defineProperty(t.prototype,"comment",{get:function(){return this.getQuestionComment()},set:function(e){if(e){var t=e.toString().trim();t!==e&&(e=t)===this.comment&&this.setPropertyValueDirectly("comment",e)}this.comment!=e&&(this.setQuestionComment(e),this.updateCommentElement())},enumerable:!1,configurable:!0}),t.prototype.getQuestionComment=function(){return this.questionComment},t.prototype.setQuestionComment=function(e){this.setNewComment(e)},t.prototype.isEmpty=function(){return this.isValueEmpty(this.value)},Object.defineProperty(t.prototype,"isAnswered",{get:function(){return this.getPropertyValue("isAnswered")},set:function(e){this.setPropertyValue("isAnswered",e)},enumerable:!1,configurable:!0}),t.prototype.updateIsAnswered=function(){var e=this.isAnswered;this.setPropertyValue("isAnswered",this.getIsAnswered()),e!==this.isAnswered&&this.updateQuestionCss()},t.prototype.getIsAnswered=function(){return!this.isEmpty()},Object.defineProperty(t.prototype,"validators",{get:function(){return this.getPropertyValue("validators")},set:function(e){this.setPropertyValue("validators",e)},enumerable:!1,configurable:!0}),t.prototype.getValidators=function(){return this.validators},t.prototype.getSupportedValidators=function(){for(var e=[],t=this.getType();t;){var n=h.settings.supportedValidators[t];if(n)for(var r=n.length-1;r>=0;r--)e.splice(0,0,n[r]);t=o.Serializer.findClass(t).parentName}return e},t.prototype.addSupportedValidators=function(e,t){},t.prototype.addConditionObjectsByContext=function(e,t){e.push({name:this.getValueName(),text:this.processedTitle,question:this})},t.prototype.getConditionJson=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null);var n=(new o.JsonObject).toJsonObject(this);return n.type=this.getType(),n},t.prototype.hasErrors=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=null);var n=this.errors.length>0,r=this.checkForErrors(!!t&&!0===t.isOnValueChanged);return e&&(this.survey&&this.survey.beforeSettingQuestionErrors(this,r),this.errors=r),this.updateContainsErrors(),n!=r.length>0&&this.updateQuestionCss(),this.isCollapsed&&t&&e&&r.length>0&&this.expand(),r.length>0},Object.defineProperty(t.prototype,"currentErrorCount",{get:function(){return this.errors.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredText",{get:function(){return null!=this.survey&&this.isRequired?this.survey.requiredText:""},enumerable:!1,configurable:!0}),t.prototype.addError=function(e){var t;e&&(t="string"==typeof e||e instanceof String?new s.CustomError(e,this.survey):e,this.errors.push(t))},t.prototype.removeError=function(e){var t=this.errors,n=t.indexOf(e);-1!==n&&t.splice(n,1)},t.prototype.checkForErrors=function(e){var t=new Array;return this.isVisible&&this.canCollectErrors()&&this.collectErrors(t,e),t},t.prototype.canCollectErrors=function(){return!this.isReadOnly},t.prototype.collectErrors=function(e,t){if(this.onCheckForErrors(e,t),!(e.length>0)&&this.canRunValidators(t)){var n=this.runValidators();if(n.length>0){e.length=0;for(var r=0;r<n.length;r++)e.push(n[r])}if(this.survey&&0==e.length){var i=this.fireSurveyValidation();i&&e.push(i)}}},t.prototype.canRunValidators=function(e){return!0},t.prototype.fireSurveyValidation=function(){return this.validateValueCallback?this.validateValueCallback():this.survey?this.survey.validateQuestion(this):null},t.prototype.onCheckForErrors=function(e,t){var n=this;if(!t&&this.hasRequiredError()){var r=new s.AnswerRequiredError(this.requiredErrorText,this);r.onUpdateErrorTextCallback=function(e){e.text=n.requiredErrorText},e.push(r)}},t.prototype.hasRequiredError=function(){return this.isRequired&&this.isEmpty()},Object.defineProperty(t.prototype,"isRunningValidators",{get:function(){return this.getIsRunningValidators()},enumerable:!1,configurable:!0}),t.prototype.getIsRunningValidators=function(){return this.isRunningValidatorsValue},t.prototype.runValidators=function(){var e=this;return this.validatorRunner&&(this.validatorRunner.onAsyncCompleted=null),this.validatorRunner=new l.ValidatorRunner,this.isRunningValidatorsValue=!0,this.validatorRunner.onAsyncCompleted=function(t){e.doOnAsyncCompleted(t)},this.validatorRunner.run(this)},t.prototype.doOnAsyncCompleted=function(e){for(var t=0;t<e.length;t++)this.errors.push(e[t]);this.isRunningValidatorsValue=!1,this.raiseOnCompletedAsyncValidators()},t.prototype.raiseOnCompletedAsyncValidators=function(){this.onCompletedAsyncValidators&&!this.isRunningValidators&&(this.onCompletedAsyncValidators(this.getAllErrors().length>0),this.onCompletedAsyncValidators=null)},t.prototype.setNewValue=function(e){var t=this.isAnswered;this.setNewValueInData(e),this.allowNotifyValueChanged&&this.onValueChanged(),this.isAnswered!=t&&this.updateQuestionCss()},t.prototype.isTextValue=function(){return!1},Object.defineProperty(t.prototype,"isSurveyInputTextUpdate",{get:function(){return!!this.survey&&this.survey.isUpdateValueTextOnTyping},enumerable:!1,configurable:!0}),t.prototype.getDataLocNotification=function(){return!!this.isInputTextUpdate&&"text"},Object.defineProperty(t.prototype,"isInputTextUpdate",{get:function(){return this.isSurveyInputTextUpdate&&this.isTextValue()},enumerable:!1,configurable:!0}),t.prototype.setNewValueInData=function(e){e=this.valueToData(e),this.isValueChangedInSurvey||this.setValueCore(e)},t.prototype.getValueCore=function(){return this.questionValue},t.prototype.setValueCore=function(e){this.setQuestionValue(e),null!=this.data&&this.canSetValueToSurvey()&&(e=this.valueForSurvey,this.data.setValue(this.getValueName(),e,this.getDataLocNotification(),this.allowNotifyValueChanged))},t.prototype.canSetValueToSurvey=function(){return!0},t.prototype.valueFromData=function(e){return e},t.prototype.valueToData=function(e){return e},t.prototype.onValueChanged=function(){},t.prototype.setNewComment=function(e){this.questionComment!==e&&(this.questionComment=e,null!=this.data&&this.data.setComment(this.getValueName(),e,!!this.isSurveyInputTextUpdate&&"text"))},t.prototype.getValidName=function(e){return e?e.trim().replace(/[\{\}]+/g,""):e},t.prototype.updateValueFromSurvey=function(e){e=this.getUnbindValue(e),this.valueFromDataCallback&&(e=this.valueFromDataCallback(e)),this.setQuestionValue(this.valueFromData(e)),this.updateIsAnswered()},t.prototype.updateCommentFromSurvey=function(e){this.questionComment=e},t.prototype.setQuestionValue=function(e,t){void 0===t&&(t=!0);var n=this.isTwoValueEquals(this.questionValue,e);n||this.isChangingViaDefaultValue||(this.isValueChangedDirectly=!0),this.questionValue=e,!n&&this.allowNotifyValueChanged&&this.fireCallback(this.valueChangedCallback),t&&this.updateIsAnswered()},t.prototype.onSurveyValueChanged=function(e){},t.prototype.setVisibleIndex=function(e){return(!this.isVisible||!this.hasTitle&&!h.settings.setQuestionVisibleIndexForHiddenTitle||this.hideNumber&&!h.settings.setQuestionVisibleIndexForHiddenNumber)&&(e=-1),this.setPropertyValue("visibleIndex",e),this.setPropertyValue("no",this.calcNo()),e<0?0:1},t.prototype.removeElement=function(e){return!1},t.prototype.supportGoNextPageAutomatic=function(){return!1},t.prototype.supportGoNextPageError=function(){return!0},t.prototype.clearIncorrectValues=function(){},t.prototype.clearOnDeletingContainer=function(){},t.prototype.clearErrors=function(){this.errors=[]},t.prototype.clearUnusedValues=function(){},t.prototype.onAnyValueChanged=function(e){},t.prototype.checkBindings=function(e,t){if(!this.bindings.isEmpty()&&this.data)for(var n=this.bindings.getPropertiesByValueName(e),r=0;r<n.length;r++)this[n[r]]=t},t.prototype.getComponentName=function(){return p.RendererFactory.Instance.getRendererByQuestion(this)},t.prototype.isDefaultRendering=function(){return!!this.customWidget||"default"===this.renderAs||"default"===this.getComponentName()},t.prototype.getErrorCustomText=function(e,t){return this.survey?this.survey.getSurveyErrorCustomText(this,e,t):e},t.prototype.getValidatorTitle=function(){return null},Object.defineProperty(t.prototype,"validatedValue",{get:function(){return this.value},set:function(e){this.value=e},enumerable:!1,configurable:!0}),t.prototype.getAllValues=function(){return this.data?this.data.getAllValues():null},t.prototype.transformToMobileView=function(){},t.prototype.transformToDesktopView=function(){},t.prototype.needResponsiveWidth=function(){return!1},t.prototype.supportResponsiveness=function(){return!1},t.prototype.needResponsiveness=function(){return this.supportResponsiveness()&&this.isDefaultV2Theme&&!this.isDesignMode},t.prototype.checkForResponsiveness=function(e){var t=this;this.needResponsiveness()&&(this.isCollapsed?this.registerFunctionOnPropertyValueChanged("state",function(){t.isExpanded&&(t.initResponsiveness(e),t.unRegisterFunctionOnPropertyValueChanged("state","for-responsiveness"))},"for-responsiveness"):this.initResponsiveness(e))},t.prototype.getObservedElementSelector=function(){return".sd-scrollable-container"},t.prototype.onMobileChanged=function(){this.onMobileChangedCallback&&this.onMobileChangedCallback()},t.prototype.initResponsiveness=function(e){var t=this;if(this.destroyResizeObserver(),e&&this.isDefaultRendering()){var n=this.getObservedElementSelector();if(!n)return;if(!e.querySelector(n))return;var r=!1,i=void 0;this.resizeObserver=new ResizeObserver(function(){var o=e.querySelector(n);!i&&t.isDefaultRendering()&&(i=o.scrollWidth),r=!(r||!Object(m.isContainerVisible)(o))&&t.processResponsiveness(i,Object(m.getElementWidth)(o))}),this.onMobileChangedCallback=function(){setTimeout(function(){var r=e.querySelector(n);t.processResponsiveness(i,Object(m.getElementWidth)(r))},0)},this.resizeObserver.observe(e)}},t.prototype.getCompactRenderAs=function(){return"default"},t.prototype.getDesktopRenderAs=function(){return"default"},t.prototype.processResponsiveness=function(e,t){if(t=Math.round(t),Math.abs(e-t)>2){var n=this.renderAs;return this.renderAs=e>t?this.getCompactRenderAs():this.getDesktopRenderAs(),n!==this.renderAs}return!1},t.prototype.destroyResizeObserver=function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0,this.onMobileChangedCallback=void 0,this.renderAs=this.getDesktopRenderAs())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.destroyResizeObserver()},t.TextPreprocessorValuesMap={title:"processedTitle",require:"requiredText"},t.questionCounter=100,v([Object(o.property)({defaultValue:!1})],t.prototype,"isMobile",void 0),v([Object(o.property)({localizable:!0})],t.prototype,"commentPlaceHolder",void 0),v([Object(o.property)({defaultValue:"default"})],t.prototype,"renderAs",void 0),t}(a.SurveyElement);o.Serializer.addClass("question",["!name",{name:"state",default:"default",choices:["default","collapsed","expanded"]},{name:"visible:switch",default:!0},{name:"useDisplayValuesInTitle:boolean",default:!0,layout:"row"},"visibleIf:condition",{name:"width"},{name:"minWidth",default:h.settings.minWidth},{name:"maxWidth",default:h.settings.maxWidth},{name:"startWithNewLine:boolean",default:!0,layout:"row"},{name:"indent:number",default:0,choices:[0,1,2,3],layout:"row"},{name:"page",isSerializable:!1,visibleIf:function(e){var t=e?e.survey:null;return!t||!t.pages||t.pages.length>1},choices:function(e){var t=e?e.survey:null;return t?t.pages.map(function(e){return{value:e.name,text:e.title}}):[]}},{name:"title:text",serializationProperty:"locTitle",layout:"row",dependsOn:"name",onPropertyEditorUpdate:function(e,t){e&&t&&(t.placeholder=e.name)}},{name:"titleLocation",default:"default",choices:["default","top","bottom","left","hidden"],layout:"row"},{name:"description:text",serializationProperty:"locDescription",layout:"row"},{name:"descriptionLocation",default:"default",choices:["default","underInput","underTitle"]},{name:"hideNumber:boolean",dependsOn:"titleLocation",visibleIf:function(e){if(!e)return!0;if("hidden"===e.titleLocation)return!1;var t=e?e.parent:null;if(t&&"off"===t.showQuestionNumbers)return!1;var n=e?e.survey:null;return!n||"off"!==n.showQuestionNumbers||!!t&&"onpanel"===t.showQuestionNumbers}},"valueName","enableIf:condition","defaultValue:value",{name:"defaultValueExpression:expression",category:"logic"},"correctAnswer:value",{name:"clearIfInvisible",default:"default",choices:["default","none","onComplete","onHidden"]},"isRequired:switch","requiredIf:condition",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},"readOnly:switch",{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"},{name:"bindings:bindings",serializationProperty:"bindings",visibleIf:function(e){return e.bindings.getNames().length>0}},{name:"renderAs",default:"default",visible:!1}]),o.Serializer.addAlterNativeClassName("question","questionbase")},"./src/questionCustomWidgets.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionCustomWidget",function(){return i}),n.d(t,"CustomWidgetCollection",function(){return o});var r=n("./src/base.ts"),i=function(){function e(e,t){this.name=e,this.widgetJson=t,this.htmlTemplate=t.htmlTemplate?t.htmlTemplate:""}return e.prototype.afterRender=function(e,t){var n=this;this.widgetJson.afterRender&&(e.localeChangedCallback=function(){n.widgetJson.willUnmount&&n.widgetJson.willUnmount(e,t),n.widgetJson.afterRender(e,t)},this.widgetJson.afterRender(e,t))},e.prototype.willUnmount=function(e,t){this.widgetJson.willUnmount&&this.widgetJson.willUnmount(e,t)},e.prototype.getDisplayValue=function(e,t){return void 0===t&&(t=void 0),this.widgetJson.getDisplayValue?this.widgetJson.getDisplayValue(e,t):null},e.prototype.isFit=function(e){return!(!this.isLibraryLoaded()||!this.widgetJson.isFit)&&this.widgetJson.isFit(e)},Object.defineProperty(e.prototype,"canShowInToolbox",{get:function(){return!1!==this.widgetJson.showInToolbox&&"customtype"==o.Instance.getActivatedBy(this.name)&&(!this.widgetJson.widgetIsLoaded||this.widgetJson.widgetIsLoaded())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showInToolbox",{get:function(){return!1!==this.widgetJson.showInToolbox},set:function(e){this.widgetJson.showInToolbox=e},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.widgetJson.init&&this.widgetJson.init()},e.prototype.activatedByChanged=function(e){this.isLibraryLoaded()&&this.widgetJson.activatedByChanged&&this.widgetJson.activatedByChanged(e)},e.prototype.isLibraryLoaded=function(){return!this.widgetJson.widgetIsLoaded||1==this.widgetJson.widgetIsLoaded()},Object.defineProperty(e.prototype,"isDefaultRender",{get:function(){return this.widgetJson.isDefaultRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pdfQuestionType",{get:function(){return this.widgetJson.pdfQuestionType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pdfRender",{get:function(){return this.widgetJson.pdfRender},enumerable:!1,configurable:!0}),e}(),o=function(){function e(){this.widgetsValues=[],this.widgetsActivatedBy={},this.onCustomWidgetAdded=new r.Event}return Object.defineProperty(e.prototype,"widgets",{get:function(){return this.widgetsValues},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t){void 0===t&&(t="property"),this.addCustomWidget(e,t)},e.prototype.addCustomWidget=function(e,t){void 0===t&&(t="property");var n=e.name;n||(n="widget_"+this.widgets.length+1);var r=new i(n,e);return this.widgetsValues.push(r),r.init(),this.widgetsActivatedBy[n]=t,r.activatedByChanged(t),this.onCustomWidgetAdded.fire(r,null),r},e.prototype.getActivatedBy=function(e){return this.widgetsActivatedBy[e]||"property"},e.prototype.setActivatedBy=function(e,t){if(e&&t){var n=this.getCustomWidgetByName(e);n&&(this.widgetsActivatedBy[e]=t,n.activatedByChanged(t))}},e.prototype.clear=function(){this.widgetsValues=[]},e.prototype.getCustomWidgetByName=function(e){for(var t=0;t<this.widgets.length;t++)if(this.widgets[t].name==e)return this.widgets[t];return null},e.prototype.getCustomWidget=function(e){for(var t=0;t<this.widgetsValues.length;t++)if(this.widgetsValues[t].isFit(e))return this.widgetsValues[t];return null},e.Instance=new e,e}()},"./src/question_baseselect.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionSelectBase",function(){return v}),n.d(t,"QuestionCheckboxBase",function(){return y});var r,i=n("./src/jsonobject.ts"),o=n("./src/survey.ts"),a=n("./src/question.ts"),s=n("./src/itemvalue.ts"),l=n("./src/surveyStrings.ts"),u=n("./src/error.ts"),c=n("./src/choicesRestful.ts"),d=n("./src/conditions.ts"),h=n("./src/helpers.ts"),p=n("./src/settings.ts"),f=n("./src/utils/cssClassBuilder.ts"),m=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},v=function(e){function t(t){var n=e.call(this,t)||this;n.otherItemValue=new s.ItemValue("other"),n.dependedQuestions=[],n.noneItemValue=new s.ItemValue("none"),n.isSettingDefaultValue=!1,n.isSettingComment=!1,n.isRunningChoices=!1,n.isFirstLoadChoicesFromUrl=!0,n.isUpdatingChoicesDependedQuestions=!1,n.prevIsOtherSelected=!1;var r=n.createLocalizableString("noneText",n,!0,"noneItemText");n.noneItemValue.locOwner=n,n.noneItemValue.setLocText(r),n.createItemValues("choices"),n.registerFunctionOnPropertyValueChanged("choices",function(){n.filterItems()||n.onVisibleChoicesChanged()}),n.registerFunctionOnPropertiesValueChanged(["choicesFromQuestion","choicesFromQuestionMode","hasNone"],function(){n.onVisibleChoicesChanged()}),n.registerFunctionOnPropertyValueChanged("hideIfChoicesEmpty",function(){n.updateVisibilityBasedOnChoices()}),n.createNewArray("visibleChoices"),n.setNewRestfulProperty();var i=n.createLocalizableString("otherText",n,!0,"otherItemText");return n.createLocalizableString("otherErrorText",n,!0,"otherRequiredError"),n.otherItemValue.locOwner=n,n.otherItemValue.setLocText(i),n.choicesByUrl.createItemValue=function(e){return n.createItemValue(e)},n.choicesByUrl.beforeSendRequestCallback=function(){n.onBeforeSendRequest()},n.choicesByUrl.getResultCallback=function(e){n.onLoadChoicesFromUrl(e)},n.choicesByUrl.updateResultCallback=function(e,t){return n.survey?n.survey.updateChoicesFromServer(n,e,t):e},n}return m(t,e),t.prototype.getType=function(){return"selectbase"},t.prototype.dispose=function(){e.prototype.dispose.call(this);for(var t=0;t<this.dependedQuestions.length;t++)this.dependedQuestions[t].choicesFromQuestion="";this.removeFromDependedQuestion(this.getQuestionWithChoices())},t.prototype.getItemValueType=function(){return"itemvalue"},t.prototype.createItemValue=function(e){return i.Serializer.createClass(this.getItemValueType(),e)},t.prototype.supportGoNextPageError=function(){return!this.isOtherSelected||!!this.comment},t.prototype.isLayoutTypeSupported=function(e){return!0},t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),"none"!==this.choicesOrder&&this.updateVisibleChoices()},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.choicesFromUrl&&(s.ItemValue.locStrsChanged(this.choicesFromUrl),s.ItemValue.locStrsChanged(this.visibleChoices))},Object.defineProperty(t.prototype,"otherItem",{get:function(){return this.otherItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOtherSelected",{get:function(){return this.hasOther&&this.getHasOther(this.renderedValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasNone",{get:function(){return this.getPropertyValue("hasNone",!1)},set:function(e){this.setPropertyValue("hasNone",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noneItem",{get:function(){return this.noneItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noneText",{get:function(){return this.getLocalizableStringText("noneText")},set:function(e){this.setLocalizableStringText("noneText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locNoneText",{get:function(){return this.getLocalizableString("noneText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choicesVisibleIf",{get:function(){return this.getPropertyValue("choicesVisibleIf","")},set:function(e){this.setPropertyValue("choicesVisibleIf",e),this.filterItems()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choicesEnableIf",{get:function(){return this.getPropertyValue("choicesEnableIf","")},set:function(e){this.setPropertyValue("choicesEnableIf",e),this.filterItems()},enumerable:!1,configurable:!0}),t.prototype.surveyChoiceItemVisibilityChange=function(){this.filterItems()},t.prototype.runCondition=function(t,n){e.prototype.runCondition.call(this,t,n),this.runItemsEnableCondition(t,n),this.runItemsCondition(t,n)},t.prototype.isTextValue=function(){return!0},t.prototype.setDefaultValue=function(){this.isSettingDefaultValue=!this.isValueEmpty(this.defaultValue)&&this.hasUnknownValue(this.defaultValue),this.prevCommentValue=void 0,e.prototype.setDefaultValue.call(this),this.isSettingDefaultValue=!1},t.prototype.getIsMultipleValue=function(){return!1},t.prototype.convertDefaultValue=function(e){if(null==e||null==e)return e;if(this.getIsMultipleValue()){if(!Array.isArray(e))return[e]}else if(Array.isArray(e)&&e.length>0)return e[0];return e},t.prototype.filterItems=function(){if(this.isLoadingFromJson||!this.data||this.areInvisibleElementsShowing)return!1;var e=this.getDataFilteredValues(),t=this.getDataFilteredProperties();return this.runItemsEnableCondition(e,t),this.runItemsCondition(e,t)},t.prototype.runItemsCondition=function(e,t){this.setConditionalChoicesRunner();var n=this.runConditionsForItems(e,t);return this.filteredChoicesValue&&this.filteredChoicesValue.length===this.activeChoices.length&&(this.filteredChoicesValue=void 0),n&&(this.onVisibleChoicesChanged(),this.clearIncorrectValues()),n},t.prototype.runItemsEnableCondition=function(e,t){var n=this;this.setConditionalEnableChoicesRunner(),s.ItemValue.runEnabledConditionsForItems(this.activeChoices,this.conditionChoicesEnableIfRunner,e,t,function(e,t){return t&&n.onEnableItemCallBack(e)})&&this.clearDisabledValues(),this.onAfterRunItemsEnableCondition()},t.prototype.onAfterRunItemsEnableCondition=function(){},t.prototype.onEnableItemCallBack=function(e){return!0},t.prototype.setConditionalChoicesRunner=function(){this.choicesVisibleIf?(this.conditionChoicesVisibleIfRunner||(this.conditionChoicesVisibleIfRunner=new d.ConditionRunner(this.choicesVisibleIf)),this.conditionChoicesVisibleIfRunner.expression=this.choicesVisibleIf):this.conditionChoicesVisibleIfRunner=null},t.prototype.setConditionalEnableChoicesRunner=function(){this.choicesEnableIf?(this.conditionChoicesEnableIfRunner||(this.conditionChoicesEnableIfRunner=new d.ConditionRunner(this.choicesEnableIf)),this.conditionChoicesEnableIfRunner.expression=this.choicesEnableIf):this.conditionChoicesEnableIfRunner=null},t.prototype.canSurveyChangeItemVisibility=function(){return!!this.survey&&this.survey.canChangeChoiceItemsVisibility()},t.prototype.changeItemVisisbility=function(){var e=this;return this.canSurveyChangeItemVisibility()?function(t,n){return e.survey.getChoiceItemVisibility(e,t,n)}:null},t.prototype.runConditionsForItems=function(e,t){this.filteredChoicesValue=[];var n=this.changeItemVisisbility();return s.ItemValue.runConditionsForItems(this.activeChoices,this.getFilteredChoices(),this.areInvisibleElementsShowing?null:this.conditionChoicesVisibleIfRunner,e,t,!this.survey||!this.survey.areInvisibleElementsShowing,function(e,t){return n?n(e,t):t})},t.prototype.getHasOther=function(e){return e===this.otherItem.value},Object.defineProperty(t.prototype,"validatedValue",{get:function(){return this.rendredValueToDataCore(this.value)},enumerable:!1,configurable:!0}),t.prototype.createRestful=function(){return new c.ChoicesRestful},t.prototype.setNewRestfulProperty=function(){this.setPropertyValue("choicesByUrl",this.createRestful()),this.choicesByUrl.owner=this,this.choicesByUrl.loadingOwner=this},Object.defineProperty(t.prototype,"autoOtherMode",{get:function(){return this.getPropertyValue("autoOtherMode")},set:function(e){this.setPropertyValue("autoOtherMode",e)},enumerable:!1,configurable:!0}),t.prototype.getQuestionComment=function(){return this.commentValue?this.commentValue:this.hasComment||this.getStoreOthersAsComment()?e.prototype.getQuestionComment.call(this):this.commentValue},t.prototype.selectOtherValueFromComment=function(e){this.value=e?this.otherItem.value:void 0},t.prototype.setQuestionComment=function(t){if(this.autoOtherMode){this.prevCommentValue=void 0;var n=this.isOtherSelected;(!n&&t||n&&!t)&&this.selectOtherValueFromComment(!!t)}this.hasComment||this.getStoreOthersAsComment()?e.prototype.setQuestionComment.call(this,t):this.isSettingComment||t==this.commentValue||(this.isSettingComment=!0,this.commentValue=t,this.isOtherSelected&&!this.isRenderedValueSetting&&(this.value=this.rendredValueToData(this.renderedValue)),this.isSettingComment=!1),this.updateChoicesDependedQuestions()},t.prototype.clearValue=function(){e.prototype.clearValue.call(this),this.prevCommentValue=void 0},t.prototype.updateCommentFromSurvey=function(t){e.prototype.updateCommentFromSurvey.call(this,t),this.prevCommentValue=void 0},Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this.getPropertyValue("renderedValue",null)},set:function(e){this.setPropertyValue("renderedValue",e),e=this.rendredValueToData(e),this.isTwoValueEquals(e,this.value)||(this.value=e)},enumerable:!1,configurable:!0}),t.prototype.setQuestionValue=function(t,n,r){if(void 0===n&&(n=!0),void 0===r&&(r=!0),!this.isLoadingFromJson&&!this.isTwoValueEquals(this.value,t)&&(e.prototype.setQuestionValue.call(this,t,n),this.setPropertyValue("renderedValue",this.rendredValueFromData(t)),!this.hasComment&&r)){var i=this.isOtherSelected;if(i&&this.prevCommentValue){var o=this.prevCommentValue;this.prevCommentValue=void 0,this.comment=o}!i&&this.comment&&(this.getStoreOthersAsComment()&&!this.autoOtherMode&&(this.prevCommentValue=this.comment),this.comment="")}},t.prototype.setNewValue=function(t){t=this.valueFromData(t),(this.choicesByUrl.isRunning||this.choicesByUrl.isWaitingForParameters)&&this.isValueEmpty(t)||(this.cachedValueForUrlRequests=t),e.prototype.setNewValue.call(this,t)},t.prototype.valueFromData=function(t){var n=s.ItemValue.getItemByValue(this.activeChoices,t);return n?n.value:e.prototype.valueFromData.call(this,t)},t.prototype.rendredValueFromData=function(e){return this.getStoreOthersAsComment()?e:this.renderedValueFromDataCore(e)},t.prototype.rendredValueToData=function(e){return this.getStoreOthersAsComment()?e:this.rendredValueToDataCore(e)},t.prototype.renderedValueFromDataCore=function(e){return this.hasUnknownValue(e,!0,!1)?(this.comment=e,this.otherItem.value):this.valueFromData(e)},t.prototype.rendredValueToDataCore=function(e){return e==this.otherItem.value&&this.getQuestionComment()&&(e=this.getQuestionComment()),e},t.prototype.hasUnknownValue=function(e,t,n,r){if(void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!1),!r&&this.isValueEmpty(e))return!1;if(t&&e==this.otherItem.value)return!1;if(this.hasNone&&e==this.noneItem.value)return!1;var i=n?this.getFilteredChoices():this.activeChoices;return null==s.ItemValue.getItemByValue(i,e)},t.prototype.isValueDisabled=function(e){var t=s.ItemValue.getItemByValue(this.getFilteredChoices(),e);return!!t&&!t.isEnabled},Object.defineProperty(t.prototype,"choicesByUrl",{get:function(){return this.getPropertyValue("choicesByUrl")},set:function(e){e&&(this.setNewRestfulProperty(),this.choicesByUrl.fromJSON(e.toJSON()))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.getPropertyValue("choices")},set:function(e){this.setPropertyValue("choices",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choicesFromQuestion",{get:function(){return this.getPropertyValue("choicesFromQuestion")},set:function(e){var t=this.getQuestionWithChoices();t&&t.removeFromDependedQuestion(this),this.setPropertyValue("choicesFromQuestion",e)},enumerable:!1,configurable:!0}),t.prototype.addIntoDependedQuestion=function(e){!e||e.dependedQuestions.indexOf(this)>-1||e.dependedQuestions.push(this)},t.prototype.removeFromDependedQuestion=function(e){if(e){var t=e.dependedQuestions.indexOf(this);t>-1&&e.dependedQuestions.splice(t,1)}},Object.defineProperty(t.prototype,"choicesFromQuestionMode",{get:function(){return this.getPropertyValue("choicesFromQuestionMode")},set:function(e){this.setPropertyValue("choicesFromQuestionMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideIfChoicesEmpty",{get:function(){return this.getPropertyValue("hideIfChoicesEmpty",!1)},set:function(e){this.setPropertyValue("hideIfChoicesEmpty",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepIncorrectValues",{get:function(){return this.getPropertyValue("keepIncorrectValues",!1)},set:function(e){this.setPropertyValue("keepIncorrectValues",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storeOthersAsComment",{get:function(){return this.getPropertyValue("storeOthersAsComment")},set:function(e){this.setPropertyValue("storeOthersAsComment",e)},enumerable:!1,configurable:!0}),t.prototype.hasOtherChanged=function(){this.onVisibleChoicesChanged()},Object.defineProperty(t.prototype,"choicesOrder",{get:function(){return this.getPropertyValue("choicesOrder")},set:function(e){(e=e.toLowerCase())!=this.choicesOrder&&(this.setPropertyValue("choicesOrder",e),this.onVisibleChoicesChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"otherText",{get:function(){return this.getLocalizableStringText("otherText")},set:function(e){this.setLocalizableStringText("otherText",e),this.onVisibleChoicesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locOtherText",{get:function(){return this.getLocalizableString("otherText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"otherErrorText",{get:function(){return this.getLocalizableStringText("otherErrorText")},set:function(e){this.setLocalizableStringText("otherErrorText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locOtherErrorText",{get:function(){return this.getLocalizableString("otherErrorText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleChoices",{get:function(){return this.getPropertyValue("visibleChoices")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enabledChoices",{get:function(){for(var e=[],t=this.visibleChoices,n=0;n<t.length;n++)t[n].isEnabled&&e.push(t[n]);return e},enumerable:!1,configurable:!0}),t.prototype.updateVisibleChoices=function(){if(!this.isLoadingFromJson){var e=new Array,t=this.calcVisibleChoices();t||(t=[]);for(var n=0;n<t.length;n++)e.push(t[n]);this.setPropertyValue("visibleChoices",e)}},t.prototype.calcVisibleChoices=function(){if(this.canUseFilteredChoices())return this.getFilteredChoices();var e=this.sortVisibleChoices(this.getFilteredChoices().slice());return this.addToVisibleChoices(e,this.isAddDefaultItems),e},t.prototype.canUseFilteredChoices=function(){return!this.isAddDefaultItems&&!this.hasNone&&!this.hasOther&&"none"==this.choicesOrder},t.prototype.setCanShowOptionItemCallback=function(e){this.canShowOptionItemCallback=e,e&&this.onVisibleChoicesChanged()},Object.defineProperty(t.prototype,"newItem",{get:function(){return this.newItemValue},enumerable:!1,configurable:!0}),t.prototype.addToVisibleChoices=function(e,t){t&&(this.newItemValue||(this.newItemValue=new s.ItemValue("newitem")),this.canShowOptionItem(this.newItemValue,t,!1)&&e.push(this.newItemValue)),this.supportNone()&&this.canShowOptionItem(this.noneItem,t,this.hasNone)&&e.push(this.noneItem),this.supportOther()&&this.canShowOptionItem(this.otherItem,t,this.hasOther)&&e.push(this.otherItem)},t.prototype.canShowOptionItem=function(e,t,n){var r=t&&(!this.canShowOptionItemCallback||this.canShowOptionItemCallback(e))||n;return this.canSurveyChangeItemVisibility()?this.changeItemVisisbility()(e,r):r},t.prototype.isItemInList=function(e){return e===this.otherItem?this.hasOther:e===this.noneItem?this.hasNone:e!==this.newItemValue},Object.defineProperty(t.prototype,"isAddDefaultItems",{get:function(){return p.settings.supportCreatorV2&&p.settings.showDefaultItemsInCreatorV2&&this.isDesignMode&&!this.isContentElement},enumerable:!1,configurable:!0}),t.prototype.getPlainData=function(t){var n=this;void 0===t&&(t={includeEmpty:!0,includeQuestionTypes:!1});var r=e.prototype.getPlainData.call(this,t);if(r){var i=Array.isArray(this.value)?this.value:[this.value];r.isNode=!0,r.data=(r.data||[]).concat(i.map(function(e,r){var i=s.ItemValue.getItemByValue(n.visibleChoices,e),o={name:r,title:"Choice",value:e,displayValue:n.getChoicesDisplayValue(n.visibleChoices,e),getString:function(e){return"object"==typeof e?JSON.stringify(e):e},isNode:!1};return i&&(t.calculations||[]).forEach(function(e){o[e.propertyName]=i[e.propertyName]}),n.isOtherSelected&&n.otherItemValue===i&&(o.isOther=!0,o.displayValue=n.comment),o}))}return r},t.prototype.getDisplayValueCore=function(e,t){return this.getChoicesDisplayValue(this.visibleChoices,t)},t.prototype.getDisplayValueEmpty=function(){return s.ItemValue.getTextOrHtmlByValue(this.visibleChoices,void 0)},t.prototype.getChoicesDisplayValue=function(e,t){if(t==this.otherItemValue.value)return this.comment?this.comment:this.locOtherText.textOrHtml;var n=s.ItemValue.getTextOrHtmlByValue(e,t);return""==n&&t?t:n},t.prototype.getDisplayArrayValue=function(e,t,n){for(var r=this.visibleChoices,i=[],o=0;o<t.length;o++){var a=n?n(o):t[o],s=this.getChoicesDisplayValue(r,a);s&&i.push(s)}return i.join(", ")},t.prototype.getFilteredChoices=function(){return this.filteredChoicesValue?this.filteredChoicesValue:this.activeChoices},Object.defineProperty(t.prototype,"activeChoices",{get:function(){var e=this.getQuestionWithChoices();return e?(this.addIntoDependedQuestion(e),this.getChoicesFromQuestion(e)):this.choicesFromUrl?this.choicesFromUrl:this.getChoices()},enumerable:!1,configurable:!0}),t.prototype.getQuestionWithChoices=function(){if(!this.choicesFromQuestion||!this.survey)return null;var e=this.survey.getQuestionByName(this.choicesFromQuestion);return e&&e.visibleChoices&&e!==this?e:null},t.prototype.getChoicesFromQuestion=function(e){for(var t=[],n="selected"==this.choicesFromQuestionMode||"unselected"!=this.choicesFromQuestionMode&&void 0,r=e.visibleChoices,i=0;i<r.length;i++)if(!this.isBuiltInChoice(r[i],e))if(void 0!==n){var o=e.isItemSelected(r[i]);(o&&n||!o&&!n)&&t.push(r[i])}else t.push(r[i]);return t},Object.defineProperty(t.prototype,"hasActiveChoices",{get:function(){var e=this.visibleChoices;e&&0!=e.length||(this.onVisibleChoicesChanged(),e=this.visibleChoices);for(var t=0;t<e.length;t++)if(!this.isBuiltInChoice(e[t],this))return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.isHeadChoice=function(e,t){return!1},t.prototype.isFootChoice=function(e,t){return e===t.noneItem||e===t.otherItem||e===t.newItemValue},t.prototype.isBuiltInChoice=function(e,t){return this.isHeadChoice(e,t)||this.isFootChoice(e,t)},t.prototype.getChoices=function(){return this.choices},t.prototype.supportComment=function(){return!0},t.prototype.supportOther=function(){return this.isSupportProperty("hasOther")},t.prototype.supportNone=function(){return this.isSupportProperty("hasNone")},t.prototype.isSupportProperty=function(e){return!this.isDesignMode||i.Serializer.findProperty(this.getType(),e).visible},t.prototype.onCheckForErrors=function(t,n){var r=this;if(e.prototype.onCheckForErrors.call(this,t,n),this.hasOther&&this.isOtherSelected&&!this.comment){var i=new u.OtherEmptyError(this.otherErrorText,this);i.onUpdateErrorTextCallback=function(e){e.text=r.otherErrorText},t.push(i)}},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n),this.runChoicesByUrl(),this.isAddDefaultItems&&this.updateVisibleChoices()},t.prototype.setSurveyCore=function(t){e.prototype.setSurveyCore.call(this,t),t&&this.choicesFromQuestion&&this.onVisibleChoicesChanged()},t.prototype.getStoreOthersAsComment=function(){return!this.isSettingDefaultValue&&(!0===this.storeOthersAsComment||"default"==this.storeOthersAsComment&&(null==this.survey||this.survey.storeOthersAsComment)||!this.choicesByUrl.isEmpty&&!this.choicesFromUrl)},t.prototype.onSurveyLoad=function(){this.runChoicesByUrl(),this.onVisibleChoicesChanged(),e.prototype.onSurveyLoad.call(this)},t.prototype.onAnyValueChanged=function(t){e.prototype.onAnyValueChanged.call(this,t),t!=this.getValueName()&&this.runChoicesByUrl(),t&&t==this.choicesFromQuestion&&this.onVisibleChoicesChanged()},t.prototype.updateValueFromSurvey=function(t){var n="";this.hasOther&&!this.isRunningChoices&&!this.choicesByUrl.isRunning&&this.getStoreOthersAsComment()&&(this.hasUnknownValue(t)&&!this.getHasOther(t)?(n=this.getCommentFromValue(t),t=this.setOtherValueIntoValue(t)):n=this.data.getComment(this.getValueName())),e.prototype.updateValueFromSurvey.call(this,t),n&&this.setNewComment(n)},t.prototype.getCommentFromValue=function(e){return e},t.prototype.setOtherValueIntoValue=function(e){return this.otherItem.value},t.prototype.runChoicesByUrl=function(){if(this.choicesByUrl&&!this.isLoadingFromJson&&!this.isRunningChoices){var e=this.surveyImpl?this.surveyImpl.getTextProcessor():this.textProcessor;e||(e=this.survey),e&&(this.isReadyValue=this.isChoicesLoaded||this.choicesByUrl.isEmpty,this.isRunningChoices=!0,this.choicesByUrl.run(e),this.isRunningChoices=!1)}},t.prototype.onBeforeSendRequest=function(){!0!==p.settings.disableOnGettingChoicesFromWeb||this.isReadOnly||(this.enableOnLoadingChoices=!0,this.readOnly=!0)},t.prototype.onLoadChoicesFromUrl=function(e){if(this.enableOnLoadingChoices&&(this.readOnly=!1),!this.isReadOnly){var t=[];this.choicesByUrl&&this.choicesByUrl.error&&t.push(this.choicesByUrl.error),this.errors=t}var n=null,r=!0;this.isFirstLoadChoicesFromUrl&&!this.cachedValueForUrlRequests&&this.defaultValue&&(this.cachedValueForUrlRequests=this.defaultValue,r=!1),this.isValueEmpty(this.cachedValueForUrlRequests)&&(this.cachedValueForUrlRequests=this.value),this.isFirstLoadChoicesFromUrl=!1;var i=this.createCachedValueForUrlRequests(this.cachedValueForUrlRequests,r);if(e&&(e.length>0||this.choicesByUrl.allowEmptyResponse)&&(n=new Array,s.ItemValue.setData(n,e)),n)for(var o=0;o<n.length;o++)n[o].locOwner=this;if(this.choicesFromUrl=n,this.filterItems(),this.onVisibleChoicesChanged(),n){var a=this.updateCachedValueForUrlRequests(i,n);if(a&&!this.isReadOnly){var l=!this.isTwoValueEquals(this.value,a.value);try{this.isValueEmpty(a.value)||(this.allowNotifyValueChanged=!1,this.setQuestionValue(void 0,!0,!1)),this.allowNotifyValueChanged=l,l?this.value=a.value:this.setQuestionValue(a.value)}finally{this.allowNotifyValueChanged=!0}}}this.choicesLoaded()},t.prototype.createCachedValueForUrlRequests=function(e,t){if(this.isValueEmpty(e))return null;if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++)n.push(this.createCachedValueForUrlRequests(e[r],!0));return n}return{value:e,isExists:!t||!this.hasUnknownValue(e)}},t.prototype.updateCachedValueForUrlRequests=function(e,t){if(this.isValueEmpty(e))return null;if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++){var i=this.updateCachedValueForUrlRequests(e[r],t);if(i&&!this.isValueEmpty(i.value)){var o=i.value;(a=s.ItemValue.getItemByValue(t,i.value))&&(o=a.value),n.push(o)}}return{value:n}}var a,l=e.isExists&&this.hasUnknownValue(e.value)?null:e.value;return(a=s.ItemValue.getItemByValue(t,l))&&(l=a.value),{value:l}},t.prototype.updateChoicesDependedQuestions=function(){if(!this.isUpdatingChoicesDependedQuestions){this.isUpdatingChoicesDependedQuestions=!0;for(var e=0;e<this.dependedQuestions.length;e++)this.dependedQuestions[e].onVisibleChoicesChanged(),this.dependedQuestions[e].updateChoicesDependedQuestions();this.isUpdatingChoicesDependedQuestions=!1}},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.isLoadingFromJson||this.updateChoicesDependedQuestions()},t.prototype.onVisibleChoicesChanged=function(){this.isLoadingFromJson||(this.updateVisibleChoices(),this.updateVisibilityBasedOnChoices(),this.visibleChoicesChangedCallback&&this.visibleChoicesChangedCallback(),this.updateChoicesDependedQuestions())},t.prototype.updateVisibilityBasedOnChoices=function(){if(this.hideIfChoicesEmpty){var e=this.getFilteredChoices();this.visible=!e||e.length>0}},t.prototype.sortVisibleChoices=function(e){var t=this.choicesOrder.toLowerCase();return"asc"==t?this.sortArray(e,1):"desc"==t?this.sortArray(e,-1):"random"==t?this.randomizeArray(e):e},t.prototype.sortArray=function(e,t){return e.sort(function(e,n){return e.calculatedText<n.calculatedText?-1*t:e.calculatedText>n.calculatedText?1*t:0})},t.prototype.randomizeArray=function(e){return h.Helpers.randomizeArray(e)},t.prototype.clearIncorrectValues=function(){this.hasValueToClearIncorrectValues()&&(this.survey&&this.survey.questionCountByValueName(this.getValueName())>1||(!this.choicesByUrl||this.choicesByUrl.isEmpty||this.choicesFromUrl&&0!=this.choicesFromUrl.length)&&(this.clearIncorrectValuesCallback?this.clearIncorrectValuesCallback():this.clearIncorrectValuesCore()))},t.prototype.hasValueToClearIncorrectValues=function(){return!this.keepIncorrectValues&&!this.isEmpty()},t.prototype.clearValueIfInvisibleCore=function(){e.prototype.clearValueIfInvisibleCore.call(this),this.clearIncorrectValues()},t.prototype.isItemSelected=function(e){return e===this.otherItem?this.isOtherSelected:this.isItemSelectedCore(e)},t.prototype.isItemSelectedCore=function(e){return e.value===this.value},t.prototype.clearDisabledValues=function(){this.survey&&this.survey.clearValueOnDisableItems&&this.clearDisabledValuesCore()},t.prototype.clearIncorrectValuesCore=function(){this.canClearValueAnUnknow(this.value)&&this.clearValue()},t.prototype.canClearValueAnUnknow=function(e){return!(!this.getStoreOthersAsComment()&&this.isOtherSelected)&&this.hasUnknownValue(e,!0,!0,!0)},t.prototype.clearDisabledValuesCore=function(){this.isValueDisabled(this.value)&&this.clearValue()},t.prototype.clearUnusedValues=function(){e.prototype.clearUnusedValues.call(this),this.isOtherSelected||this.hasComment||(this.comment="")},t.prototype.getColumnClass=function(){return(new f.CssClassBuilder).append(this.cssClasses.column).append("sv-q-column-"+this.colCount,this.hasColumns).toString()},t.prototype.getItemIndex=function(e){return this.visibleChoices.indexOf(e)},t.prototype.getItemClass=function(e){var t={item:e},n=this.getItemClassCore(e,t);return t.css=n,this.survey&&this.survey.updateChoiceItemCss(this,t),t.css},t.prototype.getCurrentColCount=function(){return this.colCount},t.prototype.getItemClassCore=function(e,t){var n=(new f.CssClassBuilder).append(this.cssClasses.item).append(this.cssClasses.itemInline,!this.hasColumns&&0===this.colCount).append("sv-q-col-"+this.getCurrentColCount(),!this.hasColumns&&0!==this.colCount).append(this.cssClasses.itemOnError,this.errors.length>0),r=this.isReadOnly||!e.isEnabled,i=this.isItemSelected(e)||this.isOtherSelected&&this.otherItem.value===e.value,o=!(r||i||this.survey&&this.survey.isDesignMode),a=e===this.noneItem;return t.isDisabled=r,t.isChecked=i,t.isNone=a,n.append(this.cssClasses.itemDisabled,r).append(this.cssClasses.itemChecked,i).append(this.cssClasses.itemHover,o).append(this.cssClasses.itemNone,a).toString()},t.prototype.getLabelClass=function(e){return(new f.CssClassBuilder).append(this.cssClasses.label).append(this.cssClasses.labelChecked,this.isItemSelected(e)).toString()},t.prototype.getControlLabelClass=function(e){return(new f.CssClassBuilder).append(this.cssClasses.controlLabel).append(this.cssClasses.controlLabelChecked,this.isItemSelected(e)).toString()||void 0},Object.defineProperty(t.prototype,"headItems",{get:function(){var e=this;return this.separateSpecialChoices||this.isDesignMode?this.visibleChoices.filter(function(t){return e.isHeadChoice(t,e)}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"footItems",{get:function(){var e=this;return this.separateSpecialChoices||this.isDesignMode?this.visibleChoices.filter(function(t){return e.isFootChoice(t,e)}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataChoices",{get:function(){var e=this;return this.visibleChoices.filter(function(t){return!e.isBuiltInChoice(t,e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodyItems",{get:function(){return this.hasHeadItems||this.hasFootItems?this.dataChoices:this.visibleChoices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasHeadItems",{get:function(){return this.headItems.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFootItems",{get:function(){return this.footItems.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){var e=[],t=this.getCurrentColCount();if(this.hasColumns&&this.visibleChoices.length>0){var n=this.separateSpecialChoices||this.isDesignMode?this.dataChoices:this.visibleChoices;if("column"==p.settings.showItemsInOrder)for(var r=0,i=n.length%t,o=0;o<t;o++){for(var a=[],s=r;s<r+Math.floor(n.length/t);s++)a.push(n[s]);i>0&&(i--,a.push(n[s]),s++),r=s,e.push(a)}else for(o=0;o<t;o++){for(a=[],s=o;s<n.length;s+=t)a.push(n[s]);e.push(a)}}return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasColumns",{get:function(){return!this.isMobile&&this.getCurrentColCount()>1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowLayout",{get:function(){return 0==this.getCurrentColCount()&&!(this.hasFootItems||this.hasHeadItems)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blockedRow",{get:function(){return 0==this.getCurrentColCount()&&(this.hasFootItems||this.hasHeadItems)},enumerable:!1,configurable:!0}),t.prototype.choicesLoaded=function(){this.isChoicesLoaded=!0;var e=this.isReadyValue;this.isReadyValue=!0,this.onReadyChanged&&this.onReadyChanged.fire(this,{question:this,isReady:!0,oldIsReady:e}),this.survey&&this.survey.loadedChoicesFromServer(this),this.loadedChoicesFromServerCallback&&this.loadedChoicesFromServerCallback()},t.prototype.getItemValueWrapperComponentName=function(e){var t=this.survey;return t?t.getItemValueWrapperComponentName(e,this):o.SurveyModel.TemplateRendererComponentName},t.prototype.getItemValueWrapperComponentData=function(e){var t=this.survey;return t?t.getItemValueWrapperComponentData(e,this):e},t.prototype.ariaItemChecked=function(e){return this.renderedValue===e.value?"true":"false"},t.prototype.isOtherItem=function(e){return this.hasOther&&e.value==this.otherItem.value},Object.defineProperty(t.prototype,"itemSvgIcon",{get:function(){return this.cssClasses.itemSvgIconId},enumerable:!1,configurable:!0}),t.prototype.getSelectBaseRootCss=function(){return(new f.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.rootRow,this.rowLayout).toString()},t.prototype.getAriaItemLabel=function(e){return e.locText.renderedHtml},t.prototype.getItemId=function(e){return this.inputId+"_"+this.getItemIndex(e)},Object.defineProperty(t.prototype,"questionName",{get:function(){return this.name+"_"+this.id},enumerable:!1,configurable:!0}),t.prototype.getItemEnabled=function(e){return!this.isInputReadOnly&&e.isEnabled},t.prototype.afterRender=function(t){e.prototype.afterRender.call(this,t),this.rootElement=t},t.prototype.focusOtherComment=function(){var e=this;this.rootElement&&setTimeout(function(){var t=e.rootElement.querySelector("textarea");t&&t.focus()},10)},t.prototype.onValueChanged=function(){e.prototype.onValueChanged.call(this),this.isDesignMode||this.prevIsOtherSelected||!this.isOtherSelected||this.focusOtherComment(),this.prevIsOtherSelected=this.isOtherSelected},g([Object(i.property)({defaultValue:!1})],t.prototype,"separateSpecialChoices",void 0),g([Object(i.property)({localizable:!0})],t.prototype,"otherPlaceHolder",void 0),t}(a.Question),y=function(e){function t(t){return e.call(this,t)||this}return m(t,e),Object.defineProperty(t.prototype,"colCount",{get:function(){return this.getPropertyValue("colCount",this.isFlowLayout?0:1)},set:function(e){e<0||e>5||this.isFlowLayout||(this.setPropertyValue("colCount",e),this.fireCallback(this.colCountChangedCallback))},enumerable:!1,configurable:!0}),t.prototype.onParentChanged=function(){e.prototype.onParentChanged.call(this),this.isFlowLayout&&this.setPropertyValue("colCount",null)},t.prototype.onParentQuestionChanged=function(){this.onVisibleChoicesChanged()},t.prototype.getSearchableItemValueKeys=function(e){e.push("choices")},t}(v);i.Serializer.addClass("selectbase",[{name:"hasComment:switch",layout:"row"},{name:"commentText",dependsOn:"hasComment",visibleIf:function(e){return e.hasComment},serializationProperty:"locCommentText",layout:"row"},"choicesFromQuestion:question_selectbase",{name:"choices:itemvalue[]",baseValue:function(){return l.surveyLocalization.getString("choices_Item")},dependsOn:"choicesFromQuestion",visibleIf:function(e){return!e.choicesFromQuestion}},{name:"choicesFromQuestionMode",default:"all",choices:["all","selected","unselected"],dependsOn:"choicesFromQuestion",visibleIf:function(e){return!!e.choicesFromQuestion}},{name:"choicesOrder",default:"none",choices:["none","asc","desc","random"],dependsOn:"choicesFromQuestion",visibleIf:function(e){return!e.choicesFromQuestion}},{name:"choicesByUrl:restfull",className:"ChoicesRestful",onGetValue:function(e){return e.choicesByUrl.getData()},onSetValue:function(e,t){e.choicesByUrl.setData(t)}},"hideIfChoicesEmpty:boolean",{name:"choicesVisibleIf:condition",dependsOn:"choicesFromQuestion",visibleIf:function(e){return!e.choicesFromQuestion}},{name:"choicesEnableIf:condition",dependsOn:"choicesFromQuestion",visibleIf:function(e){return!e.choicesFromQuestion}},{name:"separateSpecialChoices:boolean",visible:!1},"hasOther:boolean","hasNone:boolean",{name:"otherPlaceHolder",serializationProperty:"locOtherPlaceHolder",dependsOn:"hasOther",visibleIf:function(e){return e.hasOther}},{name:"commentPlaceHolder",serializationProperty:"locCommentPlaceHolder",dependsOn:"hasComment",visibleIf:function(e){return e.hasComment}},{name:"noneText",serializationProperty:"locNoneText",dependsOn:"hasNone",visibleIf:function(e){return e.hasNone}},{name:"otherText",serializationProperty:"locOtherText",dependsOn:"hasOther",visibleIf:function(e){return e.hasOther}},{name:"otherErrorText",serializationProperty:"locOtherErrorText",dependsOn:"hasOther",visibleIf:function(e){return e.hasOther}},{name:"storeOthersAsComment",default:"default",choices:["default",!0,!1],visible:!1}],null,"question"),i.Serializer.addClass("checkboxbase",[{name:"colCount:number",default:1,choices:[0,1,2,3,4,5],layout:"row"}],null,"selectbase")},"./src/question_boolean.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionBooleanModel",function(){return d});var r,i=n("./src/questionfactory.ts"),o=n("./src/jsonobject.ts"),a=n("./src/question.ts"),s=n("./src/utils/cssClassBuilder.ts"),l=n("./src/utils/utils.ts"),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},d=function(e){function t(t){var n=e.call(this,t)||this;return n.createLocalizableString("labelFalse",n,!0,"booleanUncheckedLabel"),n.createLocalizableString("labelTrue",n,!0,"booleanCheckedLabel"),n}return u(t,e),t.prototype.getType=function(){return"boolean"},t.prototype.isLayoutTypeSupported=function(e){return!0},t.prototype.supportGoNextPageAutomatic=function(){return"checkbox"!==this.renderAs},Object.defineProperty(t.prototype,"isIndeterminate",{get:function(){return this.isEmpty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitle",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"checkedValue",{get:function(){return this.isEmpty()?null:this.value==this.getValueTrue()},set:function(e){this.isReadOnly||this.setCheckedValue(e)},enumerable:!1,configurable:!0}),t.prototype.setCheckedValue=function(e){this.value=this.isValueEmpty(e)?null:1==e?this.getValueTrue():this.getValueFalse()},Object.defineProperty(t.prototype,"defaultValue",{get:function(){return this.getPropertyValue("defaultValue")},set:function(e){!0===e&&(e="true"),!1===e&&(e="false"),void 0===e&&(e="indeterminate"),this.setPropertyValue("defaultValue",e),this.updateValueWithDefaults()},enumerable:!1,configurable:!0}),t.prototype.getDefaultValue=function(){return"indeterminate"==this.defaultValue||void 0===this.defaultValue?null:"true"==this.defaultValue?this.getValueTrue():this.getValueFalse()},Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.showTitle||this.isValueEmpty(this.locLabel.text)?this.getLocalizableString("title"):this.locLabel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locDisplayLabel",{get:function(){return this.locLabel.text||this.showTitle?this.locLabel:this.locTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelTrue",{get:function(){return this.getLocalizableStringText("labelTrue")},set:function(e){this.setLocalizableStringText("labelTrue",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locLabelTrue",{get:function(){return this.getLocalizableString("labelTrue")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDeterminated",{get:function(){return null!==this.checkedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelFalse",{get:function(){return this.getLocalizableStringText("labelFalse")},set:function(e){this.setLocalizableStringText("labelFalse",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locLabelFalse",{get:function(){return this.getLocalizableString("labelFalse")},enumerable:!1,configurable:!0}),t.prototype.getValueTrue=function(){return!this.valueTrue||this.valueTrue},t.prototype.getValueFalse=function(){return!!this.valueFalse&&this.valueFalse},t.prototype.setDefaultValue=function(){this.isDefaultValueSet("true",this.valueTrue)&&this.setCheckedValue(!0),this.isDefaultValueSet("false",this.valueFalse)&&this.setCheckedValue(!1),"indeterminate"==this.defaultValue&&this.setCheckedValue(null)},t.prototype.isDefaultValueSet=function(e,t){return this.defaultValue==e||void 0!==t&&this.defaultValue===t},t.prototype.getDisplayValueCore=function(e,t){return t==this.getValueTrue()?this.locLabelTrue.textOrHtml:this.locLabelFalse.textOrHtml},t.prototype.getItemCssValue=function(e){return(new s.CssClassBuilder).append(e.item).append(e.itemOnError,this.errors.length>0).append(e.itemDisabled,this.isReadOnly).append(e.itemChecked,!!this.checkedValue).append(e.itemIndeterminate,null===this.checkedValue).toString()},t.prototype.getItemCss=function(){return this.getItemCssValue(this.cssClasses)},t.prototype.getCheckboxItemCss=function(){return this.getItemCssValue({item:this.cssClasses.checkboxItem,itemOnError:this.cssClasses.checkboxItemOnError,itemDisabled:this.cssClasses.checkboxItemDisabled,itemChecked:this.cssClasses.checkboxItemChecked,itemIndeterminate:this.cssClasses.checkboxItemIndeterminate})},t.prototype.getLabelCss=function(e){return(new s.CssClassBuilder).append(this.cssClasses.label).append(this.cssClasses.disabledLabel,this.checkedValue===!e||this.isReadOnly).toString()},Object.defineProperty(t.prototype,"svgIcon",{get:function(){return this.checkedValue&&this.cssClasses.svgIconCheckedId?this.cssClasses.svgIconCheckedId:null===this.checkedValue&&this.cssClasses.svgIconIndId?this.cssClasses.svgIconIndId:!this.checkedValue&&this.cssClasses.svgIconUncheckedId?this.cssClasses.svgIconUncheckedId:this.cssClasses.svgIconId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowClick",{get:function(){return this.isIndeterminate&&!this.isInputReadOnly},enumerable:!1,configurable:!0}),t.prototype.getCheckedLabel=function(){return!0===this.checkedValue?this.locLabelTrue:!1===this.checkedValue?this.locLabelFalse:void 0},t.prototype.setQuestionValue=function(t,n){void 0===n&&(n=!0),"true"===t&&"true"!==this.valueTrue&&(t=!0),"false"===t&&"false"!==this.valueFalse&&(t=!1),"indeterminate"===t&&(t=null),e.prototype.setQuestionValue.call(this,t,n)},t.prototype.onLabelClick=function(e,t){return this.allowClick&&(Object(l.preventDefaults)(e),this.checkedValue=t),!0},t.prototype.calculateCheckedValueByEvent=function(e,t){var n="rtl"==document.defaultView.getComputedStyle(e.target).direction;this.checkedValue=n?!t:t},t.prototype.onSwitchClickModel=function(e){return!this.allowClick||(Object(l.preventDefaults)(e),void this.calculateCheckedValueByEvent(e,e.offsetX/e.target.offsetWidth>.5))},t.prototype.onKeyDownCore=function(e){return"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(Object(l.preventDefaults)(e),void this.calculateCheckedValueByEvent(e,"ArrowRight"===e.key))},t.prototype.getRadioItemClass=function(e,t){var n=void 0;return e.radioItem&&(n=e.radioItem),e.radioItemChecked&&t===this.value&&(n=(n?n+" ":"")+e.radioItemChecked),n},t.prototype.supportResponsiveness=function(){return!0},t.prototype.getCompactRenderAs=function(){return"radio"},c([Object(o.property)({localizable:!0})],t.prototype,"label",void 0),c([Object(o.property)()],t.prototype,"showTitle",void 0),c([Object(o.property)()],t.prototype,"valueTrue",void 0),c([Object(o.property)()],t.prototype,"valueFalse",void 0),t}(a.Question);o.Serializer.addClass("boolean",[{name:"label:text",serializationProperty:"locLabel"},{name:"labelTrue:text",serializationProperty:"locLabelTrue"},{name:"labelFalse:text",serializationProperty:"locLabelFalse"},"showTitle:boolean","valueTrue","valueFalse",{name:"renderAs",default:"default",visible:!1}],function(){return new d("")},"question"),i.QuestionFactory.Instance.registerQuestion("boolean",function(e){return new d(e)})},"./src/question_buttongroup.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ButtonGroupItemValue",function(){return c}),n.d(t,"QuestionButtonGroupModel",function(){return d}),n.d(t,"ButtonGroupItemModel",function(){return h});var r,i=n("./src/jsonobject.ts"),o=n("./src/itemvalue.ts"),a=n("./src/question_baseselect.ts"),s=n("./src/utils/cssClassBuilder.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},c=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r="buttongroupitemvalue");var i=e.call(this,t,n,r)||this;return i.typeName=r,i}return l(t,e),t.prototype.getType=function(){return this.typeName?this.typeName:"buttongroupitemvalue"},u([Object(i.property)()],t.prototype,"iconName",void 0),u([Object(i.property)()],t.prototype,"iconSize",void 0),u([Object(i.property)()],t.prototype,"showCaption",void 0),t}(o.ItemValue),d=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.getType=function(){return"buttongroup"},t.prototype.getItemValueType=function(){return"buttongroupitemvalue"},t.prototype.supportOther=function(){return!1},t}(a.QuestionCheckboxBase);i.Serializer.addClass("buttongroup",[{name:"choices:buttongroupitemvalue[]"}],function(){return new d("")},"checkboxbase"),i.Serializer.addClass("buttongroupitemvalue",[{name:"showCaption:boolean",default:!0},{name:"iconName:text"},{name:"iconSize:number"}],function(e){return new c(e)},"itemvalue");var h=function(){function e(e,t,n){this.question=e,this.item=t,this.index=n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.item.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconName",{get:function(){return this.item.iconName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconSize",{get:function(){return this.item.iconSize||24},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this.item.locText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showCaption",{get:function(){return this.item.showCaption||void 0===this.item.showCaption},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRequired",{get:function(){return this.question.isRequired},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this.question.isItemSelected(this.item)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readOnly",{get:function(){return this.question.isInputReadOnly||!this.item.isEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.question.name+"_"+this.question.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.question.inputId+"_"+this.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasErrors",{get:function(){return this.question.errors.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"describedBy",{get:function(){return this.question.errors.length>0?this.question.id+"_errors":null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelClass",{get:function(){return(new s.CssClassBuilder).append(this.question.cssClasses.item).append(this.question.cssClasses.itemSelected,this.selected).append(this.question.cssClasses.itemHover,!this.readOnly&&!this.selected).append(this.question.cssClasses.itemDisabled,this.question.isReadOnly||!this.item.isEnabled).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"css",{get:function(){return{label:this.labelClass,icon:this.question.cssClasses.itemIcon,control:this.question.cssClasses.itemControl,caption:this.question.cssClasses.itemCaption,decorator:this.question.cssClasses.itemDecorator}},enumerable:!1,configurable:!0}),e.prototype.onChange=function(){this.question.renderedValue=this.item.value},e}()},"./src/question_checkbox.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionCheckboxModel",function(){return d});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question_baseselect.ts"),s=n("./src/helpers.ts"),l=n("./src/itemvalue.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(t){var n=e.call(this,t)||this;n.selectAllItemValue=new l.ItemValue("selectall"),n.invisibleOldValues={},n.isChangingValueOnClearIncorrect=!1;var r=n.createLocalizableString("selectAllText",n,!0,"selectAllItemText");return n.selectAllItem.locOwner=n,n.selectAllItem.setLocText(r),n.registerFunctionOnPropertiesValueChanged(["hasSelectAll","selectAllText"],function(){n.onVisibleChoicesChanged()}),n}return c(t,e),Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"listbox"},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"checkbox"},t.prototype.onCreating=function(){e.prototype.onCreating.call(this),this.createNewArray("renderedValue"),this.createNewArray("value")},t.prototype.getFirstInputElementId=function(){return this.inputId+"_0"},Object.defineProperty(t.prototype,"valuePropertyName",{get:function(){return this.getPropertyValue("valuePropertyName")},set:function(e){this.setPropertyValue("valuePropertyName",e)},enumerable:!1,configurable:!0}),t.prototype.getQuestionFromArray=function(e,t){if(e&&e===this.valuePropertyName){var n=this.value;if(Array.isArray(n)&&t<n.length)return this}return null},Object.defineProperty(t.prototype,"selectAllItem",{get:function(){return this.selectAllItemValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectAllText",{get:function(){return this.getLocalizableStringText("selectAllText")},set:function(e){this.setLocalizableStringText("selectAllText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locSelectAllText",{get:function(){return this.getLocalizableString("selectAllText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSelectAll",{get:function(){return this.getPropertyValue("hasSelectAll",!1)},set:function(e){this.setPropertyValue("hasSelectAll",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAllSelected",{get:function(){var e=this.value;if(!e||!Array.isArray(e))return!1;if(this.isItemSelected(this.noneItem))return!1;var t=this.visibleChoices.length;this.hasOther&&t--,this.hasNone&&t--,this.hasSelectAll&&t--;var n=e.length;return this.isOtherSelected&&n--,n===t},set:function(e){e?this.selectAll():this.clearValue()},enumerable:!1,configurable:!0}),t.prototype.toggleSelectAll=function(){this.isAllSelected=!this.isAllSelected},t.prototype.selectAll=function(){for(var e=[],t=0;t<this.visibleChoices.length;t++){var n=this.visibleChoices[t];n!==this.noneItem&&n!==this.otherItem&&n!==this.selectAllItem&&e.push(n.value)}this.renderedValue=e},t.prototype.isItemSelectedCore=function(e){if(e===this.selectAllItem)return this.isAllSelected;var t=this.renderedValue;if(!t||!Array.isArray(t))return!1;for(var n=0;n<t.length;n++)if(this.isTwoValueEquals(t[n],e.value))return!0;return!1},t.prototype.getRealValue=function(e){return e&&this.valuePropertyName?e[this.valuePropertyName]:e},Object.defineProperty(t.prototype,"maxSelectedChoices",{get:function(){return this.getPropertyValue("maxSelectedChoices")},set:function(e){e<0&&(e=0),this.setPropertyValue("maxSelectedChoices",e),this.filterItems()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItems",{get:function(){if(this.isEmpty())return[];for(var e=this.renderedValue,t=[],n=0;n<e.length;n++)t.push(l.ItemValue.getItemByValue(this.visibleChoices,e[n]));return t},enumerable:!1,configurable:!0}),t.prototype.onEnableItemCallBack=function(e){return!this.shouldCheckMaxSelectedChoices()||this.isItemSelected(e)},t.prototype.onAfterRunItemsEnableCondition=function(){this.maxSelectedChoices<1||(this.hasSelectAll&&this.selectAllItem.setIsEnabled(this.maxSelectedChoices>=this.activeChoices.length),this.hasOther&&this.otherItem.setIsEnabled(!this.shouldCheckMaxSelectedChoices()||this.isOtherSelected))},t.prototype.shouldCheckMaxSelectedChoices=function(){if(this.maxSelectedChoices<1)return!1;var e=this.value;return(Array.isArray(e)?e.length:0)>=this.maxSelectedChoices},t.prototype.getItemClassCore=function(t,n){return n.isSelectAllItem=t===this.selectAllItem,(new u.CssClassBuilder).append(e.prototype.getItemClassCore.call(this,t,n)).append(this.cssClasses.itemSelectAll,n.isSelectAllItem).toString()},t.prototype.updateValueFromSurvey=function(t){e.prototype.updateValueFromSurvey.call(this,t),this.invisibleOldValues={}},t.prototype.setDefaultValue=function(){e.prototype.setDefaultValue.call(this);var t=this.defaultValue;if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=this.getRealValue(t[n]);this.canClearValueAnUnknow(r)&&this.addIntoInvisibleOldValues(r)}},t.prototype.addIntoInvisibleOldValues=function(e){this.invisibleOldValues[e]=e},t.prototype.hasValueToClearIncorrectValues=function(){return e.prototype.hasValueToClearIncorrectValues.call(this)||!s.Helpers.isValueEmpty(this.invisibleOldValues)},t.prototype.setNewValue=function(t){this.isChangingValueOnClearIncorrect||(this.invisibleOldValues={}),t=this.valueFromData(t);var n=this.value;if(t||(t=[]),n||(n=[]),!this.isTwoValueEquals(n,t)){if(this.hasNone){var r=this.noneIndexInArray(n),i=this.noneIndexInArray(t);r>-1?i>-1&&t.length>1&&t.splice(i,1):i>-1&&(t.splice(0,t.length),t.push(this.noneItem.value))}e.prototype.setNewValue.call(this,t)}},t.prototype.getIsMultipleValue=function(){return!0},t.prototype.getCommentFromValue=function(e){var t=this.getFirstUnknownIndex(e);return t<0?"":e[t]},t.prototype.setOtherValueIntoValue=function(e){var t=this.getFirstUnknownIndex(e);return t<0||e.splice(t,1,this.otherItem.value),e},t.prototype.getFirstUnknownIndex=function(e){if(!Array.isArray(e))return-1;for(var t=0;t<e.length;t++)if(this.hasUnknownValue(e[t],!1,!1))return t;return-1},t.prototype.noneIndexInArray=function(e){if(!e||!Array.isArray(e))return-1;for(var t=this.noneItem.value,n=0;n<e.length;n++)if(e[n]==t)return n;return-1},t.prototype.canUseFilteredChoices=function(){return!this.hasSelectAll&&e.prototype.canUseFilteredChoices.call(this)},t.prototype.supportSelectAll=function(){return this.isSupportProperty("hasSelectAll")},t.prototype.addToVisibleChoices=function(t,n){this.supportSelectAll()&&this.canShowOptionItem(this.selectAllItem,n,this.hasSelectAll)&&t.unshift(this.selectAllItem),e.prototype.addToVisibleChoices.call(this,t,n)},t.prototype.isHeadChoice=function(e,t){return e===t.selectAllItem},t.prototype.isItemInList=function(t){return t==this.selectAllItem?this.hasSelectAll:e.prototype.isItemInList.call(this,t)},t.prototype.getDisplayValueCore=function(t,n){if(!Array.isArray(n))return e.prototype.getDisplayValueCore.call(this,t,n);var r=this.valuePropertyName;return this.getDisplayArrayValue(t,n,function(e){var t=n[e];return r&&t[r]&&(t=t[r]),t})},t.prototype.clearIncorrectValuesCore=function(){this.clearIncorrectAndDisabledValues(!1)},t.prototype.clearDisabledValuesCore=function(){this.clearIncorrectAndDisabledValues(!0)},t.prototype.clearIncorrectAndDisabledValues=function(e){var t=this.value,n=!1,r=this.restoreValuesFromInvisible();if(t||0!=r.length){if(!Array.isArray(t)||0==t.length){if(this.isChangingValueOnClearIncorrect=!0,e||(this.hasComment?this.value=null:this.clearValue()),this.isChangingValueOnClearIncorrect=!1,0==r.length)return;t=[]}for(var i=[],o=0;o<t.length;o++){var a=this.getRealValue(t[o]),s=this.canClearValueAnUnknow(a);!e&&!s||e&&!this.isValueDisabled(a)?i.push(t[o]):(n=!0,s&&this.addIntoInvisibleOldValues(t[o]))}for(o=0;o<r.length;o++)i.push(r[o]),n=!0;n&&(this.isChangingValueOnClearIncorrect=!0,0==i.length?this.clearValue():this.value=i,this.isChangingValueOnClearIncorrect=!1)}},t.prototype.restoreValuesFromInvisible=function(){for(var e=[],t=this.visibleChoices,n=0;n<t.length;n++){var r=t[n].value;s.Helpers.isTwoValueEquals(r,this.invisibleOldValues[r])&&(this.isItemSelected(t[n])||e.push(r),delete this.invisibleOldValues[r])}return e},t.prototype.getConditionJson=function(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.prototype.getConditionJson.call(this);return"contains"!=t&&"notcontains"!=t||(r.type="radiogroup"),r},t.prototype.isAnswerCorrect=function(){return s.Helpers.isArrayContainsEqual(this.value,this.correctAnswer)},t.prototype.setDefaultValueWithOthers=function(){this.value=this.renderedValueFromDataCore(this.defaultValue)},t.prototype.getHasOther=function(e){return!(!e||!Array.isArray(e))&&e.indexOf(this.otherItem.value)>=0},t.prototype.valueFromData=function(t){if(!t)return t;if(!Array.isArray(t))return[e.prototype.valueFromData.call(this,t)];for(var n=[],r=0;r<t.length;r++){var i=l.ItemValue.getItemByValue(this.activeChoices,t[r]);n.push(i?i.value:t[r])}return n},t.prototype.rendredValueFromData=function(t){return t=this.convertValueFromObject(t),e.prototype.rendredValueFromData.call(this,t)},t.prototype.rendredValueToData=function(t){return t=e.prototype.rendredValueToData.call(this,t),this.convertValueToObject(t)},t.prototype.convertValueFromObject=function(e){return this.valuePropertyName?s.Helpers.convertArrayObjectToValue(e,this.valuePropertyName):e},t.prototype.convertValueToObject=function(e){if(!this.valuePropertyName)return e;var t=void 0;return this.survey&&this.survey.questionCountByValueName(this.getValueName())>1&&(t=this.data.getValue(this.getValueName())),s.Helpers.convertArrayValueToObject(e,this.valuePropertyName,t)},t.prototype.renderedValueFromDataCore=function(e){if(e&&Array.isArray(e)||(e=[]),!this.hasActiveChoices)return e;for(var t=0;t<e.length;t++){if(e[t]==this.otherItem.value)return e;if(this.hasUnknownValue(e[t],!0,!1)){this.comment=e[t];var n=e.slice();return n[t]=this.otherItem.value,n}}return e},t.prototype.rendredValueToDataCore=function(e){if(!e||!e.length)return e;for(var t=0;t<e.length;t++)if(e[t]==this.otherItem.value&&this.getQuestionComment()){var n=e.slice();return n[t]=this.getQuestionComment(),n}return e},t.prototype.selectOtherValueFromComment=function(e){var t=[],n=this.renderedValue;if(Array.isArray(n))for(var r=0;r<n.length;r++)n[r]!==this.otherItem.value&&t.push(n[r]);e&&t.push(this.otherItem.value),this.value=t},Object.defineProperty(t.prototype,"checkBoxSvgPath",{get:function(){return"M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z"},enumerable:!1,configurable:!0}),t}(a.QuestionCheckboxBase);i.Serializer.addClass("checkbox",["hasSelectAll:boolean",{name:"separateSpecialChoices",visible:!0},{name:"maxSelectedChoices:number",default:0},{name:"selectAllText",serializationProperty:"locSelectAllText",dependsOn:"hasSelectAll",visibleIf:function(e){return e.hasSelectAll}},{name:"valuePropertyName",category:"data"}],function(){return new d("")},"checkboxbase"),o.QuestionFactory.Instance.registerQuestion("checkbox",function(e){var t=new d(e);return t.choices=o.QuestionFactory.DefaultChoices,t})},"./src/question_comment.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionCommentModel",function(){return u});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question_textbase.ts"),s=n("./src/utils/utils.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),Object.defineProperty(t.prototype,"rows",{get:function(){return this.getPropertyValue("rows")},set:function(e){this.setPropertyValue("rows",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this.getPropertyValue("cols")},set:function(e){this.setPropertyValue("cols",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acceptCarriageReturn",{get:function(){return this.getPropertyValue("acceptCarriageReturn")},set:function(e){this.setPropertyValue("acceptCarriageReturn",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoGrow",{get:function(){return this.getPropertyValue("autoGrow")||this.survey&&this.survey.autoGrowComment},set:function(e){this.setPropertyValue("autoGrow",e)},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"comment"},t.prototype.afterRenderQuestionElement=function(t){this.element=document.getElementById(this.inputId)||t,this.updateElement(),e.prototype.afterRenderQuestionElement.call(this,t)},t.prototype.updateElement=function(){var e=this;this.element&&this.autoGrow&&setTimeout(function(){return Object(s.increaseHeightByContent)(e.element)},1)},t.prototype.onInput=function(e){this.isInputTextUpdate?this.value=e.target.value:this.updateElement()},t.prototype.onKeyDown=function(e){this.acceptCarriageReturn||"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),e.stopPropagation())},t.prototype.onValueChanged=function(){e.prototype.onValueChanged.call(this),this.updateElement()},t.prototype.setNewValue=function(t){!this.acceptCarriageReturn&&t&&(t=t.replace(new RegExp("(\r\n|\n|\r)","gm"),"")),e.prototype.setNewValue.call(this,t)},Object.defineProperty(t.prototype,"className",{get:function(){return(this.cssClasses?this.getControlClass():"panel-comment-root")||void 0},enumerable:!1,configurable:!0}),t}(a.QuestionTextBase);i.Serializer.addClass("comment",[{name:"maxLength:number",default:-1},{name:"cols:number",default:50},{name:"rows:number",default:4},{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder"},{name:"textUpdateMode",default:"default",choices:["default","onBlur","onTyping"]},{name:"autoGrow:boolean"},{name:"acceptCarriageReturn:boolean",default:!0,visible:!1}],function(){return new u("")},"textbase"),o.QuestionFactory.Instance.registerQuestion("comment",function(e){return new u(e)})},"./src/question_custom.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ComponentQuestionJSON",function(){return d}),n.d(t,"ComponentCollection",function(){return h}),n.d(t,"QuestionCustomModelBase",function(){return p}),n.d(t,"QuestionCustomModel",function(){return f}),n.d(t,"QuestionCompositeModel",function(){return g});var r,i=n("./src/question.ts"),o=n("./src/jsonobject.ts"),a=n("./src/survey-element.ts"),s=n("./src/helpers.ts"),l=n("./src/textPreProcessor.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){function e(e,t){this.name=e,this.json=t;var n=this;o.Serializer.addClass(e,[],function(e){return h.Instance.createQuestion(e?e.name:"",n)},"question"),this.onInit()}return e.prototype.onInit=function(){this.json.onInit&&this.json.onInit()},e.prototype.onCreated=function(e){this.json.onCreated&&this.json.onCreated(e)},e.prototype.onLoaded=function(e){this.json.onLoaded&&this.json.onLoaded(e)},e.prototype.onAfterRender=function(e,t){this.json.onAfterRender&&this.json.onAfterRender(e,t)},e.prototype.onAfterRenderContentElement=function(e,t,n){this.json.onAfterRenderContentElement&&this.json.onAfterRenderContentElement(e,t,n)},e.prototype.onPropertyChanged=function(e,t,n){this.json.onPropertyChanged&&this.json.onPropertyChanged(e,t,n)},e.prototype.onValueChanged=function(e,t,n){this.json.onValueChanged&&this.json.onValueChanged(e,t,n)},e.prototype.onItemValuePropertyChanged=function(e,t,n,r,i){this.json.onItemValuePropertyChanged&&this.json.onItemValuePropertyChanged(e,{obj:t,propertyName:n,name:r,newValue:i})},e.prototype.getDisplayValue=function(e,t,n){return this.json.getDisplayValue?this.json.getDisplayValue(n):n.getDisplayValue(e,t)},Object.defineProperty(e.prototype,"isComposite",{get:function(){return!!this.json.elementsJSON||!!this.json.createElements},enumerable:!1,configurable:!0}),e}(),h=function(){function e(){this.customQuestionValues=[]}return e.prototype.add=function(e){if(e){var t=e.name;if(!t)throw"Attribute name is missed";if(t=t.toLowerCase(),this.getCustomQuestionByName(t))throw"There is already registered custom question with name '"+t+"'";if(o.Serializer.findClass(t))throw"There is already class with name '"+t+"'";var n=new d(t,e);this.onAddingJson&&this.onAddingJson(t,n.isComposite),this.customQuestionValues.push(n)}},Object.defineProperty(e.prototype,"items",{get:function(){return this.customQuestionValues},enumerable:!1,configurable:!0}),e.prototype.getCustomQuestionByName=function(e){for(var t=0;t<this.customQuestionValues.length;t++)if(this.customQuestionValues[t].name==e)return this.customQuestionValues[t];return null},e.prototype.clear=function(){for(var e=0;e<this.customQuestionValues.length;e++)o.Serializer.removeClass(this.customQuestionValues[e].name);this.customQuestionValues=[]},e.prototype.createQuestion=function(e,t){return t.isComposite?this.createCompositeModel(e,t):this.createCustomModel(e,t)},e.prototype.createCompositeModel=function(e,t){return this.onCreateComposite?this.onCreateComposite(e,t):new g(e,t)},e.prototype.createCustomModel=function(e,t){return this.onCreateCustom?this.onCreateCustom(e,t):new f(e,t)},e.Instance=new e,e}(),p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.customQuestion=n,o.CustomPropertiesCollection.createProperties(r),a.SurveyElement.CreateDisabledDesignElements=!0,r.createWrapper(),a.SurveyElement.CreateDisabledDesignElements=!1,r.customQuestion&&r.customQuestion.onCreated(r),r}return c(t,e),t.prototype.getType=function(){return this.customQuestion?this.customQuestion.name:"custom"},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.getElement()&&this.getElement().locStrsChanged()},t.prototype.createWrapper=function(){},t.prototype.onPropertyValueChanged=function(t,n,r){e.prototype.onPropertyValueChanged.call(this,t,n,r),this.customQuestion&&!this.isLoadingFromJson&&this.customQuestion.onPropertyChanged(this,t,r)},t.prototype.itemValuePropertyChanged=function(t,n,r,i){e.prototype.itemValuePropertyChanged.call(this,t,n,r,i),this.customQuestion&&!this.isLoadingFromJson&&this.customQuestion.onItemValuePropertyChanged(this,t,t.ownerPropertyName,n,i)},t.prototype.onFirstRendering=function(){var t=this.getElement();t&&t.onFirstRendering(),e.prototype.onFirstRendering.call(this)},t.prototype.initElement=function(e){e&&(e.setSurveyImpl(this),e.disableDesignActions=!0)},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n),this.initElement(this.getElement())},t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.getElement()&&(this.getElement().onSurveyLoad(),this.customQuestion.onLoaded(this))},t.prototype.afterRenderQuestionElement=function(e){},t.prototype.afterRender=function(t){e.prototype.afterRender.call(this,t),this.customQuestion&&this.customQuestion.onAfterRender(this,t)},t.prototype.setQuestionValue=function(t,n){void 0===n&&(n=!0),e.prototype.setQuestionValue.call(this,t,n),this.updateElementCss()},t.prototype.setNewValue=function(t){e.prototype.setNewValue.call(this,t),this.updateElementCss()},t.prototype.getSurveyData=function(){return this},t.prototype.getTextProcessor=function(){return this.textProcessor},t.prototype.getValue=function(e){return this.value},t.prototype.setValue=function(e,t,n,r){if(this.data){var i=this.convertDataName(e);this.data.setValue(i,this.convertDataValue(e,t),n,r),this.updateIsAnswered(),this.updateElementCss(),this.customQuestion&&this.customQuestion.onValueChanged(this,e,t)}},t.prototype.convertDataName=function(e){return this.getValueName()},t.prototype.convertDataValue=function(e,t){return t},t.prototype.getVariable=function(e){return this.data?this.data.getVariable(e):null},t.prototype.setVariable=function(e,t){this.data&&this.data.setVariable(e,t)},t.prototype.getComment=function(e){return this.data?this.data.getComment(this.getValueName()):""},t.prototype.setComment=function(e,t,n){this.data&&this.data.setComment(this.getValueName(),t,n)},t.prototype.getAllValues=function(){return this.data?this.data.getAllValues():{}},t.prototype.getFilteredValues=function(){return this.data?this.data.getFilteredValues():{}},t.prototype.getFilteredProperties=function(){return this.data?this.data.getFilteredProperties():{}},t.prototype.addElement=function(e,t){},t.prototype.removeElement=function(e){return!1},t.prototype.getQuestionTitleLocation=function(){return"left"},t.prototype.getQuestionStartIndex=function(){return this.getStartIndex()},t.prototype.getChildrenLayoutType=function(){return"row"},t.prototype.elementWidthChanged=function(e){},Object.defineProperty(t.prototype,"elements",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(e){return-1},t.prototype.ensureRowsVisibility=function(){},t.prototype.getContentDisplayValueCore=function(t,n,r){return r?this.customQuestion.getDisplayValue(t,n,r):e.prototype.getDisplayValueCore.call(this,t,n)},t}(i.Question),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.getTemplate=function(){return"custom"},t.prototype.createWrapper=function(){this.questionWrapper=this.createQuestion()},t.prototype.getElement=function(){return this.contentQuestion},t.prototype.onAnyValueChanged=function(t){e.prototype.onAnyValueChanged.call(this,t),this.contentQuestion&&this.contentQuestion.onAnyValueChanged(t)},t.prototype.hasErrors=function(t,n){if(void 0===t&&(t=!0),void 0===n&&(n=null),!this.contentQuestion)return!1;var r=this.contentQuestion.hasErrors(t,n);this.errors=[];for(var i=0;i<this.contentQuestion.errors.length;i++)this.errors.push(this.contentQuestion.errors[i]);return r||(r=e.prototype.hasErrors.call(this,t,n)),this.updateElementCss(),r},t.prototype.focus=function(t){void 0===t&&(t=!1),this.contentQuestion?this.contentQuestion.focus(t):e.prototype.focus.call(this,t)},Object.defineProperty(t.prototype,"contentQuestion",{get:function(){return this.questionWrapper},enumerable:!1,configurable:!0}),t.prototype.createQuestion=function(){var e=this.customQuestion.json,t=null;if(e.questionJSON){var n=e.questionJSON.type;if(!n||!o.Serializer.findClass(n))throw"type attribute in questionJSON is empty or incorrect";t=o.Serializer.createClass(n),this.initElement(t),t.fromJSON(e.questionJSON)}else e.createQuestion&&(t=e.createQuestion(),this.initElement(t));return t&&!t.name&&(t.name="question"),t},t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.contentQuestion&&this.isEmpty()&&!this.contentQuestion.isEmpty()&&(this.value=this.contentQuestion.value)},t.prototype.runCondition=function(t,n){e.prototype.runCondition.call(this,t,n),this.contentQuestion&&this.contentQuestion.runCondition(t,n)},t.prototype.convertDataName=function(t){if(!this.contentQuestion)return e.prototype.convertDataName.call(this,t);var n=t.replace(this.contentQuestion.getValueName(),this.getValueName());return 0==n.indexOf(this.getValueName())?n:e.prototype.convertDataName.call(this,t)},t.prototype.convertDataValue=function(t,n){return this.convertDataName(t)==e.prototype.convertDataName.call(this,t)?this.contentQuestion.value:n},t.prototype.canSetValueToSurvey=function(){return!1},t.prototype.setQuestionValue=function(t,n){void 0===n&&(n=!0),e.prototype.setQuestionValue.call(this,t,n),this.isLoadingFromJson||!this.contentQuestion||this.isTwoValueEquals(this.contentQuestion.value,t)||(this.contentQuestion.value=this.getUnbindValue(t))},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.contentQuestion&&this.contentQuestion.onSurveyValueChanged(t)},t.prototype.getValueCore=function(){return this.contentQuestion?this.contentQuestion.value:e.prototype.getValueCore.call(this)},t.prototype.initElement=function(t){var n=this;e.prototype.initElement.call(this,t),t&&(t.parent=this,t.afterRenderQuestionCallback=function(e,t){n.customQuestion&&n.customQuestion.onAfterRenderContentElement(n,e,t)})},t.prototype.updateElementCss=function(t){this.contentQuestion&&this.questionWrapper.updateElementCss(t),e.prototype.updateElementCss.call(this,t)},t.prototype.updateElementCssCore=function(t){this.contentQuestion&&(t=this.contentQuestion.cssClasses),e.prototype.updateElementCssCore.call(this,t)},t.prototype.getDisplayValueCore=function(t,n){return e.prototype.getContentDisplayValueCore.call(this,t,n,this.contentQuestion)},t}(p),m=function(e){function t(t,n){var r=e.call(this,n)||this;return r.composite=t,r.variableName=n,r}return c(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.composite.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.composite.contentPanel},enumerable:!1,configurable:!0}),t}(l.QuestionTextProcessor),g=function(e){function t(n,r){var i=e.call(this,n,r)||this;return i.customQuestion=r,i.settingNewValue=!1,i.textProcessing=new m(i,t.ItemVariableName),i}return c(t,e),t.prototype.createWrapper=function(){this.panelWrapper=this.createPanel()},t.prototype.getTemplate=function(){return"composite"},t.prototype.getElement=function(){return this.contentPanel},t.prototype.getCssRoot=function(t){return(new u.CssClassBuilder).append(e.prototype.getCssRoot.call(this,t)).append(t.composite).toString()},Object.defineProperty(t.prototype,"contentPanel",{get:function(){return this.panelWrapper},enumerable:!1,configurable:!0}),t.prototype.hasErrors=function(t,n){void 0===t&&(t=!0),void 0===n&&(n=null);var r=e.prototype.hasErrors.call(this,t,n);return this.contentPanel&&this.contentPanel.hasErrors(t,!1,n)||r},t.prototype.updateElementCss=function(t){e.prototype.updateElementCss.call(this,t),this.contentPanel&&this.contentPanel.updateElementCss(t)},t.prototype.getTextProcessor=function(){return this.textProcessing},t.prototype.clearValueIfInvisibleCore=function(){e.prototype.clearValueIfInvisibleCore.call(this);for(var t=this.contentPanel.questions,n=0;n<t.length;n++)t[n].clearValueIfInvisible()},t.prototype.onAnyValueChanged=function(t){e.prototype.onAnyValueChanged.call(this,t);for(var n=this.contentPanel.questions,r=0;r<n.length;r++)n[r].onAnyValueChanged(t)},t.prototype.createPanel=function(){var e=o.Serializer.createClass("panel");e.showQuestionNumbers="off",e.renderWidth="100%";var t=this.customQuestion.json;return t.elementsJSON&&e.fromJSON({elements:t.elementsJSON}),t.createElements&&t.createElements(e,this),this.initElement(e),e.readOnly=this.isReadOnly,this.setAfterRenderCallbacks(e),e},t.prototype.onReadOnlyChanged=function(){this.contentPanel&&(this.contentPanel.readOnly=this.isReadOnly),e.prototype.onReadOnlyChanged.call(this)},t.prototype.onSurveyLoad=function(){if(this.contentPanel&&(this.contentPanel.readOnly=this.isReadOnly,this.setIsContentElement(this.contentPanel)),e.prototype.onSurveyLoad.call(this),this.contentPanel){var t=this.contentPanel.getValue();s.Helpers.isValueEmpty(t)||(this.value=t)}},t.prototype.setIsContentElement=function(e){e.isContentElement=!0;for(var t=e.elements,n=0;n<t.length;n++){var r=t[n];r.isPanel?this.setIsContentElement(r):r.isContentElement=!0}},t.prototype.setVisibleIndex=function(t){var n=e.prototype.setVisibleIndex.call(this,t);return this.isVisible&&this.contentPanel&&(n+=this.contentPanel.setVisibleIndex(t)),n},t.prototype.runCondition=function(n,r){if(e.prototype.runCondition.call(this,n,r),this.contentPanel){var i=n[t.ItemVariableName];n[t.ItemVariableName]=this.contentPanel.getValue(),this.contentPanel.runCondition(n,r),delete n[t.ItemVariableName],i&&(n[t.ItemVariableName]=i)}},t.prototype.getValue=function(e){var t=this.value;return t?t[e]:null},t.prototype.setValue=function(t,n,r,i){if(!this.settingNewValue){if(this.settingNewValue=!0,!this.isEditingSurveyElement&&this.contentPanel){var o=this.contentPanel.getValue();this.isTwoValueEquals(this.getValueCore(),o)||this.setValueCore(o)}if(e.prototype.setValue.call(this,t,n,r,i),this.contentPanel){var a=this.contentPanel.getQuestionByName(t);a&&!this.isTwoValueEquals(n,a.value)&&(a.value=n)}this.settingNewValue=!1}},t.prototype.addConditionObjectsByContext=function(e,t){if(this.contentPanel)for(var n=this.contentPanel.questions,r=this.name,i=this.title,o=0;o<n.length;o++)e.push({name:r+"."+n[o].name,text:i+"."+n[o].title,question:n[o]})},t.prototype.convertDataValue=function(e,t){var n=this.value;return n||(n={}),this.isValueEmpty(t)&&!this.isEditingSurveyElement?delete n[e]:n[e]=t,n},t.prototype.setQuestionValue=function(t,n){void 0===n&&(n=!0),e.prototype.setQuestionValue.call(this,t,n),this.settingNewValue=!0;for(var r=this.contentPanel.questions,i=0;i<r.length;i++){var o=r[i].getValueName();r[i].value=t?t[o]:void 0}this.settingNewValue=!1},t.prototype.getDisplayValueCore=function(t,n){return e.prototype.getContentDisplayValueCore.call(this,t,n,this.contentPanel)},t.prototype.setAfterRenderCallbacks=function(e){var t=this;if(e&&this.customQuestion)for(var n=e.questions,r=0;r<n.length;r++)n[r].afterRenderQuestionCallback=function(e,n){t.customQuestion.onAfterRenderContentElement(t,e,n)}},t.ItemVariableName="composite",t}(p)},"./src/question_dropdown.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionDropdownModel",function(){return p});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question_baseselect.ts"),s=n("./src/itemvalue.ts"),l=n("./src/utils/cssClassBuilder.ts"),u=n("./src/dropdownListModel.ts"),c=n("./src/settings.ts"),d=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},p=function(e){function t(t){var n=e.call(this,t)||this;n.minMaxChoices=[],n.onOpened=n.addEvent(),n.createLocalizableString("placeholder",n,!1,!0);var r=n;return n.registerFunctionOnPropertiesValueChanged(["choicesMin","choicesMax","choicesStep"],function(){r.onVisibleChoicesChanged()}),n}return d(t,e),Object.defineProperty(t.prototype,"showOptionsCaption",{get:function(){return this.allowClear},set:function(e){this.allowClear=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optionsCaption",{get:function(){return this.placeholder},set:function(e){this.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.getLocalizableStringText("placeholder")},set:function(e){this.setLocalizableStringText("placeholder",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceholder",{get:function(){return this.getLocalizableString("placeholder")},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"dropdown"},Object.defineProperty(t.prototype,"selectedItem",{get:function(){return this.isEmpty()?null:s.ItemValue.getItemByValue(this.visibleChoices,this.value)},enumerable:!1,configurable:!0}),t.prototype.supportGoNextPageAutomatic=function(){return!0},t.prototype.getChoices=function(){var t=e.prototype.getChoices.call(this);if(this.choicesMax<=this.choicesMin)return t;for(var n=[],r=0;r<t.length;r++)n.push(t[r]);if(0===this.minMaxChoices.length||this.minMaxChoices.length!==(this.choicesMax-this.choicesMin)/this.choicesStep+1)for(this.minMaxChoices=[],r=this.choicesMin;r<=this.choicesMax;r+=this.choicesStep)this.minMaxChoices.push(new s.ItemValue(r));return n.concat(this.minMaxChoices)},Object.defineProperty(t.prototype,"choicesMin",{get:function(){return this.getPropertyValue("choicesMin")},set:function(e){this.setPropertyValue("choicesMin",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choicesMax",{get:function(){return this.getPropertyValue("choicesMax")},set:function(e){this.setPropertyValue("choicesMax",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choicesStep",{get:function(){return this.getPropertyValue("choicesStep")},set:function(e){e<1&&(e=1),this.setPropertyValue("choicesStep",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoComplete",{get:function(){return this.getPropertyValue("autoComplete","")},set:function(e){this.setPropertyValue("autoComplete",e)},enumerable:!1,configurable:!0}),t.prototype.getControlClass=function(){return(new l.CssClassBuilder).append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.errors.length>0).append(this.cssClasses.controlDisabled,this.isReadOnly).toString()},Object.defineProperty(t.prototype,"readOnlyText",{get:function(){return this.hasOther&&this.isOtherSelected?this.otherText:this.selectedItemText||this.placeholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedItemText",{get:function(){var e=this.selectedItem;return e?e.text:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"popupModel",{get:function(){var e;return"select"===this.renderAs||this.dropdownListModel||(this.dropdownListModel=new u.DropdownListModel(this)),null===(e=this.dropdownListModel)||void 0===e?void 0:e.popupModel},enumerable:!1,configurable:!0}),t.prototype.onOpenedCallBack=function(){this.onOpened.fire(this,{question:this,choices:this.choices})},t.prototype.onVisibleChoicesChanged=function(){e.prototype.onVisibleChoicesChanged.call(this),this.popupModel&&this.dropdownListModel.updateItems()},t.prototype.getFirstInputElementId=function(){return this.inputId+(this.searchEnabled?"_0":"")},t.prototype.getInputId=function(){return this.inputId+"_0"},t.prototype.onClick=function(e){this.onOpenedCallBack&&this.onOpenedCallBack()},t.prototype.onKeyUp=function(e){46===(e.which||e.keyCode)&&(this.clearValue(),e.preventDefault(),e.stopPropagation())},h([Object(i.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),h([Object(i.property)()],t.prototype,"itemComponent",void 0),h([Object(i.property)({defaultValue:!0,onSet:function(e,t){t.dropdownListModel&&t.dropdownListModel.setSearchEnabled(e)}})],t.prototype,"searchEnabled",void 0),h([Object(i.property)({localizable:{defaultStr:"cleanCaption"}})],t.prototype,"cleanButtonCaption",void 0),t}(a.QuestionSelectBase);i.Serializer.addClass("dropdown",[{name:"placeholder",alternativeName:"optionsCaption",serializationProperty:"locPlaceholder"},{name:"allowClear:boolean",alternativeName:"showOptionsCaption",default:!0},{name:"choicesMin:number",default:0},{name:"choicesMax:number",default:0},{name:"choicesStep:number",default:1,minValue:1},{name:"autoComplete",dataList:c.settings.questions.dataList},{name:"renderAs",default:"default",visible:!1},{name:"searchEnabled:boolean",default:!0,visible:!1},{name:"itemComponent",visible:!1}],function(){return new p("")},"selectbase"),o.QuestionFactory.Instance.registerQuestion("dropdown",function(e){var t=new p(e);return t.choices=o.QuestionFactory.DefaultChoices,t})},"./src/question_empty.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionEmptyModel",function(){return s});var r,i=n("./src/jsonobject.ts"),o=n("./src/question.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.getType=function(){return"empty"},t}(o.Question);i.Serializer.addClass("empty",[],function(){return new s("")},"question")},"./src/question_expression.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionExpressionModel",function(){return c}),n.d(t,"getCurrecyCodes",function(){return d});var r,i=n("./src/helpers.ts"),o=n("./src/question.ts"),a=n("./src/jsonobject.ts"),s=n("./src/questionfactory.ts"),l=n("./src/conditions.ts"),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t){var n=e.call(this,t)||this;return n.createLocalizableString("format",n),n.registerFunctionOnPropertyValueChanged("expression",function(){n.expressionRunner&&(n.expressionRunner=new l.ExpressionRunner(n.expression))}),n.registerFunctionOnPropertiesValueChanged(["format","currency","displayStyle"],function(){n.updateFormatedValue()}),n}return u(t,e),t.prototype.getType=function(){return"expression"},Object.defineProperty(t.prototype,"hasInput",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this.getLocalizableStringText("format","")},set:function(e){this.setLocalizableStringText("format",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locFormat",{get:function(){return this.getLocalizableString("format")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.getPropertyValue("expression","")},set:function(e){this.setPropertyValue("expression",e)},enumerable:!1,configurable:!0}),t.prototype.locCalculation=function(){this.expressionIsRunning=!0},t.prototype.unlocCalculation=function(){this.expressionIsRunning=!1},t.prototype.runCondition=function(t,n){var r=this;e.prototype.runCondition.call(this,t,n),!this.expression||this.expressionIsRunning||!this.runIfReadOnly&&this.isReadOnly||(this.locCalculation(),this.expressionRunner||(this.expressionRunner=new l.ExpressionRunner(this.expression)),this.expressionRunner.onRunComplete=function(e){i.Helpers.isTwoValueEquals(e,r.value)||(r.value=e),r.unlocCalculation()},this.expressionRunner.run(t,n))},t.prototype.canCollectErrors=function(){return!0},t.prototype.hasRequiredError=function(){return!1},Object.defineProperty(t.prototype,"maximumFractionDigits",{get:function(){return this.getPropertyValue("maximumFractionDigits")},set:function(e){e<-1||e>20||this.setPropertyValue("maximumFractionDigits",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minimumFractionDigits",{get:function(){return this.getPropertyValue("minimumFractionDigits")},set:function(e){e<-1||e>20||this.setPropertyValue("minimumFractionDigits",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runIfReadOnly",{get:function(){return!0===this.runIfReadOnlyValue},set:function(e){this.runIfReadOnlyValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formatedValue",{get:function(){return this.getPropertyValue("formatedValue","")},enumerable:!1,configurable:!0}),t.prototype.updateFormatedValue=function(){this.setPropertyValue("formatedValue",this.getDisplayValueCore(!1,this.value))},t.prototype.onValueChanged=function(){this.updateFormatedValue()},t.prototype.updateValueFromSurvey=function(t){e.prototype.updateValueFromSurvey.call(this,t),this.updateFormatedValue()},t.prototype.getDisplayValueCore=function(e,t){var n=this.isValueEmpty(t)?this.defaultValue:t,r="";if(!this.isValueEmpty(n)){var i=this.getValueAsStr(n);r=this.format?this.format.format(i):i}return this.survey&&(r=this.survey.getExpressionDisplayValue(this,n,r)),r},Object.defineProperty(t.prototype,"displayStyle",{get:function(){return this.getPropertyValue("displayStyle")},set:function(e){this.setPropertyValue("displayStyle",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currency",{get:function(){return this.getPropertyValue("currency")},set:function(e){["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"].indexOf(e)<0||this.setPropertyValue("currency",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useGrouping",{get:function(){return this.getPropertyValue("useGrouping")},set:function(e){this.setPropertyValue("useGrouping",e)},enumerable:!1,configurable:!0}),t.prototype.getValueAsStr=function(e){if("date"==this.displayStyle){var t=new Date(e);if(t&&t.toLocaleDateString)return t.toLocaleDateString()}if("none"!=this.displayStyle&&i.Helpers.isNumber(e)){var n=this.getLocale();n||(n="en");var r={style:this.displayStyle,currency:this.currency,useGrouping:this.useGrouping};return this.maximumFractionDigits>-1&&(r.maximumFractionDigits=this.maximumFractionDigits),this.minimumFractionDigits>-1&&(r.minimumFractionDigits=this.minimumFractionDigits),e.toLocaleString(n,r)}return e.toString()},t}(o.Question);function d(){return["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]}a.Serializer.addClass("expression",["expression:expression",{name:"format",serializationProperty:"locFormat"},{name:"displayStyle",default:"none",choices:["none","decimal","currency","percent","date"]},{name:"currency",choices:function(){return["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]},default:"USD"},{name:"maximumFractionDigits:number",default:-1},{name:"minimumFractionDigits:number",default:-1},{name:"useGrouping:boolean",default:!0},{name:"enableIf",visible:!1},{name:"isRequired",visible:!1},{name:"readOnly",visible:!1},{name:"requiredErrorText",visible:!1},{name:"defaultValueExpression",visible:!1},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"requiredIf",visible:!1}],function(){return new c("")},"question"),s.QuestionFactory.Instance.registerQuestion("expression",function(e){return new c(e)})},"./src/question_file.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionFileModel",function(){return f});var r,i=n("./src/question.ts"),o=n("./src/jsonobject.ts"),a=n("./src/questionfactory.ts"),s=n("./src/error.ts"),l=n("./src/utils/cssClassBuilder.ts"),u=n("./src/utils/utils.ts"),c=n("./src/actions/container.ts"),d=n("./src/actions/action.ts"),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},f=function(e){function t(t){var n=e.call(this,t)||this;return n.isUploading=!1,n.isDragging=!1,n.onStateChanged=n.addEvent(),n.previewValue=[],n.mobileFileNavigator=new c.ActionContainer,n.onDragOver=function(e){if(n.isInputReadOnly)return e.returnValue=!1,!1;n.isDragging=!0,e.dataTransfer.dropEffect="copy",e.preventDefault()},n.onDrop=function(e){n.isInputReadOnly||(n.isDragging=!1,e.preventDefault(),n.onChange(e.dataTransfer))},n.onDragLeave=function(e){n.isInputReadOnly||(n.isDragging=!1)},n.doChange=function(e){n.onChange(e.target||e.srcElement)},n.doClean=function(e){var t=e.currentTarget||e.srcElement;n.needConfirmRemoveFile&&!Object(u.confirmAction)(n.confirmRemoveAllMessage)||(t.parentElement.querySelectorAll("input")[0].value="",n.clear())},n.doDownloadFile=function(e,t){Object(u.detectIEOrEdge)()&&(e.preventDefault(),Object(u.loadFileFromBase64)(t.content,t.name))},n.fileIndexAction=new d.Action({id:"fileIndex",title:n.getFileIndexCaption(),enabled:!1}),n.prevFileAction=new d.Action({id:"prevPage",iconSize:16,action:function(){n.indexToShow=n.previewValue.length&&(n.indexToShow-1+n.previewValue.length)%n.previewValue.length||0,n.fileIndexAction.title=n.getFileIndexCaption()}}),n.nextFileAction=new d.Action({id:"nextPage",iconSize:16,action:function(){n.indexToShow=n.previewValue.length&&(n.indexToShow+1)%n.previewValue.length||0,n.fileIndexAction.title=n.getFileIndexCaption()}}),n.mobileFileNavigator.actions=[n.prevFileAction,n.fileIndexAction,n.nextFileAction],n}return h(t,e),Object.defineProperty(t.prototype,"mobileFileNavigatorVisible",{get:function(){return this.isMobile&&this.containsMultiplyFiles},enumerable:!1,configurable:!0}),t.prototype.updateElementCssCore=function(t){e.prototype.updateElementCssCore.call(this,t),this.prevFileAction.iconName=this.cssClasses.leftIconId,this.nextFileAction.iconName=this.cssClasses.rightIconId},t.prototype.getFileIndexCaption=function(){return this.getLocalizationFormatString("indexText",this.indexToShow+1,this.previewValue.length)},t.prototype.isPreviewVisible=function(e){return!this.isMobile||e===this.indexToShow},t.prototype.getType=function(){return"file"},t.prototype.clearOnDeletingContainer=function(){this.survey&&this.survey.clearFiles(this,this.name,this.value,null,function(){})},Object.defineProperty(t.prototype,"showPreview",{get:function(){return this.getPropertyValue("showPreview")},set:function(e){this.setPropertyValue("showPreview",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowMultiple",{get:function(){return this.getPropertyValue("allowMultiple",!1)},set:function(e){this.setPropertyValue("allowMultiple",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.getPropertyValue("imageHeight")},set:function(e){this.setPropertyValue("imageHeight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.getPropertyValue("imageWidth")},set:function(e){this.setPropertyValue("imageWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acceptedTypes",{get:function(){return this.getPropertyValue("acceptedTypes")},set:function(e){this.setPropertyValue("acceptedTypes",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storeDataAsText",{get:function(){return this.getPropertyValue("storeDataAsText")},set:function(e){this.setPropertyValue("storeDataAsText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"waitForUpload",{get:function(){return this.getPropertyValue("waitForUpload")},set:function(e){this.setPropertyValue("waitForUpload",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowImagesPreview",{get:function(){return this.getPropertyValue("allowImagesPreview")},set:function(e){this.setPropertyValue("allowImagesPreview",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxSize",{get:function(){return this.getPropertyValue("maxSize")},set:function(e){this.setPropertyValue("maxSize",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needConfirmRemoveFile",{get:function(){return this.getPropertyValue("needConfirmRemoveFile")},set:function(e){this.setPropertyValue("needConfirmRemoveFile",e)},enumerable:!1,configurable:!0}),t.prototype.getConfirmRemoveMessage=function(e){return this.confirmRemoveMessage.format(e)},Object.defineProperty(t.prototype,"inputTitle",{get:function(){return this.isUploading?this.loadingFileTitle:this.isEmpty()?this.chooseFileTitle:" "},enumerable:!1,configurable:!0}),t.prototype.clear=function(e){var t=this;this.survey&&(this.containsMultiplyFiles=!1,this.survey.clearFiles(this,this.name,this.value,null,function(n,r){"success"===n&&(t.value=void 0,t.errors=[],e&&e())}))},Object.defineProperty(t.prototype,"multipleRendered",{get:function(){return this.allowMultiple?"multiple":void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showRemoveButton",{get:function(){return!this.isReadOnly&&!this.isEmpty()&&this.cssClasses.removeButton},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showRemoveButtonBottom",{get:function(){return!this.isReadOnly&&!this.isEmpty()&&this.cssClasses.removeButtonBottom},enumerable:!1,configurable:!0}),t.prototype.defaultImage=function(e){return!this.canPreviewImage(e)&&!!this.cssClasses.defaultImage},Object.defineProperty(t.prototype,"imageWidthRendered",{get:function(){return this.imageWidth+"px"},enumerable:!1,configurable:!0}),t.prototype.removeFile=function(e){var t=this;this.survey&&this.survey.clearFiles(this,this.name,this.value,e.name,function(n,r){if("success"===n){var i=t.value;t.value=Array.isArray(i)?i.filter(function(t){return t.name!==e.name}):void 0}})},t.prototype.loadFiles=function(e){var t=this;if(this.survey&&(this.errors=[],this.allFilesOk(e))){this.stateChanged("loading");var n=function(){var n=[];t.storeDataAsText?e.forEach(function(r){var i=new FileReader;i.onload=function(o){(n=n.concat([{name:r.name,type:r.type,content:i.result}])).length===e.length&&(t.value=(t.value||[]).concat(n))},i.readAsDataURL(r)}):t.survey&&t.survey.uploadFiles(t,t.name,e,function(e,n){"error"===e&&t.stateChanged("error"),"success"===e&&(t.value=(t.value||[]).concat(n.map(function(e){return{name:e.file.name,type:e.file.type,content:e.content}})))})};this.allowMultiple?n():this.clear(n)}},t.prototype.canPreviewImage=function(e){return this.allowImagesPreview&&!!e&&this.isFileImage(e)},t.prototype.setQuestionValue=function(t,n){var r=this;void 0===n&&(n=!0),e.prototype.setQuestionValue.call(this,t,n),this.previewValue=[];var i=!Array.isArray(t)&&t||Array.isArray(t)&&t.length>0?this.showPreview?"loading":"loaded":"empty";if(this.stateChanged(i),this.showPreview&&t){var o=Array.isArray(t)?t:t?[t]:[];this.storeDataAsText?(o.forEach(function(e){r.previewValue=r.previewValue.concat([{name:e.name,type:e.type,content:e.content||e}])}),"loading"===i&&this.stateChanged("loaded")):o.forEach(function(e){r.survey&&r.survey.downloadFile(r,r.name,e,function(t,n){"success"===t?(r.previewValue=r.previewValue.concat([{content:n,name:e.name,type:e.type}]),r.previewValue.length===o.length&&r.stateChanged("loaded")):r.stateChanged("error")})}),this.fileIndexAction.title=this.getFileIndexCaption(),this.containsMultiplyFiles=this.previewValue.length>1}},t.prototype.onCheckForErrors=function(t,n){e.prototype.onCheckForErrors.call(this,t,n),this.isUploading&&this.waitForUpload&&t.push(new s.UploadingFileError(this.getLocalizationString("uploadingFile"),this))},t.prototype.stateChanged=function(e){"loading"===e&&(this.isUploading=!0),"loaded"===e&&(this.isUploading=!1),"error"===e&&(this.isUploading=!1),this.currentState=e,this.onStateChanged.fire(this,{state:e})},t.prototype.allFilesOk=function(e){var t=this,n=this.errors?this.errors.length:0;return(e||[]).forEach(function(e){t.maxSize>0&&e.size>t.maxSize&&t.errors.push(new s.ExceedSizeError(t.maxSize,t))}),n===this.errors.length},t.prototype.isFileImage=function(e){if(!e)return!1;var t=e.content&&e.content.substring(0,"data:image".length);return"data:image"===(t=t&&t.toLowerCase())||!!e.type&&0===e.type.toLowerCase().indexOf("image/")},t.prototype.getPlainData=function(t){void 0===t&&(t={includeEmpty:!0});var n=e.prototype.getPlainData.call(this,t);if(n&&!this.isEmpty()){n.isNode=!1;var r=Array.isArray(this.value)?this.value:[this.value];n.data=r.map(function(e,t){return{name:t,title:"File",value:e.content&&e.content||e,displayValue:e.name&&e.name||e,getString:function(e){return"object"==typeof e?JSON.stringify(e):e},isNode:!1}})}return n},t.prototype.supportComment=function(){return!0},t.prototype.getChooseFileCss=function(){var e=this.isAnswered;return(new l.CssClassBuilder).append(this.cssClasses.chooseFile).append(this.cssClasses.controlDisabled,this.isReadOnly).append(this.cssClasses.chooseFileAsText,!e).append(this.cssClasses.chooseFileAsTextDisabled,!e&&this.isInputReadOnly).append(this.cssClasses.chooseFileAsIcon,e).toString()},t.prototype.getReadOnlyFileCss=function(){return(new l.CssClassBuilder).append("form-control").append(this.cssClasses.placeholderInput).toString()},Object.defineProperty(t.prototype,"fileRootCss",{get:function(){return(new l.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.single,!this.allowMultiple).append(this.cssClasses.singleImage,!this.allowMultiple&&this.isAnswered&&this.canPreviewImage(this.value[0])).append(this.cssClasses.mobile,this.isMobile).toString()},enumerable:!1,configurable:!0}),t.prototype.getFileDecoratorCss=function(){return(new l.CssClassBuilder).append(this.cssClasses.fileDecorator).append(this.cssClasses.onError,this.errors.length>0).append(this.cssClasses.fileDecoratorDrag,this.isDragging).toString()},t.prototype.onChange=function(e){if(window.FileReader&&e&&e.files&&!(e.files.length<1)){for(var t=[],n=this.allowMultiple?e.files.length:1,r=0;r<n;r++)t.push(e.files[r]);e.value="",this.loadFiles(t)}},t.prototype.doRemoveFile=function(e){this.needConfirmRemoveFile&&!Object(u.confirmAction)(this.getConfirmRemoveMessage(e.name))||this.removeFile(e)},p([Object(o.property)()],t.prototype,"isDragging",void 0),p([Object(o.property)({defaultValue:"empty"})],t.prototype,"currentState",void 0),p([Object(o.property)({defaultValue:0})],t.prototype,"indexToShow",void 0),p([Object(o.property)({defaultValue:!1})],t.prototype,"containsMultiplyFiles",void 0),p([Object(o.property)({localizable:{defaultStr:"confirmRemoveFile"}})],t.prototype,"confirmRemoveMessage",void 0),p([Object(o.property)({localizable:{defaultStr:"confirmRemoveAllFiles"}})],t.prototype,"confirmRemoveAllMessage",void 0),p([Object(o.property)({localizable:{defaultStr:"noFileChosen"}})],t.prototype,"noFileChosenCaption",void 0),p([Object(o.property)({localizable:{defaultStr:"chooseFileCaption"}})],t.prototype,"chooseButtonCaption",void 0),p([Object(o.property)({localizable:{defaultStr:"cleanCaption"}})],t.prototype,"cleanButtonCaption",void 0),p([Object(o.property)({localizable:{defaultStr:"removeFileCaption"}})],t.prototype,"removeFileCaption",void 0),p([Object(o.property)({localizable:{defaultStr:"loadingFile"}})],t.prototype,"loadingFileTitle",void 0),p([Object(o.property)({localizable:{defaultStr:"chooseFile"}})],t.prototype,"chooseFileTitle",void 0),p([Object(o.property)({localizable:{defaultStr:"fileDragAreaPlaceholder"}})],t.prototype,"dragAreaPlaceholder",void 0),t}(i.Question);o.Serializer.addClass("file",[{name:"hasComment:switch",layout:"row"},{name:"commentText",dependsOn:"hasComment",visibleIf:function(e){return e.hasComment},serializationProperty:"locCommentText",layout:"row"},{name:"commentPlaceHolder",serializationProperty:"locCommentPlaceHolder",dependsOn:"hasComment",visibleIf:function(e){return e.hasComment}},{name:"showPreview:boolean",default:!0},"allowMultiple:boolean",{name:"allowImagesPreview:boolean",default:!0},"imageHeight","imageWidth","acceptedTypes",{name:"storeDataAsText:boolean",default:!0},{name:"waitForUpload:boolean",default:!1},{name:"maxSize:number",default:0},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"validators",visible:!1},{name:"needConfirmRemoveFile:boolean"}],function(){return new f("")},"question"),a.QuestionFactory.Instance.registerQuestion("file",function(e){return new f(e)})},"./src/question_html.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionHtmlModel",function(){return l});var r,i=n("./src/questionnonvalue.ts"),o=n("./src/jsonobject.ts"),a=n("./src/questionfactory.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this,t)||this;return n.createLocalizableString("html",n).onGetTextCallback=function(e){return n.survey&&!n.ignoreHtmlProgressing?n.survey.processHtml(e):e},n}return s(t,e),t.prototype.getType=function(){return"html"},Object.defineProperty(t.prototype,"isCompositeQuestion",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getProcessedText=function(t){return this.ignoreHtmlProgressing?t:e.prototype.getProcessedText.call(this,t)},Object.defineProperty(t.prototype,"html",{get:function(){return this.getLocalizableStringText("html","")},set:function(e){this.setLocalizableStringText("html",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locHtml",{get:function(){return this.getLocalizableString("html")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"processedHtml",{get:function(){return this.survey?this.survey.processHtml(this.html):this.html},enumerable:!1,configurable:!0}),t}(i.QuestionNonValue);o.Serializer.addClass("html",[{name:"html:html",serializationProperty:"locHtml"}],function(){return new l("")},"nonvalue"),a.QuestionFactory.Instance.registerQuestion("html",function(e){return new l(e)})},"./src/question_image.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionImageModel",function(){return h});var r,i=n("./src/questionnonvalue.ts"),o=n("./src/jsonobject.ts"),a=n("./src/questionfactory.ts"),s=n("./src/utils/cssClassBuilder.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=["youtube.com","youtu.be"],c=[".mp4",".mov",".wmv",".flv",".avi",".mkv"];function d(e){if(!e)return!1;e=e.toLowerCase();for(var t=0;t<u.length;t++)if(-1!==e.indexOf(u[t]))return!0;return!1}var h=function(e){function t(t){var n=e.call(this,t)||this;return n.createLocalizableString("imageLink",n,!1).onGetTextCallback=function(e){return function(e){if(!e||!d(e))return e;if(e.toLocaleLowerCase().indexOf("embed")>-1)return e;for(var t="",n=e.length-1;n>=0&&"="!==e[n]&&"/"!==e[n];n--)t=e[n]+t;return"https://www.youtube.com/embed/"+t}(e)},n.createLocalizableString("text",n,!1),n.registerFunctionOnPropertiesValueChanged(["contentMode","imageLink"],function(){return n.calculateRenderedMode()}),n}return l(t,e),t.prototype.getType=function(){return"image"},Object.defineProperty(t.prototype,"isCompositeQuestion",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.calculateRenderedMode()},Object.defineProperty(t.prototype,"imageLink",{get:function(){return this.getLocalizableStringText("imageLink")},set:function(e){this.setLocalizableStringText("imageLink",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locImageLink",{get:function(){return this.getLocalizableString("imageLink")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.getLocalizableStringText("text")},set:function(e){this.setLocalizableStringText("text",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locText",{get:function(){return this.getLocalizableString("text")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.getPropertyValue("imageHeight")},set:function(e){this.setPropertyValue("imageHeight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedHeight",{get:function(){return this.imageHeight?this.imageHeight+"px":void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.getPropertyValue("imageWidth")},set:function(e){this.setPropertyValue("imageWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedWidth",{get:function(){return this.imageWidth?this.imageWidth+"px":void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageFit",{get:function(){return this.getPropertyValue("imageFit")},set:function(e){this.setPropertyValue("imageFit",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentMode",{get:function(){return this.getPropertyValue("contentMode")},set:function(e){this.setPropertyValue("contentMode",e),"video"===e&&(this.showLabel=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedMode",{get:function(){return this.getPropertyValue("renderedMode","image")},enumerable:!1,configurable:!0}),t.prototype.getImageCss=function(){var e=o.Serializer.findProperty("image","imageHeight"),t=o.Serializer.findProperty("image","imageWidth"),n=e.isDefaultValue(this.imageHeight)&&t.isDefaultValue(this.imageWidth);return(new s.CssClassBuilder).append(this.cssClasses.image).append(this.cssClasses.adaptive,n).toString()},t.prototype.setRenderedMode=function(e){this.setPropertyValue("renderedMode",e)},t.prototype.calculateRenderedMode=function(){"auto"!==this.contentMode?this.setRenderedMode(this.contentMode):this.isYoutubeVideo()?this.setRenderedMode("youtube"):this.isVideo()?this.setRenderedMode("video"):this.setRenderedMode("image")},t.prototype.isYoutubeVideo=function(){return d(this.imageLink)},t.prototype.isVideo=function(){var e=this.imageLink;if(!e)return!1;e=e.toLowerCase();for(var t=0;t<c.length;t++)if(e.endsWith(c[t]))return!0;return!1},t}(i.QuestionNonValue);o.Serializer.addClass("image",[{name:"imageLink",serializationProperty:"locImageLink"},{name:"text",serializationProperty:"locText"},{name:"contentMode",default:"auto",choices:["auto","image","video","youtube"]},{name:"imageFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"imageHeight:number",default:150,minValue:0},{name:"imageWidth:number",default:200,minValue:0}],function(){return new h("")},"nonvalue"),a.QuestionFactory.Instance.registerQuestion("image",function(e){return new h(e)})},"./src/question_imagepicker.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ImageItemValue",function(){return f}),n.d(t,"QuestionImagePickerModel",function(){return m});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question_baseselect.ts"),s=n("./src/itemvalue.ts"),l=n("./src/helpers.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=n("./src/settings.ts"),d=n("./src/utils/utils.ts"),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},f=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r="imageitemvalue");var i=e.call(this,t,n,r)||this;return i.typeName=r,i.createLocalizableString("imageLink",i,!1),i}return h(t,e),t.prototype.getType=function(){return this.typeName?this.typeName:"itemvalue"},Object.defineProperty(t.prototype,"imageLink",{get:function(){return this.getLocalizableStringText("imageLink")},set:function(e){this.setLocalizableStringText("imageLink",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locImageLink",{get:function(){return this.getLocalizableString("imageLink")},enumerable:!1,configurable:!0}),t.prototype.getLocale=function(){return this.locOwner?this.locOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.locOwner?this.locOwner.getMarkdownHtml(e,t):e},t.prototype.getRenderer=function(e){return this.locOwner?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.locOwner?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.locOwner?this.locOwner.getProcessedText(e):e},t}(s.ItemValue),m=function(e){function t(t){var n=e.call(this,t)||this;return n.isResponsiveValue=!1,n.onContentLoaded=function(e,t){var r=t.target;e.aspectRatio="video"==n.contentMode?r.videoWidth/r.videoHeight:r.naturalWidth/r.naturalHeight,n._width&&n.processResponsiveness(0,n._width)},n.colCount=0,n.registerFunctionOnPropertiesValueChanged(["minImageWidth","maxImageWidth","minImageHeight","maxImageHeight","visibleChoices","colCount","isResponsiveValue"],function(){n._width&&n.processResponsiveness(0,n._width)}),n.registerFunctionOnPropertiesValueChanged(["imageWidth","imageHeight"],function(){n.calcIsResponsive()}),n.calcIsResponsive(),n}return h(t,e),t.prototype.getType=function(){return"imagepicker"},t.prototype.supportGoNextPageAutomatic=function(){return!this.multiSelect},Object.defineProperty(t.prototype,"hasSingleInput",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getItemValueType=function(){return"imageitemvalue"},Object.defineProperty(t.prototype,"isCompositeQuestion",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.supportOther=function(){return!1},t.prototype.supportNone=function(){return!1},t.prototype.isAnswerCorrect=function(){return this.multiSelect?l.Helpers.isArrayContainsEqual(this.value,this.correctAnswer):e.prototype.isAnswerCorrect.call(this)},Object.defineProperty(t.prototype,"multiSelect",{get:function(){return this.getPropertyValue("multiSelect")},set:function(e){this.setPropertyValue("multiSelect",e)},enumerable:!1,configurable:!0}),t.prototype.isItemSelected=function(e){var t=this.value;if(this.isValueEmpty(t))return!1;if(!this.multiSelect)return this.isTwoValueEquals(t,e.value);if(!Array.isArray(t))return!1;for(var n=0;n<t.length;n++)if(this.isTwoValueEquals(t[n],e.value))return!0;return!1},t.prototype.clearIncorrectValues=function(){if(this.multiSelect){var t=this.value;if(!t)return;if(!Array.isArray(t)||0==t.length)return void this.clearValue();for(var n=[],r=0;r<t.length;r++)this.hasUnknownValue(t[r],!0)||n.push(t[r]);if(n.length==t.length)return;0==n.length?this.clearValue():this.value=n}else e.prototype.clearIncorrectValues.call(this)},t.prototype.getDisplayValueCore=function(t,n){return this.multiSelect||Array.isArray(n)?this.getDisplayArrayValue(t,n):e.prototype.getDisplayValueCore.call(this,t,n)},Object.defineProperty(t.prototype,"showLabel",{get:function(){return this.getPropertyValue("showLabel")},set:function(e){this.setPropertyValue("showLabel",e)},enumerable:!1,configurable:!0}),t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),!this.isDesignMode&&this.multiSelect&&(this.createNewArray("renderedValue"),this.createNewArray("value")),this.calcIsResponsive()},t.prototype.getValueCore=function(){var t=e.prototype.getValueCore.call(this);return void 0!==t?t:this.multiSelect?[]:t},t.prototype.convertValToArrayForMultSelect=function(e){return this.multiSelect?this.isValueEmpty(e)||Array.isArray(e)?e:[e]:e},t.prototype.renderedValueFromDataCore=function(e){return this.convertValToArrayForMultSelect(e)},t.prototype.rendredValueToDataCore=function(e){return this.convertValToArrayForMultSelect(e)},Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.getPropertyValue("imageHeight")},set:function(e){this.setPropertyValue("imageHeight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedImageHeight",{get:function(){return((this.isResponsive?this.responsiveImageHeight:this.imageHeight)||150)+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.getPropertyValue("imageWidth")},set:function(e){this.setPropertyValue("imageWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedImageWidth",{get:function(){return((this.isResponsive?this.responsiveImageWidth:this.imageWidth)||200)+"px"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageFit",{get:function(){return this.getPropertyValue("imageFit")},set:function(e){this.setPropertyValue("imageFit",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentMode",{get:function(){return this.getPropertyValue("contentMode")},set:function(e){this.setPropertyValue("contentMode",e),"video"===e&&(this.showLabel=!0)},enumerable:!1,configurable:!0}),t.prototype.convertDefaultValue=function(e){return e},Object.defineProperty(t.prototype,"inputType",{get:function(){return this.multiSelect?"checkbox":"radio"},enumerable:!1,configurable:!0}),t.prototype.isFootChoice=function(e,t){return!1},t.prototype.getSelectBaseRootCss=function(){return(new u.CssClassBuilder).append(e.prototype.getSelectBaseRootCss.call(this)).append(this.cssClasses.rootColumn,1==this.getCurrentColCount()).toString()},Object.defineProperty(t.prototype,"isResponsive",{get:function(){return this.isResponsiveValue&&this.isDefaultV2Theme},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exactSizesAreEmpty",{get:function(){var e=this;return!["imageHeight","imageWidth"].some(function(t){return null!=e[t]})},enumerable:!1,configurable:!0}),t.prototype.calcIsResponsive=function(){this.isResponsiveValue=this.exactSizesAreEmpty},t.prototype.getObservedElementSelector=function(){return Object(d.classesToSelector)(this.cssClasses.root)},t.prototype.supportResponsiveness=function(){return!0},t.prototype.needResponsiveness=function(){return this.supportResponsiveness()&&this.isDefaultV2Theme},t.prototype.getCurrentColCount=function(){return void 0===this.responsiveColCount||0===this.colCount?this.colCount:this.responsiveColCount},t.prototype.processResponsiveness=function(e,t){this._width=t=Math.floor(t);var n=function(e,t,n){var r=Math.floor(e/(t+n));return(r+1)*(t+n)-n<=e&&r++,r};if(this.isResponsive){var r,i=this.choices.length+(this.isDesignMode?1:0),o=this.gapBetweenItems||0,a=this.minImageWidth,s=this.maxImageWidth,l=this.maxImageHeight,u=this.minImageHeight,c=this.colCount;if(0===c)if((o+a)*i-o>t){var d=n(t,a,o);r=Math.floor((t-o*(d-1))/d)}else r=Math.floor((t-o*(i-1))/i);else{var h=n(t,a,o);h<c?(this.responsiveColCount=h>=1?h:1,c=this.responsiveColCount):this.responsiveColCount=c,r=Math.floor((t-o*(c-1))/c)}r=Math.max(a,Math.min(r,s));var p=Number.MIN_VALUE;this.choices.forEach(function(e){var t=r/e.aspectRatio;p=t>p?t:p}),p>l?p=l:p<u&&(p=u);var f=this.responsiveImageWidth,m=this.responsiveImageHeight;return this.responsiveImageWidth=r,this.responsiveImageHeight=p,f!==this.responsiveImageWidth||m!==this.responsiveImageHeight}return!1},t.prototype.afterRender=function(t){e.prototype.afterRender.call(this,t);var n=this.survey.getCss().variables;n&&(this.gapBetweenItems=Number.parseInt(window.getComputedStyle(t).getPropertyValue(n.imagepickerGapBetweenItems))||0)},p([Object(i.property)({})],t.prototype,"responsiveImageHeight",void 0),p([Object(i.property)({})],t.prototype,"responsiveImageWidth",void 0),p([Object(i.property)({})],t.prototype,"isResponsiveValue",void 0),p([Object(i.property)({})],t.prototype,"maxImageWidth",void 0),p([Object(i.property)({})],t.prototype,"minImageWidth",void 0),p([Object(i.property)({})],t.prototype,"maxImageHeight",void 0),p([Object(i.property)({})],t.prototype,"minImageHeight",void 0),p([Object(i.property)({})],t.prototype,"responsiveColCount",void 0),t}(a.QuestionCheckboxBase);i.Serializer.addClass("imageitemvalue",[],function(e){return new f(e)},"itemvalue"),i.Serializer.addProperty("imageitemvalue",{name:"imageLink",serializationProperty:"locImageLink"}),i.Serializer.addClass("responsiveImageSize",[],void 0,"number"),i.Serializer.addClass("imagepicker",[{name:"hasOther",visible:!1},{name:"otherText",visible:!1},{name:"hasNone",visible:!1},{name:"noneText",visible:!1},{name:"optionsCaption",visible:!1},{name:"otherErrorText",visible:!1},{name:"storeOthersAsComment",visible:!1},{name:"contentMode",default:"image",choices:["image","video"]},{name:"imageFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"imageHeight:number",minValue:0},{name:"imageWidth:number",minValue:0},{name:"minImageWidth:responsiveImageSize",default:200,minValue:0,visibleIf:function(){return c.settings.supportCreatorV2}},{name:"minImageHeight:responsiveImageSize",default:133,minValue:0,visibleIf:function(){return c.settings.supportCreatorV2}},{name:"maxImageWidth:responsiveImageSize",default:400,minValue:0,visibleIf:function(){return c.settings.supportCreatorV2}},{name:"maxImageHeight:responsiveImageSize",default:266,minValue:0,visibleIf:function(){return c.settings.supportCreatorV2}}],function(){return new m("")},"checkboxbase"),i.Serializer.addProperty("imagepicker",{name:"showLabel:boolean",default:!1}),i.Serializer.addProperty("imagepicker",{name:"colCount:number",default:0,choices:[0,1,2,3,4,5]}),i.Serializer.addProperty("imagepicker",{name:"multiSelect:boolean",default:!1}),i.Serializer.addProperty("imagepicker",{name:"choices:imageitemvalue[]"}),o.QuestionFactory.Instance.registerQuestion("imagepicker",function(e){return new m(e)})},"./src/question_matrix.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixRowModel",function(){return v}),n.d(t,"MatrixCells",function(){return y}),n.d(t,"QuestionMatrixModel",function(){return b});var r,i=n("./src/helpers.ts"),o=n("./src/itemvalue.ts"),a=n("./src/martixBase.ts"),s=n("./src/jsonobject.ts"),l=n("./src/base.ts"),u=n("./src/surveyStrings.ts"),c=n("./src/error.ts"),d=n("./src/questionfactory.ts"),h=n("./src/localizablestring.ts"),p=n("./src/question_dropdown.ts"),f=n("./src/settings.ts"),m=n("./src/utils/cssClassBuilder.ts"),g=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.fullName=n,o.item=t,o.data=r,o.value=i,o.cellClick=function(e){o.value=e.value},o.registerFunctionOnPropertyValueChanged("value",function(){o.data&&o.data.onMatrixRowChanged(o)}),o}return g(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this.item.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.item.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locText",{get:function(){return this.item.locText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.getPropertyValue("value")},set:function(e){e=this.data.getCorrectedRowValue(e),this.setPropertyValue("value",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowClasses",{get:function(){var e=this.data.cssClasses,t=!!this.data.getErrorByType("requiredinallrowserror");return(new m.CssClassBuilder).append(e.row).append(e.rowError,t&&this.isValueEmpty(this.value)).toString()},enumerable:!1,configurable:!0}),t}(l.Base),y=function(){function e(e){this.cellsOwner=e,this.values={}}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0==Object.keys(this.values).length},enumerable:!1,configurable:!0}),e.prototype.valuesChanged=function(){this.onValuesChanged&&this.onValuesChanged()},e.prototype.setCellText=function(e,t,n){if(e=this.getCellRowColumnValue(e,this.rows),t=this.getCellRowColumnValue(t,this.columns),e&&t){if(n)this.values[e]||(this.values[e]={}),this.values[e][t]||(this.values[e][t]=this.createString()),this.values[e][t].text=n;else if(this.values[e]&&this.values[e][t]){var r=this.values[e][t];r.text="",r.isEmpty&&(delete this.values[e][t],0==Object.keys(this.values[e]).length&&delete this.values[e])}this.valuesChanged()}},e.prototype.setDefaultCellText=function(e,t){this.setCellText(f.settings.matrixDefaultRowName,e,t)},e.prototype.getCellLocText=function(e,t){return e=this.getCellRowColumnValue(e,this.rows),t=this.getCellRowColumnValue(t,this.columns),e&&t&&this.values[e]&&this.values[e][t]?this.values[e][t]:null},e.prototype.getDefaultCellLocText=function(e,t){return this.getCellLocText(f.settings.matrixDefaultRowName,e)},e.prototype.getCellDisplayLocText=function(e,t){var n=this.getCellLocText(e,t);return n&&!n.isEmpty||(n=this.getCellLocText(f.settings.matrixDefaultRowName,t))&&!n.isEmpty?n:("number"==typeof t&&(t=t>=0&&t<this.columns.length?this.columns[t]:null),t&&t.locText?t.locText:null)},e.prototype.getCellText=function(e,t){var n=this.getCellLocText(e,t);return n?n.calculatedText:null},e.prototype.getDefaultCellText=function(e){var t=this.getCellLocText(f.settings.matrixDefaultRowName,e);return t?t.calculatedText:null},e.prototype.getCellDisplayText=function(e,t){var n=this.getCellDisplayLocText(e,t);return n?n.calculatedText:null},Object.defineProperty(e.prototype,"rows",{get:function(){return this.cellsOwner?this.cellsOwner.getRows():[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.cellsOwner?this.cellsOwner.getColumns():[]},enumerable:!1,configurable:!0}),e.prototype.getCellRowColumnValue=function(e,t){if(null==e)return null;if("number"==typeof e){if(e<0||e>=t.length)return null;e=t[e].value}return e.value?e.value:e},e.prototype.getJson=function(){if(this.isEmpty)return null;var e={};for(var t in this.values){var n={},r=this.values[t];for(var i in r)n[i]=r[i].getJson();e[t]=n}return e},e.prototype.setJson=function(e){if(this.values={},e)for(var t in e)if("pos"!=t){var n=e[t];for(var r in this.values[t]={},n)if("pos"!=r){var i=this.createString();i.setJson(n[r]),this.values[t][r]=i}}this.valuesChanged()},e.prototype.createString=function(){return new h.LocalizableString(this.cellsOwner,!0)},e}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.isRowChanging=!1,n.emptyLocalizableString=new h.LocalizableString(n),n.cellsValue=new y(n),n.cellsValue.onValuesChanged=function(){n.updateHasCellText(),n.propertyValueChanged("cells",n.cells,n.cells)},n.registerFunctionOnPropertyValueChanged("columns",function(){n.onColumnsChanged()}),n.registerFunctionOnPropertyValueChanged("rows",function(){n.filterItems()||n.onRowsChanged()}),n.registerFunctionOnPropertyValueChanged("hideIfRowsEmpty",function(){n.updateVisibilityBasedOnRows()}),n}return g(t,e),t.prototype.getType=function(){return"matrix"},Object.defineProperty(t.prototype,"hasSingleInput",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAllRowRequired",{get:function(){return this.getPropertyValue("isAllRowRequired",!1)},set:function(e){this.setPropertyValue("isAllRowRequired",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasRows",{get:function(){return this.rows.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowsOrder",{get:function(){return this.getPropertyValue("rowsOrder")},set:function(e){(e=e.toLowerCase())!=this.rowsOrder&&(this.setPropertyValue("rowsOrder",e),this.onRowsChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideIfRowsEmpty",{get:function(){return this.getPropertyValue("hideIfRowsEmpty")},set:function(e){this.setPropertyValue("hideIfRowsEmpty",e)},enumerable:!1,configurable:!0}),t.prototype.getRows=function(){return this.rows},t.prototype.getColumns=function(){return this.visibleColumns},t.prototype.addColumn=function(e,t){var n=new o.ItemValue(e,t);return this.columns.push(n),n},t.prototype.getItemClass=function(e,t){var n=e.value==t.value,r=this.isReadOnly,i=!n&&!r;return(new m.CssClassBuilder).append(this.cssClasses.cell,this.hasCellText).append(this.hasCellText?this.cssClasses.cellText:this.cssClasses.label).append(this.cssClasses.itemOnError,!this.hasCellText&&this.errors.length>0).append(this.hasCellText?this.cssClasses.cellTextSelected:this.cssClasses.itemChecked,n).append(this.hasCellText?this.cssClasses.cellTextDisabled:this.cssClasses.itemDisabled,r).append(this.cssClasses.itemHover,i&&!this.hasCellText).toString()},Object.defineProperty(t.prototype,"itemSvgIcon",{get:function(){return this.cssClasses.itemSvgIconId},enumerable:!1,configurable:!0}),t.prototype.getQuizQuestionCount=function(){for(var e=0,t=0;t<this.rows.length;t++)this.isValueEmpty(this.correctAnswer[this.rows[t].value])||e++;return e},t.prototype.getCorrectAnswerCount=function(){for(var e=0,t=this.value,n=0;n<this.rows.length;n++){var r=this.rows[n].value;!this.isValueEmpty(t[r])&&this.isTwoValueEquals(this.correctAnswer[r],t[r])&&e++}return e},t.prototype.getVisibleRows=function(){var e=new Array,t=this.value;t||(t={});for(var n=this.filteredRows?this.filteredRows:this.rows,r=0;r<n.length;r++){var i=n[r];this.isValueEmpty(i.value)||e.push(this.createMatrixRow(i,this.id+"_"+i.value.toString().replace(/\s/g,"_"),t[i.value]))}return 0!=e.length||this.filteredRows||e.push(this.createMatrixRow(new o.ItemValue(null),this.name.replace(/\s/g,"_"),t)),this.generatedVisibleRows=e,e},t.prototype.sortVisibleRows=function(e){return"random"===this.rowsOrder.toLowerCase()?i.Helpers.randomizeArray(e):e},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.rows=this.sortVisibleRows(this.rows)},t.prototype.processRowsOnSet=function(e){return this.sortVisibleRows(e)},Object.defineProperty(t.prototype,"visibleRows",{get:function(){return this.getVisibleRows()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cells",{get:function(){return this.cellsValue},set:function(e){this.cells.setJson(e&&e.getJson?e.getJson():null)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasCellText",{get:function(){return this.getPropertyValue("hasCellText",!1)},enumerable:!1,configurable:!0}),t.prototype.updateHasCellText=function(){this.setPropertyValue("hasCellText",!this.cells.isEmpty)},t.prototype.setCellText=function(e,t,n){this.cells.setCellText(e,t,n)},t.prototype.getCellText=function(e,t){return this.cells.getCellText(e,t)},t.prototype.setDefaultCellText=function(e,t){this.cells.setDefaultCellText(e,t)},t.prototype.getDefaultCellText=function(e){return this.cells.getDefaultCellText(e)},t.prototype.getCellDisplayText=function(e,t){return this.cells.getCellDisplayText(e,t)},t.prototype.getCellDisplayLocText=function(e,t){return this.cells.getCellDisplayLocText(e,t)||this.emptyLocalizableString},t.prototype.supportGoNextPageAutomatic=function(){return this.hasValuesInAllRows()},t.prototype.onCheckForErrors=function(t,n){e.prototype.onCheckForErrors.call(this,t,n),(!n||this.errors.length>0)&&this.hasErrorInRows()&&t.push(new c.RequiredInAllRowsError(null,this))},t.prototype.hasErrorInRows=function(){return!!this.isAllRowRequired&&!this.hasValuesInAllRows()},t.prototype.hasValuesInAllRows=function(){var e=this.generatedVisibleRows;if(e||(e=this.visibleRows),!e)return!0;for(var t=0;t<e.length;t++)if(this.isValueEmpty(e[t].value))return!1;return!0},t.prototype.getIsAnswered=function(){return e.prototype.getIsAnswered.call(this)&&this.hasValuesInAllRows()},t.prototype.createMatrixRow=function(e,t,n){var r=new v(e,t,this,n);return this.onMatrixRowCreated(r),r},t.prototype.onMatrixRowCreated=function(e){},t.prototype.setQuestionValue=function(t,n){if(void 0===n&&(n=!0),e.prototype.setQuestionValue.call(this,t,this.isRowChanging||n),this.generatedVisibleRows&&0!=this.generatedVisibleRows.length){this.isRowChanging=!0;var r=this.value;if(r||(r={}),0==this.rows.length)this.generatedVisibleRows[0].value=r;else for(var i=0;i<this.generatedVisibleRows.length;i++){var o=r[this.generatedVisibleRows[i].name];this.isValueEmpty(o)&&(o=null),this.generatedVisibleRows[i].value=o}this.updateIsAnswered(),this.isRowChanging=!1}},t.prototype.getDisplayValueCore=function(e,t){var n={};for(var r in t){var i=e?o.ItemValue.getTextOrHtmlByValue(this.rows,r):r;i||(i=r);var a=o.ItemValue.getTextOrHtmlByValue(this.columns,t[r]);a||(a=t[r]),n[i]=a}return n},t.prototype.getPlainData=function(t){var n=this;void 0===t&&(t={includeEmpty:!0});var r=e.prototype.getPlainData.call(this,t);if(r){var i=this.createValueCopy();r.isNode=!0,r.data=Object.keys(i||{}).map(function(e){var r=n.rows.filter(function(t){return t.value===e})[0],a={name:e,title:r?r.text:"row",value:i[e],displayValue:o.ItemValue.getTextOrHtmlByValue(n.visibleColumns,i[e]),getString:function(e){return"object"==typeof e?JSON.stringify(e):e},isNode:!1},s=o.ItemValue.getItemByValue(n.visibleColumns,i[e]);return s&&(t.calculations||[]).forEach(function(e){a[e.propertyName]=s[e.propertyName]}),a})}return r},t.prototype.addConditionObjectsByContext=function(e,t){for(var n=0;n<this.rows.length;n++){var r=this.rows[n];r.value&&e.push({name:this.getValueName()+"."+r.value,text:this.processedTitle+"."+r.calculatedText,question:this})}},t.prototype.getConditionJson=function(t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!n)return e.prototype.getConditionJson.call(this);var r=new p.QuestionDropdownModel(n);r.choices=this.columns;var i=(new s.JsonObject).toJsonObject(r);return i.type=r.getType(),i},t.prototype.clearValueIfInvisibleCore=function(){e.prototype.clearValueIfInvisibleCore.call(this),this.hasRows&&this.clearInvisibleValuesInRows()},t.prototype.getFirstInputElementId=function(){var t=this.generatedVisibleRows;return t||(t=this.visibleRows),t.length>0&&this.visibleColumns.length>0?this.inputId+"_"+t[0].name+"_0":e.prototype.getFirstInputElementId.call(this)},t.prototype.onMatrixRowChanged=function(e){if(!this.isRowChanging){if(this.isRowChanging=!0,this.hasRows){var t=this.value;t||(t={}),t[e.name]=e.value,this.setNewValue(t)}else this.setNewValue(e.value);this.isRowChanging=!1}},t.prototype.getCorrectedRowValue=function(e){for(var t=0;t<this.columns.length;t++)if(e===this.columns[t].value)return e;for(t=0;t<this.columns.length;t++)if(this.isTwoValueEquals(e,this.columns[t].value))return this.columns[t].value;return e},t.prototype.getSearchableItemValueKeys=function(e){e.push("columns"),e.push("rows")},Object.defineProperty(t.prototype,"SurveyModel",{get:function(){return this.survey},enumerable:!1,configurable:!0}),t.prototype.getColumnHeaderWrapperComponentName=function(e){return this.SurveyModel.getElementWrapperComponentName({column:e},"column-header")},t.prototype.getColumnHeaderWrapperComponentData=function(e){return this.SurveyModel.getElementWrapperComponentData({column:e},"column-header")},t.prototype.getRowHeaderWrapperComponentName=function(e){return this.SurveyModel.getElementWrapperComponentName({row:e},"row-header")},t.prototype.getRowHeaderWrapperComponentData=function(e){return this.SurveyModel.getElementWrapperComponentData({row:e},"row-header")},t}(a.QuestionMatrixBaseModel);s.Serializer.addClass("matrix",[{name:"columns:itemvalue[]",uniqueProperty:"value",baseValue:function(){return u.surveyLocalization.getString("matrix_column")}},{name:"rows:itemvalue[]",uniqueProperty:"value",baseValue:function(){return u.surveyLocalization.getString("matrix_row")}},{name:"cells:cells",serializationProperty:"cells"},{name:"rowsOrder",default:"initial",choices:["initial","random"]},"isAllRowRequired:boolean","hideIfRowsEmpty:boolean"],function(){return new b("")},"matrixbase"),d.QuestionFactory.Instance.registerQuestion("matrix",function(e){var t=new b(e);return t.rows=d.QuestionFactory.DefaultRows,t.columns=d.QuestionFactory.DefaultColums,t})},"./src/question_matrixdropdown.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixDropdownRowModel",function(){return u}),n.d(t,"QuestionMatrixDropdownModel",function(){return c});var r,i=n("./src/question_matrixdropdownbase.ts"),o=n("./src/jsonobject.ts"),a=n("./src/itemvalue.ts"),s=n("./src/questionfactory.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.name=t,o.item=n,o.buildCells(i),o}return l(t,e),Object.defineProperty(t.prototype,"rowName",{get:function(){return this.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.item.text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locText",{get:function(){return this.item.locText},enumerable:!1,configurable:!0}),t}(i.MatrixDropdownRowModelBase),c=function(e){function t(t){var n=e.call(this,t)||this;return n.createLocalizableString("totalText",n,!0),n.registerFunctionOnPropertyValueChanged("rows",function(){n.clearGeneratedRows(),n.resetRenderedTable(),n.filterItems()||n.onRowsChanged()}),n.registerFunctionOnPropertyValueChanged("hideIfRowsEmpty",function(){n.updateVisibilityBasedOnRows()}),n}return l(t,e),t.prototype.getType=function(){return"matrixdropdown"},Object.defineProperty(t.prototype,"totalText",{get:function(){return this.getLocalizableStringText("totalText","")},set:function(e){this.setLocalizableStringText("totalText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTotalText",{get:function(){return this.getLocalizableString("totalText")},enumerable:!1,configurable:!0}),t.prototype.getFooterText=function(){return this.locTotalText},Object.defineProperty(t.prototype,"rowTitleWidth",{get:function(){return this.getPropertyValue("rowTitleWidth","")},set:function(e){this.setPropertyValue("rowTitleWidth",e)},enumerable:!1,configurable:!0}),t.prototype.getRowTitleWidth=function(){return this.rowTitleWidth},Object.defineProperty(t.prototype,"hideIfRowsEmpty",{get:function(){return this.getPropertyValue("hideIfRowsEmpty",!1)},set:function(e){this.setPropertyValue("hideIfRowsEmpty",e)},enumerable:!1,configurable:!0}),t.prototype.getDisplayValueCore=function(e,t){if(!t)return t;var n=this.visibleRows,r={};if(!n)return r;for(var i=0;i<n.length;i++){var o=n[i].rowName,s=t[o];if(s){if(e){var l=a.ItemValue.getTextOrHtmlByValue(this.rows,o);l&&(o=l)}r[o]=this.getRowDisplayValue(e,n[i],s)}}return r},t.prototype.getConditionObjectRowName=function(e){return"."+this.rows[e].value},t.prototype.getConditionObjectRowText=function(e){return"."+this.rows[e].calculatedText},t.prototype.getConditionObjectsRowIndeces=function(){for(var e=[],t=0;t<this.rows.length;t++)e.push(t);return e},t.prototype.setNewValue=function(t){t&&"object"!=typeof t||e.prototype.setNewValue.call(this,t)},t.prototype.clearIncorrectValues=function(){var t=this.value;if(t){var n=null,r=!1,i=this.filteredRows?this.filteredRows:this.rows;for(var o in t)a.ItemValue.getItemByValue(i,o)?(null==n&&(n={}),n[o]=t[o]):r=!0;r&&(this.value=n),e.prototype.clearIncorrectValues.call(this)}},t.prototype.clearValueIfInvisibleCore=function(){e.prototype.clearValueIfInvisibleCore.call(this),this.clearInvisibleValuesInRows()},t.prototype.generateRows=function(){var e=new Array,t=this.filteredRows?this.filteredRows:this.rows;if(!t||0===t.length)return e;var n=this.value;n||(n={});for(var r=0;r<t.length;r++)t[r].value&&e.push(this.createMatrixRow(t[r],n[t[r].value]));return e},t.prototype.createMatrixRow=function(e,t){return new u(e.value,e,this,t)},t.prototype.getSearchableItemValueKeys=function(e){e.push("rows")},t.prototype.updateProgressInfoByValues=function(e){var t=this.value;t||(t={});for(var n=0;n<this.rows.length;n++)this.updateProgressInfoByRow(e,t[this.rows[n].value]||{})},t}(i.QuestionMatrixDropdownModelBase);o.Serializer.addClass("matrixdropdown",[{name:"rows:itemvalue[]",uniqueProperty:"value"},"rowsVisibleIf:condition","rowTitleWidth",{name:"totalText",serializationProperty:"locTotalText"},"hideIfRowsEmpty:boolean"],function(){return new c("")},"matrixdropdownbase"),s.QuestionFactory.Instance.registerQuestion("matrixdropdown",function(e){var t=new c(e);return t.choices=[1,2,3,4,5],t.rows=s.QuestionFactory.DefaultRows,i.QuestionMatrixDropdownModelBase.addDefaultColumns(t),t})},"./src/question_matrixdropdownbase.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixDropdownCell",function(){return b}),n.d(t,"MatrixDropdownTotalCell",function(){return _}),n.d(t,"MatrixDropdownRowModelBase",function(){return C}),n.d(t,"MatrixDropdownTotalRowModel",function(){return x}),n.d(t,"QuestionMatrixDropdownModelBase",function(){return S});var r,i=n("./src/jsonobject.ts"),o=n("./src/martixBase.ts"),a=n("./src/helpers.ts"),s=n("./src/base.ts"),l=n("./src/survey-element.ts"),u=n("./src/textPreProcessor.ts"),c=n("./src/itemvalue.ts"),d=n("./src/questionfactory.ts"),h=n("./src/functionsfactory.ts"),p=n("./src/settings.ts"),f=n("./src/error.ts"),m=n("./src/utils/cssClassBuilder.ts"),g=n("./src/question_matrixdropdowncolumn.ts"),v=n("./src/question_matrixdropdownrendered.ts"),y=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),b=function(){function e(e,t,n){this.column=e,this.row=t,this.data=n,this.questionValue=this.createQuestion(e,t,n),this.questionValue.updateCustomWidget()}return e.prototype.locStrsChanged=function(){this.question.locStrsChanged()},e.prototype.createQuestion=function(e,t,n){var r=n.createQuestion(this.row,this.column);return r.validateValueCallback=function(){return n.validateCell(t,e.name,t.value)},i.CustomPropertiesCollection.getProperties(e.getType()).forEach(function(t){var n=t.name;void 0!==e[n]&&(r[n]=e[n])}),r},Object.defineProperty(e.prototype,"question",{get:function(){return this.questionValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.question.value},set:function(e){this.question.value=e},enumerable:!1,configurable:!0}),e.prototype.runCondition=function(e,t){this.question.runCondition(e,t)},e}(),_=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.column=t,i.row=n,i.data=r,i.updateCellQuestion(),i}return y(t,e),t.prototype.createQuestion=function(e,t,n){var r=i.Serializer.createClass("expression");return r.setSurveyImpl(t),r},t.prototype.locStrsChanged=function(){this.updateCellQuestion(),e.prototype.locStrsChanged.call(this)},t.prototype.updateCellQuestion=function(){this.question.locCalculation(),this.column.updateCellQuestion(this.question,null,function(e){delete e.defaultValue}),this.question.expression=this.getTotalExpression(),this.question.format=this.column.totalFormat,this.question.currency=this.column.totalCurrency,this.question.displayStyle=this.column.totalDisplayStyle,this.question.maximumFractionDigits=this.column.totalMaximumFractionDigits,this.question.minimumFractionDigits=this.column.totalMinimumFractionDigits,this.question.unlocCalculation(),this.question.runIfReadOnly=!0},t.prototype.getTotalExpression=function(){if(this.column.totalExpression)return this.column.totalExpression;if("none"==this.column.totalType)return"";var e=this.column.totalType+"InArray";return h.FunctionFactory.Instance.hasFunction(e)?e+"({self}, '"+this.column.name+"')":""},t}(b),w=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.row=t,i.variableName=n,i.parentTextProcessor=r,i}return y(t,e),t.prototype.getParentTextProcessor=function(){return this.parentTextProcessor},Object.defineProperty(t.prototype,"survey",{get:function(){return this.row.getSurvey()},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.row.value},t.prototype.getQuestionByName=function(e){return this.row.getQuestionByName(e)},t.prototype.onCustomProcessText=function(e){return e.name==C.IndexVariableName?(e.isExists=!0,e.value=this.row.rowIndex,!0):e.name==C.RowValueVariableName&&(e.isExists=!0,e.value=this.row.rowName,!0)},t}(u.QuestionTextProcessor),C=function(){function e(t,n){var r=this;this.isSettingValue=!1,this.detailPanelValue=null,this.cells=[],this.isCreatingDetailPanel=!1,this.data=t,this.subscribeToChanges(n),this.textPreProcessor=new w(this,e.RowVariableName,t?t.getParentTextProcessor():null),this.showHideDetailPanelClick=function(){if(r.getSurvey().isDesignMode)return!0;r.showHideDetailPanel()},this.idValue=e.getId()}return e.getId=function(){return"srow_"+e.idCounter++},Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowName",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.rowName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){for(var e={},t=this.questions,n=0;n<t.length;n++){var r=t[n];r.isEmpty()||(e[r.getValueName()]=r.value),r.comment&&this.getSurvey()&&this.getSurvey().storeOthersAsComment&&(e[r.getValueName()+p.settings.commentPrefix]=r.comment)}return e},set:function(e){this.isSettingValue=!0,this.subscribeToChanges(e);for(var t=this.questions,n=0;n<t.length;n++){var r=t[n],i=this.getCellValue(e,r.getValueName()),o=r.comment,a=e?e[r.getValueName()+p.settings.commentPrefix]:"";null==a&&(a=""),r.updateValueFromSurvey(i),(a||this.isTwoValueEquals(o,r.comment))&&r.updateCommentFromSurvey(a),r.onSurveyValueChanged(i)}this.isSettingValue=!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"locText",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPanel",{get:function(){return!!this.data&&this.data.hasDetailPanel(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"detailPanel",{get:function(){return this.detailPanelValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"detailPanelId",{get:function(){return this.detailPanel?this.detailPanel.id:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetailPanelShowing",{get:function(){return!!this.data&&this.data.getIsDetailPanelShowing(this)},enumerable:!1,configurable:!0}),e.prototype.setIsDetailPanelShowing=function(e){this.data&&this.data.setIsDetailPanelShowing(this,e),this.onDetailPanelShowingChanged&&this.onDetailPanelShowingChanged()},e.prototype.showHideDetailPanel=function(){this.isDetailPanelShowing?this.hideDetailPanel():this.showDetailPanel()},e.prototype.showDetailPanel=function(){this.ensureDetailPanel(),this.detailPanelValue&&this.setIsDetailPanelShowing(!0)},e.prototype.hideDetailPanel=function(e){void 0===e&&(e=!1),this.setIsDetailPanelShowing(!1),e&&(this.detailPanelValue=null)},e.prototype.ensureDetailPanel=function(){if(!this.isCreatingDetailPanel&&!this.detailPanelValue&&this.hasPanel&&this.data){this.isCreatingDetailPanel=!0,this.detailPanelValue=this.data.createRowDetailPanel(this);var e=this.detailPanelValue.questions,t=this.data.getRowValue(this.data.getRowIndex(this));if(!a.Helpers.isValueEmpty(t))for(var n=0;n<e.length;n++){var r=e[n].getValueName();a.Helpers.isValueEmpty(t[r])||(e[n].value=t[r])}this.detailPanelValue.setSurveyImpl(this),this.isCreatingDetailPanel=!1}},e.prototype.getAllValues=function(){return this.value},e.prototype.getFilteredValues=function(){var e=this.getAllValues(),t={row:e};for(var n in e)t[n]=e[n];return t},e.prototype.getFilteredProperties=function(){return{survey:this.getSurvey(),row:this}},e.prototype.runCondition=function(t,n){this.data&&(t[e.OwnerVariableName]=this.data.value),t[e.IndexVariableName]=this.rowIndex,t[e.RowValueVariableName]=this.rowName,n||(n={}),n[e.RowVariableName]=this;for(var r=0;r<this.cells.length;r++)t[e.RowVariableName]=this.value,this.cells[r].runCondition(t,n);this.detailPanel&&this.detailPanel.runCondition(t,n)},e.prototype.clearValue=function(){for(var e=this.questions,t=0;t<e.length;t++)e[t].clearValue()},e.prototype.onAnyValueChanged=function(e){for(var t=this.questions,n=0;n<t.length;n++)t[n].onAnyValueChanged(e)},e.prototype.getDataValueCore=function(e,t){var n=this.getSurvey();return n?n.getDataValueCore(e,t):e[t]},e.prototype.getValue=function(e){var t=this.getQuestionByName(e);return t?t.value:null},e.prototype.setValue=function(e,t){this.setValueCore(e,t,!1)},e.prototype.getVariable=function(e){},e.prototype.setVariable=function(e,t){},e.prototype.getComment=function(e){var t=this.getQuestionByName(e);return t?t.comment:""},e.prototype.setComment=function(e,t,n){this.setValueCore(e,t,!0)},e.prototype.setValueCore=function(t,n,r){if(!this.isSettingValue){this.updateQuestionsValue(t,n,r);var i=this.value,o=r?t+p.settings.commentPrefix:t,a=n,s=this.getQuestionByName(t),l=this.data.onRowChanging(this,o,i);if(s&&!this.isTwoValueEquals(l,a))r?s.comment=l:s.value=l;else{if(this.data.isValidateOnValueChanging&&this.hasQuestonError(s))return;this.data.onRowChanged(this,o,i,null==n&&!s||r&&!n&&!!s&&s.autoOtherMode),this.onAnyValueChanged(e.RowVariableName)}}},e.prototype.updateQuestionsValue=function(e,t,n){if(this.detailPanel){var r=this.getQuestionByColumnName(e),i=this.detailPanel.getQuestionByName(e);if(r&&i){var o=this.isTwoValueEquals(t,n?r.comment:r.value)?i:r;this.isSettingValue=!0,n?o.comment=t:o.value=t,this.isSettingValue=!1}}},e.prototype.hasQuestonError=function(e){if(!e)return!1;if(e.hasErrors(!0,{isOnValueChanged:!this.data.isValidateOnValueChanging}))return!0;if(e.isEmpty())return!1;var t=this.getCellByColumnName(e.name);return!!(t&&t.column&&t.column.isUnique)&&this.data.checkIfValueInRowDuplicated(this,e)},Object.defineProperty(e.prototype,"isEmpty",{get:function(){var e=this.value;if(a.Helpers.isValueEmpty(e))return!0;for(var t in e)if(null!=e[t])return!1;return!0},enumerable:!1,configurable:!0}),e.prototype.getQuestionByColumn=function(e){var t=this.getCellByColumn(e);return t?t.question:null},e.prototype.getCellByColumn=function(e){for(var t=0;t<this.cells.length;t++)if(this.cells[t].column==e)return this.cells[t];return null},e.prototype.getCellByColumnName=function(e){for(var t=0;t<this.cells.length;t++)if(this.cells[t].column.name==e)return this.cells[t];return null},e.prototype.getQuestionByColumnName=function(e){var t=this.getCellByColumnName(e);return t?t.question:null},Object.defineProperty(e.prototype,"questions",{get:function(){for(var e=[],t=0;t<this.cells.length;t++)e.push(this.cells[t].question);var n=this.detailPanel?this.detailPanel.questions:[];for(t=0;t<n.length;t++)e.push(n[t]);return e},enumerable:!1,configurable:!0}),e.prototype.getQuestionByName=function(e){return this.getQuestionByColumnName(e)||(this.detailPanel?this.detailPanel.getQuestionByName(e):null)},e.prototype.getQuestionsByName=function(e){var t=[],n=this.getQuestionByColumnName(e);return n&&t.push(n),this.detailPanel&&(n=this.detailPanel.getQuestionByName(e))&&t.push(n),t},e.prototype.getSharedQuestionByName=function(e){return this.data?this.data.getSharedQuestionByName(e,this):null},e.prototype.clearIncorrectValues=function(e){for(var t in e){var n=this.getQuestionByName(t);if(n){var r=n.value;n.clearIncorrectValues(),this.isTwoValueEquals(r,n.value)||this.setValue(t,n.value)}else!this.getSharedQuestionByName(t)&&t.indexOf(p.settings.matrixTotalValuePostFix)<0&&this.setValue(t,null)}},e.prototype.getLocale=function(){return this.data?this.data.getLocale():""},e.prototype.getMarkdownHtml=function(e,t){return this.data?this.data.getMarkdownHtml(e,t):null},e.prototype.getRenderer=function(e){return this.data?this.data.getRenderer(e):null},e.prototype.getRendererContext=function(e){return this.data?this.data.getRendererContext(e):e},e.prototype.getProcessedText=function(e){return this.data?this.data.getProcessedText(e):e},e.prototype.locStrsChanged=function(){for(var e=0;e<this.cells.length;e++)this.cells[e].locStrsChanged();this.detailPanel&&this.detailPanel.locStrsChanged()},e.prototype.updateCellQuestionOnColumnChanged=function(e,t,n){var r=this.getCellByColumn(e);r&&this.updateCellOnColumnChanged(r,t,n)},e.prototype.updateCellQuestionOnColumnItemValueChanged=function(e,t,n,r,i,o){var a=this.getCellByColumn(e);a&&this.updateCellOnColumnItemValueChanged(a,t,n,r,i,o)},e.prototype.onQuestionReadOnlyChanged=function(e){for(var t=this.questions,n=0;n<t.length;n++){var r=t[n];r.setPropertyValue("isReadOnly",r.isReadOnly)}this.detailPanel&&(this.detailPanel.readOnly=e)},e.prototype.hasErrors=function(e,t,n){var r=!1,i=this.cells;if(!i)return r;for(var o=0;o<i.length;o++)if(i[o]){var a=i[o].question;a&&a.visible&&(a.onCompletedAsyncValidators=function(e){n()},t&&!0===t.isOnValueChanged&&a.isEmpty()||(r=a.hasErrors(e,t)||r))}if(this.hasPanel){this.ensureDetailPanel();var s=this.detailPanel.hasErrors(e,!1,t);!t.hideErroredPanel&&s&&e&&(t.isSingleDetailPanel&&(t.hideErroredPanel=!0),this.showDetailPanel()),r=s||r}return r},e.prototype.updateCellOnColumnChanged=function(e,t,n){e.question[t]=n},e.prototype.updateCellOnColumnItemValueChanged=function(e,t,n,r,i,o){var a=e.question[t];if(Array.isArray(a)){var s=c.ItemValue.getItemByValue(a,"value"===r?o:n.value);s&&(s[r]=i)}},e.prototype.buildCells=function(e){this.isSettingValue=!0;for(var t=this.data.columns,n=0;n<t.length;n++){var r=t[n];if(r.isVisible){var i=this.createCell(r);this.cells.push(i);var o=this.getCellValue(e,r.name);if(!a.Helpers.isValueEmpty(o)){i.question.value=o;var s=r.name+p.settings.commentPrefix;e&&!a.Helpers.isValueEmpty(e[s])&&(i.question.comment=e[s])}}}this.isSettingValue=!1},e.prototype.isTwoValueEquals=function(e,t){return a.Helpers.isTwoValueEquals(e,t,!1,!0,!1)},e.prototype.getCellValue=function(e,t){return this.editingObj?i.Serializer.getObjPropertyValue(this.editingObj,t):e?e[t]:void 0},e.prototype.createCell=function(e){return new b(e,this,this.data)},e.prototype.getSurveyData=function(){return this},e.prototype.getSurvey=function(){return this.data?this.data.getSurvey():null},e.prototype.getTextProcessor=function(){return this.textPreProcessor},Object.defineProperty(e.prototype,"rowIndex",{get:function(){return this.data?this.data.getRowIndex(this)+1:-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editingObj",{get:function(){return this.editingObjValue},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.editingObj&&(this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged),this.editingObjValue=null)},e.prototype.subscribeToChanges=function(e){var t=this;e&&e.getType&&e.onPropertyChanged&&e!==this.editingObj&&(this.editingObjValue=e,this.onEditingObjPropertyChanged=function(e,n){t.updateOnSetValue(n.name,n.newValue)},this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged))},e.prototype.updateOnSetValue=function(e,t){this.isSettingValue=!0;for(var n=this.getQuestionsByName(e),r=0;r<n.length;r++)n[r].value=t;this.isSettingValue=!1},e.RowVariableName="row",e.OwnerVariableName="self",e.IndexVariableName="rowIndex",e.RowValueVariableName="rowValue",e.idCounter=1,e}(),x=function(e){function t(t){var n=e.call(this,t,null)||this;return n.buildCells(null),n}return y(t,e),t.prototype.createCell=function(e){return new _(e,this,this.data)},t.prototype.setValue=function(e,t){this.data&&!this.isSettingValue&&this.data.onTotalValueChanged()},t.prototype.runCondition=function(t,n){var r,i=0;do{r=a.Helpers.getUnbindValue(this.value),e.prototype.runCondition.call(this,t,n),i++}while(!a.Helpers.isTwoValueEquals(r,this.value)&&i<3)},t.prototype.updateCellOnColumnChanged=function(e,t,n){e.updateCellQuestion()},t}(C),S=function(e){function t(t){var n=e.call(this,t)||this;return n.isRowChanging=!1,n.lockResetRenderedTable=!1,n.isDoingonAnyValueChanged=!1,n.createItemValues("choices"),n.createLocalizableString("placeholder",n,!1,!0),n.createLocalizableString("keyDuplicationError",n,!1,!0),n.detailPanelValue=n.createNewDetailPanel(),n.detailPanel.selectedElementInDesign=n,n.detailPanel.renderWidth="100%",n.detailPanel.isInteractiveDesignElement=!1,n.detailPanel.showTitle=!1,n.registerFunctionOnPropertyValueChanged("columns",function(e){n.updateColumnsAndRows()}),n.registerFunctionOnPropertyValueChanged("cellType",function(){n.updateColumnsAndRows()}),n.registerFunctionOnPropertiesValueChanged(["placeholder","columnColCount","rowTitleWidth","choices"],function(){n.clearRowsAndResetRenderedTable()}),n.registerFunctionOnPropertiesValueChanged(["columnLayout","addRowLocation","hideColumnsIfEmpty","showHeader","minRowCount","isReadOnly","rowCount","hasFooter","detailPanelMode"],function(){n.resetRenderedTable()}),n.registerFunctionOnPropertiesValueChanged(["isMobile"],function(){"vertical"===n.columnLayout&&n.resetRenderedTable()}),n}return y(t,e),Object.defineProperty(t,"defaultCellType",{get:function(){return p.settings.matrixDefaultCellType},set:function(e){p.settings.matrixDefaultCellType=e},enumerable:!1,configurable:!0}),t.addDefaultColumns=function(e){for(var t=d.QuestionFactory.DefaultColums,n=0;n<t.length;n++)e.addColumn(t[n])},t.prototype.createColumnValues=function(){var e=this;return this.createNewArray("columns",function(t){t.colOwner=e,e.onAddColumn&&e.onAddColumn(t)},function(t){t.colOwner=null,e.onRemoveColumn&&e.onRemoveColumn(t)})},t.prototype.getType=function(){return"matrixdropdownbase"},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.clearGeneratedRows()},Object.defineProperty(t.prototype,"hasSingleInput",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRowsDynamic",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUpdateLocked",{get:function(){return this.isLoadingFromJson||this.isUpdating},enumerable:!1,configurable:!0}),t.prototype.beginUpdate=function(){this.isUpdating=!0},t.prototype.endUpdate=function(){this.isUpdating=!1,this.updateColumnsAndRows()},t.prototype.updateColumnsAndRows=function(){this.updateColumnsIndexes(this.columns),this.updateColumnsCellType(),this.generatedTotalRow=null,this.clearRowsAndResetRenderedTable()},t.prototype.itemValuePropertyChanged=function(t,n,r,i){e.prototype.itemValuePropertyChanged.call(this,t,n,r,i),"choices"===t.ownerPropertyName&&this.clearRowsAndResetRenderedTable()},Object.defineProperty(t.prototype,"columnLayout",{get:function(){return this.getPropertyValue("columnLayout")},set:function(e){this.setPropertyValue("columnLayout",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsLocation",{get:function(){return this.columnLayout},set:function(e){this.columnLayout=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isColumnLayoutHorizontal",{get:function(){return!!this.isMobile||"vertical"!=this.columnLayout},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUniqueCaseSensitive",{get:function(){return void 0!==this.isUniqueCaseSensitiveValue?this.isUniqueCaseSensitiveValue:p.settings.comparator.caseSensitive},set:function(e){this.isUniqueCaseSensitiveValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"detailPanelMode",{get:function(){return this.getPropertyValue("detailPanelMode")},set:function(e){this.setPropertyValue("detailPanelMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"detailPanel",{get:function(){return this.detailPanelValue},enumerable:!1,configurable:!0}),t.prototype.getPanel=function(){return this.detailPanel},Object.defineProperty(t.prototype,"detailElements",{get:function(){return this.detailPanel.elements},enumerable:!1,configurable:!0}),t.prototype.createNewDetailPanel=function(){return i.Serializer.createClass("panel")},Object.defineProperty(t.prototype,"hasRowText",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getFooterText=function(){return null},Object.defineProperty(t.prototype,"canAddRow",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRemoveRows",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.canRemoveRow=function(e){return!0},t.prototype.onPointerDown=function(e,t){},t.prototype.onRowsChanged=function(){this.resetRenderedTable(),e.prototype.onRowsChanged.call(this)},t.prototype.onStartRowAddingRemoving=function(){this.lockResetRenderedTable=!0},t.prototype.onEndRowAdding=function(){this.lockResetRenderedTable=!1,this.renderedTable&&(this.renderedTable.isRequireReset()?this.resetRenderedTable():this.renderedTable.onAddedRow())},t.prototype.onEndRowRemoving=function(e){this.lockResetRenderedTable=!1,this.renderedTable.isRequireReset()?this.resetRenderedTable():e&&this.renderedTable.onRemovedRow(e)},Object.defineProperty(t.prototype,"renderedTableValue",{get:function(){return this.getPropertyValue("renderedTable",null)},set:function(e){this.setPropertyValue("renderedTable",e)},enumerable:!1,configurable:!0}),t.prototype.clearRowsAndResetRenderedTable=function(){this.clearGeneratedRows(),this.resetRenderedTable(),this.fireCallback(this.columnsChangedCallback)},t.prototype.resetRenderedTable=function(){this.lockResetRenderedTable||this.isUpdateLocked||(this.renderedTableValue=null,this.fireCallback(this.onRenderedTableResetCallback))},t.prototype.clearGeneratedRows=function(){if(this.generatedVisibleRows){for(var t=0;t<this.generatedVisibleRows.length;t++)this.generatedVisibleRows[t].dispose();e.prototype.clearGeneratedRows.call(this)}},Object.defineProperty(t.prototype,"renderedTable",{get:function(){return this.renderedTableValue||(this.renderedTableValue=this.createRenderedTable(),this.onRenderedTableCreatedCallback&&this.onRenderedTableCreatedCallback(this.renderedTableValue)),this.renderedTableValue},enumerable:!1,configurable:!0}),t.prototype.createRenderedTable=function(){return new v.QuestionMatrixDropdownRenderedTable(this)},t.prototype.onMatrixRowCreated=function(e){if(this.survey)for(var t={rowValue:e.value,row:e,column:null,columnName:null,cell:null,cellQuestion:null,value:null},n=0;n<this.visibleColumns.length;n++){t.column=this.visibleColumns[n],t.columnName=t.column.name;var r=e.cells[n];t.cell=r,t.cellQuestion=r.question,t.value=r.value,this.onCellCreatedCallback&&this.onCellCreatedCallback(t),this.survey.matrixCellCreated(this,t)}},Object.defineProperty(t.prototype,"cellType",{get:function(){return this.getPropertyValue("cellType",p.settings.matrixDefaultCellType)},set:function(e){e=e.toLowerCase(),this.setPropertyValue("cellType",e)},enumerable:!1,configurable:!0}),t.prototype.updateColumnsCellType=function(){for(var e=0;e<this.columns.length;e++)this.columns[e].defaultCellTypeChanged()},t.prototype.updateColumnsIndexes=function(e){for(var t=0;t<e.length;t++)e[t].setIndex(t)},Object.defineProperty(t.prototype,"columnColCount",{get:function(){return this.getPropertyValue("columnColCount")},set:function(e){e<0||e>4||this.setPropertyValue("columnColCount",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnMinWidth",{get:function(){return this.getPropertyValue("columnMinWidth","")},set:function(e){this.setPropertyValue("columnMinWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScroll",{get:function(){return this.getPropertyValue("horizontalScroll",!1)},set:function(e){this.setPropertyValue("horizontalScroll",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAdaptiveActions",{get:function(){return this.getPropertyValue("allowAdaptiveActions")},set:function(e){this.setPropertyValue("allowAdaptiveActions",e),this.detailPanel&&(this.detailPanel.allowAdaptiveActions=e)},enumerable:!1,configurable:!0}),t.prototype.getRequiredText=function(){return this.survey?this.survey.requiredText:""},t.prototype.hasChoices=function(){return this.choices.length>0},t.prototype.onColumnPropertyChanged=function(e,t,n){if(this.updateHasFooter(),this.generatedVisibleRows){for(var r=0;r<this.generatedVisibleRows.length;r++)this.generatedVisibleRows[r].updateCellQuestionOnColumnChanged(e,t,n);this.generatedTotalRow&&this.generatedTotalRow.updateCellQuestionOnColumnChanged(e,t,n),this.onColumnsChanged(),"isRequired"==t&&this.resetRenderedTable()}},t.prototype.onColumnItemValuePropertyChanged=function(e,t,n,r,i,o){if(this.generatedVisibleRows)for(var a=0;a<this.generatedVisibleRows.length;a++)this.generatedVisibleRows[a].updateCellQuestionOnColumnItemValueChanged(e,t,n,r,i,o)},t.prototype.onShowInMultipleColumnsChanged=function(e){this.clearGeneratedRows(),this.resetRenderedTable()},t.prototype.onColumnCellTypeChanged=function(e){this.clearGeneratedRows(),this.resetRenderedTable()},t.prototype.getRowTitleWidth=function(){return""},Object.defineProperty(t.prototype,"hasFooter",{get:function(){return this.getPropertyValue("hasFooter",!1)},enumerable:!1,configurable:!0}),t.prototype.getAddRowLocation=function(){return"default"},t.prototype.getShowColumnsIfEmpty=function(){return!1},t.prototype.updateShowTableAndAddRow=function(){this.renderedTable&&this.renderedTable.updateShowTableAndAddRow()},t.prototype.updateHasFooter=function(){this.setPropertyValue("hasFooter",this.hasTotal)},Object.defineProperty(t.prototype,"hasTotal",{get:function(){for(var e=0;e<this.columns.length;e++)if(this.columns[e].hasTotal)return!0;return!1},enumerable:!1,configurable:!0}),t.prototype.getCellType=function(){return this.cellType},t.prototype.getCustomCellType=function(e,t,n){if(!this.survey)return n;var r={rowValue:t.value,row:t,column:e,columnName:e.name,cellType:n};return this.survey.matrixCellCreating(this,r),r.cellType},t.prototype.getConditionJson=function(t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!n)return e.prototype.getConditionJson.call(this);for(var r="",i=n.length-1;i>=0&&"."!=n[i];i--)r=n[i]+r;var o=this.getColumnByName(r);if(!o)return null;var a=o.createCellQuestion(null);return a?a.getConditionJson(t):null},t.prototype.clearIncorrectValues=function(){var e=this.visibleRows;if(e)for(var t=0;t<e.length;t++)e[t].clearIncorrectValues(this.getRowValue(t))},t.prototype.clearErrors=function(){e.prototype.clearErrors.call(this),this.runFuncForCellQuestions(function(e){e.clearErrors()})},t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),this.runFuncForCellQuestions(function(e){e.localeChanged()})},t.prototype.runFuncForCellQuestions=function(e){if(this.generatedVisibleRows)for(var t=0;t<this.generatedVisibleRows.length;t++)for(var n=this.generatedVisibleRows[t],r=0;r<n.cells.length;r++)e(n.cells[r].question)},t.prototype.runCondition=function(t,n){e.prototype.runCondition.call(this,t,n);var r,i=0;do{r=a.Helpers.getUnbindValue(this.totalValue),this.runCellsCondition(t,n),this.runTotalsCondition(t,n),i++}while(!a.Helpers.isTwoValueEquals(r,this.totalValue)&&i<3)},t.prototype.shouldRunColumnExpression=function(){return!1},t.prototype.runCellsCondition=function(e,t){if(this.generatedVisibleRows){for(var n=this.getRowConditionValues(e),r=this.generatedVisibleRows,i=0;i<r.length;i++)r[i].runCondition(n,t);this.checkColumnsVisibility(),this.checkColumnsRenderedRequired()}},t.prototype.checkColumnsVisibility=function(){for(var e=!1,t=0;t<this.visibleColumns.length;t++)this.visibleColumns[t].visibleIf&&(e=this.isColumnVisibilityChanged(this.visibleColumns[t])||e);e&&this.resetRenderedTable()},t.prototype.checkColumnsRenderedRequired=function(){for(var e=this.generatedVisibleRows,t=0;t<this.visibleColumns.length;t++){var n=this.visibleColumns[t];if(n.requiredIf){for(var r=e.length>0,i=0;i<e.length;i++)if(!e[i].cells[t].question.isRequired){r=!1;break}n.updateIsRenderedRequired(r)}}},t.prototype.isColumnVisibilityChanged=function(e){for(var t=e.hasVisibleCell,n=!1,r=this.generatedVisibleRows,i=0;i<r.length;i++){var o=r[i].cells[e.index];if(o&&o.question&&o.question.isVisible){n=!0;break}}return t!=n&&(e.hasVisibleCell=n),t!=n},t.prototype.runTotalsCondition=function(e,t){this.generatedTotalRow&&this.generatedTotalRow.runCondition(this.getRowConditionValues(e),t)},t.prototype.getRowConditionValues=function(e){var t=e;t||(t={});var n={};return this.isValueEmpty(this.totalValue)||(n=JSON.parse(JSON.stringify(this.totalValue))),t.row={},t.totalRow=n,t},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this);for(var t=this.columns,n=0;n<t.length;n++)t[n].locStrsChanged();var r=this.generatedVisibleRows;if(r){for(n=0;n<r.length;n++)r[n].locStrsChanged();this.generatedTotalRow&&this.generatedTotalRow.locStrsChanged()}},t.prototype.getColumnByName=function(e){for(var t=0;t<this.columns.length;t++)if(this.columns[t].name==e)return this.columns[t];return null},t.prototype.getColumnName=function(e){return this.getColumnByName(e)},t.prototype.getColumnWidth=function(e){return e.minWidth?e.minWidth:this.columnMinWidth},Object.defineProperty(t.prototype,"choices",{get:function(){return this.getPropertyValue("choices")},set:function(e){this.setPropertyValue("choices",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.getLocalizableStringText("placeholder")},set:function(e){this.setLocalizableStringText("placeholder",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceholder",{get:function(){return this.getLocalizableString("placeholder")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optionsCaption",{get:function(){return this.placeholder},set:function(e){this.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyDuplicationError",{get:function(){return this.getLocalizableStringText("keyDuplicationError")},set:function(e){this.setLocalizableStringText("keyDuplicationError",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locKeyDuplicationError",{get:function(){return this.getLocalizableString("keyDuplicationError")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storeOthersAsComment",{get:function(){return!!this.survey&&this.survey.storeOthersAsComment},enumerable:!1,configurable:!0}),t.prototype.addColumn=function(e,t){void 0===t&&(t=null);var n=new g.MatrixDropdownColumn(e,t);return this.columns.push(n),n},t.prototype.getVisibleRows=function(){var e=this;return this.isUpdateLocked?null:(this.generatedVisibleRows||(this.generatedVisibleRows=this.generateRows(),this.generatedVisibleRows.forEach(function(t){return e.onMatrixRowCreated(t)}),this.data&&this.runCellsCondition(this.data.getFilteredValues(),this.data.getFilteredProperties()),this.updateValueOnRowsGeneration(this.generatedVisibleRows),this.updateIsAnswered()),this.generatedVisibleRows)},t.prototype.updateValueOnRowsGeneration=function(e){for(var t=this.createNewValue(!0),n=this.createNewValue(),r=0;r<e.length;r++){var i=e[r];if(!i.editingObj){var o=this.getRowValue(r),a=i.value;this.isTwoValueEquals(o,a)||(n=this.getNewValueOnRowChanged(i,"",a,!1,n).value)}}this.isTwoValueEquals(t,n)||(this.isRowChanging=!0,this.setNewValue(n),this.isRowChanging=!1)},Object.defineProperty(t.prototype,"totalValue",{get:function(){return this.hasTotal&&this.visibleTotalRow?this.visibleTotalRow.value:{}},enumerable:!1,configurable:!0}),t.prototype.getVisibleTotalRow=function(){if(this.isUpdateLocked)return null;if(this.hasTotal){if(!this.generatedTotalRow&&(this.generatedTotalRow=this.generateTotalRow(),this.data)){var e={survey:this.survey};this.runTotalsCondition(this.data.getAllValues(),e)}}else this.generatedTotalRow=null;return this.generatedTotalRow},Object.defineProperty(t.prototype,"visibleTotalRow",{get:function(){return this.getVisibleTotalRow()},enumerable:!1,configurable:!0}),t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.updateColumnsIndexes(this.columns),this.clearGeneratedRows(),this.generatedTotalRow=null,this.updateHasFooter()},t.prototype.getRowValue=function(e){if(e<0)return null;var t=this.visibleRows;if(e>=t.length)return null;var n=this.createNewValue();return this.getRowValueCore(t[e],n)},t.prototype.checkIfValueInRowDuplicated=function(e,t){if(!this.generatedVisibleRows)return!1;for(var n=!1,r=0;r<this.generatedVisibleRows.length;r++){var i=this.generatedVisibleRows[r];if(e!==i&&a.Helpers.isTwoValueEquals(i.getValue(t.name),t.value,!0,this.isUniqueCaseSensitive)){n=!0;break}}return n?this.addDuplicationError(t):t.clearErrors(),n},t.prototype.setRowValue=function(e,t){if(e<0)return null;var n=this.visibleRows;if(e>=n.length)return null;n[e].value=t,this.onRowChanged(n[e],"",t,!1)},t.prototype.generateRows=function(){return null},t.prototype.generateTotalRow=function(){return new x(this)},t.prototype.createNewValue=function(e){void 0===e&&(e=!1);var t=this.value?this.createValueCopy():{};return e&&this.isMatrixValueEmpty(t)?null:t},t.prototype.getRowValueCore=function(e,t,n){void 0===n&&(n=!1);var r=t&&t[e.rowName]?t[e.rowName]:null;return!r&&n&&(r={},t&&(t[e.rowName]=r)),r},t.prototype.getRowObj=function(e){var t=this.getRowValueCore(e,this.value);return t&&t.getType?t:null},t.prototype.getRowDisplayValue=function(e,t,n){if(!n)return n;if(t.editingObj)return n;for(var r=Object.keys(n),i=0;i<r.length;i++){var o=r[i],a=t.getQuestionByName(o);if(a||(a=this.getSharedQuestionByName(o,t)),a){var s=a.getDisplayValue(e,n[o]);e&&a.title&&a.title!==o?(n[a.title]=s,delete n[o]):n[o]=s}}return n},t.prototype.getPlainData=function(t){var n=this;void 0===t&&(t={includeEmpty:!0});var r=e.prototype.getPlainData.call(this,t);return r&&(r.isNode=!0,r.data=this.visibleRows.map(function(e){var r={name:e.rowName,title:e.text,value:e.value,displayValue:n.getRowDisplayValue(!1,e,e.value),getString:function(e){return"object"==typeof e?JSON.stringify(e):e},isNode:!0,data:e.cells.map(function(e){return e.question.getPlainData(t)}).filter(function(e){return!!e})};return(t.calculations||[]).forEach(function(t){r[t.propertyName]=e[t.propertyName]}),r})),r},t.prototype.addConditionObjectsByContext=function(e,t){var n=!!t&&(!0===t||this.columns.indexOf(t)>-1),r=this.getConditionObjectsRowIndeces();n&&r.push(-1);for(var i=0;i<r.length;i++){var o=r[i],a=o>-1?this.getConditionObjectRowName(o):"row";if(a)for(var s=o>-1?this.getConditionObjectRowText(o):"row",l=o>-1||!0===t,u=l&&-1===o?".":"",c=(l?this.getValueName():"")+u+a+".",d=(l?this.processedTitle:"")+u+s+".",h=0;h<this.columns.length;h++){var p=this.columns[h];if(-1!==o||t!==p){var f={name:c+p.name,text:d+p.fullTitle,question:this};-1===o&&!0===t&&(f.context=this),e.push(f)}}}},t.prototype.getConditionObjectRowName=function(e){return""},t.prototype.getConditionObjectRowText=function(e){return this.getConditionObjectRowName(e)},t.prototype.getConditionObjectsRowIndeces=function(){return[]},t.prototype.getProgressInfo=function(){if(this.generatedVisibleRows)return l.SurveyElement.getProgressInfoByElements(this.getCellQuestions(),this.isRequired);var e=s.Base.createProgressInfo();return this.updateProgressInfoByValues(e),e},t.prototype.updateProgressInfoByValues=function(e){},t.prototype.updateProgressInfoByRow=function(e,t){e.questionCount+=this.columns.length;for(var n=0;n<this.columns.length;n++){var r=this.columns[n];e.requiredQuestionCount+=r.isRequired;var i=!a.Helpers.isValueEmpty(t[r.name]);e.answeredQuestionCount+=i?1:0,e.requiredAnsweredQuestionCount+=i&&r.isRequired?1:0}},t.prototype.getCellQuestions=function(){var e=[];return this.runFuncForCellQuestions(function(t){e.push(t)}),e},t.prototype.onBeforeValueChanged=function(e){},t.prototype.onSetQuestionValue=function(){if(!this.isRowChanging&&(this.onBeforeValueChanged(this.value),this.generatedVisibleRows&&0!=this.generatedVisibleRows.length)){this.isRowChanging=!0;for(var e=this.createNewValue(),t=0;t<this.generatedVisibleRows.length;t++)this.generatedVisibleRows[t].value=this.getRowValueCore(this.generatedVisibleRows[t],e);this.isRowChanging=!1}},t.prototype.setQuestionValue=function(t){e.prototype.setQuestionValue.call(this,t,!1),this.onSetQuestionValue(),this.updateIsAnswered()},t.prototype.supportGoNextPageAutomatic=function(){var e=this.generatedVisibleRows;if(e||(e=this.visibleRows),!e)return!0;for(var t=0;t<e.length;t++){var n=this.generatedVisibleRows[t].cells;if(n)for(var r=0;r<n.length;r++){var i=n[r].question;if(i&&(!i.supportGoNextPageAutomatic()||!i.value))return!1}}return!0},t.prototype.getContainsErrors=function(){return e.prototype.getContainsErrors.call(this)||this.checkForAnswersOrErrors(function(e){return e.containsErrors},!1)},t.prototype.getIsAnswered=function(){return e.prototype.getIsAnswered.call(this)&&this.checkForAnswersOrErrors(function(e){return e.isAnswered},!0)},t.prototype.checkForAnswersOrErrors=function(e,t){void 0===t&&(t=!1);var n=this.generatedVisibleRows;if(!n)return!1;for(var r=0;r<n.length;r++){var i=n[r].cells;if(i)for(var o=0;o<i.length;o++)if(i[o]){var a=i[o].question;if(a&&a.isVisible)if(e(a)){if(!t)return!0}else if(t)return!1}}return!!t},t.prototype.hasErrors=function(t,n){void 0===t&&(t=!0),void 0===n&&(n=null);var r=this.hasErrorInRows(t,n),i=this.isValueDuplicated();return e.prototype.hasErrors.call(this,t,n)||r||i},t.prototype.getIsRunningValidators=function(){if(e.prototype.getIsRunningValidators.call(this))return!0;if(!this.generatedVisibleRows)return!1;for(var t=0;t<this.generatedVisibleRows.length;t++){var n=this.generatedVisibleRows[t].cells;if(n)for(var r=0;r<n.length;r++)if(n[r]){var i=n[r].question;if(i&&i.isRunningValidators)return!0}}return!1},t.prototype.getAllErrors=function(){var t=e.prototype.getAllErrors.call(this),n=this.generatedVisibleRows;if(null===n)return t;for(var r=0;r<n.length;r++)for(var i=n[r],o=0;o<i.cells.length;o++){var a=i.cells[o].question.getAllErrors();a&&a.length>0&&(t=t.concat(a))}return t},t.prototype.hasErrorInRows=function(e,t){var n=this,r=this.generatedVisibleRows;this.generatedVisibleRows||(r=this.visibleRows);var i=!1;if(t||(t={}),!r)return t;t.isSingleDetailPanel="underRowSingle"===this.detailPanelMode;for(var o=0;o<r.length;o++)i=r[o].hasErrors(e,t,function(){n.raiseOnCompletedAsyncValidators()})||i;return i},t.prototype.isValueDuplicated=function(){if(!this.generatedVisibleRows)return!1;for(var e=this.getUniqueColumns(),t=!1,n=0;n<e.length;n++)t=this.isValueInColumnDuplicated(e[n])||t;return t},t.prototype.isValueInColumnDuplicated=function(e){for(var t=[],n=!1,r=0;r<this.generatedVisibleRows.length;r++)n=this.isValueDuplicatedInRow(this.generatedVisibleRows[r],e,t)||n;return n},t.prototype.getUniqueColumns=function(){for(var e=new Array,t=0;t<this.columns.length;t++)this.columns[t].isUnique&&e.push(this.columns[t]);return e},t.prototype.isValueDuplicatedInRow=function(e,t,n){var r=e.getQuestionByColumn(t);if(!r||r.isEmpty())return!1;for(var i=r.value,o=0;o<n.length;o++)if(a.Helpers.isTwoValueEquals(i,n[o],!0,this.isUniqueCaseSensitive))return this.addDuplicationError(r),!0;return n.push(i),!1},t.prototype.addDuplicationError=function(e){e.addError(new f.KeyDuplicationError(this.keyDuplicationError,this))},t.prototype.getFirstQuestionToFocus=function(e){return this.getFirstCellQuestion(e)},t.prototype.getFirstInputElementId=function(){var t=this.getFirstCellQuestion(!1);return t?t.inputId:e.prototype.getFirstInputElementId.call(this)},t.prototype.getFirstErrorInputElementId=function(){var t=this.getFirstCellQuestion(!0);return t?t.inputId:e.prototype.getFirstErrorInputElementId.call(this)},t.prototype.getFirstCellQuestion=function(e){if(!this.generatedVisibleRows)return null;for(var t=0;t<this.generatedVisibleRows.length;t++)for(var n=this.generatedVisibleRows[t].cells,r=0;r<n.length;r++){if(!e)return n[r].question;if(n[r].question.currentErrorCount>0)return n[r].question}return null},t.prototype.onReadOnlyChanged=function(){if(e.prototype.onReadOnlyChanged.call(this),this.generateRows)for(var t=0;t<this.visibleRows.length;t++)this.visibleRows[t].onQuestionReadOnlyChanged(this.isReadOnly)},t.prototype.createQuestion=function(e,t){return this.createQuestionCore(e,t)},t.prototype.createQuestionCore=function(e,t){var n=t.createCellQuestion(e);return n.setSurveyImpl(e),n.setParentQuestion(this),n},t.prototype.deleteRowValue=function(e,t){return e?(delete e[t.rowName],this.isObject(e)&&0==Object.keys(e).length?null:e):e},t.prototype.onAnyValueChanged=function(e){if(!this.isUpdateLocked&&!this.isDoingonAnyValueChanged&&this.generatedVisibleRows){this.isDoingonAnyValueChanged=!0;for(var t=this.visibleRows,n=0;n<t.length;n++)t[n].onAnyValueChanged(e);var r=this.visibleTotalRow;r&&r.onAnyValueChanged(e),this.isDoingonAnyValueChanged=!1}},t.prototype.isObject=function(e){return null!==e&&"object"==typeof e},t.prototype.getOnCellValueChangedOptions=function(e,t,n){return{row:e,columnName:t,rowValue:n,value:n?n[t]:null,getCellQuestion:function(t){for(var n=0;n<e.cells.length;n++){var r=e.cells[n].column;if(r&&r.name===t)return e.cells[n].question}return null}}},t.prototype.onCellValueChanged=function(e,t,n){if(this.survey){var r=this.getOnCellValueChangedOptions(e,t,n);this.onCellValueChangedCallback&&this.onCellValueChangedCallback(r),this.survey.matrixCellValueChanged(this,r)}},t.prototype.validateCell=function(e,t,n){if(this.survey){var r=this.getOnCellValueChangedOptions(e,t,n);return this.survey.matrixCellValidate(this,r)}},Object.defineProperty(t.prototype,"isValidateOnValueChanging",{get:function(){return!!this.survey&&this.survey.isValidateOnValueChanging},enumerable:!1,configurable:!0}),t.prototype.onRowChanging=function(e,t,n){if(!this.survey)return n?n[t]:null;var r=this.getOnCellValueChangedOptions(e,t,n),i=this.getRowValueCore(e,this.createNewValue(),!0);return r.oldValue=i?i[t]:null,this.survey.matrixCellValueChanging(this,r),r.value},t.prototype.onRowChanged=function(e,t,n,r){var i=t?this.getRowObj(e):null;if(i){var o=null;n&&!r&&(o=n[t]),this.isRowChanging=!0,i[t]=o,this.isRowChanging=!1,this.onCellValueChanged(e,t,i)}else{var a=this.createNewValue(!0),s=this.getNewValueOnRowChanged(e,t,n,r,this.createNewValue());if(this.isTwoValueEquals(a,s.value))return;this.isRowChanging=!0,this.setNewValue(s.value),this.isRowChanging=!1,t&&this.onCellValueChanged(e,t,s.rowValue)}},t.prototype.getNewValueOnRowChanged=function(e,t,n,r,i){var o=this.getRowValueCore(e,i,!0);r&&delete o[t];for(var a=0;a<e.cells.length;a++)delete o[s=e.cells[a].question.getValueName()];if(n)for(var s in n=JSON.parse(JSON.stringify(n)))this.isValueEmpty(n[s])||(o[s]=n[s]);return this.isObject(o)&&0===Object.keys(o).length&&(i=this.deleteRowValue(i,e)),{value:i,rowValue:o}},t.prototype.getRowIndex=function(e){return this.generatedVisibleRows?this.visibleRows.indexOf(e):-1},t.prototype.getElementsInDesign=function(t){return void 0===t&&(t=!1),"none"==this.detailPanelMode?e.prototype.getElementsInDesign.call(this,t):t?[this.detailPanel]:this.detailElements},t.prototype.hasDetailPanel=function(e){return"none"!=this.detailPanelMode&&(!!this.isDesignMode||(this.onHasDetailPanelCallback?this.onHasDetailPanelCallback(e):this.detailElements.length>0))},t.prototype.getIsDetailPanelShowing=function(e){if("none"==this.detailPanelMode)return!1;if(this.isDesignMode){var t=0==this.visibleRows.indexOf(e);return t&&(e.detailPanel||e.showDetailPanel()),t}return this.getPropertyValue("isRowShowing"+e.id,!1)},t.prototype.setIsDetailPanelShowing=function(e,t){if(t!=this.getIsDetailPanelShowing(e)&&(this.setPropertyValue("isRowShowing"+e.id,t),this.updateDetailPanelButtonCss(e),this.renderedTable&&this.renderedTable.onDetailPanelChangeVisibility(e,t),t&&"underRowSingle"===this.detailPanelMode))for(var n=this.visibleRows,r=0;r<n.length;r++)n[r].id!==e.id&&n[r].isDetailPanelShowing&&n[r].hideDetailPanel()},t.prototype.getDetailPanelButtonCss=function(e){var t=(new m.CssClassBuilder).append(this.getPropertyValue("detailButtonCss"+e.id));return t.append(this.cssClasses.detailButton,""===t.toString()).toString()},t.prototype.getDetailPanelIconCss=function(e){var t=(new m.CssClassBuilder).append(this.getPropertyValue("detailIconCss"+e.id));return t.append(this.cssClasses.detailIcon,""===t.toString()).toString()},t.prototype.getDetailPanelIconId=function(e){return this.getIsDetailPanelShowing(e)?this.cssClasses.detailIconExpandedId:this.cssClasses.detailIconId},t.prototype.updateDetailPanelButtonCss=function(e){var t=this.cssClasses,n=this.getIsDetailPanelShowing(e),r=(new m.CssClassBuilder).append(t.detailIcon).append(t.detailIconExpanded,n);this.setPropertyValue("detailIconCss"+e.id,r.toString());var i=(new m.CssClassBuilder).append(t.detailButton).append(t.detailButtonExpanded,n);this.setPropertyValue("detailButtonCss"+e.id,i.toString())},t.prototype.createRowDetailPanel=function(e){if(this.isDesignMode)return this.detailPanel;var t=this.createNewDetailPanel();t.readOnly=this.isReadOnly;var n=this.detailPanel.toJSON();return(new i.JsonObject).toObject(n,t),t.renderWidth="100%",t.updateCustomWidgets(),this.onCreateDetailPanelCallback&&this.onCreateDetailPanelCallback(e,t),t},t.prototype.getSharedQuestionByName=function(e,t){if(!this.survey||!this.valueName)return null;var n=this.getRowIndex(t);return n<0?null:this.survey.getQuestionByValueNameFromArray(this.valueName,e,n)},t.prototype.onTotalValueChanged=function(){!this.data||!this.visibleTotalRow||this.isUpdateLocked||this.isSett||this.isReadOnly||this.data.setValue(this.getValueName()+p.settings.matrixTotalValuePostFix,this.totalValue,!1)},t.prototype.getParentTextProcessor=function(){if(!this.parentQuestion||!this.parent)return null;var e=this.parent.data;return e&&e.getTextProcessor?e.getTextProcessor():null},t.prototype.getQuestionFromArray=function(e,t){return t>=this.visibleRows.length?null:this.visibleRows[t].getQuestionByName(e)},t.prototype.isMatrixValueEmpty=function(e){if(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(this.isObject(e[t])&&Object.keys(e[t]).length>0)return!1;return!0}return 0==Object.keys(e).length}},Object.defineProperty(t.prototype,"SurveyModel",{get:function(){return this.survey},enumerable:!1,configurable:!0}),t.prototype.getCellTemplateData=function(e){return this.SurveyModel.getMatrixCellTemplateData(e)},t.prototype.getCellWrapperComponentName=function(e){return this.SurveyModel.getElementWrapperComponentName(e,"cell")},t.prototype.getCellWrapperComponentData=function(e){return this.SurveyModel.getElementWrapperComponentData(e,"cell")},t.prototype.getColumnHeaderWrapperComponentName=function(e){return this.SurveyModel.getElementWrapperComponentName(e,"column-header")},t.prototype.getColumnHeaderWrapperComponentData=function(e){return this.SurveyModel.getElementWrapperComponentData(e,"column-header")},t.prototype.getRowHeaderWrapperComponentName=function(e){return this.SurveyModel.getElementWrapperComponentName(e,"row-header")},t.prototype.getRowHeaderWrapperComponentData=function(e){return this.SurveyModel.getElementWrapperComponentData(e,"row-header")},Object.defineProperty(t.prototype,"showHorizontalScroll",{get:function(){return!this.isDefaultV2Theme&&this.horizontalScroll},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){return(new m.CssClassBuilder).append(e.prototype.getRootCss.call(this)).append(this.cssClasses.rootScroll,this.horizontalScroll).toString()},t}(o.QuestionMatrixBaseModel);i.Serializer.addClass("matrixdropdownbase",[{name:"columns:matrixdropdowncolumns",className:"matrixdropdowncolumn"},{name:"columnLayout",alternativeName:"columnsLocation",default:"horizontal",choices:["horizontal","vertical"]},{name:"detailElements",visible:!1,isLightSerializable:!1},{name:"detailPanelMode",choices:["none","underRow","underRowSingle"],default:"none"},"horizontalScroll:boolean",{name:"choices:itemvalue[]"},{name:"placeholder",alternativeName:"optionsCaption",serializationProperty:"locPlaceholder"},{name:"keyDuplicationError",serializationProperty:"locKeyDuplicationError"},{name:"cellType",default:"dropdown",choices:function(){return g.MatrixDropdownColumn.getColumnTypes()}},{name:"columnColCount",default:0,choices:[0,1,2,3,4]},"columnMinWidth",{name:"allowAdaptiveActions:boolean",default:!1,visible:!1}],function(){return new S("")},"matrixbase")},"./src/question_matrixdropdowncolumn.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"matrixDropdownColumnTypes",function(){return c}),n.d(t,"MatrixDropdownColumn",function(){return d});var r,i=n("./src/jsonobject.ts"),o=n("./src/base.ts"),a=n("./src/question_expression.ts"),s=n("./src/settings.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function u(e,t,n,r){e.storeOthersAsComment=!!n&&n.storeOthersAsComment,e.choices&&0!=e.choices.length||!e.choicesByUrl.isEmpty||(e.choices=n.choices),e.choicesByUrl.isEmpty||e.choicesByUrl.run(r.getTextProcessor())}var c={dropdown:{onCellQuestionUpdate:function(e,t,n,r){u(e,0,n,r),e.locPlaceholder&&e.locPlaceholder.isEmpty&&!n.locPlaceholder.isEmpty&&(e.optionsCaption=n.optionsCaption)}},checkbox:{onCellQuestionUpdate:function(e,t,n,r){u(e,0,n,r),e.colCount=t.colCount>-1?t.colCount:n.columnColCount}},radiogroup:{onCellQuestionUpdate:function(e,t,n,r){u(e,0,n,r),e.colCount=t.colCount>-1?t.colCount:n.columnColCount}},text:{},comment:{},boolean:{onCellQuestionUpdate:function(e,t,n,r){e.showTitle=!0,e.renderAs=t.renderAs}},expression:{},rating:{}},d=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this)||this;r.colOwnerValue=null,r.indexValue=-1,r._isVisible=!0,r._hasVisibleCell=!0,r.previousChoicesId=void 0;var i=r;return r.createLocalizableString("totalFormat",r),r.createLocalizableString("cellHint",r),r.registerFunctionOnPropertyValueChanged("showInMultipleColumns",function(){i.doShowInMultipleColumnsChanged()}),r.updateTemplateQuestion(),r.name=t,n?r.title=n:r.templateQuestion.locTitle.strChanged(),r}return l(t,e),t.getColumnTypes=function(){var e=[];for(var t in c)e.push(t);return e},t.prototype.getOriginalObj=function(){return this.templateQuestion},t.prototype.getClassNameProperty=function(){return"cellType"},t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.colOwner?this.colOwner.survey:null},t.prototype.endLoadingFromJson=function(){var t=this;e.prototype.endLoadingFromJson.call(this),this.templateQuestion.autoOtherMode=this.isShowInMultipleColumns,this.templateQuestion.endLoadingFromJson(),this.templateQuestion.onGetSurvey=function(){return t.getSurvey()}},t.prototype.getDynamicPropertyName=function(){return"cellType"},t.prototype.getDynamicType=function(){return"default"===this.cellType?"question":this.calcCellQuestionType(null)},Object.defineProperty(t.prototype,"colOwner",{get:function(){return this.colOwnerValue},set:function(e){this.colOwnerValue=e,e&&(this.updateTemplateQuestion(),this.setParentQuestionToTemplate(this.templateQuestion))},enumerable:!1,configurable:!0}),t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.locTitle.strChanged()},t.prototype.addUsedLocales=function(t){e.prototype.addUsedLocales.call(this,t),this.templateQuestion.addUsedLocales(t)},Object.defineProperty(t.prototype,"index",{get:function(){return this.indexValue},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e){this.indexValue=e},t.prototype.getType=function(){return"matrixdropdowncolumn"},Object.defineProperty(t.prototype,"cellType",{get:function(){return this.getPropertyValue("cellType")},set:function(e){e=e.toLocaleLowerCase(),this.updateTemplateQuestion(e),this.setPropertyValue("cellType",e),this.colOwner&&this.colOwner.onColumnCellTypeChanged(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"templateQuestion",{get:function(){return this.templateQuestionValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.templateQuestion.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},enumerable:!1,configurable:!0}),t.prototype.setIsVisible=function(e){this._isVisible=e},Object.defineProperty(t.prototype,"hasVisibleCell",{get:function(){return this._hasVisibleCell},set:function(e){this._hasVisibleCell=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.templateQuestion.name},set:function(e){this.templateQuestion.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.templateQuestion.title},set:function(e){this.templateQuestion.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.templateQuestion.locTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullTitle",{get:function(){return this.locTitle.textOrHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.templateQuestion.isRequired},set:function(e){this.templateQuestion.isRequired=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRenderedRequired",{get:function(){return this.getPropertyValue("isRenderedRequired",this.isRequired)},set:function(e){this.setPropertyValue("isRenderedRequired",e)},enumerable:!1,configurable:!0}),t.prototype.updateIsRenderedRequired=function(e){this.isRenderedRequired=e||this.isRequired},Object.defineProperty(t.prototype,"requiredText",{get:function(){return this.isRenderedRequired&&this.getSurvey()?this.getSurvey().requiredText:this.templateQuestion.requiredText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredErrorText",{get:function(){return this.templateQuestion.requiredErrorText},set:function(e){this.templateQuestion.requiredErrorText=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locRequiredErrorText",{get:function(){return this.templateQuestion.locRequiredErrorText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.templateQuestion.readOnly},set:function(e){this.templateQuestion.readOnly=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasOther",{get:function(){return this.templateQuestion.hasOther},set:function(e){this.templateQuestion.hasOther=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleIf",{get:function(){return this.templateQuestion.visibleIf},set:function(e){this.templateQuestion.visibleIf=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableIf",{get:function(){return this.templateQuestion.enableIf},set:function(e){this.templateQuestion.enableIf=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredIf",{get:function(){return this.templateQuestion.requiredIf},set:function(e){this.templateQuestion.requiredIf=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUnique",{get:function(){return this.getPropertyValue("isUnique")},set:function(e){this.setPropertyValue("isUnique",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInMultipleColumns",{get:function(){return this.getPropertyValue("showInMultipleColumns",!1)},set:function(e){this.setPropertyValue("showInMultipleColumns",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSupportMultipleColumns",{get:function(){return["checkbox","radiogroup"].indexOf(this.cellType)>-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowInMultipleColumns",{get:function(){return this.showInMultipleColumns&&this.isSupportMultipleColumns},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validators",{get:function(){return this.templateQuestion.validators},set:function(e){this.templateQuestion.validators=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalType",{get:function(){return this.getPropertyValue("totalType")},set:function(e){this.setPropertyValue("totalType",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalExpression",{get:function(){return this.getPropertyValue("totalExpression")},set:function(e){this.setPropertyValue("totalExpression",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTotal",{get:function(){return"none"!=this.totalType||!!this.totalExpression},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalFormat",{get:function(){return this.getLocalizableStringText("totalFormat","")},set:function(e){this.setLocalizableStringText("totalFormat",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTotalFormat",{get:function(){return this.getLocalizableString("totalFormat")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellHint",{get:function(){return this.getLocalizableStringText("cellHint","")},set:function(e){this.setLocalizableStringText("cellHint",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locCellHint",{get:function(){return this.getLocalizableString("cellHint")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderAs",{get:function(){return this.getPropertyValue("renderAs")},set:function(e){this.setPropertyValue("renderAs",e),this.templateQuestion&&(this.templateQuestion.renderAs=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalMaximumFractionDigits",{get:function(){return this.getPropertyValue("totalMaximumFractionDigits")},set:function(e){e<-1||e>20||this.setPropertyValue("totalMaximumFractionDigits",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalMinimumFractionDigits",{get:function(){return this.getPropertyValue("totalMinimumFractionDigits")},set:function(e){e<-1||e>20||this.setPropertyValue("totalMinimumFractionDigits",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDisplayStyle",{get:function(){return this.getPropertyValue("totalDisplayStyle")},set:function(e){this.setPropertyValue("totalDisplayStyle",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalCurrency",{get:function(){return this.getPropertyValue("totalCurrency")},set:function(e){Object(a.getCurrecyCodes)().indexOf(e)<0||this.setPropertyValue("totalCurrency",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth","")},set:function(e){this.setPropertyValue("minWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.getPropertyValue("width","")},set:function(e){this.setPropertyValue("width",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colCount",{get:function(){return this.getPropertyValue("colCount")},set:function(e){e<-1||e>4||this.setPropertyValue("colCount",e)},enumerable:!1,configurable:!0}),t.prototype.getLocale=function(){return this.colOwner?this.colOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.colOwner?this.colOwner.getMarkdownHtml(e,t):null},t.prototype.getRenderer=function(e){return this.colOwner?this.colOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.colOwner?this.colOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.colOwner?this.colOwner.getProcessedText(e):e},t.prototype.createCellQuestion=function(e){var t=this.calcCellQuestionType(e),n=this.createNewQuestion(t);return this.callOnCellQuestionUpdate(n,e),n},t.prototype.startLoadingFromJson=function(t){e.prototype.startLoadingFromJson.call(this,t),t&&!t.cellType&&t.choices&&(t.cellType=this.colOwner.getCellType())},t.prototype.updateCellQuestion=function(e,t,n){void 0===n&&(n=null),this.setQuestionProperties(e,n)},t.prototype.callOnCellQuestionUpdate=function(e,t){var n=e.getType(),r=c[n];r&&r.onCellQuestionUpdate&&r.onCellQuestionUpdate(e,this,this.colOwner,t)},t.prototype.defaultCellTypeChanged=function(){this.updateTemplateQuestion()},t.prototype.calcCellQuestionType=function(e){var t=this.getDefaultCellQuestionType();return e&&this.colOwner&&(t=this.colOwner.getCustomCellType(this,e,t)),t},t.prototype.getDefaultCellQuestionType=function(e){return e||(e=this.cellType),"default"!==e?e:this.colOwner?this.colOwner.getCellType():s.settings.matrixDefaultCellType},t.prototype.updateTemplateQuestion=function(e){var t=this,n=this.getDefaultCellQuestionType(e),r=this.templateQuestion?this.templateQuestion.getType():"";n!==r&&(this.templateQuestion&&this.removeProperties(r),this.templateQuestionValue=this.createNewQuestion(n),this.templateQuestion.locOwner=this,this.addProperties(n),this.templateQuestion.onPropertyChanged.add(function(e,n){t.propertyValueChanged(n.name,n.oldValue,n.newValue)}),this.templateQuestion.onItemValuePropertyChanged.add(function(e,n){t.doItemValuePropertyChanged(n.propertyName,n.obj,n.name,n.newValue,n.oldValue)}),this.templateQuestion.isContentElement=!0,this.isLoadingFromJson||(this.templateQuestion.onGetSurvey=function(){return t.getSurvey()}),this.templateQuestion.locTitle.strChanged())},t.prototype.createNewQuestion=function(e){var t=i.Serializer.createClass(e);return t||(t=i.Serializer.createClass("text")),t.loadingOwner=this,t.isEditableTemplateElement=!0,t.autoOtherMode=this.isShowInMultipleColumns,this.setQuestionProperties(t),this.setParentQuestionToTemplate(t),t},t.prototype.setParentQuestionToTemplate=function(e){this.colOwner&&this.colOwner.isQuestion&&e.setParentQuestion(this.colOwner)},t.prototype.setQuestionProperties=function(e,t){var n=this;if(void 0===t&&(t=null),this.templateQuestion){var r=(new i.JsonObject).toJsonObject(this.templateQuestion,!0);t&&t(r),r.type=e.getType(),"default"===this.cellType&&this.colOwner&&this.colOwner.hasChoices()&&delete r.choices,(new i.JsonObject).toObject(r,e),e.isContentElement=this.templateQuestion.isContentElement,this.previousChoicesId=void 0,e.loadedChoicesFromServerCallback=function(){if(n.isShowInMultipleColumns&&(!n.previousChoicesId||n.previousChoicesId===e.id)){n.previousChoicesId=e.id;var t=e.visibleChoices;n.templateQuestion.choices=t,n.propertyValueChanged("choices",t,t)}}}},t.prototype.propertyValueChanged=function(t,n,r){e.prototype.propertyValueChanged.call(this,t,n,r),"isRequired"===t&&this.updateIsRenderedRequired(r),this.colOwner&&!this.isLoadingFromJson&&(this.isShowInMultipleColumns&&["visibleChoices","choices"].indexOf(t)>-1&&this.colOwner.onShowInMultipleColumnsChanged(this),i.Serializer.hasOriginalProperty(this,t)&&this.colOwner.onColumnPropertyChanged(this,t,r))},t.prototype.doItemValuePropertyChanged=function(e,t,n,r,o){i.Serializer.hasOriginalProperty(t,n)&&(null==this.colOwner||this.isLoadingFromJson||this.colOwner.onColumnItemValuePropertyChanged(this,e,t,n,r,o))},t.prototype.doShowInMultipleColumnsChanged=function(){null==this.colOwner||this.isLoadingFromJson||this.colOwner.onShowInMultipleColumnsChanged(this),this.templateQuestion&&(this.templateQuestion.autoOtherMode=this.isShowInMultipleColumns)},t.prototype.getProperties=function(e){return i.Serializer.getDynamicPropertiesByObj(this,e)},t.prototype.removeProperties=function(e){for(var t=this.getProperties(e),n=0;n<t.length;n++){var r=t[n];delete this[r.name],r.serializationProperty&&delete this[r.serializationProperty]}},t.prototype.addProperties=function(e){for(var t=this.templateQuestion,n=this.getProperties(e),r=0;r<n.length;r++){var i=n[r];this.addProperty(t,i.name,!1),i.serializationProperty&&this.addProperty(t,i.serializationProperty,!0)}},t.prototype.addProperty=function(e,t,n){var r={configurable:!0,get:function(){return e[t]}};n||(r.set=function(n){e[t]=n}),Object.defineProperty(this,t,r)},t}(o.Base);i.Serializer.addClass("matrixdropdowncolumn",[{name:"!name",isUnique:!0},{name:"title",serializationProperty:"locTitle",dependsOn:"name",onPropertyEditorUpdate:function(e,t){e&&t&&(t.placeholder=e.name)}},{name:"cellHint",serializationProperty:"locCellHint",visible:!1},{name:"cellType",default:"default",choices:function(){var e=d.getColumnTypes();return e.splice(0,0,"default"),e}},{name:"colCount",default:-1,choices:[-1,0,1,2,3,4]},"isRequired:boolean","isUnique:boolean",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},"readOnly:boolean","minWidth","width","visibleIf:condition","enableIf:condition","requiredIf:condition",{name:"showInMultipleColumns:boolean",dependsOn:"cellType",visibleIf:function(e){return!!e&&e.isSupportMultipleColumns}},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"},{name:"totalType",default:"none",choices:["none","sum","count","min","max","avg"]},"totalExpression:expression",{name:"totalFormat",serializationProperty:"locTotalFormat"},{name:"totalDisplayStyle",default:"none",choices:["none","decimal","currency","percent"]},{name:"totalCurrency",choices:function(){return Object(a.getCurrecyCodes)()},default:"USD"},{name:"totalMaximumFractionDigits:number",default:-1},{name:"totalMinimumFractionDigits:number",default:-1},{name:"renderAs",default:"default",visible:!1}],function(){return new d("")})},"./src/question_matrixdropdownrendered.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionMatrixDropdownRenderedCell",function(){return f}),n.d(t,"QuestionMatrixDropdownRenderedRow",function(){return m}),n.d(t,"QuestionMatrixDropdownRenderedTable",function(){return g});var r,i=n("./src/jsonobject.ts"),o=n("./src/base.ts"),a=n("./src/itemvalue.ts"),s=n("./src/actions/action.ts"),l=n("./src/actions/adaptive-container.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=n("./src/actions/container.ts"),d=n("./src/settings.ts"),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},f=function(){function e(){this.minWidth="",this.width="",this.colSpans=1,this.isActionsCell=!1,this.isDragHandlerCell=!1,this.classNameValue="",this.idValue=e.counter++}return Object.defineProperty(e.prototype,"hasQuestion",{get:function(){return!!this.question},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTitle",{get:function(){return!!this.locTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPanel",{get:function(){return!!this.panel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showErrorOnTop",{get:function(){return this.showErrorOnCore("top")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showErrorOnBottom",{get:function(){return this.showErrorOnCore("bottom")},enumerable:!1,configurable:!0}),e.prototype.showErrorOnCore=function(e){return this.getShowErrorLocation(e)&&(!this.isChoice||this.isFirstChoice)},e.prototype.getShowErrorLocation=function(e){return this.hasQuestion&&this.question.showErrorOnCore(e)},Object.defineProperty(e.prototype,"item",{get:function(){return this.itemValue},set:function(e){this.itemValue=e,e&&(e.hideCaption=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isChoice",{get:function(){return!!this.item},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isItemChoice",{get:function(){return this.isChoice&&!this.isOtherChoice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"choiceValue",{get:function(){return this.isChoice?this.item.value:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCheckbox",{get:function(){return this.isItemChoice&&this.question.isDescendantOf("checkbox")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRadio",{get:function(){return this.isItemChoice&&this.question.isDescendantOf("radiogroup")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFirstChoice",{get:function(){return 0===this.choiceIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){var e=(new u.CssClassBuilder).append(this.classNameValue);return this.hasQuestion&&e.append(this.question.cssClasses.hasError,this.question.errors.length>0).append(this.question.cssClasses.answered,this.question.isAnswered),e.toString()},set:function(e){this.classNameValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){if(this.cell&&this.cell.column){if(" "===this.cell.column.cellHint)return"";if(this.cell.column.cellHint)return this.cell.column.locCellHint.renderedHtml;if(this.cell.column.isShowInMultipleColumns)return this.item.locText.renderedHtml}return this.question&&this.question.isVisible?this.question.locTitle.renderedHtml:this.hasTitle&&this.locTitle.renderedHtml||""},enumerable:!1,configurable:!0}),e.prototype.getTitle=function(){return this.matrix&&this.matrix.showHeader?this.headers:""},e.prototype.calculateFinalClassName=function(e){var t=this.cell.question.cssClasses,n=(new u.CssClassBuilder).append(t.itemValue,!!t).append(t.asCell,!!t);return n.append(e.cell,n.isEmpty()&&!!e).append(e.choiceCell,this.isChoice).toString()},e.counter=1,e}(),m=function(e){function t(n,r){void 0===r&&(r=!1);var i=e.call(this)||this;return i.cssClasses=n,i.isDetailRow=r,i.cells=[],i.idValue=t.counter++,i}return h(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this.row?{"data-sv-drop-target-matrix-row":this.row.id}:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return(new u.CssClassBuilder).append(this.cssClasses.row).append(this.cssClasses.detailRow,this.isDetailRow).append(this.cssClasses.ghostRow,this.isGhostRow).append(this.cssClasses.rowAdditional,this.isAdditionalClasses).toString()},enumerable:!1,configurable:!0}),t.counter=1,p([Object(i.property)({defaultValue:null})],t.prototype,"isGhostRow",void 0),p([Object(i.property)({defaultValue:!1})],t.prototype,"isAdditionalClasses",void 0),t}(o.Base),g=function(e){function t(t){var n=e.call(this)||this;return n.matrix=t,n.renderedRowsChangedCallback=function(){},n.hasActionCellInRowsValues={},n.build(),n}return h(t,e),Object.defineProperty(t.prototype,"showTable",{get:function(){return this.getPropertyValue("showTable",!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showHeader",{get:function(){return this.getPropertyValue("showHeader")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAddRowOnTop",{get:function(){return this.getPropertyValue("showAddRowOnTop",!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAddRowOnBottom",{get:function(){return this.getPropertyValue("showAddRowOnBottom",!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showFooter",{get:function(){return this.matrix.hasFooter&&this.matrix.isColumnLayoutHorizontal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFooter",{get:function(){return!!this.footerRow},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasRemoveRows",{get:function(){return this.hasRemoveRowsValue},enumerable:!1,configurable:!0}),t.prototype.isRequireReset=function(){return this.hasRemoveRows!=this.matrix.canRemoveRows||!this.matrix.isColumnLayoutHorizontal},Object.defineProperty(t.prototype,"headerRow",{get:function(){return this.headerRowValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"footerRow",{get:function(){return this.footerRowValue},enumerable:!1,configurable:!0}),t.prototype.build=function(){this.hasRemoveRowsValue=this.matrix.canRemoveRows,this.cssClasses=this.matrix.cssClasses,this.buildRowsActions(),this.buildHeader(),this.buildRows(),this.buildFooter(),this.updateShowTableAndAddRow()},t.prototype.updateShowTableAndAddRow=function(){var e=this.rows.length>0||this.matrix.isDesignMode||!this.matrix.getShowColumnsIfEmpty();this.setPropertyValue("showTable",e);var t=this.matrix.canAddRow&&e,n=t,r=t;n&&(n="default"===this.matrix.getAddRowLocation()?!this.matrix.isColumnLayoutHorizontal:"bottom"!==this.matrix.getAddRowLocation()),r&&"topBottom"!==this.matrix.getAddRowLocation()&&(r=!n),this.setPropertyValue("showAddRowOnTop",n),this.setPropertyValue("showAddRowOnBottom",r)},t.prototype.onAddedRow=function(){if(!(this.getRenderedDataRowCount()>=this.matrix.visibleRows.length)){var e=this.matrix.visibleRows[this.matrix.visibleRows.length-1];this.rowsActions.push(this.buildRowActions(e)),this.addHorizontalRow(this.rows,e,1==this.matrix.visibleRows.length&&!this.matrix.showHeader),this.updateShowTableAndAddRow()}},t.prototype.getRenderedDataRowCount=function(){for(var e=0,t=0;t<this.rows.length;t++)this.rows[t].isDetailRow||e++;return e},t.prototype.onRemovedRow=function(e){var t=this.getRenderedRowIndex(e);if(!(t<0)){this.rowsActions.splice(t,1);var n=1;t<this.rows.length-1&&this.rows[t+1].isDetailRow&&n++,this.rows.splice(t,n),this.updateShowTableAndAddRow()}},t.prototype.onDetailPanelChangeVisibility=function(e,t){var n=this.getRenderedRowIndex(e);if(!(n<0)){var r=n<this.rows.length-1&&this.rows[n+1].isDetailRow?n+1:-1;if(!(t&&r>-1||!t&&r<0))if(t){var i=this.createDetailPanelRow(e,this.rows[n]);this.rows.splice(n+1,0,i)}else this.rows.splice(r,1)}},t.prototype.getRenderedRowIndex=function(e){for(var t=0;t<this.rows.length;t++)if(this.rows[t].row==e)return t;return-1},t.prototype.buildRowsActions=function(){this.rowsActions=[];for(var e=this.matrix.visibleRows,t=0;t<e.length;t++)this.rowsActions.push(this.buildRowActions(e[t]))},t.prototype.createRenderedRow=function(e,t){return void 0===t&&(t=!1),new m(e,t)},t.prototype.buildHeader=function(){var e=this.matrix.isColumnLayoutHorizontal&&this.matrix.showHeader||this.matrix.hasRowText&&!this.matrix.isColumnLayoutHorizontal;if(this.setPropertyValue("showHeader",e),e){if(this.headerRowValue=this.createRenderedRow(this.cssClasses),this.matrix.allowRowsDragAndDrop&&this.headerRow.cells.push(this.createHeaderCell(null)),this.hasActionCellInRows("start")&&this.headerRow.cells.push(this.createHeaderCell(null)),this.matrix.hasRowText&&this.matrix.showHeader&&this.headerRow.cells.push(this.createHeaderCell(null)),this.matrix.isColumnLayoutHorizontal)for(var t=0;t<this.matrix.visibleColumns.length;t++){var n=this.matrix.visibleColumns[t];n.hasVisibleCell&&(n.isShowInMultipleColumns?this.createMutlipleColumnsHeader(n):this.headerRow.cells.push(this.createHeaderCell(n)))}else{var r=this.matrix.visibleRows;for(t=0;t<r.length;t++){var i=this.createTextCell(r[t].locText);i.row=r[t],this.headerRow.cells.push(i)}this.matrix.hasFooter&&this.headerRow.cells.push(this.createTextCell(this.matrix.getFooterText()))}this.hasActionCellInRows("end")&&this.headerRow.cells.push(this.createHeaderCell(null))}},t.prototype.buildFooter=function(){if(this.showFooter){this.footerRowValue=this.createRenderedRow(this.cssClasses),this.matrix.allowRowsDragAndDrop&&this.footerRow.cells.push(this.createHeaderCell(null)),this.hasActionCellInRows("start")&&this.footerRow.cells.push(this.createHeaderCell(null)),this.matrix.hasRowText&&this.footerRow.cells.push(this.createTextCell(this.matrix.getFooterText()));for(var e=this.matrix.visibleTotalRow.cells,t=0;t<e.length;t++){var n=e[t];if(n.column.hasVisibleCell)if(n.column.isShowInMultipleColumns)this.createMutlipleColumnsFooter(this.footerRow,n);else{var r=this.createEditCell(n);n.column&&this.setHeaderCellWidth(n.column,r),this.footerRow.cells.push(r)}}this.hasActionCellInRows("end")&&this.footerRow.cells.push(this.createHeaderCell(null))}},t.prototype.buildRows=function(){var e=this.matrix.isColumnLayoutHorizontal?this.buildHorizontalRows():this.buildVerticalRows();this.rows=e},t.prototype.hasActionCellInRows=function(e){if(void 0===this.hasActionCellInRowsValues[e]){var t=this.matrix.visibleRows;this.hasActionCellInRowsValues[e]=!1;for(var n=0;n<t.length;n++)if(!this.isValueEmpty(this.getRowActions(n,e))){this.hasActionCellInRowsValues[e]=!0;break}}return this.hasActionCellInRowsValues[e]},t.prototype.canRemoveRow=function(e){return this.matrix.canRemoveRow(e)},t.prototype.buildHorizontalRows=function(){for(var e=this.matrix.visibleRows,t=[],n=0;n<e.length;n++)this.addHorizontalRow(t,e[n],0==n&&!this.matrix.showHeader);return t},t.prototype.addHorizontalRow=function(e,t,n){var r=this.createHorizontalRow(t,n);r.row=t,e.push(r),t.isDetailPanelShowing&&e.push(this.createDetailPanelRow(t,r))},t.prototype.getRowDragCell=function(e){var t=new f;return t.isDragHandlerCell=!0,t.className=this.getActionsCellClassName(),t.row=this.matrix.visibleRows[e],t},t.prototype.getActionsCellClassName=function(){return(new u.CssClassBuilder).append(this.cssClasses.actionsCell).append(this.cssClasses.verticalCell,!this.matrix.isColumnLayoutHorizontal).toString()},t.prototype.getRowActionsCell=function(e,t){var n=this.getRowActions(e,t);if(!this.isValueEmpty(n)){var r=new f,i=this.matrix.allowAdaptiveActions?new l.AdaptiveActionContainer:new c.ActionContainer;this.matrix.survey&&this.matrix.survey.getCss().actionBar&&(i.cssClasses=this.matrix.survey.getCss().actionBar),i.setItems(n);var o=new a.ItemValue(i);return r.item=o,r.isActionsCell=!0,r.className=this.getActionsCellClassName(),r.row=this.matrix.visibleRows[e],r}return null},t.prototype.getRowActions=function(e,t){var n=this.rowsActions[e];return Array.isArray(n)?n.filter(function(e){return e.location||(e.location="start"),e.location===t}):[]},t.prototype.buildRowActions=function(e){var t=[];return this.setDefaultRowActions(e,t),this.matrix.survey&&(t=this.matrix.survey.getUpdatedMatrixRowActions(this.matrix,e,t)),t},Object.defineProperty(t.prototype,"showRemoveButtonAsIcon",{get:function(){return d.settings.matrixRenderRemoveAsIcon&&this.matrix.survey&&"sd-root-modern"===this.matrix.survey.css.root},enumerable:!1,configurable:!0}),t.prototype.setDefaultRowActions=function(e,t){var n=this.matrix;this.hasRemoveRows&&this.canRemoveRow(e)&&t.push(new s.Action(this.showRemoveButtonAsIcon?{id:"remove-row",iconName:"icon-delete",component:"sv-action-bar-item",innerCss:(new u.CssClassBuilder).append(this.matrix.cssClasses.button).append(this.matrix.cssClasses.buttonRemove).toString(),location:"end",showTitle:!1,title:n.removeRowText,enabled:!n.isInputReadOnly,data:{row:e,question:n},action:function(){n.removeRowUI(e)}}:{id:"remove-row",location:"end",enabled:!this.matrix.isInputReadOnly,component:"sv-matrix-remove-button",data:{row:e,question:this.matrix}})),e.hasPanel&&t.push(new s.Action({id:"show-detail",title:this.matrix.getLocalizationString("editText"),showTitle:!1,location:"start",component:"sv-matrix-detail-button",data:{row:e,question:this.matrix}}))},t.prototype.createHorizontalRow=function(e,t){var n=this.createRenderedRow(this.cssClasses);if(this.matrix.allowRowsDragAndDrop){var r=this.matrix.visibleRows.indexOf(e);n.cells.push(this.getRowDragCell(r))}this.addRowActionsCell(e,n,"start"),this.matrix.hasRowText&&((a=this.createTextCell(e.locText)).row=e,n.cells.push(a),t&&this.setHeaderCellWidth(null,a),a.className=(new u.CssClassBuilder).append(a.className).append(this.cssClasses.rowTextCell).append(this.cssClasses.detailRowText,e.hasPanel).toString());for(var i=0;i<e.cells.length;i++){var o=e.cells[i];if(o.column.hasVisibleCell)if(o.column.isShowInMultipleColumns)this.createMutlipleEditCells(n,o);else{var a=this.createEditCell(o);n.cells.push(a),t&&this.setHeaderCellWidth(o.column,a)}}return this.addRowActionsCell(e,n,"end"),n},t.prototype.addRowActionsCell=function(e,t,n){var r=this.matrix.visibleRows.indexOf(e);if(this.hasActionCellInRows(n)){var i=this.getRowActionsCell(r,n);if(i)t.cells.push(i);else{var o=new f;o.isEmpty=!0,t.cells.push(o)}}},t.prototype.createDetailPanelRow=function(e,t){var n=this.matrix.isDesignMode,r=this.createRenderedRow(this.cssClasses,!0);r.row=e;var i=new f;this.matrix.hasRowText&&(i.colSpans=2),i.isEmpty=!0,n||r.cells.push(i);var o=null;this.hasActionCellInRows("end")&&((o=new f).isEmpty=!0);var a=new f;return a.panel=e.detailPanel,a.colSpans=t.cells.length-(n?0:i.colSpans)-(o?o.colSpans:0),a.className=this.cssClasses.detailPanelCell,r.cells.push(a),o&&r.cells.push(o),"function"==typeof this.matrix.onCreateDetailPanelRenderedRowCallback&&this.matrix.onCreateDetailPanelRenderedRowCallback(r),r},t.prototype.buildVerticalRows=function(){for(var e=this.matrix.columns,t=[],n=0;n<e.length;n++){var r=e[n];r.isVisible&&r.hasVisibleCell&&(r.isShowInMultipleColumns?this.createMutlipleVerticalRows(t,r,n):t.push(this.createVerticalRow(r,n)))}return this.hasActionCellInRows("end")&&t.push(this.createEndVerticalActionRow()),t},t.prototype.createMutlipleVerticalRows=function(e,t,n){var r=this.getMultipleColumnChoices(t);if(r)for(var i=0;i<r.length;i++)e.push(this.createVerticalRow(t,n,r[i],i))},t.prototype.createVerticalRow=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=-1);var i=this.createRenderedRow(this.cssClasses);if(this.matrix.showHeader){var o=this.createTextCell(n?n.locText:e.locTitle);o.column=e,o.className=(new u.CssClassBuilder).append(o.className).append(this.cssClasses.rowTextCell).toString(),n||this.setRequriedToHeaderCell(e,o),i.cells.push(o)}for(var a=this.matrix.visibleRows,s=0;s<a.length;s++){var l=n,c=r>=0?r:s,d=a[s].cells[t],h=n?d.question.visibleChoices:void 0;h&&c<h.length&&(l=h[c]);var p=this.createEditCell(d,l);p.item=l,p.choiceIndex=c,i.cells.push(p)}return this.matrix.hasTotal&&i.cells.push(this.createEditCell(this.matrix.visibleTotalRow.cells[t])),i},t.prototype.createEndVerticalActionRow=function(){var e=this.createRenderedRow(this.cssClasses);this.matrix.showHeader&&e.cells.push(this.createEmptyCell());for(var t=this.matrix.visibleRows,n=0;n<t.length;n++)e.cells.push(this.getRowActionsCell(n,"end"));return this.matrix.hasTotal&&e.cells.push(this.createEmptyCell()),e},t.prototype.createMutlipleEditCells=function(e,t,n){void 0===n&&(n=!1);var r=n?this.getMultipleColumnChoices(t.column):t.question.visibleChoices;if(r)for(var i=0;i<r.length;i++){var o=this.createEditCell(t,n?void 0:r[i]);n||(o.choiceIndex=i),e.cells.push(o)}},t.prototype.createEditCell=function(e,t){void 0===t&&(t=void 0);var n=new f;return n.cell=e,n.row=e.row,n.question=e.question,n.matrix=this.matrix,n.item=t,n.isOtherChoice=!!t&&!!e.question&&e.question.otherItem===t,n.className=n.calculateFinalClassName(this.cssClasses),n},t.prototype.createMutlipleColumnsFooter=function(e,t){this.createMutlipleEditCells(e,t,!0)},t.prototype.createMutlipleColumnsHeader=function(e){var t=this.getMultipleColumnChoices(e);if(t)for(var n=0;n<t.length;n++){var r=this.createTextCell(t[n].locText);this.setHeaderCell(e,r),this.headerRow.cells.push(r)}},t.prototype.getMultipleColumnChoices=function(e){var t=e.templateQuestion.choices;return t&&Array.isArray(t)&&0==t.length?this.matrix.choices:(t=e.templateQuestion.visibleChoices)&&Array.isArray(t)?t:null},t.prototype.createHeaderCell=function(e){var t=e?this.createTextCell(e.locTitle):this.createEmptyCell();t.column=e,this.setHeaderCell(e,t);var n=e&&"default"!==e.cellType?e.cellType:this.matrix.cellType;return t.className=(new u.CssClassBuilder).append(this.cssClasses.headerCell).append(this.cssClasses.emptyCell,!!t.isEmpty).append(this.cssClasses.cell+"--"+n).toString(),t},t.prototype.setHeaderCell=function(e,t){this.setHeaderCellWidth(e,t),this.setRequriedToHeaderCell(e,t)},t.prototype.setHeaderCellWidth=function(e,t){t.minWidth=null!=e?this.matrix.getColumnWidth(e):this.matrix.getRowTitleWidth(),t.width=null!=e?e.width:this.matrix.getRowTitleWidth()},t.prototype.setRequriedToHeaderCell=function(e,t){e&&e.isRequired&&this.matrix.survey&&(t.requiredText=this.matrix.survey.requiredText)},t.prototype.createRemoveRowCell=function(e){var t=new f;return t.row=e,t.isRemoveRow=this.canRemoveRow(e),this.cssClasses.cell&&(t.className=this.cssClasses.cell),t},t.prototype.createTextCell=function(e){var t=new f;return t.locTitle=e,e&&e.strChanged(),this.cssClasses.cell&&(t.className=this.cssClasses.cell),t},t.prototype.createEmptyCell=function(){var e=this.createTextCell(null);return e.isEmpty=!0,e},p([Object(i.propertyArray)({onPush:function(e,t,n){n.renderedRowsChangedCallback()}})],t.prototype,"rows",void 0),t}(o.Base)},"./src/question_matrixdynamic.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixDynamicRowModel",function(){return m}),n.d(t,"QuestionMatrixDynamicModel",function(){return g});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question_matrixdropdownbase.ts"),s=n("./src/error.ts"),l=n("./src/settings.ts"),u=n("./src/utils/utils.ts"),c=n("./src/dragdrop/matrix-rows.ts"),d=n("./src/utils/cssClassBuilder.ts"),h=n("./src/question_matrixdropdownrendered.ts"),p=n("./src/utils/dragOrClickHelper.ts"),f=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.index=t,i.buildCells(r),i}return f(t,e),Object.defineProperty(t.prototype,"rowName",{get:function(){return this.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shortcutText",{get:function(){var e=this.data.visibleRows.indexOf(this)+1,t=this.cells.length>1?this.cells[1].questionValue:void 0,n=this.cells.length>0?this.cells[0].questionValue:void 0;return t&&t.value||n&&n.value||""+e},enumerable:!1,configurable:!0}),t}(a.MatrixDropdownRowModelBase),g=function(e){function t(t){var n=e.call(this,t)||this;return n.rowCounter=0,n.initialRowCount=2,n.setRowCountValueFromData=!1,n.startDragMatrixRow=function(e,t){n.dragDropMatrixRows.startDrag(e,n.draggedRow,n,e.target)},n.moveRowByIndex=function(e,t){var r=n.createNewValue();if(r){var i=r[e];i&&(r.splice(e,1),r.splice(t,0,i),n.value=r)}},n.createLocalizableString("confirmDeleteText",n,!1,"confirmDelete"),n.createLocalizableString("addRowText",n).onGetTextCallback=function(e){return e||n.defaultAddRowText},n.createLocalizableString("removeRowText",n,!1,"removeRow"),n.createLocalizableString("emptyRowsText",n,!1,!0),n.registerFunctionOnPropertiesValueChanged(["hideColumnsIfEmpty","allowAddRows"],function(){n.updateShowTableAndAddRow()}),n.registerFunctionOnPropertyValueChanged("allowRowsDragAndDrop",function(){n.clearRowsAndResetRenderedTable()}),n.dragOrClickHelper=new p.DragOrClickHelper(n.startDragMatrixRow),n}return f(t,e),t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n),this.dragDropMatrixRows=new c.DragDropMatrixRows(this.survey)},t.prototype.isBanStartDrag=function(e){var t=e.target;return"true"===t.getAttribute("contenteditable")||"INPUT"===t.nodeName},t.prototype.onPointerDown=function(e,t){this.allowRowsDragAndDrop&&(this.isBanStartDrag(e)||t.isDetailPanelShowing||(this.draggedRow=t,this.dragOrClickHelper.onPointerDown(e)))},t.prototype.getType=function(){return"matrixdynamic"},Object.defineProperty(t.prototype,"isRowsDynamic",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmDelete",{get:function(){return this.getPropertyValue("confirmDelete",!1)},set:function(e){this.setPropertyValue("confirmDelete",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyName",{get:function(){return this.getPropertyValue("keyName","")},set:function(e){this.setPropertyValue("keyName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultRowValue",{get:function(){return this.getPropertyValue("defaultRowValue")},set:function(e){this.setPropertyValue("defaultRowValue",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultValueFromLastRow",{get:function(){return this.getPropertyValue("defaultValueFromLastRow",!1)},set:function(e){this.setPropertyValue("defaultValueFromLastRow",e)},enumerable:!1,configurable:!0}),t.prototype.isDefaultValueEmpty=function(){return e.prototype.isDefaultValueEmpty.call(this)&&this.isValueEmpty(this.defaultRowValue)},t.prototype.valueFromData=function(t){if(this.minRowCount<1)return e.prototype.valueFromData.call(this,t);Array.isArray(t)||(t=[]);for(var n=t.length;n<this.minRowCount;n++)t.push({});return t},t.prototype.setDefaultValue=function(){if(!this.isValueEmpty(this.defaultRowValue)&&this.isValueEmpty(this.defaultValue)){if(this.isEmpty()&&0!=this.rowCount){for(var t=[],n=0;n<this.rowCount;n++)t.push(this.defaultRowValue);this.value=t}}else e.prototype.setDefaultValue.call(this)},Object.defineProperty(t.prototype,"rowCount",{get:function(){return this.rowCountValue},set:function(e){if(!(e<0||e>l.settings.matrixMaximumRowCount)){this.setRowCountValueFromData=!1;var t=this.rowCountValue;if(this.rowCountValue=e,this.value&&this.value.length>e){var n=this.value;n.splice(e),this.value=n}if(this.isUpdateLocked)this.initialRowCount=e;else{if(this.generatedVisibleRows||0==t){this.generatedVisibleRows||(this.generatedVisibleRows=[]),this.generatedVisibleRows.splice(e);for(var r=t;r<e;r++){var i=this.createMatrixRow(this.getValueForNewRow());this.generatedVisibleRows.push(i),this.onMatrixRowCreated(i)}this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties())}this.onRowsChanged()}}},enumerable:!1,configurable:!0}),t.prototype.updateProgressInfoByValues=function(e){var t=this.value;Array.isArray(t)||(t=[]);for(var n=0;n<this.rowCount;n++)this.updateProgressInfoByRow(e,n<t.length?t[n]:{})},t.prototype.getValueForNewRow=function(){var e=null;return this.onGetValueForNewRowCallBack&&(e=this.onGetValueForNewRowCallBack(this)),e},Object.defineProperty(t.prototype,"allowRowsDragAndDrop",{get:function(){return!this.readOnly&&this.getPropertyValue("allowRowsDragAndDrop")},set:function(e){this.setPropertyValue("allowRowsDragAndDrop",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconDragElement",{get:function(){return this.cssClasses.iconDragElement},enumerable:!1,configurable:!0}),t.prototype.createRenderedTable=function(){return new v(this)},Object.defineProperty(t.prototype,"rowCountValue",{get:function(){return this.getPropertyValue("rowCount")},set:function(e){this.setPropertyValue("rowCount",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minRowCount",{get:function(){return this.getPropertyValue("minRowCount")},set:function(e){e<0&&(e=0),this.setPropertyValue("minRowCount",e),e>this.maxRowCount&&(this.maxRowCount=e),this.rowCount<e&&(this.rowCount=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxRowCount",{get:function(){return this.getPropertyValue("maxRowCount")},set:function(e){e<=0||(e>l.settings.matrixMaximumRowCount&&(e=l.settings.matrixMaximumRowCount),e!=this.maxRowCount&&(this.setPropertyValue("maxRowCount",e),e<this.minRowCount&&(this.minRowCount=e),this.rowCount>e&&(this.rowCount=e)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAddRows",{get:function(){return this.getPropertyValue("allowAddRows")},set:function(e){this.setPropertyValue("allowAddRows",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowRemoveRows",{get:function(){return this.getPropertyValue("allowRemoveRows")},set:function(e){this.setPropertyValue("allowRemoveRows",e),this.isUpdateLocked||this.resetRenderedTable()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canAddRow",{get:function(){return this.allowAddRows&&!this.isReadOnly&&this.rowCount<this.maxRowCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRemoveRows",{get:function(){var e=this.allowRemoveRows&&!this.isReadOnly&&this.rowCount>this.minRowCount;return this.canRemoveRowsCallback?this.canRemoveRowsCallback(e):e},enumerable:!1,configurable:!0}),t.prototype.canRemoveRow=function(e){return!this.survey||this.survey.matrixAllowRemoveRow(this,e.index,e)},t.prototype.addRowUI=function(){var e=this.rowCount;if(this.addRow(),e!==this.rowCount){var t=this.getQuestionToFocusOnAddingRow();t&&t.focus()}},t.prototype.getQuestionToFocusOnAddingRow=function(){for(var e=this.visibleRows[this.visibleRows.length-1],t=0;t<e.cells.length;t++){var n=e.cells[t].question;if(n&&n.isVisible&&!n.isReadOnly)return n}return null},t.prototype.addRow=function(){var e={question:this,canAddRow:this.canAddRow};this.survey&&this.survey.matrixBeforeRowAdded(e),e.canAddRow&&(this.onStartRowAddingRemoving(),this.addRowCore(),this.onEndRowAdding(),this.detailPanelShowOnAdding&&this.visibleRows.length>0&&this.visibleRows[this.visibleRows.length-1].showDetailPanel())},Object.defineProperty(t.prototype,"detailPanelShowOnAdding",{get:function(){return this.getPropertyValue("detailPanelShowOnAdding")},set:function(e){this.setPropertyValue("detailPanelShowOnAdding",e)},enumerable:!1,configurable:!0}),t.prototype.hasRowsAsItems=function(){return!1},t.prototype.unbindValue=function(){this.clearGeneratedRows(),this.clearPropertyValue("value"),this.rowCountValue=0,e.prototype.unbindValue.call(this)},t.prototype.isValueSurveyElement=function(t){return this.isEditingSurveyElement||e.prototype.isValueSurveyElement.call(this,t)},t.prototype.addRowCore=function(){var e=this.rowCount;this.rowCount=this.rowCount+1;var t=this.getDefaultRowValue(!0),n=null;if(this.isValueEmpty(t)||(n=this.createNewValue()).length==this.rowCount&&(n[n.length-1]=t,this.value=n),this.data){this.runCellsCondition(this.getDataFilteredValues(),this.getDataFilteredProperties());var r=this.visibleRows[this.rowCount-1];this.isValueEmpty(r.value)||(n||(n=this.createNewValue()),this.isValueSurveyElement(n)||this.isTwoValueEquals(n[n.length-1],r.value)||(n[n.length-1]=r.value,this.value=n))}this.survey&&e+1==this.rowCount&&(this.survey.matrixRowAdded(this,this.visibleRows[this.visibleRows.length-1]),this.onRowsChanged())},t.prototype.getDefaultRowValue=function(e){for(var t=null,n=0;n<this.columns.length;n++){var r=this.columns[n].templateQuestion;r&&!this.isValueEmpty(r.getDefaultValue())&&((t=t||{})[this.columns[n].name]=r.getDefaultValue())}if(!this.isValueEmpty(this.defaultRowValue))for(var i in this.defaultRowValue)(t=t||{})[i]=this.defaultRowValue[i];if(e&&this.defaultValueFromLastRow){var o=this.value;if(o&&Array.isArray(o)&&o.length>=this.rowCount-1){var a=o[this.rowCount-2];for(var i in a)(t=t||{})[i]=a[i]}}return t},t.prototype.removeRowUI=function(e){if(e&&e.rowName){var t=this.visibleRows.indexOf(e);if(t<0)return;e=t}this.isRequireConfirmOnRowDelete(e)&&!Object(u.confirmAction)(this.confirmDeleteText)||this.removeRow(e)},t.prototype.isRequireConfirmOnRowDelete=function(e){if(!this.confirmDelete)return!1;if(e<0||e>=this.rowCount)return!1;var t=this.createNewValue();return!(this.isValueEmpty(t)||!Array.isArray(t)||e>=t.length||this.isValueEmpty(t[e]))},t.prototype.removeRow=function(e){if(this.canRemoveRows&&!(e<0||e>=this.rowCount)){var t=this.visibleRows&&e<this.visibleRows.length?this.visibleRows[e]:null;t&&this.survey&&!this.survey.matrixRowRemoving(this,e,t)||(this.onStartRowAddingRemoving(),this.removeRowCore(e),this.onEndRowRemoving(t))}},t.prototype.removeRowCore=function(e){var t=this.generatedVisibleRows?this.generatedVisibleRows[e]:null;if(this.generatedVisibleRows&&e<this.generatedVisibleRows.length&&this.generatedVisibleRows.splice(e,1),this.rowCountValue--,this.value){var n=[];(n=Array.isArray(this.value)&&e<this.value.length?this.createValueCopy():this.createNewValue()).splice(e,1),n=this.deleteRowValue(n,null),this.isRowChanging=!0,this.value=n,this.isRowChanging=!1}this.onRowsChanged(),this.survey&&this.survey.matrixRowRemoved(this,e,t)},Object.defineProperty(t.prototype,"confirmDeleteText",{get:function(){return this.getLocalizableStringText("confirmDeleteText")},set:function(e){this.setLocalizableStringText("confirmDeleteText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locConfirmDeleteText",{get:function(){return this.getLocalizableString("confirmDeleteText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addRowText",{get:function(){return this.getLocalizableStringText("addRowText",this.defaultAddRowText)},set:function(e){this.setLocalizableStringText("addRowText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locAddRowText",{get:function(){return this.getLocalizableString("addRowText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultAddRowText",{get:function(){return this.getLocalizationString(this.isColumnLayoutHorizontal?"addRow":"addColumn")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"addRowLocation",{get:function(){return this.getPropertyValue("addRowLocation")},set:function(e){this.setPropertyValue("addRowLocation",e)},enumerable:!1,configurable:!0}),t.prototype.getAddRowLocation=function(){return this.addRowLocation},Object.defineProperty(t.prototype,"hideColumnsIfEmpty",{get:function(){return this.getPropertyValue("hideColumnsIfEmpty")},set:function(e){this.setPropertyValue("hideColumnsIfEmpty",e)},enumerable:!1,configurable:!0}),t.prototype.getShowColumnsIfEmpty=function(){return this.hideColumnsIfEmpty},Object.defineProperty(t.prototype,"removeRowText",{get:function(){return this.getLocalizableStringText("removeRowText")},set:function(e){this.setLocalizableStringText("removeRowText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locRemoveRowText",{get:function(){return this.getLocalizableString("removeRowText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyRowsText",{get:function(){return this.getLocalizableStringText("emptyRowsText")},set:function(e){this.setLocalizableStringText("emptyRowsText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locEmptyRowsText",{get:function(){return this.getLocalizableString("emptyRowsText")},enumerable:!1,configurable:!0}),t.prototype.getDisplayValueCore=function(e,t){if(!t||!Array.isArray(t))return t;for(var n=this.getUnbindValue(t),r=this.visibleRows,i=0;i<r.length&&i<n.length;i++){var o=n[i];o&&(n[i]=this.getRowDisplayValue(e,r[i],o))}return n},t.prototype.getConditionObjectRowName=function(e){return"["+e.toString()+"]"},t.prototype.getConditionObjectsRowIndeces=function(){for(var e=[],t=Math.max(this.rowCount,1),n=0;n<Math.min(l.settings.matrixMaxRowCountInCondition,t);n++)e.push(n);return e},t.prototype.supportGoNextPageAutomatic=function(){return!1},Object.defineProperty(t.prototype,"hasRowText",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCheckForErrors=function(t,n){e.prototype.onCheckForErrors.call(this,t,n),!n&&this.hasErrorInMinRows()&&t.push(new s.MinRowCountError(this.minRowCount,this))},t.prototype.hasErrorInMinRows=function(){if(this.minRowCount<=0||!this.isRequired||!this.generatedVisibleRows)return!1;for(var e=0,t=0;t<this.generatedVisibleRows.length;t++)this.generatedVisibleRows[t].isEmpty||e++;return e<this.minRowCount},t.prototype.getUniqueColumns=function(){var t=e.prototype.getUniqueColumns.call(this);if(this.keyName){var n=this.getColumnByName(this.keyName);n&&t.indexOf(n)<0&&t.push(n)}return t},t.prototype.generateRows=function(){var e=new Array;if(0===this.rowCount)return e;for(var t=this.createNewValue(),n=0;n<this.rowCount;n++)e.push(this.createMatrixRow(this.getRowValueByIndex(t,n)));return this.isValueEmpty(this.getDefaultRowValue(!1))||(this.value=t),e},t.prototype.createMatrixRow=function(e){return new m(this.rowCounter++,this,e)},t.prototype.onBeforeValueChanged=function(e){if(e&&Array.isArray(e)){var t=e.length;t!=this.rowCount&&(!this.setRowCountValueFromData&&t<this.initialRowCount||(this.setRowCountValueFromData=!0,this.rowCountValue=t,this.generatedVisibleRows&&(this.clearGeneratedRows(),this.generatedVisibleRows=this.visibleRows,this.onRowsChanged())))}},t.prototype.createNewValue=function(){var e=this.createValueCopy();e&&Array.isArray(e)||(e=[]),e.length>this.rowCount&&e.splice(this.rowCount);var t=this.getDefaultRowValue(!1);t=t||{};for(var n=e.length;n<this.rowCount;n++)e.push(this.getUnbindValue(t));return e},t.prototype.deleteRowValue=function(e,t){for(var n=!0,r=0;r<e.length;r++)if(this.isObject(e[r])&&Object.keys(e[r]).length>0){n=!1;break}return n?null:e},t.prototype.getRowValueByIndex=function(e,t){return Array.isArray(e)&&t>=0&&t<e.length?e[t]:null},t.prototype.getRowValueCore=function(e,t,n){if(void 0===n&&(n=!1),!this.generatedVisibleRows)return{};var r=this.getRowValueByIndex(t,this.generatedVisibleRows.indexOf(e));return!r&&n&&(r={}),r},t.prototype.getAddRowButtonCss=function(e){return void 0===e&&(e=!1),(new d.CssClassBuilder).append(this.cssClasses.button).append(this.cssClasses.buttonAdd).append(this.cssClasses.emptyRowsButton,e).toString()},t.prototype.getRemoveRowButtonCss=function(){return(new d.CssClassBuilder).append(this.cssClasses.button).append(this.cssClasses.buttonRemove).toString()},t.prototype.getRootCss=function(){return(new d.CssClassBuilder).append(e.prototype.getRootCss.call(this)).append(this.cssClasses.empty,!this.renderedTable.showTable).toString()},t}(a.QuestionMatrixDropdownModelBase),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.setDefaultRowActions=function(t,n){e.prototype.setDefaultRowActions.call(this,t,n)},t}(h.QuestionMatrixDropdownRenderedTable);i.Serializer.addClass("matrixdynamic",[{name:"rowsVisibleIf:condition",visible:!1},{name:"allowAddRows:boolean",default:!0},{name:"allowRemoveRows:boolean",default:!0},{name:"rowCount:number",default:2,minValue:0,isBindable:!0},{name:"minRowCount:number",default:0,minValue:0},{name:"maxRowCount:number",default:l.settings.matrixMaximumRowCount},{name:"keyName"},"defaultRowValue:rowvalue","defaultValueFromLastRow:boolean",{name:"confirmDelete:boolean"},{name:"confirmDeleteText",dependsOn:"confirmDelete",visibleIf:function(e){return!e||e.confirmDelete},serializationProperty:"locConfirmDeleteText"},{name:"addRowLocation",default:"default",choices:["default","top","bottom","topBottom"]},{name:"addRowText",serializationProperty:"locAddRowText"},{name:"removeRowText",serializationProperty:"locRemoveRowText"},"hideColumnsIfEmpty:boolean",{name:"emptyRowsText:text",serializationProperty:"locEmptyRowsText",dependsOn:"hideColumnsIfEmpty",visibleIf:function(e){return!e||e.hideColumnsIfEmpty}},{name:"detailPanelShowOnAdding:boolean",dependsOn:"detailPanelMode",visibleIf:function(e){return"none"!==e.detailPanelMode}},"allowRowsDragAndDrop:switch"],function(){return new g("")},"matrixdropdownbase"),o.QuestionFactory.Instance.registerQuestion("matrixdynamic",function(e){var t=new g(e);return t.choices=[1,2,3,4,5],a.QuestionMatrixDropdownModelBase.addDefaultColumns(t),t})},"./src/question_multipletext.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"MultipleTextItemModel",function(){return f}),n.d(t,"QuestionMultipleTextModel",function(){return m});var r,i=n("./src/base.ts"),o=n("./src/survey-element.ts"),a=n("./src/question.ts"),s=n("./src/question_text.ts"),l=n("./src/jsonobject.ts"),u=n("./src/questionfactory.ts"),c=n("./src/helpers.ts"),d=n("./src/utils/cssClassBuilder.ts"),h=n("./src/settings.ts"),p=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this)||this;return r.editorValue=r.createEditor(t),r.editor.questionTitleTemplateCallback=function(){return""},r.editor.titleLocation="left",n&&(r.title=n),r}return p(t,e),t.prototype.getType=function(){return"multipletextitem"},Object.defineProperty(t.prototype,"id",{get:function(){return this.editor.id},enumerable:!1,configurable:!0}),t.prototype.getOriginalObj=function(){return this.editor},Object.defineProperty(t.prototype,"name",{get:function(){return this.editor.name},set:function(e){this.editor.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"question",{get:function(){return this.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editor",{get:function(){return this.editorValue},enumerable:!1,configurable:!0}),t.prototype.createEditor=function(e){return new s.QuestionTextModel(e)},t.prototype.addUsedLocales=function(t){e.prototype.addUsedLocales.call(this,t),this.editor.addUsedLocales(t)},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this),this.editor.locStrsChanged()},t.prototype.setData=function(e){this.data=e,e&&(this.editor.defaultValue=e.getItemDefaultValue(this.name),this.editor.setSurveyImpl(this),this.editor.parent=e)},Object.defineProperty(t.prototype,"isRequired",{get:function(){return this.editor.isRequired},set:function(e){this.editor.isRequired=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputType",{get:function(){return this.editor.inputType},set:function(e){this.editor.inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.editor.title},set:function(e){this.editor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.editor.locTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullTitle",{get:function(){return this.editor.fullTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.editor.maxLength},set:function(e){this.editor.maxLength=e},enumerable:!1,configurable:!0}),t.prototype.getMaxLength=function(){var e=this.getSurvey();return c.Helpers.getMaxLength(this.maxLength,e?e.maxTextLength:-1)},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.editor.placeholder},set:function(e){this.editor.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceholder",{get:function(){return this.editor.locPlaceholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"placeHolder",{get:function(){return this.placeholder},set:function(e){this.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceHolder",{get:function(){return this.locPlaceholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"requiredErrorText",{get:function(){return this.editor.requiredErrorText},set:function(e){this.editor.requiredErrorText=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locRequiredErrorText",{get:function(){return this.editor.locRequiredErrorText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.editor.size},set:function(e){this.editor.size=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"validators",{get:function(){return this.editor.validators},set:function(e){this.editor.validators=e},enumerable:!1,configurable:!0}),t.prototype.getValidators=function(){return this.validators},Object.defineProperty(t.prototype,"value",{get:function(){return this.data?this.data.getMultipleTextValue(this.name):null},set:function(e){null!=this.data&&this.data.setMultipleTextValue(this.name,e)},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return this.editor.isEmpty()},t.prototype.onValueChanged=function(e){this.valueChangedCallback&&this.valueChangedCallback(e)},t.prototype.getSurveyData=function(){return this},t.prototype.getSurvey=function(){return this.data?this.data.getSurvey():null},t.prototype.getTextProcessor=function(){return this.data?this.data.getTextProcessor():null},t.prototype.getValue=function(e){return this.data?this.data.getMultipleTextValue(e):null},t.prototype.setValue=function(e,t){this.data&&this.data.setMultipleTextValue(e,t)},t.prototype.getVariable=function(e){},t.prototype.setVariable=function(e,t){},t.prototype.getComment=function(e){return null},t.prototype.setComment=function(e,t){},t.prototype.getAllValues=function(){return this.data?this.data.getAllValues():this.value},t.prototype.getFilteredValues=function(){return this.getAllValues()},t.prototype.getFilteredProperties=function(){return{survey:this.getSurvey()}},t.prototype.getValidatorTitle=function(){return this.title},Object.defineProperty(t.prototype,"validatedValue",{get:function(){return this.value},set:function(e){this.value=e},enumerable:!1,configurable:!0}),t.prototype.getDataFilteredValues=function(){return this.getFilteredValues()},t.prototype.getDataFilteredProperties=function(){return this.getFilteredProperties()},t}(i.Base),m=function(e){function t(t){var n=e.call(this,t)||this;return n.isMultipleItemValueChanging=!1,n.createNewArray("items",function(e){e.setData(n)}),n.registerFunctionOnPropertyValueChanged("items",function(){n.fireCallback(n.colCountChangedCallback)}),n.registerFunctionOnPropertyValueChanged("colCount",function(){n.fireCallback(n.colCountChangedCallback)}),n.registerFunctionOnPropertyValueChanged("itemSize",function(){n.updateItemsSize()}),n}return p(t,e),t.addDefaultItems=function(e){for(var t=u.QuestionFactory.DefaultMutlipleTextItems,n=0;n<t.length;n++)e.addItem(t[n])},t.prototype.getType=function(){return"multipletext"},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n);for(var r=0;r<this.items.length;r++)this.items[r].setData(this)},Object.defineProperty(t.prototype,"isAllowTitleLeft",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSingleInput",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onSurveyLoad=function(){this.editorsOnSurveyLoad(),e.prototype.onSurveyLoad.call(this),this.fireCallback(this.colCountChangedCallback)},t.prototype.setQuestionValue=function(t,n){void 0===n&&(n=!0),e.prototype.setQuestionValue.call(this,t,n),this.performForEveryEditor(function(e){e.editor.updateValueFromSurvey(e.value)}),this.updateIsAnswered()},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.performForEveryEditor(function(e){e.editor.onSurveyValueChanged(e.value)})},t.prototype.updateItemsSize=function(){this.performForEveryEditor(function(e){e.editor.updateInputSize()})},t.prototype.editorsOnSurveyLoad=function(){this.performForEveryEditor(function(e){e.editor.onSurveyLoad()})},t.prototype.performForEveryEditor=function(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];n.editor&&e(n)}},Object.defineProperty(t.prototype,"items",{get:function(){return this.getPropertyValue("items")},set:function(e){this.setPropertyValue("items",e)},enumerable:!1,configurable:!0}),t.prototype.addItem=function(e,t){void 0===t&&(t=null);var n=this.createTextItem(e,t);return this.items.push(n),n},t.prototype.getItemByName=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].name==e)return this.items[t];return null},t.prototype.addConditionObjectsByContext=function(e,t){for(var n=0;n<this.items.length;n++){var r=this.items[n];e.push({name:this.getValueName()+"."+r.name,text:this.processedTitle+"."+r.fullTitle,question:this})}},t.prototype.getConditionJson=function(t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!n)return e.prototype.getConditionJson.call(this);var r=this.getItemByName(n);if(!r)return null;var i=(new l.JsonObject).toJsonObject(r);return i.type="text",i},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this);for(var t=0;t<this.items.length;t++)this.items[t].locStrsChanged()},t.prototype.supportGoNextPageAutomatic=function(){for(var e=0;e<this.items.length;e++)if(this.items[e].isEmpty())return!1;return!0},Object.defineProperty(t.prototype,"colCount",{get:function(){return this.getPropertyValue("colCount")},set:function(e){e<1||e>5||this.setPropertyValue("colCount",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemSize",{get:function(){return this.getPropertyValue("itemSize")},set:function(e){this.setPropertyValue("itemSize",e)},enumerable:!1,configurable:!0}),t.prototype.getRows=function(){for(var e=this.colCount,t=this.items,n=[],r=0,i=0;i<t.length;i++)0==r&&n.push([]),n[n.length-1].push(t[i]),++r>=e&&(r=0);return n},t.prototype.onValueChanged=function(){e.prototype.onValueChanged.call(this),this.onItemValueChanged()},t.prototype.createTextItem=function(e,t){return new f(e,t)},t.prototype.onItemValueChanged=function(){if(!this.isMultipleItemValueChanging)for(var e=0;e<this.items.length;e++){var t=null;this.value&&this.items[e].name in this.value&&(t=this.value[this.items[e].name]),this.items[e].onValueChanged(t)}},t.prototype.getIsRunningValidators=function(){if(e.prototype.getIsRunningValidators.call(this))return!0;for(var t=0;t<this.items.length;t++)if(this.items[t].editor.isRunningValidators)return!0;return!1},t.prototype.hasErrors=function(t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=null);for(var i=!1,o=0;o<this.items.length;o++)this.items[o].editor.onCompletedAsyncValidators=function(e){r.raiseOnCompletedAsyncValidators()},n&&!0===n.isOnValueChanged&&this.items[o].editor.isEmpty()||(i=this.items[o].editor.hasErrors(t,n)||i);return e.prototype.hasErrors.call(this,t)||i},t.prototype.getAllErrors=function(){for(var t=e.prototype.getAllErrors.call(this),n=0;n<this.items.length;n++){var r=this.items[n].editor.getAllErrors();r&&r.length>0&&(t=t.concat(r))}return t},t.prototype.clearErrors=function(){e.prototype.clearErrors.call(this);for(var t=0;t<this.items.length;t++)this.items[t].editor.clearErrors()},t.prototype.getContainsErrors=function(){var t=e.prototype.getContainsErrors.call(this);if(t)return t;for(var n=this.items,r=0;r<n.length;r++)if(n[r].editor.containsErrors)return!0;return!1},t.prototype.getIsAnswered=function(){if(!e.prototype.getIsAnswered.call(this))return!1;for(var t=0;t<this.items.length;t++){var n=this.items[t].editor;if(n.isVisible&&!n.isAnswered)return!1}return!0},t.prototype.getProgressInfo=function(){for(var e=[],t=0;t<this.items.length;t++)e.push(this.items[t].editor);return o.SurveyElement.getProgressInfoByElements(e,this.isRequired)},t.prototype.getDisplayValueCore=function(e,t){if(!t)return t;for(var n={},r=0;r<this.items.length;r++){var i=this.items[r],o=t[i.name];if(!c.Helpers.isValueEmpty(o)){var a=i.name;e&&i.title&&(a=i.title),n[a]=i.editor.getDisplayValue(e,o)}}return n},t.prototype.getMultipleTextValue=function(e){return this.value?this.value[e]:null},t.prototype.setMultipleTextValue=function(e,t){this.isMultipleItemValueChanging=!0,this.isValueEmpty(t)&&(t=void 0);var n=this.value;n||(n={}),n[e]=t,this.setNewValue(n),this.isMultipleItemValueChanging=!1},t.prototype.getItemDefaultValue=function(e){return this.defaultValue?this.defaultValue[e]:null},t.prototype.getTextProcessor=function(){return this.textProcessor},t.prototype.getAllValues=function(){return this.data?this.data.getAllValues():null},t.prototype.getIsRequiredText=function(){return this.survey?this.survey.requiredText:""},t.prototype.addElement=function(e,t){},t.prototype.removeElement=function(e){return!1},t.prototype.getQuestionTitleLocation=function(){return"left"},t.prototype.getQuestionStartIndex=function(){return this.getStartIndex()},t.prototype.getChildrenLayoutType=function(){return"row"},t.prototype.elementWidthChanged=function(e){},Object.defineProperty(t.prototype,"elements",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(e){return-1},t.prototype.ensureRowsVisibility=function(){},t.prototype.getItemLabelCss=function(e){return(new d.CssClassBuilder).append(this.cssClasses.itemLabel).append(this.cssClasses.itemLabelOnError,e.editor.errors.length>0).toString()},t.prototype.getItemCss=function(){return(new d.CssClassBuilder).append(this.cssClasses.item).toString()},t.prototype.getItemTitleCss=function(){return(new d.CssClassBuilder).append(this.cssClasses.itemTitle).toString()},t}(a.Question);l.Serializer.addClass("multipletextitem",["name","isRequired:boolean",{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder"},{name:"inputType",default:"text",choices:h.settings.questions.inputTypes},{name:"title",serializationProperty:"locTitle"},{name:"maxLength:number",default:-1},{name:"size:number",minValue:0},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"}],function(){return new f("")}),l.Serializer.addClass("multipletext",[{name:"!items:textitems",className:"multipletextitem"},{name:"itemSize:number",minValue:0},{name:"colCount:number",default:1,choices:[1,2,3,4,5]}],function(){return new m("")},"question"),u.QuestionFactory.Instance.registerQuestion("multipletext",function(e){var t=new m(e);return m.addDefaultItems(t),t})},"./src/question_paneldynamic.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionPanelDynamicItem",function(){return v}),n.d(t,"QuestionPanelDynamicTemplateSurveyImpl",function(){return y}),n.d(t,"QuestionPanelDynamicModel",function(){return b});var r,i=n("./src/helpers.ts"),o=n("./src/survey-element.ts"),a=n("./src/textPreProcessor.ts"),s=n("./src/question.ts"),l=n("./src/jsonobject.ts"),u=n("./src/questionfactory.ts"),c=n("./src/error.ts"),d=n("./src/settings.ts"),h=n("./src/utils/utils.ts"),p=n("./src/utils/cssClassBuilder.ts"),f=n("./src/actions/action.ts"),m=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(e){function t(t,n,r){var i=e.call(this,r)||this;return i.data=t,i.panelItem=n,i.variableName=r,i.sharedQuestions={},i}return m(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.panelItem.getSurvey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelItem.panel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelIndex",{get:function(){return this.data?this.data.getItemIndex(this.panelItem):-1},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.panelItem.getAllValues()},t.prototype.getQuestionByName=function(t){var n=e.prototype.getQuestionByName.call(this,t);if(n)return n;var r=this.panelIndex;return n=r>-1?this.data.getSharedQuestionFromArray(t,r):void 0,this.sharedQuestions[n?n.name:t]=t,n},t.prototype.getQuestionDisplayText=function(t){var n=this.sharedQuestions[t.name];if(!n)return e.prototype.getQuestionDisplayText.call(this,t);var r=this.panelItem.getValue(n);return t.getDisplayValue(!0,r)},t.prototype.onCustomProcessText=function(e){if(e.name==v.IndexVariableName){var n=this.panelIndex;if(n>-1)return e.isExists=!0,e.value=n+1,!0}if(0==e.name.toLowerCase().indexOf(v.ParentItemVariableName+".")){var r=this.data;if(r&&r.parentQuestion&&r.parent&&r.parent.data){var i=new t(r.parentQuestion,r.parent.data,v.ItemVariableName),o=v.ItemVariableName+e.name.substring(v.ParentItemVariableName.length),a=i.processValue(o,e.returnDisplayValue);e.isExists=a.isExists,e.value=a.value}return!0}return!1},t}(a.QuestionTextProcessor),v=function(){function e(t,n){this.data=t,this.panelValue=n,this.textPreProcessor=new g(t,this,e.ItemVariableName),this.setSurveyImpl()}return Object.defineProperty(e.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),e.prototype.setSurveyImpl=function(){this.panel.setSurveyImpl(this)},e.prototype.getValue=function(e){return this.getAllValues()[e]},e.prototype.setValue=function(e,t){var n=this.data.getPanelItemData(this),r=n?n[e]:void 0;if("object"==typeof r||!i.Helpers.isTwoValueEquals(t,r)){this.data.setPanelItemData(this,e,t);for(var o=this.panel.questions,a=0;a<o.length;a++)o[a].getValueName()!==e&&o[a].checkBindings(e,t)}},e.prototype.getVariable=function(e){},e.prototype.setVariable=function(e,t){},e.prototype.getComment=function(e){return this.getValue(e+d.settings.commentPrefix)||""},e.prototype.setComment=function(e,t,n){this.setValue(e+d.settings.commentPrefix,t)},e.prototype.getAllValues=function(){return this.data.getPanelItemData(this)},e.prototype.getFilteredValues=function(){var t={},n=this.data&&this.data.getRootData()?this.data.getRootData().getFilteredValues():{};for(var r in n)t[r]=n[r];if(t[e.ItemVariableName]=this.getAllValues(),this.data){t[e.IndexVariableName.toLowerCase()]=this.data.getItemIndex(this);var i=this.data;i&&i.parentQuestion&&i.parent&&(t[e.ParentItemVariableName]=i.parent.getValue())}return t},e.prototype.getFilteredProperties=function(){return this.data&&this.data.getRootData()?this.data.getRootData().getFilteredProperties():{survey:this.getSurvey()}},e.prototype.getSurveyData=function(){return this},e.prototype.getSurvey=function(){return this.data?this.data.getSurvey():null},e.prototype.getTextProcessor=function(){return this.textPreProcessor},e.ItemVariableName="panel",e.ParentItemVariableName="parentpanel",e.IndexVariableName="panelIndex",e}(),y=function(){function e(e){this.data=e}return e.prototype.getSurveyData=function(){return null},e.prototype.getSurvey=function(){return this.data.getSurvey()},e.prototype.getTextProcessor=function(){return null},e}(),b=function(e){function t(t){var n=e.call(this,t)||this;return n.loadingPanelCount=0,n.currentIndexValue=-1,n.isAddingNewPanels=!1,n.createNewArray("panels"),n.templateValue=n.createAndSetupNewPanelObject(),n.template.renderWidth="100%",n.template.selectedElementInDesign=n,n.template.addElementCallback=function(e){n.addOnPropertyChangedCallback(e),n.rebuildPanels()},n.template.removeElementCallback=function(){n.rebuildPanels()},n.createLocalizableString("confirmDeleteText",n,!1,"confirmDelete"),n.createLocalizableString("keyDuplicationError",n,!1,!0),n.createLocalizableString("panelAddText",n,!1,"addPanel"),n.createLocalizableString("panelRemoveText",n,!1,"removePanel"),n.createLocalizableString("panelPrevText",n,!1,"pagePrevText"),n.createLocalizableString("panelNextText",n,!1,"pageNextText"),n.createLocalizableString("noEntriesText",n,!1,"noEntriesText"),n.registerFunctionOnPropertyValueChanged("panelsState",function(){n.setPanelsState()}),n.registerFunctionOnPropertiesValueChanged(["isMobile"],function(){n.updateFooterActions()}),n}return m(t,e),Object.defineProperty(t.prototype,"hasSingleInput",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getFirstQuestionToFocus=function(e){for(var t=0;t<this.panels.length;t++){var n=this.panels[t].getFirstQuestionToFocus(e);if(n)return n}return null},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n),this.setTemplatePanelSurveyImpl(),this.setPanelsSurveyImpl()},t.prototype.assignOnPropertyChangedToTemplate=function(){for(var e=this.template.elements,t=0;t<e.length;t++)this.addOnPropertyChangedCallback(e[t])},t.prototype.addOnPropertyChangedCallback=function(e){var t=this;e.isQuestion&&e.setParentQuestion(this),e.onPropertyChanged.add(function(e,n){t.onTemplateElementPropertyChanged(e,n)}),e.isPanel&&(e.addElementCallback=function(e){t.addOnPropertyChangedCallback(e)})},t.prototype.onTemplateElementPropertyChanged=function(e,t){if(!this.isLoadingFromJson&&!this.useTemplatePanel&&0!=this.panels.length&&l.Serializer.findProperty(e.getType(),t.name))for(var n=this.panels,r=0;r<n.length;r++){var i=n[r].getQuestionByName(e.name);i&&i[t.name]!==t.newValue&&(i[t.name]=t.newValue)}},Object.defineProperty(t.prototype,"useTemplatePanel",{get:function(){return this.isDesignMode&&!this.isContentElement},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"paneldynamic"},Object.defineProperty(t.prototype,"isCompositeQuestion",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.clearOnDeletingContainer=function(){this.panels.forEach(function(e){e.clearOnDeletingContainer()})},Object.defineProperty(t.prototype,"isAllowTitleLeft",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.removeElement=function(e){return this.template.removeElement(e)},Object.defineProperty(t.prototype,"template",{get:function(){return this.templateValue},enumerable:!1,configurable:!0}),t.prototype.getPanel=function(){return this.template},Object.defineProperty(t.prototype,"templateElements",{get:function(){return this.template.elements},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"templateTitle",{get:function(){return this.template.title},set:function(e){this.template.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTemplateTitle",{get:function(){return this.template.locTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"templateDescription",{get:function(){return this.template.description},set:function(e){this.template.description=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTemplateDescription",{get:function(){return this.template.locDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){for(var e=[],t=0;t<this.panels.length;t++)e.push(this.panels[t].data);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.getPropertyValue("panels")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.isRenderModeList?-1:this.useTemplatePanel?0:(this.currentIndexValue<0&&this.panelCount>0&&(this.currentIndexValue=0),this.currentIndexValue>=this.panelCount&&(this.currentIndexValue=this.panelCount-1),this.currentIndexValue)},set:function(e){this.currentIndexValue!==e&&(e>=this.panelCount&&(e=this.panelCount-1),this.currentIndexValue=e,this.updateFooterActions(),this.fireCallback(this.currentIndexChangedCallback))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPanel",{get:function(){var e=this.currentIndex;return e<0||e>=this.panels.length?null:this.panels[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmDelete",{get:function(){return this.getPropertyValue("confirmDelete",!1)},set:function(e){this.setPropertyValue("confirmDelete",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyName",{get:function(){return this.getPropertyValue("keyName","")},set:function(e){this.setPropertyValue("keyName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"confirmDeleteText",{get:function(){return this.getLocalizableStringText("confirmDeleteText")},set:function(e){this.setLocalizableStringText("confirmDeleteText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locConfirmDeleteText",{get:function(){return this.getLocalizableString("confirmDeleteText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyDuplicationError",{get:function(){return this.getLocalizableStringText("keyDuplicationError")},set:function(e){this.setLocalizableStringText("keyDuplicationError",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locKeyDuplicationError",{get:function(){return this.getLocalizableString("keyDuplicationError")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelPrevText",{get:function(){return this.getLocalizableStringText("panelPrevText")},set:function(e){this.setLocalizableStringText("panelPrevText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPanelPrevText",{get:function(){return this.getLocalizableString("panelPrevText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelNextText",{get:function(){return this.getLocalizableStringText("panelNextText")},set:function(e){this.setLocalizableStringText("panelNextText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPanelNextText",{get:function(){return this.getLocalizableString("panelNextText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelAddText",{get:function(){return this.getLocalizableStringText("panelAddText")},set:function(e){this.setLocalizableStringText("panelAddText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPanelAddText",{get:function(){return this.getLocalizableString("panelAddText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelRemoveText",{get:function(){return this.getLocalizableStringText("panelRemoveText")},set:function(e){this.setLocalizableStringText("panelRemoveText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPanelRemoveText",{get:function(){return this.getLocalizableString("panelRemoveText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isProgressTopShowing",{get:function(){return"progressTop"===this.renderMode||"progressTopBottom"===this.renderMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isProgressBottomShowing",{get:function(){return"progressBottom"===this.renderMode||"progressTopBottom"===this.renderMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPrevButtonShowing",{get:function(){return this.currentIndex>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNextButtonShowing",{get:function(){return this.currentIndex>=0&&this.currentIndex<this.panelCount-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRangeShowing",{get:function(){return this.showRangeInProgress&&this.currentIndex>=0&&this.panelCount>1},enumerable:!1,configurable:!0}),t.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),e?[this.template]:this.templateElements},t.prototype.prepareValueForPanelCreating=function(){this.addingNewPanelsValue=this.value,this.isAddingNewPanels=!0,this.isNewPanelsValueChanged=!1},t.prototype.setValueAfterPanelsCreating=function(){this.isAddingNewPanels=!1,this.isNewPanelsValueChanged&&(this.isValueChangingInternally=!0,this.value=this.addingNewPanelsValue,this.isValueChangingInternally=!1)},t.prototype.getValueCore=function(){return this.isAddingNewPanels?this.addingNewPanelsValue:e.prototype.getValueCore.call(this)},t.prototype.setValueCore=function(t){this.isAddingNewPanels?(this.isNewPanelsValueChanged=!0,this.addingNewPanelsValue=t):e.prototype.setValueCore.call(this,t)},Object.defineProperty(t.prototype,"panelCount",{get:function(){return this.isLoadingFromJson||this.useTemplatePanel?this.loadingPanelCount:this.panels.length},set:function(e){if(!(e<0))if(this.isLoadingFromJson||this.useTemplatePanel)this.loadingPanelCount=e;else if(e!=this.panels.length&&!this.useTemplatePanel){this.updateBindings("panelCount",e),this.prepareValueForPanelCreating();for(var t=this.panelCount;t<e;t++){var n=this.createNewPanel();this.panels.push(n),"list"==this.renderMode&&"default"!=this.panelsState&&("expand"===this.panelsState?n.expand():n.title&&n.collapse())}e<this.panelCount&&this.panels.splice(e,this.panelCount-e),this.setValueAfterPanelsCreating(),this.setValueBasedOnPanelCount(),this.reRunCondition(),this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelsState",{get:function(){return this.getPropertyValue("panelsState")},set:function(e){this.setPropertyValue("panelsState",e)},enumerable:!1,configurable:!0}),t.prototype.setTemplatePanelSurveyImpl=function(){this.template.setSurveyImpl(this.useTemplatePanel?this.surveyImpl:new y(this))},t.prototype.setPanelsSurveyImpl=function(){for(var e=0;e<this.panels.length;e++){var t=this.panels[e];t!=this.template&&t.setSurveyImpl(t.data)}},t.prototype.setPanelsState=function(){if(!this.useTemplatePanel&&"list"==this.renderMode&&this.templateTitle)for(var e=0;e<this.panels.length;e++){var t=this.panelsState;"firstExpanded"===t&&(t=0===e?"expanded":"collapsed"),this.panels[e].state=t}},t.prototype.setValueBasedOnPanelCount=function(){var e=this.value;if(e&&Array.isArray(e)||(e=[]),e.length!=this.panelCount){for(var t=e.length;t<this.panelCount;t++)e.push({});e.length>this.panelCount&&e.splice(this.panelCount,e.length-this.panelCount),this.isValueChangingInternally=!0,this.value=e,this.isValueChangingInternally=!1}},Object.defineProperty(t.prototype,"minPanelCount",{get:function(){return this.getPropertyValue("minPanelCount")},set:function(e){e<0&&(e=0),e!=this.minPanelCount&&(this.setPropertyValue("minPanelCount",e),e>this.maxPanelCount&&(this.maxPanelCount=e),this.panelCount<e&&(this.panelCount=e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxPanelCount",{get:function(){return this.getPropertyValue("maxPanelCount")},set:function(e){e<=0||(e>d.settings.panelMaximumPanelCount&&(e=d.settings.panelMaximumPanelCount),e!=this.maxPanelCount&&(this.setPropertyValue("maxPanelCount",e),e<this.minPanelCount&&(this.minPanelCount=e),this.panelCount>e&&(this.panelCount=e)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowAddPanel",{get:function(){return this.getPropertyValue("allowAddPanel")},set:function(e){this.setPropertyValue("allowAddPanel",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowRemovePanel",{get:function(){return this.getPropertyValue("allowRemovePanel")},set:function(e){this.setPropertyValue("allowRemovePanel",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"templateTitleLocation",{get:function(){return this.getPropertyValue("templateTitleLocation")},set:function(e){this.setPropertyValue("templateTitleLocation",e.toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showQuestionNumbers",{get:function(){return this.getPropertyValue("showQuestionNumbers")},set:function(e){this.setPropertyValue("showQuestionNumbers",e),!this.isLoadingFromJson&&this.survey&&this.survey.questionVisibilityChanged(this,this.visible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panelRemoveButtonLocation",{get:function(){return this.getPropertyValue("panelRemoveButtonLocation")},set:function(e){this.setPropertyValue("panelRemoveButtonLocation",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showRangeInProgress",{get:function(){return this.getPropertyValue("showRangeInProgress")},set:function(e){this.setPropertyValue("showRangeInProgress",e),this.updateFooterActions(),this.fireCallback(this.currentIndexChangedCallback)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderMode",{get:function(){return this.getPropertyValue("renderMode")},set:function(e){this.setPropertyValue("renderMode",e),this.updateFooterActions(),this.fireCallback(this.renderModeChangedCallback)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRenderModeList",{get:function(){return"list"===this.renderMode},enumerable:!1,configurable:!0}),t.prototype.setVisibleIndex=function(t){if(!this.isVisible)return 0;for(var n="onSurvey"==this.showQuestionNumbers?t:0,r=0;r<this.panels.length;r++){var i=this.setPanelVisibleIndex(this.panels[r],n,"off"!=this.showQuestionNumbers);"onSurvey"==this.showQuestionNumbers&&(n+=i)}return e.prototype.setVisibleIndex.call(this,"onSurvey"!=this.showQuestionNumbers?t:-1),"onSurvey"!=this.showQuestionNumbers?1:n-t},t.prototype.setPanelVisibleIndex=function(e,t,n){return n?e.setVisibleIndex(t):(e.setVisibleIndex(-1),0)},Object.defineProperty(t.prototype,"canAddPanel",{get:function(){return!this.isDesignMode&&!(this.isDefaultV2Theme&&!this.legacyNavigation&&!this.isRenderModeList&&this.currentIndex<this.panelCount-1)&&this.allowAddPanel&&!this.isReadOnly&&this.panelCount<this.maxPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRemovePanel",{get:function(){return!this.isDesignMode&&this.allowRemovePanel&&!this.isReadOnly&&this.panelCount>this.minPanelCount},enumerable:!1,configurable:!0}),t.prototype.rebuildPanels=function(){var e;if(!this.isLoadingFromJson){this.prepareValueForPanelCreating();var t=[];if(this.useTemplatePanel)new v(this,this.template),t.push(this.template);else for(var n=0;n<this.panelCount;n++)t.push(this.createNewPanel());(e=this.panels).splice.apply(e,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([0,this.panels.length],t,!1)),this.setValueAfterPanelsCreating(),this.setPanelsState(),this.reRunCondition(),this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback)}},Object.defineProperty(t.prototype,"defaultPanelValue",{get:function(){return this.getPropertyValue("defaultPanelValue")},set:function(e){this.setPropertyValue("defaultPanelValue",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultValueFromLastPanel",{get:function(){return this.getPropertyValue("defaultValueFromLastPanel",!1)},set:function(e){this.setPropertyValue("defaultValueFromLastPanel",e)},enumerable:!1,configurable:!0}),t.prototype.isDefaultValueEmpty=function(){return e.prototype.isDefaultValueEmpty.call(this)&&this.isValueEmpty(this.defaultPanelValue)},t.prototype.setDefaultValue=function(){if(!this.isValueEmpty(this.defaultPanelValue)&&this.isValueEmpty(this.defaultValue)){if(this.isEmpty()&&0!=this.panelCount){for(var t=[],n=0;n<this.panelCount;n++)t.push(this.defaultPanelValue);this.value=t}}else e.prototype.setDefaultValue.call(this)},t.prototype.isEmpty=function(){var e=this.value;if(!e||!Array.isArray(e))return!0;for(var t=0;t<e.length;t++)if(!this.isRowEmpty(e[t]))return!1;return!0},t.prototype.getProgressInfo=function(){return o.SurveyElement.getProgressInfoByElements(this.panels,this.isRequired)},t.prototype.isRowEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},t.prototype.addPanelUI=function(){if(!this.canAddPanel)return null;if(!this.canLeaveCurrentPanel())return null;var e=this.addPanel();return"list"===this.renderMode&&"default"!==this.panelsState&&e.expand(),e},t.prototype.addPanel=function(){this.panelCount++,this.isRenderModeList||(this.currentIndex=this.panelCount-1);var e=this.value,t=!1;return this.isValueEmpty(this.defaultPanelValue)||e&&Array.isArray(e)&&e.length==this.panelCount&&(t=!0,this.copyValue(e[e.length-1],this.defaultPanelValue)),this.defaultValueFromLastPanel&&e&&Array.isArray(e)&&e.length>1&&e.length==this.panelCount&&(t=!0,this.copyValue(e[e.length-1],e[e.length-2])),t&&(this.value=e),this.survey&&this.survey.dynamicPanelAdded(this),this.panels[this.panelCount-1]},t.prototype.canLeaveCurrentPanel=function(){return!("list"!==this.renderMode&&this.currentPanel&&this.currentPanel.hasErrors())},t.prototype.copyValue=function(e,t){for(var n in t)e[n]=t[n]},t.prototype.removePanelUI=function(e){this.canRemovePanel&&(this.confirmDelete&&!Object(h.confirmAction)(this.confirmDeleteText)||this.removePanel(e))},t.prototype.goToNextPanel=function(){return!(this.currentIndex<0||!this.canLeaveCurrentPanel()||(this.currentIndex++,0))},t.prototype.goToPrevPanel=function(){this.currentIndex<0||this.currentIndex--},t.prototype.removePanel=function(e){var t=this.getPanelIndex(e);if(!(t<0||t>=this.panelCount)){var n=this.panels[t];this.survey&&!this.survey.dynamicPanelRemoving(this,t,n)||(this.panels.splice(t,1),this.updateBindings("panelCount",this.panelCount),!(e=this.value)||!Array.isArray(e)||t>=e.length||(this.isValueChangingInternally=!0,e.splice(t,1),this.value=e,this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback),this.survey&&this.survey.dynamicPanelRemoved(this,t,n),this.isValueChangingInternally=!1))}},t.prototype.getPanelIndex=function(e){if(i.Helpers.isNumber(e))return e;for(var t=this.items,n=0;n<this.panels.length;n++)if(this.panels[n]===e||t[n]===e)return n;return-1},t.prototype.locStrsChanged=function(){e.prototype.locStrsChanged.call(this);for(var t=this.panels,n=0;n<t.length;n++)t[n].locStrsChanged()},t.prototype.clearIncorrectValues=function(){for(var e=0;e<this.panels.length;e++)this.clearIncorrectValuesInPanel(e)},t.prototype.clearErrors=function(){e.prototype.clearErrors.call(this);for(var t=0;t<this.panels.length;t++)this.panels[t].clearErrors()},t.prototype.getQuestionFromArray=function(e,t){return t>=this.panelCount?null:this.panels[t].getQuestionByName(e)},t.prototype.clearIncorrectValuesInPanel=function(e){var t=this.panels[e];t.clearIncorrectValues();var n=this.value,r=n&&e<n.length?n[e]:null;if(r){var i=!1;for(var o in r)this.getSharedQuestionFromArray(o,e)||t.getQuestionByName(o)||this.iscorrectValueWithPostPrefix(t,o,d.settings.commentPrefix)||this.iscorrectValueWithPostPrefix(t,o,d.settings.matrixTotalValuePostFix)||(delete r[o],i=!0);i&&(n[e]=r,this.value=n)}},t.prototype.iscorrectValueWithPostPrefix=function(e,t,n){return t.indexOf(n)===t.length-n.length&&!!e.getQuestionByName(t.substring(0,t.indexOf(n)))},t.prototype.getSharedQuestionFromArray=function(e,t){return this.survey&&this.valueName?this.survey.getQuestionByValueNameFromArray(this.valueName,e,t):null},t.prototype.addConditionObjectsByContext=function(e,t){for(var n=!!t&&(!0===t||this.template.questions.indexOf(t)>-1),r=this.getValueName()+"[0].",i=this.processedTitle+"[0].",o=new Array,a=this.template.questions,s=0;s<a.length;s++)a[s].addConditionObjectsByContext(o,t);for(s=0;s<o.length;s++)e.push({name:r+o[s].name,text:i+o[s].text,question:o[s].question});if(n){var l=!0===t?this.getValueName()+".":"",u=!0===t?this.processedTitle+".":"";for(s=0;s<o.length;s++)if(o[s].question!=t){var c={name:l+"panel."+o[s].name,text:u+"panel."+o[s].text,question:o[s].question};!0===t&&(c.context=this),e.push(c)}}},t.prototype.getConditionJson=function(t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),!n)return e.prototype.getConditionJson.call(this,t,n);var r=n,i=n.indexOf(".");i>-1&&(r=n.substring(0,i),n=n.substring(i+1));var o=this.template.getQuestionByName(r);return o?o.getConditionJson(t,n):null},t.prototype.onReadOnlyChanged=function(){var t=this.isReadOnly;this.template.readOnly=t;for(var n=0;n<this.panels.length;n++)this.panels[n].readOnly=t;e.prototype.onReadOnlyChanged.call(this)},t.prototype.onSurveyLoad=function(){if(this.template.readOnly=this.isReadOnly,this.template.onSurveyLoad(),this.loadingPanelCount>0&&(this.panelCount=this.loadingPanelCount),this.useTemplatePanel&&this.rebuildPanels(),this.setPanelsSurveyImpl(),this.setPanelsState(),this.assignOnPropertyChangedToTemplate(),this.survey)for(var t=0;t<this.panelCount;t++)this.survey.dynamicPanelAdded(this);e.prototype.onSurveyLoad.call(this)},t.prototype.onFirstRendering=function(){this.template.onFirstRendering();for(var t=0;t<this.panels.length;t++)this.panels[t].onFirstRendering();e.prototype.onFirstRendering.call(this)},t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this);for(var t=0;t<this.panels.length;t++)this.panels[t].localeChanged()},t.prototype.runCondition=function(t,n){e.prototype.runCondition.call(this,t,n),this.runPanelsCondition(t,n)},t.prototype.reRunCondition=function(){this.data&&this.runCondition(this.getDataFilteredValues(),this.getDataFilteredProperties())},t.prototype.runPanelsCondition=function(e,t){var n={};e&&e instanceof Object&&(n=JSON.parse(JSON.stringify(e))),this.parentQuestion&&this.parent&&(n[v.ParentItemVariableName]=this.parent.getValue());for(var r=0;r<this.panels.length;r++){var o=this.getPanelItemData(this.panels[r].data),a=i.Helpers.createCopy(n);a[v.ItemVariableName.toLowerCase()]=o,a[v.IndexVariableName.toLowerCase()]=r,this.panels[r].runCondition(a,t)}},t.prototype.onAnyValueChanged=function(t){e.prototype.onAnyValueChanged.call(this,t);for(var n=0;n<this.panels.length;n++)this.panels[n].onAnyValueChanged(t),this.panels[n].onAnyValueChanged(v.ItemVariableName)},t.prototype.hasKeysDuplicated=function(e,t){void 0===t&&(t=null);for(var n,r=[],i=0;i<this.panels.length;i++)n=this.isValueDuplicated(this.panels[i],r,t,e)||n;return n},t.prototype.updatePanelsContainsErrors=function(){for(var e=this.changingValueQuestion.parent;e;)e.updateContainsErrors(),e=e.parent;this.updateContainsErrors()},t.prototype.hasErrors=function(t,n){if(void 0===t&&(t=!0),void 0===n&&(n=null),this.isValueChangingInternally)return!1;var r=!1;if(this.changingValueQuestion)return r=this.changingValueQuestion.hasErrors(t,n),r=this.hasKeysDuplicated(t,n)||r,this.updatePanelsContainsErrors(),r;var i=this.hasErrorInPanels(t,n);return e.prototype.hasErrors.call(this,t)||i},t.prototype.getContainsErrors=function(){var t=e.prototype.getContainsErrors.call(this);if(t)return t;for(var n=this.panels,r=0;r<n.length;r++)if(n[r].containsErrors)return!0;return!1},t.prototype.getIsAnswered=function(){if(!e.prototype.getIsAnswered.call(this))return!1;for(var t=this.panels,n=0;n<t.length;n++){var r=[];t[n].addQuestionsToList(r,!0);for(var i=0;i<r.length;i++)if(!r[i].isAnswered)return!1}return!0},t.prototype.clearValueIfInvisibleCore=function(){for(var t=0;t<this.panels.length;t++)for(var n=this.panels[t].questions,r=0;r<n.length;r++)n[r].clearValueIfInvisible();e.prototype.clearValueIfInvisibleCore.call(this)},t.prototype.getIsRunningValidators=function(){if(e.prototype.getIsRunningValidators.call(this))return!0;for(var t=0;t<this.panels.length;t++)for(var n=this.panels[t].questions,r=0;r<n.length;r++)if(n[r].isRunningValidators)return!0;return!1},t.prototype.getAllErrors=function(){for(var t=e.prototype.getAllErrors.call(this),n=0;n<this.panels.length;n++)for(var r=this.panels[n].questions,i=0;i<r.length;i++){var o=r[i].getAllErrors();o&&o.length>0&&(t=t.concat(o))}return t},t.prototype.getDisplayValueCore=function(e,t){var n=this.getUnbindValue(t);if(!n||!Array.isArray(n))return n;for(var r=0;r<this.panels.length&&r<n.length;r++){var i=n[r];i&&(n[r]=this.getPanelDisplayValue(r,i,e))}return n},t.prototype.getPanelDisplayValue=function(e,t,n){if(!t)return t;for(var r=this.panels[e],i=Object.keys(t),o=0;o<i.length;o++){var a=i[o],s=r.getQuestionByValueName(a);if(s||(s=this.getSharedQuestionFromArray(a,e)),s){var l=s.getDisplayValue(n,t[a]);t[a]=l,n&&s.title&&s.title!==a&&(t[s.title]=l,delete t[a])}}return t},t.prototype.hasErrorInPanels=function(e,t){for(var n=!1,r=this.panels,i=[],o=0;o<r.length;o++)this.setOnCompleteAsyncInPanel(r[o]);for(o=0;o<r.length;o++){var a=r[o].hasErrors(e,!!t&&t.focuseOnFirstError,t);a=this.isValueDuplicated(r[o],i,t,e)||a,this.isRenderModeList||!a||n||(this.currentIndex=o),n=a||n}return n},t.prototype.setOnCompleteAsyncInPanel=function(e){for(var t=this,n=e.questions,r=0;r<n.length;r++)n[r].onCompletedAsyncValidators=function(e){t.raiseOnCompletedAsyncValidators()}},t.prototype.isValueDuplicated=function(e,t,n,r){if(!this.keyName)return!1;var i=e.getQuestionByValueName(this.keyName);if(!i||i.isEmpty())return!1;var o=i.value;this.changingValueQuestion&&i!=this.changingValueQuestion&&i.hasErrors(r,n);for(var a=0;a<t.length;a++)if(o==t[a])return r&&i.addError(new c.KeyDuplicationError(this.keyDuplicationError,this)),n&&!n.firstErrorQuestion&&(n.firstErrorQuestion=i),!0;return t.push(o),!1},t.prototype.createNewPanel=function(){var e=this.createAndSetupNewPanelObject(),t=this.template.toJSON();(new l.JsonObject).toObject(t,e),e.renderWidth="100%",e.updateCustomWidgets(),new v(this,e),e.onFirstRendering();for(var n=e.questions,r=0;r<n.length;r++)n[r].setParentQuestion(this);return e.locStrsChanged(),e},t.prototype.createAndSetupNewPanelObject=function(){var e=this.createNewPanelObject();e.isInteractiveDesignElement=!1;var t=this;return e.onGetQuestionTitleLocation=function(){return t.getTemplateQuestionTitleLocation()},e},t.prototype.getTemplateQuestionTitleLocation=function(){return"default"!=this.templateTitleLocation?this.templateTitleLocation:this.getTitleLocationCore()},t.prototype.createNewPanelObject=function(){return l.Serializer.createClass("panel")},t.prototype.setPanelCountBasedOnValue=function(){if(!this.isValueChangingInternally&&!this.useTemplatePanel){var e=this.value,t=e&&Array.isArray(e)?e.length:0;0==t&&this.loadingPanelCount>0&&(t=this.loadingPanelCount),this.panelCount=t}},t.prototype.setQuestionValue=function(t){e.prototype.setQuestionValue.call(this,t,!1),this.setPanelCountBasedOnValue();for(var n=0;n<this.panels.length;n++)this.panelUpdateValueFromSurvey(this.panels[n]);this.updateIsAnswered()},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t);for(var n=0;n<this.panels.length;n++)this.panelSurveyValueChanged(this.panels[n]);void 0===t&&this.setValueBasedOnPanelCount()},t.prototype.panelUpdateValueFromSurvey=function(e){for(var t=e.questions,n=this.getPanelItemData(e.data),r=0;r<t.length;r++){var i=t[r];i.updateValueFromSurvey(n[i.getValueName()]),i.updateCommentFromSurvey(n[i.getValueName()+d.settings.commentPrefix])}},t.prototype.panelSurveyValueChanged=function(e){for(var t=e.questions,n=this.getPanelItemData(e.data),r=0;r<t.length;r++){var i=t[r];i.onSurveyValueChanged(n[i.getValueName()])}},t.prototype.onSetData=function(){e.prototype.onSetData.call(this),this.useTemplatePanel&&(this.setTemplatePanelSurveyImpl(),this.rebuildPanels())},t.prototype.getItemIndex=function(e){var t=this.items.indexOf(e);return t>-1?t:this.items.length},t.prototype.getPanelItemData=function(e){var t=this.items,n=t.indexOf(e),r=this.value;return n<0&&Array.isArray(r)&&r.length>t.length&&(n=t.length),n<0||!r||!Array.isArray(r)||r.length<=n?{}:r[n]},t.prototype.setPanelItemData=function(e,t,n){if(!(this.isSetPanelItemData&&this.isSetPanelItemData.indexOf(t)>-1)){this.isSetPanelItemData||(this.isSetPanelItemData=[]),this.isSetPanelItemData.push(t);var r=this.items;(i=r.indexOf(e))<0&&(i=r.length);var i,o=this.getUnbindValue(this.value);if(o&&Array.isArray(o)||(o=[]),o.length<=i)for(var a=o.length;a<=i;a++)o.push({});o[i]||(o[i]={}),this.isValueEmpty(n)?delete o[i][t]:o[i][t]=n,i>=0&&i<this.panels.length&&(this.changingValueQuestion=this.panels[i].getQuestionByValueName(t)),this.value=o,this.changingValueQuestion=null,this.survey&&this.survey.dynamicPanelItemValueChanged(this,{question:this,panel:e.panel,name:t,itemIndex:i,itemValue:o[i],value:n}),(i=this.isSetPanelItemData.indexOf(t))>-1&&this.isSetPanelItemData.splice(i,1)}},t.prototype.getRootData=function(){return this.data},t.prototype.getPlainData=function(t){void 0===t&&(t={includeEmpty:!0});var n=e.prototype.getPlainData.call(this,t);return n&&(n.isNode=!0,n.data=this.panels.map(function(e,n){var r={name:e.name||n,title:e.title||"Panel",value:e.getValue(),displayValue:e.getValue(),getString:function(e){return"object"==typeof e?JSON.stringify(e):e},isNode:!0,data:e.questions.map(function(e){return e.getPlainData(t)}).filter(function(e){return!!e})};return(t.calculations||[]).forEach(function(t){r[t.propertyName]=e[t.propertyName]}),r})),n},t.prototype.updateElementCss=function(t){e.prototype.updateElementCss.call(this,t);for(var n=0;n<this.panels.length;n++)this.panels[n].updateElementCss(t)},Object.defineProperty(t.prototype,"progressText",{get:function(){return this.getLocalizationFormatString("panelDynamicProgressText",this.currentIndex+1,this.panelCount)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return(this.currentIndex+1)/this.panelCount*100+"%"},enumerable:!1,configurable:!0}),t.prototype.getRootCss=function(){return(new p.CssClassBuilder).append(e.prototype.getRootCss.call(this)).append(this.cssClasses.empty,this.getShowNoEntriesPlaceholder()).toString()},t.prototype.getPanelWrapperCss=function(){return(new p.CssClassBuilder).append(this.cssClasses.panelWrapper).append(this.cssClasses.panelWrapperInRow,"right"===this.panelRemoveButtonLocation).toString()},t.prototype.getPanelRemoveButtonCss=function(){return(new p.CssClassBuilder).append(this.cssClasses.button).append(this.cssClasses.buttonRemove).append(this.cssClasses.buttonRemoveRight,"right"===this.panelRemoveButtonLocation).toString()},t.prototype.getAddButtonCss=function(){return(new p.CssClassBuilder).append(this.cssClasses.button).append(this.cssClasses.buttonAdd).append(this.cssClasses.buttonAdd+"--list-mode","list"===this.renderMode).toString()},t.prototype.getPrevButtonCss=function(){return(new p.CssClassBuilder).append(this.cssClasses.buttonPrev).append(this.cssClasses.buttonPrevDisabled,!this.isPrevButtonShowing).toString()},t.prototype.getNextButtonCss=function(){return(new p.CssClassBuilder).append(this.cssClasses.buttonNext).append(this.cssClasses.buttonNextDisabled,!this.isNextButtonShowing).toString()},Object.defineProperty(t.prototype,"noEntriesText",{get:function(){return this.getLocalizableStringText("noEntriesText")},set:function(e){this.setLocalizableStringText("noEntriesText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locNoEntriesText",{get:function(){return this.getLocalizableString("noEntriesText")},enumerable:!1,configurable:!0}),t.prototype.getShowNoEntriesPlaceholder=function(){return!!this.cssClasses.noEntriesPlaceholder&&!this.isDesignMode&&0===this.panelCount},t.prototype.needResponsiveWidth=function(){var e=this.getPanel();return!(!e||!e.needResponsiveWidth())},Object.defineProperty(t.prototype,"footerToolbar",{get:function(){return this.footerToolbarValue||this.initFooterToolbar(),this.footerToolbarValue},enumerable:!1,configurable:!0}),t.prototype.updateFooterActions=function(){this.updateFooterActionsCallback&&this.updateFooterActionsCallback()},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbarValue=this.createActionContainer();var t=[],n=new f.Action({id:"sv-pd-prev-btn",title:this.panelPrevText,action:function(){e.goToPrevPanel()}}),r=new f.Action({id:"sv-pd-next-btn",title:this.panelNextText,action:function(){e.goToNextPanel()}}),i=new f.Action({id:"sv-pd-add-btn",component:"sv-paneldynamic-add-btn",data:{question:this}}),o=new f.Action({id:"sv-prev-btn-icon",component:"sv-paneldynamic-prev-btn",data:{question:this}}),a=new f.Action({id:"sv-pd-progress-text",component:"sv-paneldynamic-progress-text",data:{question:this}}),s=new f.Action({id:"sv-pd-next-btn-icon",component:"sv-paneldynamic-next-btn",data:{question:this}});t.push(n,r,i,o,a,s),this.updateFooterActionsCallback=function(){var t=e.legacyNavigation,l=e.isRenderModeList,u=e.isMobile,c=!t&&!l;n.visible=c&&e.currentIndex>0,r.visible=c&&e.currentIndex<e.panelCount-1,r.needSpace=u&&r.visible&&n.visible,i.needSpace=e.isMobile&&!r.visible&&n.visible,a.visible=!e.isRenderModeList&&!u,a.needSpace=!t&&!e.isMobile;var d=t&&!l;o.visible=d,s.visible=d,o.needSpace=d},this.updateFooterActionsCallback(),this.footerToolbarValue.setItems(t)},Object.defineProperty(t.prototype,"showLegacyNavigation",{get:function(){return!this.isDefaultV2Theme},enumerable:!1,configurable:!0}),function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Object(l.property)({defaultValue:!1,onSet:function(e,t){t.updateFooterActions()}})],t.prototype,"legacyNavigation",void 0),t}(s.Question);l.Serializer.addClass("paneldynamic",[{name:"templateElements",alternativeName:"questions",visible:!1,isLightSerializable:!1},{name:"templateTitle:text",serializationProperty:"locTemplateTitle"},{name:"templateDescription:text",serializationProperty:"locTemplateDescription"},{name:"minWidth",default:"auto"},{name:"noEntriesText:text",serializationProperty:"locNoEntriesText"},{name:"allowAddPanel:boolean",default:!0},{name:"allowRemovePanel:boolean",default:!0},{name:"panelCount:number",isBindable:!0,default:0,choices:[0,1,2,3,4,5,6,7,8,9,10]},{name:"minPanelCount:number",default:0,minValue:0},{name:"maxPanelCount:number",default:d.settings.panelMaximumPanelCount},"defaultPanelValue:panelvalue","defaultValueFromLastPanel:boolean",{name:"panelsState",default:"default",choices:["default","collapsed","expanded","firstExpanded"]},{name:"keyName"},{name:"keyDuplicationError",serializationProperty:"locKeyDuplicationError"},{name:"confirmDelete:boolean"},{name:"confirmDeleteText",serializationProperty:"locConfirmDeleteText"},{name:"panelAddText",serializationProperty:"locPanelAddText"},{name:"panelRemoveText",serializationProperty:"locPanelRemoveText"},{name:"panelPrevText",serializationProperty:"locPanelPrevText"},{name:"panelNextText",serializationProperty:"locPanelNextText"},{name:"showQuestionNumbers",default:"off",choices:["off","onPanel","onSurvey"]},{name:"showRangeInProgress:boolean",default:!0},{name:"renderMode",default:"list",choices:["list","progressTop","progressBottom","progressTopBottom"]},{name:"templateTitleLocation",default:"default",choices:["default","top","bottom","left"]},{name:"panelRemoveButtonLocation",default:"bottom",choices:["bottom","right"]}],function(){return new b("")},"question"),u.QuestionFactory.Instance.registerQuestion("paneldynamic",function(e){return new b(e)})},"./src/question_radiogroup.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionRadiogroupModel",function(){return d});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question_baseselect.ts"),s=n("./src/itemvalue.ts"),l=n("./src/actions/action.ts"),u=n("./src/base.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.getType=function(){return"radiogroup"},Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"radiogroup"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaLabel",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.getFirstInputElementId=function(){return this.inputId+"_0"},Object.defineProperty(t.prototype,"selectedItem",{get:function(){return this.isEmpty()?null:s.ItemValue.getItemByValue(this.visibleChoices,this.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showClearButton",{get:function(){return this.getPropertyValue("showClearButton")},set:function(e){this.setPropertyValue("showClearButton",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canShowClearButton",{get:function(){return this.showClearButton&&!this.isReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearButtonCaption",{get:function(){return this.getLocalizationString("clearCaption")},enumerable:!1,configurable:!0}),t.prototype.supportGoNextPageAutomatic=function(){return!0},Object.defineProperty(t.prototype,"showClearButtonInContent",{get:function(){return!this.isDefaultV2Theme&&this.canShowClearButton},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleActions=function(){var e=this,t=[];if(this.isDefaultV2Theme&&!this.isDesignMode){var n=new l.Action({title:this.clearButtonCaption,id:"sv-clr-btn-".concat(this.id),action:function(){e.clearValue()},innerCss:this.cssClasses.clearButton,visible:new u.ComputedUpdater(function(){return e.canShowClearButton})});t.push(n)}return t},t}(a.QuestionCheckboxBase);i.Serializer.addClass("radiogroup",[{name:"showClearButton:boolean",default:!1},{name:"separateSpecialChoices",visible:!0}],function(){return new d("")},"checkboxbase"),o.QuestionFactory.Instance.registerQuestion("radiogroup",function(e){var t=new d(e);return t.choices=o.QuestionFactory.DefaultChoices,t})},"./src/question_ranking.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionRankingModel",function(){return f});var r,i=n("./src/dragdrop/ranking-choices.ts"),o=n("./src/itemvalue.ts"),a=n("./src/jsonobject.ts"),s=n("./src/questionfactory.ts"),l=n("./src/question_checkbox.ts"),u=n("./src/utils/cssClassBuilder.ts"),c=n("./src/utils/devices.ts"),d=n("./src/helpers.ts"),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},f=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=null,n.onVisibleChoicesChanged=function(){if(e.prototype.onVisibleChoicesChanged.call(n),1===n.visibleChoices.length)return n.value=[],void n.updateRankingChoices();n.isEmpty()||(n.visibleChoices.length>n.value.length&&n.addToValueByVisibleChoices(),n.visibleChoices.length<n.value.length&&n.removeFromValueByVisibleChoices()),n.updateRankingChoices()},n.localeChanged=function(){e.prototype.localeChanged.call(n),n.updateRankingChoices()},n.handlePointerDown=function(e,t,r){n.allowStartDrag&&n.dragDropRankingChoices.startDrag(e,t,n,r)},n.handleKeydown=function(e,t){var r=e.key,i=n.rankingChoices.indexOf(t);"ArrowUp"===r&&i&&n.handleArrowUp(i,t),"ArrowDown"===r&&i!==n.rankingChoices.length-1&&n.handleArrowDown(i,t)},n.handleArrowUp=function(e,t){var r=n.rankingChoices;r.splice(e,1),r.splice(e-1,0,t),n.setValue(),setTimeout(function(){n.focusItem(e-1)},1)},n.handleArrowDown=function(e,t){var r=n.rankingChoices;r.splice(e,1),r.splice(e+1,0,t),n.setValue(),setTimeout(function(){n.focusItem(e+1)},1)},n.focusItem=function(e){n.domNode.querySelectorAll("."+n.cssClasses.item)[e].focus()},n.setValue=function(){var e=[];n.rankingChoices.forEach(function(t){e.push(t.value)}),n.value=e},n.setValueFromUI=function(){var e=[];n.domNode.querySelectorAll("."+n.cssClasses.controlLabel).forEach(function(t,r){var i=t.innerText;n.visibleChoices.forEach(function(t){i===t.text&&e.push(t.value)})}),n.value=e},n.syncNumbers=function(){n.domNode&&n.domNode.querySelectorAll("."+n.cssClasses.item+":not(."+n.cssClasses.itemDragMod+") ."+n.cssClasses.itemIndex).forEach(function(e,t){e.innerText=n.getNumberByIndex(t)})},n.setGhostText=function(e){var t=n.domNode.querySelectorAll("."+n.cssClasses.itemIndex);t[t.length-1].innerText=e},n.createNewArray("rankingChoices"),n}return h(t,e),t.prototype.getType=function(){return"ranking"},Object.defineProperty(t.prototype,"rootClass",{get:function(){return(new u.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.rootMobileMod,c.IsMobile).append(this.cssClasses.rootDisabled,this.isReadOnly).append(this.cssClasses.rootDesignMode,!!this.isDesignMode).append(this.cssClasses.itemOnError,this.errors.length>0).toString()},enumerable:!1,configurable:!0}),t.prototype.getItemClassCore=function(t,n){var r=this.rankingChoices.indexOf(t),i=this.rankingChoices.indexOf(this.currentDropTarget);return(new u.CssClassBuilder).append(e.prototype.getItemClassCore.call(this,t,n)).append(this.cssClasses.itemGhostMod,this.currentDropTarget===t).append("sv-dragdrop-movedown",r===i+1&&"down"===this.dropTargetNodeMove).append("sv-dragdrop-moveup",r===i-1&&"up"===this.dropTargetNodeMove).toString()},t.prototype.isItemCurrentDropTarget=function(e){return this.dragDropRankingChoices.dropTarget===e},Object.defineProperty(t.prototype,"ghostPositionCssClass",{get:function(){return"top"===this.ghostPosition?this.cssClasses.dragDropGhostPositionTop:"bottom"===this.ghostPosition?this.cssClasses.dragDropGhostPositionBottom:""},enumerable:!1,configurable:!0}),t.prototype.getNumberByIndex=function(e){return this.isEmpty()?"\u2013":e+1+""},t.prototype.setSurveyImpl=function(t,n){e.prototype.setSurveyImpl.call(this,t,n),this.updateRankingChoices()},t.prototype.isAnswerCorrect=function(){return d.Helpers.isArraysEqual(this.value,this.correctAnswer,!1)},t.prototype.onSurveyValueChanged=function(t){e.prototype.onSurveyValueChanged.call(this,t),this.isLoadingFromJson||this.updateRankingChoices()},t.prototype.addToValueByVisibleChoices=function(){var e=this.value.slice();this.visibleChoices.forEach(function(t){-1===e.indexOf(t.value)&&e.push(t.value)}),this.value=e},t.prototype.removeFromValueByVisibleChoices=function(){var e=this,t=this.value.slice();this.value.forEach(function(n,r){var i=!0;e.visibleChoices.forEach(function(e){e.value===n&&(i=!1)}),i&&t.splice(r,1)}),this.value=t},Object.defineProperty(t.prototype,"rankingChoices",{get:function(){return this.getPropertyValue("rankingChoices",[])},enumerable:!1,configurable:!0}),t.prototype.updateRankingChoices=function(e){var t=this;void 0===e&&(e=!1);var n=[];1!==this.visibleChoices.length?(e&&this.setPropertyValue("rankingChoices",[]),this.isEmpty()?this.setPropertyValue("rankingChoices",this.visibleChoices):(this.value.forEach(function(e){t.visibleChoices.forEach(function(t){t.value===e&&n.push(t)})}),this.setPropertyValue("rankingChoices",n))):this.setPropertyValue("rankingChoices",n)},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.dragDropRankingChoices=new i.DragDropRankingChoices(this.survey,null,this.longTap)},Object.defineProperty(t.prototype,"allowStartDrag",{get:function(){return!this.isReadOnly&&!this.isDesignMode},enumerable:!1,configurable:!0}),t.prototype.afterRenderQuestionElement=function(t){this.domNode=t,e.prototype.afterRenderQuestionElement.call(this,t)},t.prototype.beforeDestroyQuestionElement=function(t){e.prototype.beforeDestroyQuestionElement.call(this,t)},t.prototype.supportSelectAll=function(){return!1},t.prototype.supportOther=function(){return!1},t.prototype.supportNone=function(){return!1},t.prototype.getChoicesFromQuestion=function(t){var n=e.prototype.getChoicesFromQuestion.call(this,t);return"selected"===this.choicesFromQuestionMode&&t.isOtherSelected&&t.comment&&n.push(new o.ItemValue(t.otherItem.value,t.comment)),n},t.prototype.getIconHoverCss=function(){return(new u.CssClassBuilder).append(this.cssClasses.itemIcon).append(this.cssClasses.itemIconHoverMod).toString()},t.prototype.getIconFocusCss=function(){return(new u.CssClassBuilder).append(this.cssClasses.itemIcon).append(this.cssClasses.itemIconFocusMod).toString()},Object.defineProperty(t.prototype,"longTap",{get:function(){return this.getPropertyValue("longTap")},set:function(e){this.setPropertyValue("longTap",e)},enumerable:!1,configurable:!0}),p([Object(a.property)({defaultValue:null})],t.prototype,"currentDropTarget",void 0),p([Object(a.property)({defaultValue:null})],t.prototype,"dropTargetNodeMove",void 0),t}(l.QuestionCheckboxModel);a.Serializer.addClass("ranking",[{name:"hasOther",visible:!1,isSerializable:!1},{name:"otherText",visible:!1,isSerializable:!1},{name:"otherErrorText",visible:!1,isSerializable:!1},{name:"storeOthersAsComment",visible:!1,isSerializable:!1},{name:"hasNone",visible:!1,isSerializable:!1},{name:"noneText",visible:!1,isSerializable:!1},{name:"hasSelectAll",visible:!1,isSerializable:!1},{name:"selectAllText",visible:!1,isSerializable:!1},{name:"colCount:number",visible:!1,isSerializable:!1},{name:"maxSelectedChoices",visible:!1,isSerializable:!1},{name:"longTap",default:!0,visible:!1,isSerializable:!1}],function(){return new f("")},"checkbox"),s.QuestionFactory.Instance.registerQuestion("ranking",function(e){var t=new f(e);return t.choices=s.QuestionFactory.DefaultChoices,t})},"./src/question_rating.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"RenderedRatingItem",function(){return f}),n.d(t,"QuestionRatingModel",function(){return m});var r,i=n("./src/itemvalue.ts"),o=n("./src/question.ts"),a=n("./src/jsonobject.ts"),s=n("./src/questionfactory.ts"),l=n("./src/settings.ts"),u=n("./src/surveyStrings.ts"),c=n("./src/utils/cssClassBuilder.ts"),d=n("./src/base.ts"),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},f=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this)||this;return r.itemValue=t,r.locString=n,r}return h(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.itemValue.getPropertyValue("value")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locText",{get:function(){return this.locString||this.itemValue.locText},enumerable:!1,configurable:!0}),t}(d.Base),m=function(e){function t(t){var n=e.call(this,t)||this;n.createItemValues("rateValues");var r=n;return n.registerFunctionOnPropertyValueChanged("rateValues",function(){r.fireCallback(r.rateValuesChangedCallback)}),n.createLocalizableString("ratingOptionsCaption",n,!1,!0),n.onPropertyChanged.add(function(e,t){"rateMin"!=t.name&&"rateMax"!=t.name&&"minRateDescription"!=t.name&&"maxRateDescription"!=t.name&&"rateStep"!=t.name&&"displayRateDescriptionsAsExtremeItems"!=t.name&&"value"!=t.name||r.fireCallback(r.rateValuesChangedCallback)}),n.createLocalizableString("minRateDescription",n,!0),n.createLocalizableString("maxRateDescription",n,!0),n}return h(t,e),t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.hasMinRateDescription=!!this.minRateDescription,this.hasMaxRateDescription=!!this.maxRateDescription},t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.fireCallback(this.rateValuesChangedCallback)},Object.defineProperty(t.prototype,"rateValues",{get:function(){return this.getPropertyValue("rateValues")},set:function(e){this.setPropertyValue("rateValues",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rateMin",{get:function(){return this.getPropertyValue("rateMin")},set:function(e){this.setPropertyValue("rateMin",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rateMax",{get:function(){return this.getPropertyValue("rateMax")},set:function(e){this.setPropertyValue("rateMax",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rateStep",{get:function(){return this.getPropertyValue("rateStep")},set:function(e){this.setPropertyValue("rateStep",e)},enumerable:!1,configurable:!0}),t.prototype.getDisplayValueCore=function(e,t){return i.ItemValue.getTextOrHtmlByValue(this.visibleRateValues,t)||t},Object.defineProperty(t.prototype,"visibleRateValues",{get:function(){if(this.rateValues.length>0)return this.rateValues;for(var e=[],t=this.rateMin,n=this.rateStep;t<=this.rateMax&&e.length<l.settings.ratingMaximumRateValueCount;){var r=new i.ItemValue(t);r.locOwner=this,r.ownerPropertyName="rateValues",e.push(r),t=this.correctValue(t+n,n)}return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedRateItems",{get:function(){var e=this;return this.visibleRateValues.map(function(t,n){if(e.displayRateDescriptionsAsExtremeItems){if(0==n)return new f(t,e.minRateDescription&&e.locMinRateDescription||t.locText);if(n==e.visibleRateValues.length-1)return new f(t,e.maxRateDescription&&e.locMaxRateDescription||t.locText)}return new f(t)})},enumerable:!1,configurable:!0}),t.prototype.correctValue=function(e,t){if(!e)return e;if(Math.round(e)==e)return e;for(var n=0;Math.round(t)!=t;)t*=10,n++;return parseFloat(e.toFixed(n))},t.prototype.getType=function(){return"rating"},t.prototype.getFirstInputElementId=function(){return this.inputId+"_0"},t.prototype.getInputId=function(e){return this.inputId+"_"+e},t.prototype.supportGoNextPageAutomatic=function(){return!0},t.prototype.supportComment=function(){return!0},t.prototype.supportOther=function(){return!1},Object.defineProperty(t.prototype,"minRateDescription",{get:function(){return this.getLocalizableStringText("minRateDescription")},set:function(e){this.setLocalizableStringText("minRateDescription",e),this.hasMinRateDescription=!!this.minRateDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locMinRateDescription",{get:function(){return this.getLocalizableString("minRateDescription")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxRateDescription",{get:function(){return this.getLocalizableStringText("maxRateDescription")},set:function(e){this.setLocalizableStringText("maxRateDescription",e),this.hasMaxRateDescription=!!this.maxRateDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locMaxRateDescription",{get:function(){return this.getLocalizableString("maxRateDescription")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasMinLabel",{get:function(){return!this.displayRateDescriptionsAsExtremeItems&&!!this.hasMinRateDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasMaxLabel",{get:function(){return!this.displayRateDescriptionsAsExtremeItems&&!!this.hasMaxRateDescription},enumerable:!1,configurable:!0}),t.prototype.valueToData=function(e){if(this.rateValues.length>0){var t=i.ItemValue.getItemByValue(this.rateValues,e);return t?t.value:e}return isNaN(e)?e:parseFloat(e)},t.prototype.setValueFromClick=function(e){this.value===parseFloat(e)?this.clearValue():this.value=e},Object.defineProperty(t.prototype,"ratingRootCss",{get:function(){return("never"==this.useDropdown||this.survey&&this.survey.isDesignMode)&&this.cssClasses.rootWrappable?this.cssClasses.rootWrappable:this.cssClasses.root},enumerable:!1,configurable:!0}),t.prototype.getItemClass=function(e){var t=!(this.isReadOnly||!e.isEnabled||this.value==e.value||this.survey&&this.survey.isDesignMode);return(new c.CssClassBuilder).append(this.cssClasses.item).append(this.cssClasses.selected,this.value==e.value).append(this.cssClasses.itemDisabled,this.isReadOnly).append(this.cssClasses.itemHover,t).append(this.cssClasses.itemOnError,this.errors.length>0).toString()},t.prototype.getControlClass=function(){return this.isEmpty(),(new c.CssClassBuilder).append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.errors.length>0).append(this.cssClasses.controlDisabled,this.isReadOnly).toString()},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.getLocalizableStringText("ratingOptionsCaption")},set:function(e){this.setLocalizableStringText("ratingOptionsCaption",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceholder",{get:function(){return this.getLocalizableString("ratingOptionsCaption")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowClear",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedValue",{get:function(){return this.value},set:function(e){this.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleChoices",{get:function(){return this.visibleRateValues},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnlyText",{get:function(){return this.displayValue||this.placeholder},enumerable:!1,configurable:!0}),t.prototype.needResponsiveWidth=function(){var e=this.getPropertyValue("rateValues"),t=this.getPropertyValue("rateStep"),n=this.getPropertyValue("rateMax"),r=this.getPropertyValue("rateMin");return"always"!=this.useDropdown&&!!(this.hasMinRateDescription||this.hasMaxRateDescription||e.length>0||t&&(n-r)/t>9)},t.prototype.supportResponsiveness=function(){return!0},t.prototype.getCompactRenderAs=function(){return"never"==this.useDropdown?"default":"dropdown"},t.prototype.getDesktopRenderAs=function(){return"always"==this.useDropdown?"dropdown":"default"},p([Object(a.property)({defaultValue:!1})],t.prototype,"hasMinRateDescription",void 0),p([Object(a.property)({defaultValue:!1})],t.prototype,"hasMaxRateDescription",void 0),p([Object(a.property)({defaultValue:!1})],t.prototype,"displayRateDescriptionsAsExtremeItems",void 0),p([Object(a.property)({defaultValue:"auto",onSet:function(e,t){}})],t.prototype,"useDropdown",void 0),t}(o.Question);a.Serializer.addClass("rating",[{name:"hasComment:switch",layout:"row"},{name:"commentText",dependsOn:"hasComment",visibleIf:function(e){return e.hasComment},serializationProperty:"locCommentText",layout:"row"},{name:"commentPlaceHolder",serializationProperty:"locCommentPlaceHolder",dependsOn:"hasComment",visibleIf:function(e){return e.hasComment}},{name:"rateValues:itemvalue[]",baseValue:function(){return u.surveyLocalization.getString("choices_Item")}},{name:"rateMin:number",default:1,onSettingValue:function(e,t){return t>e.rateMax-e.rateStep?e.rateMax-e.rateStep:t}},{name:"rateMax:number",default:5,onSettingValue:function(e,t){return t<e.rateMin+e.rateStep?e.rateMin+e.rateStep:t}},{name:"rateStep:number",default:1,minValue:.1,onSettingValue:function(e,t){return t<=0&&(t=1),t>e.rateMax-e.rateMin&&(t=e.rateMax-e.rateMin),t}},{name:"minRateDescription",alternativeName:"mininumRateDescription",serializationProperty:"locMinRateDescription"},{name:"maxRateDescription",alternativeName:"maximumRateDescription",serializationProperty:"locMaxRateDescription"},{name:"displayRateDescriptionsAsExtremeItems:boolean",default:!1},{name:"useDropdown",default:"auto",choices:["auto","never","always"]}],function(){return new m("")},"question"),s.QuestionFactory.Instance.registerQuestion("rating",function(e){return new m(e)})},"./src/question_signaturepad.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionSignaturePadModel",function(){return d});var r,i=n("./src/jsonobject.ts"),o=n("./src/questionfactory.ts"),a=n("./src/question.ts"),s=n("./node_modules/signature_pad/dist/signature_pad.mjs"),l=n("./src/utils/cssClassBuilder.ts"),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},d=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t.prototype.getCssRoot=function(t){return(new l.CssClassBuilder).append(e.prototype.getCssRoot.call(this,t)).append(t.small,"300"===this.signatureWidth.toString()).toString()},t.prototype.updateValue=function(){if(this.signaturePad){var e=this.signaturePad.toDataURL(this.dataFormat);this.value=e}},t.prototype.getType=function(){return"signaturepad"},t.prototype.afterRenderQuestionElement=function(t){t&&this.initSignaturePad(t),e.prototype.afterRenderQuestionElement.call(this,t)},t.prototype.beforeDestroyQuestionElement=function(e){e&&this.destroySignaturePad(e)},t.prototype.initSignaturePad=function(e){var t=this,n=e.getElementsByTagName("canvas")[0],r=new s.default(n,{backgroundColor:"#ffffff"});this.isInputReadOnly&&r.off(),this.readOnlyChangedCallback=function(){t.isInputReadOnly?r.off():r.on()},r.penColor=this.penColor,r.backgroundColor=this.backgroundColor,r.onBegin=function(){t.isDrawingValue=!0,n.focus()},r.onEnd=function(){t.isDrawingValue=!1,t.updateValue()};var i=function(){var e=t.value;n.width=t.signatureWidth||300,n.height=t.signatureHeight||200,function(e){var t=e.getContext("2d"),n=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),r=e.width,i=e.height;e.width=r*n,e.height=i*n,e.style.width=r+"px",e.style.height=i+"px",t.scale(n,n)}(n),e?r.fromDataURL(e):r.clear()};i(),this.readOnlyChangedCallback(),this.signaturePad=r;var o=function(e,t){"signatureWidth"!==t.name&&"signatureHeight"!==t.name&&"value"!==t.name||i()};this.onPropertyChanged.add(o),this.signaturePad.propertyChangedHandler=o},t.prototype.destroySignaturePad=function(e){this.signaturePad&&(this.onPropertyChanged.remove(this.signaturePad.propertyChangedHandler),this.signaturePad.off()),this.readOnlyChangedCallback=null,this.signaturePad=null},Object.defineProperty(t.prototype,"signatureWidth",{get:function(){return this.getPropertyValue("signatureWidth")},set:function(e){this.setPropertyValue("signatureWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"signatureHeight",{get:function(){return this.getPropertyValue("signatureHeight")},set:function(e){this.setPropertyValue("signatureHeight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.getPropertyValue("height")},set:function(e){this.setPropertyValue("height",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowClear",{get:function(){return this.getPropertyValue("allowClear")},set:function(e){this.setPropertyValue("allowClear",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canShowClearButton",{get:function(){return!this.isInputReadOnly&&this.allowClear},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"penColor",{get:function(){return this.getPropertyValue("penColor")},set:function(e){this.setPropertyValue("penColor",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundColor",{get:function(){return this.getPropertyValue("backgroundColor")},set:function(e){this.setPropertyValue("backgroundColor",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearButtonCaption",{get:function(){return this.getLocalizationString("clearCaption")},enumerable:!1,configurable:!0}),t.prototype.needShowPlaceholder=function(){return!this.isDrawingValue&&this.isEmpty()},Object.defineProperty(t.prototype,"placeHolderText",{get:function(){return this.getLocalizationString("signaturePlaceHolder")},enumerable:!1,configurable:!0}),t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),300===this.signatureWidth&&this.width&&"number"==typeof this.width&&this.width&&(console.warn("Use signatureWidth property to set width for the signature pad"),this.signatureWidth=this.width,this.width=void 0),200===this.signatureHeight&&this.height&&(console.warn("Use signatureHeight property to set width for the signature pad"),this.signatureHeight=this.height,this.height=void 0)},c([Object(i.property)({defaultValue:!1})],t.prototype,"isDrawingValue",void 0),c([Object(i.property)({defaultValue:""})],t.prototype,"dataFormat",void 0),t}(a.Question);i.Serializer.addClass("signaturepad",[{name:"signatureWidth:number",category:"general",default:300},{name:"signatureHeight:number",category:"general",default:200},{name:"height:number",category:"general",visible:!1},{name:"allowClear:boolean",category:"general",default:!0},{name:"penColor:color",category:"general",default:"#1ab394"},{name:"backgroundColor:color",category:"general",default:"#ffffff"},{name:"dataFormat",category:"general",default:"",choices:[{value:"",text:"PNG"},{value:"image/jpeg",text:"JPEG"},{value:"image/svg+xml",text:"SVG"}]},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1}],function(){return new d("")},"question"),o.QuestionFactory.Instance.registerQuestion("signaturepad",function(e){return new d(e)})},"./src/question_tagbox.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionTagboxModel",function(){return c});var r,i=n("./src/jsonobject.ts"),o=n("./src/utils/cssClassBuilder.ts"),a=n("./src/question_checkbox.ts"),s=n("./src/dropdownMultiSelectListModel.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},c=function(e){function t(t){var n=e.call(this,t)||this;return n.onOpened=n.addEvent(),n.createLocalizableString("placeholder",n,!1,!0),n}return l(t,e),Object.defineProperty(t.prototype,"readOnlyText",{get:function(){return this.displayValue||this.placeholder},enumerable:!1,configurable:!0}),t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.dropdownListModel||(this.dropdownListModel=new s.DropdownMultiSelectListModel(this))},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.getLocalizableStringText("placeholder")},set:function(e){this.setLocalizableStringText("placeholder",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceholder",{get:function(){return this.getLocalizableString("placeholder")},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"tagbox"},Object.defineProperty(t.prototype,"popupModel",{get:function(){var e;return null===(e=this.dropdownListModel)||void 0===e?void 0:e.popupModel},enumerable:!1,configurable:!0}),t.prototype.getControlClass=function(){return(new o.CssClassBuilder).append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.errors.length>0).append(this.cssClasses.controlDisabled,this.isReadOnly).toString()},t.prototype.onOpenedCallBack=function(){this.onOpened.fire(this,{question:this,choices:this.choices})},t.prototype.onVisibleChoicesChanged=function(){e.prototype.onVisibleChoicesChanged.call(this),this.popupModel&&this.dropdownListModel.updateItems()},t.prototype.getFirstInputElementId=function(){return this.inputId+(this.searchEnabled?"_0":"")},t.prototype.getInputId=function(){return this.inputId+"_0"},u([Object(i.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),u([Object(i.property)({defaultValue:!0,onSet:function(e,t){t.dropdownListModel&&t.dropdownListModel.setSearchEnabled(e)}})],t.prototype,"searchEnabled",void 0),u([Object(i.property)()],t.prototype,"itemComponent",void 0),u([Object(i.property)({defaultValue:!1,onSet:function(e,t){t.dropdownListModel&&t.dropdownListModel.setHideSelectedItems(e)}})],t.prototype,"hideSelectedItems",void 0),u([Object(i.property)({localizable:{defaultStr:"cleanCaption"}})],t.prototype,"cleanButtonCaption",void 0),t}(a.QuestionCheckboxModel);i.Serializer.addClass("tagbox",[{name:"placeholder",serializationProperty:"locPlaceholder"},{name:"allowClear:boolean",default:!0},{name:"searchEnabled:boolean",default:!0},{name:"hideSelectedItems:boolean",default:!1},{name:"closeOnSelect:boolean",default:!0,visible:!1},{name:"itemComponent",visible:!1}],function(){return new c("")},"checkbox")},"./src/question_text.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionTextModel",function(){return p});var r,i=n("./src/questionfactory.ts"),o=n("./src/jsonobject.ts"),a=n("./src/localizablestring.ts"),s=n("./src/helpers.ts"),l=n("./src/validator.ts"),u=n("./src/error.ts"),c=n("./src/settings.ts"),d=n("./src/question_textbase.ts"),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e){function t(t){var n=e.call(this,t)||this;return n.createLocalizableString("minErrorText",n,!0,"minError"),n.createLocalizableString("maxErrorText",n,!0,"maxError"),n.locDataListValue=new a.LocalizableStrings(n),n.locDataListValue.onValueChanged=function(e,t){n.propertyValueChanged("dataList",e,t)},n.registerFunctionOnPropertiesValueChanged(["min","max","inputType","minValueExpression","maxValueExpression"],function(){n.setRenderedMinMax()}),n.registerFunctionOnPropertiesValueChanged(["inputType","size"],function(){n.updateInputSize(),n.calcRenderedPlaceholder()}),n}return h(t,e),t.prototype.isTextValue=function(){return["text","number","password"].indexOf(this.inputType)>-1},t.prototype.getType=function(){return"text"},t.prototype.onSurveyLoad=function(){e.prototype.onSurveyLoad.call(this),this.setRenderedMinMax(),this.updateInputSize()},Object.defineProperty(t.prototype,"inputType",{get:function(){return this.getPropertyValue("inputType")},set:function(e){"datetime_local"==(e=e.toLowerCase())&&(e="datetime-local"),this.setPropertyValue("inputType",e.toLowerCase()),this.isLoadingFromJson||(this.min=void 0,this.max=void 0,this.step=void 0)},enumerable:!1,configurable:!0}),t.prototype.runCondition=function(t,n){e.prototype.runCondition.call(this,t,n),(this.minValueExpression||this.maxValueExpression)&&this.setRenderedMinMax(t,n)},t.prototype.getValidators=function(){var t=e.prototype.getValidators.call(this);return"email"!==this.inputType||this.validators.some(function(e){return"emailvalidator"===e.getType()})||t.push(new l.EmailValidator),t},t.prototype.isLayoutTypeSupported=function(e){return!0},Object.defineProperty(t.prototype,"size",{get:function(){return this.getPropertyValue("size")},set:function(e){this.setPropertyValue("size",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTextInput",{get:function(){return["text","search","tel","url","email","password"].indexOf(this.inputType)>-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputSize",{get:function(){return this.getPropertyValue("inputSize",0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedInputSize",{get:function(){return this.getPropertyValue("inputSize")||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputWidth",{get:function(){return this.getPropertyValue("inputWidth")},enumerable:!1,configurable:!0}),t.prototype.updateInputSize=function(){var e=this.isTextInput&&this.size>0?this.size:0;this.isTextInput&&e<1&&this.parent&&this.parent.itemSize&&(e=this.parent.itemSize),this.setPropertyValue("inputSize",e),this.setPropertyValue("inputWidth",e>0?"auto":"")},Object.defineProperty(t.prototype,"autoComplete",{get:function(){return this.getPropertyValue("autoComplete","")},set:function(e){this.setPropertyValue("autoComplete",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.getPropertyValue("min")},set:function(e){this.isValueExpression(e)?this.minValueExpression=e.substring(1):this.setPropertyValue("min",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.getPropertyValue("max")},set:function(e){this.isValueExpression(e)?this.maxValueExpression=e.substring(1):this.setPropertyValue("max",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minValueExpression",{get:function(){return this.getPropertyValue("minValueExpression","")},set:function(e){this.setPropertyValue("minValueExpression",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxValueExpression",{get:function(){return this.getPropertyValue("maxValueExpression","")},set:function(e){this.setPropertyValue("maxValueExpression",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedMin",{get:function(){return this.getPropertyValue("renderedMin")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedMax",{get:function(){return this.getPropertyValue("renderedMax")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minErrorText",{get:function(){return this.getLocalizableStringText("minErrorText")},set:function(e){this.setLocalizableStringText("minErrorText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locMinErrorText",{get:function(){return this.getLocalizableString("minErrorText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxErrorText",{get:function(){return this.getLocalizableStringText("maxErrorText")},set:function(e){this.setLocalizableStringText("maxErrorText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locMaxErrorText",{get:function(){return this.getLocalizableString("maxErrorText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMinMaxType",{get:function(){return m(this)},enumerable:!1,configurable:!0}),t.prototype.onCheckForErrors=function(t,n){var r=this;if(e.prototype.onCheckForErrors.call(this,t,n),!n){if(this.isValueLessMin){var i=new u.CustomError(this.getMinMaxErrorText(this.minErrorText,this.getCalculatedMinMax(this.renderedMin)),this);i.onUpdateErrorTextCallback=function(e){e.text=r.getMinMaxErrorText(r.minErrorText,r.getCalculatedMinMax(r.renderedMin))},t.push(i)}if(this.isValueGreaterMax){var o=new u.CustomError(this.getMinMaxErrorText(this.maxErrorText,this.getCalculatedMinMax(this.renderedMax)),this);o.onUpdateErrorTextCallback=function(e){e.text=r.getMinMaxErrorText(r.maxErrorText,r.getCalculatedMinMax(r.renderedMax))},t.push(o)}}},t.prototype.canSetValueToSurvey=function(){if(!this.isMinMaxType)return!0;var e=!this.isValueLessMin&&!this.isValueGreaterMax;return"number"===this.inputType&&this.survey&&(this.survey.isValidateOnValueChanging||this.survey.isValidateOnValueChanged)&&this.hasErrors(),e},t.prototype.getMinMaxErrorText=function(e,t){if(s.Helpers.isValueEmpty(t))return e;var n=t.toString();return"date"===this.inputType&&t.toDateString&&(n=t.toDateString()),e.replace("{0}",n)},Object.defineProperty(t.prototype,"isValueLessMin",{get:function(){return!this.isValueEmpty(this.renderedMin)&&this.getCalculatedMinMax(this.value)<this.getCalculatedMinMax(this.renderedMin)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValueGreaterMax",{get:function(){return!this.isValueEmpty(this.renderedMax)&&this.getCalculatedMinMax(this.value)>this.getCalculatedMinMax(this.renderedMax)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDateInputType",{get:function(){return"date"===this.inputType||"datetime-local"===this.inputType},enumerable:!1,configurable:!0}),t.prototype.getCalculatedMinMax=function(e){return this.isValueEmpty(e)?e:this.isDateInputType?new Date(e):e},t.prototype.setRenderedMinMax=function(e,t){var n=this;void 0===e&&(e=null),void 0===t&&(t=null),this.minValueRunner=this.getDefaultRunner(this.minValueRunner,this.minValueExpression),this.setValueAndRunExpression(this.minValueRunner,this.min,function(e){!e&&n.isDateInputType&&c.settings.minDate&&(e=c.settings.minDate),n.setPropertyValue("renderedMin",e)},e,t),this.maxValueRunner=this.getDefaultRunner(this.maxValueRunner,this.maxValueExpression),this.setValueAndRunExpression(this.maxValueRunner,this.max,function(e){!e&&n.isDateInputType&&(e=c.settings.maxDate?c.settings.maxDate:"2999-12-31"),n.setPropertyValue("renderedMax",e)},e,t)},Object.defineProperty(t.prototype,"step",{get:function(){return this.getPropertyValue("step")},set:function(e){this.setPropertyValue("step",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedStep",{get:function(){return this.isValueEmpty(this.step)?"any":this.step},enumerable:!1,configurable:!0}),t.prototype.supportGoNextPageAutomatic=function(){return["date","datetime","datetime-local"].indexOf(this.inputType)<0},t.prototype.supportGoNextPageError=function(){return["date","datetime","datetime-local"].indexOf(this.inputType)<0},Object.defineProperty(t.prototype,"dataList",{get:function(){return this.locDataList.value},set:function(e){this.locDataList.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locDataList",{get:function(){return this.locDataListValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataListId",{get:function(){return this.locDataList.hasValue()?this.id+"_datalist":void 0},enumerable:!1,configurable:!0}),t.prototype.canRunValidators=function(e){return this.errors.length>0||!e||this.supportGoNextPageError()},t.prototype.setNewValue=function(t){t=this.correctValueType(t),e.prototype.setNewValue.call(this,t)},t.prototype.correctValueType=function(e){return!e||"number"!=this.inputType&&"range"!=this.inputType?e:s.Helpers.isNumber(e)?parseFloat(e):""},t.prototype.hasPlaceHolder=function(){return!this.isReadOnly&&"range"!==this.inputType},t.prototype.isReadOnlyRenderDiv=function(){return this.isReadOnly&&"div"===c.settings.readOnlyTextRenderMode},Object.defineProperty(t.prototype,"inputStyle",{get:function(){var e={};return this.inputWidth&&(e.width=this.inputWidth),e},enumerable:!1,configurable:!0}),t}(d.QuestionTextBase),f=["number","date","datetime","datetime-local","month","time","week"];function m(e){var t=e?e.inputType:"";return!!t&&f.indexOf(t)>-1}function g(e,t){var n=e.split(t);return 2!==n.length?-1:s.Helpers.isNumber(n[0])&&s.Helpers.isNumber(n[1])?60*parseFloat(n[0])+parseFloat(n[1]):-1}function v(e,t,n,r){var i=r?n:t;if(!m(e))return i;if(s.Helpers.isValueEmpty(t)||s.Helpers.isValueEmpty(n))return i;if(0===e.inputType.indexOf("date")||"month"===e.inputType){var o="month"===e.inputType,a=new Date(o?t+"-1":t),l=new Date(o?n+"-1":n);if(!a||!l)return i;if(a>l)return r?t:n}if("week"===e.inputType||"time"===e.inputType)return function(e,t,n){var r=g(e,n),i=g(t,n);return!(r<0||i<0)&&r>i}(t,n,"week"===e.inputType?"-W":":")?r?t:n:i;if("number"===e.inputType){if(!s.Helpers.isNumber(t)||!s.Helpers.isNumber(n))return i;if(parseFloat(t)>parseFloat(n))return r?t:n}return"string"==typeof t||"string"==typeof n?i:t>n?r?t:n:i}o.Serializer.addClass("text",[{name:"inputType",default:"text",choices:c.settings.questions.inputTypes},{name:"size:number",minValue:0,dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"textUpdateMode",default:"default",choices:["default","onBlur","onTyping"],dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"autoComplete",dataList:c.settings.questions.dataList},{name:"min",dependsOn:"inputType",visibleIf:function(e){return m(e)},onPropertyEditorUpdate:function(e,t){e&&e.inputType&&(t.inputType=e.inputType)},onSettingValue:function(e,t){return v(e,t,e.max,!1)}},{name:"max",dependsOn:"inputType",nextToProperty:"*min",visibleIf:function(e){return m(e)},onSettingValue:function(e,t){return v(e,e.min,t,!0)},onPropertyEditorUpdate:function(e,t){e&&e.inputType&&(t.inputType=e.inputType)}},{name:"minValueExpression:expression",category:"logic",dependsOn:"inputType",visibleIf:function(e){return m(e)}},{name:"maxValueExpression:expression",category:"logic",dependsOn:"inputType",visibleIf:function(e){return m(e)}},{name:"minErrorText",serializationProperty:"locMinErrorText",dependsOn:"inputType",visibleIf:function(e){return m(e)}},{name:"maxErrorText",serializationProperty:"locMaxErrorText",dependsOn:"inputType",visibleIf:function(e){return m(e)}},{name:"step:number",dependsOn:"inputType",visibleIf:function(e){return!!e&&"number"===e.inputType}},{name:"maxLength:number",default:-1,dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder",dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"dataList:string[]",serializationProperty:"locDataList",dependsOn:"inputType",visibleIf:function(e){return!!e&&"text"===e.inputType}}],function(){return new p("")},"textbase"),i.QuestionFactory.Instance.registerQuestion("text",function(e){return new p(e)})},"./src/question_textbase.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionTextBase",function(){return u});var r,i=n("./src/question.ts"),o=n("./src/jsonobject.ts"),a=n("./src/helpers.ts"),s=n("./src/utils/cssClassBuilder.ts"),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t){return e.call(this,t)||this}return l(t,e),t.prototype.isTextValue=function(){return!0},Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.getPropertyValue("maxLength")},set:function(e){this.setPropertyValue("maxLength",e)},enumerable:!1,configurable:!0}),t.prototype.getMaxLength=function(){return a.Helpers.getMaxLength(this.maxLength,this.survey?this.survey.maxTextLength:-1)},Object.defineProperty(t.prototype,"placeHolder",{get:function(){return this.placeholder},set:function(e){this.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPlaceHolder",{get:function(){return this.locPlaceholder},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"textbase"},t.prototype.isEmpty=function(){return e.prototype.isEmpty.call(this)||""===this.value},Object.defineProperty(t.prototype,"textUpdateMode",{get:function(){return this.getPropertyValue("textUpdateMode")},set:function(e){this.setPropertyValue("textUpdateMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSurveyInputTextUpdate",{get:function(){return"default"==this.textUpdateMode?!!this.survey&&this.survey.isUpdateValueTextOnTyping:"onTyping"==this.textUpdateMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedPlaceholder",{get:function(){return this.getPropertyValue("renderedPlaceholder")},enumerable:!1,configurable:!0}),t.prototype.setRenderedPlaceholder=function(e){this.setPropertyValue("renderedPlaceholder",e)},t.prototype.onReadOnlyChanged=function(){e.prototype.onReadOnlyChanged.call(this),this.calcRenderedPlaceholder()},t.prototype.onSurveyLoad=function(){this.calcRenderedPlaceholder(),e.prototype.onSurveyLoad.call(this)},t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),this.calcRenderedPlaceholder()},t.prototype.calcRenderedPlaceholder=function(){var e=this.placeHolder;e&&!this.hasPlaceHolder()&&(e=void 0),this.setRenderedPlaceholder(e)},t.prototype.hasPlaceHolder=function(){return!this.isReadOnly},t.prototype.getControlClass=function(){return(new s.CssClassBuilder).append(this.cssClasses.root).append(this.cssClasses.onError,this.errors.length>0).append(this.cssClasses.controlDisabled,this.isReadOnly).toString()},Object.defineProperty(t.prototype,"ariaRole",{get:function(){return"textbox"},enumerable:!1,configurable:!0}),function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Object(o.property)({localizable:!0,onSet:function(e,t){return t.calcRenderedPlaceholder()}})],t.prototype,"placeholder",void 0),t}(i.Question);o.Serializer.addClass("textbase",[],function(){return new u("")},"question")},"./src/questionfactory.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionFactory",function(){return o}),n.d(t,"ElementFactory",function(){return a});var r=n("./src/surveyStrings.ts"),i=n("./src/jsonobject.ts"),o=function(){function e(){this.creatorHash={}}return Object.defineProperty(e,"DefaultChoices",{get:function(){return[r.surveyLocalization.getString("choices_Item")+"1",r.surveyLocalization.getString("choices_Item")+"2",r.surveyLocalization.getString("choices_Item")+"3"]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"DefaultColums",{get:function(){var e=r.surveyLocalization.getString("matrix_column")+" ";return[e+"1",e+"2",e+"3"]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"DefaultRows",{get:function(){var e=r.surveyLocalization.getString("matrix_row")+" ";return[e+"1",e+"2"]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"DefaultMutlipleTextItems",{get:function(){var e=r.surveyLocalization.getString("multipletext_itemname");return[e+"1",e+"2"]},enumerable:!1,configurable:!0}),e.prototype.registerQuestion=function(e,t){this.creatorHash[e]=t},e.prototype.unregisterElement=function(e){delete this.creatorHash[e]},e.prototype.clear=function(){this.creatorHash={}},e.prototype.getAllTypes=function(){var e=new Array;for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createQuestion=function(e,t){var n=this.creatorHash[e];return null==n?null:n(t)},e.Instance=new e,e}(),a=function(){function e(){this.creatorHash={}}return e.prototype.registerElement=function(e,t){this.creatorHash[e]=t},e.prototype.clear=function(){this.creatorHash={}},e.prototype.unregisterElement=function(e,t){void 0===t&&(t=!1),delete this.creatorHash[e],o.Instance.unregisterElement(e),t&&i.Serializer.removeClass(e)},e.prototype.getAllTypes=function(){var e=o.Instance.getAllTypes();for(var t in this.creatorHash)e.push(t);return e.sort()},e.prototype.createElement=function(e,t){var n=this.creatorHash[e];return null==n?o.Instance.createQuestion(e,t):n(t)},e.Instance=new e,e}()},"./src/questionnonvalue.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionNonValue",function(){return s});var r,i=n("./src/question.ts"),o=n("./src/jsonobject.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.getType=function(){return"nonvalue"},Object.defineProperty(t.prototype,"hasInput",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitle",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getTitleLocation=function(){return""},Object.defineProperty(t.prototype,"hasComment",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.hasErrors=function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),!1},t.prototype.getAllErrors=function(){return[]},t.prototype.supportGoNextPageAutomatic=function(){return!1},t.prototype.addConditionObjectsByContext=function(e,t){},t.prototype.getConditionJson=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=null),null},t}(i.Question);o.Serializer.addClass("nonvalue",[{name:"title",visible:!1},{name:"description",visible:!1},{name:"valueName",visible:!1},{name:"enableIf",visible:!1},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"clearIfInvisible",visible:!1},{name:"isRequired",visible:!1,isSerializable:!1},{name:"requiredErrorText",visible:!1},{name:"readOnly",visible:!1},{name:"requiredIf",visible:!1},{name:"validators",visible:!1},{name:"titleLocation",visible:!1},{name:"useDisplayValuesInTitle",visible:!1}],function(){return new s("")},"question")},"./src/rendererFactory.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"RendererFactory",function(){return r});var r=function(){function e(){this.renderersHash={}}return e.prototype.unregisterRenderer=function(e,t){delete this.renderersHash[e][t]},e.prototype.registerRenderer=function(e,t,n){this.renderersHash[e]||(this.renderersHash[e]={}),this.renderersHash[e][t]=n},e.prototype.getRenderer=function(e,t){return this.renderersHash[e]&&this.renderersHash[e][t]||"default"},e.prototype.getRendererByQuestion=function(e){return this.getRenderer(e.getType(),e.renderAs)},e.prototype.clear=function(){this.renderersHash={}},e.Instance=new e,e}()},"./src/settings.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"settings",function(){return r});var r={comparator:{trimStrings:!0,caseSensitive:!1},useLocalTimeZone:!0,commentPrefix:"-Comment",webserviceEncodeParameters:!0,useCachingForChoicesRestful:!0,get useCachingForChoicesRestfull(){return r.useCachingForChoicesRestful},set useCachingForChoicesRestfull(e){r.useCachingForChoicesRestful=e},surveyServiceUrl:"https://api.surveyjs.io/public/v1/Survey",itemValueSeparator:"|",itemValueAlwaysSerializeAsObject:!1,itemValueAlwaysSerializeText:!1,defaultLocaleName:"default",matrixDefaultRowName:"default",matrixDefaultCellType:"dropdown",matrixTotalValuePostFix:"-total",matrixMaximumRowCount:1e3,matrixMaxRowCountInCondition:1,matrixRenderRemoveAsIcon:!0,panelMaximumPanelCount:100,ratingMaximumRateValueCount:20,disableOnGettingChoicesFromWeb:!1,serializeLocalizableStringAsObject:!1,allowShowEmptyTitleInDesignMode:!0,allowShowEmptyDescriptionInDesignMode:!0,executeCompleteTriggerOnValueChanged:!1,executeSkipTriggerOnValueChanged:!0,readOnlyCommentRenderMode:"textarea",readOnlyTextRenderMode:"input",confirmActionFunc:function(e){return confirm(e)},minWidth:"300px",maxWidth:"100%",maximumConditionRunCountOnValueChanged:10,setQuestionVisibleIndexForHiddenTitle:!1,setQuestionVisibleIndexForHiddenNumber:!1,lazyRowsRendering:!1,lazyRowsRenderingStartRow:3,showItemsInOrder:"default",supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},minDate:"",maxDate:"",showModal:void 0,supportCreatorV2:!1,showDefaultItemsInCreatorV2:!0,customIcons:{},titleTags:{survey:"h3",page:"h4",panel:"h4",question:"h5"},questions:{inputTypes:["color","date","datetime","datetime-local","email","month","number","password","range","tel","text","time","url","week"],dataList:["name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]}}},"./src/stylesmanager.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"StylesManager",function(){return i});var r=n("./src/defaultCss/cssstandard.ts"),i=function(){function e(){this.sheet=null,e.Enabled&&(this.sheet=e.findSheet(e.SurveyJSStylesSheetId),this.sheet||(this.sheet=e.createSheet(e.SurveyJSStylesSheetId),this.initializeStyles(this.sheet)))}return e.findSheet=function(e){if("undefined"==typeof document)return null;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode&&document.styleSheets[t].ownerNode.id===e)return document.styleSheets[t];return null},e.createSheet=function(e){var t=document.createElement("style");return t.id=e,t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet},e.applyTheme=function(t,n){var i;if(void 0===t&&(t="default"),void 0===n&&(n=".sv_main"),"modern"===t&&(n=".sv-root-modern "),"defaultV2"!==t){if(-1!==["bootstrap","bootstrapmaterial","modern"].indexOf(t)?(i=e[t+"ThemeCss"],r.surveyCss.currentType=t):(i=e.ThemeCss,r.surveyCss.currentType="standard"),e.Enabled){var o=(t+n).trim(),a=e.findSheet(o);if(!a){a=e.createSheet(o);var s=e.ThemeColors[t]||e.ThemeColors.default;Object.keys(i).forEach(function(e){var t=i[e];Object.keys(s).forEach(function(e){return t=t.replace(new RegExp("\\"+e,"g"),s[e])});try{0===e.indexOf("body")?a.insertRule(e+" { "+t+" }",0):a.insertRule(n+e+" { "+t+" }",0)}catch(r){}})}}}else r.surveyCss.currentType=t},e.prototype.initializeStyles=function(t){e.Enabled&&(Object.keys(e.Styles).forEach(function(n){try{t.insertRule(n+" { "+e.Styles[n]+" }",0)}catch(r){}}),Object.keys(e.Media).forEach(function(n){try{t.insertRule(e.Media[n].media+" { "+n+" { "+e.Media[n].style+" } }",0)}catch(r){}}))},e.SurveyJSStylesSheetId="surveyjs-styles",e.Styles={".sv_main span":"word-break: break-word;",".sv_main legend":"border: none; margin: 0;",".sv_bootstrap_css .sv_qstn":"padding: 0.5em 1em 1.5em 1em;",".sv_bootstrap_css .sv_qcbc input[type=checkbox], .sv_bootstrap_css .sv_qcbc input[type=radio]":"vertical-align: middle; margin-top: -1px",".sv_bootstrap_css .sv_qstn fieldset":"display: block;",".sv_bootstrap_css .sv_qstn  .sv_q_checkbox_inline, .sv_bootstrap_css .sv_qstn .sv_q_radiogroup_inline":"display: inline-block;",".sv_bootstrap_css .sv-paneldynamic__progress-container ":"position: relative; margin-right: 250px; margin-left: 40px; margin-top: 10px;",".sv_main.sv_bootstrapmaterial_css .sv_q_radiogroup_control_label":"display: inline; position: static;",".sv_main.sv_bootstrapmaterial_css .checkbox":"margin-top:10px;margin-bottom:10px;",".sv_row":"clear: both; min-width:300px;",".sv_row .sv_qstn":"float: left",".sv_row .sv_qstn:last-child":"float: none",".sv_qstn":"display: vertical-align: top; overflow: auto; min-width:300px;",".sv_p_container":"display: vertical-align: top; min-width:300px;",".sv_q_title .sv_question_icon":"float: right; margin-right: 1em;",".sv_q_title .sv_question_icon::before":"content: ''; background-repeat: no-repeat; background-position: center; padding: 0.5em; display: inline-block; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxMCAxMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsOiM2RDcwNzI7fQ0KPC9zdHlsZT4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMiwyIDAsNCA1LDkgMTAsNCA4LDIgNSw1ICIvPg0KPC9zdmc+DQo=);",".sv_q_title .sv_question_icon.sv_expanded::before":"transform: rotate(180deg);",".sv_qbln .checkbox-material":"margin-right: 3px;",".sv_qcbx .checkbox-material":"margin-right: 5px;",".sv_qcbx .checkbox label":"justify-content: left; display: inline-block;",".sv_qstn .radio label":"justify-content: left; display: inline-block;",".sv_qstn .sv_q_imgsel > label img":"pointer-events: none;",".sv_qstn .sv_q_imgsel.sv_q_imagepicker_inline":"display: inline-block;",".sv_qstn label.sv_q_m_label":"position: absolute; margin: 0; display: block; width: 100%;",".sv_qstn td":"position: relative;",".sv_q_mt":"table-layout: fixed;",".sv_q_mt_label":"display: flex; align-items: center; font-weight: inherit;",".sv_q_mt_title":"margin-right: 0.5em; width: 33%;",".sv_q_mt_item":"flex: 1;",".sv_q_mt_item_value":"float: left;",'[dir="rtl"] .sv_q_mt_item_value':"float: right;",".sv_qstn.sv_qstn_left":"margin-top: 0.75em;",".sv_qstn .title-left":"float: left; margin-right: 1em; max-width: 50%",'[dir="rtl"] .sv_qstn .title-left':"float: right; margin-left: 1em;",".sv_qstn .content-left":"overflow: hidden",".sv_q_radiogroup_inline .sv_q_radiogroup_other":"display: inline-block;",".sv_q_checkbox_inline .sv_q_checkbox_other":"display: inline-block;",".sv_q_checkbox_inline, .sv_q_radiogroup_inline, .sv_q_imagepicker_inline":"line-height: 2.5em;",".form-inline .sv_q_checkbox_inline:not(:last-child)":"margin-right: 1em;",".form-inline .sv_q_radiogroup_inline:not(:last-child)":"margin-right: 1em;",".sv_imgsel .sv_q_imagepicker_inline:not(:last-child)":"margin-right: 1em;",".sv_qstn fieldset":"border: none; margin: 0; padding: 0;",".sv_qstn .sv_q_file_placeholder":"display:none",".sv_p_title":"padding-left: 1em; padding-bottom: 0.3em;",".sv_p_title_expandable, .sv_q_title_expandable":"cursor: pointer; position: relative; display: flex; align-items: center; padding-right: 24px;",".sv_p_title_expandable::after, .sv_q_title_expandable::after":"content: \"\"; display: block;background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; background-size: 10px 12px; width: 24px; height: 24px; position: absolute; right: 0;",".sv_p_title_expanded::after, .sv_q_title_expanded::after":"transform: rotate(180deg);",".sv_p_title .sv_panel_icon":"float: right; margin-right: 1em;",".sv_p_title .sv_panel_icon::before":"content: ''; background-repeat: no-repeat; background-position: center; padding: 0.5em; display: inline-block; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxMCAxMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsOiM2RDcwNzI7fQ0KPC9zdHlsZT4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMiwyIDAsNCA1LDkgMTAsNCA4LDIgNSw1ICIvPg0KPC9zdmc+DQo=);",".sv_p_title .sv_panel_icon.sv_expanded::before":"transform: rotate(180deg);",".sv_p_footer":"padding-left: 1em; padding-bottom: 1em;padding-top: 1em;",".sv_matrix_cell_detail_button":"position: relative",".sv_detail_panel_icon":"display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px;",".sv_detail_panel_icon::before":"content: ''; background-repeat: no-repeat; background-position: center; width: 14px; height: 14px; display: block; transform: rotate(270deg); background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 15 15' style='enable-background:new 0 0 15 15;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='14,5.5 12.6,4.1 7.5,9.1 2.4,4.1 1,5.5 7.5,12 '/%3E%3C/svg%3E%0A\");",".sv_detail_panel_icon.sv_detail_expanded::before":"transform: rotate(0deg)",".sv_matrix_empty_rows_section":"text-align: center; vertical-align: middle;",".sv_matrix_empty_rows_text":"padding:20px",".sv_q_file > input[type=file], .sv_q_file > button":"display: inline-block;",".sv_q_file_preview":"display: inline-block; vertical-align: top; border: 1px solid lightgray; padding: 5px; margin-top: 10px;",".sv_q_file_preview > a":"display: block; overflow: hidden; vertical-align: top; white-space: nowrap; text-overflow: ellipsis;",".sv_q_file_remove_button":"line-height: normal;",".sv_q_file_remove":"display: block; cursor: pointer;",".sv_q_m_cell_text":"cursor: pointer;",".sv_q_dd_other":"margin-top: 1em;",".sv_q_dd_other input":"width: 100%;",".sv_q_dd_clean-button":"margin: 0.15em 3em;",".sv_q_dd_clean-button-svg":"width: 1em; height: 1em;",".sv_q_dd_control":"display: flex; justify-content: space-between; appearance: none;",".sv_q_dd_root":"position: relative;",".sv_q_dd_select_wrapper::after":"content: \"\"; display: block;background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; background-size: 10px 12px; width: 34px; height: 100%; position: absolute; right: 0; top: 0;",".sv_q_dropdown_clean-button":"margin: auto 2em;",".sv_q_tagbox__placeholder":"position: absolute; top: 0; left: 1em; max-width: 100%; width: auto; height: 100%; text-align: left; cursor: text; pointer-events: none;",".sv_qstn .sv-q-col-1, .sv-question .sv-q-col-1":"width: 100%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-col-2, .sv-question .sv-q-col-2":"width: calc(50% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-col-3, .sv-question .sv-q-col-3":"width: calc(33.33333% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-col-4, .sv-question .sv-q-col-4":"width: calc(25% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-col-5, .sv-question .sv-q-col-5":"width: calc(20% - 1em); display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-column-1, .sv-question .sv-q-column-1":"width: 100%; max-width: 100%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-column-2, .sv-question .sv-q-column-2":"max-width: 50%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-column-3, .sv-question .sv-q-column-3":"max-width: 33.33333%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-column-4, .sv-question .sv-q-column-4":"max-width: 25%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv-q-column-5, .sv-question .sv-q-column-5":"max-width: 20%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",".sv_qstn .sv_q_file_input":"color: transparent;",".sv_qstn .sv_q_imgsel label > div":"overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 4px; border: 1px solid lightgray; border-radius: 4px;",".sv_qstn .sv_q_imgsel label > div > img, .sv_qstn .sv_q_imgsel label > div > embed":"display: block;",".sv_qstn table tr td .sv_q_m_cell_label":"position: absolute; left: 0; right: 0; top: 0; bottom: 0;","f-panel":"padding: 0.5em 1em; display: inline-block; line-height: 2em;",".sv_progress_bar > span":"white-space: nowrap;",".sv_progress-buttons__container-center":"text-align: center;",".sv_progress-buttons__container":"display: inline-block; font-size: 0; width: 100%; max-width: 1100px; white-space: nowrap; overflow: hidden;",".sv_progress-buttons__image-button-left":"display: inline-block; vertical-align: top; margin-top: 22px; font-size: 14px; width: 16px; height: 16px; cursor: pointer; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iMTEsMTIgOSwxNCAzLDggOSwyIDExLDQgNyw4ICIvPg0KPC9zdmc+DQo=);",".sv_progress-buttons__image-button-right":"display: inline-block; vertical-align: top; margin-top: 22px; font-size: 14px; width: 16px; height: 16px; cursor: pointer; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iNSw0IDcsMiAxMyw4IDcsMTQgNSwxMiA5LDggIi8+DQo8L3N2Zz4NCg==);",".sv_progress-buttons__image-button--hidden":"visibility: hidden;",".sv_progress-buttons__list-container":"max-width: calc(100% - 36px); display: inline-block; overflow: hidden;",".sv_progress-buttons__list":"display: inline-block; width: max-content; padding-left: 28px; padding-right: 28px; margin-top: 14px; margin-bottom: 14px;",".sv_progress-buttons__list li":"width: 138px; font-size: 14px; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; position: relative; text-align: center; vertical-align: top; display: inline-block;",".sv_progress-buttons__list li:before":"width: 24px; height: 24px; content: ''; line-height: 30px; display: block; margin: 0 auto 10px auto; border: 3px solid; border-radius: 50%; box-sizing: content-box; cursor: pointer;",".sv_progress-buttons__list li:after":"width: 73%; height: 3px; content: ''; position: absolute; top: 15px; left: -36.5%;",".sv_progress-buttons__list li:first-child:after":"content: none;",".sv_progress-buttons__list .sv_progress-buttons__page-title":"width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold;",".sv_progress-buttons__list .sv_progress-buttons__page-description":"width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",".sv_progress-buttons__list li.sv_progress-buttons__list-element--nonclickable:before":"cursor: not-allowed;",".sv-ranking":"outline: none; user-select: none;",".sv-ranking-item":"cursor: pointer; position: relative;",".sv-ranking-item:focus .sv-ranking-item__icon--hover":"visibility: hidden;",".sv-ranking-item:hover .sv-ranking-item__icon--hover":"visibility: visible;",".sv-question--disabled .sv-ranking-item:hover .sv-ranking-item__icon--hover":"visibility: hidden;",".sv-ranking-item:focus":"outline: none;",".sv-ranking-item:focus .sv-ranking-item__icon--focus":"visibility: visible; top: 15px;",".sv-ranking-item:focus .sv-ranking-item__index":"background: white; border: 2px solid var(--primary, #19b394);",".sv-ranking-item__content":"display: flex; align-items: center; line-height: 1em; background-color: white;padding: 5px 0px; border-radius: 100px;",".sv-ranking-item__icon-container":"left: 0;top: 0;bottom: 0;width: 25px; flex-shrink: 0;",".sv-ranking-item__icon":"visibility: hidden;top:20px; fill: var(--primary, #19b394); position: absolute;",".sv-ranking-item__index":"display: flex; flex-shrink: 0; align-items: center; justify-content: center; background: rgba(25, 179, 148, 0.1);border-radius: 100%; border:2px solid transparent; margin-right: 16px; width: 40px; height: 40px; line-height: 1em;",".sv-ranking-item__text":"display: inline-block;",".sv-ranking-item__ghost":"display: none;background: #f3f3f3;border-radius: 100px;width: 200px;height: 55px;z-index: 1;position: absolute;left: 25px;","[dir='rtl'] .sv-ranking-item__ghost":"left: initilal; right: 25px;",".sv-ranking-item--ghost .sv-ranking-item__ghost":"display: block;",".sv-ranking-item--ghost .sv-ranking-item__content":"visibility: hidden;",".sv-ranking-item--drag .sv-ranking-item__content":"box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);border-radius: 100px;",".sv-ranking--drag .sv-ranking-item:hover .sv-ranking-item__icon":"visibility: hidden;",".sv-ranking-item--drag .sv-ranking-item__icon--hover":"visibility: visible;",".sv-ranking--mobile .sv-ranking-item__icon--hover":"visibility:visible; fill:#9f9f9f;",".sv-ranking--mobile.sv-ranking--drag .sv-ranking-item--ghost .sv-ranking-item__icon.sv-ranking-item__icon--hover":"visibility:hidden;",".sv-ranking--design-mode .sv-ranking-item:hover .sv-ranking-item__icon":"visibility: hidden;",".sv-ranking--disabled":"opacity: 0.8;",".sv-ranking-shortcut .sv-ranking-item__icon":"fill: var(--primary, #19b394); ",".sv-dragged-element-shortcut":"height: 24px; min-width: 100px; border-radius: 36px; background-color: white; padding: 16px; cursor: grabbing; position: absolute; z-index: 1000; box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); font-family: 'Open Sans'; font-size: 16px; padding-left: 20px;line-height: 24px;",".sv-matrixdynamic__drag-icon":"padding-top:14px",".sv-matrixdynamic__drag-icon:after":"content: ' '; display: block; height: 6px; width: 20px; border: 1px solid #e7e7e7; box-sizing: border-box; border-radius: 10px; cursor: move; margin-top: 12px;",".sv-matrix-row--drag-drop-ghost-mod td":"background-color: #f3f3f3;",".sv-matrix-row--drag-drop-ghost-mod td > *":"visibility: hidden",".sv_qstn .sv_q_select_column":"display: inline-block; vertical-align: top; min-width: 10%;",".sv_qstn .sv_q_select_column > *:not(.sv_technical)":"display: block;",".sv_main .sv_container .sv_body .sv_p_root .sv_qstn .sv_q_select_column textarea":"margin-left: 0; padding-left: 0; line-height: initial;",".sv_main .sv-hidden":"display: none !important;",".sv_main .sv-visuallyhidden":"position: absolute; height: 1px !important; width: 1px !important; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);",".sv_main .sv-progress":"height: 0.19em; background-color: $header-background-color; position: relative;",".sv_main .sv-progress__bar":"background-color: $main-color; height: 100%; position: relative;",".sv_main .sv-paneldynamic__progress-container":"position: relative; display: inline-block; width: calc(100% - 250px); margin-top: 20px;",".sv_main .sv-paneldynamic__add-btn":"float: right;",".sv_main .sv-paneldynamic__add-btn--list-mode":"float: none; margin-top: 0;",".sv_main .sv-paneldynamic__remove-btn":"margin-top: 1.25em;",".sv_main .sv-paneldynamic__remove-btn--right":"margin-top: 0; margin-left: 1.25em;",".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn":"box-sizing: border-box; display: inline-block; cursor: pointer; width: 0.7em; top: -0.28em; position: absolute;",".sv_main .sv-paneldynamic__prev-btn svg, .sv_main .sv-paneldynamic__next-btn svg":"width: 0.7em; height: 0.7em; display: block;",".sv_main .sv-paneldynamic__prev-btn":"left: -1.3em; transform: rotate(90deg);",".sv_main .sv-paneldynamic__next-btn ":"right: -1.3em; transform: rotate(270deg);",".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled":"cursor: auto;",".sv_main .sv-paneldynamic__progress-text":"font-weight: bold; font-size: 0.87em; margin-top: 0.69em; margin-left: 4em",".sv_main .sv-boolean__switch":"display: inline-block; box-sizing: border-box; width: 63px; height: 24px; margin-right: 17px; margin-left: 21px; padding: 2px 3px; vertical-align: middle; border-radius: 12px; cursor: pointer;",".sv_main .sv-boolean__slider":"display: inline-block; width: 20px; height: 20px; transition-duration: .4s; transition-property: margin-left; border: none; border-radius: 100%;",".sv_main .sv-boolean__label":"vertical-align: middle; cursor: pointer;",".sv_main .sv-boolean--indeterminate  .sv-boolean__slider":"margin-left: calc(50% - 10px);",".sv_main .sv-boolean input:focus ~ .sv-boolean__switch":"outline-width: 1px; outline-style: solid; outline-offset: 1px;",".sv_main .sv-boolean--checked  .sv-boolean__slider":"margin-left: calc(100% - 20px);","[dir='rtl'] .sv-boolean__label ":"float: right;","[dir='rtl'] .sv-boolean--indeterminate .sv-boolean__slider":"margin-right: calc(50% - 0.625em);","[dir='rtl'] .sv-boolean--checked .sv-boolean__slider":"margin-right: calc(100% - 1.25em);","[dir='rtl'] .sv-boolean__switch":"float: right;","[style*='direction:rtl'] .sv-boolean__label ":"float: right;","[style*='direction:rtl'] .sv-boolean--indeterminate .sv-boolean__slider":"margin-right: calc(50% - 0.625em);","[style*='direction:rtl'] .sv-boolean--checked .sv-boolean__slider":"margin-right: calc(100% - 1.25em);","[style*='direction:rtl'] .sv-boolean__switch":"float: right;",".sv_main .sv_q_num":"",".sv_main .sv_q_num + span":"",".sv_main .sjs_sp_container":"position: relative; box-sizing: content-box;",".sv_main .sjs_sp_controls":"position: absolute; left: 0; bottom: 0;",".sv_main .sjs_sp_controls > button":"user-select: none;",".sv_main .sjs_sp_container>div>canvas:focus":"outline: none;",".sv_main .sjs_sp_placeholder":"display: flex;  align-items: center; justify-content: center; position: absolute; z-index: 0; user-select: none; pointer-events: none; width: 100%; height: 100%;",".sv_main .sv_logo":"",".sv_main .sv-logo--left":"display: inline-block; vertical-align: top; margin-right: 2em;",".sv_main .sv-logo--right":"display: inline-block; vertical-align: top; margin-left: 2em; ",".sv_main .sv-logo--top":"display: block; width: 100%; text-align: center;",".sv_main .sv-logo--bottom":"display: block; width: 100%; text-align: center;",".sv_main .sv_header__text":"display: inline-block; vertical-align: top; max-width: 100%; width: 100%",".sv_main .sv-expand-action:before":"content: \"\"; display: inline-block; background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; height: 10px; width: 12px; margin: auto 8px;",".sv_main .sv-expand-action--expanded:before":"transform: rotate(180deg);",".sv_main .sv-action-bar":"display: flex; position: relative; align-items: center; margin-left: auto; padding: 0 0 0 16px; overflow: hidden; white-space: nowrap;",".sv_main .sv-action-bar-separator":"display: inline-block; width: 1px; height: 24px; vertical-align: middle; margin-right: 16px; background-color: #d6d6d6;",".sv_main .sv-action-bar-item":"-webkit-appearance: none; -moz-appearance: none; appearance: none; display: flex; height: 40px; padding: 8px; box-sizing: border-box; margin-right: 16px; border: none; border-radius: 2px; background-color: transparent; cursor: pointer; line-height: 24px; font-size: 16px; overflow-x: hidden; white-space: nowrap; min-width: auto; font-weight: normal",".sv_main .sv-action-bar-item__title":"vertical-align: middle; white-space: nowrap;",".sv_main .sv-action-bar-item__title--with-icon":"margin-left: 8px;",".sv_main .sv-action__content":"display: flex; flex-direction: row; align-items: center;",".sv_main .sv-action__content > *":"flex: 0 0 auto;",".sv_main .sv-action--hidden":"width: 0px; height: 0px; overflow: hidden;",".sv_main .sv-action-bar-item__icon svg":"display: block;",".sv_main .sv-action-bar-item:active":"opacity: 0.5;",".sv_main .sv-action-bar-item:focus":"outline: none;",".sv_main .sv-title-actions":"display: flex; align-items: center; width: 100%;",".sv_main .sv-title-actions__title":"flex-wrap: wrap; max-width: 90%; min-width: 50%;",".sv_main .sv-title-actions__bar":"min-width: 56px;",".sv_main .sv-title-actions .sv-title-actions__title":"min-width: unset; max-width: unset; flex-wrap: wrap; flex: 0 0 auto;",".sv_main .sv-title-actions .sv-action-title-bar":"min-width: unset; flex: 1 1 auto; justify-content: flex-end;",".sv_main .sv_matrix_cell_actions .sv-action-bar":"margin-left: 0; padding-left: 0;",".sv_main .sv_p_wrapper_in_row":"display: flex; flex-direction: row; align-items: center;",".sv_main  .sv_p_remove_btn_right":"margin-left: 1em;",".sv_main .sv-button-group":"display: flex; align-items: center; flex-direction: row; font-size: 16px; height: 48px; overflow: auto;",".sv_main .sv-button-group__item":"display: flex; box-sizing: border-box; flex-direction: row; justify-content: center; align-items: center; width: 100%; padding: 11px 16px; line-height: 24px; border-width: 1px; border-style: solid; outline: none; font-size: 16px; font-weight: 400; cursor: pointer; overflow: hidden;",".sv_main .sv-button-group__item:not(:first-of-type)":"margin-left: -1px;",".sv_main .sv-button-group__item-icon":"display: block; height: 24px;",".sv_main .sv-button-group__item--selected":"font-weight: 600;",".sv_main .sv-button-group__item-decorator":"display: flex; align-items: center; max-width: 100%;",".sv_main  .sv-button-group__item-icon + .sv-button-group__item-caption":"margin-left: 8px",".sv_main .sv-button-group__item-caption":"display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",".sv_main .sv-button-group__item--disabled":"color: cursor: default;","sv-popup":"display: block; position: absolute; z-index: -1;",".sv-popup":"position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; outline: none; z-index: 1500;",".sv-popup__container":"filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1)); position: absolute; padding: 0;",".sv-popup__body-content":"background-color: var(--background, #fff); border-radius: calc(0.5 * var(--base-unit, 8px)); width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; max-height: 90vh; max-width: 90vw;",".sv-popup--modal .sv-list__filter":"padding-top: 8px;",".sv-popup--modal .sv-list__filter-icon":"top: 20px;",".sv-popup--overlay .sv-list__filter":"padding-top: 8px;",".sv-popup--overlay .sv-list__filter-icon":"top: 20px;",".sv-popup--modal":"display: flex; align-items: center; justify-content: center;",".sv-popup--modal .sv-popup__container":"position: static;",".sv-popup--modal .sv-popup__body-content":"padding: calc(4 * var(--base-unit, 8px));",".sv-popup--overlay":"width: 100%;",".sv-popup--overlay .sv-popup__container":"background: rgba(144, 144, 144, 0.5); max-width: 100vw; max-height: calc(100vh - 1 * var(--base-unit, 8px)); height: calc(100vh - 1 * var(--base-unit, 8px)); width: 100%; padding-top: calc(2 * var(--base-unit, 8px)); border: unset;",".sv-popup__shadow":"width: 100%; height: 100%;",".sv-popup--overlay .sv-popup__body-content":"border-radius: calc(2 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) 0px 0px; background: var(--background, #fff); box-shadow: 0px calc(1 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) rgba(0, 0, 0, 0.1); padding: calc(3 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)); height: calc(100% - calc(1 * var(--base-unit, 8px))); max-height: 100vh; max-width: 100vw;",".sv-popup--overlay .sv-popup__scrolling-content":"height: calc(100% - (10 * var(--base-unit, 8px)));",".sv-popup--overlay .sv-popup__body-footer":"margin-top: calc(2 * var(--base-unit, 8px));",".sv-popup--overlay .sv-popup__body-footer-item":"width: 100%;",".sv-popup--overlay .sv-popup__button--cancel":"background-color: var(--primary, #19b394); border: 2px solid var(--primary, #19b394); color: var(--primary-foreground, #fff);",".sv-popup__scrolling-content":"height: 100%; overflow: auto; display: flex; flex-direction: column;",".sv-popup__scrolling-content::-webkit-scrollbar":"height: 6px; width: 6px; background-color: var(--background-dim, #f3f3f3);",".sv-popup__scrolling-content::-webkit-scrollbar-thumb":"background: var(--primary-light, rgba(25, 179, 148, 0.1));",".sv-popup__content":"min-width: 100%; height: 100%;",".sv-popup--show-pointer.sv-popup--top .sv-popup__pointer":"transform: translate(calc(-1 * var(--base-unit, 8px))) rotate(180deg);",".sv-popup--show-pointer.sv-popup--bottom .sv-popup__pointer":"transform: translate(calc(-1 * var(--base-unit, 8px)), calc(-1 * var(--base-unit, 8px)));",".sv-popup--show-pointer.sv-popup--right":"transform: translate(calc(1 * var(--base-unit, 8px)));",".sv-popup--show-pointer.sv-popup--right .sv-popup__pointer":"transform: translate(-12px, -4px) rotate(-90deg);",".sv-popup--show-pointer.sv-popup--left":"transform: translate(calc(-1 * var(--base-unit, 8px)));",".sv-popup--show-pointer.sv-popup--left .sv-popup__pointer":"transform: translate(-4px, -4px) rotate(90deg);",".sv-popup__pointer":"display: block; position: absolute;",".sv-popup__pointer:after":"content: ' '; display: block; width: 0; height: 0; border-left: calc(1 * var(--base-unit, 8px)) solid transparent; border-right: calc(1 * var(--base-unit, 8px)) solid transparent; border-bottom: calc(1 * var(--base-unit, 8px)) solid var(--background, #fff); align-self: center;",".sv-popup__body-header":"font-family: Open Sans; font-size: calc(3 * var(--base-unit, 8px)); line-height: calc(4 * var(--base-unit, 8px)); font-style: normal; font-weight: 700; margin-bottom: calc(2 * var(--base-unit, 8px)); color: var(--foreground, #161616);",".sv-popup__body-footer":"display: flex; margin-top: calc(4 * var(--base-unit, 8px));",".sv-popup__body-footer-item:first-child":"margin-left: auto;",".sv-popup__body-footer-item + .sv-popup__body-footer-item":"margin-left: calc(1 * var(--base-unit, 8px));",".sv-popup__button":"padding: calc(2 * var(--base-unit, 8px)) calc(6 * var(--base-unit, 8px)); background: var(--background, #fff); box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15); border-radius: 4px; margin: 2px; cursor: pointer; font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-style: normal; font-weight: 600; font-size: calc(2 * var(--base-unit, 8px)); line-height: calc(3 * var(--base-unit, 8px)); text-align: center; color: var(--primary, #19b394); border: none; outline: none;",".sv-popup__button:hover":"box-shadow: 0 0 0 2px var(--primary, #19b394);",".sv-popup__button:disabled":"color: var(--foreground-disabled, rgba(#161616, 0.16)); cursor: default;",".sv-popup__button:disabled:hover":"box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15);",".sv-popup__button.sv-popup__button--apply":"background-color: var(--primary, #19b394); color: var(--primary-foreground, #fff);",".sv-popup__button.sv-popup__button--apply:disabled":"background-color: var(--background-dim, #f3f3f3);",".sv-list":"padding: 0; margin: 0; background: var(--background, #fff); list-style-type: none; overflow-y: auto;",".sv-list__item--with-icon":"padding-top: 12px; padding-bottom: 12px;",".sv-list__item":"width: 100%; box-sizing: border-box; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",".sv-list__item-body":"width: 100%; box-sizing: border-box; padding: 8px 64px 8px 16px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",".sv-list__item-icon":"float: left; width: calc(3 * 8px); height: calc(3 * 8px); margin-right: calc(2 * 8px);",".sv-list__item-icon svg":"display: block;",".sv-list__item-icon use":"fill: #909090;",".sv-list__item:not(.sv-list__item--selected):hover .sv-list__item-body":"background-color: var(--background-dim, #f3f3f3);",".sv-list__item.sv-list__item--focused .sv-list__item-body":"background-color: var(--background-dim, #f3f3f3);",".sv-list__item--selected .sv-list__item-icon use":"fill: var(--primary-foreground, #fff);",".sv-list__item.sv-list__item--disabled":"color: var(--foreground-light, #909090); cursor: default;",".sv-list__item span":"white-space: nowrap;",".sv-list__container":"position: relative; display: flex; flex-direction: column; height: 100%; display: flex; flex-direction: column; min-height: 0;",".sv-list__filter":"border-bottom: 1px solid rgba(0, 0, 0, 0.16); background: var(--background, #fff); padding-bottom: calcSize(1);",".sv-list__input":"-webkit-appearance: none; -moz-appearance: none; appearance: none; display: block; box-sizing: border-box; width: 100%; line-height: 24px; padding-left: 56px; padding-right: 24px; padding-top: 12px; padding-bottom: 12px; outline: none; font-size: 1em; border: none",".sv-list__filter-icon":"display: block; position: absolute; top: 12px; left: 16px;",".sv-list__filter-icon .sv-svg-icon":"width: 24px; height: 24px;",".sv-list__empty-container":"width: 100%; box-sizing: border-box; padding: 48px 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",".sv-list__empty-text":"line-height: 24px; font-size: 16px; font-weight: 400; text-align: center; color: var(--foreground-light, #909090);",".sv-skeleton-element":"min-height: 50px;"},e.Media={".sv_qstn fieldset .sv-q-col-1":{style:"width: 100%;",media:"@media only screen and (max-width: 480px)"},".sv_qstn fieldset .sv-q-col-2":{style:"width: 100%;",media:"@media only screen and (max-width: 480px)"},".sv_qstn fieldset .sv-q-col-3":{style:"width: 100%;",media:"@media only screen and (max-width: 480px)"},".sv_qstn fieldset .sv-q-col-4":{style:"width: 100%;",media:"@media only screen and (max-width: 480px)"},".sv_qstn fieldset .sv-q-col-5":{style:"width: 100%;",media:"@media only screen and (max-width: 480px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn":{style:"display: block; width: 100% !important;",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .title-left":{style:"float: none;",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .sv_q_radiogroup_inline, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .sv_q_checkbox_inline, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .sv_q_imagepicker_inline":{style:"display: block;",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table":{style:"display: block;",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table thead":{style:"display: none;",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table tbody, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table tr, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table td":{style:"display: block;",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.table:not(.sv_q_matrix) td:before":{style:"content: attr(data-responsive-title);",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn table.sv_q_matrix td:after":{style:"content: attr(data-responsive-title); padding-left: 1em",media:"@media (max-width: 600px)"},".sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .radio label, .sv_main .sv_container .panel-body.card-block .sv_row .sv_qstn .checkbox label":{style:"line-height: 12px; vertical-align: top;",media:"@media (max-width: 600px)"},".sv_qstn label.sv_q_m_label":{style:"display: inline;",media:"@media (max-width: 600px)"},".sv_main .sv_custom_header":{style:"display: none;",media:"@media (max-width: 1300px)"},".sv_main .sv_container .sv_header h3":{style:"font-size: 1.5em;",media:"@media (max-width: 1300px)"},".sv_main .sv_container .sv_header h3 span":{style:"font-size: 0.75em;",media:"@media (max-width: 700px)"},".sv_main.sv_bootstrap_css .sv-progress__text":{style:"margin-left: 8em;",media:"@media (min-width: 768px)"},".sv_row":{style:" display: flex; flex-wrap: wrap;",media:"@supports (display: flex)"},".sv-row > .sv-row__panel, .sv-row__question:not(:last-child)":{style:"float: left;",media:"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)"},"[dir='rtl'],[style*='direction:rtl'] .sv-row__question:not(:last-child)":{style:"float: right;",media:"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)"},".sv-row > .sv-row__panel, .sv-row__question":{style:"width: 100% !important; padding-right: 0 !important;",media:"@media only screen and (max-width: 600px)"}},e.ThemeColors={default:{"$header-background-color":"#e7e7e7","$body-container-background-color":"#f4f4f4","$main-color":"#1ab394","$main-hover-color":"#0aa384","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#6d7072","$text-input-color":"#6d7072","$header-color":"#6d7072","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#8dd9ca","$progress-buttons-line-color":"#d4d4d4"},orange:{"$header-background-color":"#4a4a4a","$body-container-background-color":"#f8f8f8","$main-color":"#f78119","$main-hover-color":"#e77109","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#4a4a4a","$text-input-color":"#4a4a4a","$header-color":"#f78119","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#f7b781","$progress-buttons-line-color":"#d4d4d4"},darkblue:{"$header-background-color":"#d9d8dd","$body-container-background-color":"#f6f7f2","$main-color":"#3c4f6d","$main-hover-color":"#2c3f5d","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#4a4a4a","$text-input-color":"#4a4a4a","$header-color":"#6d7072","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#839ec9","$progress-buttons-line-color":"#d4d4d4"},darkrose:{"$header-background-color":"#ddd2ce","$body-container-background-color":"#f7efed","$main-color":"#68656e","$main-hover-color":"#58555e","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#4a4a4a","$text-input-color":"#4a4a4a","$header-color":"#6d7072","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#c6bed4","$progress-buttons-line-color":"#d4d4d4"},stone:{"$header-background-color":"#cdccd2","$body-container-background-color":"#efedf4","$main-color":"#0f0f33","$main-hover-color":"#191955","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#0f0f33","$text-input-color":"#0f0f33","$header-color":"#0f0f33","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#747491","$progress-buttons-line-color":"#d4d4d4"},winter:{"$header-background-color":"#82b8da","$body-container-background-color":"#dae1e7","$main-color":"#3c3b40","$main-hover-color":"#1e1d20","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#000","$text-input-color":"#000","$header-color":"#000","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$disable-color":"#dbdbdb","$progress-text-color":"#9d9d9d","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#d1c9f5","$progress-buttons-line-color":"#d4d4d4"},winterstone:{"$header-background-color":"#323232","$body-container-background-color":"#f8f8f8","$main-color":"#5ac8fa","$main-hover-color":"#06a1e7","$body-background-color":"white","$inputs-background-color":"white","$text-color":"#000","$text-input-color":"#000","$header-color":"#000","$border-color":"#e7e7e7","$error-color":"#ed5565","$error-background-color":"#fd6575","$disable-color":"#dbdbdb","$progress-text-color":"#9d9d9d","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#acdcf2","$progress-buttons-line-color":"#d4d4d4"},modern:{"$main-color":"#1ab394","$add-button-color":"#1948b3","$remove-button-color":"#ff1800","$disable-color":"#dbdbdb","$progress-text-color":"#9d9d9d","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$error-color":"#d52901","$text-color":"#404040","$light-text-color":"#fff","$button-text-color":"#fff","$checkmark-color":"#fff","$matrix-text-checked-color":"#fff","$progress-buttons-color":"#8dd9ca","$progress-buttons-line-color":"#d4d4d4","$text-input-color":"#404040","$inputs-background-color":"transparent","$main-hover-color":"#9f9f9f","$body-container-background-color":"#f4f4f4","$text-border-color":"#d4d4d4","$disabled-text-color":"rgba(64, 64, 64, 0.5)","$border-color":"rgb(64, 64, 64, 0.5)","$dropdown-border-color":"#d4d4d4","$header-background-color":"#e7e7e7","$answer-background-color":"rgba(26, 179, 148, 0.2)","$error-background-color":"rgba(213, 41, 1, 0.2)","$radio-checked-color":"#404040","$clean-button-color":"#1948b3","$body-background-color":"#ffffff","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3"},bootstrap:{"$main-color":"#18a689","$text-color":"#404040;","$text-input-color":"#404040;","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$header-background-color":"#e7e7e7","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#8dd6c7","$progress-buttons-line-color":"#d4d4d4"},bootstrapmaterial:{"$main-color":"#18a689","$text-color":"#404040;","$text-input-color":"#404040;","$progress-text-color":"#9d9d9d","$disable-color":"#dbdbdb","$header-background-color":"#e7e7e7","$disabled-label-color":"rgba(64, 64, 64, 0.5)","$slider-color":"white","$disabled-switch-color":"#9f9f9f","$disabled-slider-color":"#cfcfcf","$body-background-color":"#ffffff","$foreground-light":"#909090","$foreground-disabled":"#161616","$background-dim":"#f3f3f3","$progress-buttons-color":"#8dd6c7","$progress-buttons-line-color":"#d4d4d4"}},e.ThemeCss={".sv_default_css":"background-color: $body-container-background-color;",".sv_default_css hr":"border-color: $border-color;",".sv_default_css input[type='button'], .sv_default_css button":"color: $body-background-color; background-color: $main-color;",".sv_default_css input[type='button']:hover, .sv_default_css button:hover":"background-color: $main-hover-color;",".sv_default_css .sv_header":"color: $header-color;",".sv_default_css .sv_custom_header":"background-color: $header-background-color;",".sv_default_css .sv_container":"color: $text-color;",".sv_default_css .sv_body":"background-color: $body-background-color; border-color: $main-color;",".sv_default_css .sv_progress":"background-color: $border-color;",".sv_default_css .sv_progress_bar":"background-color: $main-color;",".sv_default_css .sv_progress-buttons__list li:before":"border-color: $progress-buttons-color; background-color: $progress-buttons-color;",".sv_default_css .sv_progress-buttons__list li:after":"background-color: $progress-buttons-line-color;",".sv_default_css .sv_progress-buttons__list .sv_progress-buttons__page-title":"color: $text-color;",".sv_default_css .sv_progress-buttons__list .sv_progress-buttons__page-description":"color: $text-color;",".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before":"border-color: $main-color; background-color: $main-color;",".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after":"background-color: $progress-buttons-color",".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_default_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_default_css .sv_p_root > .sv_row":"border-color: $border-color;",".sv_default_css .sv_p_root > .sv_row:nth-child(odd)":"background-color: $body-background-color;",".sv_default_css .sv_p_root > .sv_row:nth-child(even)":"background-color: $body-container-background-color;",".sv_default_css .sv_q_other input":"color: $text-color; -webkit-text-fill-color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",".sv_default_css .sv_q_text_root":"color: $text-color; -webkit-text-fill-color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",".sv_default_css .sv_q_dropdown_control":"color: $text-input-color; border-color: $border-color; background-color: $inputs-background-color;",".sv_default_css input[type='text']":"color: $text-color; -webkit-text-fill-color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",".sv_default_css select":"color: $text-color; border-color: $border-color; background-color: $inputs-background-color;",".sv_default_css textarea":"color: $text-input-color; -webkit-text-fill-color: $text-input-color; border-color: $border-color; background-color: $inputs-background-color;",".sv_default_css input:not([type='button']):not([type='reset']):not([type='submit']):not([type='image']):not([type='checkbox']):not([type='radio'])":"border: 1px solid $border-color; background-color: $inputs-background-color;color: $text-input-color; -webkit-text-fill-color: $text-input-color;",".sv_default_css input:not([type='button']):not([type='reset']):not([type='submit']):not([type='image']):not([type='checkbox']):not([type='radio']):focus":"border: 1px solid $main-color;",".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_select_wrapper .sv_q_dropdown_control":"background-color: $inputs-background-color;",".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_select_wrapper .sv_q_dropdown_control:focus-within":"border: 1px solid rgb(26, 179, 148);",".sv_default_css .sv_q_other input:focus":"border-color: $main-color;",".sv_default_css .sv_q_text_root:focus":"border-color: $main-color;",".sv_default_css .sv_q_dropdown_control:focus":"border-color: $main-color;",".sv_default_css .sv_container .sv_body .sv_p_root .sv_q .sv_q_dropdown_control .sv_q_dropdown__value .sv_q_dropdown__filter-string-input[type=text]":"border: none; outline: none; padding: 0px; width: auto; display: flex; flex-grow: 1;  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block;",".sv_default_css input[type='text']:focus":"border-color: $main-color;",'.sv_default_css .sv_container .sv_body .sv_p_root .sv_q input[type="radio"]:focus, .sv_default_css .sv_container .sv_body .sv_p_root .sv_q input[type="checkbox"]:focus':"outline: 1px dotted $main-color;",".sv_default_css select:focus":"border-color: $main-color;",".sv_default_css textarea:focus":"border-color: $main-color;",".sv_default_css .sv_q_input.sv_q_input.sv_q_input.sv_q_tagbox.sv_q_tagbox.sv_q_tagbox:not(.sv_q_tagbox--empty)":"height: auto;",".sv_default_css .sv_select_wrapper.sv_q_tagbox_wrapper::before":"height: 100%; padding: 0 1em;",".sv_default_css .sv_select_wrapper":"background-color: $body-background-color;",".sv_default_css .sv_select_wrapper::before":"background-color: $main-color;",".sv_default_css .sv_q_rating_item.active .sv_q_rating_item_text":"background-color: $main-hover-color; border-color: $main-hover-color; color: $body-background-color;",".sv_default_css .sv_q_rating_item .sv_q_rating_item_text":"border-color: $border-color;",".sv_default_css .sv_q_rating_item .sv_q_rating_item_text:hover":"border-color: $main-hover-color;",".sv_default_css table.sv_q_matrix tr":"border-color: $border-color;",".sv_default_css table.sv_q_matrix_dropdown tr":"border-color: $border-color;",".sv_default_css table.sv_q_matrix_dynamic tr":"border-color: $border-color;",".sv_default_css .sv_q_m_cell_selected":"color: $body-background-color; background-color: $main-hover-color;",".sv_main .sv_q_file_remove:hover":"color: $main-color;",".sv_main .sv_q_file_choose_button":"color: $body-background-color; background-color: $main-color;",".sv_main .sv_q_file_choose_button:hover":"background-color: $main-hover-color;",".sv_main .sv_q_imgsel.checked label>div":"background-color: $main-color",".sv_default_css .sv_p_description":"padding-left: 1.29em;",".sv_main .sv-progress":"background-color: $header-background-color;",".sv_main .sv-progress__bar":"background-color: $main-color;",".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled":"fill: $disable-color;",".sv_main .sv-paneldynamic__progress-text":"color: $progress-text-color;",".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn":"fill: $text-color",".sv_main .sv-boolean__switch":"background-color: $main-color; outline-color: $main-color",".sv_main .sv-boolean__slider":"background-color: $slider-color;",".sv_main .sv-boolean__label--disabled":"color: $disabled-label-color;",".sv_main .sv-boolean--disabled .sv-boolean__switch":"background-color: $disabled-switch-color;",".sv_main .sv-boolean--disabled .sv-boolean__slider":"background-color: $disabled-slider-color;",".sv_main .sjs_sp_container":"border: 1px dashed $disable-color;",".sv_main .sjs_sp_placeholder":"color: $foreground-light;",".sv_main .sv_matrix_detail_row":"background-color: #ededed; border-top: 1px solid $header-background-color; border-bottom: 1px solid $header-background-color;",".sv_main .sv-action-bar-item":"color: $text-color;",".sv_main .sv-action-bar-item__icon use":"fill: $foreground-light;",".sv_main .sv-action-bar-item:hover":"background-color: $background-dim;",".sv_main .sv-button-group__item--hover:hover":"background-color: $background-dim;",".sv_main .sv-button-group__item-icon use":"fill: $foreground-light;",".sv_main .sv-button-group__item--selected":"color: $main-color;",".sv_main .sv-button-group__item--selected .sv-button-group__item-icon use":"fill: $main-color;",".sv_main .sv-button-group__item--disabled":"color: $foreground-disabled;",".sv_main .sv-button-group__item--disabled .sv-button-group__item-icon use":"fill: $foreground-disabled;",".sv_main .sv-button-group__item":"background: $body-background-color; border-color: $border-color;",".sv_main .sv_qstn textarea":"max-width: 100%","body .sv-list__input":"color: $text-input-color; border-color: $border-color; background-color: $inputs-background-color;","body .sv-list__input::placeholder":"color: $foreground-light;","body .sv-list__input:disabled":"color: $foreground-disabled;","body .sv-list__input:disabled::placeholder":"color: $foreground-disabled;","body .sv-list__item--selected":"background: rgba(25, 179, 148, 0.1); color: $foreground-disabled","body .sv-list__item--selected.sv-list__item--focused":"background-color: $main-color; color: $inputs-background-color;","body .sv-list__item--selected:focus":"background-color: $main-color; color: $inputs-background-color;","body .sv-list__item--selected:hover":"background-color: $main-color; color: $inputs-background-color;",".sv-skeleton-element":"background-color: $background-dim;",".sv_main .sv-ranking-item:focus .sv-ranking-item__index":"border: 2px solid $main-color;",".sv_main .sv-ranking-item__icon":"fill: $main-color;","body .sv-ranking-shortcut .sv-ranking-item__icon":"fill: $main-color;"},e.modernThemeCss={".sv-boolean__switch":"background-color: $main-color;",".sv-boolean__slider":"background-color: $slider-color;",".sv-boolean__label--disabled":"color: $disabled-label-color;",".sv-boolean--disabled .sv-boolean__switch":"background-color: $disabled-switch-color;",".sv-boolean--disabled .sv-boolean__slider":"background-color: $disabled-slider-color;",".sv-btn":"color: $button-text-color;",".sv-btn--navigation":"background-color: $main-color",".sv-checkbox__svg":"border-color: $border-color; fill: transparent;",".sv-checkbox--allowhover:hover .sv-checkbox__svg":"background-color: $main-hover-color; fill: $checkmark-color;",".sv-checkbox--checked .sv-checkbox__svg":"background-color: $main-color; fill: $checkmark-color;",".sv-checkbox--checked.sv-checkbox--disabled .sv-checkbox__svg":"background-color: $disable-color; fill: $checkmark-color;",".sv-checkbox--disabled .sv-checkbox__svg":"border-color: $disable-color;",".sv-comment":"border-color: $text-border-color; max-width: 100%;",".sv-comment:focus":"border-color: $main-color;",".sv-completedpage":"color: $text-color; background-color: $body-container-background-color;",".sv-container-modern":"color: $text-color;",".sv-container-modern__title":"color: $main-color;",".sv-description":"color: $disabled-text-color;",".sv-dropdown":"border-bottom: 0.06em solid $text-border-color;",".sv-dropdown:focus":"border-color: $dropdown-border-color;",".sv-dropdown--error":"border-color: $error-color; color: $error-color;",".sv-dropdown--error::placeholder":"color: $error-color;",".sv-dropdown--error::-ms-input-placeholder":"color: $error-color;",".sv-tagbox":"border-bottom: 0.06em solid $text-border-color;",".sv-tagbox:focus":"border-color: $dropdown-border-color;",".sv-tagbox--error":"border-color: $error-color; color: $error-color;",".sv-tagbox--error::placeholder":"color: $error-color;",".sv-tagbox--error::-ms-input-placeholder":"color: $error-color;",".sv-file__decorator":"background-color: $body-container-background-color;",".sv-file__clean-btn":"background-color: $remove-button-color;",".sv-file__choose-btn:not(.sv-file__choose-btn--disabled)":"background-color: $add-button-color;",".sv-file__choose-btn--disabled":"background-color: $disable-color;",".sv-file__remove-svg":"fill: #ff1800;",".sv-file__sign a":"color: $text-color;",".sv-imagepicker__item--allowhover:hover .sv-imagepicker__image":"background-color: $main-hover-color; border-color: $main-hover-color;",".sv-imagepicker__item--checked .sv-imagepicker__image":"background-color: $main-color; border-color: $main-color;",".sv-imagepicker__item--disabled.sv-imagepicker__item--checked .sv-imagepicker__image":"background-color: $disable-color; border-color: $disable-color;",".sv-item__control:focus + .sv-item__decorator":"border-color: $main-color;",".sv-matrix__text--checked":"color: $matrix-text-checked-color; background-color: $main-color;",".sv-matrix__text--disabled.sv-matrix__text--checked":"background-color: $disable-color;",".sv-matrixdynamic__add-btn":"background-color: $add-button-color;",".sv-matrixdynamic__remove-btn":"background-color: $remove-button-color;",".sv-paneldynamic__add-btn":"background-color: $add-button-color;",".sv-paneldynamic__remove-btn":"background-color: $remove-button-color;",".sv-paneldynamic__prev-btn":"fill: $text-color;",".sv-paneldynamic__next-btn":"fill: $text-color;",".sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled":"fill: $disable-color;",".sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled":"fill: $disable-color;",".sv-paneldynamic__progress-text":"color: $progress-text-color;",".sv-progress":"background-color: $header-background-color;",".sv-progress__bar":"background-color: $main-color;",".sv-progress__text":"color: $progress-text-color;",".sv_progress-buttons__list li:before":"border-color: $progress-buttons-color; background-color: $progress-buttons-color;",".sv_progress-buttons__list li:after":"background-color: $progress-buttons-line-color;",".sv_progress-buttons__list .sv_progress-buttons__page-title":"color: $text-color;",".sv_progress-buttons__list .sv_progress-buttons__page-description":"color: $text-color;",".sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before":"border-color: $main-color; background-color: $main-color;",".sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after":"background-color: $progress-buttons-color",".sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv-question__erbox":"color: $error-color;",".sv-question__title--answer":"background-color: $answer-background-color;",".sv-question__title--error":"background-color: $error-background-color;",".sv-panel__title--error":"background-color: $error-background-color;",".sv-radio__svg":"border-color: $border-color; fill: transparent;",".sv-radio--allowhover:hover .sv-radio__svg":"fill: $border-color;",".sv-radio--checked .sv-radio__svg":"border-color: $radio-checked-color; fill: $radio-checked-color;",".sv-radio--disabled .sv-radio__svg":"border-color: $disable-color;",".sv-radio--disabled.sv-radio--checked .sv-radio__svg":"fill: $disable-color;",".sv-rating":"color: $text-color;",".sv-rating input:focus + .sv-rating__min-text + .sv-rating__item-text, .sv-rating input:focus + .sv-rating__item-text":"outline-color: $main-color;",".sv-rating__item-text":"color: $main-hover-color; border: solid 0.1875em $main-hover-color;",".sv-rating__item-text:hover":"background-color: $main-hover-color; color: $body-background-color;",".sv-rating__item--selected .sv-rating__item-text":"background-color: $main-color; color: $body-background-color; border-color: $main-color;",".sv-rating--disabled .sv-rating__item-text":"color: $disable-color; border-color: $disable-color;",".sv-rating--disabled .sv-rating__item-text:hover":"background-color: transparent;",".sv-rating--disabled .sv-rating__item-text:hover .sv-rating__item--selected .sv-rating__item-text":"background-color: $disable-color; color: $body-background-color;","::-webkit-scrollbar":"background-color: $main-hover-color;","::-webkit-scrollbar-thumb":"background: $main-color;",".sv-selectbase__clear-btn":"background-color: $clean-button-color;",".sv-table":"background-color: rgba($main-hover-color, 0.1);",".sv-text:focus":"border-color: $main-color;",'.sv-text[type="date"]::-webkit-calendar-picker-indicator':"color: transparent; background: transparent;",".sv-text--error":"color: $error-color; border-color: $error-color;",".sv-text--error::placeholder":"color: $error-color;",".sv-text--error::-ms-placeholder":"color: $error-color;",".sv-text--error:-ms-placeholder":"color: $error-color;","input.sv-text, textarea.sv-comment, select.sv-dropdown":"color: $text-input-color; background-color: $inputs-background-color;",".sv-text::placeholder":"color: $text-input-color;",".sv-text::-ms-placeholder":"color: $text-input-color;",".sv-text:-ms-placeholder":"color: $text-input-color;",".sv-table__row--detail":"background-color: $header-background-color;",".sjs_sp_container":"border: 1px dashed $disable-color;",".sjs_sp_placeholder":"color: $foreground-light;",".sv-matrixdynamic__drag-icon":"padding-top:16px",".sv-matrixdynamic__drag-icon:after":"content: ' '; display: block; height: 6px; width: 20px; border: 1px solid $border-color; box-sizing: border-box; border-radius: 10px; cursor: move; margin-top: 12px;",".sv-matrix__drag-drop-ghost-position-top, .sv-matrix__drag-drop-ghost-position-bottom":"position: relative;",".sv-matrix__drag-drop-ghost-position-top::after, .sv-matrix__drag-drop-ghost-position-bottom::after":"content: ''; width: 100%; height: 4px; background-color: var(--primary, #19b394); position: absolute; left: 0;",".sv-matrix__drag-drop-ghost-position-top::after":"top: 0;",".sv-matrix__drag-drop-ghost-position-bottom::after":"bottom: 0;",".sv-skeleton-element":"background-color: $background-dim;",".sv-ranking-item:focus .sv-ranking-item__index":"border: 2px solid $main-color;",".sv-ranking-item__icon":"fill: $main-color;","body .sv-ranking-shortcut .sv-ranking-item__icon":"fill: $main-color;"},e.bootstrapThemeCss={".sv_main .sv_q_imgsel.checked label>div":"background-color: $main-color",".sv_main .sv_p_description":"padding-left: 1.66em;",".sv_main .sv_qstn_error_bottom":"margin-top: 20px; margin-bottom: 0;",".sv_main .progress":"width: 60%;",".sv_main .progress-bar":"width: auto; margin-left: 2px; margin-right: 2px;",".sv_main .table>tbody>tr>td":"min-width: 90px;",".sv_main f-panel .sv_qstn":"padding: 0; vertical-align: middle;",".sv_main .sv_q_image":"display: inline-block;",".sv_main .sv_row .sv_qstn:first-child:last-child":"flex: none !important;",".sv_main .sv_row .sv_p_container:first-child:last-child":"flex: none !important;",".sv_main .sv-progress":"background-color: $header-background-color;",".sv_main .sv-progress__bar":"background-color: $main-color;",".sv_main .sv_progress-buttons__list li:before":"border-color: $progress-buttons-color; background-color: $progress-buttons-color;",".sv_main .sv_progress-buttons__list li:after":"background-color: $progress-buttons-line-color;",".sv_main .sv_progress-buttons__list .sv_progress-buttons__page-title":"color: $text-color;",".sv_main .sv_progress-buttons__list .sv_progress-buttons__page-description":"color: $text-color;",".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before":"border-color: $main-color; background-color: $main-color;",".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after":"background-color: $progress-buttons-color",".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_main .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled":"fill: $disable-color;",".sv_main .sv-paneldynamic__progress-text":"color: $progress-text-color;",".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn":"fill: $text-color",".sv_main .sv-boolean__switch":"background-color: $main-color;",".sv_main .sv-boolean__slider":"background-color: $slider-color;",".sv_main .sv-boolean__label--disabled":"color: $disabled-label-color;",".sv_main .sv-boolean--disabled .sv-boolean__switch":"background-color: $disabled-switch-color;",".sv_main .sv-boolean--disabled  .sv-boolean__slider":"background-color: $disabled-slider-color;",".sv_main .sjs_sp_container":"border: 1px dashed $disable-color;",".sv_main .sjs_sp_placeholder":"color: $foreground-light;",".sv_main .sv_matrix_detail_row":"background-color: #ededed; border-top: 1px solid $header-background-color; border-bottom: 1px solid $header-background-color;",".sv_main .sv-action-bar-item":"color: $text-color;",".sv_main .sv-action-bar-item__icon use":"fill: $foreground-light;",".sv_main .sv-action-bar-item:hover":"background-color: $background-dim;",".sv-skeleton-element":"background-color: $background-dim;"},e.bootstrapmaterialThemeCss={".sv_main.sv_bootstrapmaterial_css .form-group.is-focused .form-control":"linear-gradient(0deg, $main-color 2px, $main-color 0),linear-gradient(0deg, #D2D2D2 1px, transparent 0);",".sv_main.sv_bootstrapmaterial_css .sv_qstn":"margin-bottom: 1rem;",".sv_main.sv_bootstrapmaterial_css .sv_qstn label.sv_q_m_label":"height: 100%;",".sv_main.sv_bootstrapmaterial_css .sv_q_image":"display: inline-block;",".sv_main .sv_row .sv_qstn:first-child:last-child":"flex: none !important;",".sv_main .sv_row .sv_p_container:first-child:last-child":"flex: none !important;",".sv_main.sv_bootstrapmaterial_css .checkbox input[type=checkbox]:checked + .checkbox-material .check":"border-color: $main-color;",".sv_main.sv_bootstrapmaterial_css label.checkbox-inline input[type=checkbox]:checked + .checkbox-material .check":"border-color: $main-color;",".sv_main.sv_bootstrapmaterial_css .checkbox input[type=checkbox]:checked + .checkbox-material .check:before":"color: $main-color;",".sv_main.sv_bootstrapmaterial_css label.checkbox-inline input[type=checkbox]:checked + .checkbox-material .check:before":"color: $main-color;",".sv_main.sv_bootstrapmaterial_css .radio input[type=radio]:checked ~ .circle":"border-color: $main-color;",".sv_main.sv_bootstrapmaterial_css label.radio-inline input[type=radio]:checked ~ .circle":"border-color: $main-color;",".sv_main.sv_bootstrapmaterial_css .radio input[type=radio]:checked ~ .check":"background-color: $main-color;",".sv_main.sv_bootstrapmaterial_css label.radio-inline input[type=radio]:checked ~ .check":"background-color: $main-color;",".sv_main.sv_bootstrapmaterial_css .btn-default.active":"background-color: $main-color; color: $body-background-color;",".sv_main.sv_bootstrapmaterial_css .btn-default:active":"background-color: $main-color; color: $body-background-color;",".sv_main.sv_bootstrapmaterial_css .btn-secondary.active":"background-color: $main-color; color: $body-background-color;",".sv_main.sv_bootstrapmaterial_css .btn-secondary:active":"background-color: $main-color; color: $body-background-color;",".sv_main.sv_bootstrapmaterial_css .open>.dropdown-toggle.btn-default":"background-color: $main-color; color: $body-background-color;",".sv_main.sv_bootstrapmaterial_css input[type='button'].btn-primary, .sv_main.sv_bootstrapmaterial_css button.btn-primary":"color: $body-background-color; background-color: $main-color;",".sv_main.sv_bootstrapmaterial_css input[type='button'].btn-primary:hover, .sv_main.sv_bootstrapmaterial_css button.btn-primary:hover":"background-color: $main-hover-color;",".sv_main .sv_q_imgsel.checked label>div":"background-color: $main-color;",".sv_main.sv_bootstrapmaterial_css .sv_q_file_remove:hover":"color: $main-color;",".sv_main.sv_bootstrapmaterial_css .form-group input[type=file]":"position: relative; opacity: 1;",".sv_main.sv_bootstrapmaterial_css .progress":"width: 60%; height: 1.5em;",".sv_main.sv_bootstrapmaterial_css .progress-bar":"width: auto; margin-left: 2px; margin-right: 2px;",".sv_main .sv-progress":"background-color: $header-background-color;",".sv_main .sv-progress__bar":"background-color: $main-color;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li:before":"border-color: $progress-buttons-color; background-color: $progress-buttons-color;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li:after":"background-color: $progress-buttons-line-color;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list .sv_progress-buttons__page-title":"color: $text-color;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list .sv_progress-buttons__page-description":"color: $text-color;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed:before":"border-color: $main-color; background-color: $main-color;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed + li:after":"background-color: $progress-buttons-color",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_main.sv_bootstrapmaterial_css .sv_progress-buttons__list li.sv_progress-buttons__list-element--passed.sv_progress-buttons__list-element--current:before":"border-color: $main-color; background-color: white;",".sv_main .sv-paneldynamic__prev-btn.sv-paneldynamic__prev-btn--disabled, .sv_main .sv-paneldynamic__next-btn.sv-paneldynamic__next-btn--disabled":"fill: $disable-color;",".sv_main .sv-paneldynamic__progress-text":"color: $progress-text-color;",".sv_main .sv-paneldynamic__prev-btn, .sv_main .sv-paneldynamic__next-btn":"fill: $text-color",".sv_main .sv-boolean .checkbox-decorator":"display: none;",".sv_main .sv-boolean__switch":"background-color: $main-color;",".sv_main .sv-boolean__slider":"background-color: $slider-color;",".sv_main .sv-boolean__label.sv-boolean__label--disabled":"color: $disabled-label-color;",".sv_main .sv-boolean__label":"color: $text-color;",".sv_main .sv-boolean--disabled .sv-boolean__switch":"background-color: $disabled-switch-color;",".sv_main .sv-boolean--disabled  .sv-boolean__slider":"background-color: $disabled-slider-color;",".sv_main .sv_matrix_detail_row":"background-color: #ededed; border-top: 1px solid $header-background-color; border-bottom: 1px solid $header-background-color;",".sv_main .sjs_sp_container":"border: 1px dashed $disable-color;",".sv_main .sjs_sp_placeholder":"color: $foreground-light;",".sv_main .sv-action-bar-item":"color: $text-color;",".sv_main .sv-action-bar-item__icon use":"fill: $foreground-light;",".sv_main .sv-action-bar-item:hover":"background-color: $background-dim;",".sv-skeleton-element":"background-color: $background-dim;"},e.Enabled=!0,e}()},"./src/survey-element.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SurveyElementCore",function(){return p}),n.d(t,"DragTypeOverMeEnum",function(){return i}),n.d(t,"SurveyElement",function(){return f});var r,i,o=n("./src/jsonobject.ts"),a=n("./src/base.ts"),s=n("./src/actions/adaptive-container.ts"),l=n("./src/helpers.ts"),u=n("./src/settings.ts"),c=n("./src/actions/container.ts"),d=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},p=function(e){function t(){var t=e.call(this)||this;return t.createLocTitleProperty(),t}return d(t,e),t.prototype.createLocTitleProperty=function(){return this.createLocalizableString("title",this,!0)},Object.defineProperty(t.prototype,"title",{get:function(){return this.getLocalizableStringText("title",this.getDefaultTitleValue())},set:function(e){this.setLocalizableStringText("title",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locTitle",{get:function(){return this.getLocalizableString("title")},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleValue=function(){},t.prototype.updateDescriptionVisibility=function(e){this.hasDescription=!!e},Object.defineProperty(t.prototype,"locDescription",{get:function(){return this.getLocalizableString("description")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTagName",{get:function(){var e=this.getDefaultTitleTagName(),t=this.getSurvey();return t?t.getElementTitleTagName(this,e):e},enumerable:!1,configurable:!0}),t.prototype.getDefaultTitleTagName=function(){return u.settings.titleTags[this.getType()]},Object.defineProperty(t.prototype,"hasTitle",{get:function(){return this.title.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleActions",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleEvents",{get:function(){return this.hasTitleActions},enumerable:!1,configurable:!0}),t.prototype.getTitleToolbar=function(){return null},t.prototype.getTitleOwner=function(){},Object.defineProperty(t.prototype,"isTitleOwner",{get:function(){return!!this.getTitleOwner()},enumerable:!1,configurable:!0}),t.prototype.toggleState=function(){},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssTitle",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaTitleId",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTabIndex",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaExpanded",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ariaLabel",{get:function(){return this.locTitle.renderedHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaLabel",{get:function(){return this.ariaLabel},enumerable:!1,configurable:!0}),h([Object(o.property)()],t.prototype,"hasDescription",void 0),h([Object(o.property)({localizable:!0,onSet:function(e,t){t.updateDescriptionVisibility(t,e)}})],t.prototype,"description",void 0),t}(a.Base);!function(e){e[e.InsideEmptyPanel=1]="InsideEmptyPanel",e[e.MultilineRight=2]="MultilineRight",e[e.MultilineLeft=3]="MultilineLeft"}(i||(i={}));var f=function(e){function t(n){var r=e.call(this)||this;return r.selectedElementInDesignValue=r,r.disableDesignActions=t.CreateDisabledDesignElements,r.isContentElement=!1,r.isEditableTemplateElement=!1,r.isInteractiveDesignElement=!0,r.isSingleInRow=!0,r.name=n,r.createNewArray("errors"),r.createNewArray("titleActions"),r.registerFunctionOnPropertyValueChanged("isReadOnly",function(){r.onReadOnlyChanged()}),r.registerFunctionOnPropertyValueChanged("errors",function(){r.updateVisibleErrors()}),r.registerFunctionOnPropertyValueChanged("isSingleInRow",function(){r.updateElementCss(!1)}),r}return d(t,e),t.getProgressInfoByElements=function(e,t){for(var n=a.Base.createProgressInfo(),r=0;r<e.length;r++)if(e[r].isVisible){var i=e[r].getProgressInfo();n.questionCount+=i.questionCount,n.answeredQuestionCount+=i.answeredQuestionCount,n.requiredQuestionCount+=i.requiredQuestionCount,n.requiredAnsweredQuestionCount+=i.requiredAnsweredQuestionCount}return t&&n.questionCount>0&&(0==n.requiredQuestionCount&&(n.requiredQuestionCount=1),n.answeredQuestionCount>0&&(n.requiredAnsweredQuestionCount=1)),n},t.ScrollElementToTop=function(e){if(!e||"undefined"==typeof document)return!1;var t=document.getElementById(e);if(!t||!t.scrollIntoView)return!1;var n=t.getBoundingClientRect().top;return n<0&&t.scrollIntoView(),n<0},t.GetFirstNonTextElement=function(e,t){if(void 0===t&&(t=!1),!e||!e.length||0==e.length)return null;if(t){var n=e[0];"#text"===n.nodeName&&(n.data=""),"#text"===(n=e[e.length-1]).nodeName&&(n.data="")}for(var r=0;r<e.length;r++)if("#text"!=e[r].nodeName&&"#comment"!=e[r].nodeName)return e[r];return null},t.FocusElement=function(e){if(!e||"undefined"==typeof document)return!1;var n=t.focusElementCore(e);return n||setTimeout(function(){t.focusElementCore(e)},10),n},t.focusElementCore=function(e){if(!document)return!1;var t=document.getElementById(e);return!(!t||t.disabled||(t.focus(),0))},t.prototype.onPropertyValueChanged=function(t,n,r){e.prototype.onPropertyValueChanged.call(this,t,n,r),"state"===t&&(this.updateElementCss(!1),this.stateChangedCallback&&this.stateChangedCallback())},t.prototype.getSkeletonComponentNameCore=function(){return this.survey?this.survey.getSkeletonComponentName(this):""},Object.defineProperty(t.prototype,"skeletonComponentName",{get:function(){return this.getSkeletonComponentNameCore()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this.getPropertyValue("state")},set:function(e){this.setPropertyValue("state",e),this.notifyStateChanged()},enumerable:!1,configurable:!0}),t.prototype.notifyStateChanged=function(){this.survey&&this.survey.elementContentVisibilityChanged(this)},Object.defineProperty(t.prototype,"isCollapsed",{get:function(){if(!this.isDesignMode)return"collapsed"===this.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isExpanded",{get:function(){return"expanded"===this.state},enumerable:!1,configurable:!0}),t.prototype.collapse=function(){this.isDesignMode||(this.state="collapsed")},t.prototype.expand=function(){this.state="expanded"},t.prototype.toggleState=function(){return this.isCollapsed?(this.expand(),!0):!this.isExpanded||(this.collapse(),!1)},Object.defineProperty(t.prototype,"hasStateButton",{get:function(){return this.isExpanded||this.isCollapsed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shortcutText",{get:function(){return this.title||this.name},enumerable:!1,configurable:!0}),t.prototype.getTitleToolbar=function(){return this.titleToolbarValue||(this.titleToolbarValue=this.createActionContainer(!0),this.titleToolbarValue.containerCss=(this.isPanel?this.cssClasses.panel.titleBar:this.cssClasses.titleBar)||"sv-action-title-bar",this.titleToolbarValue.setItems(this.getTitleActions())),this.titleToolbarValue},t.prototype.createActionContainer=function(e){var t=e?new s.AdaptiveActionContainer:new c.ActionContainer;return this.survey&&this.survey.getCss().actionBar&&(t.cssClasses=this.survey.getCss().actionBar),t},Object.defineProperty(t.prototype,"titleActions",{get:function(){return this.getPropertyValue("titleActions")},enumerable:!1,configurable:!0}),t.prototype.getTitleActions=function(){return this.isTitleActionRequested||(this.updateTitleActions(),this.isTitleActionRequested=!0),this.titleActions},t.prototype.getDefaultTitleActions=function(){return[]},t.prototype.updateTitleActions=function(){var e=this.getDefaultTitleActions();this.survey&&(e=this.survey.getUpdatedElementTitleActions(this,e)),this.setPropertyValue("titleActions",e)},Object.defineProperty(t.prototype,"hasTitleActions",{get:function(){return this.getTitleActions().length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitleEvents",{get:function(){return void 0!==this.state&&"default"!==this.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleTabIndex",{get:function(){return this.isPage||"default"===this.state?void 0:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"titleAriaExpanded",{get:function(){if(!this.isPage&&"default"!==this.state)return"expanded"===this.state},enumerable:!1,configurable:!0}),t.prototype.setSurveyImpl=function(e,t){this.surveyImplValue=e,this.surveyImplValue?(this.surveyDataValue=this.surveyImplValue.getSurveyData(),this.setSurveyCore(this.surveyImplValue.getSurvey()),this.textProcessorValue=this.surveyImplValue.getTextProcessor(),this.onSetData()):this.setSurveyCore(null),this.survey&&this.clearCssClasses()},t.prototype.canRunConditions=function(){return e.prototype.canRunConditions.call(this)&&!!this.data},t.prototype.getDataFilteredValues=function(){return this.data?this.data.getFilteredValues():null},t.prototype.getDataFilteredProperties=function(){var e=this.data?this.data.getFilteredProperties():{};return e.question=this,e},Object.defineProperty(t.prototype,"surveyImpl",{get:function(){return this.surveyImplValue},enumerable:!1,configurable:!0}),t.prototype.__setData=function(e){u.settings.supportCreatorV2&&(this.surveyDataValue=e)},Object.defineProperty(t.prototype,"data",{get:function(){return this.surveyDataValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"survey",{get:function(){return this.getSurvey()},enumerable:!1,configurable:!0}),t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.surveyValue||this.surveyImplValue&&this.setSurveyCore(this.surveyImplValue.getSurvey()),this.surveyValue},t.prototype.setSurveyCore=function(e){this.surveyValue=e,this.surveyChangedCallback&&this.surveyChangedCallback()},Object.defineProperty(t.prototype,"isInternal",{get:function(){return this.isContentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areInvisibleElementsShowing",{get:function(){return!!this.survey&&this.survey.areInvisibleElementsShowing&&!this.isContentElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReadOnly",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){this.readOnly!=e&&(this.setPropertyValue("readOnly",e),this.isLoadingFromJson||this.setPropertyValue("isReadOnly",this.isReadOnly))},enumerable:!1,configurable:!0}),t.prototype.onReadOnlyChanged=function(){this.readOnlyChangedCallback&&this.readOnlyChangedCallback()},Object.defineProperty(t.prototype,"css",{get:function(){return this.survey?this.survey.getCss():{}},enumerable:!1,configurable:!0}),t.prototype.ensureCssClassesValue=function(){this.cssClassesValue||(this.cssClassesValue=this.calcCssClasses(this.css),this.updateElementCssCore(this.cssClassesValue))},Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.survey?(this.ensureCssClassesValue(),this.cssClassesValue):this.calcCssClasses(this.css)},enumerable:!1,configurable:!0}),t.prototype.calcCssClasses=function(e){},t.prototype.updateElementCssCore=function(e){},Object.defineProperty(t.prototype,"cssError",{get:function(){return""},enumerable:!1,configurable:!0}),t.prototype.updateElementCss=function(e){this.clearCssClasses()},t.prototype.clearCssClasses=function(){this.cssClassesValue=void 0},t.prototype.getIsLoadingFromJson=function(){return!!e.prototype.getIsLoadingFromJson.call(this)||!!this.survey&&this.survey.isLoadingFromJson},Object.defineProperty(t.prototype,"name",{get:function(){return this.getPropertyValue("name","")},set:function(e){var t=this.name;this.setPropertyValue("name",this.getValidName(e)),!this.isLoadingFromJson&&t&&this.onNameChanged(t)},enumerable:!1,configurable:!0}),t.prototype.getValidName=function(e){return e},t.prototype.onNameChanged=function(e){},t.prototype.updateBindingValue=function(e,t){this.data&&!this.isTwoValueEquals(t,this.data.getValue(e))&&this.data.setValue(e,t,!1)},Object.defineProperty(t.prototype,"errors",{get:function(){return this.getPropertyValue("errors")},set:function(e){this.setPropertyValue("errors",e)},enumerable:!1,configurable:!0}),t.prototype.updateVisibleErrors=function(){for(var e=0,t=0;t<this.errors.length;t++)this.errors[t].visible&&e++;this.hasVisibleErrors=e>0},Object.defineProperty(t.prototype,"containsErrors",{get:function(){return this.getPropertyValue("containsErrors",!1)},enumerable:!1,configurable:!0}),t.prototype.updateContainsErrors=function(){this.setPropertyValue("containsErrors",this.getContainsErrors())},t.prototype.getContainsErrors=function(){return this.errors.length>0},t.prototype.getElementsInDesign=function(e){return void 0===e&&(e=!1),[]},Object.defineProperty(t.prototype,"selectedElementInDesign",{get:function(){return this.selectedElementInDesignValue},set:function(e){this.selectedElementInDesignValue=e},enumerable:!1,configurable:!0}),t.prototype.updateCustomWidgets=function(){},t.prototype.onSurveyLoad=function(){},t.prototype.onFirstRendering=function(){this.ensureCssClassesValue()},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.survey||this.onSurveyLoad()},t.prototype.setVisibleIndex=function(e){return 0},Object.defineProperty(t.prototype,"isPage",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPanel",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isQuestion",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.delete=function(){},t.prototype.getLocale=function(){return this.survey?this.survey.getLocale():this.locOwner?this.locOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.survey?this.survey.getSurveyMarkdownHtml(this,e,t):this.locOwner?this.locOwner.getMarkdownHtml(e,t):null},t.prototype.getRenderer=function(e){return this.survey&&"function"==typeof this.survey.getRendererForString?this.survey.getRendererForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRenderer?this.locOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.survey&&"function"==typeof this.survey.getRendererContextForString?this.survey.getRendererContextForString(this,e):this.locOwner&&"function"==typeof this.locOwner.getRendererContext?this.locOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.isLoadingFromJson?e:this.textProcessor?this.textProcessor.processText(e,this.getUseDisplayValuesInTitle()):this.locOwner?this.locOwner.getProcessedText(e):e},t.prototype.getUseDisplayValuesInTitle=function(){return!0},t.prototype.removeSelfFromList=function(e){if(e&&Array.isArray(e)){var t=e.indexOf(this);t>-1&&e.splice(t,1)}},Object.defineProperty(t.prototype,"textProcessor",{get:function(){return this.textProcessorValue},enumerable:!1,configurable:!0}),t.prototype.getProcessedHtml=function(e){return e&&this.textProcessor?this.textProcessor.processText(e,!0):e},t.prototype.onSetData=function(){},Object.defineProperty(t.prototype,"parent",{get:function(){return this.getPropertyValue("parent",null)},set:function(e){this.setPropertyValue("parent",e)},enumerable:!1,configurable:!0}),t.prototype.getPage=function(e){for(;e&&e.parent;)e=e.parent;return e&&"page"==e.getType()?e:null},t.prototype.moveToBase=function(e,t,n){if(void 0===n&&(n=null),!t)return!1;e.removeElement(this);var r=-1;return l.Helpers.isNumber(n)&&(r=parseInt(n)),-1==r&&n&&n.getType&&(r=t.indexOf(n)),t.addElement(this,r),!0},t.prototype.setPage=function(e,t){var n=this.getPage(e);"string"==typeof t&&this.getSurvey().pages.forEach(function(e){t===e.name&&(t=e)}),n!==t&&(e&&e.removeElement(this),t&&t.addElement(this,-1))},t.prototype.getSearchableLocKeys=function(e){e.push("title"),e.push("description")},Object.defineProperty(t.prototype,"isDefaultV2Theme",{get:function(){return this.survey&&"sd-root-modern"==this.survey.getCss().root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isErrorsModeTooltip",{get:function(){return this.getIsErrorsModeTooltip()},enumerable:!1,configurable:!0}),t.prototype.getIsErrorsModeTooltip=function(){return this.isDefaultV2Theme&&this.hasParent},Object.defineProperty(t.prototype,"hasParent",{get:function(){return this.parent&&!this.parent.isPage||void 0===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasFrameV2",{get:function(){return!this.hasParent&&this.isDefaultV2Theme&&!this.isDesignMode&&this.isSingleInRow},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.getPropertyValue("width","")},set:function(e){this.setPropertyValue("width",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(e){this.setPropertyValue("minWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxWidth",{get:function(){return this.getPropertyValue("maxWidth")},set:function(e){this.setPropertyValue("maxWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderWidth",{get:function(){return this.getPropertyValue("renderWidth","")},set:function(e){this.setPropertyValue("renderWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indent",{get:function(){return this.getPropertyValue("indent")},set:function(e){this.setPropertyValue("indent",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightIndent",{get:function(){return this.getPropertyValue("rightIndent",0)},set:function(e){this.setPropertyValue("rightIndent",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddingLeft",{get:function(){return this.getPropertyValue("paddingLeft","")},set:function(e){this.setPropertyValue("paddingLeft",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddingRight",{get:function(){return this.getPropertyValue("paddingRight","")},set:function(e){this.setPropertyValue("paddingRight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rootStyle",{get:function(){var e={};return this.allowRootStyle&&this.renderWidth&&(e.flexGrow=1,e.flexShrink=1,e.flexBasis=this.renderWidth,e.minWidth=this.minWidth,e.maxWidth=this.maxWidth),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clickTitleFunction",{get:function(){var e=this;if(this.needClickTitleFunction())return function(){return e.processTitleClick()}},enumerable:!1,configurable:!0}),t.prototype.needClickTitleFunction=function(){return"default"!==this.state},t.prototype.processTitleClick=function(){"default"!==this.state&&this.toggleState()},t.prototype.localeChanged=function(){e.prototype.localeChanged.call(this),this.updateDescriptionVisibility(this.description),this.errors.length>0&&this.errors.forEach(function(e){e.updateText()})},t.CreateDisabledDesignElements=!1,h([Object(o.property)({defaultValue:null})],t.prototype,"dragTypeOverMe",void 0),h([Object(o.property)({defaultValue:!1})],t.prototype,"isDragMe",void 0),h([Object(o.property)()],t.prototype,"cssClassesValue",void 0),h([Object(o.property)({defaultValue:!1})],t.prototype,"hasVisibleErrors",void 0),h([Object(o.property)({defaultValue:!0})],t.prototype,"isSingleInRow",void 0),h([Object(o.property)({defaultValue:!0})],t.prototype,"allowRootStyle",void 0),t}(p)},"./src/survey-error.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SurveyError",function(){return o});var r=n("./src/localizablestring.ts"),i=n("./src/surveyStrings.ts"),o=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this.text=e,this.errorOwner=t,this.visible=!0,this.onUpdateErrorTextCallback=void 0}return e.prototype.equalsTo=function(e){return!(!e||!e.getErrorType)&&this.getErrorType()===e.getErrorType()&&this.text===e.text&&this.visible===e.visible},Object.defineProperty(e.prototype,"locText",{get:function(){return this.locTextValue||(this.locTextValue=new r.LocalizableString(this.errorOwner,!0),this.locTextValue.storeDefaultText=!0,this.locTextValue.text=this.getText()),this.locTextValue},enumerable:!1,configurable:!0}),e.prototype.getText=function(){var e=this.text;return e||(e=this.getDefaultText()),this.errorOwner&&(e=this.errorOwner.getErrorCustomText(e,this)),e},e.prototype.getErrorType=function(){return"base"},e.prototype.getDefaultText=function(){return""},e.prototype.getLocale=function(){return this.errorOwner?this.errorOwner.getLocale():""},e.prototype.getLocalizationString=function(e){return i.surveyLocalization.getString(e,this.getLocale())},e.prototype.updateText=function(){this.onUpdateErrorTextCallback&&this.onUpdateErrorTextCallback(this),this.locText.text=this.getText()},e}()},"./src/survey.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SurveyModel",function(){return P});var r,i=n("./src/helpers.ts"),o=n("./src/jsonobject.ts"),a=n("./src/base.ts"),s=n("./src/survey-element.ts"),l=n("./src/defaultCss/cssstandard.ts"),u=n("./src/textPreProcessor.ts"),c=n("./src/conditionProcessValue.ts"),d=n("./src/dxSurveyService.ts"),h=n("./src/surveyStrings.ts"),p=n("./src/error.ts"),f=n("./src/localizablestring.ts"),m=n("./src/stylesmanager.ts"),g=n("./src/surveyTimerModel.ts"),v=n("./src/conditions.ts"),y=n("./src/settings.ts"),b=n("./src/utils/utils.ts"),_=n("./src/actions/action.ts"),w=n("./src/actions/container.ts"),C=n("./src/utils/cssClassBuilder.ts"),x=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},P=function(e){function t(n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=e.call(this)||this;i.valuesHash={},i.variablesHash={},i.onTriggerExecuted=i.addEvent(),i.onCompleting=i.addEvent(),i.onComplete=i.addEvent(),i.onShowingPreview=i.addEvent(),i.onNavigateToUrl=i.addEvent(),i.onStarted=i.addEvent(),i.onPartialSend=i.addEvent(),i.onCurrentPageChanging=i.addEvent(),i.onCurrentPageChanged=i.addEvent(),i.onValueChanging=i.addEvent(),i.onValueChanged=i.addEvent(),i.onVariableChanged=i.addEvent(),i.onVisibleChanged=i.addEvent(),i.onPageVisibleChanged=i.addEvent(),i.onPanelVisibleChanged=i.addEvent(),i.onQuestionCreated=i.addEvent(),i.onQuestionAdded=i.addEvent(),i.onQuestionRemoved=i.addEvent(),i.onPanelAdded=i.addEvent(),i.onPanelRemoved=i.addEvent(),i.onPageAdded=i.addEvent(),i.onValidateQuestion=i.addEvent(),i.onSettingQuestionErrors=i.addEvent(),i.onServerValidateQuestions=i.addEvent(),i.onValidatePanel=i.addEvent(),i.onErrorCustomText=i.addEvent(),i.onValidatedErrorsOnCurrentPage=i.addEvent(),i.onProcessHtml=i.addEvent(),i.onGetQuestionTitle=i.addEvent(),i.onGetTitleTagName=i.addEvent(),i.onGetQuestionNo=i.addEvent(),i.onProgressText=i.addEvent(),i.onTextMarkdown=i.addEvent(),i.onTextRenderAs=i.addEvent(),i.onSendResult=i.addEvent(),i.onGetResult=i.addEvent(),i.onUploadFiles=i.addEvent(),i.onDownloadFile=i.addEvent(),i.onClearFiles=i.addEvent(),i.onLoadChoicesFromServer=i.addEvent(),i.onLoadedSurveyFromService=i.addEvent(),i.onProcessTextValue=i.addEvent(),i.onUpdateQuestionCssClasses=i.addEvent(),i.onUpdatePanelCssClasses=i.addEvent(),i.onUpdatePageCssClasses=i.addEvent(),i.onUpdateChoiceItemCss=i.addEvent(),i.onAfterRenderSurvey=i.addEvent(),i.onAfterRenderHeader=i.addEvent(),i.onAfterRenderPage=i.addEvent(),i.onAfterRenderQuestion=i.addEvent(),i.onAfterRenderQuestionInput=i.addEvent(),i.onAfterRenderPanel=i.addEvent(),i.onFocusInQuestion=i.addEvent(),i.onFocusInPanel=i.addEvent(),i.onShowingChoiceItem=i.addEvent(),i.onMatrixRowAdded=i.addEvent(),i.onMatrixBeforeRowAdded=i.addEvent(),i.onMatrixRowRemoving=i.addEvent(),i.onMatrixRowRemoved=i.addEvent(),i.onMatrixAllowRemoveRow=i.addEvent(),i.onMatrixCellCreating=i.addEvent(),i.onMatrixCellCreated=i.addEvent(),i.onMatrixAfterCellRender=i.addEvent(),i.onMatrixCellValueChanged=i.addEvent(),i.onMatrixCellValueChanging=i.addEvent(),i.onMatrixCellValidate=i.addEvent(),i.onDynamicPanelAdded=i.addEvent(),i.onDynamicPanelRemoved=i.addEvent(),i.onDynamicPanelRemoving=i.addEvent(),i.onTimer=i.addEvent(),i.onTimerPanelInfoText=i.addEvent(),i.onDynamicPanelItemValueChanged=i.addEvent(),i.onIsAnswerCorrect=i.addEvent(),i.onDragDropAllow=i.addEvent(),i.onScrollingElementToTop=i.addEvent(),i.onLocaleChangedEvent=i.addEvent(),i.onGetQuestionTitleActions=i.addEvent(),i.onGetPanelTitleActions=i.addEvent(),i.onGetPageTitleActions=i.addEvent(),i.onGetMatrixRowActions=i.addEvent(),i.onElementContentVisibilityChanged=i.addEvent(),i.onGetExpressionDisplayValue=i.addEvent(),i.jsonErrors=null,i.cssValue=null,i.hideRequiredErrors=!1,i._isMobile=!1,i._isDesignMode=!1,i.ignoreValidation=!1,i.isNavigationButtonPressed=!1,i.mouseDownPage=null,i.isCalculatingProgressText=!1,i.isFirstPageRendering=!0,i.isCurrentPageRendering=!0,i.isTriggerIsRunning=!1,i.triggerValues=null,i.triggerKeys=null,i.conditionValues=null,i.isValueChangedOnRunningCondition=!1,i.conditionRunnerCounter=0,i.conditionUpdateVisibleIndexes=!1,i.conditionNotifyElementsOnAnyValueOrVariableChanged=!1,i.isEndLoadingFromJson=null,i.questionHashes={names:{},namesInsensitive:{},valueNames:{},valueNamesInsensitive:{}},i.needRenderIcons=!0,i.skeletonComponentName="sv-skeleton","undefined"!=typeof document&&(t.stylesManager=new m.StylesManager);var o=function(e){return"<h3>"+e+"</h3>"};return i.createHtmlLocString("completedHtml","completingSurvey",o),i.createHtmlLocString("completedBeforeHtml","completingSurveyBefore",o),i.createHtmlLocString("loadingHtml","loadingSurvey",o),i.createLocalizableString("logo",i,!1),i.createLocalizableString("startSurveyText",i,!1,!0),i.createLocalizableString("pagePrevText",i,!1,!0),i.createLocalizableString("pageNextText",i,!1,!0),i.createLocalizableString("completeText",i,!1,!0),i.createLocalizableString("previewText",i,!1,!0),i.createLocalizableString("editText",i,!1,!0),i.createLocalizableString("questionTitleTemplate",i,!0),i.textPreProcessor=new u.TextPreProcessor,i.textPreProcessor.onProcess=function(e){i.getProcessedTextValue(e)},i.timerModelValue=new g.SurveyTimerModel(i),i.timerModelValue.onTimer=function(e){i.doTimer(e)},i.createNewArray("pages",function(e){i.doOnPageAdded(e)},function(e){i.doOnPageRemoved(e)}),i.createNewArray("triggers",function(e){e.setOwner(i)}),i.createNewArray("calculatedValues",function(e){e.setOwner(i)}),i.createNewArray("completedHtmlOnCondition",function(e){e.locOwner=i}),i.createNewArray("navigateToUrlOnCondition",function(e){e.locOwner=i}),i.registerFunctionOnPropertyValueChanged("locale",function(){i.onSurveyLocaleChanged()}),i.registerFunctionOnPropertyValueChanged("firstPageIsStarted",function(){i.onFirstPageIsStartedChanged()}),i.registerFunctionOnPropertyValueChanged("mode",function(){i.onModeChanged()}),i.registerFunctionOnPropertyValueChanged("progressBarType",function(){i.updateProgressText()}),i.registerFunctionOnPropertiesValueChanged(["questionStartIndex","requiredText","questionTitlePattern"],function(){i.resetVisibleIndexes()}),i.registerFunctionOnPropertiesValueChanged(["isLoading","isCompleted","isCompletedBefore","mode","isStartedState","currentPage"],function(){i.updateState()}),i.registerFunctionOnPropertiesValueChanged(["state","currentPage","showPreviewBeforeComplete"],function(){i.onStateAndCurrentPageChanged()}),i.onGetQuestionNo.onCallbacksChanged=function(){i.resetVisibleIndexes()},i.onProgressText.onCallbacksChanged=function(){i.updateProgressText()},i.onTextMarkdown.onCallbacksChanged=function(){i.locStrsChanged()},i.onProcessHtml.onCallbacksChanged=function(){i.locStrsChanged()},i.onGetQuestionTitle.onCallbacksChanged=function(){i.locStrsChanged()},i.onUpdatePageCssClasses.onCallbacksChanged=function(){i.currentPage&&i.currentPage.updateElementCss()},i.onUpdatePanelCssClasses.onCallbacksChanged=function(){i.currentPage&&i.currentPage.updateElementCss()},i.onUpdateQuestionCssClasses.onCallbacksChanged=function(){i.currentPage&&i.currentPage.updateElementCss()},i.onShowingChoiceItem.onCallbacksChanged=function(){i.rebuildQuestionChoices()},i.navigationBarValue=i.createNavigationBar(),i.navigationBar.locOwner=i,i.onBeforeCreating(),n&&(("string"==typeof n||n instanceof String)&&(n=JSON.parse(n)),n&&n.clientId&&(i.clientId=n.clientId),i.fromJSON(n),i.surveyId&&i.loadSurveyFromService(i.surveyId,i.clientId)),i.onCreating(),r&&i.render(r),i.updateCss(),i.calculatedWidthMode=new a.ComputedUpdater(function(){return i.calculateWidthMode()}),i}return x(t,e),Object.defineProperty(t,"cssType",{get:function(){return l.surveyCss.currentType},set:function(e){m.StylesManager.applyTheme(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"platformName",{get:function(){return t.platform},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"commentPrefix",{get:function(){return y.settings.commentPrefix},set:function(e){y.settings.commentPrefix=e},enumerable:!1,configurable:!0}),t.prototype.createHtmlLocString=function(e,t,n){this.createLocalizableString(e,this,!1,t).onGetLocalizationTextCallback=n},t.prototype.getType=function(){return"survey"},t.prototype.onPropertyValueChanged=function(e,t,n){"questionsOnPageMode"===e&&this.onQuestionsOnPageModeChanged(t)},Object.defineProperty(t.prototype,"pages",{get:function(){return this.getPropertyValue("pages")},enumerable:!1,configurable:!0}),t.prototype.render=function(e){void 0===e&&(e=null),this.renderCallback&&this.renderCallback()},t.prototype.updateSurvey=function(e,t){var n=function(){if("model"==i||"children"==i)return"continue";if(0==i.indexOf("on")&&r[i]&&r[i].add){var t=e[i];r[i].add(function(e,n){t(e,n)})}else r[i]=e[i]},r=this;for(var i in e)n();e&&e.data&&this.onValueChanged.add(function(t,n){e.data[n.name]=n.value})},t.prototype.getCss=function(){return this.css},t.prototype.updateCompletedPageCss=function(){this.containerCss=this.css.container,this.completedCss=(new C.CssClassBuilder).append(this.css.body).append(this.css.completedPage).toString()},t.prototype.updateCss=function(){this.rootCss=this.getRootCss(),this.updateNavigationCss(),this.updateCompletedPageCss()},Object.defineProperty(t.prototype,"css",{get:function(){return this.cssValue||(this.cssValue={},this.copyCssClasses(this.cssValue,l.surveyCss.getCss())),this.cssValue},set:function(e){this.setCss(e)},enumerable:!1,configurable:!0}),t.prototype.setCss=function(e,t){void 0===t&&(t=!0),t?this.mergeValues(e,this.css):this.cssValue=e,this.updateCss(),this.updateElementCss(!1)},Object.defineProperty(t.prototype,"cssTitle",{get:function(){return this.css.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssNavigationComplete",{get:function(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.complete)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssNavigationPreview",{get:function(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.preview)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssNavigationEdit",{get:function(){return this.getNavigationCss(this.css.navigationButton,this.css.navigation.edit)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssNavigationPrev",{get:function(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.prev)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssNavigationStart",{get:function(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.start)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssNavigationNext",{get:function(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.next)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cssSurveyNavigationButton",{get:function(){return(new C.CssClassBuilder).append(this.css.navigationButton).append(this.css.bodyNavigationButton).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodyCss",{get:function(){return(new C.CssClassBuilder).append(this.css.body).append(this.css.body+"--"+this.calculatedWidthMode).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completedStateCss",{get:function(){return this.getPropertyValue("completedStateCss","")},enumerable:!1,configurable:!0}),t.prototype.getCompletedStateCss=function(){return(new C.CssClassBuilder).append(this.css.saveData[this.completedState],""!==this.completedState).toString()},t.prototype.getNavigationCss=function(e,t){return(new C.CssClassBuilder).append(e).append(t).toString()},Object.defineProperty(t.prototype,"lazyRendering",{get:function(){return!0===this.lazyRenderingValue},set:function(e){if(this.lazyRendering!==e){this.lazyRenderingValue=e;var t=this.currentPage;t&&t.updateRows()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLazyRendering",{get:function(){return this.lazyRendering||y.settings.lazyRowsRendering},enumerable:!1,configurable:!0}),t.prototype.updateLazyRenderingRowsOnRemovingElements=function(){if(this.isLazyRendering){var e=this.currentPage;e&&Object(b.scrollElementByChildId)(e.id)}},Object.defineProperty(t.prototype,"triggers",{get:function(){return this.getPropertyValue("triggers")},set:function(e){this.setPropertyValue("triggers",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calculatedValues",{get:function(){return this.getPropertyValue("calculatedValues")},set:function(e){this.setPropertyValue("calculatedValues",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyId",{get:function(){return this.getPropertyValue("surveyId","")},set:function(e){this.setPropertyValue("surveyId",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyPostId",{get:function(){return this.getPropertyValue("surveyPostId","")},set:function(e){this.setPropertyValue("surveyPostId",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientId",{get:function(){return this.getPropertyValue("clientId","")},set:function(e){this.setPropertyValue("clientId",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cookieName",{get:function(){return this.getPropertyValue("cookieName","")},set:function(e){this.setPropertyValue("cookieName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sendResultOnPageNext",{get:function(){return this.getPropertyValue("sendResultOnPageNext",!1)},set:function(e){this.setPropertyValue("sendResultOnPageNext",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"surveyShowDataSaving",{get:function(){return this.getPropertyValue("surveyShowDataSaving",!1)},set:function(e){this.setPropertyValue("surveyShowDataSaving",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focusFirstQuestionAutomatic",{get:function(){return this.getPropertyValue("focusFirstQuestionAutomatic")},set:function(e){this.setPropertyValue("focusFirstQuestionAutomatic",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focusOnFirstError",{get:function(){return this.getPropertyValue("focusOnFirstError")},set:function(e){this.setPropertyValue("focusOnFirstError",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showNavigationButtons",{get:function(){return this.getPropertyValue("showNavigationButtons")},set:function(e){!0!==e&&void 0!==e||(e="bottom"),!1===e&&(e="none"),this.setPropertyValue("showNavigationButtons",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPrevButton",{get:function(){return this.getPropertyValue("showPrevButton")},set:function(e){this.setPropertyValue("showPrevButton",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showTitle",{get:function(){return this.getPropertyValue("showTitle")},set:function(e){this.setPropertyValue("showTitle",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPageTitles",{get:function(){return this.getPropertyValue("showPageTitles")},set:function(e){this.setPropertyValue("showPageTitles",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCompletedPage",{get:function(){return this.getPropertyValue("showCompletedPage")},set:function(e){this.setPropertyValue("showCompletedPage",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"navigateToUrl",{get:function(){return this.getPropertyValue("navigateToUrl")},set:function(e){this.setPropertyValue("navigateToUrl",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"navigateToUrlOnCondition",{get:function(){return this.getPropertyValue("navigateToUrlOnCondition")},set:function(e){this.setPropertyValue("navigateToUrlOnCondition",e)},enumerable:!1,configurable:!0}),t.prototype.getNavigateToUrl=function(){var e=this.getExpressionItemOnRunCondition(this.navigateToUrlOnCondition),t=e?e.url:this.navigateToUrl;return t&&(t=this.processText(t,!0)),t},t.prototype.navigateTo=function(){var e={url:this.getNavigateToUrl()};this.onNavigateToUrl.fire(this,e),e.url&&"undefined"!=typeof window&&window.location&&(window.location.href=e.url)},Object.defineProperty(t.prototype,"requiredText",{get:function(){return this.getPropertyValue("requiredText","*")},set:function(e){this.setPropertyValue("requiredText",e)},enumerable:!1,configurable:!0}),t.prototype.beforeSettingQuestionErrors=function(e,t){this.maakeRequiredErrorsInvisibgle(t),this.onSettingQuestionErrors.fire(this,{question:e,errors:t})},t.prototype.beforeSettingPanelErrors=function(e,t){this.maakeRequiredErrorsInvisibgle(t)},t.prototype.maakeRequiredErrorsInvisibgle=function(e){if(this.hideRequiredErrors)for(var t=0;t<e.length;t++){var n=e[t].getErrorType();"required"!=n&&"requireoneanswer"!=n||(e[t].visible=!1)}},Object.defineProperty(t.prototype,"questionStartIndex",{get:function(){return this.getPropertyValue("questionStartIndex","")},set:function(e){this.setPropertyValue("questionStartIndex",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storeOthersAsComment",{get:function(){return this.getPropertyValue("storeOthersAsComment")},set:function(e){this.setPropertyValue("storeOthersAsComment",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxTextLength",{get:function(){return this.getPropertyValue("maxTextLength")},set:function(e){this.setPropertyValue("maxTextLength",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxOthersLength",{get:function(){return this.getPropertyValue("maxOthersLength")},set:function(e){this.setPropertyValue("maxOthersLength",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"goNextPageAutomatic",{get:function(){return this.getPropertyValue("goNextPageAutomatic",!1)},set:function(e){this.setPropertyValue("goNextPageAutomatic",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowCompleteSurveyAutomatic",{get:function(){return this.getPropertyValue("allowCompleteSurveyAutomatic",!0)},set:function(e){this.setPropertyValue("allowCompleteSurveyAutomatic",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"checkErrorsMode",{get:function(){return this.getPropertyValue("checkErrorsMode")},set:function(e){this.setPropertyValue("checkErrorsMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoGrowComment",{get:function(){return this.getPropertyValue("autoGrowComment")},set:function(e){this.setPropertyValue("autoGrowComment",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textUpdateMode",{get:function(){return this.getPropertyValue("textUpdateMode")},set:function(e){this.setPropertyValue("textUpdateMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearInvisibleValues",{get:function(){return this.getPropertyValue("clearInvisibleValues")},set:function(e){!0===e&&(e="onComplete"),!1===e&&(e="none"),this.setPropertyValue("clearInvisibleValues",e)},enumerable:!1,configurable:!0}),t.prototype.clearIncorrectValues=function(e){void 0===e&&(e=!1);for(var t=0;t<this.pages.length;t++)this.pages[t].clearIncorrectValues();if(e){var n=this.data,r=!1;for(var i in n)if(!this.getQuestionByValueName(i)&&!this.iscorrectValueWithPostPrefix(i,y.settings.commentPrefix)&&!this.iscorrectValueWithPostPrefix(i,y.settings.matrixTotalValuePostFix)){var o=this.getCalculatedValueByName(i);o&&o.includeIntoResult||(r=!0,delete n[i])}r&&(this.data=n)}},t.prototype.iscorrectValueWithPostPrefix=function(e,t){return e.indexOf(t)===e.length-t.length&&!!this.getQuestionByValueName(e.substring(0,e.indexOf(t)))},Object.defineProperty(t.prototype,"locale",{get:function(){return this.getPropertyValue("locale",h.surveyLocalization.currentLocale)},set:function(e){e!==h.surveyLocalization.defaultLocale||h.surveyLocalization.currentLocale||(e=""),this.setPropertyValue("locale",e)},enumerable:!1,configurable:!0}),t.prototype.onSurveyLocaleChanged=function(){this.notifyElementsOnAnyValueOrVariableChanged("locale"),this.localeChanged(),this.onLocaleChangedEvent.fire(this,this.locale)},t.prototype.getUsedLocales=function(){var e=new Array;this.addUsedLocales(e);var t=e.indexOf("default");if(t>-1){var n=h.surveyLocalization.defaultLocale,r=e.indexOf(n);r>-1&&e.splice(r,1),t=e.indexOf("default"),e[t]=n}return e},t.prototype.localeChanged=function(){for(var e=0;e<this.pages.length;e++)this.pages[e].localeChanged()},t.prototype.getLocale=function(){return this.locale},t.prototype.locStrsChanged=function(){if(e.prototype.locStrsChanged.call(this),this.currentPage){this.updateProgressText();var t=this.activePage;t&&t.locStrsChanged();for(var n=this.visiblePages,r=0;r<n.length;r++)n[r].navigationLocStrChanged();this.navigationBar.locStrsChanged()}},t.prototype.getMarkdownHtml=function(e,t){return this.getSurveyMarkdownHtml(this,e,t)},t.prototype.getRenderer=function(e){return this.getRendererForString(this,e)},t.prototype.getRendererContext=function(e){return this.getRendererContextForString(this,e)},t.prototype.getRendererForString=function(e,t){var n={element:e,name:t,renderAs:this.getBuiltInRendererForString(e,t)};return this.onTextRenderAs.fire(this,n),n.renderAs},t.prototype.getRendererContextForString=function(e,t){return t},t.prototype.getExpressionDisplayValue=function(e,t,n){var r={question:e,value:t,displayValue:n};return this.onGetExpressionDisplayValue.fire(this,r),r.displayValue},t.prototype.getBuiltInRendererForString=function(e,t){if(this.isDesignMode)return f.LocalizableString.editableRenderer},t.prototype.getProcessedText=function(e){return this.processText(e,!0)},t.prototype.getLocString=function(e){return this.getLocalizationString(e)},t.prototype.getErrorCustomText=function(e,t){return this.getSurveyErrorCustomText(this,e,t)},t.prototype.getSurveyErrorCustomText=function(e,t,n){var r={text:t,name:n.getErrorType(),obj:e,error:n};return this.onErrorCustomText.fire(this,r),r.text},Object.defineProperty(t.prototype,"emptySurveyText",{get:function(){return this.getLocalizationString("emptySurvey")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logo",{get:function(){return this.getLocalizableStringText("logo")},set:function(e){this.setLocalizableStringText("logo",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locLogo",{get:function(){return this.getLocalizableString("logo")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logoWidth",{get:function(){var e=this.getPropertyValue("logoWidth");return Object(b.getSize)(e)},set:function(e){this.setPropertyValue("logoWidth",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logoHeight",{get:function(){var e=this.getPropertyValue("logoHeight");return Object(b.getSize)(e)},set:function(e){this.setPropertyValue("logoHeight",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logoPosition",{get:function(){return this.getPropertyValue("logoPosition")},set:function(e){this.setPropertyValue("logoPosition",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasLogo",{get:function(){return!!this.logo&&"none"!==this.logoPosition},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogoBefore",{get:function(){return!this.isDesignMode&&this.renderedHasLogo&&("left"===this.logoPosition||"top"===this.logoPosition)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogoAfter",{get:function(){return this.isDesignMode?this.renderedHasLogo:this.renderedHasLogo&&("right"===this.logoPosition||"bottom"===this.logoPosition)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logoClassNames",{get:function(){return(new C.CssClassBuilder).append(this.css.logo).append({left:"sv-logo--left",right:"sv-logo--right",top:"sv-logo--top",bottom:"sv-logo--bottom"}[this.logoPosition]).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedHasTitle",{get:function(){return this.isDesignMode?this.isPropertyVisible("title"):!this.locTitle.isEmpty&&this.showTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedHasDescription",{get:function(){return this.isDesignMode?this.isPropertyVisible("description"):!!this.hasDescription},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTitle",{get:function(){return this.renderedHasTitle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedHasLogo",{get:function(){return this.isDesignMode?this.isPropertyVisible("logo"):this.hasLogo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedHasHeader",{get:function(){return this.renderedHasTitle||this.renderedHasLogo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logoFit",{get:function(){return this.getPropertyValue("logoFit")},set:function(e){this.setPropertyValue("logoFit",e)},enumerable:!1,configurable:!0}),t.prototype.setIsMobile=function(e){void 0===e&&(e=!0),this.isMobile!==e&&(this._isMobile=e,this.updateCss(),this.getAllQuestions().map(function(t){return t.isMobile=e}))},Object.defineProperty(t.prototype,"isMobile",{get:function(){return this._isMobile},enumerable:!1,configurable:!0}),t.prototype.isLogoImageChoosen=function(){return this.locLogo.renderedHtml},Object.defineProperty(t.prototype,"titleMaxWidth",{get:function(){return Object(b.isMobile)()||this.isMobile||this.isValueEmpty(this.isLogoImageChoosen())||y.settings.supportCreatorV2||"left"!==this.logoPosition&&"right"!==this.logoPosition?"":"calc(100% - 5px - 2em - "+this.logoWidth+")"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completedHtml",{get:function(){return this.getLocalizableStringText("completedHtml")},set:function(e){this.setLocalizableStringText("completedHtml",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locCompletedHtml",{get:function(){return this.getLocalizableString("completedHtml")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completedHtmlOnCondition",{get:function(){return this.getPropertyValue("completedHtmlOnCondition")},set:function(e){this.setPropertyValue("completedHtmlOnCondition",e)},enumerable:!1,configurable:!0}),t.prototype.runExpression=function(e){if(!e)return null;var t=this.getFilteredValues(),n=this.getFilteredProperties();return new v.ExpressionRunner(e).run(t,n)},t.prototype.runCondition=function(e){if(!e)return!1;var t=this.getFilteredValues(),n=this.getFilteredProperties();return new v.ConditionRunner(e).run(t,n)},t.prototype.runTriggers=function(){this.checkTriggers(this.getFilteredValues(),!1)},Object.defineProperty(t.prototype,"renderedCompletedHtml",{get:function(){var e=this.getExpressionItemOnRunCondition(this.completedHtmlOnCondition);return e?e.html:this.completedHtml},enumerable:!1,configurable:!0}),t.prototype.getExpressionItemOnRunCondition=function(e){if(0==e.length)return null;for(var t=this.getFilteredValues(),n=this.getFilteredProperties(),r=0;r<e.length;r++)if(e[r].runCondition(t,n))return e[r];return null},Object.defineProperty(t.prototype,"completedBeforeHtml",{get:function(){return this.getLocalizableStringText("completedBeforeHtml")},set:function(e){this.setLocalizableStringText("completedBeforeHtml",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locCompletedBeforeHtml",{get:function(){return this.getLocalizableString("completedBeforeHtml")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingHtml",{get:function(){return this.getLocalizableStringText("loadingHtml")},set:function(e){this.setLocalizableStringText("loadingHtml",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locLoadingHtml",{get:function(){return this.getLocalizableString("loadingHtml")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultLoadingHtml",{get:function(){return"<h3>"+this.getLocalizationString("loadingSurvey")+"</h3>"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"navigationBar",{get:function(){return this.navigationBarValue},enumerable:!1,configurable:!0}),t.prototype.addNavigationItem=function(e){return e.component||(e.component="sv-nav-btn"),e.innerCss||(e.innerCss=this.cssSurveyNavigationButton),this.navigationBar.addAction(e)},Object.defineProperty(t.prototype,"startSurveyText",{get:function(){return this.getLocalizableStringText("startSurveyText")},set:function(e){this.setLocalizableStringText("startSurveyText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locStartSurveyText",{get:function(){return this.getLocalizableString("startSurveyText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pagePrevText",{get:function(){return this.getLocalizableStringText("pagePrevText")},set:function(e){this.setLocalizableStringText("pagePrevText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPagePrevText",{get:function(){return this.getLocalizableString("pagePrevText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageNextText",{get:function(){return this.getLocalizableStringText("pageNextText")},set:function(e){this.setLocalizableStringText("pageNextText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPageNextText",{get:function(){return this.getLocalizableString("pageNextText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completeText",{get:function(){return this.getLocalizableStringText("completeText")},set:function(e){this.setLocalizableStringText("completeText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locCompleteText",{get:function(){return this.getLocalizableString("completeText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previewText",{get:function(){return this.getLocalizableStringText("previewText")},set:function(e){this.setLocalizableStringText("previewText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locPreviewText",{get:function(){return this.getLocalizableString("previewText")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"editText",{get:function(){return this.getLocalizableStringText("editText")},set:function(e){this.setLocalizableStringText("editText",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locEditText",{get:function(){return this.getLocalizableString("editText")},enumerable:!1,configurable:!0}),t.prototype.getElementTitleTagName=function(e,t){if(this.onGetTitleTagName.isEmpty)return t;var n={element:e,tagName:t};return this.onGetTitleTagName.fire(this,n),n.tagName},Object.defineProperty(t.prototype,"questionTitlePattern",{get:function(){return this.getPropertyValue("questionTitlePattern","numTitleRequire")},set:function(e){"numRequireTitle"!==e&&"requireNumTitle"!==e&&"numTitle"!=e&&(e="numTitleRequire"),this.setPropertyValue("questionTitlePattern",e)},enumerable:!1,configurable:!0}),t.prototype.getQuestionTitlePatternOptions=function(){var e=new Array,t=this.getLocalizationString("questionTitlePatternText"),n=this.questionStartIndex?this.questionStartIndex:"1.";return e.push({value:"numTitleRequire",text:n+" "+t+" "+this.requiredText}),e.push({value:"numRequireTitle",text:n+" "+this.requiredText+" "+t}),e.push({value:"requireNumTitle",text:this.requiredText+" "+n+" "+t}),e.push({value:"numTitle",text:n+" "+t}),e},Object.defineProperty(t.prototype,"questionTitleTemplate",{get:function(){return this.getLocalizableStringText("questionTitleTemplate")},set:function(e){this.setLocalizableStringText("questionTitleTemplate",e),this.questionTitlePattern=this.getNewTitlePattern(e),this.questionStartIndex=this.getNewQuestionTitleElement(e,"no",this.questionStartIndex,"1"),this.requiredText=this.getNewQuestionTitleElement(e,"require",this.requiredText,"*")},enumerable:!1,configurable:!0}),t.prototype.getNewTitlePattern=function(e){if(e){for(var t=[];e.indexOf("{")>-1;){var n=(e=e.substring(e.indexOf("{")+1)).indexOf("}");if(n<0)break;t.push(e.substring(0,n)),e=e.substring(n+1)}if(t.length>1){if("require"==t[0])return"requireNumTitle";if("require"==t[1]&&3==t.length)return"numRequireTitle";if(t.indexOf("require")<0)return"numTitle"}if(1==t.length&&"title"==t[0])return"numTitle"}return"numTitleRequire"},t.prototype.getNewQuestionTitleElement=function(e,t,n,r){if(t="{"+t+"}",!e||e.indexOf(t)<0)return n;for(var i=e.indexOf(t),o="",a="",s=i-1;s>=0&&"}"!=e[s];s--);for(s<i-1&&(o=e.substring(s+1,i)),s=i+=t.length;s<e.length&&"{"!=e[s];s++);for(s>i&&(a=e.substring(i,s)),s=0;s<o.length&&o.charCodeAt(s)<33;)s++;for(o=o.substring(s),s=a.length-1;s>=0&&a.charCodeAt(s)<33;)s--;return a=a.substring(0,s+1),o||a?o+(n||r)+a:n},Object.defineProperty(t.prototype,"locQuestionTitleTemplate",{get:function(){return this.getLocalizableString("questionTitleTemplate")},enumerable:!1,configurable:!0}),t.prototype.getUpdatedQuestionTitle=function(e,t){if(this.onGetQuestionTitle.isEmpty)return t;var n={question:e,title:t};return this.onGetQuestionTitle.fire(this,n),n.title},t.prototype.getUpdatedQuestionNo=function(e,t){if(this.onGetQuestionNo.isEmpty)return t;var n={question:e,no:t};return this.onGetQuestionNo.fire(this,n),n.no},Object.defineProperty(t.prototype,"showPageNumbers",{get:function(){return this.getPropertyValue("showPageNumbers",!1)},set:function(e){e!==this.showPageNumbers&&(this.setPropertyValue("showPageNumbers",e),this.updateVisibleIndexes())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showQuestionNumbers",{get:function(){return this.getPropertyValue("showQuestionNumbers")},set:function(e){!0===e&&(e="on"),!1===e&&(e="off"),(e="onpage"===(e=e.toLowerCase())?"onPage":e)!==this.showQuestionNumbers&&(this.setPropertyValue("showQuestionNumbers",e),this.updateVisibleIndexes())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showProgressBar",{get:function(){return this.getPropertyValue("showProgressBar")},set:function(e){this.setPropertyValue("showProgressBar",e.toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progressBarType",{get:function(){return this.getPropertyValue("progressBarType")},set:function(e){"correctquestion"===e&&(e="correctQuestion"),"requiredquestion"===e&&(e="requiredQuestion"),this.setPropertyValue("progressBarType",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowProgressBarOnTop",{get:function(){return!!this.canShowProresBar()&&("top"===this.showProgressBar||"both"===this.showProgressBar)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowProgressBarOnBottom",{get:function(){return!!this.canShowProresBar()&&("bottom"===this.showProgressBar||"both"===this.showProgressBar)},enumerable:!1,configurable:!0}),t.prototype.canShowProresBar=function(){return!this.isShowingPreview||"showAllQuestions"!=this.showPreviewBeforeComplete},Object.defineProperty(t.prototype,"processedTitle",{get:function(){return this.locTitle.renderedHtml},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionTitleLocation",{get:function(){return this.getPropertyValue("questionTitleLocation")},set:function(e){this.setPropertyValue("questionTitleLocation",e.toLowerCase()),this.isLoadingFromJson||this.updateElementCss(!0)},enumerable:!1,configurable:!0}),t.prototype.updateElementCss=function(e){this.startedPage&&this.startedPage.updateElementCss(e);for(var t=this.visiblePages,n=0;n<t.length;n++)t[n].updateElementCss(e)},Object.defineProperty(t.prototype,"questionErrorLocation",{get:function(){return this.getPropertyValue("questionErrorLocation")},set:function(e){this.setPropertyValue("questionErrorLocation",e.toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionDescriptionLocation",{get:function(){return this.getPropertyValue("questionDescriptionLocation")},set:function(e){this.setPropertyValue("questionDescriptionLocation",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.getPropertyValue("mode")},set:function(e){(e=e.toLowerCase())!=this.mode&&("edit"!=e&&"display"!=e||this.setPropertyValue("mode",e))},enumerable:!1,configurable:!0}),t.prototype.onModeChanged=function(){for(var e=0;e<this.pages.length;e++){var t=this.pages[e];t.setPropertyValue("isReadOnly",t.isReadOnly)}this.updateButtonsVisibility()},Object.defineProperty(t.prototype,"data",{get:function(){for(var e={},t=this.getValuesKeys(),n=0;n<t.length;n++){var r=t[n],i=this.getDataValueCore(this.valuesHash,r);void 0!==i&&(e[r]=i)}return this.setCalculatedValuesIntoResult(e),e},set:function(e){this.valuesHash={},this.setDataCore(e)},enumerable:!1,configurable:!0}),t.prototype.mergeData=function(e){e&&this.setDataCore(e)},t.prototype.setDataCore=function(e){if(e)for(var t in e)this.setDataValueCore(this.valuesHash,t,e[t]);this.updateAllQuestionsValue(),this.notifyAllQuestionsOnValueChanged(),this.notifyElementsOnAnyValueOrVariableChanged(""),this.runConditions(),this.updateAllQuestionsValue()},Object.defineProperty(t.prototype,"editingObj",{get:function(){return this.editingObjValue},set:function(e){var t=this;if(this.editingObj!=e&&(this.editingObj&&this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged),this.editingObjValue=e,!this.isDisposed)){if(!e)for(var n=this.getAllQuestions(),r=0;r<n.length;r++)n[r].unbindValue();this.editingObj&&(this.setDataCore({}),this.onEditingObjPropertyChanged=function(e,n){o.Serializer.hasOriginalProperty(t.editingObj,n.name)&&t.updateOnSetValue(n.name,t.editingObj[n.name],n.oldValue)},this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEditingSurveyElement",{get:function(){return!!this.editingObj},enumerable:!1,configurable:!0}),t.prototype.setCalculatedValuesIntoResult=function(e){for(var t=0;t<this.calculatedValues.length;t++){var n=this.calculatedValues[t];n.includeIntoResult&&n.name&&void 0!==this.getVariable(n.name)&&(e[n.name]=this.getVariable(n.name))}},t.prototype.getAllValues=function(){return this.data},t.prototype.getPlainData=function(e){e||(e={includeEmpty:!0,includeQuestionTypes:!1});var t=[];return this.getAllQuestions().forEach(function(n){var r=n.getPlainData(e);r&&t.push(r)}),t},t.prototype.getFilteredValues=function(){var e={};for(var t in this.variablesHash)e[t]=this.variablesHash[t];this.addCalculatedValuesIntoFilteredValues(e);for(var n=this.getValuesKeys(),r=0;r<n.length;r++)e[t=n[r]]=this.getDataValueCore(this.valuesHash,t);return e},t.prototype.addCalculatedValuesIntoFilteredValues=function(e){for(var t=this.calculatedValues,n=0;n<t.length;n++)e[t[n].name]=t[n].value},t.prototype.getFilteredProperties=function(){return{survey:this}},t.prototype.getValuesKeys=function(){if(!this.editingObj)return Object.keys(this.valuesHash);for(var e=o.Serializer.getPropertiesByObj(this.editingObj),t=[],n=0;n<e.length;n++)t.push(e[n].name);return t},t.prototype.getDataValueCore=function(e,t){return this.editingObj?o.Serializer.getObjPropertyValue(this.editingObj,t):this.getDataFromValueHash(e,t)},t.prototype.setDataValueCore=function(e,t,n){this.editingObj?o.Serializer.setObjPropertyValue(this.editingObj,t,n):this.setDataToValueHash(e,t,n)},t.prototype.deleteDataValueCore=function(e,t){this.editingObj?this.editingObj[t]=null:this.deleteDataFromValueHash(e,t)},t.prototype.getDataFromValueHash=function(e,t){return this.valueHashGetDataCallback?this.valueHashGetDataCallback(e,t):e[t]},t.prototype.setDataToValueHash=function(e,t,n){this.valueHashSetDataCallback?this.valueHashSetDataCallback(e,t,n):e[t]=n},t.prototype.deleteDataFromValueHash=function(e,t){this.valueHashDeleteDataCallback?this.valueHashDeleteDataCallback(e,t):delete e[t]},Object.defineProperty(t.prototype,"comments",{get:function(){for(var e={},t=this.getValuesKeys(),n=0;n<t.length;n++){var r=t[n];r.indexOf(this.commentPrefix)>0&&(e[r]=this.getDataValueCore(this.valuesHash,r))}return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visiblePages",{get:function(){if(this.isDesignMode)return this.pages;for(var e=new Array,t=0;t<this.pages.length;t++)this.isPageInVisibleList(this.pages[t])&&e.push(this.pages[t]);return e},enumerable:!1,configurable:!0}),t.prototype.isPageInVisibleList=function(e){return this.isDesignMode||e.isVisible&&!e.isStarted},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0==this.pages.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"PageCount",{get:function(){return this.pageCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCount",{get:function(){return this.pages.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visiblePageCount",{get:function(){return this.visiblePages.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startedPage",{get:function(){var e=this.firstPageIsStarted&&this.pages.length>1?this.pages[0]:null;return e&&(e.onFirstRendering(),e.setWasShown(!0)),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.getPropertyValue("currentPage",null)},set:function(e){if(!this.isLoadingFromJson){var t=this.getPageByObject(e);if((!e||t)&&(t||!this.isCurrentPageAvailable)&&!(null!=t&&this.visiblePages.indexOf(t)<0)&&t!=this.currentPage){var n=this.currentPage;this.currentPageChanging(t,n)&&(this.setPropertyValue("currentPage",t),t&&(t.onFirstRendering(),t.updateCustomWidgets(),t.setWasShown(!0)),this.locStrsChanged(),this.currentPageChanged(t,n))}}},enumerable:!1,configurable:!0}),t.prototype.updateCurrentPage=function(){this.isCurrentPageAvailable||(this.currentPage=this.firstVisiblePage)},Object.defineProperty(t.prototype,"isCurrentPageAvailable",{get:function(){var e=this.currentPage;return!!e&&this.isPageInVisibleList(e)&&this.isPageExistsInSurvey(e)},enumerable:!1,configurable:!0}),t.prototype.isPageExistsInSurvey=function(e){return this.pages.indexOf(e)>-1||!!this.onContainsPageCallback&&this.onContainsPageCallback(e)},Object.defineProperty(t.prototype,"activePage",{get:function(){return this.getPropertyValue("activePage")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowStartingPage",{get:function(){return"starting"===this.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowingPage",{get:function(){return"running"==this.state||"preview"==this.state||this.isShowStartingPage},enumerable:!1,configurable:!0}),t.prototype.updateActivePage=function(){this.setPropertyValue("activePage",this.isShowStartingPage?this.startedPage:this.currentPage)},t.prototype.onStateAndCurrentPageChanged=function(){this.updateActivePage(),this.updateButtonsVisibility()},t.prototype.getPageByObject=function(e){if(!e)return null;if(e.getType&&"page"==e.getType())return e;if("string"==typeof e||e instanceof String)return this.getPageByName(String(e));if(!isNaN(e)){var t=Number(e),n=this.visiblePages;return e<0||e>=n.length?null:n[t]}return e},Object.defineProperty(t.prototype,"currentPageNo",{get:function(){return this.visiblePages.indexOf(this.currentPage)},set:function(e){var t=this.visiblePages;e<0||e>=t.length||(this.currentPage=t[e])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionsOrder",{get:function(){return this.getPropertyValue("questionsOrder")},set:function(e){this.setPropertyValue("questionsOrder",e)},enumerable:!1,configurable:!0}),t.prototype.focusFirstQuestion=function(){if(!this.isFocusingQuestion){var e=this.activePage;e&&(e.scrollToTop(),e.focusFirstQuestion())}},t.prototype.scrollToTopOnPageChange=function(e){void 0===e&&(e=!0);var t=this.activePage;t&&(e&&t.scrollToTop(),this.isCurrentPageRendering&&this.focusFirstQuestionAutomatic&&!this.isFocusingQuestion&&(t.focusFirstQuestion(),this.isCurrentPageRendering=!1))},Object.defineProperty(t.prototype,"state",{get:function(){return this.getPropertyValue("state","empty")},enumerable:!1,configurable:!0}),t.prototype.updateState=function(){this.setPropertyValue("state",this.calcState())},t.prototype.calcState=function(){return this.isLoading?"loading":this.isCompleted?"completed":this.isCompletedBefore?"completedbefore":!this.isDesignMode&&this.isEditMode&&this.isStartedState&&this.startedPage?"starting":this.isShowingPreview?this.currentPage?"preview":"empty":this.currentPage?"running":"empty"},Object.defineProperty(t.prototype,"isCompleted",{get:function(){return this.getPropertyValue("isCompleted",!1)},set:function(e){this.setPropertyValue("isCompleted",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowingPreview",{get:function(){return this.getPropertyValue("isShowingPreview",!1)},set:function(e){this.isShowingPreview!=e&&(this.setPropertyValue("isShowingPreview",e),this.onShowingPreviewChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStartedState",{get:function(){return this.getPropertyValue("isStartedState",!1)},set:function(e){this.setPropertyValue("isStartedState",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompletedBefore",{get:function(){return this.getPropertyValue("isCompletedBefore",!1)},set:function(e){this.setPropertyValue("isCompletedBefore",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoading",{get:function(){return this.getPropertyValue("isLoading",!1)},set:function(e){this.setPropertyValue("isLoading",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completedState",{get:function(){return this.getPropertyValue("completedState","")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completedStateText",{get:function(){return this.getPropertyValue("completedStateText","")},enumerable:!1,configurable:!0}),t.prototype.setCompletedState=function(e,t){this.setPropertyValue("completedState",e),t||("saving"==e&&(t=this.getLocalizationString("savingData")),"error"==e&&(t=this.getLocalizationString("savingDataError")),"success"==e&&(t=this.getLocalizationString("savingDataSuccess"))),this.setPropertyValue("completedStateText",t),this.setPropertyValue("completedStateCss",this.getCompletedStateCss())},t.prototype.clear=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this.isCompleted=!1,this.isCompletedBefore=!1,this.isLoading=!1,this.canBeCompletedByTrigger=!1,e&&(this.data=null,this.variablesHash={}),this.timerModel.spent=0;for(var n=0;n<this.pages.length;n++)this.pages[n].timeSpent=0,this.pages[n].setWasShown(!1),this.pages[n].passed=!1;this.onFirstPageIsStartedChanged(),t&&(this.currentPage=this.firstVisiblePage),e&&this.updateValuesWithDefaults()},t.prototype.mergeValues=function(e,t){Object(b.mergeValues)(e,t)},t.prototype.updateValuesWithDefaults=function(){if(!this.isDesignMode&&!this.isLoading)for(var e=0;e<this.pages.length;e++)for(var t=this.pages[e].questions,n=0;n<t.length;n++)t[n].updateValueWithDefaults()},t.prototype.updateCustomWidgets=function(e){e&&e.updateCustomWidgets()},t.prototype.currentPageChanging=function(e,t){var n={oldCurrentPage:t,newCurrentPage:e,allowChanging:!0,isNextPage:this.isNextPage(e,t),isPrevPage:this.isPrevPage(e,t)};return this.onCurrentPageChanging.fire(this,n),n.allowChanging&&(this.isCurrentPageRendering=!0),n.allowChanging},t.prototype.currentPageChanged=function(e,t){var n=this.isNextPage(e,t);n&&(t.passed=!0),this.onCurrentPageChanged.fire(this,{oldCurrentPage:t,newCurrentPage:e,isNextPage:n,isPrevPage:this.isPrevPage(e,t)})},t.prototype.isNextPage=function(e,t){return!(!e||!t)&&e.visibleIndex==t.visibleIndex+1},t.prototype.isPrevPage=function(e,t){return!(!e||!t)&&e.visibleIndex+1==t.visibleIndex},t.prototype.getProgress=function(){if(null==this.currentPage)return 0;if("pages"!==this.progressBarType){var e=this.getProgressInfo();return"requiredQuestions"===this.progressBarType?e.requiredQuestionCount>=1?Math.ceil(100*e.requiredAnsweredQuestionCount/e.requiredQuestionCount):100:e.questionCount>=1?Math.ceil(100*e.answeredQuestionCount/e.questionCount):100}var t=this.visiblePages,n=t.indexOf(this.currentPage)+1;return Math.ceil(100*n/t.length)},Object.defineProperty(t.prototype,"progressValue",{get:function(){return this.getPropertyValue("progressValue",0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNavigationButtonsShowing",{get:function(){if(this.isDesignMode)return"none";var e=this.currentPage;return e?"show"===e.navigationButtonsVisibility?"bottom":"hide"===e.navigationButtonsVisibility?"none":this.showNavigationButtons:"none"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNavigationButtonsShowingOnTop",{get:function(){return this.getIsNavigationButtonsShowingOn("top")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNavigationButtonsShowingOnBottom",{get:function(){return this.getIsNavigationButtonsShowingOn("bottom")},enumerable:!1,configurable:!0}),t.prototype.getIsNavigationButtonsShowingOn=function(e){var t=this.isNavigationButtonsShowing;return"both"==t||t==e},Object.defineProperty(t.prototype,"isEditMode",{get:function(){return"edit"==this.mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDisplayMode",{get:function(){return"display"==this.mode||"preview"==this.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUpdateValueTextOnTyping",{get:function(){return"onTyping"==this.textUpdateMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignMode",{get:function(){return this._isDesignMode},enumerable:!1,configurable:!0}),t.prototype.setDesignMode=function(e){this._isDesignMode=e,this.onQuestionsOnPageModeChanged("standard")},Object.defineProperty(t.prototype,"showInvisibleElements",{get:function(){return this.getPropertyValue("showInvisibleElements",!1)},set:function(e){var t=this.visiblePages;this.setPropertyValue("showInvisibleElements",e),this.isLoadingFromJson||(this.runConditions(),this.updateAllElementsVisibility(t))},enumerable:!1,configurable:!0}),t.prototype.updateAllElementsVisibility=function(e){for(var t=0;t<this.pages.length;t++){var n=this.pages[t];n.updateElementVisibility(),e.indexOf(n)>-1!=n.isVisible&&this.onPageVisibleChanged.fire(this,{page:n,visible:n.isVisible})}},Object.defineProperty(t.prototype,"areInvisibleElementsShowing",{get:function(){return this.isDesignMode||this.showInvisibleElements},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areEmptyElementsHidden",{get:function(){return this.isShowingPreview&&"showAnsweredQuestions"==this.showPreviewBeforeComplete},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasCookie",{get:function(){if(!this.cookieName||"undefined"==typeof document)return!1;var e=document.cookie;return e&&e.indexOf(this.cookieName+"=true")>-1},enumerable:!1,configurable:!0}),t.prototype.setCookie=function(){this.cookieName&&"undefined"!=typeof document&&(document.cookie=this.cookieName+"=true; expires=Fri, 31 Dec 9999 0:0:0 GMT")},t.prototype.deleteCookie=function(){this.cookieName&&(document.cookie=this.cookieName+"=;")},t.prototype.nextPage=function(){return!this.isLastPage&&this.doCurrentPageComplete(!1)},t.prototype.hasErrorsOnNavigate=function(e){var t=this;if(this.ignoreValidation||!this.isEditMode)return!1;var n=function(n){n||t.doCurrentPageCompleteCore(e)};return"onComplete"===this.checkErrorsMode?!!this.isLastPage&&!1!==this.hasErrors(!0,!0,n):!1!==this.hasCurrentPageErrors(n)},t.prototype.checkForAsyncQuestionValidation=function(e,t){var n=this;this.clearAsyncValidationQuesitons();for(var r=function(){if(e[o].isRunningValidators){var r=e[o];r.onCompletedAsyncValidators=function(e){n.onCompletedAsyncQuestionValidators(r,t,e)},i.asyncValidationQuesitons.push(e[o])}},i=this,o=0;o<e.length;o++)r();return this.asyncValidationQuesitons.length>0},t.prototype.clearAsyncValidationQuesitons=function(){if(this.asyncValidationQuesitons)for(var e=this.asyncValidationQuesitons,t=0;t<e.length;t++)e[t].onCompletedAsyncValidators=null;this.asyncValidationQuesitons=[]},t.prototype.onCompletedAsyncQuestionValidators=function(e,t,n){if(n){if(this.clearAsyncValidationQuesitons(),t(!0),this.focusOnFirstError&&e&&e.page&&e.page===this.currentPage){for(var r=this.currentPage.questions,i=0;i<r.length;i++)if(r[i]!==e&&r[i].errors.length>0)return;e.focus(!0)}}else{for(var o=this.asyncValidationQuesitons,a=0;a<o.length;a++)if(o[a].isRunningValidators)return;t(!1)}},Object.defineProperty(t.prototype,"isCurrentPageHasErrors",{get:function(){return this.checkIsCurrentPageHasErrors()},enumerable:!1,configurable:!0}),t.prototype.hasCurrentPageErrors=function(e){return this.hasPageErrors(void 0,e)},t.prototype.hasPageErrors=function(e,t){return e||(e=this.activePage),!!e&&(!!this.checkIsPageHasErrors(e)||!!t&&!!this.checkForAsyncQuestionValidation(e.questions,function(e){return t(e)})&&void 0)},t.prototype.hasErrors=function(e,t,n){void 0===e&&(e=!0),void 0===t&&(t=!1),n&&(e=!0);for(var r=this.visiblePages,i=null,o=!1,a=0;a<r.length;a++)r[a].hasErrors(e,!1)&&(i||(i=r[a]),o=!0);if(t&&i){this.currentPage=i;var s=i.questions;for(a=0;a<s.length;a++)if(s[a].errors.length>0){s[a].focus(!0);break}}return o||!n?o:!!this.checkForAsyncQuestionValidation(this.getAllQuestions(),function(e){return n(e)})&&void 0},t.prototype.ensureUniqueNames=function(e){if(void 0===e&&(e=null),null==e)for(var t=0;t<this.pages.length;t++)this.ensureUniqueName(this.pages[t]);else this.ensureUniqueName(e)},t.prototype.ensureUniqueName=function(e){if(e.isPage&&this.ensureUniquePageName(e),e.isPanel&&this.ensureUniquePanelName(e),e.isPage||e.isPanel)for(var t=e.elements,n=0;n<t.length;n++)this.ensureUniqueNames(t[n]);else this.ensureUniqueQuestionName(e)},t.prototype.ensureUniquePageName=function(e){var t=this;return this.ensureUniqueElementName(e,function(e){return t.getPageByName(e)})},t.prototype.ensureUniquePanelName=function(e){var t=this;return this.ensureUniqueElementName(e,function(e){return t.getPanelByName(e)})},t.prototype.ensureUniqueQuestionName=function(e){var t=this;return this.ensureUniqueElementName(e,function(e){return t.getQuestionByName(e)})},t.prototype.ensureUniqueElementName=function(e,t){var n=t(e.name);if(n&&n!=e){for(var r=this.getNewName(e.name);t(r);)r=this.getNewName(e.name);e.name=r}},t.prototype.getNewName=function(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var n=e.substring(0,t),r=0;return t<e.length&&(r=parseInt(e.substring(t))),n+ ++r},t.prototype.checkIsCurrentPageHasErrors=function(e){return void 0===e&&(e=void 0),this.checkIsPageHasErrors(this.activePage,e)},t.prototype.checkIsPageHasErrors=function(e,t){if(void 0===t&&(t=void 0),void 0===t&&(t=this.focusOnFirstError),!e)return!0;var n=e.hasErrors(!0,t);return this.fireValidatedErrorsOnPage(e),n},t.prototype.fireValidatedErrorsOnPage=function(e){if(!this.onValidatedErrorsOnCurrentPage.isEmpty&&e){for(var t=e.questions,n=new Array,r=new Array,i=0;i<t.length;i++){var o=t[i];if(o.errors.length>0){n.push(o);for(var a=0;a<o.errors.length;a++)r.push(o.errors[a])}}this.onValidatedErrorsOnCurrentPage.fire(this,{questions:n,errors:r,page:e})}},t.prototype.prevPage=function(){if(this.isFirstPage||"starting"===this.state)return!1;this.resetNavigationButton();var e=this.visiblePages,t=e.indexOf(this.currentPage);return this.currentPage=e[t-1],!0},t.prototype.completeLastPage=function(){var e=this.doCurrentPageComplete(!0);return e&&this.cancelPreview(),e},t.prototype.navigationMouseDown=function(){return this.isNavigationButtonPressed=!0,!0},t.prototype.resetNavigationButton=function(){this.isNavigationButtonPressed=!1},t.prototype.nextPageUIClick=function(){this.mouseDownPage&&this.mouseDownPage!==this.activePage||(this.mouseDownPage=null,this.nextPage())},t.prototype.nextPageMouseDown=function(){return this.mouseDownPage=this.activePage,this.navigationMouseDown()},t.prototype.showPreview=function(){return this.resetNavigationButton(),!this.hasErrorsOnNavigate(!0)&&!this.doServerValidation(!0,!0)&&(this.showPreviewCore(),!0)},t.prototype.showPreviewCore=function(){var e={allowShowPreview:!0};this.onShowingPreview.fire(this,e),this.isShowingPreview=e.allowShowPreview},t.prototype.cancelPreview=function(e){void 0===e&&(e=null),this.isShowingPreview&&(this.isShowingPreview=!1,i.Helpers.isValueEmpty(e)&&this.visiblePageCount>0&&(e=this.visiblePageCount-1),null!==e&&(this.currentPage=e))},t.prototype.cancelPreviewByPage=function(e){this.cancelPreview(e.originalPage)},t.prototype.doCurrentPageComplete=function(e){return!this.isValidatingOnServer&&(this.resetNavigationButton(),!this.hasErrorsOnNavigate(e)&&this.doCurrentPageCompleteCore(e))},t.prototype.doCurrentPageCompleteCore=function(e){return!this.doServerValidation(e)&&(e?(this.currentPage.passed=!0,this.doComplete()):(this.doNextPage(),!0))},Object.defineProperty(t.prototype,"isSinglePage",{get:function(){return"singlePage"==this.questionsOnPageMode},set:function(e){this.questionsOnPageMode=e?"singlePage":"standard"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"questionsOnPageMode",{get:function(){return this.getPropertyValue("questionsOnPageMode")},set:function(e){this.setPropertyValue("questionsOnPageMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstPageIsStarted",{get:function(){return this.getPropertyValue("firstPageIsStarted",!1)},set:function(e){this.setPropertyValue("firstPageIsStarted",e)},enumerable:!1,configurable:!0}),t.prototype.isPageStarted=function(e){return this.firstPageIsStarted&&this.pages.length>1&&this.pages[0]===e},Object.defineProperty(t.prototype,"showPreviewBeforeComplete",{get:function(){return this.getPropertyValue("showPreviewBeforeComplete")},set:function(e){this.setPropertyValue("showPreviewBeforeComplete",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowPreviewBeforeComplete",{get:function(){var e=this.showPreviewBeforeComplete;return"showAllQuestions"==e||"showAnsweredQuestions"==e},enumerable:!1,configurable:!0}),t.prototype.onFirstPageIsStartedChanged=function(){this.isStartedState=this.firstPageIsStarted&&this.pages.length>1,this.pageVisibilityChanged(this.pages[0],!this.isStartedState)},t.prototype.onShowingPreviewChanged=function(){this.isDesignMode||(this.isShowingPreview?(this.runningPages=this.pages.slice(0,this.pages.length),this.setupPagesForPageModes(!0)):(this.runningPages&&this.restoreOrigionalPages(this.runningPages),this.runningPages=void 0),this.runConditions(),this.updateAllElementsVisibility(this.pages),this.updateVisibleIndexes(),this.currentPageNo=0)},t.prototype.onQuestionsOnPageModeChanged=function(e){this.isShowingPreview||("standard"==this.questionsOnPageMode||this.isDesignMode?(this.origionalPages&&this.restoreOrigionalPages(this.origionalPages),this.origionalPages=void 0):(e&&"standard"!=e||(this.origionalPages=this.pages.slice(0,this.pages.length)),this.setupPagesForPageModes(this.isSinglePage)),this.runConditions(),this.updateVisibleIndexes())},t.prototype.restoreOrigionalPages=function(e){this.questionHashesClear(),this.pages.splice(0,this.pages.length);for(var t=0;t<e.length;t++)this.pages.push(e[t])},t.prototype.getPageStartIndex=function(){return this.firstPageIsStarted&&this.pages.length>0?1:0},t.prototype.setupPagesForPageModes=function(t){this.questionHashesClear();var n=this.getPageStartIndex();e.prototype.startLoadingFromJson.call(this);var r=this.createPagesForQuestionOnPageMode(t,n);this.pages.splice(n,this.pages.length-n);for(var i=0;i<r.length;i++)this.pages.push(r[i]);for(e.prototype.endLoadingFromJson.call(this),i=0;i<r.length;i++)r[i].setSurveyImpl(this,!0);this.doElementsOnLoad(),this.updateCurrentPage()},t.prototype.createPagesForQuestionOnPageMode=function(e,t){return e?[this.createSinglePage(t)]:this.createPagesForEveryQuestion(t)},t.prototype.createSinglePage=function(e){var t=this.createNewPage("all");t.setSurveyImpl(this);for(var n=e;n<this.pages.length;n++){var r=this.pages[n],i=o.Serializer.createClass("panel");i.originalPage=r,t.addPanel(i);var a=(new o.JsonObject).toJsonObject(r);(new o.JsonObject).toObject(a,i),this.showPageTitles||(i.title="")}return t},t.prototype.createPagesForEveryQuestion=function(e){for(var t=[],n=e;n<this.pages.length;n++){var r=this.pages[n];r.setWasShown(!0);for(var i=0;i<r.elements.length;i++){var a=r.elements[i],s=o.Serializer.createClass(a.getType());if(s){var l=new o.JsonObject;l.lightSerializing=!0;var u=l.toJsonObject(r),c=o.Serializer.createClass(r.getType());c.fromJSON(u),c.name=a.name,c.setSurveyImpl(this),t.push(c);var d=(new o.JsonObject).toJsonObject(a);(new o.JsonObject).toObject(d,s),c.addElement(s);for(var h=0;h<c.questions.length;h++)this.questionHashesAdded(c.questions[h])}}}return t},Object.defineProperty(t.prototype,"isFirstPage",{get:function(){return this.getPropertyValue("isFirstPage")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLastPage",{get:function(){return this.getPropertyValue("isLastPage")},enumerable:!1,configurable:!0}),t.prototype.updateButtonsVisibility=function(){this.updateIsFirstLastPageState(),this.setPropertyValue("isShowPrevButton",this.calcIsShowPrevButton()),this.setPropertyValue("isShowNextButton",this.calcIsShowNextButton()),this.setPropertyValue("isCompleteButtonVisible",this.calcIsCompleteButtonVisible()),this.setPropertyValue("isPreviewButtonVisible",this.calcIsPreviewButtonVisible()),this.setPropertyValue("isCancelPreviewButtonVisible",this.calcIsCancelPreviewButtonVisible())},Object.defineProperty(t.prototype,"isShowPrevButton",{get:function(){return this.getPropertyValue("isShowPrevButton")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShowNextButton",{get:function(){return this.getPropertyValue("isShowNextButton")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompleteButtonVisible",{get:function(){return this.getPropertyValue("isCompleteButtonVisible")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewButtonVisible",{get:function(){return this.getPropertyValue("isPreviewButtonVisible")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCancelPreviewButtonVisible",{get:function(){return this.getPropertyValue("isCancelPreviewButtonVisible")},enumerable:!1,configurable:!0}),t.prototype.updateIsFirstLastPageState=function(){var e=this.currentPage;this.setPropertyValue("isFirstPage",!!e&&e===this.firstVisiblePage),this.setPropertyValue("isLastPage",!!e&&e===this.lastVisiblePage)},t.prototype.calcIsShowPrevButton=function(){return!(this.isFirstPage||!this.showPrevButton||"running"!==this.state)&&this.getPageMaxTimeToFinish(this.visiblePages[this.currentPageNo-1])<=0},t.prototype.calcIsShowNextButton=function(){return"running"===this.state&&!this.isLastPage&&!this.canBeCompletedByTrigger},t.prototype.calcIsCompleteButtonVisible=function(){return this.isEditMode&&("running"===this.state&&(this.isLastPage&&!this.isShowPreviewBeforeComplete||this.canBeCompletedByTrigger)||"preview"===this.state)},t.prototype.calcIsPreviewButtonVisible=function(){return this.isEditMode&&this.isShowPreviewBeforeComplete&&"running"==this.state&&this.isLastPage},t.prototype.calcIsCancelPreviewButtonVisible=function(){return this.isEditMode&&this.isShowPreviewBeforeComplete&&"preview"==this.state},Object.defineProperty(t.prototype,"firstVisiblePage",{get:function(){for(var e=this.pages,t=0;t<e.length;t++)if(this.isPageInVisibleList(e[t]))return e[t];return null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastVisiblePage",{get:function(){for(var e=this.pages,t=e.length-1;t>=0;t--)if(this.isPageInVisibleList(e[t]))return e[t];return null},enumerable:!1,configurable:!0}),t.prototype.doComplete=function(e){void 0===e&&(e=!1);var t={allowComplete:!0,isCompleteOnTrigger:e};if(this.onCompleting.fire(this,t),!t.allowComplete)return this.isCompleted=!1,!1;var n=this.hasCookie;this.stopTimer(),this.setCompleted(),this.clearUnusedValues(),this.setCookie();var r=this,i=!1;return this.onComplete.fire(this,{isCompleteOnTrigger:e,showDataSaving:function(e){i=!0,r.setCompletedState("saving",e)},showDataSavingError:function(e){r.setCompletedState("error",e)},showDataSavingSuccess:function(e){r.setCompletedState("success",e),r.navigateTo()},showDataSavingClear:function(e){r.setCompletedState("","")}}),!n&&this.surveyPostId&&this.sendResult(),i||this.navigateTo(),!0},t.prototype.start=function(){return!!this.firstPageIsStarted&&!this.checkIsPageHasErrors(this.startedPage,!0)&&(this.isStartedState=!1,this.startTimerFromUI(),this.onStarted.fire(this,{}),this.updateVisibleIndexes(),this.currentPage&&this.currentPage.locStrsChanged(),!0)},Object.defineProperty(t.prototype,"isValidatingOnServer",{get:function(){return this.getPropertyValue("isValidatingOnServer",!1)},enumerable:!1,configurable:!0}),t.prototype.setIsValidatingOnServer=function(e){e!=this.isValidatingOnServer&&(this.setPropertyValue("isValidatingOnServer",e),this.onIsValidatingOnServerChanged())},t.prototype.createServerValidationOptions=function(e,t){var n=this,r={data:{},errors:{},survey:this,complete:function(){n.completeServerValidation(r,t)}};if(e&&"onComplete"===this.checkErrorsMode)r.data=this.data;else for(var i=this.activePage.questions,o=0;o<i.length;o++){var a=i[o];if(a.visible){var s=this.getValue(a.getValueName());this.isValueEmpty(s)||(r.data[a.getValueName()]=s)}}return r},t.prototype.onIsValidatingOnServerChanged=function(){},t.prototype.doServerValidation=function(e,t){var n=this;if(void 0===t&&(t=!1),!this.onServerValidateQuestions||this.onServerValidateQuestions.isEmpty)return!1;if(!e&&"onComplete"===this.checkErrorsMode)return!1;this.setIsValidatingOnServer(!0);var r="function"==typeof this.onServerValidateQuestions;return this.serverValidationEventCount=r?1:this.onServerValidateQuestions.length,r?this.onServerValidateQuestions(this,this.createServerValidationOptions(e,t)):this.onServerValidateQuestions.fireByCreatingOptions(this,function(){return n.createServerValidationOptions(e,t)}),!0},t.prototype.completeServerValidation=function(e,t){if(!(this.serverValidationEventCount>1&&(this.serverValidationEventCount--,e&&e.errors&&0===Object.keys(e.errors).length))&&(this.serverValidationEventCount=0,this.setIsValidatingOnServer(!1),e||e.survey)){var n=e.survey,r=!1;if(e.errors){var i=this.focusOnFirstError;for(var o in e.errors){var a=n.getQuestionByName(o);a&&a.errors&&(r=!0,a.addError(new p.CustomError(e.errors[o],this)),i&&(i=!1,a.page&&(this.currentPage=a.page),a.focus(!0)))}this.fireValidatedErrorsOnPage(this.currentPage)}r||(t?this.showPreviewCore():n.isLastPage?n.doComplete():n.doNextPage())}},t.prototype.doNextPage=function(){var e=this.currentPage;if(this.checkOnPageTriggers(),this.isCompleted)this.doComplete(!0);else if(this.sendResultOnPageNext&&this.sendResult(this.surveyPostId,this.clientId,!0),e===this.currentPage){var t=this.visiblePages,n=t.indexOf(this.currentPage);this.currentPage=t[n+1]}},t.prototype.setCompleted=function(){this.isCompleted=!0},t.prototype.canBeCompleted=function(){this.canBeCompletedByTrigger||(this.canBeCompletedByTrigger=!0,this.updateButtonsVisibility())},Object.defineProperty(t.prototype,"processedCompletedHtml",{get:function(){var e=this.renderedCompletedHtml;return e?this.processHtml(e):""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"processedCompletedBeforeHtml",{get:function(){return this.processHtml(this.completedBeforeHtml)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"processedLoadingHtml",{get:function(){return this.processHtml(this.loadingHtml)},enumerable:!1,configurable:!0}),t.prototype.getProgressInfo=function(){return s.SurveyElement.getProgressInfoByElements(this.isDesignMode?this.pages:this.visiblePages,!1)},Object.defineProperty(t.prototype,"progressText",{get:function(){var e=this.getPropertyValue("progressText","");return e||(this.updateProgressText(),e=this.getPropertyValue("progressText","")),e},enumerable:!1,configurable:!0}),t.prototype.updateProgressText=function(e){void 0===e&&(e=!1),this.isCalculatingProgressText||e&&"pages"==this.progressBarType&&this.onProgressText.isEmpty||(this.isCalculatingProgressText=!0,this.setPropertyValue("progressText",this.getProgressText()),this.setPropertyValue("progressValue",this.getProgress()),this.isCalculatingProgressText=!1)},t.prototype.getProgressText=function(){if(!this.isDesignMode&&null==this.currentPage)return"";var e={questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0,text:""},t=this.progressBarType.toLowerCase();if("questions"===t||"requiredquestions"===t||"correctquestions"===t||!this.onProgressText.isEmpty){var n=this.getProgressInfo();e.questionCount=n.questionCount,e.answeredQuestionCount=n.answeredQuestionCount,e.requiredQuestionCount=n.requiredQuestionCount,e.requiredAnsweredQuestionCount=n.requiredAnsweredQuestionCount}return e.text=this.getProgressTextCore(e),this.onProgressText.fire(this,e),e.text},t.prototype.getProgressTextCore=function(e){var t=this.progressBarType.toLowerCase();if("questions"===t)return this.getLocalizationFormatString("questionsProgressText",e.answeredQuestionCount,e.questionCount);if("requiredquestions"===t)return this.getLocalizationFormatString("questionsProgressText",e.requiredAnsweredQuestionCount,e.requiredQuestionCount);if("correctquestions"===t){var n=this.getCorrectedAnswerCount();return this.getLocalizationFormatString("questionsProgressText",n,e.questionCount)}var r=this.isDesignMode?this.pages:this.visiblePages,i=r.indexOf(this.currentPage)+1;return this.getLocalizationFormatString("progressText",i,r.length)},t.prototype.getRootCss=function(){return(new C.CssClassBuilder).append(this.css.root).append(this.css.rootMobile,this.isMobile).toString()},t.prototype.afterRenderSurvey=function(e){var t=this;this.destroyResizeObserver(),Array.isArray(e)&&(e=s.SurveyElement.GetFirstNonTextElement(e));var n=e,r=this.css.variables;if(r){var i=Number.parseFloat(window.getComputedStyle(n).getPropertyValue(r.mobileWidth));if(i){var o=!1;this.resizeObserver=new ResizeObserver(function(){o=!(o||!Object(b.isContainerVisible)(n))&&t.processResponsiveness(n.offsetWidth,i)}),this.resizeObserver.observe(n)}}this.onAfterRenderSurvey.fire(this,{survey:this,htmlElement:e})},t.prototype.processResponsiveness=function(e,t){var n=e<t;return this.isMobile!==n&&(this.setIsMobile(n),!0)},t.prototype.destroyResizeObserver=function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)},t.prototype.updateQuestionCssClasses=function(e,t){this.onUpdateQuestionCssClasses.fire(this,{question:e,cssClasses:t})},t.prototype.updatePanelCssClasses=function(e,t){this.onUpdatePanelCssClasses.fire(this,{panel:e,cssClasses:t})},t.prototype.updatePageCssClasses=function(e,t){this.onUpdatePageCssClasses.fire(this,{page:e,cssClasses:t})},t.prototype.updateChoiceItemCss=function(e,t){t.question=e,this.onUpdateChoiceItemCss.fire(this,t)},t.prototype.afterRenderPage=function(e){var t=this;this.isDesignMode||setTimeout(function(){return t.scrollToTopOnPageChange(!t.isFirstPageRendering)},1),this.isFirstPageRendering=!1,this.onAfterRenderPage.isEmpty||this.onAfterRenderPage.fire(this,{page:this.activePage,htmlElement:e})},t.prototype.afterRenderHeader=function(e){this.onAfterRenderHeader.isEmpty||this.onAfterRenderHeader.fire(this,{htmlElement:e})},t.prototype.afterRenderQuestion=function(e,t){this.onAfterRenderQuestion.fire(this,{question:e,htmlElement:t})},t.prototype.afterRenderQuestionInput=function(e,t){if(!this.onAfterRenderQuestionInput.isEmpty){var n=e.inputId;if(n&&t.id!==n&&"undefined"!=typeof document){var r=document.getElementById(n);r&&(t=r)}this.onAfterRenderQuestionInput.fire(this,{question:e,htmlElement:t})}},t.prototype.afterRenderPanel=function(e,t){this.onAfterRenderPanel.fire(this,{panel:e,htmlElement:t})},t.prototype.whenQuestionFocusIn=function(e){this.onFocusInQuestion.fire(this,{question:e})},t.prototype.whenPanelFocusIn=function(e){this.onFocusInPanel.fire(this,{panel:e})},t.prototype.rebuildQuestionChoices=function(){this.getAllQuestions().forEach(function(e){return e.surveyChoiceItemVisibilityChange()})},t.prototype.canChangeChoiceItemsVisibility=function(){return!this.onShowingChoiceItem.isEmpty},t.prototype.getChoiceItemVisibility=function(e,t,n){var r={question:e,item:t,visible:n};return this.onShowingChoiceItem.fire(this,r),r.visible},t.prototype.matrixBeforeRowAdded=function(e){this.onMatrixBeforeRowAdded.fire(this,e)},t.prototype.matrixRowAdded=function(e,t){this.onMatrixRowAdded.fire(this,{question:e,row:t})},t.prototype.getQuestionByValueNameFromArray=function(e,t,n){var r=this.getQuestionsByValueName(e);if(r){for(var i=0;i<r.length;i++){var o=r[i].getQuestionFromArray(t,n);if(o)return o}return null}},t.prototype.matrixRowRemoved=function(e,t,n){this.onMatrixRowRemoved.fire(this,{question:e,rowIndex:t,row:n})},t.prototype.matrixRowRemoving=function(e,t,n){var r={question:e,rowIndex:t,row:n,allow:!0};return this.onMatrixRowRemoving.fire(this,r),r.allow},t.prototype.matrixAllowRemoveRow=function(e,t,n){var r={question:e,rowIndex:t,row:n,allow:!0};return this.onMatrixAllowRemoveRow.fire(this,r),r.allow},t.prototype.matrixCellCreating=function(e,t){t.question=e,this.onMatrixCellCreating.fire(this,t)},t.prototype.matrixCellCreated=function(e,t){t.question=e,this.onMatrixCellCreated.fire(this,t)},t.prototype.matrixAfterCellRender=function(e,t){t.question=e,this.onMatrixAfterCellRender.fire(this,t)},t.prototype.matrixCellValueChanged=function(e,t){t.question=e,this.onMatrixCellValueChanged.fire(this,t)},t.prototype.matrixCellValueChanging=function(e,t){t.question=e,this.onMatrixCellValueChanging.fire(this,t)},Object.defineProperty(t.prototype,"isValidateOnValueChanging",{get:function(){return"onValueChanging"===this.checkErrorsMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValidateOnValueChanged",{get:function(){return"onValueChanged"===this.checkErrorsMode},enumerable:!1,configurable:!0}),t.prototype.matrixCellValidate=function(e,t){return t.question=e,this.onMatrixCellValidate.fire(this,t),t.error?new p.CustomError(t.error,this):null},t.prototype.dynamicPanelAdded=function(e,t,n){if(this.isLoadingFromJson||this.updateVisibleIndexes(),!this.onDynamicPanelAdded.isEmpty){var r=e.panels;void 0===t&&(n=r[t=r.length-1]),this.onDynamicPanelAdded.fire(this,{question:e,panel:n,panelIndex:t})}},t.prototype.dynamicPanelRemoved=function(e,t,n){for(var r=n?n.questions:[],i=0;i<r.length;i++)r[i].clearOnDeletingContainer();this.updateVisibleIndexes(),this.onDynamicPanelRemoved.fire(this,{question:e,panelIndex:t,panel:n})},t.prototype.dynamicPanelRemoving=function(e,t,n){var r={question:e,panelIndex:t,panel:n,allow:!0};return this.onDynamicPanelRemoving.fire(this,r),r.allow},t.prototype.dynamicPanelItemValueChanged=function(e,t){t.question=e,this.onDynamicPanelItemValueChanged.fire(this,t)},t.prototype.dragAndDropAllow=function(e){return e.allow=!0,this.onDragDropAllow.fire(this,e),e.allow},t.prototype.elementContentVisibilityChanged=function(e){this.currentPage&&this.currentPage.ensureRowsVisibility(),this.onElementContentVisibilityChanged.fire(this,{element:e})},t.prototype.getUpdatedElementTitleActions=function(e,t){return e.isPage?this.getUpdatedPageTitleActions(e,t):e.isPanel?this.getUpdatedPanelTitleActions(e,t):this.getUpdatedQuestionTitleActions(e,t)},t.prototype.getUpdatedQuestionTitleActions=function(e,t){var n={question:e,titleActions:t};return this.onGetQuestionTitleActions.fire(this,n),n.titleActions},t.prototype.getUpdatedPanelTitleActions=function(e,t){var n={panel:e,titleActions:t};return this.onGetPanelTitleActions.fire(this,n),n.titleActions},t.prototype.getUpdatedPageTitleActions=function(e,t){var n={page:e,titleActions:t};return this.onGetPageTitleActions.fire(this,n),n.titleActions},t.prototype.getUpdatedMatrixRowActions=function(e,t,n){var r={question:e,actions:n,row:t};return this.onGetMatrixRowActions.fire(this,r),r.actions},t.prototype.scrollElementToTop=function(e,t,n,r){var i={element:e,question:t,page:n,elementId:r,cancel:!1};this.onScrollingElementToTop.fire(this,i),i.cancel||s.SurveyElement.ScrollElementToTop(i.elementId)},t.prototype.uploadFiles=function(e,t,n,r){this.onUploadFiles.isEmpty?r("error",n):this.onUploadFiles.fire(this,{question:e,name:t,files:n||[],callback:r}),this.surveyPostId&&this.uploadFilesCore(t,n,r)},t.prototype.downloadFile=function(e,t,n,r){this.onDownloadFile.isEmpty&&r&&r("success",n.content||n),this.onDownloadFile.fire(this,{question:e,name:t,content:n.content||n,fileValue:n,callback:r})},t.prototype.clearFiles=function(e,t,n,r,i){this.onClearFiles.isEmpty&&i&&i("success",n),this.onClearFiles.fire(this,{question:e,name:t,value:n,fileName:r,callback:i})},t.prototype.updateChoicesFromServer=function(e,t,n){var r={question:e,choices:t,serverResult:n};return this.onLoadChoicesFromServer.fire(this,r),r.choices},t.prototype.loadedChoicesFromServer=function(e){this.locStrsChanged()},t.prototype.createSurveyService=function(){return new d.dxSurveyService},t.prototype.uploadFilesCore=function(e,t,n){var r=this,i=[];t.forEach(function(e){n&&n("uploading",e),r.createSurveyService().sendFile(r.surveyPostId,e,function(r,o){r?(i.push({content:o,file:e}),i.length===t.length&&n&&n("success",i)):n&&n("error",{response:o,file:e})})})},t.prototype.getPage=function(e){return this.pages[e]},t.prototype.addPage=function(e,t){void 0===t&&(t=-1),null!=e&&(t<0||t>=this.pages.length?this.pages.push(e):this.pages.splice(t,0,e))},t.prototype.addNewPage=function(e,t){void 0===e&&(e=null),void 0===t&&(t=-1);var n=this.createNewPage(e);return this.addPage(n,t),n},t.prototype.removePage=function(e){var t=this.pages.indexOf(e);t<0||(this.pages.splice(t,1),this.currentPage==e&&(this.currentPage=this.pages.length>0?this.pages[0]:null))},t.prototype.getQuestionByName=function(e,t){if(void 0===t&&(t=!1),!e)return null;t&&(e=e.toLowerCase());var n=(t?this.questionHashes.namesInsensitive:this.questionHashes.names)[e];return n?n[0]:null},t.prototype.getQuestionByValueName=function(e,t){void 0===t&&(t=!1);var n=this.getQuestionsByValueName(e,t);return n?n[0]:null},t.prototype.getQuestionsByValueName=function(e,t){return void 0===t&&(t=!1),(t?this.questionHashes.valueNamesInsensitive:this.questionHashes.valueNames)[e]||null},t.prototype.getCalculatedValueByName=function(e){for(var t=0;t<this.calculatedValues.length;t++)if(e==this.calculatedValues[t].name)return this.calculatedValues[t];return null},t.prototype.getQuestionsByNames=function(e,t){void 0===t&&(t=!1);var n=[];if(!e)return n;for(var r=0;r<e.length;r++)if(e[r]){var i=this.getQuestionByName(e[r],t);i&&n.push(i)}return n},t.prototype.getPageByElement=function(e){for(var t=0;t<this.pages.length;t++){var n=this.pages[t];if(n.containsElement(e))return n}return null},t.prototype.getPageByQuestion=function(e){return this.getPageByElement(e)},t.prototype.getPageByName=function(e){for(var t=0;t<this.pages.length;t++)if(this.pages[t].name==e)return this.pages[t];return null},t.prototype.getPagesByNames=function(e){var t=[];if(!e)return t;for(var n=0;n<e.length;n++)if(e[n]){var r=this.getPageByName(e[n]);r&&t.push(r)}return t},t.prototype.getAllQuestions=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);for(var n=new Array,r=0;r<this.pages.length;r++)this.pages[r].addQuestionsToList(n,e,t);return n},t.prototype.getQuizQuestions=function(){for(var e=new Array,t=this.getPageStartIndex();t<this.pages.length;t++)if(this.pages[t].isVisible)for(var n=this.pages[t].questions,r=0;r<n.length;r++){var i=n[r];i.quizQuestionCount>0&&e.push(i)}return e},t.prototype.getPanelByName=function(e,t){void 0===t&&(t=!1);var n=this.getAllPanels();t&&(e=e.toLowerCase());for(var r=0;r<n.length;r++){var i=n[r].name;if(t&&(i=i.toLowerCase()),i==e)return n[r]}return null},t.prototype.getAllPanels=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);for(var n=new Array,r=0;r<this.pages.length;r++)this.pages[r].addPanelsIntoList(n,e,t);return n},t.prototype.createNewPage=function(e){var t=o.Serializer.createClass("page");return t.name=e,t},t.prototype.questionOnValueChanging=function(e,t){if(this.editingObj){var n=o.Serializer.findProperty(this.editingObj.getType(),e);n&&(t=n.settingValue(this.editingObj,t))}if(this.onValueChanging.isEmpty)return t;var r={name:e,question:this.getQuestionByValueName(e),value:this.getUnbindValue(t),oldValue:this.getValue(e)};return this.onValueChanging.fire(this,r),r.value},t.prototype.updateQuestionValue=function(e,t){if(!this.isLoadingFromJson){var n=this.getQuestionsByValueName(e);if(n)for(var r=0;r<n.length;r++){var i=n[r].value;(i===t&&Array.isArray(i)&&this.editingObj||!this.isTwoValueEquals(i,t))&&n[r].updateValueFromSurvey(t)}}},t.prototype.checkQuestionErrorOnValueChanged=function(e){!this.isNavigationButtonPressed&&("onValueChanged"===this.checkErrorsMode||e.getAllErrors().length>0)&&this.checkQuestionErrorOnValueChangedCore(e)},t.prototype.checkQuestionErrorOnValueChangedCore=function(e){var t=e.getAllErrors().length,n=e.hasErrors(!0,{isOnValueChanged:!this.isValidateOnValueChanging});return e.page&&(t>0||e.getAllErrors().length>0)&&this.fireValidatedErrorsOnPage(e.page),n},t.prototype.checkErrorsOnValueChanging=function(e,t){if(this.isLoadingFromJson)return!1;var n=this.getQuestionsByValueName(e);if(!n)return!1;for(var r=!1,i=0;i<n.length;i++){var o=n[i];this.isTwoValueEquals(o.valueForSurvey,t)||(o.value=t),this.checkQuestionErrorOnValueChangedCore(o)&&(r=!0),r=r||o.errors.length>0}return r},t.prototype.notifyQuestionOnValueChanged=function(e,t){if(!this.isLoadingFromJson){var n=this.getQuestionsByValueName(e);if(n)for(var r=0;r<n.length;r++){var i=n[r];this.checkQuestionErrorOnValueChanged(i),i.onSurveyValueChanged(t),this.onValueChanged.fire(this,{name:e,question:i,value:t})}else this.onValueChanged.fire(this,{name:e,question:null,value:t});this.isDisposed||(this.checkElementsBindings(e,t),this.notifyElementsOnAnyValueOrVariableChanged(e))}},t.prototype.checkElementsBindings=function(e,t){this.isRunningElementsBindings=!0;for(var n=0;n<this.pages.length;n++)this.pages[n].checkBindings(e,t);this.isRunningElementsBindings=!1,this.updateVisibleIndexAfterBindings&&(this.updateVisibleIndexes(),this.updateVisibleIndexAfterBindings=!1)},t.prototype.notifyElementsOnAnyValueOrVariableChanged=function(e){if("processing"!==this.isEndLoadingFromJson)if(this.isRunningConditions)this.conditionNotifyElementsOnAnyValueOrVariableChanged=!0;else{for(var t=0;t<this.pages.length;t++)this.pages[t].onAnyValueChanged(e);this.isEndLoadingFromJson||this.locStrsChanged()}},t.prototype.updateAllQuestionsValue=function(){for(var e=this.getAllQuestions(),t=0;t<e.length;t++){var n=e[t],r=n.getValueName();n.updateValueFromSurvey(this.getValue(r)),n.requireUpdateCommentValue&&n.updateCommentFromSurvey(this.getComment(r))}},t.prototype.notifyAllQuestionsOnValueChanged=function(){for(var e=this.getAllQuestions(),t=0;t<e.length;t++)e[t].onSurveyValueChanged(this.getValue(e[t].getValueName()))},t.prototype.checkOnPageTriggers=function(){for(var e=this.getCurrentPageQuestions(!0),t={},n=0;n<e.length;n++){var r=e[n].getValueName();t[r]=this.getValue(r)}this.addCalculatedValuesIntoFilteredValues(t),this.checkTriggers(t,!0)},t.prototype.getCurrentPageQuestions=function(e){void 0===e&&(e=!1);var t=[],n=this.currentPage;if(!n)return t;for(var r=0;r<n.questions.length;r++){var i=n.questions[r];(e||i.visible)&&i.name&&t.push(i)}return t},t.prototype.checkTriggers=function(e,t){if(!this.isCompleted&&0!=this.triggers.length&&!this.isDisplayMode)if(this.isTriggerIsRunning)for(var n in this.triggerValues=this.getFilteredValues(),e)this.triggerKeys[n]=e[n];else{this.isTriggerIsRunning=!0,this.triggerKeys=e,this.triggerValues=this.getFilteredValues();var r=this.getFilteredProperties(),i=this.canBeCompletedByTrigger;this.canBeCompletedByTrigger=!1;for(var o=0;o<this.triggers.length;o++)this.triggers[o].checkExpression(t,this.triggerKeys,this.triggerValues,r);i!==this.canBeCompletedByTrigger&&this.updateButtonsVisibility(),this.isTriggerIsRunning=!1}},t.prototype.doElementsOnLoad=function(){for(var e=0;e<this.pages.length;e++)this.pages[e].onSurveyLoad()},Object.defineProperty(t.prototype,"isRunningConditions",{get:function(){return!!this.conditionValues},enumerable:!1,configurable:!0}),t.prototype.runConditions=function(){if(!this.isCompleted&&"processing"!==this.isEndLoadingFromJson&&!this.isRunningConditions){this.conditionValues=this.getFilteredValues();var e=this.getFilteredProperties(),t=this.pages.indexOf(this.currentPage);this.runConditionsCore(e),this.checkIfNewPagesBecomeVisible(t),this.conditionValues=null,this.isValueChangedOnRunningCondition&&this.conditionRunnerCounter<y.settings.maximumConditionRunCountOnValueChanged?(this.isValueChangedOnRunningCondition=!1,this.conditionRunnerCounter++,this.runConditions()):(this.isValueChangedOnRunningCondition=!1,this.conditionRunnerCounter=0,this.conditionUpdateVisibleIndexes&&(this.conditionUpdateVisibleIndexes=!1,this.updateVisibleIndexes()),this.conditionNotifyElementsOnAnyValueOrVariableChanged&&(this.conditionNotifyElementsOnAnyValueOrVariableChanged=!1,this.notifyElementsOnAnyValueOrVariableChanged("")))}},t.prototype.runConditionOnValueChanged=function(e,t){this.isRunningConditions?(this.conditionValues[e]=t,this.isValueChangedOnRunningCondition=!0):this.runConditions()},t.prototype.runConditionsCore=function(t){for(var n=this.pages,r=0;r<this.calculatedValues.length;r++)this.calculatedValues[r].resetCalculation();for(r=0;r<this.calculatedValues.length;r++)this.calculatedValues[r].doCalculation(this.calculatedValues,this.conditionValues,t);for(e.prototype.runConditionCore.call(this,this.conditionValues,t),r=0;r<n.length;r++)n[r].runCondition(this.conditionValues,t)},t.prototype.checkIfNewPagesBecomeVisible=function(e){var t=this.pages.indexOf(this.currentPage);if(!(t<=e+1))for(var n=e+1;n<t;n++)if(this.pages[n].isVisible){this.currentPage=this.pages[n];break}},t.prototype.sendResult=function(e,t,n){if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=!1),this.isEditMode&&(n&&this.onPartialSend&&this.onPartialSend.fire(this,null),!e&&this.surveyPostId&&(e=this.surveyPostId),e&&(t&&(this.clientId=t),!n||this.clientId))){var r=this;this.surveyShowDataSaving&&this.setCompletedState("saving",""),this.createSurveyService().sendResult(e,this.data,function(e,t,n){r.surveyShowDataSaving&&(e?r.setCompletedState("success",""):r.setCompletedState("error",t)),r.onSendResult.fire(r,{success:e,response:t,request:n})},this.clientId,n)}},t.prototype.getResult=function(e,t){var n=this;this.createSurveyService().getResult(e,t,function(e,t,r,i){n.onGetResult.fire(n,{success:e,data:t,dataList:r,response:i})})},t.prototype.loadSurveyFromService=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e&&(this.surveyId=e),t&&(this.clientId=t);var n=this;this.isLoading=!0,this.onLoadingSurveyFromService(),t?this.createSurveyService().getSurveyJsonAndIsCompleted(this.surveyId,this.clientId,function(e,t,r,i){n.isLoading=!1,e&&(n.isCompletedBefore="completed"==r,n.loadSurveyFromServiceJson(t))}):this.createSurveyService().loadSurvey(this.surveyId,function(e,t,r){n.isLoading=!1,e&&n.loadSurveyFromServiceJson(t)})},t.prototype.loadSurveyFromServiceJson=function(e){e&&(this.fromJSON(e),this.notifyAllQuestionsOnValueChanged(),this.onLoadSurveyFromService(),this.onLoadedSurveyFromService.fire(this,{}))},t.prototype.onLoadingSurveyFromService=function(){},t.prototype.onLoadSurveyFromService=function(){},t.prototype.resetVisibleIndexes=function(){for(var e=this.getAllQuestions(!0),t=0;t<e.length;t++)e[t].setVisibleIndex(-1);this.updateVisibleIndexes()},t.prototype.updateVisibleIndexes=function(){if(!this.isLoadingFromJson&&!this.isEndLoadingFromJson)if(this.isRunningConditions&&this.onVisibleChanged.isEmpty&&this.onPageVisibleChanged.isEmpty)this.conditionUpdateVisibleIndexes=!0;else if(this.isRunningElementsBindings)this.updateVisibleIndexAfterBindings=!0;else{if(this.updatePageVisibleIndexes(this.showPageNumbers),"onPage"==this.showQuestionNumbers)for(var e=this.visiblePages,t=0;t<e.length;t++)e[t].setVisibleIndex(0);else{var n="on"==this.showQuestionNumbers?0:-1;for(t=0;t<this.pages.length;t++)n+=this.pages[t].setVisibleIndex(n)}this.updateProgressText(!0)}},t.prototype.updatePageVisibleIndexes=function(e){this.updateButtonsVisibility();for(var t=0,n=0;n<this.pages.length;n++){var r=this.pages[n],i=r.isVisible&&(n>0||!r.isStarted);r.visibleIndex=i?t++:-1,r.num=i?r.visibleIndex+1:-1}},t.prototype.fromJSON=function(e){if(e){this.questionHashesClear(),this.jsonErrors=null;var t=new o.JsonObject;t.toObject(e,this),t.errors.length>0&&(this.jsonErrors=t.errors),this.onStateAndCurrentPageChanged(),this.updateState()}},t.prototype.setJsonObject=function(e){this.fromJSON(e)},t.prototype.endLoadingFromJson=function(){this.isEndLoadingFromJson="processing",this.onFirstPageIsStartedChanged(),this.onQuestionsOnPageModeChanged("standard"),e.prototype.endLoadingFromJson.call(this),this.hasCookie&&this.doComplete(),this.doElementsOnLoad(),this.isEndLoadingFromJson="conditions",this.runConditions(),this.notifyElementsOnAnyValueOrVariableChanged(""),this.isEndLoadingFromJson=null,this.updateVisibleIndexes(),this.updateCurrentPage(),this.hasDescription=!!this.description},t.prototype.updateNavigationCss=function(){this.navigationBar&&(this.updateNavigationBarCss(),this.updateNavigationItemCssCallback&&this.updateNavigationItemCssCallback())},t.prototype.updateNavigationBarCss=function(){var e=this.navigationBar;e.cssClasses=this.css.actionBar,e.containerCss=this.css.footer},t.prototype.createNavigationBar=function(){var e=new w.ActionContainer;return e.setItems(this.createNavigationActions()),e},t.prototype.createNavigationActions=function(){var e=this,t=new _.Action({id:"sv-nav-start",visible:new a.ComputedUpdater(function(){return e.isShowStartingPage}),visibleIndex:10,locTitle:this.locStartSurveyText,action:function(){return e.start()},component:"sv-nav-btn"}),n=new _.Action({id:"sv-nav-prev",visible:new a.ComputedUpdater(function(){return e.isShowPrevButton}),visibleIndex:20,data:{mouseDown:function(){return e.navigationMouseDown()}},locTitle:this.locPagePrevText,action:function(){return e.prevPage()},component:"sv-nav-btn"}),r=new _.Action({id:"sv-nav-next",visible:new a.ComputedUpdater(function(){return e.isShowNextButton}),visibleIndex:30,data:{mouseDown:function(){return e.nextPageMouseDown()}},locTitle:this.locPageNextText,action:function(){return e.nextPageUIClick()},component:"sv-nav-btn"}),i=new _.Action({id:"sv-nav-preview",visible:new a.ComputedUpdater(function(){return e.isPreviewButtonVisible}),visibleIndex:40,data:{mouseDown:function(){return e.navigationMouseDown()}},locTitle:this.locPreviewText,action:function(){return e.showPreview()},component:"sv-nav-btn"}),o=new _.Action({id:"sv-nav-complete",visible:new a.ComputedUpdater(function(){return e.isCompleteButtonVisible}),visibleIndex:50,data:{mouseDown:function(){return e.navigationMouseDown()}},locTitle:this.locCompleteText,action:function(){return e.completeLastPage()},component:"sv-nav-btn"});return this.updateNavigationItemCssCallback=function(){t.innerCss=e.cssNavigationStart,n.innerCss=e.cssNavigationPrev,r.innerCss=e.cssNavigationNext,i.innerCss=e.cssNavigationPreview,o.innerCss=e.cssNavigationComplete},[t,n,r,i,o]},t.prototype.onBeforeCreating=function(){},t.prototype.onCreating=function(){},t.prototype.getProcessedTextValue=function(e){if(this.getProcessedTextValueCore(e),!this.onProcessTextValue.isEmpty){var t=this.isValueEmpty(e.value);this.onProcessTextValue.fire(this,e),e.isExists=e.isExists||t&&!this.isValueEmpty(e.value)}},t.prototype.getBuiltInVariableValue=function(e){if("pageno"===e){var t=this.currentPage;return null!=t?this.visiblePages.indexOf(t)+1:0}return"pagecount"===e?this.visiblePageCount:"correctedanswers"===e||"correctanswers"===e||"correctedanswercount"===e?this.getCorrectedAnswerCount():"incorrectedanswers"===e||"incorrectanswers"===e||"incorrectedanswercount"===e?this.getInCorrectedAnswerCount():"questioncount"===e?this.getQuizQuestionCount():void 0},t.prototype.getProcessedTextValueCore=function(e){var t=e.name.toLocaleLowerCase();if(-1===["no","require","title"].indexOf(t)){var n=this.getBuiltInVariableValue(t);if(void 0!==n)return e.isExists=!0,void(e.value=n);if("locale"===t)return e.isExists=!0,void(e.value=this.locale?this.locale:h.surveyLocalization.defaultLocale);var r=this.getVariable(t);if(void 0!==r)return e.isExists=!0,void(e.value=r);var i=this.getFirstName(t);if(i){e.isExists=!0;var o=i.getValueName().toLowerCase();t=(t=o+t.substring(o.length)).toLocaleLowerCase();var a={};return a[o]=e.returnDisplayValue?i.getDisplayValue(!1,void 0):i.value,void(e.value=(new c.ProcessValue).getValue(t,a))}this.getProcessedValuesWithoutQuestion(e)}},t.prototype.getProcessedValuesWithoutQuestion=function(e){var t=this.getValue(e.name);if(void 0!==t)return e.isExists=!0,void(e.value=t);var n=new c.ProcessValue,r=n.getFirstName(e.name);if(r!==e.name){var o={},a=this.getValue(r);i.Helpers.isValueEmpty(a)&&(a=this.getVariable(r)),i.Helpers.isValueEmpty(a)||(o[r]=a,e.value=n.getValue(e.name,o),e.isExists=n.hasValue(e.name,o))}},t.prototype.getFirstName=function(e){var t;e=e.toLowerCase();do{t=this.getQuestionByValueName(e,!0),e=this.reduceFirstName(e)}while(!t&&e);return t},t.prototype.reduceFirstName=function(e){var t=e.lastIndexOf("."),n=e.lastIndexOf("[");if(t<0&&n<0)return"";var r=Math.max(t,n);return e.substring(0,r)},t.prototype.clearUnusedValues=function(){for(var e=this.getAllQuestions(),t=0;t<e.length;t++)e[t].clearUnusedValues();this.clearInvisibleQuestionValues()},t.prototype.hasVisibleQuestionByValueName=function(e){var t=this.getQuestionsByValueName(e);if(!t)return!1;for(var n=0;n<t.length;n++)if(t[n].isVisible&&t[n].isParentVisible)return!0;return!1},t.prototype.questionCountByValueName=function(e){var t=this.getQuestionsByValueName(e);return t?t.length:0},t.prototype.clearInvisibleQuestionValues=function(){for(var e="none"===this.clearInvisibleValues?"none":"onComplete",t=this.getAllQuestions(),n=0;n<t.length;n++)t[n].clearValueIfInvisible(e)},t.prototype.getVariable=function(e){if(!e)return null;e=e.toLowerCase();var t=this.variablesHash[e];return this.isValueEmpty(t)&&(e.indexOf(".")>-1||e.indexOf("[")>-1)&&(new c.ProcessValue).hasValue(e,this.variablesHash)?(new c.ProcessValue).getValue(e,this.variablesHash):t},t.prototype.setVariable=function(e,t){e&&(e=e.toLowerCase(),this.variablesHash[e]=t,this.notifyElementsOnAnyValueOrVariableChanged(e),this.runConditionOnValueChanged(e,t),this.onVariableChanged.fire(this,{name:e,value:t}))},t.prototype.getVariableNames=function(){var e=[];for(var t in this.variablesHash)e.push(t);return e},t.prototype.getUnbindValue=function(e){return this.editingObj?e:i.Helpers.getUnbindValue(e)},t.prototype.getValue=function(e){if(!e||0==e.length)return null;var t=this.getDataValueCore(this.valuesHash,e);return this.getUnbindValue(t)},t.prototype.setValue=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0);var i=t;if(r&&(i=this.questionOnValueChanging(e,t)),(!this.isValidateOnValueChanging||!this.checkErrorsOnValueChanging(e,i))&&(this.editingObj||!this.isValueEqual(e,i)||!this.isTwoValueEquals(i,t))){var o=this.getValue(e);this.isValueEmpty(i)?this.deleteDataValueCore(this.valuesHash,e):(i=this.getUnbindValue(i),this.setDataValueCore(this.valuesHash,e,i)),this.updateOnSetValue(e,i,o,n,r)}},t.prototype.updateOnSetValue=function(e,t,n,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!0),this.updateQuestionValue(e,t),!0!==r&&!this.isDisposed&&!this.isRunningElementsBindings){var o={};o[e]={newValue:t,oldValue:n},this.runConditionOnValueChanged(e,t),this.checkTriggers(o,!1),i&&this.notifyQuestionOnValueChanged(e,t),"text"!==r&&this.tryGoNextPageAutomatic(e)}},t.prototype.isValueEqual=function(e,t){""!==t&&void 0!==t||(t=null);var n=this.getValue(e);return""!==n&&void 0!==n||(n=null),null===t||null===n?t===n:this.isTwoValueEquals(t,n)},t.prototype.doOnPageAdded=function(e){e.setSurveyImpl(this),e.name||(e.name=this.generateNewName(this.pages,"page")),this.questionHashesPanelAdded(e),this.updateVisibleIndexes(),this.isLoadingFromJson||(this.updateProgressText(),this.updateCurrentPage()),this.onPageAdded.fire(this,{page:e})},t.prototype.doOnPageRemoved=function(e){e.setSurveyImpl(null),e===this.currentPage&&this.updateCurrentPage(),this.updateVisibleIndexes(),this.updateProgressText(),this.updateLazyRenderingRowsOnRemovingElements()},t.prototype.generateNewName=function(e,t){for(var n={},r=0;r<e.length;r++)n[e[r].name]=!0;for(var i=1;n[t+i];)i++;return t+i},t.prototype.tryGoNextPageAutomatic=function(e){if(!this.isEndLoadingFromJson&&this.goNextPageAutomatic&&this.currentPage){var t=this.getQuestionByValueName(e);if(t&&(!t||t.visible&&t.supportGoNextPageAutomatic())&&(!t.hasErrors(!1)||t.supportGoNextPageError())){var n=this.getCurrentPageQuestions();if(!(n.indexOf(t)<0)){for(var r=0;r<n.length;r++)if(n[r].hasInput&&n[r].isEmpty())return;this.checkIsCurrentPageHasErrors(!1)||(this.isLastPage?!0===this.goNextPageAutomatic&&this.allowCompleteSurveyAutomatic&&(this.isShowPreviewBeforeComplete?this.showPreview():this.completeLastPage()):this.nextPage())}}}},t.prototype.getComment=function(e){return this.getValue(e+this.commentPrefix)||""},t.prototype.setComment=function(e,t,n){if(void 0===n&&(n=!1),t||(t=""),!this.isTwoValueEquals(t,this.getComment(e))){var r=e+this.commentPrefix;this.isValueEmpty(t)?this.deleteDataValueCore(this.valuesHash,r):this.setDataValueCore(this.valuesHash,r,t);var i=this.getQuestionsByValueName(e);if(i)for(var o=0;o<i.length;o++)i[o].updateCommentFromSurvey(t),this.checkQuestionErrorOnValueChanged(i[o]);n||this.runConditionOnValueChanged(e,this.getValue(e)),"text"!==n&&this.tryGoNextPageAutomatic(e);var a=this.getQuestionByName(e);a&&this.onValueChanged.fire(this,{name:r,question:a,value:t})}},t.prototype.clearValue=function(e){this.setValue(e,null),this.setComment(e,null)},Object.defineProperty(t.prototype,"clearValueOnDisableItems",{get:function(){return this.getPropertyValue("clearValueOnDisableItems",!1)},set:function(e){this.setPropertyValue("clearValueOnDisableItems",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isClearValueOnHidden",{get:function(){return"onHidden"==this.clearInvisibleValues||this.isClearValueOnHiddenContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isClearValueOnHiddenContainer",{get:function(){return"onHiddenContainer"==this.clearInvisibleValues&&!this.isShowingPreview&&!this.runningPages},enumerable:!1,configurable:!0}),t.prototype.questionVisibilityChanged=function(e,t){this.updateVisibleIndexes(),this.onVisibleChanged.fire(this,{question:e,name:e.name,visible:t})},t.prototype.pageVisibilityChanged=function(e,t){this.isLoadingFromJson||((t&&!this.currentPage||e===this.currentPage)&&this.updateCurrentPage(),this.updateVisibleIndexes(),this.onPageVisibleChanged.fire(this,{page:e,visible:t}))},t.prototype.panelVisibilityChanged=function(e,t){this.updateVisibleIndexes(),this.onPanelVisibleChanged.fire(this,{panel:e,visible:t})},t.prototype.questionCreated=function(e){this.onQuestionCreated.fire(this,{question:e})},t.prototype.questionAdded=function(e,t,n,r){e.name||(e.name=this.generateNewName(this.getAllQuestions(!1,!0),"question")),e.page&&this.questionHashesAdded(e),this.currentPage||this.updateCurrentPage(),this.updateVisibleIndexes(),(!this.isMovingQuestion||this.isDesignMode&&!y.settings.supportCreatorV2)&&this.onQuestionAdded.fire(this,{question:e,name:e.name,index:t,parentPanel:n,rootPanel:r})},t.prototype.questionRemoved=function(e){this.questionHashesRemoved(e,e.name,e.getValueName()),this.updateVisibleIndexes(),this.onQuestionRemoved.fire(this,{question:e,name:e.name}),this.updateLazyRenderingRowsOnRemovingElements()},t.prototype.questionRenamed=function(e,t,n){this.questionHashesRemoved(e,t,n),this.questionHashesAdded(e)},t.prototype.questionHashesClear=function(){this.questionHashes.names={},this.questionHashes.namesInsensitive={},this.questionHashes.valueNames={},this.questionHashes.valueNamesInsensitive={}},t.prototype.questionHashesPanelAdded=function(e){if(!this.isLoadingFromJson)for(var t=e.questions,n=0;n<t.length;n++)this.questionHashesAdded(t[n])},t.prototype.questionHashesAdded=function(e){this.questionHashAddedCore(this.questionHashes.names,e,e.name),this.questionHashAddedCore(this.questionHashes.namesInsensitive,e,e.name.toLowerCase()),this.questionHashAddedCore(this.questionHashes.valueNames,e,e.getValueName()),this.questionHashAddedCore(this.questionHashes.valueNamesInsensitive,e,e.getValueName().toLowerCase())},t.prototype.questionHashesRemoved=function(e,t,n){t&&(this.questionHashRemovedCore(this.questionHashes.names,e,t),this.questionHashRemovedCore(this.questionHashes.namesInsensitive,e,t.toLowerCase())),n&&(this.questionHashRemovedCore(this.questionHashes.valueNames,e,n),this.questionHashRemovedCore(this.questionHashes.valueNamesInsensitive,e,n.toLowerCase()))},t.prototype.questionHashAddedCore=function(e,t,n){var r;(r=e[n])?(r=e[n]).indexOf(t)<0&&r.push(t):e[n]=[t]},t.prototype.questionHashRemovedCore=function(e,t,n){var r=e[n];if(r){var i=r.indexOf(t);i>-1&&r.splice(i,1),0==r.length&&delete e[n]}},t.prototype.panelAdded=function(e,t,n,r){e.name||(e.name=this.generateNewName(this.getAllPanels(!1,!0),"panel")),this.questionHashesPanelAdded(e),this.updateVisibleIndexes(),this.onPanelAdded.fire(this,{panel:e,name:e.name,index:t,parentPanel:n,rootPanel:r})},t.prototype.panelRemoved=function(e){this.updateVisibleIndexes(),this.onPanelRemoved.fire(this,{panel:e,name:e.name}),this.updateLazyRenderingRowsOnRemovingElements()},t.prototype.validateQuestion=function(e){if(this.onValidateQuestion.isEmpty)return null;var t={name:e.name,question:e,value:e.value,error:null};return this.onValidateQuestion.fire(this,t),t.error?new p.CustomError(t.error,this):null},t.prototype.validatePanel=function(e){if(this.onValidatePanel.isEmpty)return null;var t={name:e.name,panel:e,error:null};return this.onValidatePanel.fire(this,t),t.error?new p.CustomError(t.error,this):null},t.prototype.processHtml=function(e){var t={html:e};return this.onProcessHtml.fire(this,t),this.processText(t.html,!0)},t.prototype.processText=function(e,t){return this.processTextEx(e,t,!1).text},t.prototype.processTextEx=function(e,t,n){var r={text:this.processTextCore(e,t,n),hasAllValuesOnLastRun:!0};return r.hasAllValuesOnLastRun=this.textPreProcessor.hasAllValuesOnLastRun,r},t.prototype.processTextCore=function(e,t,n){return void 0===n&&(n=!1),this.isDesignMode?e:this.textPreProcessor.process(e,t,n)},t.prototype.getSurveyMarkdownHtml=function(e,t,n){var r={element:e,text:t,name:n,html:null};return this.onTextMarkdown.fire(this,r),r.html},t.prototype.getCorrectedAnswerCount=function(){return this.getCorrectedAnswerCountCore(!0)},t.prototype.getCorrectAnswerCount=function(){return this.getCorrectedAnswerCountCore(!0)},t.prototype.getQuizQuestionCount=function(){for(var e=this.getQuizQuestions(),t=0,n=0;n<e.length;n++)t+=e[n].quizQuestionCount;return t},t.prototype.getInCorrectedAnswerCount=function(){return this.getCorrectedAnswerCountCore(!1)},t.prototype.getInCorrectAnswerCount=function(){return this.getCorrectedAnswerCountCore(!1)},t.prototype.getCorrectedAnswerCountCore=function(e){for(var t=this.getQuizQuestions(),n=0,r={question:null,result:!1,correctAnswers:0,incorrectAnswers:0},i=0;i<t.length;i++){var o=t[i],a=o.quizQuestionCount;if(r.question=o,r.correctAnswers=o.correctAnswerCount,r.incorrectAnswers=a-r.correctAnswers,r.result=r.question.isAnswerCorrect(),this.onIsAnswerCorrect.fire(this,r),e){if(r.result||r.correctAnswers<a){var s=r.correctAnswers;0==s&&r.result&&(s=1),n+=s}}else(!r.result||r.incorrectAnswers<a)&&(n+=r.incorrectAnswers)}return n},t.prototype.getCorrectedAnswers=function(){return this.getCorrectedAnswerCount()},t.prototype.getInCorrectedAnswers=function(){return this.getInCorrectedAnswerCount()},Object.defineProperty(t.prototype,"showTimerPanel",{get:function(){return this.getPropertyValue("showTimerPanel")},set:function(e){this.setPropertyValue("showTimerPanel",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTimerPanelShowingOnTop",{get:function(){return this.timerModel.isRunning&&"top"==this.showTimerPanel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTimerPanelShowingOnBottom",{get:function(){return this.timerModel.isRunning&&"bottom"==this.showTimerPanel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showTimerPanelMode",{get:function(){return this.getPropertyValue("showTimerPanelMode")},set:function(e){this.setPropertyValue("showTimerPanelMode",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widthMode",{get:function(){return this.getPropertyValue("widthMode")},set:function(e){this.setPropertyValue("widthMode",e)},enumerable:!1,configurable:!0}),t.prototype.calculateWidthMode=function(){if("auto"==this.widthMode){var e=!1;return this.pages.forEach(function(t){t.needResponsiveWidth()&&(e=!0)}),e?"responsive":"static"}return this.widthMode},Object.defineProperty(t.prototype,"width",{get:function(){return this.getPropertyValue("width")},set:function(e){this.setPropertyValue("width",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timerInfoText",{get:function(){var e={text:this.getTimerInfoText()};this.onTimerPanelInfoText.fire(this,e);var t=new f.LocalizableString(this,!0);return t.text=e.text,t.textOrHtml},enumerable:!1,configurable:!0}),t.prototype.getTimerInfoText=function(){var e=this.currentPage;if(!e)return"";var t=this.getDisplayTime(e.timeSpent),n=this.getDisplayTime(this.timeSpent),r=this.getPageMaxTimeToFinish(e),i=this.getDisplayTime(r),o=this.getDisplayTime(this.maxTimeToFinish);return"page"==this.showTimerPanelMode?this.getTimerInfoPageText(e,t,i):"survey"==this.showTimerPanelMode?this.getTimerInfoSurveyText(n,o):"all"==this.showTimerPanelMode?r<=0&&this.maxTimeToFinish<=0?this.getLocalizationFormatString("timerSpentAll",t,n):r>0&&this.maxTimeToFinish>0?this.getLocalizationFormatString("timerLimitAll",t,i,n,o):this.getTimerInfoPageText(e,t,i)+" "+this.getTimerInfoSurveyText(n,o):""},t.prototype.getTimerInfoPageText=function(e,t,n){return this.getPageMaxTimeToFinish(e)>0?this.getLocalizationFormatString("timerLimitPage",t,n):this.getLocalizationFormatString("timerSpentPage",t,n)},t.prototype.getTimerInfoSurveyText=function(e,t){return this.getLocalizationFormatString(this.maxTimeToFinish>0?"timerLimitSurvey":"timerSpentSurvey",e,t)},t.prototype.getDisplayTime=function(e){var t=Math.floor(e/60),n=e%60,r="";return t>0&&(r+=t+" "+this.getLocalizationString("timerMin")),r&&0==n?r:(r&&(r+=" "),r+n+" "+this.getLocalizationString("timerSec"))},Object.defineProperty(t.prototype,"timerModel",{get:function(){return this.timerModelValue},enumerable:!1,configurable:!0}),t.prototype.startTimer=function(){this.timerModel.start()},t.prototype.startTimerFromUI=function(){"none"!=this.showTimerPanel&&"running"===this.state&&this.startTimer()},t.prototype.stopTimer=function(){this.timerModel.stop()},Object.defineProperty(t.prototype,"timeSpent",{get:function(){return this.timerModel.spent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxTimeToFinish",{get:function(){return this.getPropertyValue("maxTimeToFinish",0)},set:function(e){this.setPropertyValue("maxTimeToFinish",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxTimeToFinishPage",{get:function(){return this.getPropertyValue("maxTimeToFinishPage",0)},set:function(e){this.setPropertyValue("maxTimeToFinishPage",e)},enumerable:!1,configurable:!0}),t.prototype.getPageMaxTimeToFinish=function(e){return!e||e.maxTimeToFinish<0?0:e.maxTimeToFinish>0?e.maxTimeToFinish:this.maxTimeToFinishPage},t.prototype.doTimer=function(e){if(this.onTimer.fire(this,{}),this.maxTimeToFinish>0&&this.maxTimeToFinish==this.timeSpent&&this.completeLastPage(),e){var t=this.getPageMaxTimeToFinish(e);t>0&&t==e.timeSpent&&(this.isLastPage?this.completeLastPage():this.nextPage())}},Object.defineProperty(t.prototype,"inSurvey",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getSurveyData=function(){return this},t.prototype.getSurvey=function(){return this},t.prototype.getTextProcessor=function(){return this},t.prototype.getObjects=function(e,t){var n=[];return Array.prototype.push.apply(n,this.getPagesByNames(e)),Array.prototype.push.apply(n,this.getQuestionsByNames(t)),n},t.prototype.setTriggerValue=function(e,t,n){if(e)if(n)this.setVariable(e,t);else{var r=this.getQuestionByName(e);if(r)r.value=t;else{var i=new c.ProcessValue,o=i.getFirstName(e);if(o==e)this.setValue(e,t);else{if(!this.getQuestionByName(o))return;var a=this.getUnbindValue(this.getFilteredValues());i.setValue(a,e,t),this.setValue(o,a[o])}}}},t.prototype.copyTriggerValue=function(e,t){if(e&&t){var n=(new c.ProcessValue).getValue(t,this.getFilteredValues());this.setTriggerValue(e,n,!1)}},t.prototype.triggerExecuted=function(e){this.onTriggerExecuted.fire(this,{trigger:e})},t.prototype.startMovingQuestion=function(){this.isMovingQuestion=!0},t.prototype.stopMovingQuestion=function(){this.isMovingQuestion=!1},t.prototype.focusQuestion=function(e){var t=this.getQuestionByName(e,!0);return!!(t&&t.isVisible&&t.page)&&(this.isFocusingQuestion=!0,this.currentPage=t.page,t.focus(),this.isFocusingQuestion=!1,this.isCurrentPageRendering=!1,!0)},t.prototype.getElementWrapperComponentName=function(e,n){return"logo-image"===n?"sv-logo-image":t.TemplateRendererComponentName},t.prototype.getQuestionContentWrapperComponentName=function(e){return t.TemplateRendererComponentName},t.prototype.getRowWrapperComponentName=function(e){return t.TemplateRendererComponentName},t.prototype.getElementWrapperComponentData=function(e,t){return e},t.prototype.getRowWrapperComponentData=function(e){return e},t.prototype.getItemValueWrapperComponentName=function(e,n){return t.TemplateRendererComponentName},t.prototype.getItemValueWrapperComponentData=function(e,t){return e},t.prototype.getMatrixCellTemplateData=function(e){return e.question},t.prototype.searchText=function(e){e&&(e=e.toLowerCase());for(var t=[],n=0;n<this.pages.length;n++)this.pages[n].searchText(e,t);return t},t.prototype.getSkeletonComponentName=function(e){return this.skeletonComponentName},t.prototype.dispose=function(){if(this.currentPage=null,this.destroyResizeObserver(),e.prototype.dispose.call(this),this.editingObj=null,this.pages){for(var t=0;t<this.pages.length;t++)this.pages[t].dispose();this.pages.splice(0,this.pages.length),this.disposeCallback&&this.disposeCallback()}},t.TemplateRendererComponentName="sv-template-renderer",t.stylesManager=null,t.platform="unknown",S([Object(o.property)()],t.prototype,"completedCss",void 0),S([Object(o.property)()],t.prototype,"containerCss",void 0),S([Object(o.property)({defaultValue:!1})],t.prototype,"showBrandInfo",void 0),S([Object(o.property)()],t.prototype,"_isMobile",void 0),S([Object(o.property)()],t.prototype,"rootCss",void 0),S([Object(o.property)()],t.prototype,"calculatedWidthMode",void 0),t}(s.SurveyElementCore);o.Serializer.addClass("survey",[{name:"locale",choices:function(){return h.surveyLocalization.getLocales(!0)},onGetValue:function(e){return e.locale==h.surveyLocalization.defaultLocale?null:e.locale}},{name:"title",serializationProperty:"locTitle",dependsOn:"locale"},{name:"description:text",serializationProperty:"locDescription",dependsOn:"locale"},{name:"logo",serializationProperty:"locLogo"},{name:"logoWidth",default:"300px",minValue:0},{name:"logoHeight",default:"200px",minValue:0},{name:"logoFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"logoPosition",default:"left",choices:["none","left","right","top","bottom"]},{name:"focusFirstQuestionAutomatic:boolean",default:!0},{name:"focusOnFirstError:boolean",default:!0},{name:"completedHtml:html",serializationProperty:"locCompletedHtml"},{name:"completedBeforeHtml:html",serializationProperty:"locCompletedBeforeHtml"},{name:"completedHtmlOnCondition:htmlconditions",className:"htmlconditionitem"},{name:"loadingHtml:html",serializationProperty:"locLoadingHtml"},{name:"pages:surveypages",className:"page"},{name:"questions",alternativeName:"elements",baseClassName:"question",visible:!1,isLightSerializable:!1,onGetValue:function(e){return null},onSetValue:function(e,t,n){e.pages.splice(0,e.pages.length);var r=e.addNewPage("");n.toObject({questions:t},r)}},{name:"triggers:triggers",baseClassName:"surveytrigger",classNamePart:"trigger"},{name:"calculatedValues:calculatedvalues",className:"calculatedvalue"},{name:"surveyId",visible:!1},{name:"surveyPostId",visible:!1},{name:"surveyShowDataSaving:boolean",visible:!1},"cookieName","sendResultOnPageNext:boolean",{name:"showNavigationButtons",default:"bottom",choices:["none","top","bottom","both"]},{name:"showPrevButton:boolean",default:!0},{name:"showTitle:boolean",default:!0},{name:"showPageTitles:boolean",default:!0},{name:"showCompletedPage:boolean",default:!0},"navigateToUrl",{name:"navigateToUrlOnCondition:urlconditions",className:"urlconditionitem"},{name:"questionsOrder",default:"initial",choices:["initial","random"]},"showPageNumbers:boolean",{name:"showQuestionNumbers",default:"on",choices:["on","onPage","off"]},{name:"questionTitleLocation",default:"top",choices:["top","bottom","left"]},{name:"questionDescriptionLocation",default:"underTitle",choices:["underInput","underTitle"]},{name:"questionErrorLocation",default:"top",choices:["top","bottom"]},{name:"showProgressBar",default:"off",choices:["off","top","bottom","both"]},{name:"progressBarType",default:"pages",choices:["pages","questions","requiredQuestions","correctQuestions","buttons"]},{name:"mode",default:"edit",choices:["edit","display"]},{name:"storeOthersAsComment:boolean",default:!0},{name:"maxTextLength:number",default:0,minValue:0},{name:"maxOthersLength:number",default:0,minValue:0},{name:"goNextPageAutomatic:boolean",onSetValue:function(e,t){"autogonext"!==t&&(t=i.Helpers.isTwoValueEquals(t,!0)),e.setPropertyValue("goNextPageAutomatic",t)}},{name:"clearInvisibleValues",default:"onComplete",choices:["none","onComplete","onHidden","onHiddenContainer"]},{name:"checkErrorsMode",default:"onNextPage",choices:["onNextPage","onValueChanged","onValueChanging","onComplete"]},{name:"textUpdateMode",default:"onBlur",choices:["onBlur","onTyping"]},{name:"autoGrowComment:boolean",default:!1},{name:"startSurveyText",serializationProperty:"locStartSurveyText"},{name:"pagePrevText",serializationProperty:"locPagePrevText"},{name:"pageNextText",serializationProperty:"locPageNextText"},{name:"completeText",serializationProperty:"locCompleteText"},{name:"previewText",serializationProperty:"locPreviewText"},{name:"editText",serializationProperty:"locEditText"},{name:"requiredText",default:"*"},{name:"questionStartIndex",dependsOn:["showQuestionNumbers"],visibleIf:function(e){return!e||"off"!==e.showQuestionNumbers}},{name:"questionTitlePattern",default:"numTitleRequire",dependsOn:["questionStartIndex","requiredText"],choices:function(e){return e?e.getQuestionTitlePatternOptions():[]}},{name:"questionTitleTemplate",visible:!1,isSerializable:!1,serializationProperty:"locQuestionTitleTemplate"},{name:"firstPageIsStarted:boolean",default:!1},{name:"isSinglePage:boolean",default:!1,visible:!1,isSerializable:!1},{name:"questionsOnPageMode",default:"standard",choices:["singlePage","standard","questionPerPage"]},{name:"showPreviewBeforeComplete",default:"noPreview",choices:["noPreview","showAllQuestions","showAnsweredQuestions"]},{name:"maxTimeToFinish:number",default:0,minValue:0},{name:"maxTimeToFinishPage:number",default:0,minValue:0},{name:"showTimerPanel",default:"none",choices:["none","top","bottom"]},{name:"showTimerPanelMode",default:"all",choices:["all","page","survey"]},{name:"widthMode",default:"auto",choices:["auto","static","responsive"]},"width",{name:"showBrandInfo:boolean",default:!1,visible:!1}])},"./src/surveyProgress.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SurveyProgressModel",function(){return i});var r=n("./src/utils/cssClassBuilder.ts"),i=function(){function e(){}return e.getProgressTextInBarCss=function(e){return(new r.CssClassBuilder).append(e.progressText).append(e.progressTextInBar).toString()},e.getProgressTextUnderBarCss=function(e){return(new r.CssClassBuilder).append(e.progressText).append(e.progressTextUnderBar).toString()},e}()},"./src/surveyProgressButtons.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SurveyProgressButtonsModel",function(){return i});var r=n("./src/utils/cssClassBuilder.ts"),i=function(){function e(e){this.survey=e}return e.prototype.isListElementClickable=function(e){return!(this.survey.onServerValidateQuestions&&!this.survey.onServerValidateQuestions.isEmpty&&"onComplete"!==this.survey.checkErrorsMode)||e<=this.survey.currentPageNo+1},e.prototype.getListElementCss=function(e){if(!(e>=this.survey.visiblePages.length))return(new r.CssClassBuilder).append(this.survey.css.progressButtonsListElementPassed,this.survey.visiblePages[e].passed).append(this.survey.css.progressButtonsListElementCurrent,this.survey.currentPageNo===e).append(this.survey.css.progressButtonsListElementNonClickable,!this.isListElementClickable(e)).toString()},e.prototype.getScrollButtonCss=function(e,t){return(new r.CssClassBuilder).append(this.survey.css.progressButtonsImageButtonLeft,t).append(this.survey.css.progressButtonsImageButtonRight,!t).append(this.survey.css.progressButtonsImageButtonHidden,!e).toString()},e.prototype.clickListElement=function(e){if(!this.survey.isDesignMode)if(e<this.survey.currentPageNo)this.survey.currentPageNo=e;else if(e>this.survey.currentPageNo)for(var t=this.survey.currentPageNo;t<e&&this.survey.nextPage();t++);},e}()},"./src/surveyStrings.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"surveyLocalization",function(){return i}),n.d(t,"surveyStrings",function(){return o});var r=n("./src/localization/english.ts"),i={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){"cz"===e&&(e="cs"),this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){"cz"===e&&(e="cs"),this.defaultLocaleValue=e},getLocaleStrings:function(e){return this.locales[e]},getCurrentStrings:function(e){var t=e&&this.locales[e];return t||(t=this.currentLocale?this.locales[this.currentLocale]:this.locales[this.defaultLocale]),t||(t=this.locales[this.defaultLocale]),t},getString:function(e,t){void 0===t&&(t=null);var n=this.getCurrentStrings(t);n[e]||(n=this.locales[this.defaultLocale]);var r=n[e];return void 0===r&&(r=this.locales.en[e]),void 0===r?this.onGetExternalString(e,t):r},getLocales:function(e){void 0===e&&(e=!1);var t=[];t.push("");var n=this.locales;if(this.supportedLocales&&this.supportedLocales.length>0){n={};for(var r=0;r<this.supportedLocales.length;r++)n[this.supportedLocales[r]]=!0}for(var o in n)e&&o==this.defaultLocale||t.push(o);var a=function(e){if(!e)return"";var t=i.localeNames[e];return t||(t=e),t.toLowerCase()};return t.sort(function(e,t){var n=a(e),r=a(t);return n===r?0:n<r?-1:1}),t},onGetExternalString:function(e,t){}},o=r.englishStrings;i.locales.en=r.englishStrings,i.localeNames.en="english"},"./src/surveyTimerModel.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SurveyTimerModel",function(){return u});var r,i=n("./src/base.ts"),o=n("./src/surveytimer.ts"),a=n("./src/jsonobject.ts"),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},u=function(e){function t(t){var n=e.call(this)||this;return n.timerFunc=null,n.surveyValue=t,n.onCreating(),n}return s(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),t.prototype.onCreating=function(){},t.prototype.start=function(){var e=this;this.survey&&(this.isRunning||this.isDesignMode||(this.timerFunc=function(){e.doTimer()},this.setIsRunning(!0),this.updateText(),o.SurveyTimer.instance.start(this.timerFunc)))},t.prototype.stop=function(){this.isRunning&&(this.setIsRunning(!1),o.SurveyTimer.instance.stop(this.timerFunc))},Object.defineProperty(t.prototype,"isRunning",{get:function(){return this.getPropertyValue("isRunning",!1)},enumerable:!1,configurable:!0}),t.prototype.setIsRunning=function(e){this.setPropertyValue("isRunning",e)},t.prototype.doTimer=function(){var e=this.survey.currentPage;e&&(e.timeSpent=e.timeSpent+1),this.spent=this.spent+1,this.updateText(),this.onTimer&&this.onTimer(e)},t.prototype.updateText=function(){this.text=this.survey.timerInfoText},l([Object(a.property)()],t.prototype,"text",void 0),l([Object(a.property)({defaultValue:0})],t.prototype,"spent",void 0),t}(i.Base)},"./src/surveytimer.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"surveyTimerFunctions",function(){return i}),n.d(t,"SurveyTimer",function(){return o});var r=n("./src/base.ts"),i={setTimeout:function(e){return"undefined"==typeof window?0:window.setTimeout(e,1e3)},clearTimeout:function(e){"undefined"!=typeof window&&window.clearTimeout(e)}},o=function(){function e(){this.listenerCounter=0,this.timerId=-1,this.onTimer=new r.Event}return Object.defineProperty(e,"instance",{get:function(){return e.instanceValue||(e.instanceValue=new e),e.instanceValue},enumerable:!1,configurable:!0}),e.prototype.start=function(e){var t=this;void 0===e&&(e=null),e&&this.onTimer.add(e),this.timerId<0&&(this.timerId=i.setTimeout(function(){t.doTimer()})),this.listenerCounter++},e.prototype.stop=function(e){void 0===e&&(e=null),e&&this.onTimer.remove(e),this.listenerCounter--,0==this.listenerCounter&&this.timerId>-1&&(i.clearTimeout(this.timerId),this.timerId=-1)},e.prototype.doTimer=function(){var e=this;if((this.onTimer.isEmpty||0==this.listenerCounter)&&(this.timerId=-1),!(this.timerId<0)){var t=this.timerId;this.onTimer.fire(this,{}),t===this.timerId&&(this.timerId=i.setTimeout(function(){e.doTimer()}))}},e.instanceValue=null,e}()},"./src/svgbundle.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"SvgIconRegistry",function(){return r}),n.d(t,"SvgRegistry",function(){return i}),n.d(t,"SvgBundleViewModel",function(){});var r=function(){function e(){this.icons={},this.iconPrefix="icon-"}return e.prototype.registerIconFromSymbol=function(e,t){this.icons[e]=t},e.prototype.registerIconFromSvgViaElement=function(e,t,n){void 0===n&&(n=this.iconPrefix);var r=document.createElement("div");r.innerHTML=t;var i=document.createElement("symbol"),o=r.querySelector("svg");i.innerHTML=o.innerHTML;for(var a=0;a<o.attributes.length;a++)i.setAttributeNS("http://www.w3.org/2000/svg",o.attributes[a].name,o.attributes[a].value);i.id=n+e,this.registerIconFromSymbol(e,i.outerHTML)},e.prototype.registerIconFromSvg=function(e,t,n){void 0===n&&(n=this.iconPrefix);var r=(t=t.trim()).toLowerCase();return"<svg "===r.substring(0,"<svg ".length)&&"</svg>"===r.substring(r.length-"</svg>".length,r.length)&&(this.registerIconFromSymbol(e,'<symbol id="'+n+e+'" '+t.substring("<svg ".length,r.length-"</svg>".length)+"</symbol>"),!0)},e.prototype.registerIconsFromFolder=function(e){var t=this;e.keys().forEach(function(n){t.registerIconFromSvg(n.substring(2,n.length-4).toLowerCase(),e(n))})},e.prototype.iconsRenderedHtml=function(){var e=this;return Object.keys(this.icons).map(function(t){return e.icons[t]}).join("")},e.prototype.renderIcons=function(){if(!document.getElementById("sv-icon-holder-global-container")){var e=document.createElement("div");e.id="sv-icon-holder-global-container",e.innerHTML="<svg>"+this.iconsRenderedHtml()+"</svg>",e.style.display="none",document.head.insertBefore(e,document.head.firstChild)}},e}(),i=new r,o=n("./src/images sync \\.svg$");i.registerIconsFromFolder(o)},"./src/template-renderer.ts":function(e,t,n){"use strict";n.r(t)},"./src/textPreProcessor.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"TextPreProcessorItem",function(){return o}),n.d(t,"TextPreProcessorValue",function(){return a}),n.d(t,"TextPreProcessor",function(){return s}),n.d(t,"QuestionTextProcessor",function(){return l});var r=n("./src/helpers.ts"),i=n("./src/conditionProcessValue.ts"),o=function(){},a=function(e,t){this.name=e,this.returnDisplayValue=t,this.isExists=!1,this.canProcess=!0},s=function(){function e(){this._unObservableValues=[void 0]}return Object.defineProperty(e.prototype,"hasAllValuesOnLastRunValue",{get:function(){return this._unObservableValues[0]},set:function(e){this._unObservableValues[0]=e},enumerable:!1,configurable:!0}),e.prototype.process=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this.hasAllValuesOnLastRunValue=!0,!e)return e;if(!this.onProcess)return e;for(var i=this.getItems(e),o=i.length-1;o>=0;o--){var s=i[o],l=this.getName(e.substring(s.start+1,s.end));if(l){var u=new a(l,t);if(this.onProcess(u),u.isExists){r.Helpers.isValueEmpty(u.value)&&(this.hasAllValuesOnLastRunValue=!1);var c=r.Helpers.isValueEmpty(u.value)?"":u.value;n&&(c=encodeURIComponent(c)),e=e.substring(0,s.start)+c+e.substring(s.end+1)}else u.canProcess&&(this.hasAllValuesOnLastRunValue=!1)}}return e},e.prototype.processValue=function(e,t){var n=new a(e,t);return this.onProcess&&this.onProcess(n),n},Object.defineProperty(e.prototype,"hasAllValuesOnLastRun",{get:function(){return!!this.hasAllValuesOnLastRunValue},enumerable:!1,configurable:!0}),e.prototype.getItems=function(e){for(var t=[],n=e.length,r=-1,i="",a=0;a<n;a++)if("{"==(i=e[a])&&(r=a),"}"==i){if(r>-1){var s=new o;s.start=r,s.end=a,t.push(s)}r=-1}return t},e.prototype.getName=function(e){if(e)return e.trim()},e}(),l=function(){function e(e){var t=this;this.variableName=e,this.textPreProcessor=new s,this.textPreProcessor.onProcess=function(e){t.getProcessedTextValue(e)}}return e.prototype.processValue=function(e,t){return this.textPreProcessor.processValue(e,t)},Object.defineProperty(e.prototype,"survey",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"panel",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.panel?this.panel.getValue():null},e.prototype.getQuestionByName=function(e){return this.panel?this.panel.getQuestionByValueName(e):null},e.prototype.getParentTextProcessor=function(){return null},e.prototype.onCustomProcessText=function(e){return!1},e.prototype.getQuestionDisplayText=function(e){return e.displayValue},e.prototype.getProcessedTextValue=function(e){if(e&&!this.onCustomProcessText(e)){var t=(new i.ProcessValue).getFirstName(e.name);if(e.isExists=t==this.variableName,e.canProcess=e.isExists,e.canProcess){e.name=e.name.replace(this.variableName+".",""),t=(new i.ProcessValue).getFirstName(e.name);var n=this.getQuestionByName(t),r={};if(n)r[t]=e.returnDisplayValue?this.getQuestionDisplayText(n):n.value;else{var o=this.panel?this.getValues():null;o&&(r[t]=o[t])}e.value=(new i.ProcessValue).getValue(e.name,r)}}},e.prototype.processText=function(e,t){return this.survey&&this.survey.isDesignMode?e:(e=this.textPreProcessor.process(e,t),e=this.processTextCore(this.getParentTextProcessor(),e,t),this.processTextCore(this.survey,e,t))},e.prototype.processTextEx=function(e,t){e=this.processText(e,t);var n=this.textPreProcessor.hasAllValuesOnLastRun,r={hasAllValuesOnLastRun:!0,text:e};return this.survey&&(r=this.survey.processTextEx(e,t,!1)),r.hasAllValuesOnLastRun=r.hasAllValuesOnLastRun&&n,r},e.prototype.processTextCore=function(e,t,n){return e?e.processText(t,n):t},e}()},"./src/trigger.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"Trigger",function(){return d}),n.d(t,"SurveyTrigger",function(){return h}),n.d(t,"SurveyTriggerVisible",function(){return p}),n.d(t,"SurveyTriggerComplete",function(){return f}),n.d(t,"SurveyTriggerSetValue",function(){return m}),n.d(t,"SurveyTriggerSkip",function(){return g}),n.d(t,"SurveyTriggerRunExpression",function(){return v}),n.d(t,"SurveyTriggerCopyValue",function(){return y});var r,i=n("./src/base.ts"),o=n("./src/jsonobject.ts"),a=n("./src/conditions.ts"),s=n("./src/expressions/expressions.ts"),l=n("./src/conditionProcessValue.ts"),u=n("./src/settings.ts"),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(e){function t(){var t=e.call(this)||this;t.usedNames=[];var n=t;return t.registerFunctionOnPropertiesValueChanged(["operator","value","name"],function(){n.oldPropertiesChanged()}),t.registerFunctionOnPropertyValueChanged("expression",function(){n.onExpressionChanged()}),t}return c(t,e),Object.defineProperty(t,"operators",{get:function(){return null!=t.operatorsValue?t.operatorsValue:t.operatorsValue={empty:function(e,t){return!e},notempty:function(e,t){return!!e},equal:function(e,t){return e==t},notequal:function(e,t){return e!=t},contains:function(e,t){return e&&e.indexOf&&e.indexOf(t)>-1},notcontains:function(e,t){return!e||!e.indexOf||-1==e.indexOf(t)},greater:function(e,t){return e>t},less:function(e,t){return e<t},greaterorequal:function(e,t){return e>=t},lessorequal:function(e,t){return e<=t}}},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"triggerbase"},t.prototype.toString=function(){var e=this.getType().replace("trigger",""),t=this.expression?this.expression:this.buildExpression();return t&&(e+=", "+t),e},Object.defineProperty(t.prototype,"operator",{get:function(){return this.getPropertyValue("operator","equal")},set:function(e){e&&(e=e.toLowerCase(),t.operators[e]&&this.setPropertyValue("operator",e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.getPropertyValue("value",null)},set:function(e){this.setPropertyValue("value",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.getPropertyValue("name","")},set:function(e){this.setPropertyValue("name",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this.getPropertyValue("expression","")},set:function(e){this.setPropertyValue("expression",e)},enumerable:!1,configurable:!0}),t.prototype.canBeExecuted=function(e){return!0},t.prototype.checkExpression=function(e,t,n,r){void 0===r&&(r=null),this.isExecutingOnNextPage=e,this.canBeExecuted(e)&&this.isCheckRequired(t)&&this.conditionRunner&&this.perform(n,r)},t.prototype.check=function(e){t.operators[this.operator](e,this.value)?this.onSuccess({},null):this.onFailure()},t.prototype.perform=function(e,t){var n=this;this.conditionRunner.onRunComplete=function(r){n.triggerResult(r,e,t)},this.conditionRunner.run(e,t)},t.prototype.triggerResult=function(e,t,n){e?(this.onSuccess(t,n),this.onSuccessExecuted()):this.onFailure()},t.prototype.onSuccess=function(e,t){},t.prototype.onFailure=function(){},t.prototype.onSuccessExecuted=function(){},t.prototype.endLoadingFromJson=function(){e.prototype.endLoadingFromJson.call(this),this.oldPropertiesChanged()},t.prototype.oldPropertiesChanged=function(){this.onExpressionChanged()},t.prototype.onExpressionChanged=function(){this.usedNames=[],this.hasFunction=!1,this.conditionRunner=null},t.prototype.buildExpression=function(){return this.name?this.isValueEmpty(this.value)&&this.isRequireValue?"":"{"+this.name+"} "+this.operator+" "+s.OperandMaker.toOperandString(this.value):""},t.prototype.isCheckRequired=function(e){if(!e)return!1;if(this.buildUsedNames(),!0===this.hasFunction)return!0;for(var t=new l.ProcessValue,n=0;n<this.usedNames.length;n++){var r=this.usedNames[n];if(e.hasOwnProperty(r))return!0;var i=t.getFirstName(r);if(e.hasOwnProperty(i)){if(r==i)return!0;var o=e[i];if(null!=o){if(!o.hasOwnProperty("oldValue")||!o.hasOwnProperty("newValue"))return!0;var a={};a[i]=o.oldValue;var s=t.getValue(r,a);a[i]=o.newValue;var u=t.getValue(r,a);return!this.isTwoValueEquals(s,u)}}}return!1},t.prototype.buildUsedNames=function(){if(!this.conditionRunner){var e=this.expression;e||(e=this.buildExpression()),e&&(this.conditionRunner=new a.ConditionRunner(e),this.hasFunction=this.conditionRunner.hasFunction(),this.usedNames=this.conditionRunner.getVariables())}},Object.defineProperty(t.prototype,"isRequireValue",{get:function(){return"empty"!==this.operator&&"notempty"!=this.operator},enumerable:!1,configurable:!0}),t.operatorsValue=null,t}(i.Base),h=function(e){function t(){var t=e.call(this)||this;return t.ownerValue=null,t}return c(t,e),Object.defineProperty(t.prototype,"owner",{get:function(){return this.ownerValue},enumerable:!1,configurable:!0}),t.prototype.setOwner=function(e){this.ownerValue=e},t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.owner&&this.owner.getSurvey?this.owner.getSurvey():null},t.prototype.isRealExecution=function(){return!0},t.prototype.onSuccessExecuted=function(){this.owner&&this.isRealExecution()&&this.owner.triggerExecuted(this)},t}(d),p=function(e){function t(){var t=e.call(this)||this;return t.pages=[],t.questions=[],t}return c(t,e),t.prototype.getType=function(){return"visibletrigger"},t.prototype.onSuccess=function(e,t){this.onTrigger(this.onItemSuccess)},t.prototype.onFailure=function(){this.onTrigger(this.onItemFailure)},t.prototype.onTrigger=function(e){if(this.owner)for(var t=this.owner.getObjects(this.pages,this.questions),n=0;n<t.length;n++)e(t[n])},t.prototype.onItemSuccess=function(e){e.visible=!0},t.prototype.onItemFailure=function(e){e.visible=!1},t}(h),f=function(e){function t(){return e.call(this)||this}return c(t,e),t.prototype.getType=function(){return"completetrigger"},t.prototype.isRealExecution=function(){return!u.settings.executeCompleteTriggerOnValueChanged===this.isExecutingOnNextPage},t.prototype.onSuccess=function(e,t){this.owner&&(this.isRealExecution()?this.owner.setCompleted():this.owner.canBeCompleted())},t}(h),m=function(e){function t(){return e.call(this)||this}return c(t,e),t.prototype.getType=function(){return"setvaluetrigger"},t.prototype.onPropertyValueChanged=function(t,n,r){if(e.prototype.onPropertyValueChanged.call(this,t,n,r),"setToName"===t){var i=this.getSurvey();i&&!i.isLoadingFromJson&&i.isDesignMode&&(this.setValue=void 0)}},Object.defineProperty(t.prototype,"setToName",{get:function(){return this.getPropertyValue("setToName","")},set:function(e){this.setPropertyValue("setToName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setValue",{get:function(){return this.getPropertyValue("setValue")},set:function(e){this.setPropertyValue("setValue",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVariable",{get:function(){return this.getPropertyValue("isVariable",!1)},set:function(e){this.setPropertyValue("isVariable",e)},enumerable:!1,configurable:!0}),t.prototype.onSuccess=function(e,t){this.setToName&&this.owner&&this.owner.setTriggerValue(this.setToName,this.setValue,this.isVariable)},t}(h),g=function(e){function t(){return e.call(this)||this}return c(t,e),t.prototype.getType=function(){return"skiptrigger"},Object.defineProperty(t.prototype,"gotoName",{get:function(){return this.getPropertyValue("gotoName","")},set:function(e){this.setPropertyValue("gotoName",e)},enumerable:!1,configurable:!0}),t.prototype.canBeExecuted=function(e){return e===!u.settings.executeSkipTriggerOnValueChanged},t.prototype.onSuccess=function(e,t){this.gotoName&&this.owner&&this.owner.focusQuestion(this.gotoName)},t}(h),v=function(e){function t(){return e.call(this)||this}return c(t,e),t.prototype.getType=function(){return"runexpressiontrigger"},Object.defineProperty(t.prototype,"setToName",{get:function(){return this.getPropertyValue("setToName","")},set:function(e){this.setPropertyValue("setToName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runExpression",{get:function(){return this.getPropertyValue("runExpression","")},set:function(e){this.setPropertyValue("runExpression",e)},enumerable:!1,configurable:!0}),t.prototype.onSuccess=function(e,t){var n=this;if(this.owner&&this.runExpression){var r=new a.ExpressionRunner(this.runExpression);r.canRun&&(r.onRunComplete=function(e){n.onCompleteRunExpression(e)},r.run(e,t))}},t.prototype.onCompleteRunExpression=function(e){this.setToName&&void 0!==e&&this.owner.setTriggerValue(this.setToName,e,!1)},t}(h),y=function(e){function t(){return e.call(this)||this}return c(t,e),Object.defineProperty(t.prototype,"setToName",{get:function(){return this.getPropertyValue("setToName","")},set:function(e){this.setPropertyValue("setToName",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fromName",{get:function(){return this.getPropertyValue("fromName","")},set:function(e){this.setPropertyValue("fromName",e)},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"copyvaluetrigger"},t.prototype.onSuccess=function(e,t){this.setToName&&this.owner&&this.owner.copyTriggerValue(this.setToName,this.fromName)},t}(h);o.Serializer.addClass("trigger",[{name:"operator",default:"equal",visible:!1},{name:"value",visible:!1},"expression:condition"]),o.Serializer.addClass("surveytrigger",[{name:"name",visible:!1}],null,"trigger"),o.Serializer.addClass("visibletrigger",["pages:pages","questions:questions"],function(){return new p},"surveytrigger"),o.Serializer.addClass("completetrigger",[],function(){return new f},"surveytrigger"),o.Serializer.addClass("setvaluetrigger",[{name:"!setToName:questionvalue"},{name:"setValue:triggervalue",dependsOn:"setToName",visibleIf:function(e){return!!e&&!!e.setToName}},{name:"isVariable:boolean",visible:!1}],function(){return new m},"surveytrigger"),o.Serializer.addClass("copyvaluetrigger",[{name:"!fromName:questionvalue"},{name:"!setToName:questionvalue"}],function(){return new y},"surveytrigger"),o.Serializer.addClass("skiptrigger",[{name:"!gotoName:question"}],function(){return new g},"surveytrigger"),o.Serializer.addClass("runexpressiontrigger",[{name:"setToName:questionvalue"},"runExpression:expression"],function(){return new v},"surveytrigger")},"./src/utils/cssClassBuilder.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"CssClassBuilder",function(){return r});var r=function(){function e(){this.classes=[]}return e.prototype.isEmpty=function(){return""===this.toString()},e.prototype.append=function(e,t){return void 0===t&&(t=!0),e&&t&&("string"==typeof e&&(e=e.trim()),this.classes.push(e)),this},e.prototype.toString=function(){return this.classes.join(" ")},e}()},"./src/utils/devices.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"IsMobile",function(){return a}),n.d(t,"IsTouch",function(){return l});var r,i=!1,o=null;"undefined"!=typeof navigator&&"undefined"!=typeof window&&navigator&&window&&(o=navigator.userAgent||navigator.vendor||window.opera),(r=o)&&("MacIntel"===navigator.platform&&navigator.maxTouchPoints>0||"iPad"===navigator.platform||/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substring(0,4)))&&(i=!0);var a=i||!1,s=!1;"undefined"!=typeof window&&(s="ontouchstart"in window||navigator.maxTouchPoints>0);var l=a&&s},"./src/utils/dragOrClickHelper.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"DragOrClickHelper",function(){return i});var r=n("./src/entries/core.ts"),i=function(){function e(e){var t=this;this.dragHandler=e,this.onPointerUp=function(e){t.clearListeners()},this.tryToStartDrag=function(e){if(t.currentX=e.pageX,t.currentY=e.pageY,!t.isMicroMovement)return t.clearListeners(),t.dragHandler(t.pointerDownEvent,t.currentTarget,t.itemModel),!0}}return e.prototype.onPointerDown=function(e,t){r.IsTouch?this.dragHandler(e,e.currentTarget,t):(this.pointerDownEvent=e,this.currentTarget=e.currentTarget,this.startX=e.pageX,this.startY=e.pageY,document.addEventListener("pointermove",this.tryToStartDrag),this.currentTarget.addEventListener("pointerup",this.onPointerUp),this.itemModel=t)},Object.defineProperty(e.prototype,"isMicroMovement",{get:function(){var e=Math.abs(this.currentX-this.startX),t=Math.abs(this.currentY-this.startY);return e<10&&t<10},enumerable:!1,configurable:!0}),e.prototype.clearListeners=function(){this.pointerDownEvent&&(document.removeEventListener("pointermove",this.tryToStartDrag),this.currentTarget.removeEventListener("pointerup",this.onPointerUp))},e}()},"./src/utils/popup.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"PopupUtils",function(){return r});var r=function(){function e(){}return e.calculatePosition=function(e,t,n,r,i,o,a){void 0===a&&(a="flex");var s=e.left,l=e.top;return"flex"===a&&(s="center"==i?(e.left+e.right-n)/2:"left"==i?e.left-n:e.right),l="middle"==r?(e.top+e.bottom-t)/2:"top"==r?e.top-t:e.bottom,o&&"center"!=i&&"middle"!=r&&("top"==r?l+=e.height:l-=e.height),{left:Math.round(s),top:Math.round(l)}},e.updateVerticalDimensions=function(t,n,r){var i;return t<0?i={height:n+t,top:0}:n+t>r&&(i={height:Math.min(n,r-t-e.bottomIndent),top:t}),i},e.updateHorizontalDimensions=function(e,t,n,r,i,o){void 0===i&&(i="flex"),void 0===o&&(o={left:0,right:0}),t+=o.left+o.right;var a=void 0,s=e;return"center"===r&&("fixed"===i?(e+t>n&&(a=n-e),s-=o.left):e<0?(s=o.left,a=Math.min(t,n)):t+e>n&&(s=n-t,s=Math.max(s,o.left),a=Math.min(t,n))),"left"===r&&e<0&&(s=o.left,a=Math.min(t,n)),"right"===r&&t+e>n&&(a=n-e),{width:a-o.left-o.right,left:s}},e.updateVerticalPosition=function(e,t,n,r,i){var o=t-(e.top+(r?e.height:0)),a=t+e.bottom-(r?e.height:0)-i;return o>0&&a<=0&&"top"==n?n="bottom":a>0&&o<=0&&"bottom"==n?n="top":a>0&&o>0&&(n=o<a?"top":"bottom"),n},e.calculatePopupDirection=function(e,t){var n;return"center"==t&&"middle"!=e?n=e:"center"!=t&&(n=t),n},e.calculatePointerTarget=function(e,t,n,r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=0);var s={};return"center"!=i?(s.top=e.top+e.height/2,s.left=e[i]):"middle"!=r&&(s.top=e[r],s.left=e.left+e.width/2),s.left=Math.round(s.left-n),s.top=Math.round(s.top-t),"left"==i&&(s.left-=o+a),"center"===i&&(s.left-=o),s},e.bottomIndent=16,e}()},"./src/utils/responsivity-manager.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ResponsivityManager",function(){return s}),n.d(t,"VerticalResponsivityManager",function(){return l});var r,i=n("./node_modules/timers-browserify/main.js"),o=n("./src/utils/utils.ts"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){function e(e,t,n,r){void 0===r&&(r=48);var o=this;this.container=e,this.model=t,this.itemsSelector=n,this.dotsItemSize=r,this.resizeObserver=void 0,this.isInitialized=!1,this.minDimensionConst=56,this.separatorSize=17,this.separatorAddConst=1,this.paddingSizeConst=8,this.recalcMinDimensionConst=!0,this.getComputedStyle=window.getComputedStyle.bind(window),this.model.updateCallback=function(e){e?o.isInitialized=!1:Object(i.setTimeout)(function(){o.process()},1)},"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver(function(e){return o.process()}),this.resizeObserver.observe(this.container.parentElement))}return e.prototype.getDimensions=function(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}},e.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t},e.prototype.calcItemSize=function(e){return e.offsetWidth},e.prototype.calcMinDimension=function(e){var t=this.minDimensionConst;return e.iconSize&&this.recalcMinDimensionConst&&(t=2*e.iconSize+this.paddingSizeConst),e.canShrink?t+(e.needSeparator?this.separatorSize:0):e.maxDimension},e.prototype.calcItemsSizes=function(){var e=this,t=this.model.actions;this.container.querySelectorAll(this.itemsSelector).forEach(function(n,r){var i=t[r];i.maxDimension=e.calcItemSize(n),i.minDimension=e.calcMinDimension(i)})},Object.defineProperty(e.prototype,"isContainerVisible",{get:function(){return Object(o.isContainerVisible)(this.container)},enumerable:!1,configurable:!0}),e.prototype.process=function(){this.isContainerVisible&&!this.model.isResponsivenessDisabled&&(this.isInitialized||(this.model.setActionsMode("large"),this.calcItemsSizes(),this.isInitialized=!0),this.model.fit(this.getAvailableSpace(),this.dotsItemSize))},e.prototype.dispose=function(){this.model.updateCallback=void 0,this.resizeObserver&&this.resizeObserver.disconnect()},e}(),l=function(e){function t(t,n,r,i,o){void 0===o&&(o=40);var a=e.call(this,t,n,r,i)||this;return a.minDimensionConst=o,a.recalcMinDimensionConst=!1,a}return a(t,e),t.prototype.getDimensions=function(){return{scroll:this.container.scrollHeight,offset:this.container.offsetHeight}},t.prototype.getAvailableSpace=function(){var e=this.getComputedStyle(this.container),t=this.container.offsetHeight;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)),t},t.prototype.calcItemSize=function(e){return e.offsetHeight},t}(s)},"./src/utils/tooltip.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"TooltipManager",function(){return r});var r=function(){function e(e){var t=this;this.tooltipElement=e,this.onMouseMoveCallback=function(e){t.tooltipElement.style.left=e.clientX+12+"px",t.tooltipElement.style.top=e.clientY+12+"px"},this.targetElement=e.parentElement,this.targetElement.addEventListener("mousemove",this.onMouseMoveCallback)}return e.prototype.dispose=function(){this.targetElement.removeEventListener("mousemove",this.onMouseMoveCallback)},e}()},"./src/utils/utils.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"unwrap",function(){return m}),n.d(t,"getSize",function(){return g}),n.d(t,"doKey2ClickBlur",function(){return v}),n.d(t,"doKey2ClickUp",function(){return y}),n.d(t,"doKey2ClickDown",function(){return b}),n.d(t,"sanitizeEditableContent",function(){return E}),n.d(t,"mergeValues",function(){return A}),n.d(t,"getElementWidth",function(){return S}),n.d(t,"isContainerVisible",function(){return P}),n.d(t,"classesToSelector",function(){return x}),n.d(t,"compareVersions",function(){return i}),n.d(t,"confirmAction",function(){return o}),n.d(t,"detectIEOrEdge",function(){return s}),n.d(t,"detectIEBrowser",function(){return a}),n.d(t,"loadFileFromBase64",function(){return l}),n.d(t,"isMobile",function(){return u}),n.d(t,"isElementVisible",function(){return c}),n.d(t,"findScrollableParent",function(){return d}),n.d(t,"scrollElementByChildId",function(){return h}),n.d(t,"createSvg",function(){return f}),n.d(t,"getIconNameFromProxy",function(){return p}),n.d(t,"increaseHeightByContent",function(){return _}),n.d(t,"getOriginalEvent",function(){return w}),n.d(t,"preventDefaults",function(){return C}),n.d(t,"findParentByClassNames",function(){return k});var r=n("./src/settings.ts");function i(e,t){for(var n=/(\.0+)+$/,r=e.replace(n,"").split("."),i=t.replace(n,"").split("."),o=Math.min(r.length,i.length),a=0;a<o;a++){var s=parseInt(r[a],10)-parseInt(i[a],10);if(s)return s}return r.length-i.length}function o(e){return r.settings&&r.settings.confirmActionFunc?r.settings.confirmActionFunc(e):confirm(e)}function a(){if("undefined"==typeof window)return!1;var e=window.navigator.userAgent,t=e.indexOf("MSIE "),n=e.indexOf("Trident/");return t>-1||n>-1}function s(){if("undefined"==typeof window)return!1;if(void 0===s.isIEOrEdge){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),n=e.indexOf("Trident/"),r=e.indexOf("Edge/");s.isIEOrEdge=r>0||n>0||t>0}return s.isIEOrEdge}function l(e,t){try{for(var n=atob(e.split(",")[1]),r=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(n.length),o=new Uint8Array(i),a=0;a<n.length;a++)o[a]=n.charCodeAt(a);var s=new Blob([i],{type:r});"undefined"!=typeof window&&window.navigator&&window.navigator.msSaveBlob&&window.navigator.msSaveOrOpenBlob(s,t)}catch(l){}}function u(){return"undefined"!=typeof window&&void 0!==window.orientation}function c(e,t){if(void 0===t&&(t=0),"undefined"==typeof document)return!1;var n=e.getBoundingClientRect(),r=Math.max(document.documentElement.clientHeight,window.innerHeight)+t,i=n.bottom;return Math.max(-t,n.top)<=Math.min(r,i)}function d(e){return e?e.scrollHeight>e.clientHeight&&("scroll"===getComputedStyle(e).overflowY||"auto"===getComputedStyle(e).overflowY)||e.scrollWidth>e.clientWidth&&("scroll"===getComputedStyle(e).overflowX||"auto"===getComputedStyle(e).overflowX)?e:d(e.parentElement):document.documentElement}function h(e){if(document){var t=document.getElementById(e);if(t){var n=d(t);n&&n.dispatchEvent(new CustomEvent("scroll"))}}}function p(e){return e&&r.settings.customIcons[e]||e}function f(e,t,n,r,i){if(i){"auto"!==e&&(i.style.width=(e||t||16)+"px",i.style.height=(e||n||16)+"px");var o=i.childNodes[0],a=p(r);o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a)}}function m(e){return"function"!=typeof e?e:e()}function g(e){if("number"==typeof e)return e+"px";if(e&&"string"==typeof e&&e.length>0){var t=e[e.length-1];if(t>="0"&&t<="9"||"."==t)try{return parseFloat(e)+"px"}catch(n){}}return e}function v(e){var t=e.target;t&&t.classList&&t.classList.remove("sv-focused--by-key")}function y(e,t){if(!e.target||"true"!==e.target.contentEditable){var n=e.target;if(n){var r=e.which||e.keyCode;9===r?n.classList&&!n.classList.contains("sv-focused--by-key")&&n.classList.add("sv-focused--by-key"):13===r||32===r?n.click&&n.click():t&&!t.processEsc||27!==r||n.blur&&n.blur()}}}function b(e,t){if(void 0===t&&(t={processEsc:!0}),!e.target||"true"!==e.target.contentEditable){var n=e.which||e.keyCode,r=[13,32];t.processEsc&&r.push(27),-1!==r.indexOf(n)&&e.preventDefault()}}function _(e,t){if(e){t||(t=function(e){return window.getComputedStyle(e)});var n=t(e);e.style.height="auto",e.style.height=e.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)+"px"}}function w(e){return e.originalEvent||e}function C(e){e.preventDefault(),e.stopPropagation()}function x(e){return e.replace(/\s*?([\w-]+)\s*?/g,".$1")}function S(e){return getComputedStyle?Number.parseFloat(getComputedStyle(e).width):e.offsetWidth}function P(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function k(e,t){if(e)return t.every(function(t){return!t||e.classList.contains(t)})?e:k(e.parentElement,t)}function E(e){if(window.getSelection&&document.createRange&&e.childNodes.length>0){var t=document.getSelection(),n=t.getRangeAt(0);n.setStart(n.endContainer,n.endOffset),n.setEndAfter(e.lastChild),t.removeAllRanges(),t.addRange(n);var r=t.toString().replace(/\n/g,"").length;e.innerText=e.innerText.replace(/\n/g,""),(n=document.createRange()).setStart(e.childNodes[0],e.innerText.length-r),n.collapse(!0),t.removeAllRanges(),t.addRange(n)}}function A(e,t){if(t&&e&&"object"==typeof t)for(var n in e){var r=e[n];r&&"object"==typeof r?(t[n]&&"object"==typeof t[n]||(t[n]={}),A(r,t[n])):t[n]=r}}},"./src/validator.ts":function(e,t,n){"use strict";n.r(t),n.d(t,"ValidatorResult",function(){return c}),n.d(t,"SurveyValidator",function(){return d}),n.d(t,"ValidatorRunner",function(){return h}),n.d(t,"NumericValidator",function(){return p}),n.d(t,"TextValidator",function(){return f}),n.d(t,"AnswerCountValidator",function(){return m}),n.d(t,"RegexValidator",function(){return g}),n.d(t,"EmailValidator",function(){return v}),n.d(t,"ExpressionValidator",function(){return y});var r,i=n("./src/base.ts"),o=n("./src/error.ts"),a=n("./src/jsonobject.ts"),s=n("./src/conditions.ts"),l=n("./src/helpers.ts"),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t){void 0===t&&(t=null),this.value=e,this.error=t},d=function(e){function t(){var t=e.call(this)||this;return t.createLocalizableString("text",t,!0),t}return u(t,e),t.prototype.getSurvey=function(e){return void 0===e&&(e=!1),this.errorOwner&&this.errorOwner.getSurvey?this.errorOwner.getSurvey():null},Object.defineProperty(t.prototype,"text",{get:function(){return this.getLocalizableStringText("text")},set:function(e){this.setLocalizableStringText("text",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValidateAllValues",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locText",{get:function(){return this.getLocalizableString("text")},enumerable:!1,configurable:!0}),t.prototype.getErrorText=function(e){return this.text?this.text:this.getDefaultErrorText(e)},t.prototype.getDefaultErrorText=function(e){return""},t.prototype.validate=function(e,t,n,r){return void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),null},Object.defineProperty(t.prototype,"isRunning",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getLocale=function(){return this.errorOwner?this.errorOwner.getLocale():""},t.prototype.getMarkdownHtml=function(e,t){return this.errorOwner?this.errorOwner.getMarkdownHtml(e,t):null},t.prototype.getRenderer=function(e){return this.errorOwner?this.errorOwner.getRenderer(e):null},t.prototype.getRendererContext=function(e){return this.errorOwner?this.errorOwner.getRendererContext(e):e},t.prototype.getProcessedText=function(e){return this.errorOwner?this.errorOwner.getProcessedText(e):e},t.prototype.createCustomError=function(e){var t=this,n=new o.CustomError(this.getErrorText(e),this.errorOwner);return n.onUpdateErrorTextCallback=function(n){return n.text=t.getErrorText(e)},n},t.prototype.toString=function(){var e=this.getType().replace("validator","");return this.text&&(e+=", "+this.text),e},t}(i.Base),h=function(){function e(){}return e.prototype.run=function(e){var t=this,n=[],r=null,i=null;this.prepareAsyncValidators();for(var o=[],a=e.getValidators(),s=0;s<a.length;s++){var l=a[s];!r&&l.isValidateAllValues&&(r=e.getDataFilteredValues(),i=e.getDataFilteredProperties()),l.isAsync&&(this.asyncValidators.push(l),l.onAsyncCompleted=function(e){if(e&&e.error&&o.push(e.error),t.onAsyncCompleted){for(var n=0;n<t.asyncValidators.length;n++)if(t.asyncValidators[n].isRunning)return;t.onAsyncCompleted(o)}})}for(a=e.getValidators(),s=0;s<a.length;s++){var u=(l=a[s]).validate(e.validatedValue,e.getValidatorTitle(),r,i);u&&u.error&&n.push(u.error)}return 0==this.asyncValidators.length&&this.onAsyncCompleted&&this.onAsyncCompleted([]),n},e.prototype.prepareAsyncValidators=function(){if(this.asyncValidators)for(var e=0;e<this.asyncValidators.length;e++)this.asyncValidators[e].onAsyncCompleted=null;this.asyncValidators=[]},e}(),p=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this)||this;return r.minValue=t,r.maxValue=n,r}return u(t,e),t.prototype.getType=function(){return"numericvalidator"},t.prototype.validate=function(e,t,n,r){if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),this.isValueEmpty(e))return null;if(!l.Helpers.isNumber(e))return new c(null,new o.RequreNumericError(null,this.errorOwner));var i=new c(parseFloat(e));return null!==this.minValue&&this.minValue>i.value||null!==this.maxValue&&this.maxValue<i.value?(i.error=this.createCustomError(t),i):"number"==typeof e?null:i},t.prototype.getDefaultErrorText=function(e){var t=e||this.getLocalizationString("value");return null!==this.minValue&&null!==this.maxValue?this.getLocalizationFormatString("numericMinMax",t,this.minValue,this.maxValue):null!==this.minValue?this.getLocalizationFormatString("numericMin",t,this.minValue):this.getLocalizationFormatString("numericMax",t,this.maxValue)},Object.defineProperty(t.prototype,"minValue",{get:function(){return this.getPropertyValue("minValue")},set:function(e){this.setPropertyValue("minValue",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.getPropertyValue("maxValue")},set:function(e){this.setPropertyValue("maxValue",e)},enumerable:!1,configurable:!0}),t}(d),f=function(e){function t(){return e.call(this)||this}return u(t,e),t.prototype.getType=function(){return"textvalidator"},t.prototype.validate=function(e,t,n,r){return void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),this.isValueEmpty(e)?null:this.allowDigits||/^[A-Za-z\s]*$/.test(e)?this.minLength>0&&e.length<this.minLength||this.maxLength>0&&e.length>this.maxLength?new c(null,this.createCustomError(t)):null:new c(null,this.createCustomError(t))},t.prototype.getDefaultErrorText=function(e){return this.minLength>0&&this.maxLength>0?this.getLocalizationFormatString("textMinMaxLength",this.minLength,this.maxLength):this.minLength>0?this.getLocalizationFormatString("textMinLength",this.minLength):this.getLocalizationFormatString("textMaxLength",this.maxLength)},Object.defineProperty(t.prototype,"minLength",{get:function(){return this.getPropertyValue("minLength")},set:function(e){this.setPropertyValue("minLength",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLength",{get:function(){return this.getPropertyValue("maxLength")},set:function(e){this.setPropertyValue("maxLength",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowDigits",{get:function(){return this.getPropertyValue("allowDigits")},set:function(e){this.setPropertyValue("allowDigits",e)},enumerable:!1,configurable:!0}),t}(d),m=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this)||this;return r.minCount=t,r.maxCount=n,r}return u(t,e),t.prototype.getType=function(){return"answercountvalidator"},t.prototype.validate=function(e,t,n,r){if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),null==e||e.constructor!=Array)return null;var i=e.length;return 0==i?null:this.minCount&&i<this.minCount?new c(null,this.createCustomError(this.getLocalizationFormatString("minSelectError",this.minCount))):this.maxCount&&i>this.maxCount?new c(null,this.createCustomError(this.getLocalizationFormatString("maxSelectError",this.maxCount))):null},t.prototype.getDefaultErrorText=function(e){return e},Object.defineProperty(t.prototype,"minCount",{get:function(){return this.getPropertyValue("minCount")},set:function(e){this.setPropertyValue("minCount",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxCount",{get:function(){return this.getPropertyValue("maxCount")},set:function(e){this.setPropertyValue("maxCount",e)},enumerable:!1,configurable:!0}),t}(d),g=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this)||this;return n.regex=t,n}return u(t,e),t.prototype.getType=function(){return"regexvalidator"},t.prototype.validate=function(e,t,n,r){if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),!this.regex||this.isValueEmpty(e))return null;var i=new RegExp(this.regex);if(Array.isArray(e))for(var o=0;o<e.length;o++){var a=this.hasError(i,e[o],t);if(a)return a}return this.hasError(i,e,t)},t.prototype.hasError=function(e,t,n){return e.test(t)?null:new c(t,this.createCustomError(n))},Object.defineProperty(t.prototype,"regex",{get:function(){return this.getPropertyValue("regex")},set:function(e){this.setPropertyValue("regex",e)},enumerable:!1,configurable:!0}),t}(d),v=function(e){function t(){var t=e.call(this)||this;return t.re=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()=[\]\.,;:\s@\"]+\.)+[^<>()=[\]\.,;:\s@\"]{2,})$/i,t}return u(t,e),t.prototype.getType=function(){return"emailvalidator"},t.prototype.validate=function(e,t,n,r){return void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),e?this.re.test(e)?null:new c(e,this.createCustomError(t)):null},t.prototype.getDefaultErrorText=function(e){return this.getLocalizationString("invalidEmail")},t}(d),y=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this)||this;return n.conditionRunner=null,n.isRunningValue=!1,n.expression=t,n}return u(t,e),t.prototype.getType=function(){return"expressionvalidator"},Object.defineProperty(t.prototype,"isValidateAllValues",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAsync",{get:function(){return!!this.ensureConditionRunner()&&this.conditionRunner.isAsync},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRunning",{get:function(){return this.isRunningValue},enumerable:!1,configurable:!0}),t.prototype.validate=function(e,t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),!this.ensureConditionRunner())return null;this.conditionRunner.onRunComplete=function(n){i.isRunningValue=!1,i.onAsyncCompleted&&i.onAsyncCompleted(i.generateError(n,e,t))},this.isRunningValue=!0;var o=this.conditionRunner.run(n,r);return this.conditionRunner.isAsync?null:(this.isRunningValue=!1,this.generateError(o,e,t))},t.prototype.generateError=function(e,t,n){return e?null:new c(t,this.createCustomError(n))},t.prototype.getDefaultErrorText=function(e){return this.getLocalizationFormatString("invalidExpression",this.expression)},t.prototype.ensureConditionRunner=function(){return this.conditionRunner?(this.conditionRunner.expression=this.expression,!0):!!this.expression&&(this.conditionRunner=new s.ConditionRunner(this.expression),!0)},Object.defineProperty(t.prototype,"expression",{get:function(){return this.getPropertyValue("expression")},set:function(e){this.setPropertyValue("expression",e)},enumerable:!1,configurable:!0}),t}(d);a.Serializer.addClass("surveyvalidator",[{name:"text",serializationProperty:"locText"}]),a.Serializer.addClass("numericvalidator",["minValue:number","maxValue:number"],function(){return new p},"surveyvalidator"),a.Serializer.addClass("textvalidator",[{name:"minLength:number",default:0},{name:"maxLength:number",default:0},{name:"allowDigits:boolean",default:!0}],function(){return new f},"surveyvalidator"),a.Serializer.addClass("answercountvalidator",["minCount:number","maxCount:number"],function(){return new m},"surveyvalidator"),a.Serializer.addClass("regexvalidator",["regex"],function(){return new g},"surveyvalidator"),a.Serializer.addClass("emailvalidator",[],function(){return new v},"surveyvalidator"),a.Serializer.addClass("expressionvalidator",["expression:condition"],function(){return new y},"surveyvalidator")}})},e.exports=r()},zUnb:function(Ba,Wa,Ga){"use strict";function Za(e){return"function"==typeof e}Ga.r(Wa);var ns=!1,os={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else ns&&console.log("RxJS: Back to a better error behavior. Thank you. <3");ns=e},get useDeprecatedSynchronousErrorHandling(){return ns}};function ss(e){setTimeout(function(){throw e},0)}var ls={closed:!0,next:function(e){},error:function(e){if(os.useDeprecatedSynchronousErrorHandling)throw e;ss(e)},complete:function(){}},us=Array.isArray||function(e){return e&&"number"==typeof e.length};function cs(e){return null!==e&&"object"==typeof e}var ds,hs=function(){function e(e){return Error.call(this),this.message=e?"".concat(e.length," errors occurred during unsubscription:\n").concat(e.map(function(e,t){return"".concat(t+1,") ").concat(e.toString())}).join("\n  ")):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),ps=((ds=function(){function e(t){is(this,e),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return as(e,[{key:"unsubscribe",value:function(){var t;if(!this.closed){var n=this._parentOrParents,r=this._unsubscribe,i=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var o=0;o<n.length;++o)n[o].remove(this);if(Za(r))try{r.call(this)}catch(u){t=u instanceof hs?fs(u.errors):[u]}if(us(i))for(var a=-1,s=i.length;++a<s;){var l=i[a];if(cs(l))try{l.unsubscribe()}catch(u){t=t||[],u instanceof hs?t=t.concat(fs(u.errors)):t.push(u)}}if(t)throw new hs(t)}}},{key:"add",value:function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n}},{key:"remove",value:function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}]),e}()).EMPTY=function(e){return e.closed=!0,e}(new ds),ds);function fs(e){return e.reduce(function(e,t){return e.concat(t instanceof hs?t.errors:t)},[])}var ms="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),gs=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;switch(is(this,n),(o=t.call(this)).syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=ls;break;case 1:if(!e){o.destination=ls;break}if("object"==typeof e){e instanceof n?(o.syncErrorThrowable=e.syncErrorThrowable,o.destination=e,e.add(ts(o))):(o.syncErrorThrowable=!0,o.destination=new vs(ts(o),e));break}default:o.syncErrorThrowable=!0,o.destination=new vs(ts(o),e,r,i)}return o}return as(n,[{key:ms,value:function(){return this}},{key:"next",value:function(e){this.isStopped||this._next(e)}},{key:"error",value:function(e){this.isStopped||(this.isStopped=!0,this._error(e))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,Ya(rs(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(e){this.destination.next(e)}},{key:"_error",value:function(e){this.destination.error(e),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}],[{key:"create",value:function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i}}]),n}(ps),vs=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a,s;is(this,n),(a=t.call(this))._parentSubscriber=e;var l=ts(a);return Za(r)?s=r:r&&(s=r.next,i=r.error,o=r.complete,r!==ls&&(Za((l=Object.create(r)).unsubscribe)&&a.add(l.unsubscribe.bind(l)),l.unsubscribe=a.unsubscribe.bind(ts(a)))),a._context=l,a._next=s,a._error=i,a._complete=o,a}return as(n,[{key:"next",value:function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;os.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}},{key:"error",value:function(e){if(!this.isStopped){var t=this._parentSubscriber,n=os.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):ss(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;ss(e)}}}},{key:"complete",value:function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};os.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),os.useDeprecatedSynchronousErrorHandling)throw n;ss(n)}}},{key:"__tryOrSetError",value:function(e,t,n){if(!os.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return os.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(ss(r),!0)}return!1}},{key:"_unsubscribe",value:function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}]),n}(gs),ys="function"==typeof Symbol&&Symbol.observable||"@@observable";function bs(e){return e}var _s,ws=((_s=function(){function e(t){is(this,e),this._isScalar=!1,t&&(this._subscribe=t)}return as(e,[{key:"lift",value:function(t){var n=new e;return n.source=this,n.operator=t,n}},{key:"subscribe",value:function(e,t,n){var r=this.operator,i=function(e,t,n){if(e){if(e instanceof gs)return e;if(e[ms])return e[ms]()}return e||t||n?new gs(e,t,n):new gs(ls)}(e,t,n);if(i.add(r?r.call(i,this.source):this.source||os.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),os.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}},{key:"_trySubscribe",value:function(e){try{return this._subscribe(e)}catch(t){os.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,i=t.isStopped;if(n||i)return!1;e=r&&r instanceof gs?r:null}return!0}(e)?e.error(t):console.warn(t)}}},{key:"forEach",value:function(e,t){var n=this;return new(t=Cs(t))(function(t,r){var i;i=n.subscribe(function(t){try{e(t)}catch(n){r(n),i&&i.unsubscribe()}},r,t)})}},{key:"_subscribe",value:function(e){var t=this.source;return t&&t.subscribe(e)}},{key:ys,value:function(){return this}},{key:"pipe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?this:(0===(r=t).length?bs:1===r.length?r[0]:function(e){return r.reduce(function(e,t){return t(e)},e)})(this);var r}},{key:"toPromise",value:function(e){var t=this;return new(e=Cs(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})}}]),e}()).create=function(e){return new _s(e)},_s);function Cs(e){if(e||(e=os.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var xs,Ss=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Ps=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this)).subject=e,i.subscriber=r,i.closed=!1,i}return as(n,[{key:"unsubscribe",value:function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}}}]),n}(ps),ks=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this,e)).destination=e,r}return n}(gs),Es=((xs=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.call(this)).observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return as(n,[{key:ms,value:function(){return new ks(this)}},{key:"lift",value:function(e){var t=new As(this,this);return t.operator=e,t}},{key:"next",value:function(e){if(this.closed)throw new Ss;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)}},{key:"error",value:function(e){if(this.closed)throw new Ss;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0}},{key:"complete",value:function(){if(this.closed)throw new Ss;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0}},{key:"unsubscribe",value:function(){this.isStopped=!0,this.closed=!0,this.observers=null}},{key:"_trySubscribe",value:function(e){if(this.closed)throw new Ss;return Ya(rs(n.prototype),"_trySubscribe",this).call(this,e)}},{key:"_subscribe",value:function(e){if(this.closed)throw new Ss;return this.hasError?(e.error(this.thrownError),ps.EMPTY):this.isStopped?(e.complete(),ps.EMPTY):(this.observers.push(e),new Ps(this,e))}},{key:"asObservable",value:function(){var e=new ws;return e.source=this,e}}]),n}(ws)).create=function(e,t){return new As(e,t)},xs),As=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this)).destination=e,i.source=r,i}return as(n,[{key:"next",value:function(e){var t=this.destination;t&&t.next&&t.next(e)}},{key:"error",value:function(e){var t=this.destination;t&&t.error&&this.destination.error(e)}},{key:"complete",value:function(){var e=this.destination;e&&e.complete&&this.destination.complete()}},{key:"_subscribe",value:function(e){return this.source?this.source.subscribe(e):ps.EMPTY}}]),n}(Es);function Is(e){return e&&"function"==typeof e.schedule}var Ts=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this)).parent=e,o.outerValue=r,o.outerIndex=i,o.index=0,o}return as(n,[{key:"_next",value:function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}},{key:"_error",value:function(e){this.parent.notifyError(e,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(gs),Os=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};var Rs="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",Vs=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Ds(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var Ns=function(e){if(e&&"function"==typeof e[ys])return r=e,function(e){var t=r[ys]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Vs(e))return Os(e);if(Ds(e))return n=e,function(e){return n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,ss),e};if(e&&"function"==typeof e[Rs])return t=e,function(e){for(var n=t[Rs]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e};var t,n,r,i=cs(e)?"an invalid object":"'".concat(e,"'");throw new TypeError("You provided ".concat(i," where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))};function Ls(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Ts(e,n,r);if(!i.closed)return t instanceof ws?t.subscribe(i):Ns(t)(i)}var Fs=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}},{key:"notifyError",value:function(e,t){this.destination.error(e)}},{key:"notifyComplete",value:function(e){this.destination.complete()}}]),n}(gs);function Ms(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new qs(e,t))}}var qs=function(){function e(t,n){is(this,e),this.project=t,this.thisArg=n}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new js(e,this.project,this.thisArg))}}]),e}(),js=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e)).project=r,o.count=0,o.thisArg=i||ts(o),o}return as(n,[{key:"_next",value:function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(gs);function Bs(e,t){return new ws(function(n){var r=new ps,i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function zs(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[ys]}(e))return function(e,t){return new ws(function(n){var r=new ps;return r.add(t.schedule(function(){var i=e[ys]();r.add(i.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}(e,t);if(Ds(e))return function(e,t){return new ws(function(n){var r=new ps;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}(e,t);if(Vs(e))return Bs(e,t);if(function(e){return e&&"function"==typeof e[Rs]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new ws(function(n){var r,i=new ps;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(function(){r=e[Rs](),i.add(t.schedule(function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(o){return void n.error(o)}t?n.complete():(n.next(e),this.schedule())}}))})),i})}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof ws?e:new ws(Ns(e))}function Us(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof t?function(r){return r.pipe(Us(function(n,r){return zs(e(n,r)).pipe(Ms(function(e,i){return t(n,e,r,i)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new Hs(e,n))})}var Hs=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;is(this,e),this.project=t,this.concurrent=n}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new Qs(e,this.project,this.concurrent))}}]),e}(),Qs=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return is(this,n),(i=t.call(this,e)).project=r,i.concurrent=o,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return as(n,[{key:"_next",value:function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var r=new Ts(this,t,n),i=this.destination;i.add(r);var o=Ls(this,e,void 0,void 0,r);o!==r&&i.add(o)}},{key:"_complete",value:function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}},{key:"notifyComplete",value:function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(Fs);function Ws(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return Us(bs,e)}function Gs(e,t){return t?Bs(e,t):new ws(Os(e))}function $s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Number.POSITIVE_INFINITY,i=null,o=t[t.length-1];return Is(o)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof o&&(r=t.pop()),null===i&&1===t.length&&t[0]instanceof ws?t[0]:Ws(r)(Gs(t,i))}function Js(){return function(e){return e.lift(new Ks(e))}}var Ys,Ks=function(){function e(t){is(this,e),this.connectable=t}return as(e,[{key:"call",value:function(e,t){var n=this.connectable;n._refCount++;var r=new Zs(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i}}]),e}(),Zs=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).connectable=r,i}return as(n,[{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}]),n}(gs),Xs={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(Ys=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this)).source=e,i.subjectFactory=r,i._refCount=0,i._isComplete=!1,i}return as(n,[{key:"_subscribe",value:function(e){return this.getSubject().subscribe(e)}},{key:"getSubject",value:function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new ps).add(this.source.subscribe(new el(this.getSubject(),this))),e.closed&&(this._connection=null,e=ps.EMPTY)),e}},{key:"refCount",value:function(){return Js()(this)}}]),n}(ws).prototype)._subscribe},_isComplete:{value:Ys._isComplete,writable:!0},getSubject:{value:Ys.getSubject},connect:{value:Ys.connect},refCount:{value:Ys.refCount}},el=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).connectable=r,i}return as(n,[{key:"_error",value:function(e){this._unsubscribe(),Ya(rs(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),Ya(rs(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}]),n}(ks);function tl(){return new Es}function nl(e){for(var t in e)if(e[t]===nl)return t;throw Error("Could not find renamed property on target object.")}function rl(e,t){for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function il(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(il).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function ol(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}var al=nl({__forward_ref__:nl});function sl(e){return e.__forward_ref__=sl,e.toString=function(){return il(this())},e}function ll(e){return ul(e)?e():e}function ul(e){return"function"==typeof e&&e.hasOwnProperty(al)&&e.__forward_ref__===sl}function cl(e,t,n,r){throw new Error("ASSERTION ERROR: "+e+(null==r?"":" [Expected=> ".concat(n," ").concat(r," ").concat(t," <=Actual]")))}function dl(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function hl(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function pl(e){return fl(e,vl)||fl(e,bl)}function fl(e,t){return e.hasOwnProperty(t)?e[t]:null}function ml(e){return e&&(e.hasOwnProperty(yl)||e.hasOwnProperty(_l))?e[yl]:null}var gl,vl=nl({"\u0275prov":nl}),yl=nl({"\u0275inj":nl}),bl=nl({ngInjectableDef:nl}),_l=nl({ngInjectorDef:nl}),wl=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function Cl(e){var t=gl;return gl=e,t}function xl(e,t,n){var r=pl(e);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&wl.Optional)return null;if(void 0!==t)return t;throw new Error("Injector: NOT_FOUND [".concat(il(e),"]"))}function Sl(e){return{toString:e}.toString()}var Pl=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}({}),kl=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}({}),El="undefined"!=typeof globalThis&&globalThis,Al="undefined"!=typeof window&&window,Il="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Tl="undefined"!=typeof global&&global,Ol=El||Tl||Al||Il,Rl={},Vl=[],Dl=nl({"\u0275cmp":nl}),Nl=nl({"\u0275dir":nl}),Ll=nl({"\u0275pipe":nl}),Fl=nl({"\u0275mod":nl}),Ml=nl({"\u0275loc":nl}),ql=nl({"\u0275fac":nl}),jl=nl({__NG_ELEMENT_ID__:nl}),Bl=0;function zl(e){return Sl(function(){var t={},n={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===Pl.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||Vl,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||kl.Emulated,id:"c",styles:e.styles||Vl,_:null,setInput:null,schemas:e.schemas||null,tView:null},r=e.directives,i=e.features,o=e.pipes;return n.id+=Bl++,n.inputs=Gl(e.inputs,t),n.outputs=Gl(e.outputs),i&&i.forEach(function(e){return e(n)}),n.directiveDefs=r?function(){return("function"==typeof r?r():r).map(Ul)}:null,n.pipeDefs=o?function(){return("function"==typeof o?o():o).map(Hl)}:null,n})}function Ul(e){return Yl(e)||function(e){return e[Nl]||null}(e)}function Hl(e){return function(e){return e[Ll]||null}(e)}var Ql={};function Wl(e){var t={type:e.type,bootstrap:e.bootstrap||Vl,declarations:e.declarations||Vl,imports:e.imports||Vl,exports:e.exports||Vl,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&Sl(function(){Ql[e.id]=e.type}),t}function Gl(e,t){if(null==e)return Rl;var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),n[i]=r,t&&(t[i]=o)}return n}var $l=zl;function Jl(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function Yl(e){return e[Dl]||null}function Kl(e,t){var n=e[Fl]||null;if(!n&&!0===t)throw new Error("Type ".concat(il(e)," does not have '\u0275mod' property."));return n}function Zl(e){return Array.isArray(e)&&"object"==typeof e[1]}function Xl(e){return Array.isArray(e)&&!0===e[1]}function eu(e){return 0!=(8&e.flags)}function tu(e){return 2==(2&e.flags)}function nu(e){return 1==(1&e.flags)}function ru(e){return null!==e.template}function iu(e,t){return e.hasOwnProperty(ql)?e[ql]:null}var ou=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,function(e,t){return"".concat(e?"NG0".concat(e,": "):"").concat(t)}(e,r))).code=e,i}return n}($a(Error));function au(e){return"string"==typeof e?e:null==e?"":String(e)}function su(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():au(e)}function lu(e,t){var n=t?" in "+t:"";throw new ou("201","No provider for ".concat(su(e)," found").concat(n))}var uu=function(){function e(t,n,r){is(this,e),this.previousValue=t,this.currentValue=n,this.firstChange=r}return as(e,[{key:"isFirstChange",value:function(){return this.firstChange}}]),e}();function cu(){return du}function du(e){return e.type.prototype.ngOnChanges&&(e.setInput=pu),hu}function hu(){var e=fu(this),t=null==e?void 0:e.current;if(t){var n=e.previous;if(n===Rl)e.previous=t;else for(var r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function pu(e,t,n,r){var i=fu(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:Rl,current:null}),o=i.current||(i.current={}),a=i.previous,s=this.declaredInputs[n],l=a[s];o[s]=new uu(l&&l.currentValue,t,a===Rl),e[r]=t}function fu(e){return e.__ngSimpleChanges__||null}cu.ngInherit=!0;var mu=void 0;function gu(){return void 0!==mu?mu:"undefined"!=typeof document?document:void 0}function vu(e){return!!e.listen}var yu={createRenderer:function(e,t){return gu()}};function bu(e){for(;Array.isArray(e);)e=e[0];return e}function _u(e,t){return bu(t[e])}function wu(e,t){return bu(t[e.index])}function Cu(e,t){return e.data[t]}function xu(e,t){return e[t]}function Su(e,t){var n=t[e];return Zl(n)?n:n[0]}function Pu(e){var t=function(e){return e.__ngContext__||null}(e);return t?Array.isArray(t)?t:t.lView:null}function ku(e){return 4==(4&e[2])}function Eu(e){return 128==(128&e[2])}function Au(e,t){return null==t?null:e[t]}function Iu(e){e[18]=0}function Tu(e,t){e[5]+=t;for(var n=e,r=e[3];null!==r&&(1===t&&1===n[5]||-1===t&&0===n[5]);)r[5]+=t,n=r,r=r[3]}var Ou={lFrame:rc(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Ru(){return Ou.bindingsEnabled}function Vu(){return Ou.lFrame.lView}function Du(){return Ou.lFrame.tView}function Nu(e){Ou.lFrame.contextLView=e}function Lu(){for(var e=Fu();null!==e&&64===e.type;)e=e.parent;return e}function Fu(){return Ou.lFrame.currentTNode}function Mu(){var e=Ou.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function qu(e,t){var n=Ou.lFrame;n.currentTNode=e,n.isParent=t}function ju(){return Ou.lFrame.isParent}function Bu(){Ou.lFrame.isParent=!1}function zu(){return Ou.isInCheckNoChangesMode}function Uu(e){Ou.isInCheckNoChangesMode=e}function Hu(){var e=Ou.lFrame,t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Qu(){return Ou.lFrame.bindingIndex}function Wu(){return Ou.lFrame.bindingIndex++}function Gu(e){var t=Ou.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function $u(e){Ou.lFrame.inI18n=e}function Ju(e){Ou.lFrame.currentDirectiveIndex=e}function Yu(e){var t=Ou.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}function Ku(){return Ou.lFrame.currentQueryIndex}function Zu(e){Ou.lFrame.currentQueryIndex=e}function Xu(e){var t=e[1];return 2===t.type?t.declTNode:1===t.type?e[6]:null}function ec(e,t,n){if(n&wl.SkipSelf){for(var r=t,i=e;!(null!==(r=r.parent)||n&wl.Host||(r=Xu(i),null===r)||(i=i[15],10&r.type)););if(null===r)return!1;t=r,e=i}var o=Ou.lFrame=nc();return o.currentTNode=t,o.lView=e,!0}function tc(e){var t=nc(),n=e[1];Ou.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function nc(){var e=Ou.lFrame,t=null===e?null:e.child;return null===t?rc(e):t}function rc(e){var t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function ic(){var e=Ou.lFrame;return Ou.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var oc=ic;function ac(){var e=ic();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function sc(){return Ou.lFrame.selectedIndex}function lc(e){Ou.lFrame.selectedIndex=e}function uc(){var e=Ou.lFrame;return Cu(e.tView,e.selectedIndex)}function cc(){Ou.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function dc(e,t){for(var n=t.directiveStart,r=t.directiveEnd;n<r;n++){var i=e.data[n].type.prototype,o=i.ngAfterContentInit,a=i.ngAfterContentChecked,s=i.ngAfterViewInit,l=i.ngAfterViewChecked,u=i.ngOnDestroy;o&&(e.contentHooks||(e.contentHooks=[])).push(-n,o),a&&((e.contentHooks||(e.contentHooks=[])).push(n,a),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,a)),s&&(e.viewHooks||(e.viewHooks=[])).push(-n,s),l&&((e.viewHooks||(e.viewHooks=[])).push(n,l),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,l)),null!=u&&(e.destroyHooks||(e.destroyHooks=[])).push(n,u)}}function hc(e,t,n){mc(e,t,3,n)}function pc(e,t,n,r){(3&e[2])===n&&mc(e,t,n,r)}function fc(e,t){var n=e[2];(3&n)===t&&(n&=2047,n+=1,e[2]=n)}function mc(e,t,n,r){for(var i=null!=r?r:-1,o=0,a=void 0!==r?65535&e[18]:0;a<t.length;a++)if("number"==typeof t[a+1]){if(o=t[a],null!=r&&o>=r)break}else t[a]<0&&(e[18]+=65536),(o<i||-1==i)&&(gc(e,n,t,a),e[18]=(4294901760&e[18])+a+2),a++}function gc(e,t,n,r){var i=n[r]<0,o=n[r+1],a=e[i?-n[r]:n[r]];i?e[2]>>11<e[18]>>16&&(3&e[2])===t&&(e[2]+=2048,o.call(a)):o.call(a)}var vc=function e(t,n,r){is(this,e),this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r};function yc(e,t,n){for(var r=vu(e),i=0;i<n.length;){var o=n[i];if("number"==typeof o){if(0!==o)break;i++;var a=n[i++],s=n[i++],l=n[i++];r?e.setAttribute(t,s,l,a):t.setAttributeNS(a,s,l)}else{var u=o,c=n[++i];_c(u)?r&&e.setProperty(t,u,c):r?e.setAttribute(t,u,c):t.setAttribute(u,c),i++}}return i}function bc(e){return 3===e||4===e||6===e}function _c(e){return 64===e.charCodeAt(0)}function wc(e,t){if(null===t||0===t.length);else if(null===e||0===e.length)e=t.slice();else for(var n=-1,r=0;r<t.length;r++){var i=t[r];"number"==typeof i?n=i:0===n||Cc(e,n,i,null,-1===n||2===n?t[++r]:null)}return e}function Cc(e,t,n,r,i){var o=0,a=e.length;if(-1===t)a=-1;else for(;o<e.length;){var s=e[o++];if("number"==typeof s){if(s===t){a=-1;break}if(s>t){a=o-1;break}}}for(;o<e.length;){var l=e[o];if("number"==typeof l)break;if(l===n){if(null===r)return void(null!==i&&(e[o+1]=i));if(r===e[o+1])return void(e[o+2]=i)}o++,null!==r&&o++,null!==i&&o++}-1!==a&&(e.splice(a,0,t),o=a+1),e.splice(o++,0,n),null!==r&&e.splice(o++,0,r),null!==i&&e.splice(o++,0,i)}function xc(e){return-1!==e}function Sc(e){return 32767&e}function Pc(e,t){for(var n=e>>16,r=t;n>0;)r=r[15],n--;return r}var kc=!0;function Ec(e){var t=kc;return kc=e,t}var Ac=0;function Ic(e,t){var n=Oc(e,t);if(-1!==n)return n;var r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,Tc(r.data,e),Tc(t,null),Tc(r.blueprint,null));var i=Rc(e,t),o=e.injectorIndex;if(xc(i))for(var a=Sc(i),s=Pc(i,t),l=s[1].data,u=0;u<8;u++)t[o+u]=s[a+u]|l[a+u];return t[o+8]=i,o}function Tc(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Oc(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function Rc(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=0,r=null,i=t;null!==i;){var o=i[1],a=o.type;if(null===(r=2===a?o.declTNode:1===a?i[6]:null))return-1;if(n++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function Vc(e,t,n){!function(e,t,n){var r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(jl)&&(r=n[jl]),null==r&&(r=n[jl]=Ac++);var i=255&r,o=1<<i,a=64&i,s=32&i,l=t.data;128&i?a?s?l[e+7]|=o:l[e+6]|=o:s?l[e+5]|=o:l[e+4]|=o:a?s?l[e+3]|=o:l[e+2]|=o:s?l[e+1]|=o:l[e]|=o}(e,t,n)}function Dc(e,t,n){if(n&wl.Optional)return e;lu(t,"NodeInjector")}function Nc(e,t,n,r){if(n&wl.Optional&&void 0===r&&(r=null),0==(n&(wl.Self|wl.Host))){var i=e[9],o=Cl(void 0);try{return i?i.get(t,r,n&wl.Optional):xl(t,r,n&wl.Optional)}finally{Cl(o)}}return Dc(r,t,n)}function Lc(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wl.Default,i=arguments.length>4?arguments[4]:void 0;if(null!==e){var o=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e.hasOwnProperty(jl)?e[jl]:void 0;return"number"==typeof t?t>=0?255&t:Mc:t}(n);if("function"==typeof o){if(!ec(t,e,r))return r&wl.Host?Dc(i,n,r):Nc(t,n,r,i);try{var a=o();if(null!=a||r&wl.Optional)return a;lu(n)}finally{oc()}}else if("number"==typeof o){var s=null,l=Oc(e,t),u=-1,c=r&wl.Host?t[16][6]:null;for((-1===l||r&wl.SkipSelf)&&(-1!==(u=-1===l?Rc(e,t):t[l+8])&&Uc(r,!1)?(s=t[1],l=Sc(u),t=Pc(u,t)):l=-1);-1!==l;){var d=t[1];if(zc(o,l,d.data)){var h=qc(l,t,n,s,r,c);if(h!==Fc)return h}-1!==(u=t[l+8])&&Uc(r,t[1].data[l+8]===c)&&zc(o,l,t)?(s=d,l=Sc(u),t=Pc(u,t)):l=-1}}}return Nc(t,n,r,i)}var Fc={};function Mc(){return new Hc(Lu(),Vu())}function qc(e,t,n,r,i,o){var a=t[1],s=a.data[e+8],l=jc(s,a,n,null==r?tu(s)&&kc:r!=a&&0!=(3&s.type),i&wl.Host&&o===s);return null!==l?Bc(t,a,l,s):Fc}function jc(e,t,n,r,i){for(var o=e.providerIndexes,a=t.data,s=1048575&o,l=e.directiveStart,u=o>>20,c=i?s+u:e.directiveEnd,d=r?s:s+u;d<c;d++){var h=a[d];if(d<l&&n===h||d>=l&&h.type===n)return d}if(i){var p=a[l];if(p&&ru(p)&&p.type===n)return l}return null}function Bc(e,t,n,r){var i=e[n],o=t.data;if(i instanceof vc){var a=i;a.resolving&&function(e,t){throw new ou("200","Circular dependency in DI detected for "+e)}(su(o[n]));var s=Ec(a.canSeeViewProviders);a.resolving=!0;var l=a.injectImpl?Cl(a.injectImpl):null;ec(e,r,wl.Default);try{i=e[n]=a.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&function(e,t,n){var r=t.type.prototype,i=r.ngOnChanges,o=r.ngOnInit,a=r.ngDoCheck;if(i){var s=du(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,s)}o&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,o),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,a))}(n,o[n],t)}finally{null!==l&&Cl(l),Ec(s),a.resolving=!1,oc()}}return i}function zc(e,t,n){var r=64&e,i=32&e;return!!((128&e?r?i?n[t+7]:n[t+6]:i?n[t+5]:n[t+4]:r?i?n[t+3]:n[t+2]:i?n[t+1]:n[t])&1<<e)}function Uc(e,t){return!(e&wl.Self||e&wl.Host&&t)}var Hc=function(){function e(t,n){is(this,e),this._tNode=t,this._lView=n}return as(e,[{key:"get",value:function(e,t){return Lc(this._tNode,this._lView,e,void 0,t)}}]),e}();function Qc(e){var t=e;if(ul(e))return function(){var e=Qc(ll(t));return e?e():null};var n=iu(t);if(null===n){var r=ml(t);n=r&&r.factory}return n||null}function Wc(e){return Sl(function(){for(var t=e.prototype.constructor,n=t[ql]||Qc(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;i&&i!==r;){var o=i[ql]||Qc(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return function(e){return new e}})}function Gc(e,t,n){return Sl(function(){var r=function(e){return function(){if(e){var t=e.apply(void 0,arguments);for(var n in t)this[n]=t[n]}}}(t);function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this instanceof i)return r.apply(this,t),this;var o=Ja(i,t);return a.annotation=o,a;function a(e,t,n){for(var r=e.hasOwnProperty("__parameters__")?e.__parameters__:Object.defineProperty(e,"__parameters__",{value:[]}).__parameters__;r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(o),e}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}var $c=function(){function e(t,n){is(this,e),this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=dl({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}return as(e,[{key:"toString",value:function(){return"InjectionToken "+this._desc}}]),e}(),Jc=new $c("AnalyzeForEntryComponents"),Yc=Function;function Kc(e,t){void 0===t&&(t=e);for(var n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?(t===e&&(t=e.slice(0,n)),Kc(r,t)):t!==e&&t.push(r)}return t}function Zc(e,t){e.forEach(function(e){return Array.isArray(e)?Zc(e,t):t(e)})}function Xc(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ed(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function td(e,t){for(var n=[],r=0;r<e;r++)n.push(t);return n}function nd(e,t,n){var r=id(e,t);return r>=0?e[1|r]=n:function(e,t,n,r){var i=e.length;if(i==t)e.push(n,r);else if(1===i)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;)e[i]=e[i-2],i--;e[t]=n,e[t+1]=r}}(e,r=~r,t,n),r}function rd(e,t){var n=id(e,t);if(n>=0)return e[1|n]}function id(e,t){return function(e,t,n){for(var r=0,i=e.length>>1;i!==r;){var o=r+(i-r>>1),a=e[o<<1];if(t===a)return o<<1;a>t?i=o:r=o+1}return~(i<<1)}(e,t)}var od=Gc("Inject",function(e){return{token:e}}),ad=Gc("Optional"),sd=Gc("Self"),ld=Gc("SkipSelf"),ud={},cd=/\n/gm,dd=nl({provide:String,useValue:nl}),hd=void 0;function pd(e){var t=hd;return hd=e,t}function fd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wl.Default;if(void 0===hd)throw new Error("inject() must be called from an injection context");return null===hd?xl(e,void 0,t):hd.get(e,t&wl.Optional?null:void 0,t)}function md(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wl.Default;return(gl||fd)(ll(e),t)}var gd,vd=md;function yd(e){for(var t=[],n=0;n<e.length;n++){var r=ll(e[n]);if(Array.isArray(r)){if(0===r.length)throw new Error("Arguments array must have arguments.");for(var i=void 0,o=wl.Default,a=0;a<r.length;a++){var s=r[a];s instanceof ad||"Optional"===s.ngMetadataName||s===ad?o|=wl.Optional:s instanceof ld||"SkipSelf"===s.ngMetadataName||s===ld?o|=wl.SkipSelf:s instanceof sd||"Self"===s.ngMetadataName||s===sd?o|=wl.Self:i=s instanceof od||s===od?s.token:s}t.push(md(i,o))}else t.push(md(r))}return t}function bd(e){var t;return(null===(t=function(){if(void 0===gd&&(gd=null,Ol.trustedTypes))try{gd=Ol.trustedTypes.createPolicy("angular",{createHTML:function(e){return e},createScript:function(e){return e},createScriptURL:function(e){return e}})}catch(t){}return gd}())||void 0===t?void 0:t.createHTML(e))||e}var _d=function(){function e(t){is(this,e),this.changingThisBreaksApplicationSecurity=t}return as(e,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see https://g.co/ng/security#xss)"}}]),e}(),wd=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}(_d),Cd=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}(_d),xd=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}(_d),Sd=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}(_d),Pd=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}(_d);function kd(e){return e instanceof _d?e.changingThisBreaksApplicationSecurity:e}function Ed(e,t){var n=Ad(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error("Required a safe ".concat(t,", got a ").concat(n," (see https://g.co/ng/security#xss)"))}return n===t}function Ad(e){return e instanceof _d&&e.getTypeName()||null}var Id=!0,Td=!1;function Od(){return Td=!0,Id}function Rd(e){return function(){try{return!!(new window.DOMParser).parseFromString(bd(""),"text/html")}catch(e){return!1}}()?new Vd:new Dd(e)}var Vd=function(){function e(){is(this,e)}return as(e,[{key:"getInertBodyElement",value:function(e){e="<body><remove></remove>"+e;try{var t=(new window.DOMParser).parseFromString(bd(e),"text/html").body;return t.removeChild(t.firstChild),t}catch(n){return null}}}]),e}(),Dd=function(){function e(t){if(is(this,e),this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);var r=this.inertDocument.createElement("body");n.appendChild(r)}}return as(e,[{key:"getInertBodyElement",value:function(e){var t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=bd(e),t;var n=this.inertDocument.createElement("body");return n.innerHTML=bd(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(e){for(var t=e.attributes,n=t.length-1;0<n;n--){var r=t.item(n).name;"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||e.removeAttribute(r)}for(var i=e.firstChild;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}]),e}(),Nd=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,Ld=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Fd(e){return(e=String(e)).match(Nd)||e.match(Ld)?e:(Od()&&console.warn("WARNING: sanitizing unsafe URL value ".concat(e," (see https://g.co/ng/security#xss)")),"unsafe:"+e)}function Md(e){return(e=String(e)).split(",").map(function(e){return Fd(e.trim())}).join(", ")}function qd(e){var t,n={},r=Qa(e.split(","));try{for(r.s();!(t=r.n()).done;){n[t.value]=!0}}catch(i){r.e(i)}finally{r.f()}return n}function jd(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var s in a)a.hasOwnProperty(s)&&(e[s]=!0)}return e}var Bd,zd=qd("area,br,col,hr,img,wbr"),Ud=qd("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Hd=qd("rp,rt"),Qd=jd(Hd,Ud),Wd=jd(zd,jd(Ud,qd("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),jd(Hd,qd("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Qd),Gd=qd("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),$d=qd("srcset"),Jd=jd(Gd,$d,qd("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),qd("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Yd=qd("script,style,template"),Kd=function(){function e(){is(this,e),this.sanitizedSomething=!1,this.buf=[]}return as(e,[{key:"sanitizeChildren",value:function(e){for(var t=e.firstChild,n=!0;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);var r=this.checkClobberedElement(t,t.nextSibling);if(r){t=r;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}},{key:"startElement",value:function(e){var t=e.nodeName.toLowerCase();if(!Wd.hasOwnProperty(t))return this.sanitizedSomething=!0,!Yd.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);for(var n=e.attributes,r=0;r<n.length;r++){var i=n.item(r),o=i.name,a=o.toLowerCase();if(Jd.hasOwnProperty(a)){var s=i.value;Gd[a]&&(s=Fd(s)),$d[a]&&(s=Md(s)),this.buf.push(" ",o,'="',eh(s),'"')}else this.sanitizedSomething=!0}return this.buf.push(">"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();Wd.hasOwnProperty(t)&&!zd.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}},{key:"chars",value:function(e){this.buf.push(eh(e))}},{key:"checkClobberedElement",value:function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}]),e}(),Zd=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xd=/([^\#-~ |!])/g;function eh(e){return e.replace(/&/g,"&amp;").replace(Zd,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(Xd,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function th(e,t){var n=null;try{Bd=Bd||Rd(e);var r=t?String(t):"";n=Bd.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=Bd.getInertBodyElement(r)}while(r!==o);var a=new Kd,s=a.sanitizeChildren(nh(n)||n);return Od()&&a.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss"),s}finally{if(n)for(var l=nh(n)||n;l.firstChild;)l.removeChild(l.firstChild)}}function nh(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var rh=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function ih(e){var t=sh();return t?t.sanitize(rh.HTML,e)||"":Ed(e,"HTML")?kd(e):th(gu(),au(e))}function oh(e){var t=sh();return t?t.sanitize(rh.URL,e)||"":Ed(e,"URL")?kd(e):Fd(au(e))}function ah(e){var t=sh();if(t)return t.sanitize(rh.RESOURCE_URL,e)||"";if(Ed(e,"ResourceURL"))return kd(e);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)")}function sh(){var e=Vu();return e&&e[12]}function lh(e){return e.ngDebugContext}function uh(e){return e.ngOriginalError}function ch(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e.error.apply(e,n)}var dh=function(){function e(){is(this,e),this._console=console}return as(e,[{key:"handleError",value:function(e){var t=this._findOriginalError(e),n=this._findContext(e),r=function(e){return e.ngErrorLogger||ch}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),n&&r(this._console,"ERROR CONTEXT",n)}},{key:"_findContext",value:function(e){return e?lh(e)?lh(e):this._findContext(uh(e)):null}},{key:"_findOriginalError",value:function(e){for(var t=uh(e);t&&uh(t);)t=uh(t);return t}}]),e}();function hh(e,t){e.__ngContext__=t}var ph=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Ol);function fh(e){return{name:"window",target:e.ownerDocument.defaultView}}function mh(e){return{name:"body",target:e.ownerDocument.body}}function gh(e){return e instanceof Function?e():e}var vh,yh=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}({});function bh(e,t){return vh(e,t)}function _h(e){var t=e[3];return Xl(t)?t[3]:t}function wh(e){return xh(e[13])}function Ch(e){return xh(e[4])}function xh(e){for(;null!==e&&!Xl(e);)e=e[4];return e}function Sh(e,t,n,r,i){if(null!=r){var o,a=!1;Xl(r)?o=r:Zl(r)&&(a=!0,r=r[0]);var s=bu(r);0===e&&null!==n?null==i?Lh(t,n,s):Nh(t,n,s,i||null,!0):1===e&&null!==n?Nh(t,n,s,i||null,!0):2===e?Gh(t,s,a):3===e&&t.destroyNode(s),null!=o&&function(e,t,n,r,i){var o=n[7];o!==bu(n)&&Sh(t,e,r,o,i);for(var a=10;a<n.length;a++){var s=n[a];Jh(s[1],s,e,t,r,o)}}(t,e,o,n,i)}}function Ph(e,t){return vu(e)?e.createText(t):e.createTextNode(t)}function kh(e,t,n){vu(e)?e.setValue(t,n):t.textContent=n}function Eh(e,t){return e.createComment(t)}function Ah(e,t,n){return vu(e)?e.createElement(t,n):null===n?e.createElement(t):e.createElementNS(n,t)}function Ih(e,t){var n=e[9],r=n.indexOf(t),i=t[3];1024&t[2]&&(t[2]&=-1025,Tu(i,-1)),n.splice(r,1)}function Th(e,t){if(!(e.length<=10)){var n,r=10+t,i=e[r];if(i){var o=i[17];null!==o&&o!==e&&Ih(o,i),t>0&&(e[r-1][4]=i[4]);var a=ed(e,10+t);Jh(i[1],n=i,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function Oh(e,t){if(!(256&t[2])){var n=t[11];vu(n)&&n.destroyNode&&Jh(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return Rh(e[1],e);for(;t;){var n=null;if(Zl(t))n=t[13];else{var r=t[10];r&&(n=r)}if(!n){for(;t&&!t[4]&&t!==e;)Zl(t)&&Rh(t[1],t),t=t[3];null===t&&(t=e),Zl(t)&&Rh(t[1],t),n=t&&t[4]}t=n}}(t)}}function Rh(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){var n;if(null!=e&&null!=(n=e.destroyHooks))for(var r=0;r<n.length;r+=2){var i=t[n[r]];if(!(i instanceof vc)){var o=n[r+1];if(Array.isArray(o))for(var a=0;a<o.length;a+=2)o[a+1].call(i[o[a]]);else o.call(i)}}}(e,t),function(e,t){var n=e.cleanup;if(null!==n){for(var r=t[7],i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){var o=n[i+1],a="function"==typeof o?o(t):bu(t[o]),s=r[n[i+2]],l=n[i+3];"boolean"==typeof l?a.removeEventListener(n[i],s,l):l>=0?r[l]():r[-l].unsubscribe(),i+=2}else n[i].call(r[n[i+1]]);t[7]=null}}(e,t),1===t[1].type&&vu(t[11])&&t[11].destroy();var n=t[17];if(null!==n&&Xl(t[3])){n!==t[3]&&Ih(n,t);var r=t[19];null!==r&&r.detachView(e)}}}function Vh(e,t,n){return Dh(e,t.parent,n)}function Dh(e,t,n){for(var r=t;null!==r&&40&r.type;)r=(t=r).parent;if(null===r)return n[0];if(2&r.flags){var i=e.data[r.directiveStart].encapsulation;if(i===kl.None||i===kl.Emulated)return null}return wu(r,n)}function Nh(e,t,n,r,i){vu(e)?e.insertBefore(t,n,r,i):t.insertBefore(n,r,i)}function Lh(e,t,n){vu(e)?e.appendChild(t,n):t.appendChild(n)}function Fh(e,t,n,r,i){null!==r?Nh(e,t,n,r,i):Lh(e,t,n)}function Mh(e,t){return vu(e)?e.parentNode(t):t.parentNode}function qh(e,t,n){return zh(e,t,n)}function jh(e,t,n){return 40&e.type?wu(e,n):null}var Bh,zh=jh;function Uh(e,t){zh=e,Bh=t}function Hh(e,t,n,r){var i=Vh(e,r,t),o=t[11],a=qh(r.parent||t[6],r,t);if(null!=i)if(Array.isArray(n))for(var s=0;s<n.length;s++)Fh(o,i,n[s],a,!1);else Fh(o,i,n,a,!1);void 0!==Bh&&Bh(o,r,t,n,i)}function Qh(e,t){if(null!==t){var n=t.type;if(3&n)return wu(t,e);if(4&n)return Wh(-1,e[t.index]);if(8&n){var r=t.child;if(null!==r)return Qh(e,r);var i=e[t.index];return Xl(i)?Wh(-1,i):bu(i)}if(32&n)return bh(t,e)()||bu(e[t.index]);var o=e[16],a=o[6],s=_h(o),l=a.projection[t.projection];return null!=l?Qh(s,l):Qh(e,t.next)}return null}function Wh(e,t){var n=10+e+1;if(n<t.length){var r=t[n],i=r[1].firstChild;if(null!==i)return Qh(r,i)}return t[7]}function Gh(e,t,n){var r=Mh(e,t);r&&function(e,t,n,r){vu(e)?e.removeChild(t,n,r):t.removeChild(n)}(e,r,t,n)}function $h(e,t,n,r,i,o,a){for(;null!=n;){var s=r[n.index],l=n.type;if(a&&0===t&&(s&&hh(bu(s),r),n.flags|=4),64!=(64&n.flags))if(8&l)$h(e,t,n.child,r,i,o,!1),Sh(t,e,i,s,o);else if(32&l){for(var u=bh(n,r),c=void 0;c=u();)Sh(t,e,i,c,o);Sh(t,e,i,s,o)}else 16&l?Yh(e,t,r,n,i,o):Sh(t,e,i,s,o);n=a?n.projectionNext:n.next}}function Jh(e,t,n,r,i,o){$h(n,r,e.firstChild,t,i,o,!1)}function Yh(e,t,n,r,i,o){var a=n[16],s=a[6].projection[r.projection];if(Array.isArray(s))for(var l=0;l<s.length;l++)Sh(t,e,i,s[l],o);else $h(e,t,s,a[3],i,o,!0)}function Kh(e,t,n){vu(e)?e.setAttribute(t,"style",n):t.style.cssText=n}function Zh(e,t,n){vu(e)?""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n):t.className=n}function Xh(e,t,n){for(var r=e.length;;){var i=e.indexOf(t,n);if(-1===i)return i;if(0===i||e.charCodeAt(i-1)<=32){var o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}function ep(e,t,n){for(var r=0;r<e.length;){var i=e[r++];if(n&&"class"===i){if(-1!==Xh((i=e[r]).toLowerCase(),t,0))return!0}else if(1===i){for(;r<e.length&&"string"==typeof(i=e[r++]);)if(i.toLowerCase()===t)return!0;return!1}}return!1}function tp(e){return 4===e.type&&"ng-template"!==e.value}function np(e,t,n){return t===(4!==e.type||n?e.value:"ng-template")}function rp(e,t,n){for(var r=4,i=e.attrs||[],o=function(e){for(var t=0;t<e.length;t++)if(bc(e[t]))return t;return e.length}(i),a=!1,s=0;s<t.length;s++){var l=t[s];if("number"!=typeof l){if(!a)if(4&r){if(r=2|1&r,""!==l&&!np(e,l,n)||""===l&&1===t.length){if(ip(r))return!1;a=!0}}else{var u=8&r?l:t[++s];if(8&r&&null!==e.attrs){if(!ep(e.attrs,u,n)){if(ip(r))return!1;a=!0}continue}var c=op(8&r?"class":l,i,tp(e),n);if(-1===c){if(ip(r))return!1;a=!0;continue}if(""!==u){var d;d=c>o?"":i[c+1].toLowerCase();var h=8&r?d:null;if(h&&-1!==Xh(h,u,0)||2&r&&u!==d){if(ip(r))return!1;a=!0}}}}else{if(!a&&!ip(r)&&!ip(l))return!1;if(a&&ip(l))continue;a=!1,r=l|1&r}}return ip(r)||a}function ip(e){return 0==(1&e)}function op(e,t,n,r){if(null===t)return-1;var i=0;if(r||!n){for(var o=!1;i<t.length;){var a=t[i];if(a===e)return i;if(3===a||6===a)o=!0;else{if(1===a||2===a){for(var s=t[++i];"string"==typeof s;)s=t[++i];continue}if(4===a)break;if(0===a){i+=4;continue}}i+=o?1:2}return-1}return function(e,t){var n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){var r=e[n];if("number"==typeof r)return-1;if(r===t)return n;n++}return-1}(t,e)}function ap(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0;r<t.length;r++)if(rp(e,t[r],n))return!0;return!1}function sp(e,t){e:for(var n=0;n<t.length;n++){var r=t[n];if(e.length===r.length){for(var i=0;i<e.length;i++)if(e[i]!==r[i])continue e;return!0}}return!1}function lp(e,t){return e?":not("+t.trim()+")":t}function up(e){for(var t=e[0],n=1,r=2,i="",o=!1;n<e.length;){var a=e[n];if("string"==typeof a)if(2&r){var s=e[++n];i+="["+a+(s.length>0?'="'+s+'"':"")+"]"}else 8&r?i+="."+a:4&r&&(i+=" "+a);else""===i||ip(a)||(t+=lp(o,i),i=""),r=a,o=o||!ip(r);n++}return""!==i&&(t+=lp(o,i)),t}var cp={};function dp(e){hp(Du(),Vu(),sc()+e,zu())}function hp(e,t,n,r){if(!r)if(3==(3&t[2])){var i=e.preOrderCheckHooks;null!==i&&hc(t,i,n)}else{var o=e.preOrderHooks;null!==o&&pc(t,o,0,n)}lc(n)}function pp(e,t){return e<<17|t<<2}function fp(e){return e>>17&32767}function mp(e){return 2|e}function gp(e){return(131068&e)>>2}function vp(e,t){return-131069&e|t<<2}function yp(e){return 1|e}function bp(e,t){var n=e.contentQueries;if(null!==n)for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1];if(-1!==o){var a=e.data[o];Zu(i),a.contentQueries(2,t[o],o)}}}function _p(e,t,n,r,i,o,a,s,l,u){var c=t.blueprint.slice();return c[0]=i,c[2]=140|r,Iu(c),c[3]=c[15]=e,c[8]=n,c[10]=a||e&&e[10],c[11]=s||e&&e[11],c[12]=l||e&&e[12]||null,c[9]=u||e&&e[9]||null,c[6]=o,c[16]=2==t.type?e[16]:c,c}function wp(e,t,n,r,i){var o=e.data[t];if(null===o)o=Cp(e,t,n,r,i),Ou.lFrame.inI18n&&(o.flags|=64);else if(64&o.type){o.type=n,o.value=r,o.attrs=i;var a=Mu();o.injectorIndex=null===a?-1:a.injectorIndex}return qu(o,!0),o}function Cp(e,t,n,r,i){var o=Fu(),a=ju(),s=e.data[t]=function(e,t,n,r,i,o){return{type:n,index:r,insertBeforeIndex:null,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,a?o:o&&o.parent,n,t,r,i);return null===e.firstChild&&(e.firstChild=s),null!==o&&(a?null==o.child&&null!==s.parent&&(o.child=s):null===o.next&&(o.next=s)),s}function xp(e,t,n,r){if(0===n)return-1;for(var i=t.length,o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function Sp(e,t,n){tc(t);try{var r=e.viewQuery;null!==r&&tf(1,r,n);var i=e.template;null!==i&&Ep(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),e.staticContentQueries&&bp(e,t),e.staticViewQueries&&tf(2,e.viewQuery,n);var o=e.components;null!==o&&function(e,t){for(var n=0;n<t.length;n++)Yp(e,t[n])}(t,o)}catch(a){throw e.firstCreatePass&&(e.incompleteFirstPass=!0),a}finally{t[2]&=-5,ac()}}function Pp(e,t,n,r){var i=t[2];if(256!=(256&i)){tc(t);var o=zu();try{Iu(t),Ou.lFrame.bindingIndex=e.bindingStartIndex,null!==n&&Ep(e,t,n,2,r);var a=3==(3&i);if(!o)if(a){var s=e.preOrderCheckHooks;null!==s&&hc(t,s,null)}else{var l=e.preOrderHooks;null!==l&&pc(t,l,0,null),fc(t,0)}if(function(e){for(var t=wh(e);null!==t;t=Ch(t))if(t[2])for(var n=t[9],r=0;r<n.length;r++){var i=n[r],o=i[3];0==(1024&i[2])&&Tu(o,1),i[2]|=1024}}(t),function(e){for(var t=wh(e);null!==t;t=Ch(t))for(var n=10;n<t.length;n++){var r=t[n],i=r[1];Eu(r)&&Pp(i,r,i.template,r[8])}}(t),null!==e.contentQueries&&bp(e,t),!o)if(a){var u=e.contentCheckHooks;null!==u&&hc(t,u)}else{var c=e.contentHooks;null!==c&&pc(t,c,1),fc(t,1)}!function(e,t){var n,r,i,o=e.hostBindingOpCodes;if(null!==o)try{for(var a=0;a<o.length;a++){var s=o[a];if(s<0)lc(~s);else{var l=s,u=o[++a],c=o[++a];n=u,r=l,i=void 0,(i=Ou.lFrame).bindingIndex=i.bindingRootIndex=n,Ju(r),c(2,t[l])}}}finally{lc(-1)}}(e,t);var d=e.components;null!==d&&function(e,t){for(var n=0;n<t.length;n++)$p(e,t[n])}(t,d);var h=e.viewQuery;if(null!==h&&tf(2,h,r),!o)if(a){var p=e.viewCheckHooks;null!==p&&hc(t,p)}else{var f=e.viewHooks;null!==f&&pc(t,f,2),fc(t,2)}!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),o||(t[2]&=-73),1024&t[2]&&(t[2]&=-1025,Tu(t[3],-1))}finally{ac()}}}function kp(e,t,n,r){var i=t[10],o=!zu(),a=ku(t);try{o&&!a&&i.begin&&i.begin(),a&&Sp(e,t,r),Pp(e,t,n,r)}finally{o&&!a&&i.end&&i.end()}}function Ep(e,t,n,r,i){var o=sc();try{lc(-1),2&r&&t.length>20&&hp(e,t,20,zu()),n(r,i)}finally{lc(o)}}function Ap(e,t,n){if(eu(t))for(var r=t.directiveEnd,i=t.directiveStart;i<r;i++){var o=e.data[i];o.contentQueries&&o.contentQueries(1,n[i],i)}}function Ip(e,t,n){Ru()&&(function(e,t,n,r){var i=n.directiveStart,o=n.directiveEnd;e.firstCreatePass||Ic(n,t),hh(r,t);for(var a=n.initialInputs,s=i;s<o;s++){var l=e.data[s],u=ru(l);u&&Up(t,n,l);var c=Bc(t,e,s,n);hh(c,t),null!==a&&Qp(0,s-i,c,l,0,a),u&&(Su(n.index,t)[8]=c)}}(e,t,n,wu(n,t)),128==(128&n.flags)&&function(e,t,n){var r=n.directiveStart,i=n.directiveEnd,o=n.index,a=Ou.lFrame.currentDirectiveIndex;try{lc(o);for(var s=r;s<i;s++){var l=e.data[s],u=t[s];Ju(s),null===l.hostBindings&&0===l.hostVars&&null===l.hostAttrs||Mp(l,u)}}finally{lc(-1),Ju(a)}}(e,t,n))}function Tp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wu,r=t.localNames;if(null!==r)for(var i=t.index+1,o=0;o<r.length;o+=2){var a=r[o+1],s=-1===a?n(t,e):e[a];e[i++]=s}}function Op(e){var t=e.tView;return null===t||t.incompleteFirstPass?e.tView=Rp(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts):t}function Rp(e,t,n,r,i,o,a,s,l,u){var c=20+r,d=c+i,h=function(e,t){for(var n=[],r=0;r<t;r++)n.push(r<e?null:cp);return n}(c,d),p="function"==typeof u?u():u;return h[1]={type:e,blueprint:h,template:n,queries:null,viewQuery:s,declTNode:t,data:h.slice().fill(null,c),bindingStartIndex:c,expandoStartIndex:d,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof o?o():o,pipeRegistry:"function"==typeof a?a():a,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1}}function Vp(e,t,n,r){var i=rf(t);i.push(n),e.firstCreatePass&&function(e){return e.cleanup||(e.cleanup=[])}(e).push(r,i.length-1)}function Dp(e,t,n){for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];(n=null===n?{}:n).hasOwnProperty(r)?n[r].push(t,i):n[r]=[t,i]}return n}function Np(e,t,n,r,i,o,a,s){var l,u,c=wu(t,n),d=t.inputs;!s&&null!=d&&(l=d[r])?(sf(e,n,l,r,i),tu(t)&&function(e,t){var n=Su(t,e);16&n[2]||(n[2]|=64)}(n,t.index)):3&t.type&&(r="class"===(u=r)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,i=null!=a?a(i,t.value||"",r):i,vu(o)?o.setProperty(c,r,i):_c(r)||(c.setProperty?c.setProperty(r,i):c[r]=i))}function Lp(e,t,n,r){var i=!1;if(Ru()){var o=function(e,t,n){var r=e.directiveRegistry,i=null;if(r)for(var o=0;o<r.length;o++){var a=r[o];ap(n,a.selectors,!1)&&(i||(i=[]),Vc(Ic(n,t),e,a.type),ru(a)?(qp(e,n),i.unshift(a)):i.push(a))}return i}(e,t,n),a=null===r?null:{"":-1};if(null!==o){i=!0,Bp(n,e.data.length,o.length);for(var s=0;s<o.length;s++){var l=o[s];l.providersResolver&&l.providersResolver(l)}for(var u=!1,c=!1,d=xp(e,t,o.length,null),h=0;h<o.length;h++){var p=o[h];n.mergedAttrs=wc(n.mergedAttrs,p.hostAttrs),zp(e,n,t,d,p),jp(d,p,a),null!==p.contentQueries&&(n.flags|=8),null===p.hostBindings&&null===p.hostAttrs&&0===p.hostVars||(n.flags|=128);var f=p.type.prototype;!u&&(f.ngOnChanges||f.ngOnInit||f.ngDoCheck)&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n.index),u=!0),c||!f.ngOnChanges&&!f.ngDoCheck||((e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n.index),c=!0),d++}!function(e,t){for(var n=t.directiveEnd,r=e.data,i=t.attrs,o=[],a=null,s=null,l=t.directiveStart;l<n;l++){var u=r[l],c=u.inputs,d=null===i||tp(t)?null:Wp(c,i);o.push(d),a=Dp(c,l,a),s=Dp(u.outputs,l,s)}null!==a&&(a.hasOwnProperty("class")&&(t.flags|=16),a.hasOwnProperty("style")&&(t.flags|=32)),t.initialInputs=o,t.inputs=a,t.outputs=s}(e,n)}a&&function(e,t,n){if(t)for(var r=e.localNames=[],i=0;i<t.length;i+=2){var o=n[t[i+1]];if(null==o)throw new ou("301","Export of name '".concat(t[i+1],"' not found!"));r.push(t[i],o)}}(n,r,a)}return n.mergedAttrs=wc(n.mergedAttrs,n.attrs),i}function Fp(e,t,n,r,i,o){var a=o.hostBindings;if(a){var s=e.hostBindingOpCodes;null===s&&(s=e.hostBindingOpCodes=[]);var l=~t.index;(function(e){for(var t=e.length;t>0;){var n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=l&&s.push(l),s.push(r,i,a)}}function Mp(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function qp(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function jp(e,t,n){if(n){if(t.exportAs)for(var r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;ru(t)&&(n[""]=e)}}function Bp(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function zp(e,t,n,r,i){e.data[r]=i;var o=i.factory||(i.factory=iu(i.type)),a=new vc(o,ru(i),null);e.blueprint[r]=a,n[r]=a,Fp(e,t,0,r,xp(e,n,i.hostVars,cp),i)}function Up(e,t,n){var r=wu(t,e),i=Op(n),o=e[10],a=Kp(e,_p(e,i,null,n.onPush?64:16,r,t,o,o.createRenderer(r,n),null,null));e[t.index]=a}function Hp(e,t,n,r,i,o,a){if(null==o)vu(e)?e.removeAttribute(t,i,n):t.removeAttribute(i);else{var s=null==a?au(o):a(o,r||"",i);vu(e)?e.setAttribute(t,i,s,n):n?t.setAttributeNS(n,i,s):t.setAttribute(i,s)}}function Qp(e,t,n,r,i,o){var a=o[t];if(null!==a)for(var s=r.setInput,l=0;l<a.length;){var u=a[l++],c=a[l++],d=a[l++];null!==s?r.setInput(n,d,u,c):n[c]=d}}function Wp(e,t){for(var n=null,r=0;r<t.length;){var i=t[r];if(0!==i)if(5!==i){if("number"==typeof i)break;e.hasOwnProperty(i)&&(null===n&&(n=[]),n.push(i,e[i],t[r+1])),r+=2}else r+=2;else r+=4}return n}function Gp(e,t,n,r){return new Array(e,!0,!1,t,null,0,r,n,null,null)}function $p(e,t){var n=Su(t,e);if(Eu(n)){var r=n[1];80&n[2]?Pp(r,n,r.template,n[8]):n[5]>0&&Jp(n)}}function Jp(e){for(var t=wh(e);null!==t;t=Ch(t))for(var n=10;n<t.length;n++){var r=t[n];if(1024&r[2]){var i=r[1];Pp(i,r,i.template,r[8])}else r[5]>0&&Jp(r)}var o=e[1].components;if(null!==o)for(var a=0;a<o.length;a++){var s=Su(o[a],e);Eu(s)&&s[5]>0&&Jp(s)}}function Yp(e,t){var n=Su(t,e),r=n[1];!function(e,t){for(var n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(r,n),Sp(r,n,n[8])}function Kp(e,t){return e[13]?e[14][4]=t:e[13]=t,e[14]=t,t}function Zp(e){for(;e;){e[2]|=64;var t=_h(e);if(0!=(512&e[2])&&!t)return e;e=t}return null}function Xp(e,t,n){var r=t[10];r.begin&&r.begin();try{Pp(e,t,e.template,n)}catch(i){throw af(t,i),i}finally{r.end&&r.end()}}function ef(e){!function(e){for(var t=0;t<e.components.length;t++){var n=e.components[t],r=Pu(n),i=r[1];kp(i,r,i.template,n)}}(e[8])}function tf(e,t,n){Zu(0),t(e,n)}var nf=Promise.resolve(null);function rf(e){return e[7]||(e[7]=[])}function of(e,t,n){return(null===e||ru(e))&&(n=function(e){for(;Array.isArray(e);){if("object"==typeof e[1])return e;e=e[0]}return null}(n[t.index])),n[11]}function af(e,t){var n=e[9],r=n?n.get(dh,null):null;r&&r.handleError(t)}function sf(e,t,n,r,i){for(var o=0;o<n.length;){var a=n[o++],s=n[o++],l=t[a],u=e.data[a];null!==u.setInput?u.setInput(l,i,r,s):l[s]=i}}function lf(e,t,n){var r=_u(t,e);kh(e[11],r,n)}function uf(e,t,n){var r=n?e.styles:null,i=n?e.classes:null,o=0;if(null!==t)for(var a=0;a<t.length;a++){var s=t[a];"number"==typeof s?o=s:1==o?i=ol(i,s):2==o&&(r=ol(r,s+": "+t[++a]+";"))}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}var cf=new $c("INJECTOR",-1),df=function(){function e(){is(this,e)}return as(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ud;if(t===ud){var n=new Error("NullInjectorError: No provider for ".concat(il(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),hf=new $c("Set Injector scope."),pf={},ff={},mf=[],gf=void 0;function vf(){return void 0===gf&&(gf=new df),gf}function yf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return new bf(e,n,t||vf(),r)}var bf=function(){function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;is(this,e),this.parent=r,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var a=[];n&&Zc(n,function(e){return i.processProvider(e,t,n)}),Zc([t],function(e){return i.processInjectorType(e,[],a)}),this.records.set(cf,Cf(void 0,this));var s=this.records.get(hf);this.scope=null!=s?s.value:null,this.source=o||("object"==typeof t?null:il(t))}return as(e,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(e){return e.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ud,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wl.Default;this.assertNotDestroyed();var r,i=pd(this);try{if(!(n&wl.SkipSelf)){var o=this.records.get(e);if(void 0===o){var a=("function"==typeof(r=e)||"object"==typeof r&&r instanceof $c)&&pl(e);o=a&&this.injectableDefInScope(a)?Cf(_f(e),pf):null,this.records.set(e,o)}if(null!=o)return this.hydrate(e,o)}return(n&wl.Self?vf():this.parent).get(e,t=n&wl.Optional&&t===ud?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(il(e)),i)throw s;return function(e,t,n,r){var i=e.ngTempTokenPath;throw t.__source&&i.unshift(t.__source),e.message=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var i=il(t);if(Array.isArray(t))i=t.map(il).join(" -> ");else if("object"==typeof t){var o=[];for(var a in t)if(t.hasOwnProperty(a)){var s=t[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):il(s)))}i="{".concat(o.join(", "),"}")}return"".concat(n).concat(r?"("+r+")":"","[").concat(i,"]: ").concat(e.replace(cd,"\n  "))}("\n"+e.message,i,"R3InjectorError",r),e.ngTokenPath=i,e.ngTempTokenPath=null,e}(s,e,0,this.source)}throw s}finally{pd(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var e=this;this.injectorDefTypes.forEach(function(t){return e.get(t)})}},{key:"toString",value:function(){var e=[];return this.records.forEach(function(t,n){return e.push(il(n))}),"R3Injector[".concat(e.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(e,t,n){var r=this;if(!(e=ll(e)))return!1;var i=ml(e),o=null==i&&e.ngModule||void 0,a=void 0===o?e:o,s=-1!==n.indexOf(a);if(void 0!==o&&(i=ml(o)),null==i)return!1;if(null!=i.imports&&!s){var l;n.push(a);try{Zc(i.imports,function(e){r.processInjectorType(e,t,n)&&(void 0===l&&(l=[]),l.push(e))})}finally{}if(void 0!==l)for(var u=function(e){var t=l[e],n=t.ngModule,i=t.providers;Zc(i,function(e){return r.processProvider(e,n,i||mf)})},c=0;c<l.length;c++)u(c)}this.injectorDefTypes.add(a),this.records.set(a,Cf(i.factory,pf));var d=i.providers;if(null!=d&&!s){var h=e;Zc(d,function(e){return r.processProvider(e,h,d)})}return void 0!==o&&void 0!==e.providers}},{key:"processProvider",value:function(e,t,n){var r=Sf(e=ll(e))?e:ll(e&&e.provide),i=function(e,t,n){return xf(e)?Cf(void 0,e.useValue):Cf(wf(e),pf)}(e);if(Sf(e)||!0!==e.multi)this.records.get(r);else{var o=this.records.get(r);o||((o=Cf(void 0,pf,!0)).factory=function(){return yd(o.multi)},this.records.set(r,o)),r=e,o.multi.push(e)}this.records.set(r,i)}},{key:"hydrate",value:function(e,t){var n;return t.value===pf&&(t.value=ff,t.value=t.factory()),"object"==typeof t.value&&t.value&&null!==(n=t.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value}},{key:"injectableDefInScope",value:function(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||e.providedIn===this.scope:this.injectorDefTypes.has(e.providedIn))}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();function _f(e){var t=pl(e),n=null!==t?t.factory:iu(e);if(null!==n)return n;var r=ml(e);if(null!==r)return r.factory;if(e instanceof $c)throw new Error("Token ".concat(il(e)," is missing a \u0275prov definition."));if(e instanceof Function)return function(e){var t=e.length;if(t>0){var n=td(t,"?");throw new Error("Can't resolve all parameters for ".concat(il(e),": (").concat(n.join(", "),")."))}var r=function(e){var t=e&&(e[vl]||e[bl]);if(t){var n=function(e){if(e.hasOwnProperty("name"))return e.name;var t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "').concat(n,'" class.')),t}return null}(e);return null!==r?function(){return r.factory(e)}:function(){return new e}}(e);throw new Error("unreachable")}function wf(e,t,n){var r,i=void 0;if(Sf(e)){var o=ll(e);return iu(o)||_f(o)}if(xf(e))i=function(){return ll(e.useValue)};else if((r=e)&&r.useFactory)i=function(){return e.useFactory.apply(e,Ha(yd(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))i=function(){return md(ll(e.useExisting))};else{var a=ll(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return iu(a)||_f(a);i=function(){return Ja(a,Ha(yd(e.deps)))}}return i}function Cf(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function xf(e){return null!==e&&"object"==typeof e&&dd in e}function Sf(e){return"function"==typeof e}var Pf=function(e,t,n){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,i=yf(e,t,n,r);return i._resolveInjectorDefTypes(),i}({name:n},t,e,n)},kf=function(){var e=function(){function e(){is(this,e)}return as(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?Pf(e,t,""):Pf(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=ud,e.NULL=new df,e.\u0275prov=dl({token:e,providedIn:"any",factory:function(){return md(cf)}}),e.__NG_ELEMENT_ID__=-1,e}();function Ef(e,t){dc(Pu(e)[1],Lu())}function Af(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,r=[e];t;){var i=void 0;if(ru(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");i=t.\u0275dir}if(i){if(n){r.push(i);var o=e;o.inputs=If(e.inputs),o.declaredInputs=If(e.declaredInputs),o.outputs=If(e.outputs);var a=i.hostBindings;a&&Rf(e,a);var s=i.viewQuery,l=i.contentQueries;if(s&&Tf(e,s),l&&Of(e,l),rl(e.inputs,i.inputs),rl(e.declaredInputs,i.declaredInputs),rl(e.outputs,i.outputs),ru(i)&&i.data.animation){var u=e.data;u.animation=(u.animation||[]).concat(i.data.animation)}}var c=i.features;if(c)for(var d=0;d<c.length;d++){var h=c[d];h&&h.ngInherit&&h(e),h===Af&&(n=!1)}}t=Object.getPrototypeOf(t)}!function(e){for(var t=0,n=null,r=e.length-1;r>=0;r--){var i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=wc(i.hostAttrs,n=wc(n,i.hostAttrs))}}(r)}function If(e){return e===Rl?{}:e===Vl?[]:e}function Tf(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,r){t(e,r),n(e,r)}:t}function Of(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,r,i){t(e,r,i),n(e,r,i)}:t}function Rf(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,r){t(e,r),n(e,r)}:t}var Vf=null;function Df(){if(!Vf){var e=Ol.Symbol;if(e&&e.iterator)Vf=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(Vf=r)}}return Vf}var Nf=function(){function e(t){is(this,e),this.wrapped=t}return as(e,null,[{key:"wrap",value:function(t){return new e(t)}},{key:"unwrap",value:function(t){return e.isWrapped(t)?t.wrapped:t}},{key:"isWrapped",value:function(t){return t instanceof e}}]),e}();function Lf(e){return!!Ff(e)&&(Array.isArray(e)||!(e instanceof Map)&&Df()in e)}function Ff(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function Mf(e,t,n){return e[t]=n}function qf(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function jf(e,t,n,r){var i=qf(e,t,n);return qf(e,t+1,r)||i}function Bf(e,t,n,r){var i=Vu();return qf(i,Wu(),t)&&(Du(),function(e,t,n,r,i,o){var a=wu(e,t);Hp(t[11],a,o,e.value,n,r,i)}(uc(),i,e,t,n,r)),Bf}function zf(e,t,n,r){return qf(e,Wu(),n)?t+au(n)+r:cp}function Uf(e,t,n,r,i,o,a,s){var l=Vu(),u=Du(),c=e+20,d=u.firstCreatePass?function(e,t,n,r,i,o,a,s,l){var u=t.consts,c=wp(t,e,4,a||null,Au(u,s));Lp(t,n,c,Au(u,l)),dc(t,c);var d=c.tViews=Rp(2,c,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u);return null!==t.queries&&(t.queries.template(t,c),d.queries=t.queries.embeddedTView(c)),c}(c,u,l,t,n,r,i,o,a):u.data[c];qu(d,!1);var h=l[11].createComment("");Hh(u,l,h,d),hh(h,l),Kp(l,l[c]=Gp(h,l,h,d)),nu(d)&&Ip(u,l,d),null!=a&&Tp(l,d,s)}function Hf(e){return xu(Ou.lFrame.contextLView,20+e)}function Qf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wl.Default,n=Vu();return null===n?md(e,t):Lc(Lu(),n,ll(e),t)}function Wf(e,t,n){var r=Vu();return qf(r,Wu(),t)&&Np(Du(),uc(),r,e,t,r[11],n,!1),Wf}function Gf(e,t,n,r,i){var o=i?"class":"style";sf(e,n,t.inputs[o],o,r)}function $f(e,t,n,r){var i=Vu(),o=Du(),a=20+e,s=i[11],l=i[a]=Ah(s,t,Ou.lFrame.currentNamespace),u=o.firstCreatePass?function(e,t,n,r,i,o,a){var s=t.consts,l=wp(t,e,2,i,Au(s,o));return Lp(t,n,l,Au(s,a)),null!==l.attrs&&uf(l,l.attrs,!1),null!==l.mergedAttrs&&uf(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(a,o,i,0,t,n,r):o.data[a];qu(u,!0);var c=u.mergedAttrs;null!==c&&yc(s,l,c);var d=u.classes;null!==d&&Zh(s,l,d);var h=u.styles;null!==h&&Kh(s,l,h),64!=(64&u.flags)&&Hh(o,i,l,u),0===Ou.lFrame.elementDepthCount&&hh(l,i),Ou.lFrame.elementDepthCount++,nu(u)&&(Ip(o,i,u),Ap(o,u,i)),null!==r&&Tp(i,u)}function Jf(){var e=Lu();ju()?Bu():qu(e=e.parent,!1);var t=e;Ou.lFrame.elementDepthCount--;var n=Du();n.firstCreatePass&&(dc(n,e),eu(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&Gf(n,t,Vu(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&Gf(n,t,Vu(),t.stylesWithoutHost,!1)}function Yf(e,t,n,r){$f(e,t,n,r),Jf()}function Kf(e,t,n){var r=Vu(),i=Du(),o=e+20,a=i.firstCreatePass?function(e,t,n,r,i){var o=t.consts,a=Au(o,r),s=wp(t,e,8,"ng-container",a);return null!==a&&uf(s,a,!0),Lp(t,n,s,Au(o,i)),null!==t.queries&&t.queries.elementStart(t,s),s}(o,i,r,t,n):i.data[o];qu(a,!0);var s=r[o]=r[11].createComment("");Hh(i,r,s,a),hh(s,r),nu(a)&&(Ip(i,r,a),Ap(i,a,r)),null!=n&&Tp(r,a)}function Zf(){var e=Lu(),t=Du();ju()?Bu():qu(e=e.parent,!1),t.firstCreatePass&&(dc(t,e),eu(e)&&t.queries.elementEnd(e))}function Xf(){return Vu()}function em(e){return!!e&&"function"==typeof e.then}function tm(e){return!!e&&"function"==typeof e.subscribe}function nm(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=Vu(),o=Du(),a=Lu();return im(o,i,i[11],a,e,t,n,r),nm}function rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=Lu(),o=Vu(),a=Du();return im(a,o,of(Yu(a.data),i,o),i,e,t,n,r),rm}function im(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,l=nu(r),u=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),c=rf(t),d=!0;if(3&r.type){var h=wu(r,t),p=s?s(h):Rl,f=p.target||h,m=c.length,g=s?function(e){return s(bu(e[r.index])).target}:r.index;if(vu(n)){var v=null;if(!s&&l&&(v=function(e,t,n,r){var i=e.cleanup;if(null!=i)for(var o=0;o<i.length-1;o+=2){var a=i[o];if(a===n&&i[o+1]===r){var s=t[7],l=i[o+2];return s.length>l?s[l]:null}"string"==typeof a&&(o+=2)}return null}(e,t,i,r.index)),null!==v)(v.__ngLastListenerFn__||v).__ngNextListenerFn__=o,v.__ngLastListenerFn__=o,d=!1;else{o=am(r,t,o,!1);var y=n.listen(p.name||f,i,o);c.push(o,y),u&&u.push(i,g,m,m+1)}}else o=am(r,t,o,!0),f.addEventListener(i,o,a),c.push(o),u&&u.push(i,g,m,a)}else o=am(r,t,o,!1);var b,_=r.outputs;if(d&&null!==_&&(b=_[i])){var w=b.length;if(w)for(var C=0;C<w;C+=2){var x=t[b[C]][b[C+1]].subscribe(o),S=c.length;c.push(o,x),u&&u.push(i,r.index,S,-(S+1))}}}function om(e,t,n){try{return!1!==t(n)}catch(r){return af(e,r),!1}}function am(e,t,n,r){return function i(o){if(o===Function)return n;var a=2&e.flags?Su(e.index,t):t;0==(32&t[2])&&Zp(a);for(var s=om(t,n,o),l=i.__ngNextListenerFn__;l;)s=om(t,l,o)&&s,l=l.__ngNextListenerFn__;return r&&!1===s&&(o.preventDefault(),o.returnValue=!1),s}}function sm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return function(e){return(Ou.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,Ou.lFrame.contextLView))[8]}(e)}function lm(e,t){for(var n=null,r=function(e){var t=e.attrs;if(null!=t){var n=t.indexOf(5);if(0==(1&n))return t[n+1]}return null}(e),i=0;i<t.length;i++){var o=t[i];if("*"!==o){if(null===r?ap(e,o,!0):sp(r,o))return i}else n=i}return n}function um(e){var t=Vu()[16][6];if(!t.projection)for(var n=t.projection=td(e?e.length:1,null),r=n.slice(),i=t.child;null!==i;){var o=e?lm(i,e):0;null!==o&&(r[o]?r[o].projectionNext=i:n[o]=i,r[o]=i),i=i.next}}function cm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=Vu(),i=Du(),o=wp(i,20+e,16,null,n||null);null===o.projection&&(o.projection=t),Bu(),64!=(64&o.flags)&&function(e,t,n){Yh(t[11],0,t,n,Vh(e,n,t),qh(n.parent||t[6],n,t))}(i,r,o)}function dm(e,t,n,r,i){var o=Vu(),a=zf(o,t,n,r);return a!==cp&&Np(Du(),uc(),o,e,a,o[11],i,!1),dm}var hm=[];function pm(e,t,n,r,i){for(var o=e[n+1],a=null===t,s=r?fp(o):gp(o),l=!1;0!==s&&(!1===l||a);){var u=e[s+1];fm(e[s],t)&&(l=!0,e[s+1]=r?yp(u):mp(u)),s=r?fp(u):gp(u)}l&&(e[n+1]=r?mp(o):yp(o))}function fm(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&id(e,t)>=0}function mm(e,t,n){return vm(e,t,n,!1),mm}function gm(e,t){return vm(e,t,null,!0),gm}function vm(e,t,n,r){var i=Vu(),o=Du(),a=Gu(2);o.firstUpdatePass&&function(e,t,n,r){var i=e.data;if(null===i[n+1]){var o=i[sc()],a=function(e,t){return t>=e.expandoStartIndex}(e,n);(function(e,t){return 0!=(e.flags&(t?16:32))})(o,r)&&null===t&&!a&&(t=!1),t=function(e,t,n,r){var i=Yu(e),o=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=bm(n=ym(null,e,t,n,r),t.attrs,r),o=null);else{var a=t.directiveStylingLast;if(-1===a||e[a]!==i)if(n=ym(i,e,t,n,r),null===o){var s=function(e,t,n){var r=n?t.classBindings:t.styleBindings;if(0!==gp(r))return e[fp(r)]}(e,t,r);void 0!==s&&Array.isArray(s)&&function(e,t,n,r){e[fp(n?t.classBindings:t.styleBindings)]=r}(e,t,r,s=bm(s=ym(null,e,t,s[1],r),t.attrs,r))}else o=function(e,t,n){for(var r=void 0,i=t.directiveEnd,o=1+t.directiveStylingLast;o<i;o++)r=bm(r,e[o].hostAttrs,n);return bm(r,t.attrs,n)}(e,t,r)}return void 0!==o&&(r?t.residualClasses=o:t.residualStyles=o),n}(i,o,t,r),function(e,t,n,r,i,o){var a=o?t.classBindings:t.styleBindings,s=fp(a),l=gp(a);e[r]=n;var u,c=!1;if(Array.isArray(n)){var d=n;(null===(u=d[1])||id(d,u)>0)&&(c=!0)}else u=n;if(i)if(0!==l){var h=fp(e[s+1]);e[r+1]=pp(h,s),0!==h&&(e[h+1]=vp(e[h+1],r)),e[s+1]=131071&e[s+1]|r<<17}else e[r+1]=pp(s,0),0!==s&&(e[s+1]=vp(e[s+1],r)),s=r;else e[r+1]=pp(l,0),0===s?s=r:e[l+1]=vp(e[l+1],r),l=r;c&&(e[r+1]=mp(e[r+1])),pm(e,u,r,!0),pm(e,u,r,!1),function(e,t,n,r,i){var o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&id(o,t)>=0&&(n[r+1]=yp(n[r+1]))}(t,u,e,r,o),a=pp(s,l),o?t.classBindings=a:t.styleBindings=a}(i,o,t,n,a,r)}}(o,e,a,r),t!==cp&&qf(i,a,t)&&function(e,t,n,r,i,o,a,s){if(3&t.type){var l=e.data,u=l[s+1];wm(1==(1&u)?_m(l,t,n,i,gp(u),a):void 0)||(wm(o)||2==(2&u)&&(o=_m(l,null,n,i,s,a)),function(e,t,n,r,i){var o=vu(e);if(t)i?o?e.addClass(n,r):n.classList.add(r):o?e.removeClass(n,r):n.classList.remove(r);else{var a=-1===r.indexOf("-")?void 0:yh.DashCase;if(null==i)o?e.removeStyle(n,r,a):n.style.removeProperty(r);else{var s="string"==typeof i&&i.endsWith("!important");s&&(i=i.slice(0,-10),a|=yh.Important),o?e.setStyle(n,r,i,a):n.style.setProperty(r,i,s?"important":"")}}}(r,a,_u(sc(),n),i,o))}}(o,o.data[sc()],i,i[11],e,i[a+1]=function(e,t){return null==e||("string"==typeof t?e+=t:"object"==typeof e&&(e=il(kd(e)))),e}(t,n),r,a)}function ym(e,t,n,r,i){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s<a&&(r=bm(r,(o=t[s]).hostAttrs,i),o!==e);)s++;return null!==e&&(n.directiveStylingLast=s),r}function bm(e,t,n){var r=n?1:2,i=-1;if(null!==t)for(var o=0;o<t.length;o++){var a=t[o];"number"==typeof a?i=a:i===r&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),nd(e,a,!!n||t[++o]))}return void 0===e?null:e}function _m(e,t,n,r,i,o){for(var a=null===t,s=void 0;i>0;){var l=e[i],u=Array.isArray(l),c=u?l[1]:l,d=null===c,h=n[i+1];h===cp&&(h=d?hm:void 0);var p=d?rd(h,r):c===r?h:void 0;if(u&&!wm(p)&&(p=rd(l,r)),wm(p)&&(s=p,a))return s;var f=e[i+1];i=a?fp(f):gp(f)}if(null!==t){var m=o?t.residualClasses:t.residualStyles;null!=m&&(s=rd(m,r))}return s}function wm(e){return void 0!==e}function Cm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Vu(),r=Du(),i=e+20,o=r.firstCreatePass?wp(r,i,1,t,null):r.data[i],a=n[i]=Ph(n[11],t);Hh(r,n,a,o),qu(o,!1)}function xm(e){return Sm("",e,""),xm}function Sm(e,t,n){var r=Vu(),i=zf(r,e,t,n);return i!==cp&&lf(r,sc(),i),Sm}function Pm(e,t,n,r,i){var o=Vu(),a=function(e,t,n,r,i,o){var a=jf(e,Qu(),n,i);return Gu(2),a?t+au(n)+r+au(i)+o:cp}(o,e,t,n,r,i);return a!==cp&&lf(o,sc(),a),Pm}function km(e,t,n){var r=Vu();return qf(r,Wu(),t)&&Np(Du(),uc(),r,e,t,r[11],n,!0),km}function Em(e,t,n){var r=Vu();if(qf(r,Wu(),t)){var i=Du(),o=uc();Np(i,o,r,e,t,of(Yu(i.data),o,r),n,!0)}return Em}var Am=void 0,Im=["en",[["a","p"],["AM","PM"],Am],[["AM","PM"],Am,Am],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Am,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Am,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Am,"{1} 'at' {0}",Am],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],Tm={};function Om(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=Vm(t);if(n)return n;var r=t.split("-")[0];if(n=Vm(r))return n;if("en"===r)return Im;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}function Rm(e){return Om(e)[Dm.PluralCase]}function Vm(e){return e in Tm||(Tm[e]=Ol.ng&&Ol.ng.common&&Ol.ng.common.locales&&Ol.ng.common.locales[e]),Tm[e]}var Dm=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({}),Nm=["zero","one","two","few","many"],Lm={marker:"element"},Fm={marker:"ICU"},Mm=function(e){return e[e.SHIFT=2]="SHIFT",e[e.APPEND_EAGERLY=1]="APPEND_EAGERLY",e[e.COMMENT=2]="COMMENT",e}({}),qm="en-US";function jm(e){var t;null==(t=e)&&cl("Expected localeId to be defined",t,null,"!="),"string"==typeof e&&(qm=e.toLowerCase().replace(/_/g,"-"))}function Bm(e,t,n){var r=t.insertBeforeIndex,i=Array.isArray(r)?r[0]:r;return null===i?jh(e,0,n):bu(n[i])}function zm(e,t,n,r,i){var o=t.insertBeforeIndex;if(Array.isArray(o)){var a=r,s=null;if(3&t.type||(s=a,a=i),null!==a&&0==(2&t.flags))for(var l=1;l<o.length;l++)Nh(e,a,n[o[l]],s,!1)}}function Um(e,t){if(e.push(t),e.length>1)for(var n=e.length-2;n>=0;n--){var r=e[n];Hm(r)||Qm(r,t)&&null===(i=void 0,i=r.insertBeforeIndex,Array.isArray(i)?i[0]:i)&&Wm(r,t.index)}var i}function Hm(e){return!(64&e.type)}function Qm(e,t){return Hm(t)||e.index>t.index}function Wm(e,t){var n=e.insertBeforeIndex;Array.isArray(n)?n[0]=t:(Uh(Bm,zm),e.insertBeforeIndex=t)}function Gm(e,t){var n=e.data[t];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function $m(e,t,n){var r=Cp(e,n,64,null,null);return Um(t,r),r}function Jm(e,t){var n=t[e.currentCaseLViewIndex];return null===n?n:n<0?~n:n}var Ym=0,Km=0;function Zm(e,t,n,r){for(var i,o=n[11],a=null,s=0;s<t.length;s++){var l=t[s];if("string"==typeof l){var u=t[++s];null===n[u]&&(n[u]=Ph(o,l))}else if("number"==typeof l)switch(1&l){case 0:var c=l>>>17,d=void 0,h=void 0;if(null===a&&(a=c,i=Mh(o,r)),c===a?(d=r,h=i):(d=null,h=bu(n[c])),null!==h){var p=(131070&l)>>>1;Nh(o,h,n[p],d,!1);var f=Gm(e,p);if(null!==f&&"object"==typeof f){var m=Jm(f,n);null!==m&&Zm(e,f.create[m],n,n[f.anchorIdx])}}break;case 1:var g=t[++s],v=t[++s];Hp(o,_u(l>>>1,n),null,null,g,v,null);break;default:throw new Error('Unable to determine the type of mutate operation for "'.concat(l,'"'))}else switch(l){case Fm:var y=t[++s],b=t[++s];null===n[b]&&hh(n[b]=Eh(o,y),n);break;case Lm:var _=t[++s],w=t[++s];null===n[w]&&hh(n[w]=Ah(o,_,null),n)}}}function Xm(e,t,n,r,i){for(var o=0;o<n.length;o++){var a=n[o],s=n[++o];if(a&i)for(var l="",u=o+1;u<=o+s;u++){var c=n[u];if("string"==typeof c)l+=c;else if("number"==typeof c)if(c<0)l+=au(t[r-c]);else{var d=c>>>2;switch(3&c){case 1:var h=n[++u],p=n[++u],f=e.data[d];"string"==typeof f?Hp(t[11],t[d],null,f,h,l,p):Np(e,f,t,h,l,t[11],p,!1);break;case 0:var m=t[d];null!==m&&kh(t[11],m,l);break;case 2:tg(e,Gm(e,d),t,l);break;case 3:eg(e,Gm(e,d),r,t)}}}else{var g=n[o+1];if(g>0&&3==(3&g)){var v=Gm(e,g>>>2);t[v.currentCaseLViewIndex]<0&&eg(e,v,r,t)}}o+=s}}function eg(e,t,n,r){var i=r[t.currentCaseLViewIndex];if(null!==i){var o=Ym;i<0&&(i=r[t.currentCaseLViewIndex]=~i,o=-1),Xm(e,r,t.update[i],n,o)}}function tg(e,t,n,r){var i=function(e,t){var n=e.cases.indexOf(t);if(-1===n)switch(e.type){case 1:var r=function(e,t){var n=Rm(t)(parseInt(e,10)),r=Nm[n];return void 0!==r?r:"other"}(t,qm);-1===(n=e.cases.indexOf(r))&&"other"!==r&&(n=e.cases.indexOf("other"));break;case 0:n=e.cases.indexOf("other")}return-1===n?null:n}(t,r);if(Jm(t,n)!==i&&(ng(e,t,n),n[t.currentCaseLViewIndex]=null===i?null:~i,null!==i)){var o=n[t.anchorIdx];o&&Zm(e,t.create[i],n,o)}}function ng(e,t,n){var r=Jm(t,n);if(null!==r)for(var i=t.remove[r],o=0;o<i.length;o++){var a=i[o];if(a>0){var s=_u(a,n);null!==s&&Gh(n[11],s)}else ng(e,Gm(e,~a),n)}}var rg=/\ufffd(\d+):?\d*\ufffd/gi,ig=/\ufffd(\d+)\ufffd/,og=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,ag=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,sg=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,lg=/\uE500/g;function ug(e,t,n,r,i,o,a){var s=xp(e,r,1,null),l=s<<Mm.SHIFT,u=Mu();t===u&&(u=null),null===u&&(l|=Mm.APPEND_EAGERLY),a&&(l|=Mm.COMMENT,void 0===vh&&(vh=function(){var e,t,n=[],r=-1;function i(e,n){r=0;var i=Jm(e,n);t=null!==i?e.remove[i]:Vl}function o(){if(r<t.length){var a=t[r++];return a>0?e[a]:(n.push(r,t),i(e[1].data[~a],e),o())}return 0===n.length?null:(t=n.pop(),r=n.pop(),o())}return function(t,r){for(e=r;n.length;)n.pop();return i(t.value,r),o}}())),i.push(l,null===o?"":o);var c=Cp(e,s,a?32:1,null===o?"":o,null);Um(n,c);var d=c.index;return qu(c,!1),null!==u&&t!==u&&function(e,t){var n,r=e.insertBeforeIndex;null===r?(Uh(Bm,zm),r=e.insertBeforeIndex=[null,t]):(1!=(n=Array.isArray(r))&&cl("Expecting array here",n,!0,"=="),r.push(t))}(u,d),c}function cg(e,t,n,r,i,o,a){var s=a.match(rg),l=ug(e,t,n,o,r,s?null:a,!1);s&&dg(i,a,l.index)}function dg(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=e.length,a=o+1;e.push(null,null);for(var s=o+2,l=t.split(rg),u=0,c=0;c<l.length;c++){var d=l[c];if(1&c){var h=parseInt(d,10);e.push(-1-h),u|=hg(h)}else""!==d&&e.push(d)}return e.push(n<<2|(r?1:0)),r&&e.push(r,i),e[o]=u,e[a]=e.length-s,u}function hg(e){return 1<<Math.min(e,31)}function pg(e){for(var t,n,r="",i=0,o=!1;null!==(t=ag.exec(e));)o?t[0]==="\ufffd/*".concat(n,"\ufffd")&&(i=t.index,o=!1):(r+=e.substring(i,t.index+t[0].length),n=t[1],o=!0);return r+=e.substr(i)}function fg(e,t,n,r,i,o){var a=0,s={type:i.type,currentCaseLViewIndex:xp(e,t,1,null),anchorIdx:o,cases:[],create:[],remove:[],update:[]};!function(e,t,n){e.push(hg(t.mainBinding),2,-1-t.mainBinding,n<<2|2)}(n,i,o),function(e,t,n){var r=e.data[t];null===r?e.data[t]=n:r.value=n}(e,o,s);for(var l=i.values,u=0;u<l.length;u++){for(var c=l[u],d=[],h=0;h<c.length;h++){var p=c[h];if("string"!=typeof p){var f=d.push(p)-1;c[h]="\x3c!--\ufffd".concat(f,"\ufffd--\x3e")}}a=vg(e,s,t,n,r,i.cases[u],c.join(""),d)|a}a&&function(e,t,n){e.push(t,1,n<<2|3)}(n,a,o)}function mg(e){for(var t=[],n=[],r=1,i=0,o=gg(e=e.replace(og,function(e,t,n){return r="select"===n?0:1,i=parseInt(t.substr(1),10),""})),a=0;a<o.length;){var s=o[a++].trim();1===r&&(s=s.replace(/\s*(?:=)?(\w+)\s*/,"$1")),s.length&&t.push(s);var l=gg(o[a++]);t.length>n.length&&n.push(l)}return{type:r,mainBinding:i,cases:t,values:n}}function gg(e){if(!e)return[];var t,n=0,r=[],i=[],o=/[{}]/g;for(o.lastIndex=0;t=o.exec(e);){var a=t.index;if("}"==t[0]){if(r.pop(),0==r.length){var s=e.substring(n,a);og.test(s)?i.push(mg(s)):i.push(s),n=a+1}}else{if(0==r.length){var l=e.substring(n,a);i.push(l),n=a+1}r.push("{")}}var u=e.substring(n);return i.push(u),i}function vg(e,t,n,r,i,o,a,s){var l=[],u=[],c=[];t.cases.push(o),t.create.push(l),t.remove.push(u),t.update.push(c);var d=Rd(gu()).getInertBodyElement(a),h=nh(d)||d;return h?yg(e,t,n,r,l,u,c,h,i,s,0):0}function yg(e,t,n,r,i,o,a,s,l,u,c){for(var d=0,h=s.firstChild;h;){var p=xp(e,n,1,null);switch(h.nodeType){case Node.ELEMENT_NODE:var f=h,m=f.tagName.toLowerCase();if(Wd.hasOwnProperty(m)){wg(i,Lm,m,l,p),e.data[p]=m;for(var g=f.attributes,v=0;v<g.length;v++){var y=g.item(v),b=y.name.toLowerCase();y.value.match(rg)?Jd.hasOwnProperty(b)&&(Gd[b]?dg(a,y.value,p,y.name,Fd):$d[b]?dg(a,y.value,p,y.name,Md):dg(a,y.value,p,y.name)):Cg(i,p,y)}d=yg(e,t,n,r,i,o,a,h,p,u,c+1)|d,bg(o,p,c)}break;case Node.TEXT_NODE:var _=h.textContent||"",w=_.match(rg);wg(i,null,w?"":_,l,p),bg(o,p,c),w&&(d=dg(a,_,p)|d);break;case Node.COMMENT_NODE:var C=ig.exec(h.textContent||"");if(C){var x=u[parseInt(C[1],10)];wg(i,Fm,"",l,p),fg(e,n,r,l,x,p),_g(o,p,c)}}h=h.nextSibling}return d}function bg(e,t,n){0===n&&e.push(t)}function _g(e,t,n){0===n&&(e.push(~t),e.push(t))}function wg(e,t,n,r,i){null!==t&&e.push(t),e.push(n,i,0|r<<17|i<<1)}function Cg(e,t,n){e.push(t<<1|1,n.name,n.value)}var xg=/\[(\ufffd.+?\ufffd?)\]/,Sg=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,Pg=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,kg=/{([A-Z0-9_]+)}/g,Eg=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,Ag=/\/\*/,Ig=/\d+\:(\d+)/;function Tg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=Du(),i=Vu(),o=20+e,a=Au(r.consts,t),s=Mu();r.firstCreatePass&&function(e,t,n,r,i,o){for(var a,s=Mu(),l=[],u=[],c=[[]],d=(a=i=function(e,t){if(function(e){return-1===e}(t))return pg(e);var n=e.indexOf(":".concat(t,"\ufffd"))+2+t.toString().length,r=e.search(new RegExp("\ufffd\\/\\*\\d+:".concat(t,"\ufffd")));return pg(e.substring(n,r))}(i,o),a.replace(lg," ")).split(sg),h=0;h<d.length;h++){var p=d[h];if(0==(1&h))for(var f=gg(p),m=0;m<f.length;m++){var g=f[m];if(0==(1&m)){var v=g;""!==v&&cg(e,s,c[0],l,u,n,v)}else{var y=g;if("object"!=typeof y)throw new Error('Unable to parse ICU expression in "'.concat(i,'" message.'));fg(e,n,u,t,y,ug(e,s,c[0],n,l,"",!0).index)}}else{var b=47===p.charCodeAt(0),_=(p.charCodeAt(b?1:0),20+Number.parseInt(p.substring(b?2:1)));if(b)c.shift(),qu(Mu(),!1);else{var w=$m(e,c[0],_);c.unshift([]),qu(w,!0)}}}e.data[r]={create:l,update:u}}(r,null===s?0:s.index,i,o,a,n);var l=r.data[o],u=Dh(r,s===i[6]?null:s,i);!function(e,t,n,r){for(var i=e[11],o=0;o<t.length;o++){var a=t[o++],s=t[o],l=(a&Mm.COMMENT)===Mm.COMMENT,u=(a&Mm.APPEND_EAGERLY)===Mm.APPEND_EAGERLY,c=a>>>Mm.SHIFT,d=e[c];null===d&&(d=e[c]=l?i.createComment(s):Ph(i,s)),u&&null!==n&&Nh(i,n,d,r,!1)}}(i,l.create,u,s&&8&s.type?i[s.index]:null),$u(!0)}function Og(){$u(!1)}function Rg(e,t,n){Tg(e,t,n),Og()}function Vg(e){return qf(Vu(),Wu(),e)&&(Ym|=1<<Math.min(Km,31)),Km++,Vg}function Dg(e){!function(e,t,n){if(Km>0){var r=e.data[n];Xm(e,t,Array.isArray(r)?r:r.update,Qu()-Km-1,Ym)}Ym=0,Km=0}(Du(),Vu(),e+20)}function Ng(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if(xg.test(e)){var r={},i=[0];n=n.replace(Sg,function(e,t,n){var o=t||n,a=r[o]||[];if(a.length||(o.split("|").forEach(function(e){var t=e.match(Ig),n=t?parseInt(t[1],10):0,r=Ag.test(e);a.push([n,r,e])}),r[o]=a),!a.length)throw new Error("i18n postprocess: unmatched placeholder - "+o);for(var s=i[i.length-1],l=0,u=0;u<a.length;u++)if(a[u][0]===s){l=u;break}var c=Ua(a[l],3),d=c[0],h=c[1],p=c[2];return h?i.pop():s!==d&&i.push(d),a.splice(l,1),p})}return Object.keys(t).length?n=(n=(n=n.replace(Pg,function(e,n,r,i,o,a){return t.hasOwnProperty(r)?"".concat(n).concat(t[r]).concat(a):e})).replace(kg,function(e,n){return t.hasOwnProperty(n)?t[n]:e})).replace(Eg,function(e,n){if(t.hasOwnProperty(n)){var r=t[n];if(!r.length)throw new Error("i18n postprocess: unmatched ICU - ".concat(e," with key: ").concat(n));return r.shift()}return e}):n}(e,t)}function Lg(e,t,n,r,i){if(e=ll(e),Array.isArray(e))for(var o=0;o<e.length;o++)Lg(e[o],t,n,r,i);else{var a=Du(),s=Vu(),l=Sf(e)?e:ll(e.provide),u=wf(e),c=Lu(),d=1048575&c.providerIndexes,h=c.directiveStart,p=c.providerIndexes>>20;if(Sf(e)||!e.multi){var f=new vc(u,i,Qf),m=qg(l,t,i?d:d+p,h);-1===m?(Vc(Ic(c,s),a,l),Fg(a,e,t.length),t.push(l),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(f),s.push(f)):(n[m]=f,s[m]=f)}else{var g=qg(l,t,d+p,h),v=qg(l,t,d,d+p),y=g>=0&&n[g],b=v>=0&&n[v];if(i&&!b||!i&&!y){Vc(Ic(c,s),a,l);var _=function(e,t,n,r,i){var o=new vc(e,n,Qf);return o.multi=[],o.index=t,o.componentProviders=0,Mg(o,i,r&&!n),o}(i?Bg:jg,n.length,i,r,u);!i&&b&&(n[v].providerFactory=_),Fg(a,e,t.length,0),t.push(l),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else Fg(a,e,g>-1?g:v,Mg(n[i?v:g],u,!i&&r));!i&&r&&b&&n[v].componentProviders++}}}function Fg(e,t,n,r){var i=Sf(t);if(i||t.useClass){var o=(t.useClass||t).prototype.ngOnDestroy;if(o){var a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){var s=a.indexOf(n);-1===s?a.push(n,[r,o]):a[s+1].push(r,o)}else a.push(n,o)}}}function Mg(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function qg(e,t,n,r){for(var i=n;i<r;i++)if(t[i]===e)return i;return-1}function jg(e,t,n,r){return zg(this.multi,[])}function Bg(e,t,n,r){var i,o=this.multi;if(this.providerFactory){var a=this.providerFactory.componentProviders,s=Bc(n,n[1],this.providerFactory.index,r);zg(o,i=s.slice(0,a));for(var l=a;l<s.length;l++)i.push(s[l])}else zg(o,i=[]);return i}function zg(e,t){for(var n=0;n<e.length;n++)t.push((0,e[n])());return t}function Ug(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,r){return function(e,t,n){var r=Du();if(r.firstCreatePass){var i=ru(e);Lg(n,r.data,r.blueprint,i,!0),Lg(t,r.data,r.blueprint,i,!1)}}(n,r?r(e):e,t)}}}var Hg=function e(){is(this,e)},Qg=function(){function e(){is(this,e)}return as(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(il(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),Wg=function(){var e=function e(){is(this,e)};return e.NULL=new Qg,e}();function Gg(){}function $g(e,t){return new Yg(wu(e,t))}var Jg=function(){return $g(Lu(),Vu())},Yg=function(){var e=function e(t){is(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=Jg,e}(),Kg=function e(){is(this,e)},Zg=function(){var e=function e(){is(this,e)};return e.__NG_ELEMENT_ID__=function(){return Xg()},e}(),Xg=function(){var e=Vu(),t=Su(Lu().index,e);return function(e){return e[11]}(Zl(t)?t:e)},ev=function(){var e=function e(){is(this,e)};return e.\u0275prov=dl({token:e,providedIn:"root",factory:function(){return null}}),e}(),tv=function e(t){is(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},nv=new tv("11.0.3"),rv=function(){function e(){is(this,e)}return as(e,[{key:"supports",value:function(e){return Lf(e)}},{key:"create",value:function(e){return new ov(e)}}]),e}(),iv=function(e,t){return t},ov=function(){function e(t){is(this,e),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||iv}return as(e,[{key:"forEachItem",value:function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)}},{key:"forEachOperation",value:function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex<uv(n,r,i)?t:n,a=uv(o,r,i),s=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{i||(i=[]);var l=a-r,u=s-r;if(l!=u){for(var c=0;c<l;c++){var d=c<i.length?i[c]:i[c]=0,h=d+c;u<=h&&h<l&&(i[c]=d+1)}i[o.previousIndex]=u-l}}a!==s&&e(o,a,s)}}},{key:"forEachPreviousItem",value:function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}},{key:"forEachAddedItem",value:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}},{key:"forEachMovedItem",value:function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}},{key:"forEachRemovedItem",value:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}},{key:"forEachIdentityChange",value:function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}},{key:"diff",value:function(e){if(null==e&&(e=[]),!Lf(e))throw new Error("Error trying to diff '".concat(il(e),"'. Only arrays and iterables are allowed"));return this.check(e)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(e){var t=this;this._reset();var n,r,i,o=this._itHead,a=!1;if(Array.isArray(e)){this.length=e.length;for(var s=0;s<this.length;s++)r=e[s],i=this._trackByFn(s,r),null!==o&&Object.is(o.trackById,i)?(a&&(o=this._verifyReinsertion(o,r,i,s)),Object.is(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,s),a=!0),o=o._next}else n=0,function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r,i=e[Df()]();!(r=i.next()).done;)t(r.value)}(e,function(e){i=t._trackByFn(n,e),null!==o&&Object.is(o.trackById,i)?(a&&(o=t._verifyReinsertion(o,e,i,n)),Object.is(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,n),a=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=e,this.isDirty}},{key:"_reset",value:function(){if(this.isDirty){var e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}},{key:"_mismatch",value:function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new av(t,n),i,r),e}},{key:"_verifyReinsertion",value:function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}},{key:"_truncate",value:function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}},{key:"_reinsertAfter",value:function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}},{key:"_moveAfter",value:function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}},{key:"_addAfter",value:function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}},{key:"_insertAfter",value:function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new lv),this._linkedRecords.put(e),e.currentIndex=n,e}},{key:"_remove",value:function(e){return this._addToRemovals(this._unlink(e))}},{key:"_unlink",value:function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}},{key:"_addToMoves",value:function(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}},{key:"_addToRemovals",value:function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new lv),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}},{key:"_addIdentityChange",value:function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}}]),e}(),av=function e(t,n){is(this,e),this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},sv=function(){function e(){is(this,e),this._head=null,this._tail=null}return as(e,[{key:"add",value:function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}},{key:"get",value:function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}},{key:"remove",value:function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}]),e}(),lv=function(){function e(){is(this,e),this.map=new Map}return as(e,[{key:"put",value:function(e){var t=e.trackById,n=this.map.get(t);n||(n=new sv,this.map.set(t,n)),n.add(e)}},{key:"get",value:function(e,t){var n=this.map.get(e);return n?n.get(e,t):null}},{key:"remove",value:function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}},{key:"clear",value:function(){this.map.clear()}},{key:"isEmpty",get:function(){return 0===this.map.size}}]),e}();function uv(e,t,n){var r=e.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+t+i}var cv=function(){function e(){is(this,e)}return as(e,[{key:"supports",value:function(e){return e instanceof Map||Ff(e)}},{key:"create",value:function(){return new dv}}]),e}(),dv=function(){function e(){is(this,e),this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return as(e,[{key:"forEachItem",value:function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)}},{key:"forEachPreviousItem",value:function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}},{key:"forEachChangedItem",value:function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}},{key:"forEachAddedItem",value:function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}},{key:"forEachRemovedItem",value:function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}},{key:"diff",value:function(e){if(e){if(!(e instanceof Map||Ff(e)))throw new Error("Error trying to diff '".concat(il(e),"'. Only maps and objects are allowed"))}else e=new Map;return this.check(e)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(e){var t=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(e,function(e,r){if(n&&n.key===r)t._maybeAddToChanges(n,e),t._appendAfter=n,n=n._next;else{var i=t._getOrCreateRecordForKey(r,e);n=t._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}},{key:"_insertBeforeOrAppend",value:function(e,t){if(e){var n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}},{key:"_getOrCreateRecordForKey",value:function(e,t){if(this._records.has(e)){var n=this._records.get(e);this._maybeAddToChanges(n,t);var r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}var o=new hv(e);return this._records.set(e,o),o.currentValue=t,this._addToAdditions(o),o}},{key:"_reset",value:function(){if(this.isDirty){var e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}},{key:"_maybeAddToChanges",value:function(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}},{key:"_addToAdditions",value:function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}},{key:"_addToChanges",value:function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}},{key:"_forEach",value:function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(function(n){return t(e[n],n)})}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}}]),e}(),hv=function e(t){is(this,e),this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},pv=function(){var e=function(){function e(t){is(this,e),this.factories=t}return as(e,[{key:"find",value:function(e){var t,n=this.factories.find(function(t){return t.supports(e)});if(null!=n)return n;throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'"))}}],[{key:"create",value:function(t,n){if(null!=n){var r=n.factories.slice();t=t.concat(r)}return new e(t)}},{key:"extend",value:function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new ld,new ad]]}}}]),e}();return e.\u0275prov=dl({token:e,providedIn:"root",factory:function(){return new e([new rv])}}),e}(),fv=function(){var e=function(){function e(t){is(this,e),this.factories=t}return as(e,[{key:"find",value:function(e){var t=this.factories.find(function(t){return t.supports(e)});if(t)return t;throw new Error("Cannot find a differ supporting object '".concat(e,"'"))}}],[{key:"create",value:function(t,n){if(n){var r=n.factories.slice();t=t.concat(r)}return new e(t)}},{key:"extend",value:function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new ld,new ad]]}}}]),e}();return e.\u0275prov=dl({token:e,providedIn:"root",factory:function(){return new e([new cv])}}),e}();function mv(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null!==n;){var o=t[n.index];if(null!==o&&r.push(bu(o)),Xl(o))for(var a=10;a<o.length;a++){var s=o[a],l=s[1].firstChild;null!==l&&mv(s[1],s,l,r)}var u=n.type;if(8&u)mv(e,t,n.child,r);else if(32&u)for(var c=bh(n,t),d=void 0;d=c();)r.push(d);else if(16&u){var h=t[16],p=h[6].projection[n.projection];if(Array.isArray(p))r.push.apply(r,Ha(p));else{var f=_h(h);mv(f[1],f,p,r,!0)}}n=i?n.projectionNext:n.next}return r}var gv=function(){function e(t,n){is(this,e),this._lView=t,this._cdRefInjectingView=n,this._appRef=null,this._viewContainerRef=null}return as(e,[{key:"destroy",value:function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Oh(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){Vp(this._lView[1],this._lView,null,e)}},{key:"markForCheck",value:function(){Zp(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){Xp(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){Uu(!0);try{Xp(e,t,n)}finally{Uu(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,Jh(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}},{key:"rootNodes",get:function(){var e=this._lView,t=e[1];return mv(t,e,t.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),e}(),vv=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this,e))._view=e,r}return as(n,[{key:"detectChanges",value:function(){ef(this._view)}},{key:"checkNoChanges",value:function(){!function(e){Uu(!0);try{ef(e)}finally{Uu(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(gv),yv=_v,bv=function(){var e=function e(){is(this,e)};return e.__NG_ELEMENT_ID__=yv,e.__ChangeDetectorRef__=!0,e}();function _v(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(e,t,n){if(!n&&tu(e)){var r=Su(e.index,t);return new gv(r,r)}return 47&e.type?new gv(t[16],t):null}(Lu(),Vu(),e)}var wv=[new cv],Cv=new pv([new rv]),xv=new fv(wv),Sv=function(){return Ev(Lu(),Vu())},Pv=function(){var e=function e(){is(this,e)};return e.__NG_ELEMENT_ID__=Sv,e}(),kv=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this))._declarationLView=e,o._declarationTContainer=r,o.elementRef=i,o}return as(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=_p(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(t)),Sp(t,n,e),new gv(n)}}]),n}(Pv);function Ev(e,t){return 4&e.type?new kv(t,e,$g(e,t)):null}var Av=function e(){is(this,e)},Iv=function e(){is(this,e)},Tv=function(){return Nv(Lu(),Vu())},Ov=function(){var e=function e(){is(this,e)};return e.__NG_ELEMENT_ID__=Tv,e}(),Rv=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this))._lContainer=e,o._hostTNode=r,o._hostLView=i,o}return as(n,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){var t=Vv(this._lContainer);return null!==t&&t[e]||null}},{key:"createEmbeddedView",value:function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r}},{key:"createComponent",value:function(e,t,n,r,i){var o=n||this.parentInjector;if(!i&&null==e.ngModule&&o){var a=o.get(Av,null);a&&(i=a)}var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s}},{key:"insert",value:function(e,t){var r=e._lView,i=r[1];if(Xl(r[3])){var o=this.indexOf(e);if(-1!==o)this.detach(o);else{var a=r[3],s=new n(a,a[6],a[3]);s.detach(s.indexOf(e))}}var l=this._adjustIndex(t),u=this._lContainer;!function(e,t,n,r){var i=10+r,o=n.length;r>0&&(n[i-1][4]=t),r<o-10?(t[4]=n[i],Xc(n,10+r,t)):(n.push(t),t[4]=null),t[3]=n;var a=t[17];null!==a&&n!==a&&function(e,t){var n=e[9];t[16]!==t[3][3][16]&&(e[2]=!0),null===n?e[9]=[t]:n.push(t)}(a,t);var s=t[19];null!==s&&s.insertView(e),t[2]|=128}(i,r,u,l);var c=Wh(l,u),d=r[11],h=Mh(d,u[7]);return null!==h&&function(e,t,n,r,i,o){r[0]=i,r[6]=t,Jh(e,r,n,1,i,o)}(i,u[6],d,r,h,c),e.attachToViewContainerRef(this),Xc(Dv(u),l,e),e}},{key:"move",value:function(e,t){return this.insert(e,t)}},{key:"indexOf",value:function(e){var t=Vv(this._lContainer);return null!==t?t.indexOf(e):-1}},{key:"remove",value:function(e){var t=this._adjustIndex(e,-1),n=Th(this._lContainer,t);n&&(ed(Dv(this._lContainer),t),Oh(n[1],n))}},{key:"detach",value:function(e){var t=this._adjustIndex(e,-1),n=Th(this._lContainer,t);return n&&null!=ed(Dv(this._lContainer),t)?new gv(n):null}},{key:"_adjustIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}},{key:"element",get:function(){return $g(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new Hc(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var e=Rc(this._hostTNode,this._hostLView);if(xc(e)){var t=Pc(e,this._hostLView),n=Sc(e);return new Hc(t[1].data[n+8],t)}return new Hc(null,this._hostLView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),n}(Ov);function Vv(e){return e[8]}function Dv(e){return e[8]||(e[8]=[])}function Nv(e,t){var n,r=t[e.index];if(Xl(r))n=r;else{var i;if(8&e.type)i=bu(r);else{var o=t[11];i=o.createComment("");var a=wu(e,t);Nh(o,Mh(o,a),i,function(e,t){return vu(e)?e.nextSibling(t):t.nextSibling}(o,a),!1)}t[e.index]=n=Gp(r,t,i,e),Kp(t,n)}return new Rv(n,e,t)}var Lv={},Fv=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this)).ngModule=e,r}return as(n,[{key:"resolveComponentFactory",value:function(e){var t=Yl(e);return new jv(t,this.ngModule)}}]),n}(Wg);function Mv(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var qv=new $c("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return ph}}),jv=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this)).componentDef=e,i.ngModule=r,i.componentType=e.type,i.selector=e.selectors.map(up).join(","),i.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],i.isBoundToModule=!!r,i}return as(n,[{key:"create",value:function(e,t,n,r){var i,o,a=(r=r||this.ngModule)?function(e,t){return{get:function(n,r,i){var o=e.get(n,Lv,i);return o!==Lv||r===Lv?o:t.get(n,r,i)}}}(e,r.injector):e,s=a.get(Kg,yu),l=a.get(ev,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",d=n?function(e,t,n){if(vu(e))return e.selectRootElement(t,n===kl.ShadowDom);var r="string"==typeof t?e.querySelector(t):t;return r.textContent="",r}(u,n,this.componentDef.encapsulation):Ah(s.createRenderer(null,this.componentDef),c,function(e){var t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),h=this.componentDef.onPush?576:528,p={components:[],scheduler:ph,clean:nf,playerHandler:null,flags:0},f=Rp(0,null,null,1,0,null,null,null,null,null),m=_p(null,f,p,h,null,null,s,u,l,a);tc(m);try{var g=function(e,t,n,r,i,o){var a=n[1];n[20]=e;var s=wp(a,20,2,"#host",null),l=s.mergedAttrs=t.hostAttrs;null!==l&&(uf(s,l,!0),null!==e&&(yc(i,e,l),null!==s.classes&&Zh(i,e,s.classes),null!==s.styles&&Kh(i,e,s.styles)));var u=r.createRenderer(e,t),c=_p(n,Op(t),null,t.onPush?64:16,n[20],s,r,u,null,null);return a.firstCreatePass&&(Vc(Ic(s,n),a,t.type),qp(a,s),Bp(s,n.length,1)),Kp(n,c),n[20]=c}(d,this.componentDef,m,s,u);if(d)if(n)yc(u,d,["ng-version",nv.full]);else{var v=function(e){for(var t=[],n=[],r=1,i=2;r<e.length;){var o=e[r];if("string"==typeof o)2===i?""!==o&&t.push(o,e[++r]):8===i&&n.push(o);else{if(!ip(i))break;i=o}r++}return{attrs:t,classes:n}}(this.componentDef.selectors[0]),y=v.attrs,b=v.classes;y&&yc(u,d,y),b&&b.length>0&&Zh(u,d,b.join(" "))}if(o=Cu(f,20),void 0!==t)for(var _=o.projection=[],w=0;w<this.ngContentSelectors.length;w++){var C=t[w];_.push(null!=C?Array.from(C):null)}i=function(e,t,n,r,i){var o=n[1],a=function(e,t,n){var r=Lu();e.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),zp(e,r,t,xp(e,t,1,null),n));var i=Bc(t,e,r.directiveStart,r);hh(i,t);var o=wu(r,t);return o&&hh(o,t),i}(o,n,t);if(r.components.push(a),e[8]=a,i&&i.forEach(function(e){return e(a,t)}),t.contentQueries){var s=Lu();t.contentQueries(1,a,s.directiveStart)}var l=Lu();return!o.firstCreatePass||null===t.hostBindings&&null===t.hostAttrs||(lc(l.index),Fp(n[1],l,0,l.directiveStart,l.directiveEnd,t),Mp(t,a)),a}(g,this.componentDef,m,p,[Ef]),Sp(f,m,null)}finally{ac()}return new Bv(this.componentType,i,$g(o,m),m,o)}},{key:"inputs",get:function(){return Mv(this.componentDef.inputs)}},{key:"outputs",get:function(){return Mv(this.componentDef.outputs)}}]),n}(Hg),Bv=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a){var s;return is(this,n),(s=t.call(this)).location=i,s._rootLView=o,s._tNode=a,s.destroyCbs=[],s.instance=r,s.hostView=s.changeDetectorRef=new vv(o),s.componentType=e,s}return as(n,[{key:"destroy",value:function(){this.destroyCbs&&(this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}},{key:"onDestroy",value:function(e){this.destroyCbs&&this.destroyCbs.push(e)}},{key:"injector",get:function(){return new Hc(this._tNode,this._rootLView)}}]),n}(function(){return function e(){is(this,e)}}()),zv=new Map,Uv=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;is(this,n),(i=t.call(this))._parent=r,i._bootstrapComponents=[],i.injector=ts(i),i.destroyCbs=[],i.componentFactoryResolver=new Fv(ts(i));var o=Kl(e),a=e[Ml]||null;return a&&jm(a),i._bootstrapComponents=gh(o.bootstrap),i._r3Injector=yf(e,r,[{provide:Av,useValue:ts(i)},{provide:Wg,useValue:i.componentFactoryResolver}],il(e)),i._r3Injector._resolveInjectorDefTypes(),i.instance=i.get(e),i}return as(n,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kf.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wl.Default;return e===kf||e===Av||e===cf?this:this._r3Injector.get(e,t,n)}},{key:"destroy",value:function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null}},{key:"onDestroy",value:function(e){this.destroyCbs.push(e)}}]),n}(Av),Hv=function(e){Ka(n,e);var t=Xa(n);function n(e){var r,i,o;return is(this,n),(r=t.call(this)).moduleType=e,null!==Kl(e)&&(i=e,o=new Set,function e(t){var n=Kl(t,!0),r=n.id;null!==r&&(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(il(t)," vs ").concat(il(t.name)))}(r,zv.get(r),t),zv.set(r,t));var i,a=Qa(gh(n.imports));try{for(a.s();!(i=a.n()).done;){var s=i.value;o.has(s)||(o.add(s),e(s))}}catch(l){a.e(l)}finally{a.f()}}(i)),r}return as(n,[{key:"create",value:function(e){return new Uv(this.moduleType,e)}}]),n}(Iv);function Qv(e,t,n){var r=Hu()+e,i=Vu();return i[r]===cp?Mf(i,r,n?t.call(n):t()):function(e,t){return e[t]}(i,r)}function Wv(e,t,n,r,i){return $v(Vu(),Hu(),e,t,n,r,i)}function Gv(e,t){var n=e[t];return n===cp?void 0:n}function $v(e,t,n,r,i,o,a){var s=t+n;return jf(e,s,i,o)?Mf(e,s+2,a?r.call(a,i,o):r(i,o)):Gv(e,s+2)}function Jv(e,t){var n,r=Du(),i=e+20;r.firstCreatePass?(n=function(e,t){if(t)for(var n=t.length-1;n>=0;n--){var r=t[n];if(e===r.name)return r}throw new ou("302","The pipe '".concat(e,"' could not be found!"))}(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks||(r.destroyHooks=[])).push(i,n.onDestroy)):n=r.data[i];var o=n.factory||(n.factory=iu(n.type)),a=Cl(Qf);try{var s=Ec(!1),l=o();return Ec(s),function(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}(r,Vu(),i,l),l}finally{Cl(a)}}function Yv(e,t,n){var r=e+20,i=Vu(),o=xu(i,r);return ey(i,Xv(i,r)?function(e,t,n,r,i,o){var a=t+n;return qf(e,a,i)?Mf(e,a+1,o?r.call(o,i):r(i)):Gv(e,a+1)}(i,Hu(),t,o.transform,n,o):o.transform(n))}function Kv(e,t,n,r){var i=e+20,o=Vu(),a=xu(o,i);return ey(o,Xv(o,i)?$v(o,Hu(),t,a.transform,n,r,a):a.transform(n,r))}function Zv(e,t,n,r,i,o){var a=e+20,s=Vu(),l=xu(s,a);return ey(s,Xv(s,a)?function(e,t,n,r,i,o,a,s,l){var u=t+n;return function(e,t,n,r,i,o){var a=jf(e,t,n,r);return jf(e,t+2,i,o)||a}(e,u,i,o,a,s)?Mf(e,u+4,l?r.call(l,i,o,a,s):r(i,o,a,s)):Gv(e,u+4)}(s,Hu(),t,l.transform,n,r,i,o,l):l.transform(n,r,i,o))}function Xv(e,t){return e[1].data[t].pure}function ey(e,t){return Nf.isWrapped(t)&&(t=Nf.unwrap(t),e[Qu()]=cp),t}var ty=function(e){Ka(n,e);var t=Xa(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return is(this,n),(e=t.call(this)).__isAsync=r,e}return as(n,[{key:"emit",value:function(e){Ya(rs(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,r){var i,o=function(e){return null},a=function(){return null};e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(a=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},t&&(o=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)}),r&&(a=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var s=Ya(rs(n.prototype),"subscribe",this).call(this,i,o,a);return e instanceof ps&&e.add(s),s}}]),n}(Es);function ny(){return this._results[Df()]()}var ry=function(){function e(){is(this,e),this.dirty=!0,this._results=[],this.changes=new ty,this.length=0;var t=Df(),n=e.prototype;n[t]||(n[t]=ny)}return as(e,[{key:"map",value:function(e){return this._results.map(e)}},{key:"filter",value:function(e){return this._results.filter(e)}},{key:"find",value:function(e){return this._results.find(e)}},{key:"reduce",value:function(e,t){return this._results.reduce(e,t)}},{key:"forEach",value:function(e){this._results.forEach(e)}},{key:"some",value:function(e){return this._results.some(e)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(e){this._results=Kc(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}},{key:"notifyOnChanges",value:function(){this.changes.emit(this)}},{key:"setDirty",value:function(){this.dirty=!0}},{key:"destroy",value:function(){this.changes.complete(),this.changes.unsubscribe()}}]),e}(),iy=function(){function e(t){is(this,e),this.queryList=t,this.matches=null}return as(e,[{key:"clone",value:function(){return new e(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),e}(),oy=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];is(this,e),this.queries=t}return as(e,[{key:"createEmbeddedView",value:function(t){var n=t.queries;if(null!==n){for(var r=null!==t.contentQueries?t.contentQueries[0]:n.length,i=[],o=0;o<r;o++){var a=n.getByIndex(o);i.push(this.queries[a.indexInDeclarationView].clone())}return new e(i)}return null}},{key:"insertView",value:function(e){this.dirtyQueriesWithMatches(e)}},{key:"detachView",value:function(e){this.dirtyQueriesWithMatches(e)}},{key:"dirtyQueriesWithMatches",value:function(e){for(var t=0;t<this.queries.length;t++)null!==wy(e,t).matches&&this.queries[t].setDirty()}}]),e}(),ay=function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;is(this,e),this.predicate=t,this.descendants=n,this.isStatic=r,this.read=i},sy=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];is(this,e),this.queries=t}return as(e,[{key:"elementStart",value:function(e,t){for(var n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}},{key:"elementEnd",value:function(e){for(var t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}},{key:"embeddedTView",value:function(t){for(var n=null,r=0;r<this.length;r++){var i=null!==n?n.length:0,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,null!==n?n.push(o):n=[o])}return null!==n?new e(n):null}},{key:"template",value:function(e,t){for(var n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}},{key:"getByIndex",value:function(e){return this.queries[e]}},{key:"track",value:function(e){this.queries.push(e)}},{key:"length",get:function(){return this.queries.length}}]),e}(),ly=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;is(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return as(e,[{key:"elementStart",value:function(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}},{key:"elementEnd",value:function(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(e,t){this.elementStart(e,t)}},{key:"embeddedTView",value:function(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}},{key:"isApplyingToNode",value:function(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&8&n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){var n=this.metadata.predicate;if(Array.isArray(n))for(var r=0;r<n.length;r++){var i=n[r];this.matchTNodeWithReadOption(e,t,uy(t,i)),this.matchTNodeWithReadOption(e,t,jc(t,e,i,!1,!1))}else n===Pv?4&t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,jc(t,e,n,!1,!1))}},{key:"matchTNodeWithReadOption",value:function(e,t,n){if(null!==n){var r=this.metadata.read;if(null!==r)if(r===Yg||r===Ov||r===Pv&&4&t.type)this.addMatch(t.index,-2);else{var i=jc(t,e,r,!1,!1);null!==i&&this.addMatch(t.index,i)}else this.addMatch(t.index,n)}}},{key:"addMatch",value:function(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}]),e}();function uy(e,t){var n=e.localNames;if(null!==n)for(var r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1];return null}function cy(e,t,n,r){return-1===n?function(e,t){return 11&e.type?$g(e,t):4&e.type?Ev(e,t):null}(t,e):-2===n?function(e,t,n){return n===Yg?$g(t,e):n===Pv?Ev(t,e):n===Ov?Nv(t,e):void 0}(e,t,r):Bc(e,e[1],n,t)}function dy(e,t,n,r){var i=t[19].queries[r];if(null===i.matches){for(var o=e.data,a=n.matches,s=[],l=0;l<a.length;l+=2){var u=a[l];s.push(u<0?null:cy(t,o[u],a[l+1],n.metadata.read))}i.matches=s}return i.matches}function hy(e,t,n,r){var i=e.queries.getByIndex(n),o=i.matches;if(null!==o)for(var a=dy(e,t,i,n),s=0;s<o.length;s+=2){var l=o[s];if(l>0)r.push(a[s/2]);else{for(var u=o[s+1],c=t[-l],d=10;d<c.length;d++){var h=c[d];h[17]===h[3]&&hy(h[1],h,u,r)}if(null!==c[9])for(var p=c[9],f=0;f<p.length;f++){var m=p[f];hy(m[1],m,u,r)}}}return r}function py(e){var t=Vu(),n=Du(),r=Ku();Zu(r+1);var i=wy(n,r);if(e.dirty&&ku(t)===i.metadata.isStatic){if(null===i.matches)e.reset([]);else{var o=i.crossesNgTemplate?hy(n,t,r,[]):dy(n,t,i,r);e.reset(o),e.notifyOnChanges()}return!0}return!1}function fy(e,t,n){gy(Du(),Vu(),e,t,n,!0)}function my(e,t,n){gy(Du(),Vu(),e,t,n,!1)}function gy(e,t,n,r,i,o){e.firstCreatePass&&(_y(e,new ay(n,r,o,i),-1),o&&(e.staticViewQueries=!0)),by(e,t)}function vy(e,t,n,r){!function(e,t,n,r,i,o,a,s){e.firstCreatePass&&(_y(e,new ay(n,r,!1,i),a.index),function(e,t){var n=e.contentQueries||(e.contentQueries=[]);t!==(n.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}(e,s)),by(e,t)}(Du(),Vu(),t,n,r,0,Lu(),e)}function yy(){return e=Vu(),t=Ku(),e[19].queries[t].queryList;var e,t}function by(e,t){var n=new ry;Vp(e,t,n,n.destroy),null===t[19]&&(t[19]=new oy),t[19].queries.push(new iy(n))}function _y(e,t,n){null===e.queries&&(e.queries=new sy),e.queries.track(new ly(t,n))}function wy(e,t){return e.queries.getByIndex(t)}function Cy(e,t){return Ev(e,t)}var xy=new $c("Application Initializer"),Sy=function(){var e=function(){function e(t){var n=this;is(this,e),this.appInits=t,this.resolve=Gg,this.reject=Gg,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(e,t){n.resolve=e,n.reject=t})}return as(e,[{key:"runInitializers",value:function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();em(i)&&t.push(i)}Promise.all(t).then(function(){n()}).catch(function(t){e.reject(t)}),0===t.length&&n(),this.initialized=!0}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(md(xy,8))},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}(),Py=new $c("AppId"),ky={provide:Py,useFactory:function(){return"".concat(Ey()).concat(Ey()).concat(Ey())},deps:[]};function Ey(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var Ay=new $c("Platform Initializer"),Iy=new $c("Platform ID"),Ty=new $c("appBootstrapListener"),Oy=function(){var e=function(){function e(){is(this,e)}return as(e,[{key:"log",value:function(e){console.log(e)}},{key:"warn",value:function(e){console.warn(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}(),Ry=new $c("LocaleId"),Vy=new $c("DefaultCurrencyCode"),Dy=function e(t,n){is(this,e),this.ngModuleFactory=t,this.componentFactories=n},Ny=function(e){return new Hv(e)},Ly=Ny,Fy=function(e){return Promise.resolve(Ny(e))},My=function(e){var t=Ny(e),n=gh(Kl(e).declarations).reduce(function(e,t){var n=Yl(t);return n&&e.push(new jv(n)),e},[]);return new Dy(t,n)},qy=My,jy=function(e){return Promise.resolve(My(e))},By=function(){var e=function(){function e(){is(this,e),this.compileModuleSync=Ly,this.compileModuleAsync=Fy,this.compileModuleAndAllComponentsSync=qy,this.compileModuleAndAllComponentsAsync=jy}return as(e,[{key:"clearCache",value:function(){}},{key:"clearCacheFor",value:function(e){}},{key:"getModuleId",value:function(e){}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}(),zy=Promise.resolve(0);function Uy(e){"undefined"==typeof Zone?zy.then(function(){e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}var Hy=function(){function e(t){var n,r,i=t.enableLongStackTrace,o=void 0!==i&&i,a=t.shouldCoalesceEventChangeDetection,s=void 0!==a&&a;if(is(this,e),this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ty(!1),this.onMicrotaskEmpty=new ty(!1),this.onStable=new ty(!1),this.onError=new ty(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),o&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=s,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){var e=Ol.requestAnimationFrame,t=Ol.cancelAnimationFrame;if("undefined"!=typeof Zone&&e&&t){var n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);var r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,r=!!(n=this).shouldCoalesceEventChangeDetection&&n.nativeRequestAnimationFrame&&function(){!function(e){-1===e.lastRequestAnimationFrameId&&(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Ol,function(){e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",function(){e.lastRequestAnimationFrameId=-1,Gy(e),Wy(e)},void 0,function(){},function(){})),e.fakeTopEventTask.invoke()}),Gy(e))}(n)},n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:r},onInvokeTask:function(e,t,i,o,a,s){try{return $y(n),e.invokeTask(i,o,a,s)}finally{r&&"eventTask"===o.type&&r(),Jy(n)}},onInvoke:function(e,t,r,i,o,a,s){try{return $y(n),e.invoke(r,i,o,a,s)}finally{Jy(n)}},onHasTask:function(e,t,r,i){e.hasTask(r,i),t===r&&("microTask"==i.change?(n._hasPendingMicrotasks=i.microTask,Gy(n),Wy(n)):"macroTask"==i.change&&(n.hasPendingMacrotasks=i.macroTask))},onHandleError:function(e,t,r,i){return e.handleError(r,i),n.runOutsideAngular(function(){return n.onError.emit(i)}),!1}})}return as(e,[{key:"run",value:function(e,t,n){return this._inner.run(e,t,n)}},{key:"runTask",value:function(e,t,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,e,Qy,Gg,Gg);try{return i.runTask(o,t,n)}finally{i.cancelTask(o)}}},{key:"runGuarded",value:function(e,t,n){return this._inner.runGuarded(e,t,n)}},{key:"runOutsideAngular",value:function(e){return this._outer.run(e)}}],[{key:"isInAngularZone",value:function(){return!0===Zone.current.get("isAngularZone")}},{key:"assertInAngularZone",value:function(){if(!e.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}},{key:"assertNotInAngularZone",value:function(){if(e.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}}]),e}(),Qy={};function Wy(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(function(){return e.onStable.emit(null)})}finally{e.isStable=!0}}}function Gy(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||e.shouldCoalesceEventChangeDetection&&-1!==e.lastRequestAnimationFrameId)}function $y(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Jy(e){e._nesting--,Wy(e)}var Yy,Ky=function(){function e(){is(this,e),this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ty,this.onMicrotaskEmpty=new ty,this.onStable=new ty,this.onError=new ty}return as(e,[{key:"run",value:function(e,t,n){return e.apply(t,n)}},{key:"runGuarded",value:function(e,t,n){return e.apply(t,n)}},{key:"runOutsideAngular",value:function(e){return e()}},{key:"runTask",value:function(e,t,n,r){return e.apply(t,n)}}]),e}(),Zy=function(){var e=function(){function e(t){var n=this;is(this,e),this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(function(){n.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}return as(e,[{key:"_watchAngularEvents",value:function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.subscribe({next:function(){Hy.assertNotInAngularZone(),Uy(function(){e._isZoneStable=!0,e._runCallbacksIfReady()})}})})}},{key:"increasePendingRequestCount",value:function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}},{key:"decreasePendingRequestCount",value:function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}},{key:"isStable",value:function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}},{key:"_runCallbacksIfReady",value:function(){var e=this;if(this.isStable())Uy(function(){for(;0!==e._callbacks.length;){var t=e._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(e._didWork)}e._didWork=!1});else{var t=this.getPendingTasks();this._callbacks=this._callbacks.filter(function(e){return!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)}),this._didWork=!0}}},{key:"getPendingTasks",value:function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(function(e){return{source:e.source,creationLocation:e.creationLocation,data:e.data}}):[]}},{key:"addCallback",value:function(e,t,n){var r=this,i=-1;t&&t>0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})}},{key:"whenStable",value:function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(e,t,n){return[]}}]),e}();return e.\u0275fac=function(t){return new(t||e)(md(Hy))},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}(),Xy=function(){var e=function(){function e(){is(this,e),this._applications=new Map,eb.addToWindow(this)}return as(e,[{key:"registerApplication",value:function(e,t){this._applications.set(e,t)}},{key:"unregisterApplication",value:function(e){this._applications.delete(e)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(e){return this._applications.get(e)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return eb.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}(),eb=new(function(){function e(){is(this,e)}return as(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),tb=new $c("AllowMultipleToken"),nb=function e(t,n){is(this,e),this.name=t,this.token=n};function rb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r="Platform: "+t,i=new $c(r);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=ib();if(!o||o.injector.get(tb,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var a=n.concat(t).concat({provide:i,useValue:!0},{provide:hf,useValue:"platform"});!function(e){if(Yy&&!Yy.destroyed&&!Yy.injector.get(tb,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Yy=e.get(ob);var t=e.get(Ay,null);t&&t.forEach(function(e){return e()})}(kf.create({providers:a,name:r}))}return function(e){var t=ib();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function ib(){return Yy&&!Yy.destroyed?Yy:null}var ob=function(){var e=function(){function e(t){is(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return as(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,r,i=this,o=(n=t?t.ngZone:void 0,r=t&&t.ngZoneEventCoalescing||!1,"noop"===n?new Ky:("zone.js"===n?void 0:n)||new Hy({enableLongStackTrace:Od(),shouldCoalesceEventChangeDetection:r})),a=[{provide:Hy,useValue:o}];return o.run(function(){var t=kf.create({providers:a,parent:i.injector,name:e.moduleType.name}),n=e.create(t),r=n.injector.get(dh,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return ub(i._modules,n)}),o.runOutsideAngular(function(){return o.onError.subscribe({next:function(e){r.handleError(e)}})}),function(e,t,r){try{var o=((a=n.injector.get(Sy)).runInitializers(),a.donePromise.then(function(){return jm(n.injector.get(Ry,"en-US")||"en-US"),i._moduleDoBootstrap(n),n}));return em(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(s){throw t.runOutsideAngular(function(){return e.handleError(s)}),s}var a}(r,o)})}},{key:"bootstrapModule",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=ab({},n);return function(e,t,n){var r=new Hv(n);return Promise.resolve(r)}(0,0,e).then(function(e){return t.bootstrapModuleFactory(e,r)})}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(lb);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module ".concat(il(e.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.'));e.instance.ngDoBootstrap(t)}this._modules.push(e)}},{key:"onDestroy",value:function(e){this._destroyListeners.push(e)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(md(kf))},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}();function ab(e,t){return Array.isArray(t)?t.reduce(ab,e):Object.assign(Object.assign({},e),t)}var sb,lb=((sb=function(){function e(t,n,r,i,o,a){var s=this;is(this,e),this._zone=t,this._console=n,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=a,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Od(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var l=new ws(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),u=new ws(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){Hy.assertNotInAngularZone(),Uy(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Hy.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=$s(l,u.pipe(function(e){return Js()((t=tl,function(e){var n;n="function"==typeof t?t:function(){return t};var r=Object.create(e,Xs);return r.source=e,r.subjectFactory=n,r})(e));var t}))}return as(e,[{key:"bootstrap",value:function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof Hg?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n.isBoundToModule?void 0:this._injector.get(Av),o=n.create(kf.NULL,[],t||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var a=o.injector.get(Zy,null);return a&&o.injector.get(Xy).registerApplication(o.location.nativeElement,a),this._loadComponent(o),Od()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),o}},{key:"tick",value:function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var t,n=Qa(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(o){n.e(o)}finally{n.f()}if(this._enforceNoNewChanges){var r,i=Qa(this._views);try{for(i.s();!(r=i.n()).done;)r.value.checkNoChanges()}catch(o){i.e(o)}finally{i.f()}}}catch(a){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(a)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(e){var t=e;this._views.push(t),t.attachToAppRef(this)}},{key:"detachView",value:function(e){var t=e;ub(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(Ty,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})}},{key:"_unloadComponent",value:function(e){this.detachView(e.hostView),ub(this.components,e)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(e){return e.destroy()})}},{key:"viewCount",get:function(){return this._views.length}}]),e}()).\u0275fac=function(e){return new(e||sb)(md(Hy),md(Oy),md(kf),md(dh),md(Wg),md(Sy))},sb.\u0275prov=dl({token:sb,factory:sb.\u0275fac}),sb);function ub(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var cb=function e(){is(this,e)},db=function e(){is(this,e)},hb={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},pb=function(){var e=function(){function e(t,n){is(this,e),this._compiler=t,this._config=n||hb}return as(e,[{key:"load",value:function(e){return this.loadAndCompile(e)}},{key:"loadAndCompile",value:function(e){var t=this,n=Ua(e.split("#"),2),r=n[0],i=n[1];return void 0===i&&(i="default"),Ga("zn8P")(r).then(function(e){return e[i]}).then(function(e){return fb(e,r,i)}).then(function(e){return t._compiler.compileModuleAsync(e)})}},{key:"loadFactory",value:function(e){var t=Ua(e.split("#"),2),n=t[0],r=t[1],i="NgFactory";return void 0===r&&(r="default",i=""),Ga("zn8P")(this._config.factoryPathPrefix+n+this._config.factoryPathSuffix).then(function(e){return e[r+i]}).then(function(e){return fb(e,n,r)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(md(By),md(db,8))},e.\u0275prov=dl({token:e,factory:e.\u0275fac}),e}();function fb(e,t,n){if(!e)throw new Error("Cannot find '".concat(n,"' in '").concat(t,"'"));return e}var mb=rb(null,"core",[{provide:Iy,useValue:"unknown"},{provide:ob,deps:[kf]},{provide:Xy,deps:[]},{provide:Oy,deps:[]}]),gb=[{provide:lb,useClass:lb,deps:[Hy,Oy,kf,dh,Wg,Sy]},{provide:qv,deps:[Hy],useFactory:function(e){var t=[];return e.onStable.subscribe(function(){for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Sy,useClass:Sy,deps:[[new ad,xy]]},{provide:By,useClass:By,deps:[]},ky,{provide:pv,useFactory:function(){return Cv},deps:[]},{provide:fv,useFactory:function(){return xv},deps:[]},{provide:Ry,useFactory:function(e){return jm(e=e||"undefined"!=typeof $localize&&$localize.locale||"en-US"),e},deps:[[new od(Ry),new ad,new ld]]},{provide:Vy,useValue:"USD"}],vb=function(){var e=function e(t){is(this,e)};return e.\u0275mod=Wl({type:e}),e.\u0275inj=hl({factory:function(t){return new(t||e)(md(lb))},providers:gb}),e}(),yb={production:!0,city_code_config:"request-routing.json"},bb=null;function _b(){return bb}var wb,Cb=new $c("DocumentToken"),xb=((wb=function e(){is(this,e)}).\u0275fac=function(e){return new(e||wb)},wb.\u0275prov=dl({factory:Sb,token:wb,providedIn:"platform"}),wb);function Sb(){return md(Eb)}var Pb,kb=new $c("Location Initialized"),Eb=((Pb=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this))._doc=e,r._init(),r}return as(n,[{key:"_init",value:function(){this.location=_b().getLocation(),this._history=_b().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return _b().getBaseHref(this._doc)}},{key:"onPopState",value:function(e){_b().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}},{key:"onHashChange",value:function(e){_b().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}},{key:"pushState",value:function(e,t,n){Ab()?this._history.pushState(e,t,n):this.location.hash=n}},{key:"replaceState",value:function(e,t,n){Ab()?this._history.replaceState(e,t,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(e){this.location.pathname=e}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(xb)).\u0275fac=function(e){return new(e||Pb)(md(Cb))},Pb.\u0275prov=dl({factory:Ib,token:Pb,providedIn:"platform"}),Pb);function Ab(){return!!window.history.pushState}function Ib(){return new Eb(md(Cb))}function Tb(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function Ob(e){var t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function Rb(e){return e&&"?"!==e[0]?"?"+e:e}var Vb,Db=((Vb=function e(){is(this,e)}).\u0275fac=function(e){return new(e||Vb)},Vb.\u0275prov=dl({factory:Nb,token:Vb,providedIn:"root"}),Vb);function Nb(e){var t=md(Cb).location;return new jb(md(xb),t&&t.origin||"")}var Lb,Fb,Mb,qb=new $c("appBaseHref"),jb=((Mb=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;if(is(this,n),(i=t.call(this))._platformLocation=e,null==r&&(r=i._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return i._baseHref=r,es(i)}return as(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(e){return Tb(this._baseHref,e)}},{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._platformLocation.pathname+Rb(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?"".concat(t).concat(n):t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+Rb(r));this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+Rb(r));this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Db)).\u0275fac=function(e){return new(e||Mb)(md(xb),md(qb,8))},Mb.\u0275prov=dl({token:Mb,factory:Mb.\u0275fac}),Mb),Bb=((Fb=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this))._platformLocation=e,i._baseHref="",null!=r&&(i._baseHref=r),i}return as(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}},{key:"prepareExternalUrl",value:function(e){var t=Tb(this._baseHref,e);return t.length>0?"#"+t:t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+Rb(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+Rb(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Db)).\u0275fac=function(e){return new(e||Fb)(md(xb),md(qb,8))},Fb.\u0275prov=dl({token:Fb,factory:Fb.\u0275fac}),Fb),zb=((Lb=function(){function e(t,n){var r=this;is(this,e),this._subject=new ty,this._urlChangeListeners=[],this._platformStrategy=t;var i=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=Ob(Hb(i)),this._platformStrategy.onPopState(function(e){r._subject.emit({url:r.path(!0),pop:!0,state:e.state,type:e.type})})}return as(e,[{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(e))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(e+Rb(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,Hb(t)))}},{key:"prepareExternalUrl",value:function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Rb(t)),n)}},{key:"replaceState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Rb(t)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(e){var t=this;this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(e){t._notifyUrlChangeListeners(e.url,e.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(n){return n(e,t)})}},{key:"subscribe",value:function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}]),e}()).\u0275fac=function(e){return new(e||Lb)(md(Db),md(xb))},Lb.normalizeQueryParams=Rb,Lb.joinWithSlash=Tb,Lb.stripTrailingSlash=Ob,Lb.\u0275prov=dl({factory:Ub,token:Lb,providedIn:"root"}),Lb);function Ub(){return new zb(md(Db),md(xb))}function Hb(e){return e.replace(/\/index.html$/,"")}var Qb={ADP:[void 0,void 0,0],AFN:[void 0,void 0,0],ALL:[void 0,void 0,0],AMD:[void 0,void 0,2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,"\u0440.",2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:[void 0,"\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RUR:[void 0,"\u0440."],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},Wb=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}({}),Gb=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),$b=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}({}),Jb=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}({}),Yb=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}({}),Kb=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e[1/0]=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}({});function Zb(e,t){return i_(Om(e)[Dm.DateFormat],t)}function Xb(e,t){return i_(Om(e)[Dm.TimeFormat],t)}function e_(e,t){return i_(Om(e)[Dm.DateTimeFormat],t)}function t_(e,t){var n=Om(e),r=n[Dm.NumberSymbols][t];if(void 0===r){if(t===Kb.CurrencyDecimal)return n[Dm.NumberSymbols][Kb.Decimal];if(t===Kb.CurrencyGroup)return n[Dm.NumberSymbols][Kb.Group]}return r}var n_=Rm;function r_(e){if(!e[Dm.ExtraData])throw new Error('Missing extra locale data for the locale "'.concat(e[Dm.LocaleId],'". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.'))}function i_(e,t){for(var n=t;n>-1;n--)if(void 0!==e[n])return e[n];throw new Error("Locale data API: locale data undefined")}function o_(e){var t=Ua(e.split(":"),2);return{hours:+t[0],minutes:+t[1]}}var a_=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,s_={},l_=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,u_=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}({}),c_=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}({}),d_=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}({});function h_(e,t,n,r){var i=function(e){if(S_(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){e=e.trim();var t,n=parseFloat(e);if(!isNaN(e-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){var r=Ua(e.split("-").map(function(e){return+e}),3),i=r[0],o=r[1],a=r[2];return new Date(i,o-1,a)}if(t=e.match(a_))return function(e){var t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,o=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));var a=Number(e[4]||0)-n,s=Number(e[5]||0)-r,l=Number(e[6]||0),u=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return o.call(t,a,s,l,u),t}(t)}var s=new Date(e);if(!S_(s))throw new Error('Unable to convert "'.concat(e,'" into a date'));return s}(e);t=p_(n,t)||t;for(var o,a=[];t;){if(!(o=l_.exec(t))){a.push(t);break}var s=(a=a.concat(o.slice(1))).pop();if(!s)break;t=s}var l=i.getTimezoneOffset();r&&(l=x_(r,l),i=function(e,t,n){var r=e.getTimezoneOffset();return function(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}(e,-1*(x_(t,r)-r))}(i,r));var u="";return a.forEach(function(e){var t=function(e){if(C_[e])return C_[e];var t;switch(e){case"G":case"GG":case"GGG":t=v_(d_.Eras,Jb.Abbreviated);break;case"GGGG":t=v_(d_.Eras,Jb.Wide);break;case"GGGGG":t=v_(d_.Eras,Jb.Narrow);break;case"y":t=g_(c_.FullYear,1,0,!1,!0);break;case"yy":t=g_(c_.FullYear,2,0,!0,!0);break;case"yyy":t=g_(c_.FullYear,3,0,!1,!0);break;case"yyyy":t=g_(c_.FullYear,4,0,!1,!0);break;case"Y":t=w_(1);break;case"YY":t=w_(2,!0);break;case"YYY":t=w_(3);break;case"YYYY":t=w_(4);break;case"M":case"L":t=g_(c_.Month,1,1);break;case"MM":case"LL":t=g_(c_.Month,2,1);break;case"MMM":t=v_(d_.Months,Jb.Abbreviated);break;case"MMMM":t=v_(d_.Months,Jb.Wide);break;case"MMMMM":t=v_(d_.Months,Jb.Narrow);break;case"LLL":t=v_(d_.Months,Jb.Abbreviated,$b.Standalone);break;case"LLLL":t=v_(d_.Months,Jb.Wide,$b.Standalone);break;case"LLLLL":t=v_(d_.Months,Jb.Narrow,$b.Standalone);break;case"w":t=__(1);break;case"ww":t=__(2);break;case"W":t=__(1,!0);break;case"d":t=g_(c_.Date,1);break;case"dd":t=g_(c_.Date,2);break;case"E":case"EE":case"EEE":t=v_(d_.Days,Jb.Abbreviated);break;case"EEEE":t=v_(d_.Days,Jb.Wide);break;case"EEEEE":t=v_(d_.Days,Jb.Narrow);break;case"EEEEEE":t=v_(d_.Days,Jb.Short);break;case"a":case"aa":case"aaa":t=v_(d_.DayPeriods,Jb.Abbreviated);break;case"aaaa":t=v_(d_.DayPeriods,Jb.Wide);break;case"aaaaa":t=v_(d_.DayPeriods,Jb.Narrow);break;case"b":case"bb":case"bbb":t=v_(d_.DayPeriods,Jb.Abbreviated,$b.Standalone,!0);break;case"bbbb":t=v_(d_.DayPeriods,Jb.Wide,$b.Standalone,!0);break;case"bbbbb":t=v_(d_.DayPeriods,Jb.Narrow,$b.Standalone,!0);break;case"B":case"BB":case"BBB":t=v_(d_.DayPeriods,Jb.Abbreviated,$b.Format,!0);break;case"BBBB":t=v_(d_.DayPeriods,Jb.Wide,$b.Format,!0);break;case"BBBBB":t=v_(d_.DayPeriods,Jb.Narrow,$b.Format,!0);break;case"h":t=g_(c_.Hours,1,-12);break;case"hh":t=g_(c_.Hours,2,-12);break;case"H":t=g_(c_.Hours,1);break;case"HH":t=g_(c_.Hours,2);break;case"m":t=g_(c_.Minutes,1);break;case"mm":t=g_(c_.Minutes,2);break;case"s":t=g_(c_.Seconds,1);break;case"ss":t=g_(c_.Seconds,2);break;case"S":t=g_(c_.FractionalSeconds,1);break;case"SS":t=g_(c_.FractionalSeconds,2);break;case"SSS":t=g_(c_.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=y_(u_.Short);break;case"ZZZZZ":t=y_(u_.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=y_(u_.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=y_(u_.Long);break;default:return null}return C_[e]=t,t}(e);u+=t?t(i,n,l):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function p_(e,t){var n=function(e){return Om(e)[Dm.LocaleId]}(e);if(s_[n]=s_[n]||{},s_[n][t])return s_[n][t];var r="";switch(t){case"shortDate":r=Zb(e,Yb.Short);break;case"mediumDate":r=Zb(e,Yb.Medium);break;case"longDate":r=Zb(e,Yb.Long);break;case"fullDate":r=Zb(e,Yb.Full);break;case"shortTime":r=Xb(e,Yb.Short);break;case"mediumTime":r=Xb(e,Yb.Medium);break;case"longTime":r=Xb(e,Yb.Long);break;case"fullTime":r=Xb(e,Yb.Full);break;case"short":var i=p_(e,"shortTime"),o=p_(e,"shortDate");r=f_(e_(e,Yb.Short),[i,o]);break;case"medium":var a=p_(e,"mediumTime"),s=p_(e,"mediumDate");r=f_(e_(e,Yb.Medium),[a,s]);break;case"long":var l=p_(e,"longTime"),u=p_(e,"longDate");r=f_(e_(e,Yb.Long),[l,u]);break;case"full":var c=p_(e,"fullTime"),d=p_(e,"fullDate");r=f_(e_(e,Yb.Full),[c,d])}return r&&(s_[n][t]=r),r}function f_(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return null!=t&&n in t?t[n]:e})),e}function m_(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o="";(e<0||i&&e<=0)&&(i?e=1-e:(e=-e,o=n));for(var a=String(e);a.length<t;)a="0"+a;return r&&(a=a.substr(a.length-t)),o+a}function g_(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return function(o,a){var s,l=function(e,t){switch(e){case c_.FullYear:return t.getFullYear();case c_.Month:return t.getMonth();case c_.Date:return t.getDate();case c_.Hours:return t.getHours();case c_.Minutes:return t.getMinutes();case c_.Seconds:return t.getSeconds();case c_.FractionalSeconds:return t.getMilliseconds();case c_.Day:return t.getDay();default:throw new Error('Unknown DateType value "'.concat(e,'".'))}}(e,o);if((n>0||l>-n)&&(l+=n),e===c_.Hours)0===l&&-12===n&&(l=12);else if(e===c_.FractionalSeconds)return s=t,m_(l,3).substr(0,s);var u=t_(a,Kb.MinusSign);return m_(l,t,u,r,i)}}function v_(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$b.Format,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(i,o){return function(e,t,n,r,i,o){switch(n){case d_.Months:return function(e,t,n){var r=Om(e),i=i_([r[Dm.MonthsFormat],r[Dm.MonthsStandalone]],t);return i_(i,n)}(t,i,r)[e.getMonth()];case d_.Days:return function(e,t,n){var r=Om(e),i=i_([r[Dm.DaysFormat],r[Dm.DaysStandalone]],t);return i_(i,n)}(t,i,r)[e.getDay()];case d_.DayPeriods:var a=e.getHours(),s=e.getMinutes();if(o){var l=function(e){var t=Om(e);return r_(t),(t[Dm.ExtraData][2]||[]).map(function(e){return"string"==typeof e?o_(e):[o_(e[0]),o_(e[1])]})}(t),u=function(e,t,n){var r=Om(e);r_(r);var i=i_([r[Dm.ExtraData][0],r[Dm.ExtraData][1]],t)||[];return i_(i,n)||[]}(t,i,r),c=l.findIndex(function(e){if(Array.isArray(e)){var t=Ua(e,2),n=t[0],r=t[1],i=a>=n.hours&&s>=n.minutes,o=a<r.hours||a===r.hours&&s<r.minutes;if(n.hours<r.hours){if(i&&o)return!0}else if(i||o)return!0}else if(e.hours===a&&e.minutes===s)return!0;return!1});if(-1!==c)return u[c]}return function(e,t,n){var r=Om(e),i=i_([r[Dm.DayPeriodsFormat],r[Dm.DayPeriodsStandalone]],t);return i_(i,n)}(t,i,r)[a<12?0:1];case d_.Eras:return function(e,t){return i_(Om(e)[Dm.Eras],t)}(t,r)[e.getFullYear()<=0?0:1];default:throw new Error("unexpected translation type "+n)}}(i,o,e,t,n,r)}}function y_(e){return function(t,n,r){var i=-1*r,o=t_(n,Kb.MinusSign),a=i>0?Math.floor(i/60):Math.ceil(i/60);switch(e){case u_.Short:return(i>=0?"+":"")+m_(a,2,o)+m_(Math.abs(i%60),2,o);case u_.ShortGMT:return"GMT"+(i>=0?"+":"")+m_(a,1,o);case u_.Long:return"GMT"+(i>=0?"+":"")+m_(a,2,o)+":"+m_(Math.abs(i%60),2,o);case u_.Extended:return 0===r?"Z":(i>=0?"+":"")+m_(a,2,o)+":"+m_(Math.abs(i%60),2,o);default:throw new Error('Unknown zone width "'.concat(e,'"'))}}}function b_(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function __(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,r){var i,o,a;if(t){var s=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,l=n.getDate();i=1+Math.floor((l+s)/7)}else{var u=b_(n),c=(o=u.getFullYear(),a=new Date(o,0,1).getDay(),new Date(o,0,1+(a<=4?4:11)-a)),d=u.getTime()-c.getTime();i=1+Math.round(d/6048e5)}return m_(i,e,t_(r,Kb.MinusSign))}}function w_(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,r){return m_(b_(n).getFullYear(),e,t_(r,Kb.MinusSign),t)}}var C_={};function x_(e,t){e=e.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function S_(e){return e instanceof Date&&!isNaN(e.valueOf())}var P_=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function k_(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}var E_,A_=function e(){is(this,e)},I_=((E_=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this)).locale=e,r}return as(n,[{key:"getPluralCategory",value:function(e,t){switch(n_(t||this.locale)(e)){case Gb.Zero:return"zero";case Gb.One:return"one";case Gb.Two:return"two";case Gb.Few:return"few";case Gb.Many:return"many";default:return"other"}}}]),n}(A_)).\u0275fac=function(e){return new(e||E_)(md(Ry))},E_.\u0275prov=dl({token:E_,factory:E_.\u0275fac}),E_);function T_(e,t){t=encodeURIComponent(t);var n,r=Qa(e.split(";"));try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.indexOf("="),a=Ua(-1==o?[i,""]:[i.slice(0,o),i.slice(o+1)],2),s=a[0],l=a[1];if(s.trim()===t)return decodeURIComponent(l)}}catch(u){r.e(u)}finally{r.f()}return null}var O_,R_,V_,D_=((O_=function(){function e(t,n,r,i){is(this,e),this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=r,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return as(e,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}},{key:"_applyKeyValueChanges",value:function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})}},{key:"_applyIterableChanges",value:function(e){var t=this;e.forEachAddedItem(function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+il(e.item));t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){return t._toggleClass(e.item,!1)})}},{key:"_applyClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!0)}):Object.keys(e).forEach(function(n){return t._toggleClass(n,!!e[n])}))}},{key:"_removeClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!1)}):Object.keys(e).forEach(function(e){return t._toggleClass(e,!1)}))}},{key:"_toggleClass",value:function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach(function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)})}},{key:"klass",set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Lf(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),e}()).\u0275fac=function(e){return new(e||O_)(Qf(pv),Qf(fv),Qf(Yg),Qf(Zg))},O_.\u0275dir=$l({type:O_,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),O_),N_=function(){function e(t,n,r,i){is(this,e),this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}return as(e,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),e}(),L_=((R_=function(){function e(t,n,r){is(this,e),this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return as(e,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'. NgFor only supports binding to Iterables such as Arrays."))}}var t;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(e){var t=this,n=[];e.forEachOperation(function(e,r,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new N_(null,t._ngForOf,-1,-1),null===i?void 0:i),a=new F_(e,o);n.push(a)}else if(null==i)t._viewContainer.remove(null===r?void 0:r);else if(null!==r){var s=t._viewContainer.get(r);t._viewContainer.move(s,i);var l=new F_(e,s);n.push(l)}});for(var r=0;r<n.length;r++)this._perViewChange(n[r].view,n[r].record);for(var i=0,o=this._viewContainer.length;i<o;i++){var a=this._viewContainer.get(i);a.context.index=i,a.context.count=o,a.context.ngForOf=this._ngForOf}e.forEachIdentityChange(function(e){t._viewContainer.get(e.currentIndex).context.$implicit=e.item})}},{key:"_perViewChange",value:function(e,t){e.context.$implicit=t.item}},{key:"ngForOf",set:function(e){this._ngForOf=e,this._ngForOfDirty=!0}},{key:"ngForTrackBy",set:function(e){Od()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received ".concat(JSON.stringify(e),". See https://angular.io/api/common/NgForOf#change-propagation for more information.")),this._trackByFn=e},get:function(){return this._trackByFn}},{key:"ngForTemplate",set:function(e){e&&(this._template=e)}}],[{key:"ngTemplateContextGuard",value:function(e,t){return!0}}]),e}()).\u0275fac=function(e){return new(e||R_)(Qf(Ov),Qf(Pv),Qf(pv))},R_.\u0275dir=$l({type:R_,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),R_),F_=function e(t,n){is(this,e),this.record=t,this.view=n},M_=((V_=function(){function e(t,n){is(this,e),this._viewContainer=t,this._context=new q_,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}return as(e,[{key:"_updateView",value:function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}},{key:"ngIf",set:function(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}},{key:"ngIfThen",set:function(e){j_("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}},{key:"ngIfElse",set:function(e){j_("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}}],[{key:"ngTemplateContextGuard",value:function(e,t){return!0}}]),e}()).\u0275fac=function(e){return new(e||V_)(Qf(Ov),Qf(Pv))},V_.\u0275dir=$l({type:V_,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),V_),q_=function e(){is(this,e),this.$implicit=null,this.ngIf=null};function j_(e,t){if(t&&!t.createEmbeddedView)throw new Error("".concat(e," must be a TemplateRef, but received '").concat(il(t),"'."))}var B_,z_,U_,H_,Q_=function(){function e(t,n){is(this,e),this._viewContainerRef=t,this._templateRef=n,this._created=!1}return as(e,[{key:"create",value:function(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}},{key:"destroy",value:function(){this._created=!1,this._viewContainerRef.clear()}},{key:"enforceState",value:function(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}]),e}(),W_=((H_=function(){function e(){is(this,e),this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}return as(e,[{key:"_addCase",value:function(){return this._caseCount++}},{key:"_addDefault",value:function(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}},{key:"_matchCase",value:function(e){var t=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||t,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),t}},{key:"_updateDefaultCases",value:function(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(var t=0;t<this._defaultViews.length;t++)this._defaultViews[t].enforceState(e)}}},{key:"ngSwitch",set:function(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}}]),e}()).\u0275fac=function(e){return new(e||H_)},H_.\u0275dir=$l({type:H_,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),H_),G_=((U_=function(){function e(t,n,r){is(this,e),this.ngSwitch=r,r._addCase(),this._view=new Q_(t,n)}return as(e,[{key:"ngDoCheck",value:function(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}]),e}()).\u0275fac=function(e){return new(e||U_)(Qf(Ov),Qf(Pv),Qf(W_,1))},U_.\u0275dir=$l({type:U_,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),U_),$_=((z_=function e(t,n,r){is(this,e),r._addDefault(new Q_(t,n))}).\u0275fac=function(e){return new(e||z_)(Qf(Ov),Qf(Pv),Qf(W_,1))},z_.\u0275dir=$l({type:z_,selectors:[["","ngSwitchDefault",""]]}),z_),J_=((B_=function(){function e(t,n,r){is(this,e),this._ngEl=t,this._differs=n,this._renderer=r,this._ngStyle=null,this._differ=null}return as(e,[{key:"ngDoCheck",value:function(){if(this._differ){var e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}},{key:"_setStyle",value:function(e,t){var n=Ua(e.split("."),2),r=n[0],i=n[1];null!=(t=null!=t&&i?"".concat(t).concat(i):t)?this._renderer.setStyle(this._ngEl.nativeElement,r,t):this._renderer.removeStyle(this._ngEl.nativeElement,r)}},{key:"_applyChanges",value:function(e){var t=this;e.forEachRemovedItem(function(e){return t._setStyle(e.key,null)}),e.forEachAddedItem(function(e){return t._setStyle(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._setStyle(e.key,e.currentValue)})}},{key:"ngStyle",set:function(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}}]),e}()).\u0275fac=function(e){return new(e||B_)(Qf(Yg),Qf(fv),Qf(Zg))},B_.\u0275dir=$l({type:B_,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),B_);function Y_(e,t){return Error("InvalidPipeArgument: '".concat(t,"' for pipe '").concat(il(e),"'"))}var K_,Z_,X_,ew,tw,nw=function(){function e(){is(this,e)}return as(e,[{key:"createSubscription",value:function(e,t){return e.subscribe({next:t,error:function(e){throw e}})}},{key:"dispose",value:function(e){e.unsubscribe()}},{key:"onDestroy",value:function(e){e.unsubscribe()}}]),e}(),rw=new(function(){function e(){is(this,e)}return as(e,[{key:"createSubscription",value:function(e,t){return e.then(t,function(e){throw e})}},{key:"dispose",value:function(e){}},{key:"onDestroy",value:function(e){}}]),e}()),iw=new nw,ow=((tw=function(){function e(t){is(this,e),this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}return as(e,[{key:"ngOnDestroy",value:function(){this._subscription&&this._dispose()}},{key:"transform",value:function(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}},{key:"_subscribe",value:function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(n){return t._updateLatestValue(e,n)})}},{key:"_selectStrategy",value:function(t){if(em(t))return rw;if(tm(t))return iw;throw Y_(e,t)}},{key:"_dispose",value:function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}},{key:"_updateLatestValue",value:function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())}}]),e}()).\u0275fac=function(e){return new(e||tw)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wl.Default,t=_v(!0);if(null!=t||e&wl.Optional)return t;lu("ChangeDetectorRef")}())},tw.\u0275pipe=Jl({name:"async",type:tw,pure:!1}),tw),aw=((ew=function(){function e(t){is(this,e),this.locale=t}return as(e,[{key:"transform",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mediumDate",r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(null==t||""===t||t!=t)return null;try{return h_(t,n,i||this.locale,r)}catch(o){throw Y_(e,o.message)}}}]),e}()).\u0275fac=function(e){return new(e||ew)(Qf(Ry))},ew.\u0275pipe=Jl({name:"date",type:ew,pure:!0}),ew),sw=((X_=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD";is(this,e),this._locale=t,this._defaultCurrencyCode=n}return as(e,[{key:"transform",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"symbol",i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!function(e){return!(null==e||""===e||e!=e)}(t))return null;o=o||this._locale,"boolean"==typeof r&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),r=r?"symbol":"code");var a=n||this._defaultCurrencyCode;"code"!==r&&(a="symbol"===r||"symbol-narrow"===r?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",r=function(e){return Om(e)[Dm.Currencies]}(n)[e]||Qb[e]||[],i=r[1];return"narrow"===t&&"string"==typeof i?i:r[0]||e}(a,"symbol"===r?"wide":"narrow",o):r);try{return function(e,t,n,r,i){var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(";"),i=r[0],o=r[1],a=-1!==i.indexOf(".")?i.split("."):[i.substring(0,i.lastIndexOf("0")+1),i.substring(i.lastIndexOf("0")+1)],s=a[0],l=a[1]||"";n.posPre=s.substr(0,s.indexOf("#"));for(var u=0;u<l.length;u++){var c=l.charAt(u);"0"===c?n.minFrac=n.maxFrac=u+1:"#"===c?n.maxFrac=u+1:n.posSuf+=c}var d=s.split(",");if(n.gSize=d[1]?d[1].length:0,n.lgSize=d[2]||d[1]?(d[2]||d[1]).length:0,o){var h=i.length-n.posPre.length-n.posSuf.length,p=o.indexOf("#");n.negPre=o.substr(0,p).replace(/'/g,""),n.negSuf=o.substr(p+h).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}(function(e,t){return Om(e)[Dm.NumberFormats][t]}(t,Wb.Currency),t_(t,Kb.MinusSign));return o.minFrac=function(e){var t,n=Qb[e];return n&&(t=n[2]),"number"==typeof t?t:2}(r),o.maxFrac=o.minFrac,function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s="",l=!1;if(isFinite(e)){var u=function(e){var t,n,r,i,o,a=Math.abs(e)+"",s=0;for((n=a.indexOf("."))>-1&&(a=a.replace(".","")),(r=a.search(/e/i))>0?(n<0&&(n=r),n+=+a.slice(r+1),a=a.substring(0,r)):n<0&&(n=a.length),r=0;"0"===a.charAt(r);r++);if(r===(o=a.length))t=[0],n=1;else{for(o--;"0"===a.charAt(o);)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=Number(a.charAt(r))}return n>22&&(t=t.splice(0,21),s=n-1,n=1),{digits:t,exponent:s,integerLen:n}}(e);a&&(u=function(e){if(0===e.digits[0])return e;var t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===t?e.digits.push(0,0):1===t&&e.digits.push(0),e.integerLen+=2),e}(u));var c=t.minInt,d=t.minFrac,h=t.maxFrac;if(o){var p=o.match(P_);if(null===p)throw new Error(o+" is not a valid digit info");var f=p[1],m=p[3],g=p[5];null!=f&&(c=k_(f)),null!=m&&(d=k_(m)),null!=g?h=k_(g):null!=m&&d>h&&(h=d)}!function(e,t,n){if(t>n)throw new Error("The minimum number of digits after fraction (".concat(t,") is higher than the maximum (").concat(n,")."));var r=e.digits,i=r.length-e.integerLen,o=Math.min(Math.max(t,i),n),a=o+e.integerLen,s=r[a];if(a>0){r.splice(Math.max(e.integerLen,a));for(var l=a;l<r.length;l++)r[l]=0}else{i=Math.max(0,i),e.integerLen=1,r.length=Math.max(1,a=o+1),r[0]=0;for(var u=1;u<a;u++)r[u]=0}if(s>=5)if(a-1<0){for(var c=0;c>a;c--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[a-1]++;for(;i<Math.max(0,o);i++)r.push(0);var d=0!==o,h=t+e.integerLen,p=r.reduceRight(function(e,t,n,r){return r[n]=(t+=e)<10?t:t-10,d&&(0===r[n]&&n>=h?r.pop():d=!1),t>=10?1:0},0);p&&(r.unshift(p),e.integerLen++)}(u,d,h);var v=u.digits,y=u.integerLen,b=u.exponent,_=[];for(l=v.every(function(e){return!e});y<c;y++)v.unshift(0);for(;y<0;y++)v.unshift(0);y>0?_=v.splice(y,v.length):(_=v,v=[0]);var w=[];for(v.length>=t.lgSize&&w.unshift(v.splice(-t.lgSize,v.length).join(""));v.length>t.gSize;)w.unshift(v.splice(-t.gSize,v.length).join(""));v.length&&w.unshift(v.join("")),s=w.join(t_(n,r)),_.length&&(s+=t_(n,i)+_.join("")),b&&(s+=t_(n,Kb.Exponential)+"+"+b)}else s=t_(n,Kb.Infinity);return s=e<0&&!l?t.negPre+s+t.negSuf:t.posPre+s+t.posSuf}(e,o,t,Kb.CurrencyGroup,Kb.CurrencyDecimal,i).replace("\xa4",n).replace("\xa4","").trim()}(function(e){if("string"==typeof e&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if("number"!=typeof e)throw new Error(e+" is not a number");return e}(t),o,a,n,i)}catch(s){throw Y_(e,s.message)}}}]),e}()).\u0275fac=function(e){return new(e||X_)(Qf(Ry),Qf(Vy))},X_.\u0275pipe=Jl({name:"currency",type:X_,pure:!0}),X_),lw=((Z_=function e(){is(this,e)}).\u0275mod=Wl({type:Z_}),Z_.\u0275inj=hl({factory:function(e){return new(e||Z_)},providers:[{provide:A_,useClass:I_}]}),Z_),uw=((K_=function e(){is(this,e)}).\u0275prov=dl({token:K_,providedIn:"root",factory:function(){return new cw(md(Cb),window,md(dh))}}),K_),cw=function(){function e(t,n,r){is(this,e),this.document=t,this.window=n,this.errorHandler=r,this.offset=function(){return[0,0]}}return as(e,[{key:"setOffset",value:function(e){this.offset=Array.isArray(e)?function(){return e}:e}},{key:"getScrollPosition",value:function(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}},{key:"scrollToPosition",value:function(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}},{key:"scrollToAnchor",value:function(e){if(this.supportsScrolling()){var t=this.document.getElementById(e)||this.document.getElementsByName(e)[0];t&&this.scrollToElement(t)}}},{key:"setHistoryScrollRestoration",value:function(e){if(this.supportScrollRestoration()){var t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}},{key:"scrollToElement",value:function(e){var t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(n-i[0],r-i[1])}},{key:"supportScrollRestoration",value:function(){try{if(!this.supportsScrolling())return!1;var e=dw(this.window.history)||dw(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(t){return!1}}},{key:"supportsScrolling",value:function(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(e){return!1}}}]),e}();function dw(e){return Object.getOwnPropertyDescriptor(e,"scrollRestoration")}var hw,pw,fw,mw,gw=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"getProperty",value:function(e,t){return e[t]}},{key:"log",value:function(e){window.console&&window.console.log&&window.console.log(e)}},{key:"logGroup",value:function(e){window.console&&window.console.group&&window.console.group(e)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}}},{key:"dispatchEvent",value:function(e,t){e.dispatchEvent(t)}},{key:"remove",value:function(e){return e.parentNode&&e.parentNode.removeChild(e),e}},{key:"getValue",value:function(e){return e.value}},{key:"createElement",value:function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(e){return e.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(e){return e instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(e){var t,n=vw||(vw=document.querySelector("base"))?vw.getAttribute("href"):null;return null==n?null:(t=n,hw||(hw=document.createElement("a")),hw.setAttribute("href",t),"/"===hw.pathname.charAt(0)?hw.pathname:"/"+hw.pathname)}},{key:"resetBaseElement",value:function(){vw=null}},{key:"getUserAgent",value:function(){return window.navigator.userAgent}},{key:"performanceNow",value:function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}},{key:"supportsCookies",value:function(){return!0}},{key:"getCookie",value:function(e){return T_(document.cookie,e)}}],[{key:"makeCurrent",value:function(){var e;e=new n,bb||(bb=e)}}]),n}(function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.call(this)}return as(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(function(){return function e(){is(this,e)}}())),vw=null,yw=new $c("TRANSITION_ID"),bw=[{provide:xy,useFactory:function(e,t,n){return function(){n.get(Sy).donePromise.then(function(){var n=_b();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter(function(t){return t.getAttribute("ng-transition")===e}).forEach(function(e){return n.remove(e)})})}},deps:[yw,Cb,kf],multi:!0}],_w=function(){function e(){is(this,e)}return as(e,[{key:"addToWindow",value:function(e){Ol.getAngularTestability=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},Ol.getAllAngularTestabilities=function(){return e.getAllTestabilities()},Ol.getAllAngularRootElements=function(){return e.getAllRootElements()},Ol.frameworkStabilizers||(Ol.frameworkStabilizers=[]),Ol.frameworkStabilizers.push(function(e){var t=Ol.getAllAngularTestabilities(),n=t.length,r=!1,i=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(i)})})}},{key:"findTestabilityInTree",value:function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return null!=r?r:n?_b().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){var t;t=new e,eb=t}}]),e}(),ww=new $c("EventManagerPlugins"),Cw=((pw=function(){function e(t,n){var r=this;is(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach(function(e){return e.manager=r}),this._plugins=t.slice().reverse()}return as(e,[{key:"addEventListener",value:function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}},{key:"addGlobalEventListener",value:function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,r=0;r<n.length;r++){var i=n[r];if(i.supports(e))return this._eventNameToPlugin.set(e,i),i}throw new Error("No event manager plugin found for event "+e)}}]),e}()).\u0275fac=function(e){return new(e||pw)(md(ww),md(Hy))},pw.\u0275prov=dl({token:pw,factory:pw.\u0275fac}),pw),xw=function(){function e(t){is(this,e),this._doc=t}return as(e,[{key:"addGlobalEventListener",value:function(e,t,n){var r=_b().getGlobalEventTarget(this._doc,e);if(!r)throw new Error("Unsupported event target ".concat(r," for event ").concat(t));return this.addEventListener(r,t,n)}}]),e}(),Sw=((mw=function(){function e(){is(this,e),this._stylesSet=new Set}return as(e,[{key:"addStyles",value:function(e){var t=this,n=new Set;e.forEach(function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))}),this.onStylesAdded(n)}},{key:"onStylesAdded",value:function(e){}},{key:"getAllStyles",value:function(){return Array.from(this._stylesSet)}}]),e}()).\u0275fac=function(e){return new(e||mw)},mw.\u0275prov=dl({token:mw,factory:mw.\u0275fac}),mw),Pw=((fw=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this))._doc=e,r._hostNodes=new Set,r._styleNodes=new Set,r._hostNodes.add(e.head),r}return as(n,[{key:"_addStylesToHost",value:function(e,t){var n=this;e.forEach(function(e){var r=n._doc.createElement("style");r.textContent=e,n._styleNodes.add(t.appendChild(r))})}},{key:"addHost",value:function(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}},{key:"removeHost",value:function(e){this._hostNodes.delete(e)}},{key:"onStylesAdded",value:function(e){var t=this;this._hostNodes.forEach(function(n){return t._addStylesToHost(e,n)})}},{key:"ngOnDestroy",value:function(){this._styleNodes.forEach(function(e){return _b().remove(e)})}}]),n}(Sw)).\u0275fac=function(e){return new(e||fw)(md(Cb))},fw.\u0275prov=dl({token:fw,factory:fw.\u0275fac}),fw),kw={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ew=/%COMP%/g;function Aw(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?Aw(e,i,n):(i=i.replace(Ew,e),n.push(i))}return n}function Iw(e){return function(t){if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var Tw,Ow,Rw,Vw,Dw,Nw,Lw=((Tw=function(){function e(t,n,r){is(this,e),this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new Fw(t)}return as(e,[{key:"createRenderer",value:function(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case kl.Emulated:var n=this.rendererByCompId.get(t.id);return n||(n=new Mw(this.eventManager,this.sharedStylesHost,t,this.appId),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n;case 1:case kl.ShadowDom:return new qw(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){var r=Aw(t.id,t.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}},{key:"begin",value:function(){}},{key:"end",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||Tw)(md(Cw),md(Pw),md(Py))},Tw.\u0275prov=dl({token:Tw,factory:Tw.\u0275fac}),Tw),Fw=function(){function e(t){is(this,e),this.eventManager=t,this.data=Object.create(null)}return as(e,[{key:"destroy",value:function(){}},{key:"createElement",value:function(e,t){return t?document.createElementNS(kw[t]||t,e):document.createElement(e)}},{key:"createComment",value:function(e){return document.createComment(e)}},{key:"createText",value:function(e){return document.createTextNode(e)}},{key:"appendChild",value:function(e,t){e.appendChild(t)}},{key:"insertBefore",value:function(e,t,n){e&&e.insertBefore(t,n)}},{key:"removeChild",value:function(e,t){e&&e.removeChild(t)}},{key:"selectRootElement",value:function(e,t){var n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error('The selector "'.concat(e,'" did not match any elements'));return t||(n.textContent=""),n}},{key:"parentNode",value:function(e){return e.parentNode}},{key:"nextSibling",value:function(e){return e.nextSibling}},{key:"setAttribute",value:function(e,t,n,r){if(r){t=r+":"+t;var i=kw[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}},{key:"removeAttribute",value:function(e,t,n){if(n){var r=kw[n];r?e.removeAttributeNS(r,t):e.removeAttribute("".concat(n,":").concat(t))}else e.removeAttribute(t)}},{key:"addClass",value:function(e,t){e.classList.add(t)}},{key:"removeClass",value:function(e,t){e.classList.remove(t)}},{key:"setStyle",value:function(e,t,n,r){r&(yh.DashCase|yh.Important)?e.style.setProperty(t,n,r&yh.Important?"important":""):e.style[t]=n}},{key:"removeStyle",value:function(e,t,n){n&yh.DashCase?e.style.removeProperty(t):e.style[t]=""}},{key:"setProperty",value:function(e,t,n){e[t]=n}},{key:"setValue",value:function(e,t){e.nodeValue=t}},{key:"listen",value:function(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Iw(n)):this.eventManager.addEventListener(e,t,Iw(n))}}]),e}(),Mw=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;is(this,n),(a=t.call(this,e)).component=i;var s=Aw(o+"-"+i.id,i.styles,[]);return r.addStyles(s),a.contentAttr="_ngcontent-%COMP%".replace(Ew,o+"-"+i.id),a.hostAttr="_nghost-%COMP%".replace(Ew,o+"-"+i.id),a}return as(n,[{key:"applyToHost",value:function(e){Ya(rs(n.prototype),"setAttribute",this).call(this,e,this.hostAttr,"")}},{key:"createElement",value:function(e,t){var r=Ya(rs(n.prototype),"createElement",this).call(this,e,t);return Ya(rs(n.prototype),"setAttribute",this).call(this,r,this.contentAttr,""),r}}]),n}(Fw),qw=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;is(this,n),(a=t.call(this,e)).sharedStylesHost=r,a.hostEl=i,a.shadowRoot=i.attachShadow({mode:"open"}),a.sharedStylesHost.addHost(a.shadowRoot);for(var s=Aw(o.id,o.styles,[]),l=0;l<s.length;l++){var u=document.createElement("style");u.textContent=s[l],a.shadowRoot.appendChild(u)}return a}return as(n,[{key:"nodeOrShadowRoot",value:function(e){return e===this.hostEl?this.shadowRoot:e}},{key:"destroy",value:function(){this.sharedStylesHost.removeHost(this.shadowRoot)}},{key:"appendChild",value:function(e,t){return Ya(rs(n.prototype),"appendChild",this).call(this,this.nodeOrShadowRoot(e),t)}},{key:"insertBefore",value:function(e,t,r){return Ya(rs(n.prototype),"insertBefore",this).call(this,this.nodeOrShadowRoot(e),t,r)}},{key:"removeChild",value:function(e,t){return Ya(rs(n.prototype),"removeChild",this).call(this,this.nodeOrShadowRoot(e),t)}},{key:"parentNode",value:function(e){return this.nodeOrShadowRoot(Ya(rs(n.prototype),"parentNode",this).call(this,this.nodeOrShadowRoot(e)))}}]),n}(Fw),jw=((Ow=function(e){Ka(n,e);var t=Xa(n);function n(e){return is(this,n),t.call(this,e)}return as(n,[{key:"supports",value:function(e){return!0}},{key:"addEventListener",value:function(e,t,n){var r=this;return e.addEventListener(t,n,!1),function(){return r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){return e.removeEventListener(t,n)}}]),n}(xw)).\u0275fac=function(e){return new(e||Ow)(md(Cb))},Ow.\u0275prov=dl({token:Ow,factory:Ow.\u0275fac}),Ow),Bw=["alt","control","meta","shift"],zw={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Uw={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},Hw={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},Qw=((Dw=function(e){Ka(n,e);var t=Xa(n);function n(e){return is(this,n),t.call(this,e)}return as(n,[{key:"supports",value:function(e){return null!=n.parseEventName(e)}},{key:"addEventListener",value:function(e,t,r){var i=n.parseEventName(t),o=n.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return _b().onAndCancel(e,i.domEventName,o)})}}],[{key:"parseEventName",value:function(e){var t=e.toLowerCase().split("."),r=t.shift();if(0===t.length||"keydown"!==r&&"keyup"!==r)return null;var i=n._normalizeKey(t.pop()),o="";if(Bw.forEach(function(e){var n=t.indexOf(e);n>-1&&(t.splice(n,1),o+=e+".")}),o+=i,0!=t.length||0===i.length)return null;var a={};return a.domEventName=r,a.fullKey=o,a}},{key:"getEventFullKey",value:function(e){var t="",n=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&Uw.hasOwnProperty(t)&&(t=Uw[t]))}return zw[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Bw.forEach(function(r){r!=n&&(0,Hw[r])(e)&&(t+=r+".")}),t+=n}},{key:"eventCallback",value:function(e,t,r){return function(i){n.getEventFullKey(i)===e&&r.runGuarded(function(){return t(i)})}}},{key:"_normalizeKey",value:function(e){switch(e){case"esc":return"escape";default:return e}}}]),n}(xw)).\u0275fac=function(e){return new(e||Dw)(md(Cb))},Dw.\u0275prov=dl({token:Dw,factory:Dw.\u0275fac}),Dw),Ww=((Vw=function e(){is(this,e)}).\u0275fac=function(e){return new(e||Vw)},Vw.\u0275prov=dl({factory:function(){return md(Gw)},token:Vw,providedIn:"root"}),Vw),Gw=((Rw=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this))._doc=e,r}return as(n,[{key:"sanitize",value:function(e,t){if(null==t)return null;switch(e){case rh.NONE:return t;case rh.HTML:return Ed(t,"HTML")?kd(t):th(this._doc,String(t));case rh.STYLE:return Ed(t,"Style")?kd(t):t;case rh.SCRIPT:if(Ed(t,"Script"))return kd(t);throw new Error("unsafe value used in a script context");case rh.URL:return Ad(t),Ed(t,"URL")?kd(t):Fd(String(t));case rh.RESOURCE_URL:if(Ed(t,"ResourceURL"))return kd(t);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(e," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(e){return new wd(e)}},{key:"bypassSecurityTrustStyle",value:function(e){return new Cd(e)}},{key:"bypassSecurityTrustScript",value:function(e){return new xd(e)}},{key:"bypassSecurityTrustUrl",value:function(e){return new Sd(e)}},{key:"bypassSecurityTrustResourceUrl",value:function(e){return new Pd(e)}}]),n}(Ww)).\u0275fac=function(e){return new(e||Rw)(md(Cb))},Rw.\u0275prov=dl({factory:function(){return e=md(cf),new Gw(e.get(Cb));var e},token:Rw,providedIn:"root"}),Rw),$w=rb(mb,"browser",[{provide:Iy,useValue:"browser"},{provide:Ay,useValue:function(){gw.makeCurrent(),_w.init()},multi:!0},{provide:Cb,useFactory:function(){return function(e){mu=e}(document),document},deps:[]}]),Jw=[[],{provide:hf,useValue:"root"},{provide:dh,useFactory:function(){return new dh},deps:[]},{provide:ww,useClass:jw,multi:!0,deps:[Cb,Hy,Iy]},{provide:ww,useClass:Qw,multi:!0,deps:[Cb]},[],{provide:Lw,useClass:Lw,deps:[Cw,Pw,Py]},{provide:Kg,useExisting:Lw},{provide:Sw,useExisting:Pw},{provide:Pw,useClass:Pw,deps:[Cb]},{provide:Zy,useClass:Zy,deps:[Hy]},{provide:Cw,useClass:Cw,deps:[ww,Hy]},[]],Yw=((Nw=function(){function e(t){if(is(this,e),t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return as(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:Py,useValue:t.appId},{provide:yw,useExisting:Py},bw]}}}]),e}()).\u0275mod=Wl({type:Nw}),Nw.\u0275inj=hl({factory:function(e){return new(e||Nw)(md(Nw,12))},providers:Jw,imports:[lw,vb]}),Nw);"undefined"!=typeof window&&window;var Kw=function e(){is(this,e)};function Zw(e,t){return{type:7,name:e,definitions:t,options:{}}}function Xw(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:t,timings:e}}function eC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function tC(e){return{type:6,styles:e,offset:null}}function nC(e,t,n){return{type:0,name:e,styles:t,options:n}}function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:e,animation:t,options:n}}function iC(e){Promise.resolve(null).then(e)}var oC=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;is(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+n}return as(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var e=this;iC(function(){return e._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(e){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}(),aC=function(){function e(t){var n=this;is(this,e),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var r=0,i=0,o=0,a=this.players.length;0==a?iC(function(){return n._onFinish()}):this.players.forEach(function(e){e.onDone(function(){++r==a&&n._onFinish()}),e.onDestroy(function(){++i==a&&n._onDestroy()}),e.onStart(function(){++o==a&&n._onStart()})}),this.totalTime=this.players.reduce(function(e,t){return Math.max(e,t.totalTime)},0)}return as(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(e){return e.init()})}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[])}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(e){return e.play()})}},{key:"pause",value:function(){this.players.forEach(function(e){return e.pause()})}},{key:"restart",value:function(){this.players.forEach(function(e){return e.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(e){return e.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(e){return e.destroy()}),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(e){return e.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(e){var t=e*this.totalTime;this.players.forEach(function(e){var n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}},{key:"getPosition",value:function(){var e=0;return this.players.forEach(function(t){var n=t.getPosition();e=Math.min(n,e)}),e}},{key:"beforeDestroy",value:function(){this.players.forEach(function(e){e.beforeDestroy&&e.beforeDestroy()})}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}();function sC(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function lC(e){switch(e.length){case 0:return new oC;case 1:return e[0];default:return new aC(e)}}function uC(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],s=[],l=-1,u=null;if(r.forEach(function(e){var n=e.offset,r=n==l,c=r&&u||{};Object.keys(e).forEach(function(n){var r=n,s=e[n];if("offset"!==n)switch(r=t.normalizePropertyName(r,a),s){case"!":s=i[n];break;case"*":s=o[n];break;default:s=t.normalizeStyleValue(n,r,s,a)}c[r]=s}),r||s.push(c),u=c,l=n}),a.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(a.join(c)))}return s}function cC(e,t,n,r){switch(t){case"start":e.onStart(function(){return r(n&&dC(n,"start",e))});break;case"done":e.onDone(function(){return r(n&&dC(n,"done",e))});break;case"destroy":e.onDestroy(function(){return r(n&&dC(n,"destroy",e))})}}function dC(e,t,n){var r=n.totalTime,i=hC(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==r?e.totalTime:r,!!n.disabled),o=e._data;return null!=o&&(i._data=o),i}function hC(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;return{element:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!a}}function pC(e,t,n){var r;return e instanceof Map?(r=e.get(t))||e.set(t,r=n):(r=e[t])||(r=e[t]=n),r}function fC(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var mC=function(e,t){return!1},gC=function(e,t){return!1},vC=function(e,t,n){return[]},yC=sC();(yC||"undefined"!=typeof Element)&&(mC=function(e,t){return e.contains(t)},gC=function(){if(yC||Element.prototype.matches)return function(e,t){return e.matches(t)};var e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?function(e,n){return t.apply(e,[n])}:gC}(),vC=function(e,t,n){var r=[];if(n)for(var i=e.querySelectorAll(t),o=0;o<i.length;o++)r.push(i[o]);else{var a=e.querySelector(t);a&&r.push(a)}return r});var bC=null,_C=!1;function wC(e){bC||(bC=("undefined"!=typeof document?document.body:null)||{},_C=!!bC.style&&"WebkitAppearance"in bC.style);var t=!0;return bC.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(!(t=e in bC.style)&&_C)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in bC.style),t}var CC=gC,xC=mC,SC=vC;function PC(e){var t={};return Object.keys(e).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=e[n]}),t}var kC,EC=((kC=function(){function e(){is(this,e)}return as(e,[{key:"validateStyleProperty",value:function(e){return wC(e)}},{key:"matchesElement",value:function(e,t){return CC(e,t)}},{key:"containsElement",value:function(e,t){return xC(e,t)}},{key:"query",value:function(e,t,n){return SC(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return n||""}},{key:"animate",value:function(e,t,n,r,i){return new oC(n,r)}}]),e}()).\u0275fac=function(e){return new(e||kC)},kC.\u0275prov=dl({token:kC,factory:kC.\u0275fac}),kC),AC=function(){var e=function e(){is(this,e)};return e.NOOP=new EC,e}();function IC(e){if("number"==typeof e)return e;var t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:TC(parseFloat(t[1]),t[2])}function TC(e,t){switch(t){case"s":return 1e3*e;default:return e}}function OC(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){var r,i=0,o="";if("string"==typeof e){var a=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push('The provided timing value "'.concat(e,'" is invalid.')),{duration:0,delay:0,easing:""};r=TC(parseFloat(a[1]),a[2]);var s=a[3];null!=s&&(i=TC(parseFloat(s),a[4]));var l=a[5];l&&(o=l)}else r=e;if(!n){var u=!1,c=t.length;r<0&&(t.push("Duration values below 0 are not allowed for this animation step."),u=!0),i<0&&(t.push("Delay values below 0 are not allowed for this animation step."),u=!0),u&&t.splice(c,0,'The provided timing value "'.concat(e,'" is invalid.'))}return{duration:r,delay:i,easing:o}}(e,t,n)}function RC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function VC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)for(var r in e)n[r]=e[r];else RC(e,n);return n}function DC(e,t,n){return n?t+":"+n+";":""}function NC(e){for(var t="",n=0;n<e.style.length;n++){var r=e.style.item(n);t+=DC(0,r,e.style.getPropertyValue(r))}for(var i in e.style)e.style.hasOwnProperty(i)&&!i.startsWith("_")&&(t+=DC(0,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.style[i]));e.setAttribute("style",t)}function LC(e,t,n){e.style&&(Object.keys(t).forEach(function(r){var i=HC(r);n&&!n.hasOwnProperty(r)&&(n[r]=e.style[i]),e.style[i]=t[r]}),sC()&&NC(e))}function FC(e,t){e.style&&(Object.keys(t).forEach(function(t){var n=HC(t);e.style[n]=""}),sC()&&NC(e))}function MC(e){return Array.isArray(e)?1==e.length?e[0]:eC(e):e}var qC=new RegExp("{{\\s*(.+?)\\s*}}","g");function jC(e){var t=[];if("string"==typeof e){for(var n;n=qC.exec(e);)t.push(n[1]);qC.lastIndex=0}return t}function BC(e,t,n){var r=e.toString(),i=r.replace(qC,function(e,r){var i=t[r];return t.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),i=""),i.toString()});return i==r?e:i}function zC(e){for(var t=[],n=e.next();!n.done;)t.push(n.value),n=e.next();return t}var UC=/-+([a-z0-9])/g;function HC(e){return e.replace(UC,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t[1].toUpperCase()})}function QC(e,t){return 0===e||0===t}function WC(e,t,n){var r=Object.keys(n);if(r.length&&t.length){var i=t[0],o=[];if(r.forEach(function(e){i.hasOwnProperty(e)||o.push(e),i[e]=n[e]}),o.length)for(var a=function(){var n=t[s];o.forEach(function(t){n[t]=$C(e,t)})},s=1;s<t.length;s++)a()}return t}function GC(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function $C(e,t){return window.getComputedStyle(e)[t]}var JC=new Set(["true","1"]),YC=new Set(["false","0"]);function KC(e,t){var n=JC.has(e)||YC.has(e),r=JC.has(t)||YC.has(t);return function(i,o){var a="*"==e||e==i,s="*"==t||t==o;return!a&&n&&"boolean"==typeof i&&(a=i?JC.has(e):YC.has(e)),!s&&r&&"boolean"==typeof o&&(s=o?JC.has(t):YC.has(t)),a&&s}}var ZC=new RegExp("s*:selfs*,?","g");function XC(e,t,n){return new ex(e).build(t,n)}var ex=function(){function e(t){is(this,e),this._driver=t}return as(e,[{key:"build",value:function(e,t){var n=new tx(t);return this._resetContextStyleTimingState(n),GC(this,MC(e),n)}},{key:"_resetContextStyleTimingState",value:function(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}},{key:"visitTrigger",value:function(e,t){var n=this,r=t.queryCount=0,i=t.depCount=0,o=[],a=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(function(e){if(n._resetContextStyleTimingState(t),0==e.type){var s=e,l=s.name;l.toString().split(/\s*,\s*/).forEach(function(e){s.name=e,o.push(n.visitState(s,t))}),s.name=l}else if(1==e.type){var u=n.visitTransition(e,t);r+=u.queryCount,i+=u.depCount,a.push(u)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:o,transitions:a,queryCount:r,depCount:i,options:null}}},{key:"visitState",value:function(e,t){var n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){var i=new Set,o=r||{};if(n.styles.forEach(function(e){if(nx(e)){var t=e;Object.keys(t).forEach(function(e){jC(t[e]).forEach(function(e){o.hasOwnProperty(e)||i.add(e)})})}}),i.size){var a=zC(i.values());t.errors.push('state("'.concat(e.name,'", ...) must define default values for all the following style substitutions: ').concat(a.join(", ")))}}return{type:0,name:e.name,style:n,options:r?{params:r}:null}}},{key:"visitTransition",value:function(e,t){t.queryCount=0,t.depCount=0;var n,r,i,o=GC(this,MC(e.animation),t);return{type:1,matchers:(n=e.expr,r=t.errors,i=[],"string"==typeof n?n.split(/\s*,\s*/).forEach(function(e){return function(e,t,n){if(":"==e[0]){var r=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t)<parseFloat(e)};default:return t.push('The transition alias value "'.concat(e,'" is not supported')),"* => *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}var i=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'.concat(e,'" is not supported')),t;var o=i[1],a=i[2],s=i[3];t.push(KC(o,s)),"<"!=a[0]||"*"==o&&"*"==s||t.push(KC(s,o))}(e,i,r)}):i.push(n),i),animation:o,queryCount:t.queryCount,depCount:t.depCount,options:rx(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return GC(n,e,t)}),options:rx(e.options)}}},{key:"visitGroup",value:function(e,t){var n=this,r=t.currentTime,i=0,o=e.steps.map(function(e){t.currentTime=r;var o=GC(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:rx(e.options)}}},{key:"visitAnimate",value:function(e,t){var n,r=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return ix(OC(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=ix(0,0,"");return i.dynamic=!0,i.strValue=r,i}return ix((n=n||OC(r,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=r;var i=e.styles?e.styles:tC({});if(5==i.type)n=this.visitKeyframes(i,t);else{var o=e.styles,a=!1;if(!o){a=!0;var s={};r.easing&&(s.easing=r.easing),o=tC(s)}t.currentTime+=r.duration+r.delay;var l=this.visitStyle(o,t);l.isEmptyStep=a,n=l}return t.currentAnimateTimings=null,{type:4,timings:r,style:n,options:null}}},{key:"visitStyle",value:function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}},{key:"_makeStyleAst",value:function(e,t){var n=[];Array.isArray(e.styles)?e.styles.forEach(function(e){"string"==typeof e?"*"==e?n.push(e):t.errors.push("The provided style string value ".concat(e," is not allowed.")):n.push(e)}):n.push(e.styles);var r=!1,i=null;return n.forEach(function(e){if(nx(e)){var t=e,n=t.easing;if(n&&(i=n,delete t.easing),!r)for(var o in t)if(t[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:e.offset,containsDynamicStyles:r,options:null}}},{key:"_validateStyleAst",value:function(e,t){var n=this,r=t.currentAnimateTimings,i=t.currentTime,o=t.currentTime;r&&o>0&&(o-=r.duration+r.delay),e.styles.forEach(function(e){"string"!=typeof e&&Object.keys(e).forEach(function(r){if(n._driver.validateStyleProperty(r)){var a,s,l,u,c,d=t.collectedStyles[t.currentQuerySelector],h=d[r],p=!0;h&&(o!=i&&o>=h.startTime&&i<=h.endTime&&(t.errors.push('The CSS property "'.concat(r,'" that exists between the times of "').concat(h.startTime,'ms" and "').concat(h.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(o,'ms" and "').concat(i,'ms"')),p=!1),o=h.startTime),p&&(d[r]={startTime:o,endTime:i}),t.options&&(a=e[r],s=t.options,l=t.errors,u=s.params||{},(c=jC(a)).length&&c.forEach(function(e){u.hasOwnProperty(e)||l.push("Unable to resolve the local animation param ".concat(e," in the given list of values"))}))}else t.errors.push('The provided animation property "'.concat(r,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(e,t){var n=this,r={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],a=!1,s=!1,l=0,u=e.steps.map(function(e){var r=n._makeStyleAst(e,t),u=null!=r.offset?r.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach(function(e){if(nx(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(nx(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(r.styles),c=0;return null!=u&&(i++,c=r.offset=u),s=s||c<0||c>1,a=a||c<l,l=c,o.push(c),r});s&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),a&&t.errors.push("Please ensure that all keyframe offsets are in order");var c=e.steps.length,d=0;i>0&&i<c?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(d=1/(c-1));var h=c-1,p=t.currentTime,f=t.currentAnimateTimings,m=f.duration;return u.forEach(function(e,i){var a=d>0?i==h?1:d*i:o[i],s=a*m;t.currentTime=p+f.delay+s,f.duration=s,n._validateStyleAst(e,t),e.offset=a,r.styles.push(e)}),r}},{key:"visitReference",value:function(e,t){return{type:8,animation:GC(this,MC(e.animation),t),options:rx(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:rx(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:rx(e.options)}}},{key:"visitQuery",value:function(e,t){var n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;var i=Ua(function(e){var t=!!e.split(/\s*,\s*/).find(function(e){return":self"==e});return t&&(e=e.replace(ZC,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),o=i[0],a=i[1];t.currentQuerySelector=n.length?n+" "+o:o,pC(t.collectedStyles,t.currentQuerySelector,{});var s=GC(this,MC(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:s,originalSelector:e.selector,options:rx(e.options)}}},{key:"visitStagger",value:function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:OC(e.timings,t.errors,!0);return{type:12,animation:GC(this,MC(e.animation),t),timings:n,options:null}}}]),e}(),tx=function e(t){is(this,e),this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function nx(e){return!Array.isArray(e)&&"object"==typeof e}function rx(e){var t;return e?(e=RC(e)).params&&(e.params=(t=e.params)?RC(t):null):e={},e}function ix(e,t,n){return{duration:e,delay:t,easing:n}}function ox(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:a,subTimeline:s}}var ax=function(){function e(){is(this,e),this._map=new Map}return as(e,[{key:"consume",value:function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t}},{key:"append",value:function(e,t){var n,r=this._map.get(e);r||this._map.set(e,r=[]),(n=r).push.apply(n,Ha(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),sx=new RegExp(":enter","g"),lx=new RegExp(":leave","g");function ux(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new cx).buildKeyframes(e,t,n,r,i,o,a,s,l,u)}var cx=function(){function e(){is(this,e)}return as(e,[{key:"buildKeyframes",value:function(e,t,n,r,i,o,a,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new ax;var c=new hx(e,t,l,r,i,u,[]);c.options=s,c.currentTimeline.setStyles([o],null,c.errors,s),GC(this,n,c);var d=c.timelines.filter(function(e){return e.containsAnimation()});if(d.length&&Object.keys(a).length){var h=d[d.length-1];h.allowOnlyTimelineStyles()||h.setStyles([a],null,c.errors,s)}return d.length?d.map(function(e){return e.buildKeyframes()}):[ox(t,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(e,t){}},{key:"visitState",value:function(e,t){}},{key:"visitTransition",value:function(e,t){}},{key:"visitAnimateChild",value:function(e,t){var n=t.subInstructions.consume(t.element);if(n){var r=t.createSubContext(e.options),i=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}},{key:"visitAnimateRef",value:function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}},{key:"_visitSubInstructions",value:function(e,t,n){var r=t.currentTimeline.currentTime,i=null!=n.duration?IC(n.duration):null,o=null!=n.delay?IC(n.delay):null;return 0!==i&&e.forEach(function(e){var n=t.appendInstructionToTimeline(e,i,o);r=Math.max(r,n.duration+n.delay)}),r}},{key:"visitReference",value:function(e,t){t.updateOptions(e.options,!0),GC(this,e.animation,t),t.previousNode=e}},{key:"visitSequence",value:function(e,t){var n=this,r=t.subContextCount,i=t,o=e.options;if(o&&(o.params||o.delay)&&((i=t.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=dx);var a=IC(o.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(function(e){return GC(n,e,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),t.previousNode=e}},{key:"visitGroup",value:function(e,t){var n=this,r=[],i=t.currentTimeline.currentTime,o=e.options&&e.options.delay?IC(e.options.delay):0;e.steps.forEach(function(a){var s=t.createSubContext(e.options);o&&s.delayNextStep(o),GC(n,a,s),i=Math.max(i,s.currentTimeline.currentTime),r.push(s.currentTimeline)}),r.forEach(function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)}),t.transformIntoNewTimeline(i),t.previousNode=e}},{key:"_visitTiming",value:function(e,t){if(e.dynamic){var n=e.strValue;return OC(t.params?BC(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}},{key:"visitAnimate",value:function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());var i=e.style;5==i.type?this.visitKeyframes(i,t):(t.incrementTime(n.duration),this.visitStyle(i,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}},{key:"visitStyle",value:function(e,t){var n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(i):n.setStyles(e.styles,i,t.errors,t.options),t.previousNode=e}},{key:"visitKeyframes",value:function(e,t){var n=t.currentAnimateTimings,r=t.currentTimeline.duration,i=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(function(e){o.forwardTime((e.offset||0)*i),o.setStyles(e.styles,e.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+i),t.previousNode=e}},{key:"visitQuery",value:function(e,t){var n=this,r=t.currentTimeline.currentTime,i=e.options||{},o=i.delay?IC(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=dx);var a=r,s=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=s.length;var l=null;s.forEach(function(r,i){t.currentQueryIndex=i;var s=t.createSubContext(e.options,r);o&&s.delayNextStep(o),r===t.element&&(l=s.currentTimeline),GC(n,e.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}},{key:"visitStagger",value:function(e,t){var n=t.parentContext,r=t.currentTimeline,i=e.timings,o=Math.abs(i.duration),a=o*(t.currentQueryTotal-1),s=o*t.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var l=t.currentTimeline;s&&l.delayNextStep(s);var u=l.currentTime;GC(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-u+(r.startTime-n.currentTimeline.startTime)}}]),e}(),dx={},hx=function(){function e(t,n,r,i,o,a,s,l){is(this,e),this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=dx,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new px(this._driver,n,0),s.push(this.currentTimeline)}return as(e,[{key:"updateOptions",value:function(e,t){var n=this;if(e){var r=e,i=this.options;null!=r.duration&&(i.duration=IC(r.duration)),null!=r.delay&&(i.delay=IC(r.delay));var o=r.params;if(o){var a=i.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(e){t&&a.hasOwnProperty(e)||(a[e]=BC(o[e],a,n.errors))})}}}},{key:"_copyOptions",value:function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach(function(e){n[e]=t[e]})}}return e}},{key:"createSubContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(e){return this.previousNode=dx,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(e,t,n){var r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},i=new fx(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(i),r}},{key:"incrementTime",value:function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}},{key:"delayNextStep",value:function(e){e>0&&this.currentTimeline.delayNextStep(e)}},{key:"invokeQuery",value:function(e,t,n,r,i,o){var a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(sx,"."+this._enterClassName)).replace(lx,"."+this._leaveClassName);var s=this._driver.query(this.element,e,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),a.push.apply(a,Ha(s))}return i||0!=a.length||o.push('`query("'.concat(t,'")` returned zero elements. (Use `query("').concat(t,'", { optional: true })` if you wish to allow this.)')),a}},{key:"params",get:function(){return this.options.params}}]),e}(),px=function(){function e(t,n,r,i){is(this,e),this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return as(e,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}},{key:"fork",value:function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}},{key:"_updateStyle",value:function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(e){var t=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(function(e){t._backFill[e]=t._globalTimelineStyles[e]||"*",t._currentKeyframe[e]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(e,t,n,r){var i=this;t&&(this._previousKeyframe.easing=t);var o=r&&r.params||{},a=function(e,t){var n,r={};return e.forEach(function(e){"*"===e?(n=n||Object.keys(t)).forEach(function(e){r[e]="*"}):VC(e,!1,r)}),r}(e,this._globalTimelineStyles);Object.keys(a).forEach(function(e){var t=BC(a[e],o,n);i._pendingStyles[e]=t,i._localTimelineStyles.hasOwnProperty(e)||(i._backFill[e]=i._globalTimelineStyles.hasOwnProperty(e)?i._globalTimelineStyles[e]:"*"),i._updateStyle(e,t)})}},{key:"applyStylesToKeyframe",value:function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){e._currentKeyframe[n]=t[n]}),Object.keys(this._localTimelineStyles).forEach(function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])}))}},{key:"snapshotCurrentStyles",value:function(){var e=this;Object.keys(this._localTimelineStyles).forEach(function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(e){var t=this;Object.keys(e._styleSummary).forEach(function(n){var r=t._styleSummary[n],i=e._styleSummary[n];(!r||i.time>r.time)&&t._updateStyle(n,i.value)})}},{key:"buildKeyframes",value:function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,a){var s=VC(o,!0);Object.keys(s).forEach(function(e){var r=s[e];"!"==r?t.add(e):"*"==r&&n.add(e)}),r||(s.offset=a/e.duration),i.push(s)});var o=t.size?zC(t.values()):[],a=n.size?zC(n.values()):[];if(r){var s=i[0],l=RC(s);s.offset=0,l.offset=1,i=[s,l]}return ox(this.element,i,o,a,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}}]),e}(),fx=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a,s){var l,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return is(this,n),(l=t.call(this,e,r,s.delay)).element=r,l.keyframes=i,l.preStyleProps=o,l.postStyleProps=a,l._stretchStartingKeyframe=u,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return as(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var e=this.keyframes,t=this.timings,n=t.delay,r=t.duration,i=t.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=r+n,s=n/a,l=VC(e[0],!1);l.offset=0,o.push(l);var u=VC(e[0],!1);u.offset=mx(s),o.push(u);for(var c=e.length-1,d=1;d<=c;d++){var h=VC(e[d],!1);h.offset=mx((n+h.offset*r)/a),o.push(h)}r=a,n=0,i="",e=o}return ox(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)}}]),n}(px);function mx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,t-1);return Math.round(e*n)/n}var gx=function e(){is(this,e)},vx=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"normalizePropertyName",value:function(e,t){return HC(e)}},{key:"normalizeStyleValue",value:function(e,t,n,r){var i="",o=n.toString().trim();if(yx[t]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push("Please provide a CSS unit value for ".concat(e,":").concat(n))}return o+i}}]),n}(gx),yx=function(e){var t={};return e.forEach(function(e){return t[e]=!0}),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));function bx(e,t,n,r,i,o,a,s,l,u,c,d,h){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:a,timelines:s,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:d,errors:h}}var _x={},wx=function(){function e(t,n,r){is(this,e),this._triggerName=t,this.ast=n,this._stateStyles=r}return as(e,[{key:"match",value:function(e,t,n,r){return function(e,t,n,r,i){return e.some(function(e){return e(t,n,r,i)})}(this.ast.matchers,e,t,n,r)}},{key:"buildStyles",value:function(e,t,n){var r=this._stateStyles["*"],i=this._stateStyles[e],o=r?r.buildStyles(t,n):{};return i?i.buildStyles(t,n):o}},{key:"build",value:function(e,t,n,r,i,o,a,s,l,u){var c=[],d=this.ast.options&&this.ast.options.params||_x,h=this.buildStyles(n,a&&a.params||_x,c),p=s&&s.params||_x,f=this.buildStyles(r,p,c),m=new Set,g=new Map,v=new Map,y="void"===r,b={params:Object.assign(Object.assign({},d),p)},_=u?[]:ux(e,t,this.ast.animation,i,o,h,f,b,l,c),w=0;if(_.forEach(function(e){w=Math.max(e.duration+e.delay,w)}),c.length)return bx(t,this._triggerName,n,r,y,h,f,[],[],g,v,w,c);_.forEach(function(e){var n=e.element,r=pC(g,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=pC(v,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&m.add(n)});var C=zC(m.values());return bx(t,this._triggerName,n,r,y,h,f,_,C,g,v,w)}}]),e}(),Cx=function(){function e(t,n){is(this,e),this.styles=t,this.defaultParams=n}return as(e,[{key:"buildStyles",value:function(e,t){var n={},r=RC(this.defaultParams);return Object.keys(e).forEach(function(t){var n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(function(e){if("string"!=typeof e){var i=e;Object.keys(i).forEach(function(e){var o=i[e];o.length>1&&(o=BC(o,r,t)),n[e]=o})}}),n}}]),e}(),xx=function(){function e(t,n){var r=this;is(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(e){r.states[e.name]=new Cx(e.style,e.options&&e.options.params||{})}),Sx(this.states,"true","1"),Sx(this.states,"false","0"),n.transitions.forEach(function(e){r.transitionFactories.push(new wx(t,e,r.states))}),this.fallbackTransition=new wx(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return as(e,[{key:"matchTransition",value:function(e,t,n,r){return this.transitionFactories.find(function(i){return i.match(e,t,n,r)})||null}},{key:"matchStyles",value:function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),e}();function Sx(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var Px=new ax,kx=function(){function e(t,n,r){is(this,e),this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}return as(e,[{key:"register",value:function(e,t){var n=[],r=XC(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=r}},{key:"_buildPlayer",value:function(e,t,n){var r=e.element,i=uC(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(r,i,e.duration,e.delay,e.easing,[],!0)}},{key:"create",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[e],s=new Map;if(a?(n=ux(this._driver,t,a,"ng-enter","ng-leave",{},{},i,Px,o)).forEach(function(e){var t=pC(s,e.element,{});e.postStyleProps.forEach(function(e){return t[e]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));s.forEach(function(e,t){Object.keys(e).forEach(function(n){e[n]=r._driver.computeStyle(t,n,"*")})});var l=lC(n.map(function(e){var t=s.get(e.element);return r._buildPlayer(e,{},t)}));return this._playersById[e]=l,l.onDestroy(function(){return r.destroy(e)}),this.players.push(l),l}},{key:"destroy",value:function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}},{key:"listen",value:function(e,t,n,r){var i=hC(t,"","","");return cC(this._getPlayer(e),n,i,r),function(){}}},{key:"command",value:function(e,t,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(e);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,r[0]||{});else this.register(e,r[0])}}]),e}(),Ex=[],Ax={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ix={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Tx=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";is(this,e),this.namespaceId=n;var r,i=t&&t.hasOwnProperty("value");if(this.value=null!=(r=i?t.value:t)?r:null,i){var o=RC(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return as(e,[{key:"absorbOptions",value:function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach(function(e){null==n[e]&&(n[e]=t[e])})}}},{key:"params",get:function(){return this.options.params}}]),e}(),Ox=new Tx("void"),Rx=function(){function e(t,n,r){is(this,e),this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,qx(n,this._hostClassName)}return as(e,[{key:"listen",value:function(e,t,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(t,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(t,'" because the provided event is undefined!'));if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(t,'" is not supported!'));var a=pC(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};a.push(s);var l=pC(this._engine.statesByElement,e,{});return l.hasOwnProperty(t)||(qx(e,"ng-trigger"),qx(e,"ng-trigger-"+t),l[t]=Ox),function(){o._engine.afterFlush(function(){var e=a.indexOf(s);e>=0&&a.splice(e,1),o._triggers[t]||delete l[t]})}}},{key:"register",value:function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}},{key:"_getTrigger",value:function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'.concat(e,'" has not been registered!'));return t}},{key:"trigger",value:function(e,t,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(t),a=new Dx(this.id,t,e),s=this._engine.statesByElement.get(e);s||(qx(e,"ng-trigger"),qx(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var l=s[t],u=new Tx(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),s[t]=u,l||(l=Ox),"void"===u.value||l.value!==u.value){var c=pC(this._engine.playersByElement,e,[]);c.forEach(function(e){e.namespaceId==r.id&&e.triggerName==t&&e.queued&&e.destroy()});var d=o.matchTransition(l.value,u.value,e,u.params),h=!1;if(!d){if(!i)return;d=o.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:d,fromState:l,toState:u,player:a,isFallbackTransition:h}),h||(qx(e,"ng-animate-queued"),a.onStart(function(){jx(e,"ng-animate-queued")})),a.onDone(function(){var t=r.players.indexOf(a);t>=0&&r.players.splice(t,1);var n=r._engine.playersByElement.get(e);if(n){var i=n.indexOf(a);i>=0&&n.splice(i,1)}}),this.players.push(a),c.push(a),a}if(!function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(!t.hasOwnProperty(o)||e[o]!==t[o])return!1}return!0}(l.params,u.params)){var p=[],f=o.matchStyles(l.value,l.params,p),m=o.matchStyles(u.value,u.params,p);p.length?this._engine.reportError(p):this._engine.afterFlush(function(){FC(e,f),LC(e,m)})}}},{key:"deregister",value:function(e){var t=this;delete this._triggers[e],this._engine.statesByElement.forEach(function(t,n){delete t[e]}),this._elementListeners.forEach(function(n,r){t._elementListeners.set(r,n.filter(function(t){return t.name!=e}))})}},{key:"clearElementCache",value:function(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);var t=this._engine.playersByElement.get(e);t&&(t.forEach(function(e){return e.destroy()}),this._engine.playersByElement.delete(e))}},{key:"_signalRemovalForInnerTriggers",value:function(e,t){var n=this,r=this._engine.driver.query(e,".ng-trigger",!0);r.forEach(function(e){if(!e.__ng_removed){var r=n._engine.fetchNamespacesByElement(e);r.size?r.forEach(function(n){return n.triggerLeaveAnimation(e,t,!1,!0)}):n.clearElementCache(e)}}),this._engine.afterFlushAnimationsDone(function(){return r.forEach(function(e){return n.clearElementCache(e)})})}},{key:"triggerLeaveAnimation",value:function(e,t,n,r){var i=this,o=this._engine.statesByElement.get(e);if(o){var a=[];if(Object.keys(o).forEach(function(t){if(i._triggers[t]){var n=i.trigger(e,t,"void",r);n&&a.push(n)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&lC(a).onDone(function(){return i._engine.processLeaveNode(e)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(e){var t=this,n=this._elementListeners.get(e);if(n){var r=new Set;n.forEach(function(n){var i=n.name;if(!r.has(i)){r.add(i);var o=t._triggers[i].fallbackTransition,a=t._engine.statesByElement.get(e)[i]||Ox,s=new Tx("void"),l=new Dx(t.id,i,e);t._engine.totalQueuedPlayers++,t._queue.push({element:e,triggerName:i,transition:o,fromState:a,toState:s,player:l,isFallbackTransition:!0})}})}}},{key:"removeNode",value:function(e,t){var n=this,r=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),!this.triggerLeaveAnimation(e,t,!0)){var i=!1;if(r.totalAnimations){var o=r.players.length?r.playersByQueriedElement.get(e):[];if(o&&o.length)i=!0;else for(var a=e;a=a.parentNode;)if(r.statesByElement.get(a)){i=!0;break}}if(this.prepareLeaveAnimationListeners(e),i)r.markElementAsRemoved(this.id,e,!1,t);else{var s=e.__ng_removed;s&&s!==Ax||(r.afterFlush(function(){return n.clearElementCache(e)}),r.destroyInnerAnimations(e),r._onRemovalComplete(e,t))}}}},{key:"insertNode",value:function(e,t){qx(e,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(e){var t=this,n=[];return this._queue.forEach(function(r){var i=r.player;if(!i.destroyed){var o=r.element,a=t._elementListeners.get(o);a&&a.forEach(function(t){if(t.name==r.triggerName){var n=hC(o,r.triggerName,r.fromState.value,r.toState.value);n._data=e,cC(r.player,t.phase,n,t.callback)}}),i.markedForDestroy?t._engine.afterFlush(function(){i.destroy()}):n.push(r)}}),this._queue=[],n.sort(function(e,n){var r=e.transition.ast.depCount,i=n.transition.ast.depCount;return 0==r||0==i?r-i:t._engine.driver.containsElement(e.element,n.element)?1:-1})}},{key:"destroy",value:function(e){this.players.forEach(function(e){return e.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,e)}},{key:"elementContainsData",value:function(e){var t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(function(t){return t.element===e})||t}}]),e}(),Vx=function(){function e(t,n,r){is(this,e),this.bodyNode=t,this.driver=n,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(e,t){}}return as(e,[{key:"_onRemovalComplete",value:function(e,t){this.onRemovalComplete(e,t)}},{key:"createNamespace",value:function(e,t){var n=new Rx(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}},{key:"_balanceNamespaceList",value:function(e,t){var n=this._namespaceList.length-1;if(n>=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,t)){this._namespaceList.splice(i+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}},{key:"register",value:function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}},{key:"registerTrigger",value:function(e,t,n){var r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}},{key:"destroy",value:function(e,t){var n=this;if(e){var r=this._fetchNamespace(e);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(r);t>=0&&n._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(t)})}}},{key:"_fetchNamespace",value:function(e){return this._namespaceLookup[e]}},{key:"fetchNamespacesByElement",value:function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=n[r[i]].namespaceId;if(o){var a=this._fetchNamespace(o);a&&t.add(a)}}return t}},{key:"trigger",value:function(e,t,n,r){if(Nx(t)){var i=this._fetchNamespace(e);if(i)return i.trigger(t,n,r),!0}return!1}},{key:"insertNode",value:function(e,t,n,r){if(Nx(t)){var i=t.__ng_removed;if(i&&i.setForRemoval){i.setForRemoval=!1,i.setForMove=!0;var o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){var a=this._fetchNamespace(e);a&&a.insertNode(t,n)}r&&this.collectEnterElement(t)}}},{key:"collectEnterElement",value:function(e){this.collectedEnterElements.push(e)}},{key:"markElementAsDisabled",value:function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),qx(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),jx(e,"ng-animate-disabled"))}},{key:"removeNode",value:function(e,t,n,r){if(Nx(t)){var i=e?this._fetchNamespace(e):null;if(i?i.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),n){var o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}},{key:"markElementAsRemoved",value:function(e,t,n,r){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(e,t,n,r,i){return Nx(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}}},{key:"_buildInstruction",value:function(e,t,n,r,i){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,i)}},{key:"destroyInnerAnimations",value:function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach(function(e){return t.finishActiveQueriedAnimationOnElement(e)})}},{key:"destroyActiveAnimationsForElement",value:function(e){var t=this.playersByElement.get(e);t&&t.forEach(function(e){e.queued?e.markedForDestroy=!0:e.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach(function(e){return e.finish()})}},{key:"whenRenderingDone",value:function(){var e=this;return new Promise(function(t){if(e.players.length)return lC(e.players).onDone(function(){return t()});t()})}},{key:"processLeaveNode",value:function(e){var t=this,n=e.__ng_removed;if(n&&n.setForRemoval){if(e.__ng_removed=Ax,n.namespaceId){this.destroyInnerAnimations(e);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(function(e){t.markElementAsDisabled(e,!1)})}},{key:"flush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r<this.collectedEnterElements.length;r++)qx(this.collectedEnterElements[r],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var i=[];try{n=this._flushAnimations(i,t)}finally{for(var o=0;o<i.length;o++)i[o]()}}else for(var a=0;a<this.collectedLeaveElements.length;a++)this.processLeaveNode(this.collectedLeaveElements[a]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(function(e){return e()}),this._flushFns=[],this._whenQuietFns.length){var s=this._whenQuietFns;this._whenQuietFns=[],n.length?lC(n).onDone(function(){s.forEach(function(e){return e()})}):s.forEach(function(e){return e()})}}},{key:"reportError",value:function(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))}},{key:"_flushAnimations",value:function(e,t){var n=this,r=new ax,i=[],o=new Map,a=[],s=new Map,l=new Map,u=new Map,c=new Set;this.disabledNodes.forEach(function(e){c.add(e);for(var t=n.driver.query(e,".ng-animate-queued",!0),r=0;r<t.length;r++)c.add(t[r])});var d=this.bodyNode,h=Array.from(this.statesByElement.keys()),p=Mx(h,this.collectedEnterElements),f=new Map,m=0;p.forEach(function(e,t){var n="ng-enter"+m++;f.set(t,n),e.forEach(function(e){return qx(e,n)})});for(var g=[],v=new Set,y=new Set,b=0;b<this.collectedLeaveElements.length;b++){var _=this.collectedLeaveElements[b],w=_.__ng_removed;w&&w.setForRemoval&&(g.push(_),v.add(_),w.hasAnimation?this.driver.query(_,".ng-star-inserted",!0).forEach(function(e){return v.add(e)}):y.add(_))}var C=new Map,x=Mx(h,Array.from(v));x.forEach(function(e,t){var n="ng-leave"+m++;C.set(t,n),e.forEach(function(e){return qx(e,n)})}),e.push(function(){p.forEach(function(e,t){var n=f.get(t);e.forEach(function(e){return jx(e,n)})}),x.forEach(function(e,t){var n=C.get(t);e.forEach(function(e){return jx(e,n)})}),g.forEach(function(e){n.processLeaveNode(e)})});for(var S=[],P=[],k=this._namespaceList.length-1;k>=0;k--)this._namespaceList[k].drainQueuedTransitions(t).forEach(function(e){var t=e.player,o=e.element;if(S.push(t),n.collectedEnterElements.length){var c=o.__ng_removed;if(c&&c.setForMove)return void t.destroy()}var h=!d||!n.driver.containsElement(d,o),p=C.get(o),m=f.get(o),g=n._buildInstruction(e,r,m,p,h);if(g.errors&&g.errors.length)P.push(g);else{if(h)return t.onStart(function(){return FC(o,g.fromStyles)}),t.onDestroy(function(){return LC(o,g.toStyles)}),void i.push(t);if(e.isFallbackTransition)return t.onStart(function(){return FC(o,g.fromStyles)}),t.onDestroy(function(){return LC(o,g.toStyles)}),void i.push(t);g.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),r.append(o,g.timelines),a.push({instruction:g,player:t,element:o}),g.queriedElements.forEach(function(e){return pC(s,e,[]).push(t)}),g.preStyleProps.forEach(function(e,t){var n=Object.keys(e);if(n.length){var r=l.get(t);r||l.set(t,r=new Set),n.forEach(function(e){return r.add(e)})}}),g.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=u.get(t);r||u.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}});if(P.length){var E=[];P.forEach(function(e){E.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach(function(e){return E.push("- ".concat(e,"\n"))})}),S.forEach(function(e){return e.destroy()}),this.reportError(E)}var A=new Map,I=new Map;a.forEach(function(e){var t=e.element;r.has(t)&&(I.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,A))}),i.forEach(function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){pC(A,t,[]).push(e),e.destroy()})});var T=g.filter(function(e){return Ux(e,l,u)}),O=new Map;Fx(O,this.driver,y,u,"*").forEach(function(e){Ux(e,l,u)&&T.push(e)});var R=new Map;p.forEach(function(e,t){Fx(R,n.driver,new Set(e),l,"!")}),T.forEach(function(e){var t=O.get(e),n=R.get(e);O.set(e,Object.assign(Object.assign({},t),n))});var V=[],D=[],N={};a.forEach(function(e){var t=e.element,a=e.player,s=e.instruction;if(r.has(t)){if(c.has(t))return a.onDestroy(function(){return LC(t,s.toStyles)}),a.disabled=!0,a.overrideTotalTime(s.totalTime),void i.push(a);var l=N;if(I.size>1){for(var u=t,d=[];u=u.parentNode;){var h=I.get(u);if(h){l=h;break}d.push(u)}d.forEach(function(e){return I.set(e,l)})}var p=n._buildAnimation(a.namespaceId,s,A,o,R,O);if(a.setRealPlayer(p),l===N)V.push(a);else{var f=n.playersByElement.get(l);f&&f.length&&(a.parentPlayer=lC(f)),i.push(a)}}else FC(t,s.fromStyles),a.onDestroy(function(){return LC(t,s.toStyles)}),D.push(a),c.has(t)&&i.push(a)}),D.forEach(function(e){var t=o.get(e.element);if(t&&t.length){var n=lC(t);e.setRealPlayer(n)}}),i.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var L=0;L<g.length;L++){var F=g[L],M=F.__ng_removed;if(jx(F,"ng-leave"),!M||!M.hasAnimation){var q=[];if(s.size){var j=s.get(F);j&&j.length&&q.push.apply(q,Ha(j));for(var B=this.driver.query(F,".ng-animating",!0),z=0;z<B.length;z++){var U=s.get(B[z]);U&&U.length&&q.push.apply(q,Ha(U))}}var H=q.filter(function(e){return!e.destroyed});H.length?Bx(this,F,H):this.processLeaveNode(F)}}return g.length=0,V.forEach(function(e){n.players.push(e),e.onDone(function(){e.destroy();var t=n.players.indexOf(e);n.players.splice(t,1)}),e.play()}),V}},{key:"elementContainsData",value:function(e,t){var n=!1,r=t.__ng_removed;return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n}},{key:"afterFlush",value:function(e){this._flushFns.push(e)}},{key:"afterFlushAnimationsDone",value:function(e){this._whenQuietFns.push(e)}},{key:"_getPreviousPlayers",value:function(e,t,n,r,i){var o=[];if(t){var a=this.playersByQueriedElement.get(e);a&&(o=a)}else{var s=this.playersByElement.get(e);if(s){var l=!i||"void"==i;s.forEach(function(e){e.queued||(l||e.triggerName==r)&&o.push(e)})}}return(n||r)&&(o=o.filter(function(e){return!(n&&n!=e.namespaceId||r&&r!=e.triggerName)})),o}},{key:"_beforeAnimationBuild",value:function(e,t,n){var r,i=this,o=t.element,a=t.isRemovalTransition?void 0:e,s=t.isRemovalTransition?void 0:t.triggerName,l=Qa(t.timelines);try{var u=function(){var e=r.value.element,l=e!==o,u=pC(n,e,[]);i._getPreviousPlayers(e,l,a,s,t.toState).forEach(function(e){var t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),u.push(e)})};for(l.s();!(r=l.n()).done;)u()}catch(c){l.e(c)}finally{l.f()}FC(o,t.fromStyles)}},{key:"_buildAnimation",value:function(e,t,n,r,i,o){var a=this,s=t.triggerName,l=t.element,u=[],c=new Set,d=new Set,h=t.timelines.map(function(t){var h=t.element;c.add(h);var p=h.__ng_removed;if(p&&p.removedBeforeQueried)return new oC(t.duration,t.delay);var f,m,g=h!==l,v=(f=(n.get(h)||Ex).map(function(e){return e.getRealPlayer()}),m=[],zx(f,m),m).filter(function(e){return!!e.element&&e.element===h}),y=i.get(h),b=o.get(h),_=uC(0,a._normalizer,0,t.keyframes,y,b),w=a._buildPlayer(t,_,v);if(t.subTimeline&&r&&d.add(h),g){var C=new Dx(e,s,h);C.setRealPlayer(w),u.push(C)}return w});u.forEach(function(e){pC(a.playersByQueriedElement,e.element,[]).push(e),e.onDone(function(){return function(e,t,n){var r;if(e instanceof Map){if(r=e.get(t)){if(r.length){var i=r.indexOf(n);r.splice(i,1)}0==r.length&&e.delete(t)}}else if(r=e[t]){if(r.length){var o=r.indexOf(n);r.splice(o,1)}0==r.length&&delete e[t]}return r}(a.playersByQueriedElement,e.element,e)})}),c.forEach(function(e){return qx(e,"ng-animating")});var p=lC(h);return p.onDestroy(function(){c.forEach(function(e){return jx(e,"ng-animating")}),LC(l,t.toStyles)}),d.forEach(function(e){pC(r,e,[]).push(p)}),p}},{key:"_buildPlayer",value:function(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new oC(e.duration,e.delay)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&e.push(t)})}),e}}]),e}(),Dx=function(){function e(t,n,r){is(this,e),this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new oC,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return as(e,[{key:"setRealPlayer",value:function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(function(n){t._queuedCallbacks[n].forEach(function(t){return cC(e,n,void 0,t)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(e){this.totalTime=e}},{key:"syncPlayerEvents",value:function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart(function(){return n.triggerCallback("start")}),e.onDone(function(){return t.finish()}),e.onDestroy(function(){return t.destroy()})}},{key:"_queueEvent",value:function(e,t){pC(this._queuedCallbacks,e,[]).push(t)}},{key:"onDone",value:function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}},{key:"onStart",value:function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}},{key:"onDestroy",value:function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(e){this.queued||this._player.setPosition(e)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)}}]),e}();function Nx(e){return e&&1===e.nodeType}function Lx(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function Fx(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(Lx(e))});var a=[];r.forEach(function(n,r){var o={};n.forEach(function(e){var n=o[e]=t.computeStyle(r,e,i);n&&0!=n.length||(r.__ng_removed=Ix,a.push(r))}),e.set(r,o)});var s=0;return n.forEach(function(e){return Lx(e,o[s++])}),a}function Mx(e,t){var n=new Map;if(e.forEach(function(e){return n.set(e,[])}),0==t.length)return n;var r=new Set(t),i=new Map;function o(e){if(!e)return 1;var t=i.get(e);if(t)return t;var a=e.parentNode;return t=n.has(a)?a:r.has(a)?1:o(a),i.set(e,t),t}return t.forEach(function(e){var t=o(e);1!==t&&n.get(t).push(e)}),n}function qx(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function jx(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function Bx(e,t,n){lC(n).onDone(function(){return e.processLeaveNode(t)})}function zx(e,t){for(var n=0;n<e.length;n++){var r=e[n];r instanceof aC?zx(r.players,t):t.push(r)}}function Ux(e,t,n){var r=n.get(e);if(!r)return!1;var i=t.get(e);return i?r.forEach(function(e){return i.add(e)}):t.set(e,r),n.delete(e),!0}var Hx=function(){function e(t,n,r){var i=this;is(this,e),this.bodyNode=t,this._driver=n,this._triggerCache={},this.onRemovalComplete=function(e,t){},this._transitionEngine=new Vx(t,n,r),this._timelineEngine=new kx(t,n,r),this._transitionEngine.onRemovalComplete=function(e,t){return i.onRemovalComplete(e,t)}}return as(e,[{key:"registerTrigger",value:function(e,t,n,r,i){var o=e+"-"+r,a=this._triggerCache[o];if(!a){var s=[],l=XC(this._driver,i,s);if(s.length)throw new Error('The animation trigger "'.concat(r,'" has failed to build due to the following errors:\n - ').concat(s.join("\n - ")));a=function(e,t){return new xx(e,t)}(r,l),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,r,a)}},{key:"register",value:function(e,t){this._transitionEngine.register(e,t)}},{key:"destroy",value:function(e,t){this._transitionEngine.destroy(e,t)}},{key:"onInsert",value:function(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)}},{key:"onRemove",value:function(e,t,n,r){this._transitionEngine.removeNode(e,t,r||!1,n)}},{key:"disableAnimations",value:function(e,t){this._transitionEngine.markElementAsDisabled(e,t)}},{key:"process",value:function(e,t,n,r){if("@"==n.charAt(0)){var i=Ua(fC(n),2),o=i[0],a=i[1];this._timelineEngine.command(o,t,a,r)}else this._transitionEngine.trigger(e,t,n,r)}},{key:"listen",value:function(e,t,n,r,i){if("@"==n.charAt(0)){var o=Ua(fC(n),2),a=o[0],s=o[1];return this._timelineEngine.listen(a,t,s,i)}return this._transitionEngine.listen(e,t,n,r,i)}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),e}();function Qx(e,t){var n=null,r=null;return Array.isArray(t)&&t.length?(n=Gx(t[0]),t.length>1&&(r=Gx(t[t.length-1]))):t&&(n=Gx(t)),n||r?new Wx(e,n,r):null}var Wx=function(){var e=function(){function e(t,n,r){is(this,e),this._element=t,this._startStyles=n,this._endStyles=r,this._state=0;var i=e.initialStylesByElement.get(t);i||e.initialStylesByElement.set(t,i={}),this._initialStyles=i}return as(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&LC(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(LC(this._element,this._initialStyles),this._endStyles&&(LC(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(FC(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(FC(this._element,this._endStyles),this._endStyles=null),LC(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function Gx(e){for(var t=null,n=Object.keys(e),r=0;r<n.length;r++){var i=n[r];$x(i)&&((t=t||{})[i]=e[i])}return t}function $x(e){return"display"===e||"position"===e}var Jx=function(){function e(t,n,r,i,o,a,s){var l=this;is(this,e),this._element=t,this._name=n,this._duration=r,this._delay=i,this._easing=o,this._fillMode=a,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(e){return l._handleCallback(e)}}return as(e,[{key:"apply",value:function(){var e,t,n;e=this._element,t="".concat(this._duration,"ms ").concat(this._easing," ").concat(this._delay,"ms 1 normal ").concat(this._fillMode," ").concat(this._name),(n=tS(e,"").trim()).length&&(function(e,t){for(var n=0;n<e.length;n++)e.charAt(n)}(n),t="".concat(n,", ").concat(t)),eS(e,"",t),Xx(this._element,this._eventFn,!1),this._startTime=Date.now()}},{key:"pause",value:function(){Yx(this._element,this._name,"paused")}},{key:"resume",value:function(){Yx(this._element,this._name,"running")}},{key:"setPosition",value:function(e){var t=Kx(this._element,this._name);this._position=e*this._duration,eS(this._element,"Delay","-".concat(this._position,"ms"),t)}},{key:"getPosition",value:function(){return this._position}},{key:"_handleCallback",value:function(e){var t=e._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Xx(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,r;this._destroyed||(this._destroyed=!0,this.finish(),e=this._element,t=this._name,n=tS(e,"").split(","),(r=Zx(n,t))>=0&&(n.splice(r,1),eS(e,"",n.join(","))))}}]),e}();function Yx(e,t,n){eS(e,"PlayState",n,Kx(e,t))}function Kx(e,t){var n=tS(e,"");return n.indexOf(",")>0?Zx(n.split(","),t):Zx([n],t)}function Zx(e,t){for(var n=0;n<e.length;n++)if(e[n].indexOf(t)>=0)return n;return-1}function Xx(e,t,n){n?e.removeEventListener("animationend",t):e.addEventListener("animationend",t)}function eS(e,t,n,r){var i="animation"+t;if(null!=r){var o=e.style[i];if(o.length){var a=o.split(",");a[r]=n,n=a.join(",")}}e.style[i]=n}function tS(e,t){return e.style["animation"+t]||""}var nS=function(){function e(t,n,r,i,o,a,s,l){is(this,e),this.element=t,this.keyframes=n,this.animationName=r,this._duration=i,this._delay=o,this._finalStyles=s,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=a||"linear",this.totalTime=i+o,this._buildStyler()}return as(e,[{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(e){this._styler.setPosition(e)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var e=this;this._styler=new Jx(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return e.finish()})}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}},{key:"beforeDestroy",value:function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:$C(e.element,r))})}this.currentSnapshot=t}}]),e}(),rS=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this)).element=e,i._startingStyles={},i.__initialized=!1,i._styles=PC(r),i}return as(n,[{key:"init",value:function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),Ya(rs(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),Ya(rs(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,Ya(rs(n.prototype),"destroy",this).call(this))}}]),n}(oC),iS=function(){function e(){is(this,e),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return as(e,[{key:"validateStyleProperty",value:function(e){return wC(e)}},{key:"matchesElement",value:function(e,t){return CC(e,t)}},{key:"containsElement",value:function(e,t){return xC(e,t)}},{key:"query",value:function(e,t,n){return SC(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"buildKeyframeElement",value:function(e,t,n){n=n.map(function(e){return PC(e)});var r="@keyframes ".concat(t," {\n"),i="";n.forEach(function(e){i=" ";var t=parseFloat(e.offset);r+="".concat(i).concat(100*t,"% {\n"),i+=" ",Object.keys(e).forEach(function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+="".concat(i,"animation-timing-function: ").concat(n,";\n")));default:return void(r+="".concat(i).concat(t,": ").concat(n,";\n"))}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.textContent=r,o}},{key:"animate",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0;a&&this._notifyFaultyScrubber();var s=o.filter(function(e){return e instanceof nS}),l={};QC(n,r)&&s.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return l[e]=t[e]})});var u=function(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach(function(e){Object.keys(e).forEach(function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=WC(e,t,l));if(0==n)return new rS(e,u);var c="gen_css_kf_"+this._count++,d=this.buildKeyframeElement(e,c,t);document.querySelector("head").appendChild(d);var h=Qx(e,t),p=new nS(e,t,c,n,r,i,u,h);return p.onDestroy(function(){var e;(e=d).parentNode.removeChild(e)}),p}},{key:"_notifyFaultyScrubber",value:function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n","  visit https://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}]),e}(),oS=function(){function e(t,n,r,i){is(this,e),this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}return as(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",function(){return e._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(e,t,n){return e.animate(t,n)}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(e){this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:$C(e.element,n))}),this.currentSnapshot=t}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),e}(),aS=function(){function e(){is(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(sS().toString()),this._cssKeyframesDriver=new iS}return as(e,[{key:"validateStyleProperty",value:function(e){return wC(e)}},{key:"matchesElement",value:function(e,t){return CC(e,t)}},{key:"containsElement",value:function(e,t){return xC(e,t)}},{key:"query",value:function(e,t,n){return SC(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"overrideWebAnimationsSupport",value:function(e){this._isNativeImpl=e}},{key:"animate",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0;if(!a&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,r,i,o);var s={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(s.easing=i);var l={},u=o.filter(function(e){return e instanceof oS});QC(n,r)&&u.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return l[e]=t[e]})});var c=Qx(e,t=WC(e,t=t.map(function(e){return VC(e,!1)}),l));return new oS(e,t,s,c)}}]),e}();function sS(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var lS,uS=((lS=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this))._nextAnimationId=0,i._renderer=e.createRenderer(r.body,{id:"0",encapsulation:kl.None,styles:[],data:{animation:[]}}),i}return as(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?eC(e):e;return hS(this._renderer,null,t,"register",[n]),new cS(t,this._renderer)}}]),n}(Kw)).\u0275fac=function(e){return new(e||lS)(md(Kg),md(Cb))},lS.\u0275prov=dl({token:lS,factory:lS.\u0275fac}),lS),cS=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this))._id=e,i._renderer=r,i}return as(n,[{key:"create",value:function(e,t){return new dS(this._id,e,t||{},this._renderer)}}]),n}(function(){return function e(){is(this,e)}}()),dS=function(){function e(t,n,r,i){is(this,e),this.id=t,this.element=n,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}return as(e,[{key:"_listen",value:function(e,t){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(e),t)}},{key:"_command",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return hS(this._renderer,this.element,this.id,e,n)}},{key:"onDone",value:function(e){this._listen("done",e)}},{key:"onStart",value:function(e){this._listen("start",e)}},{key:"onDestroy",value:function(e){this._listen("destroy",e)}},{key:"init",value:function(){this._command("init")}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this._command("play"),this._started=!0}},{key:"pause",value:function(){this._command("pause")}},{key:"restart",value:function(){this._command("restart")}},{key:"finish",value:function(){this._command("finish")}},{key:"destroy",value:function(){this._command("destroy")}},{key:"reset",value:function(){this._command("reset")}},{key:"setPosition",value:function(e){this._command("setPosition",e)}},{key:"getPosition",value:function(){return 0}}]),e}();function hS(e,t,n,r,i){return e.setProperty(t,"@@".concat(n,":").concat(r),i)}var pS,fS,mS,gS=((pS=function(){function e(t,n,r){is(this,e),this.delegate=t,this.engine=n,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=function(e,t){t&&t.parentNode(e)&&t.removeChild(e.parentNode,e)}}return as(e,[{key:"createRenderer",value:function(e,t){var n=this,r=this.delegate.createRenderer(e,t);if(!(e&&t&&t.data&&t.data.animation)){var i=this._rendererCache.get(r);return i||(i=new vS("",r,this.engine),this._rendererCache.set(r,i)),i}var o=t.id,a=t.id+"-"+this._currentId;return this._currentId++,this.engine.register(a,e),t.data.animation.forEach(function t(r){Array.isArray(r)?r.forEach(t):n.engine.registerTrigger(o,a,e,r.name,r)}),new yS(this,a,r,this.engine)}},{key:"begin",value:function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}},{key:"_scheduleCountTask",value:function(){var e=this;this.promise.then(function(){e._microtaskId++})}},{key:"scheduleListenerCallback",value:function(e,t,n){var r=this;e>=0&&e<this._microtaskId?this._zone.run(function(){return t(n)}):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(function(){r._zone.run(function(){r._animationCallbacksBuffer.forEach(function(e){var t=Ua(e,2);(0,t[0])(t[1])}),r._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([t,n]))}},{key:"end",value:function(){var e=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(function(){e._scheduleCountTask(),e.engine.flush(e._microtaskId)}),this.delegate.end&&this.delegate.end()}},{key:"whenRenderingDone",value:function(){return this.engine.whenRenderingDone()}}]),e}()).\u0275fac=function(e){return new(e||pS)(md(Kg),md(Hx),md(Hy))},pS.\u0275prov=dl({token:pS,factory:pS.\u0275fac}),pS),vS=function(){function e(t,n,r){is(this,e),this.namespaceId=t,this.delegate=n,this.engine=r,this.destroyNode=this.delegate.destroyNode?function(e){return n.destroyNode(e)}:null}return as(e,[{key:"destroy",value:function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}},{key:"createElement",value:function(e,t){return this.delegate.createElement(e,t)}},{key:"createComment",value:function(e){return this.delegate.createComment(e)}},{key:"createText",value:function(e){return this.delegate.createText(e)}},{key:"appendChild",value:function(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}},{key:"insertBefore",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}},{key:"removeChild",value:function(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}},{key:"selectRootElement",value:function(e,t){return this.delegate.selectRootElement(e,t)}},{key:"parentNode",value:function(e){return this.delegate.parentNode(e)}},{key:"nextSibling",value:function(e){return this.delegate.nextSibling(e)}},{key:"setAttribute",value:function(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}},{key:"removeAttribute",value:function(e,t,n){this.delegate.removeAttribute(e,t,n)}},{key:"addClass",value:function(e,t){this.delegate.addClass(e,t)}},{key:"removeClass",value:function(e,t){this.delegate.removeClass(e,t)}},{key:"setStyle",value:function(e,t,n,r){this.delegate.setStyle(e,t,n,r)}},{key:"removeStyle",value:function(e,t,n){this.delegate.removeStyle(e,t,n)}},{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}},{key:"setValue",value:function(e,t){this.delegate.setValue(e,t)}},{key:"listen",value:function(e,t,n){return this.delegate.listen(e,t,n)}},{key:"disableAnimations",value:function(e,t){this.engine.disableAnimations(e,t)}},{key:"data",get:function(){return this.delegate.data}}]),e}(),yS=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,r,i,o)).factory=e,a.namespaceId=r,a}return as(n,[{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}},{key:"listen",value:function(e,t,n){var r,i,o=this;if("@"==t.charAt(0)){var a,s=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),l=t.substr(1),u="";return"@"!=l.charAt(0)&&(i=(r=l).indexOf("."),l=(a=Ua([r.substring(0,i),r.substr(i+1)],2))[0],u=a[1]),this.engine.listen(this.namespaceId,s,l,u,function(e){o.factory.scheduleListenerCallback(e._data||-1,n,e)})}return this.delegate.listen(e,t,n)}}]),n}(vS),bS=((fS=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){return is(this,n),t.call(this,e.body,r,i)}return n}(Hx)).\u0275fac=function(e){return new(e||fS)(md(Cb),md(AC),md(gx))},fS.\u0275prov=dl({token:fS,factory:fS.\u0275fac}),fS),_S=new $c("AnimationModuleType"),wS=[{provide:AC,useFactory:function(){return"function"==typeof sS()?new aS:new iS}},{provide:_S,useValue:"BrowserAnimations"},{provide:Kw,useClass:uS},{provide:gx,useFactory:function(){return new vx}},{provide:Hx,useClass:bS},{provide:Kg,useFactory:function(e,t,n){return new gS(e,t,n)},deps:[Lw,Hx,Hy]}],CS=((mS=function e(){is(this,e)}).\u0275mod=Wl({type:mS}),mS.\u0275inj=hl({factory:function(e){return new(e||mS)},providers:wS,imports:[Yw]}),mS);function xS(e,t){return new ws(function(n){var r=e.length;if(0!==r)for(var i=new Array(r),o=0,a=0,s=function(s){var l=zs(e[s]),u=!1;n.add(l.subscribe({next:function(e){u||(u=!0,a++),i[s]=e},error:function(e){return n.error(e)},complete:function(){++o!==r&&u||(a===r&&n.next(t?t.reduce(function(e,t,n){return e[t]=i[n],e},{}):i),n.complete())}}))},l=0;l<r;l++)s(l);else n.complete()})}var SS,PS,kS=new $c("NgValueAccessor"),ES={provide:kS,useExisting:sl(function(){return AS}),multi:!0},AS=((SS=function(){function e(t,n){is(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return as(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||SS)(Qf(Zg),Qf(Yg))},SS.\u0275dir=$l({type:SS,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&nm("change",function(e){return t.onChange(e.target.checked)})("blur",function(){return t.onTouched()})},features:[Ug([ES])]}),SS),IS={provide:kS,useExisting:sl(function(){return OS}),multi:!0},TS=new $c("CompositionEventMode"),OS=((PS=function(){function e(t,n,r){var i;is(this,e),this._renderer=t,this._elementRef=n,this._compositionMode=r,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(i=_b()?_b().getUserAgent():"",!/android (\d+)/.test(i.toLowerCase())))}return as(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_handleInput",value:function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}]),e}()).\u0275fac=function(e){return new(e||PS)(Qf(Zg),Qf(Yg),Qf(TS,8))},PS.\u0275dir=$l({type:PS,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,t){1&e&&nm("input",function(e){return t._handleInput(e.target.value)})("blur",function(){return t.onTouched()})("compositionstart",function(){return t._compositionStart()})("compositionend",function(e){return t._compositionEnd(e.target.value)})},features:[Ug([IS])]}),PS);function RS(e){return null==e||0===e.length}function VS(e){return null!=e&&"number"==typeof e.length}var DS=new $c("NgValidators"),NS=new $c("NgAsyncValidators"),LS=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,FS=function(){function e(){is(this,e)}return as(e,null,[{key:"min",value:function(e){return function(t){if(RS(t.value)||RS(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}},{key:"max",value:function(e){return function(t){if(RS(t.value)||RS(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return RS(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return RS(e.value)||LS.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){return RS(t.value)||!VS(t.value)?null:t.value.length<e?{minlength:{requiredLength:e,actualLength:t.value.length}}:null}}},{key:"maxLength",value:function(e){return function(t){return VS(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}}},{key:"pattern",value:function(t){return t?("string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),n=new RegExp(r)):(r=t.toString(),n=t),function(e){if(RS(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:r,actualValue:t}}}):e.nullValidator;var n,r}},{key:"nullValidator",value:function(e){return null}},{key:"compose",value:function(e){if(!e)return null;var t=e.filter(MS);return 0==t.length?null:function(e){return jS(BS(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(MS);return 0==t.length?null:function(e){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length){var r=t[0];if(us(r))return xS(r,null);if(cs(r)&&Object.getPrototypeOf(r)===Object.prototype){var i=Object.keys(r);return xS(i.map(function(e){return r[e]}),i)}}if("function"==typeof t[t.length-1]){var o=t.pop();return xS(t=1===t.length&&us(t[0])?t[0]:t,null).pipe(Ms(function(e){return o.apply(void 0,Ha(e))}))}return xS(t,null)}(BS(e,t).map(qS)).pipe(Ms(jS))}}}]),e}();function MS(e){return null!=e}function qS(e){var t=em(e)?zs(e):e;return tm(t),t}function jS(e){var t={};return e.forEach(function(e){t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function BS(e,t){return t.map(function(t){return t(e)})}function zS(e){return e.map(function(e){return function(e){return!e.validate}(e)?e:function(t){return e.validate(t)}})}function US(e){return null!=e?FS.compose(zS(e)):null}function HS(e){return null!=e?FS.composeAsync(zS(e)):null}function QS(e,t){return null===e?[t]:Array.isArray(e)?[].concat(Ha(e),[t]):[e,t]}function WS(e){return e._rawValidators}function GS(e){return e._rawAsyncValidators}var $S,JS,YS,KS,ZS,XS,eP,tP,nP=((JS=function(){function e(){is(this,e),this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}return as(e,[{key:"_setValidators",value:function(e){this._rawValidators=e||[],this._composedValidatorFn=US(this._rawValidators)}},{key:"_setAsyncValidators",value:function(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=HS(this._rawAsyncValidators)}},{key:"_registerOnDestroy",value:function(e){this._onDestroyCallbacks.push(e)}},{key:"_invokeOnDestroyCallbacks",value:function(){this._onDestroyCallbacks.forEach(function(e){return e()}),this._onDestroyCallbacks=[]}},{key:"reset",value:function(e){this.control&&this.control.reset(e)}},{key:"hasError",value:function(e,t){return!!this.control&&this.control.hasError(e,t)}},{key:"getError",value:function(e,t){return this.control?this.control.getError(e,t):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}}]),e}()).\u0275fac=function(e){return new(e||JS)},JS.\u0275dir=$l({type:JS}),JS),rP=(($S=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(nP)).\u0275fac=function(e){return iP(e||$S)},$S.\u0275dir=$l({type:$S,features:[Af]}),$S),iP=Wc(rP),oP=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e}return n}(nP),aP=function(){function e(t){is(this,e),this._cd=t}return as(e,[{key:"ngClassUntouched",get:function(){return!!this._cd.control&&this._cd.control.untouched}},{key:"ngClassTouched",get:function(){return!!this._cd.control&&this._cd.control.touched}},{key:"ngClassPristine",get:function(){return!!this._cd.control&&this._cd.control.pristine}},{key:"ngClassDirty",get:function(){return!!this._cd.control&&this._cd.control.dirty}},{key:"ngClassValid",get:function(){return!!this._cd.control&&this._cd.control.valid}},{key:"ngClassInvalid",get:function(){return!!this._cd.control&&this._cd.control.invalid}},{key:"ngClassPending",get:function(){return!!this._cd.control&&this._cd.control.pending}}]),e}(),sP=((KS=function(e){Ka(n,e);var t=Xa(n);function n(e){return is(this,n),t.call(this,e)}return n}(aP)).\u0275fac=function(e){return new(e||KS)(Qf(oP,2))},KS.\u0275dir=$l({type:KS,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&gm("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[Af]}),KS),lP=((YS=function(e){Ka(n,e);var t=Xa(n);function n(e){return is(this,n),t.call(this,e)}return n}(aP)).\u0275fac=function(e){return new(e||YS)(Qf(rP,2))},YS.\u0275dir=$l({type:YS,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(e,t){2&e&&gm("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[Af]}),YS),uP={provide:kS,useExisting:sl(function(){return cP}),multi:!0},cP=((ZS=function(){function e(t,n){is(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return as(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||ZS)(Qf(Zg),Qf(Yg))},ZS.\u0275dir=$l({type:ZS,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&nm("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[Ug([uP])]}),ZS),dP={provide:kS,useExisting:sl(function(){return pP}),multi:!0},hP=((eP=function(){function e(){is(this,e),this._accessors=[]}return as(e,[{key:"add",value:function(e,t){this._accessors.push([e,t])}},{key:"remove",value:function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}},{key:"select",value:function(e){var t=this;this._accessors.forEach(function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}},{key:"_isSameGroup",value:function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}]),e}()).\u0275fac=function(e){return new(e||eP)},eP.\u0275prov=dl({token:eP,factory:eP.\u0275fac}),eP),pP=((XS=function(){function e(t,n,r,i){is(this,e),this._renderer=t,this._elementRef=n,this._registry=r,this._injector=i,this.onChange=function(){},this.onTouched=function(){}}return as(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(oP),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}}},{key:"fireUncheck",value:function(e){this.writeValue(e)}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),e}()).\u0275fac=function(e){return new(e||XS)(Qf(Zg),Qf(Yg),Qf(hP),Qf(kf))},XS.\u0275dir=$l({type:XS,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&nm("change",function(){return t.onChange()})("blur",function(){return t.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Ug([dP])]}),XS),fP={provide:kS,useExisting:sl(function(){return mP}),multi:!0},mP=((tP=function(){function e(t,n){is(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return as(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}()).\u0275fac=function(e){return new(e||tP)(Qf(Zg),Qf(Yg))},tP.\u0275dir=$l({type:tP,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&nm("change",function(e){return t.onChange(e.target.value)})("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[Ug([fP])]}),tP),gP={provide:kS,useExisting:sl(function(){return _P}),multi:!0};function vP(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var yP,bP,_P=((bP=function(){function e(t,n){is(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Object.is}return as(e,[{key:"writeValue",value:function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=vP(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t<n.length;t++){var r=n[t];if(this._compareWith(this._optionMap.get(r),e))return r}return null}},{key:"_getOptionValue",value:function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}},{key:"compareWith",set:function(e){this._compareWith=e}}]),e}()).\u0275fac=function(e){return new(e||bP)(Qf(Zg),Qf(Yg))},bP.\u0275dir=$l({type:bP,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,t){1&e&&nm("change",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},inputs:{compareWith:"compareWith"},features:[Ug([gP])]}),bP),wP=((yP=function(){function e(t,n,r){is(this,e),this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}return as(e,[{key:"_setElementValue",value:function(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(vP(this.id,e)),this._select.writeValue(this._select.value))}},{key:"value",set:function(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}}]),e}()).\u0275fac=function(e){return new(e||yP)(Qf(Yg),Qf(Zg),Qf(_P,9))},yP.\u0275dir=$l({type:yP,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),yP),CP={provide:kS,useExisting:sl(function(){return kP}),multi:!0};function xP(e,t){return null==e?""+t:("string"==typeof t&&(t="'".concat(t,"'")),t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var SP,PP,kP=((PP=function(){function e(t,n){is(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Object.is}return as(e,[{key:"writeValue",value:function(e){var t,n=this;if(this.value=e,Array.isArray(e)){var r=e.map(function(e){return n._getOptionId(e)});t=function(e,t){e._setSelected(r.indexOf(t.toString())>-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){var r=[];if(void 0!==n.selectedOptions)for(var i=n.selectedOptions,o=0;o<i.length;o++){var a=i.item(o),s=t._getOptionValue(a.value);r.push(s)}else for(var l=n.options,u=0;u<l.length;u++){var c=l.item(u);if(c.selected){var d=t._getOptionValue(c.value);r.push(d)}}t.value=r,e(r)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(e){var t=(this._idCounter++).toString();return this._optionMap.set(t,e),t}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t<n.length;t++){var r=n[t];if(this._compareWith(this._optionMap.get(r)._value,e))return r}return null}},{key:"_getOptionValue",value:function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e}},{key:"compareWith",set:function(e){this._compareWith=e}}]),e}()).\u0275fac=function(e){return new(e||PP)(Qf(Zg),Qf(Yg))},PP.\u0275dir=$l({type:PP,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,t){1&e&&nm("change",function(e){return t.onChange(e.target)})("blur",function(){return t.onTouched()})},inputs:{compareWith:"compareWith"},features:[Ug([CP])]}),PP),EP=((SP=function(){function e(t,n,r){is(this,e),this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}return as(e,[{key:"_setElementValue",value:function(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}},{key:"_setSelected",value:function(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(e){null!=this._select&&(this._value=e,this._setElementValue(xP(this.id,e)),this._select.writeValue(this._select.value))}},{key:"value",set:function(e){this._select?(this._value=e,this._setElementValue(xP(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}}]),e}()).\u0275fac=function(e){return new(e||SP)(Qf(Yg),Qf(Zg),Qf(kP,9))},SP.\u0275dir=$l({type:SP,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),SP);function AP(e,t){return[].concat(Ha(t.path),[e])}function IP(e,t){OP(e,t,!0),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange(function(n){e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&VP(e,t)})}(e,t),function(e,t){var n=function(e,n){t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)};e.registerOnChange(n),t._registerOnDestroy(function(){e._unregisterOnChange(n)})}(e,t),function(e,t){t.valueAccessor.registerOnTouched(function(){e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&VP(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),function(e,t){if(t.valueAccessor.setDisabledState){var n=function(e){t.valueAccessor.setDisabledState(e)};e.registerOnDisabledChange(n),t._registerOnDestroy(function(){e._unregisterOnDisabledChange(n)})}}(e,t)}function TP(e,t){e.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function OP(e,t,n){var r=WS(e);null!==t.validator?e.setValidators(QS(r,t.validator)):"function"==typeof r&&e.setValidators([r]);var i=GS(e);if(null!==t.asyncValidator?e.setAsyncValidators(QS(i,t.asyncValidator)):"function"==typeof i&&e.setAsyncValidators([i]),n){var o=function(){return e.updateValueAndValidity()};TP(t._rawValidators,o),TP(t._rawAsyncValidators,o)}}function RP(e,t,n){if(null!==e){if(null!==t.validator){var r=WS(e);Array.isArray(r)&&r.length>0&&e.setValidators(r.filter(function(e){return e!==t.validator}))}if(null!==t.asyncValidator){var i=GS(e);Array.isArray(i)&&i.length>0&&e.setAsyncValidators(i.filter(function(e){return e!==t.asyncValidator}))}}if(n){var o=function(){};TP(t._rawValidators,o),TP(t._rawAsyncValidators,o)}}function VP(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function DP(e,t){OP(e,t,!1)}var NP=[AS,mP,cP,_P,kP,pP];function LP(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function FP(e){return(BP(e)?e.validators:e)||null}function MP(e){return Array.isArray(e)?US(e):e||null}function qP(e,t){return(BP(t)?t.asyncValidators:e)||null}function jP(e){return Array.isArray(e)?HS(e):e||null}function BP(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var zP,UP,HP,QP,WP,GP=function(){function e(t,n){is(this,e),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=n,this._composedValidatorFn=MP(this._rawValidators),this._composedAsyncValidatorFn=jP(this._rawAsyncValidators)}return as(e,[{key:"setValidators",value:function(e){this._rawValidators=e,this._composedValidatorFn=MP(e)}},{key:"setAsyncValidators",value:function(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=jP(e)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(e){return e.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"markAsDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}},{key:"markAsPristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"markAsPending",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}},{key:"disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(function(t){t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(function(e){return e(!0)})}},{key:"enable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="VALID",this._forEachChild(function(t){t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(function(e){return e(!1)})}},{key:"_updateAncestors",value:function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(e){this._parent=e}},{key:"updateValueAndValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}},{key:"_updateTreeValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(t){return t._updateTreeValidity(e)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(e){var t=this;if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;var n=qS(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){t._hasOwnPendingAsyncValidator=!1,t.setErrors(n,{emitEvent:e})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}},{key:"get",value:function(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;var r=e;return t.forEach(function(e){r=r instanceof JP?r.controls.hasOwnProperty(e)?r.controls[e]:null:r instanceof YP&&r.at(e)||null}),r}(this,e)}},{key:"getError",value:function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}},{key:"hasError",value:function(e,t){return!!this.getError(e,t)}},{key:"_updateControlsErrors",value:function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}},{key:"_initObservables",value:function(){this.valueChanges=new ty,this.statusChanges=new ty}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(e){return this._anyControls(function(t){return t.status===e})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(e){return e.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(e){return e.touched})}},{key:"_updatePristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"_updateTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"_isBoxedValue",value:function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}},{key:"_registerOnCollectionChange",value:function(e){this._onCollectionChange=e}},{key:"_setUpdateStrategy",value:function(e){BP(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(e){this._rawValidators=this._composedValidatorFn=e}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return"VALID"===this.status}},{key:"invalid",get:function(){return"INVALID"===this.status}},{key:"pending",get:function(){return"PENDING"==this.status}},{key:"disabled",get:function(){return"DISABLED"===this.status}},{key:"enabled",get:function(){return"DISABLED"!==this.status}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var e=this;e._parent;)e=e._parent;return e}}]),e}(),$P=function(e){Ka(n,e);var t=Xa(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return is(this,n),(e=t.call(this,FP(i),qP(o,i)))._onChange=[],e._applyFormState(r),e._setUpdateStrategy(i),e._initObservables(),e.updateValueAndValidity({onlySelf:!0,emitEvent:!!o}),e}return as(n,[{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(function(e){return e(t.value,!1!==n.emitViewToModelChange)}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(e,t)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(e){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(e){this._onChange.push(e)}},{key:"_unregisterOnChange",value:function(e){LP(this._onChange,e)}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_unregisterOnDisabledChange",value:function(e){LP(this._onDisabledChange,e)}},{key:"_forEachChild",value:function(e){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}]),n}(GP),JP=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,FP(r),qP(i,r))).controls=e,o._initObservables(),o._setUpdateStrategy(r),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),o}return as(n,[{key:"registerControl",value:function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}},{key:"addControl",value:function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),Object.keys(e).forEach(function(r){t._throwIfControlMissing(r),t.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach(function(r){t.controls[r]&&t.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(e,t,n){return e[n]=t instanceof $P?t.value:t.getRawValue(),e})}},{key:"_syncPendingControls",value:function(){var e=this._reduceChildren(!1,function(e,t){return!!t._syncPendingControls()||e});return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){if(!Object.keys(this.controls).length)throw new Error("\n        There are no form controls registered with this group yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.controls[e])throw new Error("Cannot find form control with name: ".concat(e,"."))}},{key:"_forEachChild",value:function(e){var t=this;Object.keys(this.controls).forEach(function(n){return e(t.controls[n],n)})}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(e){for(var t=0,n=Object.keys(this.controls);t<n.length;t++){var r=n[t],i=this.controls[r];if(this.contains(r)&&e(i))return!0}return!1}},{key:"_reduceValue",value:function(){var e=this;return this._reduceChildren({},function(t,n,r){return(n.enabled||e.disabled)&&(t[r]=n.value),t})}},{key:"_reduceChildren",value:function(e,t){var n=e;return this._forEachChild(function(e,r){n=t(n,e,r)}),n}},{key:"_allControlsDisabled",value:function(){for(var e=0,t=Object.keys(this.controls);e<t.length;e++){var n=t[e];if(this.controls[n].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))})}}]),n}(GP),YP=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,FP(r),qP(i,r))).controls=e,o._initObservables(),o._setUpdateStrategy(r),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),o}return as(n,[{key:"at",value:function(e){return this.controls[e]}},{key:"push",value:function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}},{key:"removeAt",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),this.updateValueAndValidity()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),e.forEach(function(e,r){t._throwIfControlMissing(r),t.at(r).setValue(e,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(function(e,r){t.at(r)&&t.at(r).patchValue(e,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this.controls.map(function(e){return e instanceof $P?e.value:e.getRawValue()})}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild(function(e){return e._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var e=this.controls.reduce(function(e,t){return!!t._syncPendingControls()||e},!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){if(!this.controls.length)throw new Error("\n        There are no form controls registered with this array yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)}},{key:"_forEachChild",value:function(e){this.controls.forEach(function(t,n){e(t,n)})}},{key:"_updateValue",value:function(){var e=this;this.value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})}},{key:"_anyControls",value:function(e){return this.controls.some(function(t){return t.enabled&&e(t)})}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))})}},{key:"_allControlsDisabled",value:function(){var e,t=Qa(this.controls);try{for(t.s();!(e=t.n()).done;){if(e.value.enabled)return!1}}catch(n){t.e(n)}finally{t.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(GP),KP=((zP=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormGroup(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormGroup(this)}},{key:"_checkParentType",value:function(){}},{key:"control",get:function(){return this.formDirective.getFormGroup(this)}},{key:"path",get:function(){return AP(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(rP)).\u0275fac=function(e){return ZP(e||zP)},zP.\u0275dir=$l({type:zP,features:[Af]}),zP),ZP=Wc(KP),XP=((UP=function e(){is(this,e)}).\u0275fac=function(e){return new(e||UP)},UP.\u0275dir=$l({type:UP,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),UP),ek=new $c("NgModelWithFormControlWarning"),tk={provide:rP,useExisting:sl(function(){return nk})},nk=((HP=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this)).validators=e,i.asyncValidators=r,i.submitted=!1,i.directives=[],i.form=null,i.ngSubmit=new ty,i._setValidators(e),i._setAsyncValidators(r),i}return as(n,[{key:"ngOnChanges",value:function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"addControl",value:function(e){var t=this.form.get(e.path);return IP(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){LP(this.directives,e)}},{key:"addFormGroup",value:function(e){var t=this.form.get(e.path);DP(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(e){}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"addFormArray",value:function(e){var t=this.form.get(e.path);DP(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(e){}},{key:"getFormArray",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){this.form.get(e.path).setValue(t)}},{key:"onSubmit",value:function(e){return this.submitted=!0,t=this.directives,this.form._syncPendingControls(),t.forEach(function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)}),this.ngSubmit.emit(e),!1;var t}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_updateDomValue",value:function(){var e=this;this.directives.forEach(function(t){var n=e.form.get(t.path);t.control!==n&&(function(e,t){var n=function(){};t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n),RP(e,t,!0),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(function(){}))}(t.control||null,t),n&&IP(n,t),t.control=n)}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var e=this;this.form._registerOnCollectionChange(function(){return e._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){OP(this.form,this,!1),this._oldForm&&RP(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(rP)).\u0275fac=function(e){return new(e||HP)(Qf(DS,10),Qf(NS,10))},HP.\u0275dir=$l({type:HP,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&nm("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ug([tk]),Af,cu]}),HP),rk={provide:rP,useExisting:sl(function(){return ik})},ik=((QP=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this))._parent=e,o._setValidators(r),o._setAsyncValidators(i),o}return as(n,[{key:"_checkParentType",value:function(){sk(this._parent)}}]),n}(KP)).\u0275fac=function(e){return new(e||QP)(Qf(rP,13),Qf(DS,10),Qf(NS,10))},QP.\u0275dir=$l({type:QP,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[Ug([rk]),Af]}),QP),ok={provide:rP,useExisting:sl(function(){return ak})},ak=((WP=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this))._parent=e,o._setValidators(r),o._setAsyncValidators(i),o}return as(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormArray(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormArray(this)}},{key:"_checkParentType",value:function(){sk(this._parent)}},{key:"control",get:function(){return this.formDirective.getFormArray(this)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"path",get:function(){return AP(null==this.name?this.name:this.name.toString(),this._parent)}}]),n}(rP)).\u0275fac=function(e){return new(e||WP)(Qf(rP,13),Qf(DS,10),Qf(NS,10))},WP.\u0275dir=$l({type:WP,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[Ug([ok]),Af]}),WP);function sk(e){return!(e instanceof ik||e instanceof nk||e instanceof ak)}var lk,uk,ck,dk,hk,pk,fk,mk={provide:oP,useExisting:sl(function(){return gk})},gk=((lk=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a){var s;return is(this,n),(s=t.call(this))._ngModelWarningConfig=a,s._added=!1,s.update=new ty,s._ngModelWarningSent=!1,s._parent=e,s._setValidators(r),s._setAsyncValidators(i),s.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t);var n=void 0,r=void 0,i=void 0;return t.forEach(function(e){var t;e.constructor===OS?n=e:(t=e,NP.some(function(e){return t.constructor===e})?r=e:i=e)}),i||r||n||null}(0,o),s}return as(n,[{key:"ngOnChanges",value:function(e){var t,r;this._added||this._setUpControl(),function(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}(e,this.viewModel)&&(t=n,r=this._ngModelWarningConfig,Od()&&"never"!==r&&((null!==r&&"once"!==r||t._ngModelWarningSentOnce)&&("always"!==r||this._ngModelWarningSent)||(t._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{key:"_checkParentType",value:function(){}},{key:"_setUpControl",value:function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}},{key:"isDisabled",set:function(e){}},{key:"path",get:function(){return AP(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(oP)).\u0275fac=function(e){return new(e||lk)(Qf(rP,13),Qf(DS,10),Qf(NS,10),Qf(kS,10),Qf(ek,8))},lk.\u0275dir=$l({type:lk,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ug([mk]),Af,cu]}),lk._ngModelWarningSentOnce=!1,lk),vk={provide:DS,useExisting:sl(function(){return yk}),multi:!0},yk=((fk=function(){function e(){is(this,e),this._validator=FS.nullValidator}return as(e,[{key:"ngOnChanges",value:function(e){"maxlength"in e&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(e){return null!=this.maxlength?this._validator(e):null}},{key:"registerOnValidatorChange",value:function(e){this._onChange=e}},{key:"_createValidator",value:function(){this._validator=FS.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),e}()).\u0275fac=function(e){return new(e||fk)},fk.\u0275dir=$l({type:fk,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,t){2&e&&Bf("maxlength",t.maxlength?t.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Ug([vk]),cu]}),fk),bk=((pk=function e(){is(this,e)}).\u0275mod=Wl({type:pk}),pk.\u0275inj=hl({factory:function(e){return new(e||pk)}}),pk),_k=((hk=function(){function e(){is(this,e)}return as(e,[{key:"group",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(e),r=null,i=null,o=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(r=null!=t.validators?t.validators:null,i=null!=t.asyncValidators?t.asyncValidators:null,o=null!=t.updateOn?t.updateOn:void 0):(r=null!=t.validator?t.validator:null,i=null!=t.asyncValidator?t.asyncValidator:null)),new JP(n,{asyncValidators:i,updateOn:o,validators:r})}},{key:"control",value:function(e,t,n){return new $P(e,t,n)}},{key:"array",value:function(e,t,n){var r=this,i=e.map(function(e){return r._createControl(e)});return new YP(i,t,n)}},{key:"_reduceControls",value:function(e){var t=this,n={};return Object.keys(e).forEach(function(r){n[r]=t._createControl(e[r])}),n}},{key:"_createControl",value:function(e){return e instanceof $P||e instanceof JP||e instanceof YP?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}]),e}()).\u0275fac=function(e){return new(e||hk)},hk.\u0275prov=dl({token:hk,factory:hk.\u0275fac}),hk),wk=((dk=function e(){is(this,e)}).\u0275mod=Wl({type:dk}),dk.\u0275inj=hl({factory:function(e){return new(e||dk)},providers:[hP],imports:[bk]}),dk),Ck=((ck=function(){function e(){is(this,e)}return as(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:ek,useValue:t.warnOnNgModelWithFormControl}]}}}]),e}()).\u0275mod=Wl({type:ck}),ck.\u0275inj=hl({factory:function(e){return new(e||ck)},providers:[_k,hP],imports:[bk]}),ck);try{uk="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(RZ){uk=!1}var xk,Sk,Pk,kk,Ek=((kk=function e(t){is(this,e),this._platformId=t,this.isBrowser=this._platformId?"browser"===this._platformId:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!uk)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}).\u0275fac=function(e){return new(e||kk)(md(Iy))},kk.\u0275prov=dl({factory:function(){return new kk(md(Iy))},token:kk,providedIn:"root"}),kk),Ak=((Pk=function e(){is(this,e)}).\u0275mod=Wl({type:Pk}),Pk.\u0275inj=hl({factory:function(e){return new(e||Pk)}}),Pk);function Ik(e){return function(){if(null==xk&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return xk=!0}}))}finally{xk=xk||!1}return xk}()?e:!!e.capture}function Tk(e){if(function(){if(null==Sk){var e="undefined"!=typeof document?document.head:null;Sk=!(!e||!e.createShadowRoot&&!e.attachShadow)}return Sk}()){var t=e.getRootNode?e.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Ok(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[t.length-1];return Is(r)?(t.pop(),Bs(t,r)):Gs(t)}function Rk(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.length?n.some(function(t){return e[t]}):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}function Vk(){}function Dk(e,t,n){return function(r){return r.lift(new Nk(e,t,n))}}var Nk=function(){function e(t,n,r){is(this,e),this.nextOrObserver=t,this.error=n,this.complete=r}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new Lk(e,this.nextOrObserver,this.error,this.complete))}}]),e}(),Lk=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,e))._tapNext=Vk,a._tapError=Vk,a._tapComplete=Vk,a._tapError=i||Vk,a._tapComplete=o||Vk,Za(r)?(a._context=ts(a),a._tapNext=r):r&&(a._context=r,a._tapNext=r.next||Vk,a._tapError=r.error||Vk,a._tapComplete=r.complete||Vk),a}return as(n,[{key:"_next",value:function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}},{key:"_error",value:function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}]),n}(gs),Fk=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e,r)).scheduler=e,i.work=r,i.pending=!1,i}return as(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}},{key:"requestAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(e.flush.bind(e,this),n)}},{key:"recycleAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}},{key:"execute",value:function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r}},{key:"_unsubscribe",value:function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}]),n}(function(e){Ka(n,e);var t=Xa(n);function n(e,r){return is(this,n),t.call(this)}return as(n,[{key:"schedule",value:function(e){return this}}]),n}(ps)),Mk=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;is(this,e),this.SchedulerAction=t,this.now=n}return as(e,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,e).schedule(n,t)}}]),e}();return e.now=function(){return Date.now()},e}(),qk=function(e){Ka(n,e);var t=Xa(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mk.now;return is(this,n),(r=t.call(this,e,function(){return n.delegate&&n.delegate!==ts(r)?n.delegate.now():i()})).actions=[],r.active=!1,r.scheduled=void 0,r}return as(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,r):Ya(rs(n.prototype),"schedule",this).call(this,e,t,r)}},{key:"flush",value:function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}}]),n}(Mk),jk=new qk(Fk);function Bk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jk;return function(n){return n.lift(new zk(e,t))}}var zk=function(){function e(t,n){is(this,e),this.dueTime=t,this.scheduler=n}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new Uk(e,this.dueTime,this.scheduler))}}]),e}(),Uk=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e)).dueTime=r,o.scheduler=i,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return as(n,[{key:"_next",value:function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Hk,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}},{key:"clearDebounce",value:function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}]),n}(gs);function Hk(e){e.debouncedNext()}function Qk(e,t){return function(n){return n.lift(new Wk(e,t))}}var Wk=function(){function e(t,n){is(this,e),this.predicate=t,this.thisArg=n}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new Gk(e,this.predicate,this.thisArg))}}]),e}(),Gk=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e)).predicate=r,o.thisArg=i,o.count=0,o}return as(n,[{key:"_next",value:function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)}}]),n}(gs),$k=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Jk=new ws(function(e){return e.complete()});function Yk(e){return e?function(e){return new ws(function(t){return e.schedule(function(){return t.complete()})})}(e):Jk}function Kk(e){return function(t){return 0===e?Yk():t.lift(new Zk(e))}}var Zk=function(){function e(t){if(is(this,e),this.total=t,this.total<0)throw new $k}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new Xk(e,this.total))}}]),e}(),Xk=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).total=r,i.count=0,i}return as(n,[{key:"_next",value:function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}]),n}(gs);function eE(e){return null!=e&&""+e!="false"}function tE(e){return Array.isArray(e)?e:[e]}function nE(e){return null==e?"":"string"==typeof e?e:e+"px"}function rE(e){return e instanceof Yg?e.nativeElement:e}function iE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\s+/,n=[];if(null!=e){var r,i=Array.isArray(e)?e:(""+e).split(t),o=Qa(i);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=(""+a).trim();s&&n.push(s)}}catch(l){o.e(l)}finally{o.f()}}return n}var oE,aE,sE,lE=((sE=function(){function e(){is(this,e)}return as(e,[{key:"create",value:function(e){return"undefined"==typeof MutationObserver?null:new MutationObserver(e)}}]),e}()).\u0275fac=function(e){return new(e||sE)},sE.\u0275prov=dl({factory:function(){return new sE},token:sE,providedIn:"root"}),sE),uE=((aE=function(){function e(t){is(this,e),this._mutationObserverFactory=t,this._observedElements=new Map}return as(e,[{key:"ngOnDestroy",value:function(){var e=this;this._observedElements.forEach(function(t,n){return e._cleanupObserver(n)})}},{key:"observe",value:function(e){var t=this,n=rE(e);return new ws(function(e){var r=t._observeElement(n).subscribe(e);return function(){r.unsubscribe(),t._unobserveElement(n)}})}},{key:"_observeElement",value:function(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{var t=new Es,n=this._mutationObserverFactory.create(function(e){return t.next(e)});n&&n.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:n,stream:t,count:1})}return this._observedElements.get(e).stream}},{key:"_unobserveElement",value:function(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}},{key:"_cleanupObserver",value:function(e){if(this._observedElements.has(e)){var t=this._observedElements.get(e),n=t.observer,r=t.stream;n&&n.disconnect(),r.complete(),this._observedElements.delete(e)}}}]),e}()).\u0275fac=function(e){return new(e||aE)(md(lE))},aE.\u0275prov=dl({factory:function(){return new aE(md(lE))},token:aE,providedIn:"root"}),aE),cE=((oE=function e(){is(this,e)}).\u0275mod=Wl({type:oE}),oE.\u0275inj=hl({factory:function(e){return new(e||oE)},providers:[lE]}),oE);function dE(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}var hE,pE,fE=0,mE=new Map,gE=null,vE=((hE=function(){function e(t,n){is(this,e),this._platform=n,this._document=t}return as(e,[{key:"describe",value:function(e,t){this._canBeDescribed(e,t)&&("string"!=typeof t?(this._setMessageId(t),mE.set(t,{messageElement:t,referenceCount:0})):mE.has(t)||this._createMessageElement(t),this._isElementDescribedByMessage(e,t)||this._addMessageReference(e,t))}},{key:"removeDescription",value:function(e,t){if(t&&this._isElementNode(e)){if(this._isElementDescribedByMessage(e,t)&&this._removeMessageReference(e,t),"string"==typeof t){var n=mE.get(t);n&&0===n.referenceCount&&this._deleteMessageElement(t)}gE&&0===gE.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var e=this._document.querySelectorAll("[cdk-describedby-host]"),t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute("cdk-describedby-host");gE&&this._deleteMessagesContainer(),mE.clear()}},{key:"_createMessageElement",value:function(e){var t=this._document.createElement("div");this._setMessageId(t),t.textContent=e,this._createMessagesContainer(),gE.appendChild(t),mE.set(e,{messageElement:t,referenceCount:0})}},{key:"_setMessageId",value:function(e){e.id||(e.id="cdk-describedby-message-"+fE++)}},{key:"_deleteMessageElement",value:function(e){var t=mE.get(e),n=t&&t.messageElement;gE&&n&&gE.removeChild(n),mE.delete(e)}},{key:"_createMessagesContainer",value:function(){if(!gE){var e=!this._platform||!this._platform.EDGE&&!this._platform.TRIDENT,t=this._document.getElementById("cdk-describedby-message-container");t&&t.parentNode&&t.parentNode.removeChild(t),(gE=this._document.createElement("div")).id="cdk-describedby-message-container",gE.classList.add("cdk-visually-hidden"),gE.setAttribute("aria-hidden",e+""),this._document.body.appendChild(gE)}}},{key:"_deleteMessagesContainer",value:function(){gE&&gE.parentNode&&(gE.parentNode.removeChild(gE),gE=null)}},{key:"_removeCdkDescribedByReferenceIds",value:function(e){var t=dE(e,"aria-describedby").filter(function(e){return 0!=e.indexOf("cdk-describedby-message")});e.setAttribute("aria-describedby",t.join(" "))}},{key:"_addMessageReference",value:function(e,t){var n,r,i,o,a=mE.get(t);n=e,r="aria-describedby",i=a.messageElement.id,(o=dE(n,r)).some(function(e){return e.trim()==i.trim()})||(o.push(i.trim()),n.setAttribute(r,o.join(" "))),e.setAttribute("cdk-describedby-host",""),a.referenceCount++}},{key:"_removeMessageReference",value:function(e,t){var n,r,i,o,a=mE.get(t);a.referenceCount--,n=e,r="aria-describedby",i=a.messageElement.id,(o=dE(n,r).filter(function(e){return e!=i.trim()})).length?n.setAttribute(r,o.join(" ")):n.removeAttribute(r),e.removeAttribute("cdk-describedby-host")}},{key:"_isElementDescribedByMessage",value:function(e,t){var n=dE(e,"aria-describedby"),r=mE.get(t),i=r&&r.messageElement.id;return!!i&&-1!=n.indexOf(i)}},{key:"_canBeDescribed",value:function(e,t){if(!this._isElementNode(e))return!1;if(t&&"object"==typeof t)return!0;var n=null==t?"":(""+t).trim(),r=e.getAttribute("aria-label");return!(!n||r&&r.trim()===n)}},{key:"_isElementNode",value:function(e){return e.nodeType===this._document.ELEMENT_NODE}}]),e}()).\u0275fac=function(e){return new(e||hE)(md(Cb),md(Ek))},hE.\u0275prov=dl({factory:function(){return new hE(md(Cb),md(Ek))},token:hE,providedIn:"root"}),hE),yE=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return as(n,[{key:"setActiveItem",value:function(e){this.activeItem&&this.activeItem.setInactiveStyles(),Ya(rs(n.prototype),"setActiveItem",this).call(this,e),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(function(){function e(t){var n=this;is(this,e),this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Es,this._typeaheadSubscription=ps.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=function(e){return e.disabled},this._pressedLetters=[],this.tabOut=new Es,this.change=new Es,t instanceof ry&&t.changes.subscribe(function(e){if(n._activeItem){var t=e.toArray().indexOf(n._activeItem);t>-1&&t!==n._activeItemIndex&&(n._activeItemIndex=t)}})}return as(e,[{key:"skipPredicate",value:function(e){return this._skipPredicateFn=e,this}},{key:"withWrap",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=e,this}},{key:"withVerticalOrientation",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=e,this}},{key:"withHorizontalOrientation",value:function(e){return this._horizontal=e,this}},{key:"withAllowedModifierKeys",value:function(e){return this._allowedModifierKeys=e,this}},{key:"withTypeAhead",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Dk(function(t){return e._pressedLetters.push(t)}),Bk(t),Qk(function(){return e._pressedLetters.length>0}),Ms(function(){return e._pressedLetters.join("")})).subscribe(function(t){for(var n=e._getItemsArray(),r=1;r<n.length+1;r++){var i=(e._activeItemIndex+r)%n.length,o=n[i];if(!e._skipPredicateFn(o)&&0===o.getLabel().toUpperCase().trim().indexOf(t)){e.setActiveItem(i);break}}e._pressedLetters=[]}),this}},{key:"withHomeAndEnd",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=e,this}},{key:"setActiveItem",value:function(e){var t=this._activeItem;this.updateActiveItem(e),this._activeItem!==t&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(e){var t=this,n=e.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(function(n){return!e[n]||t._allowedModifierKeys.indexOf(n)>-1});switch(n){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;default:return void((r||Rk(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],e.preventDefault()}},{key:"isTyping",value:function(){return this._pressedLetters.length>0}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(e){var t=this._getItemsArray(),n="number"==typeof e?e:t.indexOf(e),r=t[n];this._activeItem=null==r?null:r,this._activeItemIndex=n}},{key:"_setActiveItemByDelta",value:function(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}},{key:"_setActiveInWrapMode",value:function(e){for(var t=this._getItemsArray(),n=1;n<=t.length;n++){var r=(this._activeItemIndex+e*n+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}},{key:"_setActiveInDefaultMode",value:function(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}},{key:"_setActiveItemByIndex",value:function(e,t){var n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(!n[e+=t])return;this.setActiveItem(e)}}},{key:"_getItemsArray",value:function(){return this._items instanceof ry?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),e}()),bE=((pE=function(){function e(t){is(this,e),this._platform=t}return as(e,[{key:"isDisabled",value:function(e){return e.hasAttribute("disabled")}},{key:"isVisible",value:function(e){return function(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}},{key:"isTabbable",value:function(e){if(!this._platform.isBrowser)return!1;var t,n=function(e){try{return e.frameElement}catch(RZ){return null}}((t=e).ownerDocument&&t.ownerDocument.defaultView||window);if(n){if(-1===wE(n))return!1;if(!this.isVisible(n))return!1}var r=e.nodeName.toLowerCase(),i=wE(e);return e.hasAttribute("contenteditable")?-1!==i:"iframe"!==r&&"object"!==r&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==i:"video"===r?-1!==i&&(null!==i||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}},{key:"isFocusable",value:function(e,t){return function(e){return!function(e){return function(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function(e){return function(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||_E(e))}(e)&&!this.isDisabled(e)&&((null==t?void 0:t.ignoreVisibility)||this.isVisible(e))}}]),e}()).\u0275fac=function(e){return new(e||pE)(md(Ek))},pE.\u0275prov=dl({factory:function(){return new pE(md(Ek))},token:pE,providedIn:"root"}),pE);function _E(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function wE(e){if(!_E(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var CE,xE,SE=function(){function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];is(this,e),this._element=t,this._checker=n,this._ngZone=r,this._document=i,this._hasAttached=!1,this.startAnchorListener=function(){return o.focusLastTabbableElement()},this.endAnchorListener=function(){return o.focusFirstTabbableElement()},this._enabled=!0,a||this.attachAnchors()}return as(e,[{key:"destroy",value:function(){var e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),t&&(t.removeEventListener("focus",this.endAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",e.startAnchorListener)),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",e.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusInitialElement())})})}},{key:"focusFirstTabbableElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusFirstTabbableElement())})})}},{key:"focusLastTabbableElementWhenReady",value:function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusLastTabbableElement())})})}},{key:"_getRegionBoundary",value:function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-".concat(e,"], [cdkFocusRegion").concat(e,"], [cdk-focus-").concat(e,"]")),n=0;n<t.length;n++)t[n].hasAttribute("cdk-focus-"+e)?console.warn("Found use of deprecated attribute 'cdk-focus-".concat(e,"', use 'cdkFocusRegion").concat(e,"' instead. The deprecated attribute will be removed in 8.0.0."),t[n]):t[n].hasAttribute("cdk-focus-region-"+e)&&console.warn("Found use of deprecated attribute 'cdk-focus-region-".concat(e,"', use 'cdkFocusRegion").concat(e,"' instead. The deprecated attribute will be removed in 8.0.0."),t[n]);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}},{key:"focusInitialElement",value:function(){var e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return e?(e.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",e),e.focus(),!0):this.focusFirstTabbableElement()}},{key:"focusFirstTabbableElement",value:function(){var e=this._getRegionBoundary("start");return e&&e.focus(),!!e}},{key:"focusLastTabbableElement",value:function(){var e=this._getRegionBoundary("end");return e&&e.focus(),!!e}},{key:"hasAttached",value:function(){return this._hasAttached}},{key:"_getFirstTabbableElement",value:function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=0;n<t.length;n++){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null}},{key:"_getLastTabbableElement",value:function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=t.length-1;n>=0;n--){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}},{key:"_createAnchor",value:function(){var e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}},{key:"_toggleAnchorTabIndex",value:function(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}},{key:"_executeOnStable",value:function(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(Kk(1)).subscribe(e)}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}}]),e}(),PE=((xE=function(){function e(t,n,r){is(this,e),this._checker=t,this._ngZone=n,this._document=r}return as(e,[{key:"create",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new SE(e,this._checker,this._ngZone,this._document,t)}}]),e}()).\u0275fac=function(e){return new(e||xE)(md(bE),md(Hy),md(Cb))},xE.\u0275prov=dl({factory:function(){return new xE(md(bE),md(Hy),md(Cb))},token:xE,providedIn:"root"}),xE),kE=((CE=function(){function e(t,n,r){is(this,e),this._elementRef=t,this._focusTrapFactory=n,this._previouslyFocusedElement=null,this._document=r,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return as(e,[{key:"ngOnDestroy",value:function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}},{key:"ngAfterContentInit",value:function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}},{key:"ngDoCheck",value:function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}},{key:"ngOnChanges",value:function(e){var t=e.autoCapture;t&&!t.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}},{key:"_captureFocus",value:function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}},{key:"enabled",get:function(){return this.focusTrap.enabled},set:function(e){this.focusTrap.enabled=eE(e)}},{key:"autoCapture",get:function(){return this._autoCapture},set:function(e){this._autoCapture=eE(e)}}]),e}()).\u0275fac=function(e){return new(e||CE)(Qf(Yg),Qf(PE),Qf(Cb))},CE.\u0275dir=$l({type:CE,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[cu]}),CE);"undefined"!=typeof Element&&Element;var EE,AE,IE=new $c("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),TE=new $c("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),OE=((AE=function(){function e(t,n,r,i){is(this,e),this._ngZone=n,this._defaultOptions=i,this._document=r,this._liveElement=t||this._createLiveElement()}return as(e,[{key:"announce",value:function(e){for(var t,n,r,i=this,o=this._defaultOptions,a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];return 1===s.length&&"number"==typeof s[0]?r=s[0]:(n=(t=Ua(s,2))[0],r=t[1]),this.clear(),clearTimeout(this._previousTimeout),n||(n=o&&o.politeness?o.politeness:"polite"),null==r&&o&&(r=o.duration),this._liveElement.setAttribute("aria-live",n),this._ngZone.runOutsideAngular(function(){return new Promise(function(t){clearTimeout(i._previousTimeout),i._previousTimeout=setTimeout(function(){i._liveElement.textContent=e,t(),"number"==typeof r&&(i._previousTimeout=setTimeout(function(){return i.clear()},r))},100)})})}},{key:"clear",value:function(){this._liveElement&&(this._liveElement.textContent="")}},{key:"ngOnDestroy",value:function(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}},{key:"_createLiveElement",value:function(){for(var e=this._document.getElementsByClassName("cdk-live-announcer-element"),t=this._document.createElement("div"),n=0;n<e.length;n++)e[n].parentNode.removeChild(e[n]);return t.classList.add("cdk-live-announcer-element"),t.classList.add("cdk-visually-hidden"),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),t}}]),e}()).\u0275fac=function(e){return new(e||AE)(md(IE,8),md(Hy),md(Cb),md(TE,8))},AE.\u0275prov=dl({factory:function(){return new AE(md(IE,8),md(Hy),md(Cb),md(TE,8))},token:AE,providedIn:"root"}),AE),RE=((EE=function(){function e(t,n,r,i){is(this,e),this._elementRef=t,this._liveAnnouncer=n,this._contentObserver=r,this._ngZone=i,this._politeness="polite"}return as(e,[{key:"ngOnDestroy",value:function(){this._subscription&&this._subscription.unsubscribe()}},{key:"politeness",get:function(){return this._politeness},set:function(e){var t=this;this._politeness="off"===e||"assertive"===e?e:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(function(){return t._contentObserver.observe(t._elementRef).subscribe(function(){var e=t._elementRef.nativeElement.textContent;e!==t._previousAnnouncedText&&(t._liveAnnouncer.announce(e,t._politeness),t._previousAnnouncedText=e)})}))}}]),e}()).\u0275fac=function(e){return new(e||EE)(Qf(Yg),Qf(OE),Qf(uE),Qf(Hy))},EE.\u0275dir=$l({type:EE,selectors:[["","cdkAriaLive",""]],inputs:{politeness:["cdkAriaLive","politeness"]},exportAs:["cdkAriaLive"]}),EE);function VE(e){return 0===e.buttons}var DE,NE=new $c("cdk-focus-monitor-default-options"),LE=Ik({passive:!0,capture:!0}),FE=((DE=function(){function e(t,n,r,i){var o=this;is(this,e),this._ngZone=t,this._platform=n,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=function(){o._lastTouchTarget=null,o._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=function(e){if(!o._lastTouchTarget){var t=VE(e)?"keyboard":"mouse";o._setOriginForCurrentEventQueue(t)}},this._documentTouchstartListener=function(e){null!=o._touchTimeoutId&&clearTimeout(o._touchTimeoutId),o._lastTouchTarget=ME(e),o._touchTimeoutId=setTimeout(function(){return o._lastTouchTarget=null},650)},this._windowFocusListener=function(){o._windowFocused=!0,o._windowFocusTimeoutId=setTimeout(function(){return o._windowFocused=!1})},this._rootNodeFocusAndBlurListener=function(e){for(var t=ME(e),n="focus"===e.type?o._onFocus:o._onBlur,r=t;r;r=r.parentElement)n.call(o,e,r)},this._document=r,this._detectionMode=(null==i?void 0:i.detectionMode)||0}return as(e,[{key:"monitor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=rE(e);if(!this._platform.isBrowser||1!==n.nodeType)return Ok(null);var r=Tk(n)||this._getDocument(),i=this._elementInfo.get(n);if(i)return t&&(i.checkChildren=!0),i.subject;var o={checkChildren:t,subject:new Es,rootNode:r};return this._elementInfo.set(n,o),this._registerGlobalListeners(o),o.subject}},{key:"stopMonitoring",value:function(e){var t=rE(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))}},{key:"focusVia",value:function(e,t,n){var r=rE(e);r===this._getDocument().activeElement&&this._elementInfo.has(r)?this._originChanged(r,t,this._elementInfo.get(r)):(this._setOriginForCurrentEventQueue(t),"function"==typeof r.focus&&r.focus(n))}},{key:"ngOnDestroy",value:function(){var e=this;this._elementInfo.forEach(function(t,n){return e.stopMonitoring(n)})}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(e,t,n){n?e.classList.add(t):e.classList.remove(t)}},{key:"_getFocusOrigin",value:function(e){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"}},{key:"_setClasses",value:function(e,t){this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t)}},{key:"_setOriginForCurrentEventQueue",value:function(e){var t=this;this._ngZone.runOutsideAngular(function(){t._origin=e,0===t._detectionMode&&(t._originTimeoutId=setTimeout(function(){return t._origin=null},1))})}},{key:"_wasCausedByTouch",value:function(e){var t=ME(e);return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(e,t){var n=this._elementInfo.get(t);n&&(n.checkChildren||t===ME(e))&&this._originChanged(t,this._getFocusOrigin(e),n)}},{key:"_onBlur",value:function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(e,t){this._ngZone.run(function(){return e.next(t)})}},{key:"_registerGlobalListeners",value:function(e){var t=this;if(this._platform.isBrowser){var n=e.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(function(){n.addEventListener("focus",t._rootNodeFocusAndBlurListener,LE),n.addEventListener("blur",t._rootNodeFocusAndBlurListener,LE)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(function(){var e=t._getDocument(),n=t._getWindow();e.addEventListener("keydown",t._documentKeydownListener,LE),e.addEventListener("mousedown",t._documentMousedownListener,LE),e.addEventListener("touchstart",t._documentTouchstartListener,LE),n.addEventListener("focus",t._windowFocusListener)})}}},{key:"_removeGlobalListeners",value:function(e){var t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){var n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,LE),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,LE),this._rootNodeFocusListenerCount.delete(t))}if(!--this._monitoredElementCount){var r=this._getDocument(),i=this._getWindow();r.removeEventListener("keydown",this._documentKeydownListener,LE),r.removeEventListener("mousedown",this._documentMousedownListener,LE),r.removeEventListener("touchstart",this._documentTouchstartListener,LE),i.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}},{key:"_originChanged",value:function(e,t,n){this._setClasses(e,t),this._emitOrigin(n.subject,t),this._lastFocusOrigin=t}}]),e}()).\u0275fac=function(e){return new(e||DE)(md(Hy),md(Ek),md(Cb,8),md(NE,8))},DE.\u0275prov=dl({factory:function(){return new DE(md(Hy),md(Ek),md(Cb,8),md(NE,8))},token:DE,providedIn:"root"}),DE);function ME(e){return e.composedPath?e.composedPath()[0]:e.target}var qE,jE,BE,zE,UE,HE=((BE=function(){function e(t,n){is(this,e),this._elementRef=t,this._focusMonitor=n,this.cdkFocusChange=new ty}return as(e,[{key:"ngAfterViewInit",value:function(){var e=this,t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(t){return e.cdkFocusChange.emit(t)})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||BE)(Qf(Yg),Qf(FE))},BE.\u0275dir=$l({type:BE,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),BE),QE=((jE=function(){function e(t,n){is(this,e),this._platform=t,this._document=n}return as(e,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);var t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,r=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(e),r){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(this._platform.isBrowser&&this._document.body){var e=this._document.body.classList;e.remove("cdk-high-contrast-active"),e.remove("cdk-high-contrast-black-on-white"),e.remove("cdk-high-contrast-white-on-black");var t=this.getHighContrastMode();1===t?(e.add("cdk-high-contrast-active"),e.add("cdk-high-contrast-black-on-white")):2===t&&(e.add("cdk-high-contrast-active"),e.add("cdk-high-contrast-white-on-black"))}}}]),e}()).\u0275fac=function(e){return new(e||jE)(md(Ek),md(Cb))},jE.\u0275prov=dl({factory:function(){return new jE(md(Ek),md(Cb))},token:jE,providedIn:"root"}),jE),WE=((qE=function e(t){is(this,e),t._applyBodyHighContrastModeCssClasses()}).\u0275mod=Wl({type:qE}),qE.\u0275inj=hl({factory:function(e){return new(e||qE)(md(QE))},imports:[[Ak,cE]]}),qE),GE=new $c("cdk-dir-doc",{providedIn:"root",factory:function(){return vd(Cb)}}),$E=((UE=function(){function e(t){if(is(this,e),this.value="ltr",this.change=new ty,t){var n=t.documentElement?t.documentElement.dir:null,r=(t.body?t.body.dir:null)||n;this.value="ltr"===r||"rtl"===r?r:"ltr"}}return as(e,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),e}()).\u0275fac=function(e){return new(e||UE)(md(GE,8))},UE.\u0275prov=dl({factory:function(){return new UE(md(GE,8))},token:UE,providedIn:"root"}),UE),JE=((zE=function e(){is(this,e)}).\u0275mod=Wl({type:zE}),zE.\u0275inj=hl({factory:function(e){return new(e||zE)}}),zE),YE=new tv("11.0.1");function KE(){return Ws(1)}function ZE(){return KE()(Ok.apply(void 0,arguments))}function XE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[t.length-1];return Is(r)?(t.pop(),function(e){return ZE(t,e,r)}):function(e){return ZE(t,e)}}function eA(e,t){if(1&e&&Yf(0,"mat-pseudo-checkbox",3),2&e){var n=sm();Wf("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}var tA,nA=["*"],rA=new tv("11.0.1"),iA=new $c("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),oA=((tA=function(){function e(t,n,r){is(this,e),this._hasDoneGlobalChecks=!1,this._document=r,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=n,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return as(e,[{key:"_getWindow",value:function(){var e=this._document.defaultView||window;return"object"==typeof e&&e?e:null}},{key:"_checksAreEnabled",value:function(){return Od()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var e=this._getWindow();return e&&(e.__karma__||e.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){if(this._checksAreEnabled()&&!1!==this._sanityChecks&&this._sanityChecks.theme&&this._document.body&&"function"==typeof getComputedStyle){var e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e);var t=getComputedStyle(e);t&&"none"!==t.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(e)}}},{key:"_checkCdkVersionMatch",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&rA.full!==YE.full&&console.warn("The Angular Material version ("+rA.full+") does not match the Angular CDK version ("+YE.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),e}()).\u0275mod=Wl({type:tA}),tA.\u0275inj=hl({factory:function(e){return new(e||tA)(md(QE),md(iA,8),md(Cb))},imports:[[JE],JE]}),tA);function aA(e){return function(e){Ka(n,e);var t=Xa(n);function n(){var e;is(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i)))._disabled=!1,e}return as(n,[{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=eE(e)}}]),n}(e)}function sA(e,t){return function(e){Ka(r,e);var n=Xa(r);function r(){var e;is(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(e=n.call.apply(n,[this].concat(o))).defaultColor=t,e.color=t,e}return as(r,[{key:"color",get:function(){return this._color},set:function(e){var t=e||this.defaultColor;t!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),t&&this._elementRef.nativeElement.classList.add("mat-"+t),this._color=t)}}]),r}(e)}function lA(e){return function(e){Ka(n,e);var t=Xa(n);function n(){var e;is(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i)))._disableRipple=!1,e}return as(n,[{key:"disableRipple",get:function(){return this._disableRipple},set:function(e){this._disableRipple=eE(e)}}]),n}(e)}var uA,cA=new $c("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return vd(Ry)}}),dA=function(){function e(){is(this,e),this._localeChanges=new Es,this.localeChanges=this._localeChanges}return as(e,[{key:"getValidDateOrNull",value:function(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}},{key:"deserialize",value:function(e){return null==e||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}},{key:"setLocale",value:function(e){this.locale=e,this._localeChanges.next()}},{key:"compareDate",value:function(e,t){return this.getYear(e)-this.getYear(t)||this.getMonth(e)-this.getMonth(t)||this.getDate(e)-this.getDate(t)}},{key:"sameDate",value:function(e,t){if(e&&t){var n=this.isValid(e),r=this.isValid(t);return n&&r?!this.compareDate(e,t):n==r}return e==t}},{key:"clampDate",value:function(e,t,n){return t&&this.compareDate(e,t)<0?t:n&&this.compareDate(e,n)>0?n:e}}]),e}(),hA=new $c("mat-date-formats");try{uA="undefined"!=typeof Intl}catch(RZ){uA=!1}var pA={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},fA=vA(31,function(e){return String(e+1)}),mA={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},gA=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function vA(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t(r);return n}var yA,bA,_A,wA,CA,xA,SA,PA,kA,EA,AA,IA=((bA=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i,o;return is(this,n),(o=t.call(this)).useUtcForDisplay=!0,Ya((i=ts(o),rs(n.prototype)),"setLocale",i).call(i,e),o.useUtcForDisplay=!r.TRIDENT,o._clampDate=r.TRIDENT||r.EDGE,o}return as(n,[{key:"getYear",value:function(e){return e.getFullYear()}},{key:"getMonth",value:function(e){return e.getMonth()}},{key:"getDate",value:function(e){return e.getDate()}},{key:"getDayOfWeek",value:function(e){return e.getDay()}},{key:"getMonthNames",value:function(e){var t=this;if(uA){var n=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return vA(12,function(e){return t._stripDirectionalityCharacters(t._format(n,new Date(2017,e,1)))})}return pA[e]}},{key:"getDateNames",value:function(){var e=this;if(uA){var t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return vA(31,function(n){return e._stripDirectionalityCharacters(e._format(t,new Date(2017,0,n+1)))})}return fA}},{key:"getDayOfWeekNames",value:function(e){var t=this;if(uA){var n=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return vA(7,function(e){return t._stripDirectionalityCharacters(t._format(n,new Date(2017,0,e+1)))})}return mA[e]}},{key:"getYearName",value:function(e){if(uA){var t=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(t,e))}return String(this.getYear(e))}},{key:"getFirstDayOfWeek",value:function(){return 0}},{key:"getNumDaysInMonth",value:function(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))}},{key:"clone",value:function(e){return new Date(e.getTime())}},{key:"createDate",value:function(e,t,n){var r=this._createDateWithOverflow(e,t,n);return r.getMonth(),r}},{key:"today",value:function(){return new Date}},{key:"parse",value:function(e){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null}},{key:"format",value:function(e,t){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");if(uA){this._clampDate&&(e.getFullYear()<1||e.getFullYear()>9999)&&(e=this.clone(e)).setFullYear(Math.max(1,Math.min(9999,e.getFullYear()))),t=Object.assign(Object.assign({},t),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,t);return this._stripDirectionalityCharacters(this._format(n,e))}return this._stripDirectionalityCharacters(e.toDateString())}},{key:"addCalendarYears",value:function(e,t){return this.addCalendarMonths(e,12*t)}},{key:"addCalendarMonths",value:function(e,t){var n=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(n)!=((this.getMonth(e)+t)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(e,t){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+t)}},{key:"toIso8601",value:function(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")}},{key:"deserialize",value:function(e){if("string"==typeof e){if(!e)return null;if(gA.test(e)){var t=new Date(e);if(this.isValid(t))return t}}return Ya(rs(n.prototype),"deserialize",this).call(this,e)}},{key:"isDateInstance",value:function(e){return e instanceof Date}},{key:"isValid",value:function(e){return!isNaN(e.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(e,t,n){var r=new Date;return r.setFullYear(e,t,n),r.setHours(0,0,0,0),r}},{key:"_2digit",value:function(e){return("00"+e).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(e){return e.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(e,t){var n=new Date;return n.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e.format(n)}}]),n}(dA)).\u0275fac=function(e){return new(e||bA)(md(cA,8),md(Ek))},bA.\u0275prov=dl({token:bA,factory:bA.\u0275fac}),bA),TA=((yA=function e(){is(this,e)}).\u0275mod=Wl({type:yA}),yA.\u0275inj=hl({factory:function(e){return new(e||yA)},providers:[{provide:dA,useClass:IA}],imports:[[Ak]]}),yA),OA={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},RA=((_A=function e(){is(this,e)}).\u0275mod=Wl({type:_A}),_A.\u0275inj=hl({factory:function(e){return new(e||_A)},providers:[{provide:hA,useValue:OA}],imports:[[TA]]}),_A),VA=function(){function e(t,n,r){is(this,e),this._renderer=t,this.element=n,this.config=r,this.state=3}return as(e,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),e}(),DA={enterDuration:450,exitDuration:400},NA=Ik({passive:!0}),LA=["mousedown","touchstart"],FA=["mouseup","mouseleave","touchend","touchcancel"],MA=function(){function e(t,n,r,i){is(this,e),this._target=t,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,i.isBrowser&&(this._containerElement=rE(r))}return as(e,[{key:"fadeInRipple",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Object.assign(Object.assign({},DA),r.animation);r.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);var a=r.radius||function(e,t,n){var r=Math.max(Math.abs(e-n.left),Math.abs(e-n.right)),i=Math.max(Math.abs(t-n.top),Math.abs(t-n.bottom));return Math.sqrt(r*r+i*i)}(e,t,i),s=e-i.left,l=t-i.top,u=o.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=s-a+"px",c.style.top=l-a+"px",c.style.height=2*a+"px",c.style.width=2*a+"px",null!=r.color&&(c.style.backgroundColor=r.color),c.style.transitionDuration=u+"ms",this._containerElement.appendChild(c),window.getComputedStyle(c).getPropertyValue("opacity"),c.style.transform="scale(1)";var d=new VA(this,c,r);return d.state=0,this._activeRipples.add(d),r.persistent||(this._mostRecentTransientRipple=d),this._runTimeoutOutsideZone(function(){var e=d===n._mostRecentTransientRipple;d.state=1,r.persistent||e&&n._isPointerDown||d.fadeOut()},u),d}},{key:"fadeOutRipple",value:function(e){var t=this._activeRipples.delete(e);if(e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),t){var n=e.element,r=Object.assign(Object.assign({},DA),e.config.animation);n.style.transitionDuration=r.exitDuration+"ms",n.style.opacity="0",e.state=2,this._runTimeoutOutsideZone(function(){e.state=3,n.parentNode.removeChild(n)},r.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(e){return e.fadeOut()})}},{key:"setupTriggerEvents",value:function(e){var t=rE(e);t&&t!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=t,this._registerEvents(LA))}},{key:"handleEvent",value:function(e){"mousedown"===e.type?this._onMousedown(e):"touchstart"===e.type?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(FA),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(e){var t=VE(e),n=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||t||n||(this._isPointerDown=!0,this.fadeInRipple(e.clientX,e.clientY,this._target.rippleConfig))}},{key:"_onTouchStart",value:function(e){if(!this._target.rippleDisabled){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;for(var t=e.changedTouches,n=0;n<t.length;n++)this.fadeInRipple(t[n].clientX,t[n].clientY,this._target.rippleConfig)}}},{key:"_onPointerUp",value:function(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(function(e){!e.config.persistent&&(1===e.state||e.config.terminateOnPointerUp&&0===e.state)&&e.fadeOut()}))}},{key:"_runTimeoutOutsideZone",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(e,t)})}},{key:"_registerEvents",value:function(e){var t=this;this._ngZone.runOutsideAngular(function(){e.forEach(function(e){t._triggerElement.addEventListener(e,t,NA)})})}},{key:"_removeTriggerEvents",value:function(){var e=this;this._triggerElement&&(LA.forEach(function(t){e._triggerElement.removeEventListener(t,e,NA)}),this._pointerUpEventsRegistered&&FA.forEach(function(t){e._triggerElement.removeEventListener(t,e,NA)}))}}]),e}(),qA=new $c("mat-ripple-global-options"),jA=((SA=function(){function e(t,n,r,i,o){is(this,e),this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=i||{},this._rippleRenderer=new MA(this,n,t,r)}return as(e,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,t,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),e))}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=e,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}}]),e}()).\u0275fac=function(e){return new(e||SA)(Qf(Yg),Qf(Hy),Qf(Ek),Qf(qA,8),Qf(_S,8))},SA.\u0275dir=$l({type:SA,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,t){2&e&&gm("mat-ripple-unbounded",t.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),SA),BA=((xA=function e(){is(this,e)}).\u0275mod=Wl({type:xA}),xA.\u0275inj=hl({factory:function(e){return new(e||xA)},imports:[[oA,Ak],oA]}),xA),zA=((CA=function e(t){is(this,e),this._animationMode=t,this.state="unchecked",this.disabled=!1}).\u0275fac=function(e){return new(e||CA)(Qf(_S,8))},CA.\u0275cmp=zl({type:CA,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,t){2&e&&gm("mat-pseudo-checkbox-indeterminate","indeterminate"===t.state)("mat-pseudo-checkbox-checked","checked"===t.state)("mat-pseudo-checkbox-disabled",t.disabled)("_mat-animation-noopable","NoopAnimations"===t._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,t){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),CA),UA=((wA=function e(){is(this,e)}).\u0275mod=Wl({type:wA}),wA.\u0275inj=hl({factory:function(e){return new(e||wA)},imports:[[oA]]}),wA),HA=aA(function e(){is(this,e)}),QA=0,WA=((PA=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.apply(this,arguments))._labelId="mat-optgroup-label-"+QA++,e}return n}(HA)).\u0275fac=function(e){return GA(e||PA)},PA.\u0275dir=$l({type:PA,inputs:{label:"label"},features:[Af]}),PA),GA=Wc(WA),$A=new $c("MatOptgroup"),JA=0,YA=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];is(this,e),this.source=t,this.isUserInput=n},KA=new $c("MAT_OPTION_PARENT_COMPONENT"),ZA=((AA=function(){function e(t,n,r,i){is(this,e),this._element=t,this._changeDetectorRef=n,this._parent=r,this.group=i,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+JA++,this.onSelectionChange=new ty,this._stateChanges=new Es}return as(e,[{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(e,t){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(t)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(e){13!==e.keyCode&&32!==e.keyCode||Rk(e)||(this._selectViaInteraction(),e.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new YA(this,e))}},{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(e){this._disabled=eE(e)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}}]),e}()).\u0275fac=function(e){return new(e||AA)(Qf(Yg),Qf(bv),Qf(void 0),Qf(WA))},AA.\u0275dir=$l({type:AA,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),AA),XA=((EA=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){return is(this,n),t.call(this,e,r,i,o)}return n}(ZA)).\u0275fac=function(e){return new(e||EA)(Qf(Yg),Qf(bv),Qf(KA,8),Qf($A,8))},EA.\u0275cmp=zl({type:EA,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(e,t){1&e&&nm("click",function(){return t._selectViaInteraction()})("keydown",function(e){return t._handleKeydown(e)}),2&e&&(km("id",t.id),Bf("tabindex",t._getTabIndex())("aria-selected",t._getAriaSelected())("aria-disabled",t.disabled.toString()),gm("mat-selected",t.selected)("mat-option-multiple",t.multiple)("mat-active",t.active)("mat-option-disabled",t.disabled))},exportAs:["matOption"],features:[Af],ngContentSelectors:nA,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(e,t){1&e&&(um(),Uf(0,eA,1,2,"mat-pseudo-checkbox",0),$f(1,"span",1),cm(2),Jf(),Yf(3,"div",2)),2&e&&(Wf("ngIf",t.multiple),dp(3),Wf("matRippleTrigger",t._getHostElement())("matRippleDisabled",t.disabled||t.disableRipple))},directives:[M_,jA,zA],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),EA),eI=((kA=function e(){is(this,e)}).\u0275mod=Wl({type:kA}),kA.\u0275inj=hl({factory:function(e){return new(e||kA)},imports:[[BA,lw,oA,UA]]}),kA);function tI(e){return new ws(function(t){var n;try{n=e()}catch(r){return void t.error(r)}return(n?zs(n):Yk()).subscribe(t)})}function nI(e,t,n,r){return Za(n)&&(r=n,n=void 0),r?nI(e,t,n).pipe(Ms(function(e){return us(e)?r.apply(void 0,Ha(e)):r(e)})):new ws(function(r){rI(e,t,function(e){r.next(arguments.length>1?Array.prototype.slice.call(arguments):e)},r,n)})}function rI(e,t,n,r,i){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var a=e;e.addEventListener(t,n,i),o=function(){return a.removeEventListener(t,n,i)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var s=e;e.on(t,n),o=function(){return s.off(t,n)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var l=e;e.addListener(t,n),o=function(){return l.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,c=e.length;u<c;u++)rI(e[u],t,n,r,i)}r.add(o)}var iI=function(){function e(t){is(this,e),this.durationSelector=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new oI(e,this.durationSelector))}}]),e}(),oI=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).durationSelector=r,i.hasValue=!1,i}return as(n,[{key:"_next",value:function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t;try{t=(0,this.durationSelector)(e)}catch(r){return this.destination.error(r)}var n=Ls(this,t);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},{key:"clearThrottle",value:function(){var e=this.value,t=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),t&&(this.value=null,this.hasValue=!1,this.destination.next(e))}},{key:"notifyNext",value:function(e,t,n,r){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),n}(Fs);function aI(e){return!us(e)&&e-parseFloat(e)+1>=0}function sI(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=-1;return aI(t)?r=Number(t)<1?1:Number(t):Is(t)&&(n=t),Is(n)||(n=jk),new ws(function(t){var i=aI(e)?e:+e-n.now();return n.schedule(lI,i,{index:0,period:r,subscriber:t})})}function lI(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}function uI(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jk;return t=function(){return sI(e,n)},function(e){return e.lift(new iI(t))}}function cI(e){return function(t){return t.lift(new dI(e))}}var dI=function(){function e(t){is(this,e),this.notifier=t}return as(e,[{key:"call",value:function(e,t){var n=new hI(e),r=Ls(n,this.notifier);return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n}}]),e}(),hI=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this,e)).seenValue=!1,r}return as(n,[{key:"notifyNext",value:function(e,t,n,r,i){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(Fs);function pI(e,t){return"function"==typeof t?function(n){return n.pipe(pI(function(n,r){return zs(e(n,r)).pipe(Ms(function(e,i){return t(n,e,r,i)}))}))}:function(t){return t.lift(new wI(e))}}var fI,mI,gI,vI,yI,bI,_I,wI=function(){function e(t){is(this,e),this.project=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new CI(e,this.project))}}]),e}(),CI=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).project=r,i.index=0,i}return as(n,[{key:"_next",value:function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this._innerSub(t,e,n)}},{key:"_innerSub",value:function(e,t,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new Ts(this,t,n),o=this.destination;o.add(i),this.innerSubscription=Ls(this,e,void 0,void 0,i),this.innerSubscription!==i&&o.add(this.innerSubscription)}},{key:"_complete",value:function(){var e=this.innerSubscription;e&&!e.closed||Ya(rs(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=null}},{key:"notifyComplete",value:function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&Ya(rs(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}}]),n}(Fs),xI=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e,r)).scheduler=e,i.work=r,i}return as(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t>0?Ya(rs(n.prototype),"schedule",this).call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}},{key:"execute",value:function(e,t){return t>0||this.closed?Ya(rs(n.prototype),"execute",this).call(this,e,t):this._execute(e,t)}},{key:"requestAsyncId",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==r&&r>0||null===r&&this.delay>0?Ya(rs(n.prototype),"requestAsyncId",this).call(this,e,t,r):e.flush(this)}}]),n}(Fk),SI=new(function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return n}(qk))(xI),PI=((fI=function(){function e(t,n,r){is(this,e),this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}return as(e,[{key:"observe",value:function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}},{key:"do",value:function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}},{key:"accept",value:function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Ok(this.value);case"E":return e=this.error,new ws(function(t){return t.error(e)});case"C":return Yk()}var e;throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}},{key:"createError",value:function(t){return new e("E",void 0,t)}},{key:"createComplete",value:function(){return e.completeNotification}}]),e}()).completeNotification=new fI("C"),fI.undefinedValueNotification=new fI("N",void 0),fI),kI=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return is(this,n),(i=t.call(this,e)).scheduler=r,i.delay=o,i}return as(n,[{key:"scheduleMessage",value:function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new EI(e,this.destination)))}},{key:"_next",value:function(e){this.scheduleMessage(PI.createNext(e))}},{key:"_error",value:function(e){this.scheduleMessage(PI.createError(e)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(PI.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()}}]),n}(gs),EI=function e(t,n){is(this,e),this.notification=t,this.destination=n},AI=function(e){Ka(n,e);var t=Xa(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,o=arguments.length>2?arguments[2]:void 0;return is(this,n),(e=t.call(this)).scheduler=o,e._events=[],e._infiniteTimeWindow=!1,e._bufferSize=r<1?1:r,e._windowTime=i<1?1:i,i===Number.POSITIVE_INFINITY?(e._infiniteTimeWindow=!0,e.next=e.nextInfiniteTimeWindow):e.next=e.nextTimeWindow,e}return as(n,[{key:"nextInfiniteTimeWindow",value:function(e){var t=this._events;t.push(e),t.length>this._bufferSize&&t.shift(),Ya(rs(n.prototype),"next",this).call(this,e)}},{key:"nextTimeWindow",value:function(e){this._events.push(new II(this._getNow(),e)),this._trimBufferThenGetEvents(),Ya(rs(n.prototype),"next",this).call(this,e)}},{key:"_subscribe",value:function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new Ss;if(this.isStopped||this.hasError?t=ps.EMPTY:(this.observers.push(e),t=new Ps(this,e)),i&&e.add(e=new kI(e,i)),n)for(var a=0;a<o&&!e.closed;a++)e.next(r[a]);else for(var s=0;s<o&&!e.closed;s++)e.next(r[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t}},{key:"_getNow",value:function(){return(this.scheduler||SI).now()}},{key:"_trimBufferThenGetEvents",value:function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(e-r[o].time<n);)o++;return i>t&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r}}]),n}(Es),II=function e(t,n){is(this,e),this.time=t,this.value=n},TI=((yI=function(){function e(t,n,r){is(this,e),this._ngZone=t,this._platform=n,this._scrolled=new Es,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}return as(e,[{key:"register",value:function(e){var t=this;this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(function(){return t._scrolled.next(e)}))}},{key:"deregister",value:function(e){var t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}},{key:"scrolled",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new ws(function(n){e._globalSubscription||e._addGlobalListener();var r=t>0?e._scrolled.pipe(uI(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){r.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):Ok()}},{key:"ngOnDestroy",value:function(){var e=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(t,n){return e.deregister(n)}),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(e,t){var n=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(Qk(function(e){return!e||n.indexOf(e)>-1}))}},{key:"getAncestorScrollContainers",value:function(e){var t=this,n=[];return this.scrollContainers.forEach(function(r,i){t._scrollableContainsElement(i,e)&&n.push(i)}),n}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_scrollableContainsElement",value:function(e,t){var n=t.nativeElement,r=e.getElementRef().nativeElement;do{if(n==r)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return nI(e._getWindow().document,"scroll").subscribe(function(){return e._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),e}()).\u0275fac=function(e){return new(e||yI)(md(Hy),md(Ek),md(Cb,8))},yI.\u0275prov=dl({factory:function(){return new yI(md(Hy),md(Ek),md(Cb,8))},token:yI,providedIn:"root"}),yI),OI=((vI=function(){function e(t,n,r){var i=this;is(this,e),this._platform=t,this._change=new Es,this._changeListener=function(e){i._change.next(e)},this._document=r,n.runOutsideAngular(function(){if(t.isBrowser){var e=i._getWindow();e.addEventListener("resize",i._changeListener),e.addEventListener("orientationchange",i._changeListener)}i.change().subscribe(function(){return i._updateViewportSize()})})}return as(e,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}},{key:"getViewportRect",value:function(){var e=this.getViewportScrollPosition(),t=this.getViewportSize(),n=t.width,r=t.height;return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+n,height:r,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var e=this._document,t=this._getWindow(),n=e.documentElement,r=n.getBoundingClientRect();return{top:-r.top||e.body.scrollTop||t.scrollY||n.scrollTop||0,left:-r.left||e.body.scrollLeft||t.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return e>0?this._change.pipe(uI(e)):this._change}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_updateViewportSize",value:function(){var e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}]),e}()).\u0275fac=function(e){return new(e||vI)(md(Ek),md(Hy),md(Cb,8))},vI.\u0275prov=dl({factory:function(){return new vI(md(Ek),md(Hy),md(Cb,8))},token:vI,providedIn:"root"}),vI),RI=((gI=function e(){is(this,e)}).\u0275mod=Wl({type:gI}),gI.\u0275inj=hl({factory:function(e){return new(e||gI)}}),gI),VI=((mI=function e(){is(this,e)}).\u0275mod=Wl({type:mI}),mI.\u0275inj=hl({factory:function(e){return new(e||mI)},imports:[[JE,Ak,RI],JE,RI]}),mI),DI=function(){function e(){is(this,e)}return as(e,[{key:"attach",value:function(e){return this._attachedHost=e,e.attach(this)}},{key:"detach",value:function(){var e=this._attachedHost;null!=e&&(this._attachedHost=null,e.detach())}},{key:"setAttachedHost",value:function(e){this._attachedHost=e}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),e}(),NI=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this)).component=e,a.viewContainerRef=r,a.injector=i,a.componentFactoryResolver=o,a}return n}(DI),LI=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this)).templateRef=e,o.viewContainerRef=r,o.context=i,o}return as(n,[{key:"attach",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=t,Ya(rs(n.prototype),"attach",this).call(this,e)}},{key:"detach",value:function(){return this.context=void 0,Ya(rs(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(DI),FI=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this)).element=e instanceof Yg?e.nativeElement:e,r}return n}(DI),MI=function(){function e(){is(this,e),this._isDisposed=!1,this.attachDomPortal=null}return as(e,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(e){return e instanceof NI?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof LI?(this._attachedPortal=e,this.attachTemplatePortal(e)):this.attachDomPortal&&e instanceof FI?(this._attachedPortal=e,this.attachDomPortal(e)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(e){this._disposeFn=e}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),e}(),qI=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a){var s,l;return is(this,n),(l=t.call(this)).outletElement=e,l._componentFactoryResolver=r,l._appRef=i,l._defaultInjector=o,l.attachDomPortal=function(e){var t=e.element,r=l._document.createComment("dom-portal");t.parentNode.insertBefore(r,t),l.outletElement.appendChild(t),Ya((s=ts(l),rs(n.prototype)),"setDisposeFn",s).call(s,function(){r.parentNode&&r.parentNode.replaceChild(t,r)})},l._document=a,l}return as(n,[{key:"attachComponentPortal",value:function(e){var t,n=this,r=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component);return e.viewContainerRef?(t=e.viewContainerRef.createComponent(r,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector),this.setDisposeFn(function(){return t.destroy()})):(t=r.create(e.injector||this._defaultInjector),this._appRef.attachView(t.hostView),this.setDisposeFn(function(){n._appRef.detachView(t.hostView),t.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(t)),t}},{key:"attachTemplatePortal",value:function(e){var t=this,n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context);return r.rootNodes.forEach(function(e){return t.outletElement.appendChild(e)}),r.detectChanges(),this.setDisposeFn(function(){var e=n.indexOf(r);-1!==e&&n.remove(e)}),r}},{key:"dispose",value:function(){Ya(rs(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(e){return e.hostView.rootNodes[0]}}]),n}(MI),jI=((_I=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o,a;return is(this,n),(a=t.call(this))._componentFactoryResolver=e,a._viewContainerRef=r,a._isInitialized=!1,a.attached=new ty,a.attachDomPortal=function(e){var t=e.element,r=a._document.createComment("dom-portal");e.setAttachedHost(ts(a)),t.parentNode.insertBefore(r,t),a._getRootNode().appendChild(t),Ya((o=ts(a),rs(n.prototype)),"setDisposeFn",o).call(o,function(){r.parentNode&&r.parentNode.replaceChild(t,r)})},a._document=i,a}return as(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){Ya(rs(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(e){e.setAttachedHost(this);var t=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,r=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),i=t.createComponent(r,t.length,e.injector||t.injector);return t!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),Ya(rs(n.prototype),"setDisposeFn",this).call(this,function(){return i.destroy()}),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}},{key:"attachTemplatePortal",value:function(e){var t=this;e.setAttachedHost(this);var r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context);return Ya(rs(n.prototype),"setDisposeFn",this).call(this,function(){return t._viewContainerRef.clear()}),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}},{key:"_getRootNode",value:function(){var e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(e){(!this.hasAttached()||e||this._isInitialized)&&(this.hasAttached()&&Ya(rs(n.prototype),"detach",this).call(this),e&&Ya(rs(n.prototype),"attach",this).call(this,e),this._attachedPortal=e)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(MI)).\u0275fac=function(e){return new(e||_I)(Qf(Wg),Qf(Ov),Qf(Cb))},_I.\u0275dir=$l({type:_I,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Af]}),_I),BI=((bI=function e(){is(this,e)}).\u0275mod=Wl({type:bI}),bI.\u0275inj=hl({factory:function(e){return new(e||bI)}}),bI),zI=function(){function e(t,n){is(this,e),this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=n}return as(e,[{key:"attach",value:function(){}},{key:"enable",value:function(){if(this._canBeEnabled()){var e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=nE(-this._previousScrollPosition.left),e.style.top=nE(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}},{key:"disable",value:function(){if(this._isEnabled){var e=this._document.documentElement,t=e.style,n=this._document.body.style,r=t.scrollBehavior||"",i=n.scrollBehavior||"";this._isEnabled=!1,t.left=this._previousHTMLStyles.left,t.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),t.scrollBehavior=n.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.scrollBehavior=r,n.scrollBehavior=i}}},{key:"_canBeEnabled",value:function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var e=this._document.body,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}}]),e}(),UI=function(){function e(t,n,r,i){var o=this;is(this,e),this._scrollDispatcher=t,this._ngZone=n,this._viewportRuler=r,this._config=i,this._scrollSubscription=null,this._detach=function(){o.disable(),o._overlayRef.hasAttached()&&o._ngZone.run(function(){return o._overlayRef.detach()})}}return as(e,[{key:"attach",value:function(e){this._overlayRef=e}},{key:"enable",value:function(){var e=this;if(!this._scrollSubscription){var t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(function(){var t=e._viewportRuler.getViewportScrollPosition().top;Math.abs(t-e._initialScrollPosition)>e._config.threshold?e._detach():e._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),e}(),HI=function(){function e(){is(this,e)}return as(e,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),e}();function QI(e,t){return t.some(function(t){return e.bottom<t.top||e.top>t.bottom||e.right<t.left||e.left>t.right})}function WI(e,t){return t.some(function(t){return e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right})}var GI,$I,JI,YI,KI,ZI=function(){function e(t,n,r,i){is(this,e),this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this._config=i,this._scrollSubscription=null}return as(e,[{key:"attach",value:function(e){this._overlayRef=e}},{key:"enable",value:function(){var e=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(e._overlayRef.updatePosition(),e._config&&e._config.autoClose){var t=e._overlayRef.overlayElement.getBoundingClientRect(),n=e._viewportRuler.getViewportSize(),r=n.width,i=n.height;QI(t,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(e.disable(),e._ngZone.run(function(){return e._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),e}(),XI=((GI=function e(t,n,r,i){var o=this;is(this,e),this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=function(){return new HI},this.close=function(e){return new UI(o._scrollDispatcher,o._ngZone,o._viewportRuler,e)},this.block=function(){return new zI(o._viewportRuler,o._document)},this.reposition=function(e){return new ZI(o._scrollDispatcher,o._viewportRuler,o._ngZone,e)},this._document=i}).\u0275fac=function(e){return new(e||GI)(md(TI),md(OI),md(Hy),md(Cb))},GI.\u0275prov=dl({factory:function(){return new GI(md(TI),md(OI),md(Hy),md(Cb))},token:GI,providedIn:"root"}),GI),eT=function e(t){if(is(this,e),this.scrollStrategy=new HI,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t)for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];void 0!==t[i]&&(this[i]=t[i])}},tT=function e(t,n,r,i,o){is(this,e),this.offsetX=r,this.offsetY=i,this.panelClass=o,this.originX=t.originX,this.originY=t.originY,this.overlayX=n.overlayX,this.overlayY=n.overlayY},nT=function e(t,n){is(this,e),this.connectionPair=t,this.scrollableViewProperties=n},rT=((YI=function(){function e(t){is(this,e),this._attachedOverlays=[],this._document=t}return as(e,[{key:"ngOnDestroy",value:function(){this.detach()}},{key:"add",value:function(e){this.remove(e),this._attachedOverlays.push(e)}},{key:"remove",value:function(e){var t=this._attachedOverlays.indexOf(e);t>-1&&this._attachedOverlays.splice(t,1),0===this._attachedOverlays.length&&this.detach()}}]),e}()).\u0275fac=function(e){return new(e||YI)(md(Cb))},YI.\u0275prov=dl({factory:function(){return new YI(md(Cb))},token:YI,providedIn:"root"}),YI),iT=((JI=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this,e))._keydownListener=function(e){for(var t=r._attachedOverlays,n=t.length-1;n>-1;n--)if(t[n]._keydownEvents.observers.length>0){t[n]._keydownEvents.next(e);break}},r}return as(n,[{key:"add",value:function(e){Ya(rs(n.prototype),"add",this).call(this,e),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),n}(rT)).\u0275fac=function(e){return new(e||JI)(md(Cb))},JI.\u0275prov=dl({factory:function(){return new JI(md(Cb))},token:JI,providedIn:"root"}),JI),oT=(($I=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e))._platform=r,i._cursorStyleIsSet=!1,i._clickListener=function(e){for(var t=e.composedPath?e.composedPath()[0]:e.target,n=i._attachedOverlays.slice(),r=n.length-1;r>-1;r--){var o=n[r];if(!(o._outsidePointerEvents.observers.length<1)&&o.hasAttached()){if(o.overlayElement.contains(t))break;o._outsidePointerEvents.next(e)}}},i}return as(n,[{key:"add",value:function(e){Ya(rs(n.prototype),"add",this).call(this,e),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),n}(rT)).\u0275fac=function(e){return new(e||$I)(md(Cb),md(Ek))},$I.\u0275prov=dl({factory:function(){return new $I(md(Cb),md(Ek))},token:$I,providedIn:"root"}),$I),aT=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),sT=((KI=function(){function e(t,n){is(this,e),this._platform=n,this._document=t}return as(e,[{key:"ngOnDestroy",value:function(){var e=this._containerElement;e&&e.parentNode&&e.parentNode.removeChild(e)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){if(this._platform.isBrowser||aT)for(var e=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]'),t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t]);var n=this._document.createElement("div");n.classList.add("cdk-overlay-container"),aT?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}}]),e}()).\u0275fac=function(e){return new(e||KI)(md(Cb),md(Ek))},KI.\u0275prov=dl({factory:function(){return new KI(md(Cb),md(Ek))},token:KI,providedIn:"root"}),KI),lT=function(){function e(t,n,r,i,o,a,s,l,u){var c=this;is(this,e),this._portalOutlet=t,this._host=n,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=a,this._document=s,this._location=l,this._outsideClickDispatcher=u,this._backdropElement=null,this._backdropClick=new Es,this._attachments=new Es,this._detachments=new Es,this._locationChanges=ps.EMPTY,this._backdropClickHandler=function(e){return c._backdropClick.next(e)},this._keydownEvents=new Es,this._outsidePointerEvents=new Es,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy}return as(e,[{key:"attach",value:function(e){var t=this,n=this._portalOutlet.attach(e);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Kk(1)).subscribe(function(){t.hasAttached()&&t.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(function(){return t.dispose()})),this._outsideClickDispatcher.add(this),n}},{key:"detach",value:function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();var e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}}},{key:"dispose",value:function(){var e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,e&&this._detachments.next(),this._detachments.complete()}},{key:"hasAttached",value:function(){return this._portalOutlet.hasAttached()}},{key:"backdropClick",value:function(){return this._backdropClick}},{key:"attachments",value:function(){return this._attachments}},{key:"detachments",value:function(){return this._detachments}},{key:"keydownEvents",value:function(){return this._keydownEvents}},{key:"outsidePointerEvents",value:function(){return this._outsidePointerEvents}},{key:"getConfig",value:function(){return this._config}},{key:"updatePosition",value:function(){this._positionStrategy&&this._positionStrategy.apply()}},{key:"updatePositionStrategy",value:function(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}},{key:"updateSize",value:function(e){this._config=Object.assign(Object.assign({},this._config),e),this._updateElementSize()}},{key:"setDirection",value:function(e){this._config=Object.assign(Object.assign({},this._config),{direction:e}),this._updateElementDirection()}},{key:"addPanelClass",value:function(e){this._pane&&this._toggleClasses(this._pane,e,!0)}},{key:"removePanelClass",value:function(e){this._pane&&this._toggleClasses(this._pane,e,!1)}},{key:"getDirection",value:function(){var e=this._config.direction;return e?"string"==typeof e?e:e.value:"ltr"}},{key:"updateScrollStrategy",value:function(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}},{key:"_updateElementDirection",value:function(){this._host.setAttribute("dir",this.getDirection())}},{key:"_updateElementSize",value:function(){if(this._pane){var e=this._pane.style;e.width=nE(this._config.width),e.height=nE(this._config.height),e.minWidth=nE(this._config.minWidth),e.minHeight=nE(this._config.minHeight),e.maxWidth=nE(this._config.maxWidth),e.maxHeight=nE(this._config.maxHeight)}}},{key:"_togglePointerEvents",value:function(e){this._pane.style.pointerEvents=e?"auto":"none"}},{key:"_attachBackdrop",value:function(){var e=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){e._backdropElement&&e._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}},{key:"_updateStackingOrder",value:function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}},{key:"detachBackdrop",value:function(){var e,t=this,n=this._backdropElement;if(n){var r=function r(){n&&(n.removeEventListener("click",t._backdropClickHandler),n.removeEventListener("transitionend",r),n.parentNode&&n.parentNode.removeChild(n)),t._backdropElement==n&&(t._backdropElement=null),t._config.backdropClass&&t._toggleClasses(n,t._config.backdropClass,!1),clearTimeout(e)};n.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(function(){n.addEventListener("transitionend",r)}),n.style.pointerEvents="none",e=this._ngZone.runOutsideAngular(function(){return setTimeout(r,500)})}}},{key:"_toggleClasses",value:function(e,t,n){var r=e.classList;tE(t).forEach(function(e){e&&(n?r.add(e):r.remove(e))})}},{key:"_detachContentWhenStable",value:function(){var e=this;this._ngZone.runOutsideAngular(function(){var t=e._ngZone.onStable.pipe(cI($s(e._attachments,e._detachments))).subscribe(function(){e._pane&&e._host&&0!==e._pane.children.length||(e._pane&&e._config.panelClass&&e._toggleClasses(e._pane,e._config.panelClass,!1),e._host&&e._host.parentElement&&(e._previousHostParent=e._host.parentElement,e._previousHostParent.removeChild(e._host)),t.unsubscribe())})})}},{key:"_disposeScrollStrategy",value:function(){var e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}},{key:"overlayElement",get:function(){return this._pane}},{key:"backdropElement",get:function(){return this._backdropElement}},{key:"hostElement",get:function(){return this._host}}]),e}(),uT=/([A-Za-z%]+)$/,cT=function(){function e(t,n,r,i,o){is(this,e),this._viewportRuler=n,this._document=r,this._platform=i,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Es,this._resizeSubscription=ps.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}return as(e,[{key:"attach",value:function(e){var t=this;this._validatePositions(),e.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){t._isInitialRender=!0,t.apply()})}},{key:"apply",value:function(){if(!this._isDisposed&&this._platform.isBrowser)if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();var e,t,n=this._originRect,r=this._overlayRect,i=this._viewportRect,o=[],a=Qa(this._preferredPositions);try{for(a.s();!(t=a.n()).done;){var s=t.value,l=this._getOriginPoint(n,s),u=this._getOverlayPoint(l,r,s),c=this._getOverlayFit(u,r,i,s);if(c.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,l);this._canFitWithFlexibleDimensions(c,u,i)?o.push({position:s,origin:l,overlayRect:r,boundingBoxRect:this._calculateBoundingBoxRect(l,s)}):(!e||e.overlayFit.visibleArea<c.visibleArea)&&(e={overlayFit:c,overlayPoint:u,originPoint:l,position:s,overlayRect:r})}}catch(v){a.e(v)}finally{a.f()}if(o.length){var d,h=null,p=-1,f=Qa(o);try{for(f.s();!(d=f.n()).done;){var m=d.value,g=m.boundingBoxRect.width*m.boundingBoxRect.height*(m.position.weight||1);g>p&&(p=g,h=m)}}catch(v){f.e(v)}finally{f.f()}return this._isPushed=!1,void this._applyPosition(h.position,h.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(e.position,e.originPoint);this._applyPosition(e.position,e.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&dT(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var e=this._lastPosition||this._preferredPositions[0],t=this._getOriginPoint(this._originRect,e);this._applyPosition(e,t)}}},{key:"withScrollableContainers",value:function(e){return this._scrollables=e,this}},{key:"withPositions",value:function(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(e){return this._viewportMargin=e,this}},{key:"withFlexibleDimensions",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=e,this}},{key:"withGrowAfterOpen",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=e,this}},{key:"withPush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=e,this}},{key:"withLockedPosition",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=e,this}},{key:"setOrigin",value:function(e){return this._origin=e,this}},{key:"withDefaultOffsetX",value:function(e){return this._offsetX=e,this}},{key:"withDefaultOffsetY",value:function(e){return this._offsetY=e,this}},{key:"withTransformOriginOn",value:function(e){return this._transformOriginSelector=e,this}},{key:"_getOriginPoint",value:function(e,t){var n;if("center"==t.originX)n=e.left+e.width/2;else{var r=this._isRtl()?e.right:e.left,i=this._isRtl()?e.left:e.right;n="start"==t.originX?r:i}return{x:n,y:"center"==t.originY?e.top+e.height/2:"top"==t.originY?e.top:e.bottom}}},{key:"_getOverlayPoint",value:function(e,t,n){var r,i;return r="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,i="center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height,{x:e.x+r,y:e.y+i}}},{key:"_getOverlayFit",value:function(e,t,n,r){var i=e.x,o=e.y,a=this._getOffset(r,"x"),s=this._getOffset(r,"y");a&&(i+=a),s&&(o+=s);var l=0-o,u=o+t.height-n.height,c=this._subtractOverflows(t.width,0-i,i+t.width-n.width),d=this._subtractOverflows(t.height,l,u),h=c*d;return{visibleArea:h,isCompletelyWithinViewport:t.width*t.height===h,fitsInViewportVertically:d===t.height,fitsInViewportHorizontally:c==t.width}}},{key:"_canFitWithFlexibleDimensions",value:function(e,t,n){if(this._hasFlexibleDimensions){var r=n.bottom-t.y,i=n.right-t.x,o=hT(this._overlayRef.getConfig().minHeight),a=hT(this._overlayRef.getConfig().minWidth),s=e.fitsInViewportHorizontally||null!=a&&a<=i;return(e.fitsInViewportVertically||null!=o&&o<=r)&&s}return!1}},{key:"_pushOverlayOnScreen",value:function(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};var r,i,o=this._viewportRect,a=Math.max(e.x+t.width-o.width,0),s=Math.max(e.y+t.height-o.height,0),l=Math.max(o.top-n.top-e.y,0),u=Math.max(o.left-n.left-e.x,0);return r=t.width<=o.width?u||-a:e.x<this._viewportMargin?o.left-n.left-e.x:0,i=t.height<=o.height?l||-s:e.y<this._viewportMargin?o.top-n.top-e.y:0,this._previousPushAmount={x:r,y:i},{x:e.x+r,y:e.y+i}}},{key:"_applyPosition",value:function(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._lastPosition=e,this._positionChanges.observers.length){var n=this._getScrollVisibility(),r=new nT(e,n);this._positionChanges.next(r)}this._isInitialRender=!1}},{key:"_setTransformOrigin",value:function(e){if(this._transformOriginSelector){var t,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r=e.overlayY;t="center"===e.overlayX?"center":this._isRtl()?"start"===e.overlayX?"right":"left":"start"===e.overlayX?"left":"right";for(var i=0;i<n.length;i++)n[i].style.transformOrigin="".concat(t," ").concat(r)}}},{key:"_calculateBoundingBoxRect",value:function(e,t){var n,r,i,o,a,s,l=this._viewportRect,u=this._isRtl();if("top"===t.overlayY)r=e.y,n=l.height-r+this._viewportMargin;else if("bottom"===t.overlayY)i=l.height-e.y+2*this._viewportMargin,n=l.height-i+this._viewportMargin;else{var c=Math.min(l.bottom-e.y+l.top,e.y),d=this._lastBoundingBoxSize.height;n=2*c,r=e.y-c,n>d&&!this._isInitialRender&&!this._growAfterOpen&&(r=e.y-d/2)}if("end"===t.overlayX&&!u||"start"===t.overlayX&&u)s=l.width-e.x+this._viewportMargin,o=e.x-this._viewportMargin;else if("start"===t.overlayX&&!u||"end"===t.overlayX&&u)a=e.x,o=l.right-e.x;else{var h=Math.min(l.right-e.x+l.left,e.x),p=this._lastBoundingBoxSize.width;o=2*h,a=e.x-h,o>p&&!this._isInitialRender&&!this._growAfterOpen&&(a=e.x-p/2)}return{top:r,left:a,bottom:i,right:s,width:o,height:n}}},{key:"_setBoundingBoxStyles",value:function(e,t){var n=this._calculateBoundingBoxRect(e,t);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{var i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=nE(n.height),r.top=nE(n.top),r.bottom=nE(n.bottom),r.width=nE(n.width),r.left=nE(n.left),r.right=nE(n.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",i&&(r.maxHeight=nE(i)),o&&(r.maxWidth=nE(o))}this._lastBoundingBoxSize=n,dT(this._boundingBox.style,r)}},{key:"_resetBoundingBoxStyles",value:function(){dT(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){dT(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(e,t){var n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){var a=this._viewportRuler.getViewportScrollPosition();dT(n,this._getExactOverlayY(t,e,a)),dT(n,this._getExactOverlayX(t,e,a))}else n.position="static";var s="",l=this._getOffset(t,"x"),u=this._getOffset(t,"y");l&&(s+="translateX(".concat(l,"px) ")),u&&(s+="translateY(".concat(u,"px)")),n.transform=s.trim(),o.maxHeight&&(r?n.maxHeight=nE(o.maxHeight):i&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=nE(o.maxWidth):i&&(n.maxWidth="")),dT(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(e,t,n){var r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));var o=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return i.y-=o,"bottom"===e.overlayY?r.bottom=this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)+"px":r.top=nE(i.y),r}},{key:"_getExactOverlayX",value:function(e,t,n){var r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),"right"===(this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left")?r.right=this._document.documentElement.clientWidth-(i.x+this._overlayRect.width)+"px":r.left=nE(i.x),r}},{key:"_getScrollVisibility",value:function(){var e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(function(e){return e.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:WI(e,n),isOriginOutsideView:QI(e,n),isOverlayClipped:WI(t,n),isOverlayOutsideView:QI(t,n)}}},{key:"_subtractOverflows",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(e,t){return e-Math.max(t,0)},e)}},{key:"_getNarrowedViewportRect",value:function(){var e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}},{key:"_isRtl",value:function(){return"rtl"===this._overlayRef.getDirection()}},{key:"_hasExactPosition",value:function(){return!this._hasFlexibleDimensions||this._isPushed}},{key:"_getOffset",value:function(e,t){return"x"===t?null==e.offsetX?this._offsetX:e.offsetX:null==e.offsetY?this._offsetY:e.offsetY}},{key:"_validatePositions",value:function(){}},{key:"_addPanelClasses",value:function(e){var t=this;this._pane&&tE(e).forEach(function(e){""!==e&&-1===t._appliedPanelClasses.indexOf(e)&&(t._appliedPanelClasses.push(e),t._pane.classList.add(e))})}},{key:"_clearPanelClasses",value:function(){var e=this;this._pane&&(this._appliedPanelClasses.forEach(function(t){e._pane.classList.remove(t)}),this._appliedPanelClasses=[])}},{key:"_getOriginRect",value:function(){var e=this._origin;if(e instanceof Yg)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();var t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}},{key:"positions",get:function(){return this._preferredPositions}}]),e}();function dT(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function hT(e){if("number"!=typeof e&&null!=e){var t=Ua(e.split(uT),2),n=t[0],r=t[1];return r&&"px"!==r?null:parseFloat(n)}return e||null}var pT,fT,mT,gT=function(){function e(t,n,r,i,o,a,s){is(this,e),this._preferredPositions=[],this._positionStrategy=new cT(r,i,o,a,s).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,n),this.onPositionChange=this._positionStrategy.positionChanges}return as(e,[{key:"attach",value:function(e){this._overlayRef=e,this._positionStrategy.attach(e),this._direction&&(e.setDirection(this._direction),this._direction=null)}},{key:"dispose",value:function(){this._positionStrategy.dispose()}},{key:"detach",value:function(){this._positionStrategy.detach()}},{key:"apply",value:function(){this._positionStrategy.apply()}},{key:"recalculateLastPosition",value:function(){this._positionStrategy.reapplyLastPosition()}},{key:"withScrollableContainers",value:function(e){this._positionStrategy.withScrollableContainers(e)}},{key:"withFallbackPosition",value:function(e,t,n,r){var i=new tT(e,t,n,r);return this._preferredPositions.push(i),this._positionStrategy.withPositions(this._preferredPositions),this}},{key:"withDirection",value:function(e){return this._overlayRef?this._overlayRef.setDirection(e):this._direction=e,this}},{key:"withOffsetX",value:function(e){return this._positionStrategy.withDefaultOffsetX(e),this}},{key:"withOffsetY",value:function(e){return this._positionStrategy.withDefaultOffsetY(e),this}},{key:"withLockedPosition",value:function(e){return this._positionStrategy.withLockedPosition(e),this}},{key:"withPositions",value:function(e){return this._preferredPositions=e.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}},{key:"setOrigin",value:function(e){return this._positionStrategy.setOrigin(e),this}},{key:"positions",get:function(){return this._preferredPositions}}]),e}(),vT=function(){function e(){is(this,e),this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}return as(e,[{key:"attach",value:function(e){var t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}},{key:"top",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}},{key:"left",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=e,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}},{key:"right",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=e,this._justifyContent="flex-end",this}},{key:"width",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}},{key:"height",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}},{key:"centerHorizontally",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(e),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(e),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),r=n.width,i=n.height,o=n.maxWidth,a=n.maxHeight,s=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),l=!("100%"!==i&&"100vh"!==i||a&&"100%"!==a&&"100vh"!==a);e.position=this._cssPosition,e.marginLeft=s?"0":this._leftOffset,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=this._rightOffset,s?t.justifyContent="flex-start":"center"===this._justifyContent?t.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?t.justifyContent="flex-end":"flex-end"===this._justifyContent&&(t.justifyContent="flex-start"):t.justifyContent=this._justifyContent,t.alignItems=l?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove("cdk-global-overlay-wrapper"),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}}}]),e}(),yT=((fT=function(){function e(t,n,r,i){is(this,e),this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i}return as(e,[{key:"global",value:function(){return new vT}},{key:"connectedTo",value:function(e,t,n){return new gT(t,n,e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(e){return new cT(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),e}()).\u0275fac=function(e){return new(e||fT)(md(OI),md(Cb),md(Ek),md(sT))},fT.\u0275prov=dl({factory:function(){return new fT(md(OI),md(Cb),md(Ek),md(sT))},token:fT,providedIn:"root"}),fT),bT=0,_T=((pT=function(){function e(t,n,r,i,o,a,s,l,u,c,d){is(this,e),this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=i,this._keyboardDispatcher=o,this._injector=a,this._ngZone=s,this._document=l,this._directionality=u,this._location=c,this._outsideClickDispatcher=d}return as(e,[{key:"create",value:function(e){var t=this._createHostElement(),n=this._createPaneElement(t),r=this._createPortalOutlet(n),i=new eT(e);return i.direction=i.direction||this._directionality.value,new lT(r,t,n,i,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(e){var t=this._document.createElement("div");return t.id="cdk-overlay-"+bT++,t.classList.add("cdk-overlay-pane"),e.appendChild(t),t}},{key:"_createHostElement",value:function(){var e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}},{key:"_createPortalOutlet",value:function(e){return this._appRef||(this._appRef=this._injector.get(lb)),new qI(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),e}()).\u0275fac=function(e){return new(e||pT)(md(XI),md(sT),md(Wg),md(yT),md(iT),md(kf),md(Hy),md(Cb),md($E),md(zb),md(oT))},pT.\u0275prov=dl({token:pT,factory:pT.\u0275fac}),pT),wT={provide:new $c("cdk-connected-overlay-scroll-strategy"),deps:[_T],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},CT=((mT=function e(){is(this,e)}).\u0275mod=Wl({type:mT}),mT.\u0275inj=hl({factory:function(e){return new(e||mT)},providers:[_T,wT],imports:[[JE,BI,VI],VI]}),mT),xT=new $c("MatFormField"),ST=function(){function e(t,n){is(this,e),this.delay=t,this.scheduler=n}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new PT(e,this.delay,this.scheduler))}}]),e}(),PT=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e)).delay=r,o.scheduler=i,o.queue=[],o.active=!1,o.errored=!1,o}return as(n,[{key:"_schedule",value:function(e){this.active=!0,this.destination.add(e.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))}},{key:"scheduleNotification",value:function(e){if(!0!==this.errored){var t=this.scheduler,n=new kT(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}}},{key:"_next",value:function(e){this.scheduleNotification(PI.createNext(e))}},{key:"_error",value:function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(PI.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(e){for(var t=e.source,n=t.queue,r=e.scheduler,i=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(e,o)}else this.unsubscribe(),t.active=!1}}]),n}(gs),kT=function e(t,n){is(this,e),this.time=t,this.notification=n},ET=["panel"];function AT(e,t){if(1&e&&($f(0,"div",0,1),cm(2),Jf()),2&e){var n=sm();Wf("id",n.id)("ngClass",n._classList)}}var IT,TT,OT,RT,VT,DT,NT,LT=["*"],FT=0,MT=function e(t,n){is(this,e),this.source=t,this.option=n},qT=lA(function e(){is(this,e)}),jT=new $c("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),BT=((TT=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this))._changeDetectorRef=e,o._elementRef=r,o._activeOptionChanges=ps.EMPTY,o.showPanel=!1,o._isOpen=!1,o.displayWith=null,o.optionSelected=new ty,o.opened=new ty,o.closed=new ty,o.optionActivated=new ty,o._classList={},o.id="mat-autocomplete-"+FT++,o._autoActiveFirstOption=!!i.autoActiveFirstOption,o}return as(n,[{key:"ngAfterContentInit",value:function(){var e=this;this._keyManager=new yE(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(function(t){e.optionActivated.emit({source:e,option:e.options.toArray()[t]||null})}),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(e){var t=new MT(this,e);this.optionSelected.emit(t)}},{key:"_setVisibilityClasses",value:function(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}},{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(e){this._autoActiveFirstOption=eE(e)}},{key:"classList",set:function(e){this._classList=e&&e.length?iE(e).reduce(function(e,t){return e[t]=!0,e},{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}}]),n}(qT)).\u0275fac=function(e){return new(e||TT)(Qf(bv),Qf(Yg),Qf(jT))},TT.\u0275dir=$l({type:TT,viewQuery:function(e,t){var n;1&e&&(fy(Pv,!0),my(ET,!0)),2&e&&(py(n=yy())&&(t.template=n.first),py(n=yy())&&(t.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[Af]}),TT),zT=((IT=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.apply(this,arguments))._visibleClass="mat-autocomplete-visible",e._hiddenClass="mat-autocomplete-hidden",e}return n}(BT)).\u0275fac=function(e){return UT(e||IT)},IT.\u0275cmp=zl({type:IT,selectors:[["mat-autocomplete"]],contentQueries:function(e,t,n){var r;1&e&&(vy(n,$A,!0),vy(n,XA,!0)),2&e&&(py(r=yy())&&(t.optionGroups=r),py(r=yy())&&(t.options=r))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[Ug([{provide:KA,useExisting:IT}]),Af],ngContentSelectors:LT,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(e,t){1&e&&(um(),Uf(0,AT,3,2,"ng-template"))},directives:[D_],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"],encapsulation:2,changeDetection:0}),IT),UT=Wc(zT),HT=new $c("mat-autocomplete-scroll-strategy"),QT={provide:HT,deps:[_T],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},WT={provide:kS,useExisting:sl(function(){return $T}),multi:!0},GT=((RT=function(){function e(t,n,r,i,o,a,s,l,u,c,d){var h=this;is(this,e),this._element=t,this._overlay=n,this._viewContainerRef=r,this._zone=i,this._changeDetectorRef=o,this._dir=s,this._formField=l,this._document=u,this._viewportRuler=c,this._defaults=d,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=ps.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Es,this._windowBlurHandler=function(){h._canOpenOnNextFocus=h._document.activeElement!==h._element.nativeElement||h.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=tI(function(){return h.autocomplete&&h.autocomplete.options?$s.apply(void 0,Ha(h.autocomplete.options.map(function(e){return e.onSelectionChange}))):h._zone.onStable.pipe(Kk(1),pI(function(){return h.optionSelections}))}),this._scrollStrategy=a}return as(e,[{key:"ngAfterViewInit",value:function(){var e=this,t=this._getWindow();void 0!==t&&this._zone.runOutsideAngular(function(){return t.addEventListener("blur",e._windowBlurHandler)})}},{key:"ngOnChanges",value:function(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var e=this._getWindow();void 0!==e&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"_getOutsideClickStream",value:function(){var e=this;return $s(nI(this._document,"click"),nI(this._document,"touchend")).pipe(Qk(function(t){var n=e._isInsideShadowRoot&&t.composedPath?t.composedPath()[0]:t.target,r=e._formField?e._formField._elementRef.nativeElement:null,i=e.connectedTo?e.connectedTo.elementRef.nativeElement:null;return e._overlayAttached&&n!==e._element.nativeElement&&(!r||!r.contains(n))&&(!i||!i.contains(n))&&!!e._overlayRef&&!e._overlayRef.overlayElement.contains(n)}))}},{key:"writeValue",value:function(e){var t=this;Promise.resolve(null).then(function(){return t._setTriggerValue(e)})}},{key:"registerOnChange",value:function(e){this._onChange=e}},{key:"registerOnTouched",value:function(e){this._onTouched=e}},{key:"setDisabledState",value:function(e){this._element.nativeElement.disabled=e}},{key:"_handleKeydown",value:function(e){var t=e.keyCode;if(27!==t||Rk(e)||e.preventDefault(),this.activeOption&&13===t&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,r=38===t||40===t;this.panelOpen||9===t?this.autocomplete._keyManager.onKeydown(e):r&&this._canOpen()&&this.openPanel(),(r||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(e){var t=e.target,n=t.value;"number"===t.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var e=this;return $s(this._zone.onStable.pipe(Kk(1)),this.autocomplete.options.changes.pipe(Dk(function(){return e._positionStrategy.reapplyLastPosition()}),function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jk,r=(t=e)instanceof Date&&!isNaN(+t)?+e-n.now():Math.abs(e);return function(e){return e.lift(new ST(r,n))}}(0))).pipe(pI(function(){var t=e.panelOpen;return e._resetActiveItem(),e.autocomplete._setVisibility(),e.panelOpen&&(e._overlayRef.updatePosition(),t!==e.panelOpen&&e.autocomplete.opened.emit()),e.panelClosingActions}),Kk(1)).subscribe(function(t){return e._setValueAndClose(t)})}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(e){var t=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e,n=null!=t?t:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(e){e&&e.source&&(this._clearPreviousSelectedOption(e.source),this._setTriggerValue(e.source.value),this._onChange(e.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(e.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(e){this.autocomplete.options.forEach(function(t){t!==e&&t.selected&&t.deselect()})}},{key:"_attachOverlay",value:function(){var e=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!Tk(this._element.nativeElement));var t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new LI(this.autocomplete.template,this._viewContainerRef),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,t.keydownEvents().subscribe(function(t){(27===t.keyCode&&!Rk(t)||38===t.keyCode&&Rk(t,"altKey"))&&(e._resetActiveItem(),e._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(function(){e.panelOpen&&t&&t.updateSize({width:e._getPanelWidth()})})),t&&!t.hasAttached()&&(t.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var n=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&n!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){var e;return new eT({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(e=this._defaults)||void 0===e?void 0:e.overlayPanelClass})}},{key:"_getOverlayPosition",value:function(){var e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}},{key:"_setStrategyPositions",value:function(e){var t,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,i=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];t="above"===this.position?i:"below"===this.position?n:[].concat(n,i),e.withPositions(t)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}},{key:"_canOpen",value:function(){var e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var e;return(null===(e=this._document)||void 0===e?void 0:e.defaultView)||window}},{key:"_scrollToOption",value:function(e){var t,n,r,i,o=this.autocomplete,a=function(e,t,n){if(n.length){for(var r=t.toArray(),i=n.toArray(),o=0,a=0;a<e+1;a++)r[a].group&&r[a].group===i[o]&&o++;return o}return 0}(e,o.options,o.optionGroups);if(0===e&&1===a)o._setScrollTop(0);else{var s=o.options.toArray()[e];if(s){var l=s._getHostElement(),u=(t=l.offsetTop,n=l.offsetHeight,r=o._getScrollTop(),i=o.panel.nativeElement.offsetHeight,t<r?t:t+n>r+i?Math.max(0,t-i+n):r);o._setScrollTop(u)}}}},{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(e){this._autocompleteDisabled=eE(e)}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"panelClosingActions",get:function(){var e=this;return $s(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Qk(function(){return e._overlayAttached})),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Qk(function(){return e._overlayAttached})):Ok()).pipe(Ms(function(e){return e instanceof YA?e:null}))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}}]),e}()).\u0275fac=function(e){return new(e||RT)(Qf(Yg),Qf(_T),Qf(Ov),Qf(Hy),Qf(bv),Qf(HT),Qf($E,8),Qf(xT,9),Qf(Cb,8),Qf(OI),Qf(jT,8))},RT.\u0275dir=$l({type:RT,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[cu]}),RT),$T=((OT=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",e}return n}(GT)).\u0275fac=function(e){return JT(e||OT)},OT.\u0275dir=$l({type:OT,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(e,t){1&e&&nm("focusin",function(){return t._handleFocus()})("blur",function(){return t._onTouched()})("input",function(e){return t._handleInput(e)})("keydown",function(e){return t._handleKeydown(e)}),2&e&&Bf("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-owns",t.autocompleteDisabled||!t.panelOpen||null==t.autocomplete?null:t.autocomplete.id)("aria-haspopup",!t.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[Ug([WT]),Af]}),OT),JT=Wc($T),YT=((VT=function e(){is(this,e)}).\u0275mod=Wl({type:VT}),VT.\u0275inj=hl({factory:function(e){return new(e||VT)},providers:[QT],imports:[[CT,eI,oA,lw],RI,eI,oA]}),VT),KT=["mat-button",""],ZT=["*"],XT=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],eO=sA(aA(lA(function e(t){is(this,e),this._elementRef=t}))),tO=((NT=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;is(this,n),(o=t.call(this,e))._focusMonitor=r,o._animationMode=i,o.isRoundButton=o._hasHostAttributes("mat-fab","mat-mini-fab"),o.isIconButton=o._hasHostAttributes("mat-icon-button");var a,s=Qa(XT);try{for(s.s();!(a=s.n()).done;){var l=a.value;o._hasHostAttributes(l)&&o._getHostElement().classList.add(l)}}catch(u){s.e(u)}finally{s.f()}return e.nativeElement.classList.add("mat-button-base"),o.isRoundButton&&(o.color="accent"),o}return as(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",t=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),e,t)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.some(function(t){return e._getHostElement().hasAttribute(t)})}}]),n}(eO)).\u0275fac=function(e){return new(e||NT)(Qf(Yg),Qf(FE),Qf(_S,8))},NT.\u0275cmp=zl({type:NT,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(e,t){var n;1&e&&my(jA,!0),2&e&&py(n=yy())&&(t.ripple=n.first)},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(e,t){2&e&&(Bf("disabled",t.disabled||null),gm("_mat-animation-noopable","NoopAnimations"===t._animationMode)("mat-button-disabled",t.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Af],attrs:KT,ngContentSelectors:ZT,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,t){1&e&&(um(),$f(0,"span",0),cm(1),Jf(),Yf(2,"span",1),Yf(3,"span",2)),2&e&&(dp(2),gm("mat-button-ripple-round",t.isRoundButton||t.isIconButton),Wf("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",t.isIconButton)("matRippleTrigger",t._getHostElement()))},directives:[jA],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n"],encapsulation:2,changeDetection:0}),NT),nO=((DT=function e(){is(this,e)}).\u0275mod=Wl({type:DT}),DT.\u0275inj=hl({factory:function(e){return new(e||DT)},imports:[[BA,oA],oA]}),DT);function rO(e,t){}var iO,oO,aO=function e(){is(this,e),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},sO={dialogContainer:Zw("dialogContainer",[nC("void, exit",tC({opacity:0,transform:"scale(0.7)"})),nC("enter",tC({transform:"none"})),rC("* => enter",Xw("150ms cubic-bezier(0, 0, 0.2, 1)",tC({transform:"none",opacity:1}))),rC("* => void, * => exit",Xw("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",tC({opacity:0})))])},lO=((oO=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a,s){var l;return is(this,n),(l=t.call(this))._elementRef=e,l._focusTrapFactory=r,l._changeDetectorRef=i,l._config=a,l._focusMonitor=s,l._animationStateChanged=new ty,l._elementFocusedBeforeDialogWasOpened=null,l._closeInteractionType=null,l.attachDomPortal=function(e){return l._portalOutlet.hasAttached(),l._portalOutlet.attachDomPortal(e)},l._ariaLabelledBy=a.ariaLabelledBy||null,l._document=o,l}return as(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(e){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(e)}},{key:"attachTemplatePortal",value:function(e){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(e)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var e=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&e&&"function"==typeof e.focus){var t=this._document.activeElement,n=this._elementRef.nativeElement;t&&t!==this._document.body&&t!==n&&!n.contains(t)||(this._focusMonitor?(this._focusMonitor.focusVia(e,this._closeInteractionType),this._closeInteractionType=null):e.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var e=this._elementRef.nativeElement,t=this._document.activeElement;return e===t||e.contains(t)}}]),n}(MI)).\u0275fac=function(e){return new(e||oO)(Qf(Yg),Qf(PE),Qf(bv),Qf(Cb,8),Qf(aO),Qf(FE))},oO.\u0275dir=$l({type:oO,viewQuery:function(e,t){var n;1&e&&fy(jI,!0),2&e&&py(n=yy())&&(t._portalOutlet=n.first)},features:[Af]}),oO),uO=((iO=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.apply(this,arguments))._state="enter",e}return as(n,[{key:"_onAnimationDone",value:function(e){var t=e.toState,n=e.totalTime;"enter"===t?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===t&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(e){var t=e.toState,n=e.totalTime;"enter"===t?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==t&&"void"!==t||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(lO)).\u0275fac=function(e){return cO(e||iO)},iO.\u0275cmp=zl({type:iO,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(e,t){1&e&&rm("@dialogContainer.start",function(e){return t._onAnimationStart(e)})("@dialogContainer.done",function(e){return t._onAnimationDone(e)}),2&e&&(km("id",t._id),Bf("role",t._config.role)("aria-labelledby",t._config.ariaLabel?null:t._ariaLabelledBy)("aria-label",t._config.ariaLabel)("aria-describedby",t._config.ariaDescribedBy||null),Em("@dialogContainer",t._state))},features:[Af],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,t){1&e&&Uf(0,rO,0,0,"ng-template",0)},directives:[jI],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[sO.dialogContainer]}}),iO),cO=Wc(uO),dO=0,hO=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-"+dO++;is(this,e),this._overlayRef=t,this._containerInstance=n,this.id=i,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new Es,this._afterClosed=new Es,this._beforeClosed=new Es,this._state=0,n._id=i,n._animationStateChanged.pipe(Qk(function(e){return"opened"===e.state}),Kk(1)).subscribe(function(){r._afterOpened.next(),r._afterOpened.complete()}),n._animationStateChanged.pipe(Qk(function(e){return"closed"===e.state}),Kk(1)).subscribe(function(){clearTimeout(r._closeFallbackTimeout),r._finishDialogClose()}),t.detachments().subscribe(function(){r._beforeClosed.next(r._result),r._beforeClosed.complete(),r._afterClosed.next(r._result),r._afterClosed.complete(),r.componentInstance=null,r._overlayRef.dispose()}),t.keydownEvents().pipe(Qk(function(e){return 27===e.keyCode&&!r.disableClose&&!Rk(e)})).subscribe(function(e){e.preventDefault(),pO(r,"keyboard")}),t.backdropClick().subscribe(function(){r.disableClose?r._containerInstance._recaptureFocus():pO(r,"mouse")})}return as(e,[{key:"close",value:function(e){var t=this;this._result=e,this._containerInstance._animationStateChanged.pipe(Qk(function(e){return"closing"===e.state}),Kk(1)).subscribe(function(n){t._beforeClosed.next(e),t._beforeClosed.complete(),t._overlayRef.detachBackdrop(),t._closeFallbackTimeout=setTimeout(function(){return t._finishDialogClose()},n.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(e){var t=this._getPositionStrategy();return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._getPositionStrategy().width(e).height(t),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(e){return this._overlayRef.addPanelClass(e),this}},{key:"removePanelClass",value:function(e){return this._overlayRef.removePanelClass(e),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),e}();function pO(e,t,n){return void 0!==e._containerInstance&&(e._containerInstance._closeInteractionType=t),e.close(n)}var fO,mO,gO,vO=new $c("MatDialogData"),yO=new $c("mat-dialog-default-options"),bO=new $c("mat-dialog-scroll-strategy"),_O={provide:bO,deps:[_T],useFactory:function(e){return function(){return e.scrollStrategies.block()}}},wO=((gO=function(){function e(t,n,r,i,o,a,s,l,u){var c=this;is(this,e),this._overlay=t,this._injector=n,this._defaultOptions=r,this._parentDialog=i,this._overlayContainer=o,this._dialogRefConstructor=s,this._dialogContainerType=l,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Es,this._afterOpenedAtThisLevel=new Es,this._ariaHiddenElements=new Map,this.afterAllClosed=tI(function(){return c.openDialogs.length?c._getAfterAllClosed():c._getAfterAllClosed().pipe(XE(void 0))}),this._scrollStrategy=a}return as(e,[{key:"_getAfterAllClosed",value:function(){var e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(e,t){var n=this;(t=function(e,t){return Object.assign(Object.assign({},t),e)}(t,this._defaultOptions||new aO)).id&&this.getDialogById(t.id);var r=this._createOverlay(t),i=this._attachDialogContainer(r,t),o=this._attachDialogContent(e,i,r,t);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(o),o.afterClosed().subscribe(function(){return n._removeOpenDialog(o)}),this.afterOpened.next(o),i._initializeWithAttachedContent(),o}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(e){return this.openDialogs.find(function(t){return t.id===e})}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(e){var t=this._getOverlayConfig(e);return this._overlay.create(t)}},{key:"_getOverlayConfig",value:function(e){var t=new eT({positionStrategy:this._overlay.position().global(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(t.backdropClass=e.backdropClass),t}},{key:"_attachDialogContainer",value:function(e,t){var n=kf.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:aO,useValue:t}]}),r=new NI(this._dialogContainerType,t.viewContainerRef,n,t.componentFactoryResolver);return e.attach(r).instance}},{key:"_attachDialogContent",value:function(e,t,n,r){var i=new this._dialogRefConstructor(n,t,r.id);if(e instanceof Pv)t.attachTemplatePortal(new LI(e,null,{$implicit:r.data,dialogRef:i}));else{var o=this._createInjector(r,i,t),a=t.attachComponentPortal(new NI(e,r.viewContainerRef,o));i.componentInstance=a.instance}return i.updateSize(r.width,r.height).updatePosition(r.position),i}},{key:"_createInjector",value:function(e,t,n){var r=e&&e.viewContainerRef&&e.viewContainerRef.injector,i=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:e.data},{provide:this._dialogRefConstructor,useValue:t}];return!e.direction||r&&r.get($E,null)||i.push({provide:$E,useValue:{value:e.direction,change:Ok()}}),kf.create({parent:r||this._injector,providers:i})}},{key:"_removeOpenDialog",value:function(e){var t=this.openDialogs.indexOf(e);t>-1&&(this.openDialogs.splice(t,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(e,t){e?t.setAttribute("aria-hidden",e):t.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var e=this._overlayContainer.getContainerElement();if(e.parentElement)for(var t=e.parentElement.children,n=t.length-1;n>-1;n--){var r=t[n];r===e||"SCRIPT"===r.nodeName||"STYLE"===r.nodeName||r.hasAttribute("aria-live")||(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(e){for(var t=e.length;t--;)e[t].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),e}()).\u0275fac=function(e){return new(e||gO)(Qf(_T),Qf(kf),Qf(void 0),Qf(void 0),Qf(sT),Qf(void 0),Qf(Yc),Qf(Yc),Qf($c))},gO.\u0275dir=$l({type:gO}),gO),CO=((mO=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a,s,l){return is(this,n),t.call(this,e,r,o,s,l,a,hO,uO,vO)}return n}(wO)).\u0275fac=function(e){return new(e||mO)(md(_T),md(kf),md(zb,8),md(yO,8),md(bO),md(mO,12),md(sT))},mO.\u0275prov=dl({token:mO,factory:mO.\u0275fac}),mO),xO=((fO=function e(){is(this,e)}).\u0275mod=Wl({type:fO}),fO.\u0275inj=hl({factory:function(e){return new(e||fO)},providers:[CO,_O],imports:[[CT,BI,oA],oA]}),fO),SO=new $c("MAT_INPUT_VALUE_ACCESSOR"),PO=["mat-calendar-body",""];function kO(e,t){if(1&e&&($f(0,"tr",2),$f(1,"td",3),Cm(2),Jf(),Jf()),2&e){var n=sm();dp(1),mm("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),Bf("colspan",n.numCols),dp(1),Sm(" ",n.label," ")}}function EO(e,t){if(1&e&&($f(0,"td",7),Cm(1),Jf()),2&e){var n=sm(2);mm("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),Bf("colspan",n._firstRowOffset),dp(1),Sm(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function AO(e,t){if(1&e){var n=Xf();$f(0,"td",8),nm("click",function(e){Nu(n);var r=t.$implicit;return sm(2)._cellClicked(r,e)}),$f(1,"div",9),Cm(2),Jf(),Yf(3,"div",10),Jf()}if(2&e){var r=t.$implicit,i=t.index,o=sm().index,a=sm();mm("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),gm("mat-calendar-body-disabled",!r.enabled)("mat-calendar-body-active",a._isActiveCell(o,i))("mat-calendar-body-range-start",a._isRangeStart(r.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(r.compareValue))("mat-calendar-body-in-range",a._isInRange(r.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(r.compareValue,o,i))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(r.compareValue,o,i))("mat-calendar-body-comparison-start",a._isComparisonStart(r.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(r.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(r.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(r.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(r.compareValue))("mat-calendar-body-in-preview",a._isInPreview(r.compareValue)),Wf("ngClass",r.cssClasses)("tabindex",a._isActiveCell(o,i)?0:-1),Bf("data-mat-row",o)("data-mat-col",i)("aria-label",r.ariaLabel)("aria-disabled",!r.enabled||null)("aria-selected",a._isSelected(r.compareValue)),dp(1),gm("mat-calendar-body-selected",a._isSelected(r.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(r.compareValue))("mat-calendar-body-today",a.todayValue===r.compareValue),dp(1),Sm(" ",r.displayValue," ")}}function IO(e,t){if(1&e&&($f(0,"tr",4),Uf(1,EO,2,6,"td",5),Uf(2,AO,4,46,"td",6),Jf()),2&e){var n=t.$implicit,r=t.index,i=sm();dp(1),Wf("ngIf",0===r&&i._firstRowOffset),dp(1),Wf("ngForOf",n)}}function TO(e,t){if(1&e&&($f(0,"th",5),Cm(1),Jf()),2&e){var n=t.$implicit;Bf("aria-label",n.long),dp(1),xm(n.narrow)}}var OO=["*"];function RO(e,t){}function VO(e,t){if(1&e){var n=Xf();$f(0,"mat-month-view",5),nm("activeDateChange",function(e){return Nu(n),sm().activeDate=e})("_userSelection",function(e){return Nu(n),sm()._dateSelected(e)}),Jf()}if(2&e){var r=sm();Wf("activeDate",r.activeDate)("selected",r.selected)("dateFilter",r.dateFilter)("maxDate",r.maxDate)("minDate",r.minDate)("dateClass",r.dateClass)("comparisonStart",r.comparisonStart)("comparisonEnd",r.comparisonEnd)}}function DO(e,t){if(1&e){var n=Xf();$f(0,"mat-year-view",6),nm("activeDateChange",function(e){return Nu(n),sm().activeDate=e})("monthSelected",function(e){return Nu(n),sm()._monthSelectedInYearView(e)})("selectedChange",function(e){return Nu(n),sm()._goToDateInView(e,"month")}),Jf()}if(2&e){var r=sm();Wf("activeDate",r.activeDate)("selected",r.selected)("dateFilter",r.dateFilter)("maxDate",r.maxDate)("minDate",r.minDate)("dateClass",r.dateClass)}}function NO(e,t){if(1&e){var n=Xf();$f(0,"mat-multi-year-view",7),nm("activeDateChange",function(e){return Nu(n),sm().activeDate=e})("yearSelected",function(e){return Nu(n),sm()._yearSelectedInMultiYearView(e)})("selectedChange",function(e){return Nu(n),sm()._goToDateInView(e,"year")}),Jf()}if(2&e){var r=sm();Wf("activeDate",r.activeDate)("selected",r.selected)("dateFilter",r.dateFilter)("maxDate",r.maxDate)("minDate",r.minDate)("dateClass",r.dateClass)}}var LO,FO,MO=((LO=function(){function e(){is(this,e),this.changes=new Es,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return as(e,[{key:"formatYearRange",value:function(e,t){return"".concat(e," \u2013 ").concat(t)}}]),e}()).\u0275fac=function(e){return new(e||LO)},LO.\u0275prov=dl({factory:function(){return new LO},token:LO,providedIn:"root"}),LO),qO=function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t,s=arguments.length>6?arguments[6]:void 0;is(this,e),this.value=t,this.displayValue=n,this.ariaLabel=r,this.enabled=i,this.cssClasses=o,this.compareValue=a,this.rawValue=s},jO=((FO=function(){function e(t,n){var r=this;is(this,e),this._elementRef=t,this._ngZone=n,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new ty,this.previewChange=new ty,this._enterHandler=function(e){if(r._skipNextFocus&&"focus"===e.type)r._skipNextFocus=!1;else if(e.target&&r.isRange){var t=r._getCellFromElement(e.target);t&&r._ngZone.run(function(){return r.previewChange.emit({value:t.enabled?t:null,event:e})})}},this._leaveHandler=function(e){null!==r.previewEnd&&r.isRange&&e.target&&BO(e.target)&&r._ngZone.run(function(){return r.previewChange.emit({value:null,event:e})})},n.runOutsideAngular(function(){var e=t.nativeElement;e.addEventListener("mouseenter",r._enterHandler,!0),e.addEventListener("focus",r._enterHandler,!0),e.addEventListener("mouseleave",r._leaveHandler,!0),e.addEventListener("blur",r._leaveHandler,!0)})}return as(e,[{key:"_cellClicked",value:function(e,t){e.enabled&&this.selectedValueChange.emit({value:e.value,event:t})}},{key:"_isSelected",value:function(e){return this.startValue===e||this.endValue===e}},{key:"ngOnChanges",value:function(e){var t=e.numCols,n=this.rows,r=this.numCols;(e.rows||t)&&(this._firstRowOffset=n&&n.length&&n[0].length?r-n[0].length:0),(e.cellAspectRatio||t||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/r+"%"),!t&&this._cellWidth||(this._cellWidth=100/r+"%")}},{key:"ngOnDestroy",value:function(){var e=this._elementRef.nativeElement;e.removeEventListener("mouseenter",this._enterHandler,!0),e.removeEventListener("focus",this._enterHandler,!0),e.removeEventListener("mouseleave",this._leaveHandler,!0),e.removeEventListener("blur",this._leaveHandler,!0)}},{key:"_isActiveCell",value:function(e,t){var n=e*this.numCols+t;return e&&(n-=this._firstRowOffset),n==this.activeCell}},{key:"_focusActiveCell",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.pipe(Kk(1)).subscribe(function(){var n=e._elementRef.nativeElement.querySelector(".mat-calendar-body-active");n&&(t||(e._skipNextFocus=!0),n.focus())})})}},{key:"_isRangeStart",value:function(e){return zO(e,this.startValue,this.endValue)}},{key:"_isRangeEnd",value:function(e){return UO(e,this.startValue,this.endValue)}},{key:"_isInRange",value:function(e){return HO(e,this.startValue,this.endValue,this.isRange)}},{key:"_isComparisonStart",value:function(e){return zO(e,this.comparisonStart,this.comparisonEnd)}},{key:"_isComparisonBridgeStart",value:function(e,t,n){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;var r=this.rows[t][n-1];if(!r){var i=this.rows[t-1];r=i&&i[i.length-1]}return r&&!this._isRangeEnd(r.compareValue)}},{key:"_isComparisonBridgeEnd",value:function(e,t,n){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;var r=this.rows[t][n+1];if(!r){var i=this.rows[t+1];r=i&&i[0]}return r&&!this._isRangeStart(r.compareValue)}},{key:"_isComparisonEnd",value:function(e){return UO(e,this.comparisonStart,this.comparisonEnd)}},{key:"_isInComparisonRange",value:function(e){return HO(e,this.comparisonStart,this.comparisonEnd,this.isRange)}},{key:"_isComparisonIdentical",value:function(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}},{key:"_isPreviewStart",value:function(e){return zO(e,this.previewStart,this.previewEnd)}},{key:"_isPreviewEnd",value:function(e){return UO(e,this.previewStart,this.previewEnd)}},{key:"_isInPreview",value:function(e){return HO(e,this.previewStart,this.previewEnd,this.isRange)}},{key:"_getCellFromElement",value:function(e){var t;if(BO(e)?t=e:BO(e.parentNode)&&(t=e.parentNode),t){var n=t.getAttribute("data-mat-row"),r=t.getAttribute("data-mat-col");if(n&&r)return this.rows[parseInt(n)][parseInt(r)]}return null}}]),e}()).\u0275fac=function(e){return new(e||FO)(Qf(Yg),Qf(Hy))},FO.\u0275cmp=zl({type:FO,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[cu],attrs:PO,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(e,t){1&e&&(Uf(0,kO,3,6,"tr",0),Uf(1,IO,3,2,"tr",1)),2&e&&(Wf("ngIf",t._firstRowOffset<t.labelMinRequiredCells),dp(1),Wf("ngForOf",t.rows))},directives:[M_,L_,D_],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),FO);function BO(e){return"TD"===e.nodeName}function zO(e,t,n){return null!==n&&t!==n&&e<n&&e===t}function UO(e,t,n){return null!==t&&t!==n&&e>=t&&e===n}function HO(e,t,n,r){return r&&null!==t&&null!==n&&t!==n&&e>=t&&e<=n}var QO,WO,GO,$O,JO=function e(t,n){is(this,e),this.start=t,this.end=n},YO=((WO=function(){function e(t,n){is(this,e),this.selection=t,this._adapter=n,this._selectionChanged=new Es,this.selectionChanged=this._selectionChanged,this.selection=t}return as(e,[{key:"updateSelection",value:function(e,t){this.selection=e,this._selectionChanged.next({selection:e,source:t})}},{key:"ngOnDestroy",value:function(){this._selectionChanged.complete()}},{key:"_isValidDateInstance",value:function(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)}}]),e}()).\u0275fac=function(e){return new(e||WO)(Qf(void 0),Qf(dA))},WO.\u0275dir=$l({type:WO}),WO),KO=((QO=function(e){Ka(n,e);var t=Xa(n);function n(e){return is(this,n),t.call(this,null,e)}return as(n,[{key:"add",value:function(e){Ya(rs(n.prototype),"updateSelection",this).call(this,e,this)}},{key:"isValid",value:function(){return null!=this.selection&&this._isValidDateInstance(this.selection)}},{key:"isComplete",value:function(){return null!=this.selection}}]),n}(YO)).\u0275fac=function(e){return new(e||QO)(md(dA))},QO.\u0275prov=dl({token:QO,factory:QO.\u0275fac}),QO),ZO={provide:YO,deps:[[new ad,new ld,YO],dA],useFactory:function(e,t){return e||new KO(t)}},XO=new $c("MAT_DATE_RANGE_SELECTION_STRATEGY"),eR=(($O=function(){function e(t,n,r,i,o){is(this,e),this._changeDetectorRef=t,this._dateFormats=n,this._dateAdapter=r,this._dir=i,this._rangeStrategy=o,this._rerenderSubscription=ps.EMPTY,this.selectedChange=new ty,this._userSelection=new ty,this.activeDateChange=new ty,this._activeDate=this._dateAdapter.today()}return as(e,[{key:"ngAfterContentInit",value:function(){var e=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(XE(null)).subscribe(function(){return e._init()})}},{key:"ngOnChanges",value:function(e){var t=e.comparisonStart||e.comparisonEnd;t&&!t.firstChange&&this._setRanges(this.selected)}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_dateSelected",value:function(e){var t,n,r=e.value,i=this._dateAdapter.getYear(this.activeDate),o=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(i,o,r);this._selected instanceof JO?(t=this._getDateInCurrentMonth(this._selected.start),n=this._getDateInCurrentMonth(this._selected.end)):t=n=this._getDateInCurrentMonth(this._selected),t===r&&n===r||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:e.event})}},{key:"_handleCalendarBodyKeydown",value:function(e){var t=this._activeDate,n=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:e}),e.preventDefault()));case 27:return void(null==this._previewEnd||Rk(e)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:e}),e.preventDefault(),e.stopPropagation()));default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),e.preventDefault()}},{key:"_init",value:function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(e){this._matCalendarBody._focusActiveCell(e)}},{key:"_previewChanged",value:function(e){var t=e.event,n=e.value;if(this._rangeStrategy){var r=this._rangeStrategy.createPreview(n?n.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(r.start),this._previewEnd=this._getCellCompareValue(r.end),this._changeDetectorRef.detectChanges()}}},{key:"_initWeekdays",value:function(){var e=this._dateAdapter.getFirstDayOfWeek(),t=this._dateAdapter.getDayOfWeekNames("narrow"),n=this._dateAdapter.getDayOfWeekNames("long").map(function(e,n){return{long:e,narrow:t[n]}});this._weekdays=n.slice(e).concat(n.slice(0,e))}},{key:"_createWeekCells",value:function(){var e=this._dateAdapter.getNumDaysInMonth(this.activeDate),t=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,r=this._firstWeekOffset;n<e;n++,r++){7==r&&(this._weeks.push([]),r=0);var i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),n+1),o=this._shouldEnableDate(i),a=this._dateAdapter.format(i,this._dateFormats.display.dateA11yLabel),s=this.dateClass?this.dateClass(i,"month"):void 0;this._weeks[this._weeks.length-1].push(new qO(n+1,t[n],a,o,s,this._getCellCompareValue(i),i))}}},{key:"_shouldEnableDate",value:function(e){return!!e&&(!this.minDate||this._dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(e))}},{key:"_getDateInCurrentMonth",value:function(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null}},{key:"_hasSameMonthAndYear",value:function(e,t){return!(!e||!t||this._dateAdapter.getMonth(e)!=this._dateAdapter.getMonth(t)||this._dateAdapter.getYear(e)!=this._dateAdapter.getYear(t))}},{key:"_getCellCompareValue",value:function(e){if(e){var t=this._dateAdapter.getYear(e),n=this._dateAdapter.getMonth(e),r=this._dateAdapter.getDate(e);return new Date(t,n,r).getTime()}return null}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setRanges",value:function(e){e instanceof JO?(this._rangeStart=this._getCellCompareValue(e.start),this._rangeEnd=this._getCellCompareValue(e.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(e),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}},{key:"activeDate",get:function(){return this._activeDate},set:function(e){var t=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(t,this._activeDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e instanceof JO?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setRanges(this._selected)}},{key:"minDate",get:function(){return this._minDate},set:function(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"maxDate",get:function(){return this._maxDate},set:function(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}}]),e}()).\u0275fac=function(e){return new(e||$O)(Qf(bv),Qf(hA,8),Qf(dA,8),Qf($E,8),Qf(XO,8))},$O.\u0275cmp=zl({type:$O,selectors:[["mat-month-view"]],viewQuery:function(e,t){var n;1&e&&my(jO,!0),2&e&&py(n=yy())&&(t._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[cu],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(e,t){1&e&&($f(0,"table",0),$f(1,"thead",1),$f(2,"tr"),Uf(3,TO,2,2,"th",2),Jf(),$f(4,"tr"),Yf(5,"th",3),Jf(),Jf(),$f(6,"tbody",4),nm("selectedValueChange",function(e){return t._dateSelected(e)})("previewChange",function(e){return t._previewChanged(e)})("keydown",function(e){return t._handleCalendarBodyKeydown(e)}),Jf(),Jf()),2&e&&(dp(3),Wf("ngForOf",t._weekdays),dp(3),Wf("label",t._monthLabel)("rows",t._weeks)("todayValue",t._todayDate)("startValue",t._rangeStart)("endValue",t._rangeEnd)("comparisonStart",t._comparisonRangeStart)("comparisonEnd",t._comparisonRangeEnd)("previewStart",t._previewStart)("previewEnd",t._previewEnd)("isRange",t._isRange)("labelMinRequiredCells",3)("activeCell",t._dateAdapter.getDate(t.activeDate)-1))},directives:[L_,jO],encapsulation:2,changeDetection:0}),$O),tR=((GO=function(){function e(t,n,r){is(this,e),this._changeDetectorRef=t,this._dateAdapter=n,this._dir=r,this._rerenderSubscription=ps.EMPTY,this.selectedChange=new ty,this.yearSelected=new ty,this.activeDateChange=new ty,this._activeDate=this._dateAdapter.today()}return as(e,[{key:"ngAfterContentInit",value:function(){var e=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(XE(null)).subscribe(function(){return e._init()})}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_init",value:function(){var e=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var t=this._dateAdapter.getYear(this._activeDate)-rR(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var n=0,r=[];n<24;n++)r.push(t+n),4==r.length&&(this._years.push(r.map(function(t){return e._createCellForYear(t)})),r=[]);this._changeDetectorRef.markForCheck()}},{key:"_yearSelected",value:function(e){var t=e.value;this.yearSelected.emit(this._dateAdapter.createDate(t,0,1));var n=this._dateAdapter.getMonth(this.activeDate),r=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(t,n,1));this.selectedChange.emit(this._dateAdapter.createDate(t,n,Math.min(this._dateAdapter.getDate(this.activeDate),r)))}},{key:"_handleCalendarBodyKeydown",value:function(e){var t=this._activeDate,n=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-rR(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-rR(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-240:-24);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?240:24);break;case 13:case 32:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:e});break;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),e.preventDefault()}},{key:"_getActiveCell",value:function(){return rR(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}},{key:"_focusActiveCell",value:function(){this._matCalendarBody._focusActiveCell()}},{key:"_createCellForYear",value:function(e){var t=this._dateAdapter.createDate(e,0,1),n=this._dateAdapter.getYearName(t),r=this.dateClass?this.dateClass(t,"multi-year"):void 0;return new qO(e,n,n,this._shouldEnableYear(e),r)}},{key:"_shouldEnableYear",value:function(e){if(null==e||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(var t=this._dateAdapter.createDate(e,0,1);this._dateAdapter.getYear(t)==e;t=this._dateAdapter.addCalendarDays(t,1))if(this.dateFilter(t))return!0;return!1}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setSelectedYear",value:function(e){if(this._selectedYear=null,e instanceof JO){var t=e.start||e.end;t&&(this._selectedYear=this._dateAdapter.getYear(t))}else e&&(this._selectedYear=this._dateAdapter.getYear(e))}},{key:"activeDate",get:function(){return this._activeDate},set:function(e){var t=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),nR(this._dateAdapter,t,this._activeDate,this.minDate,this.maxDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e instanceof JO?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedYear(e)}},{key:"minDate",get:function(){return this._minDate},set:function(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"maxDate",get:function(){return this._maxDate},set:function(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}}]),e}()).\u0275fac=function(e){return new(e||GO)(Qf(bv),Qf(dA,8),Qf($E,8))},GO.\u0275cmp=zl({type:GO,selectors:[["mat-multi-year-view"]],viewQuery:function(e,t){var n;1&e&&my(jO,!0),2&e&&py(n=yy())&&(t._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(e,t){1&e&&($f(0,"table",0),$f(1,"thead",1),$f(2,"tr"),Yf(3,"th",2),Jf(),Jf(),$f(4,"tbody",3),nm("selectedValueChange",function(e){return t._yearSelected(e)})("keydown",function(e){return t._handleCalendarBodyKeydown(e)}),Jf(),Jf()),2&e&&(dp(4),Wf("rows",t._years)("todayValue",t._todayYear)("startValue",t._selectedYear)("endValue",t._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",t._getActiveCell()))},directives:[jO],encapsulation:2,changeDetection:0}),GO);function nR(e,t,n,r,i){var o=e.getYear(t),a=e.getYear(n),s=iR(e,r,i);return Math.floor((o-s)/24)===Math.floor((a-s)/24)}function rR(e,t,n,r){return((e.getYear(t)-iR(e,n,r))%24+24)%24}function iR(e,t,n){var r=0;return n?r=e.getYear(n)-24+1:t&&(r=e.getYear(t)),r}var oR,aR,sR,lR,uR,cR,dR,hR,pR,fR,mR,gR,vR,yR,bR=((sR=function(){function e(t,n,r,i){is(this,e),this._changeDetectorRef=t,this._dateFormats=n,this._dateAdapter=r,this._dir=i,this._rerenderSubscription=ps.EMPTY,this.selectedChange=new ty,this.monthSelected=new ty,this.activeDateChange=new ty,this._activeDate=this._dateAdapter.today()}return as(e,[{key:"ngAfterContentInit",value:function(){var e=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(XE(null)).subscribe(function(){return e._init()})}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_monthSelected",value:function(e){var t=e.value,n=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1);this.monthSelected.emit(n);var r=this._dateAdapter.getNumDaysInMonth(n);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,Math.min(this._dateAdapter.getDate(this.activeDate),r)))}},{key:"_handleCalendarBodyKeydown",value:function(e){var t=this._activeDate,n=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,n?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,n?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case 13:case 32:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:e});break;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),e.preventDefault()}},{key:"_init",value:function(){var e=this;this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);var t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(function(n){return n.map(function(n){return e._createCellForMonth(n,t[n])})}),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(){this._matCalendarBody._focusActiveCell()}},{key:"_getMonthInCurrentYear",value:function(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null}},{key:"_createCellForMonth",value:function(e,t){var n=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),r=this._dateAdapter.format(n,this._dateFormats.display.monthYearA11yLabel),i=this.dateClass?this.dateClass(n,"year"):void 0;return new qO(e,t.toLocaleUpperCase(),r,this._shouldEnableMonth(e),i)}},{key:"_shouldEnableMonth",value:function(e){var t=this._dateAdapter.getYear(this.activeDate);if(null==e||this._isYearAndMonthAfterMaxDate(t,e)||this._isYearAndMonthBeforeMinDate(t,e))return!1;if(!this.dateFilter)return!0;for(var n=this._dateAdapter.createDate(t,e,1);this._dateAdapter.getMonth(n)==e;n=this._dateAdapter.addCalendarDays(n,1))if(this.dateFilter(n))return!0;return!1}},{key:"_isYearAndMonthAfterMaxDate",value:function(e,t){if(this.maxDate){var n=this._dateAdapter.getYear(this.maxDate),r=this._dateAdapter.getMonth(this.maxDate);return e>n||e===n&&t>r}return!1}},{key:"_isYearAndMonthBeforeMinDate",value:function(e,t){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),r=this._dateAdapter.getMonth(this.minDate);return e<n||e===n&&t<r}return!1}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setSelectedMonth",value:function(e){this._selectedMonth=e instanceof JO?this._getMonthInCurrentYear(e.start)||this._getMonthInCurrentYear(e.end):this._getMonthInCurrentYear(e)}},{key:"activeDate",get:function(){return this._activeDate},set:function(e){var t=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._dateAdapter.getYear(t)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e instanceof JO?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedMonth(e)}},{key:"minDate",get:function(){return this._minDate},set:function(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"maxDate",get:function(){return this._maxDate},set:function(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}}]),e}()).\u0275fac=function(e){return new(e||sR)(Qf(bv),Qf(hA,8),Qf(dA,8),Qf($E,8))},sR.\u0275cmp=zl({type:sR,selectors:[["mat-year-view"]],viewQuery:function(e,t){var n;1&e&&my(jO,!0),2&e&&py(n=yy())&&(t._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(e,t){1&e&&($f(0,"table",0),$f(1,"thead",1),$f(2,"tr"),Yf(3,"th",2),Jf(),Jf(),$f(4,"tbody",3),nm("selectedValueChange",function(e){return t._monthSelected(e)})("keydown",function(e){return t._handleCalendarBodyKeydown(e)}),Jf(),Jf()),2&e&&(dp(4),Wf("label",t._yearLabel)("rows",t._months)("todayValue",t._todayMonth)("startValue",t._selectedMonth)("endValue",t._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",t._dateAdapter.getMonth(t.activeDate)))},directives:[jO],encapsulation:2,changeDetection:0}),sR),_R=((aR=function(){function e(t,n,r,i,o){is(this,e),this._intl=t,this.calendar=n,this._dateAdapter=r,this._dateFormats=i,this.calendar.stateChanges.subscribe(function(){return o.markForCheck()})}return as(e,[{key:"currentPeriodClicked",value:function(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}},{key:"previousClicked",value:function(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}},{key:"nextClicked",value:function(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}},{key:"previousEnabled",value:function(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}},{key:"nextEnabled",value:function(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}},{key:"_isSameView",value:function(e,t){return"month"==this.calendar.currentView?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(t):"year"==this.calendar.currentView?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t):nR(this._dateAdapter,e,t,this.calendar.minDate,this.calendar.maxDate)}},{key:"periodButtonText",get:function(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);var e=this._dateAdapter.getYear(this.calendar.activeDate)-rR(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),t=e+24-1,n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1)),r=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return this._intl.formatYearRange(n,r)}},{key:"periodButtonLabel",get:function(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}},{key:"prevButtonLabel",get:function(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}},{key:"nextButtonLabel",get:function(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}}]),e}()).\u0275fac=function(e){return new(e||aR)(Qf(MO),Qf(sl(function(){return wR})),Qf(dA,8),Qf(hA,8),Qf(bv))},aR.\u0275cmp=zl({type:aR,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:OO,decls:9,vars:8,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(e,t){1&e&&(um(),$f(0,"div",0),$f(1,"div",1),$f(2,"button",2),nm("click",function(){return t.currentPeriodClicked()}),Cm(3),Yf(4,"div",3),Jf(),Yf(5,"div",4),cm(6),$f(7,"button",5),nm("click",function(){return t.previousClicked()}),Jf(),$f(8,"button",6),nm("click",function(){return t.nextClicked()}),Jf(),Jf(),Jf()),2&e&&(dp(2),Bf("aria-label",t.periodButtonLabel),dp(1),Sm(" ",t.periodButtonText," "),dp(1),gm("mat-calendar-invert","month"!=t.calendar.currentView),dp(3),Wf("disabled",!t.previousEnabled()),Bf("aria-label",t.prevButtonLabel),dp(1),Wf("disabled",!t.nextEnabled()),Bf("aria-label",t.nextButtonLabel))},directives:[tO,RE],encapsulation:2,changeDetection:0}),aR),wR=((oR=function(){function e(t,n,r,i){var o=this;is(this,e),this._dateAdapter=n,this._dateFormats=r,this._changeDetectorRef=i,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new ty,this.yearSelected=new ty,this.monthSelected=new ty,this.viewChanged=new ty(!0),this._userSelection=new ty,this.stateChanges=new Es,this._intlChanges=t.changes.subscribe(function(){i.markForCheck(),o.stateChanges.next()})}return as(e,[{key:"ngAfterContentInit",value:function(){this._calendarHeaderPortal=new NI(this.headerComponent||_R),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}},{key:"ngAfterViewChecked",value:function(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}},{key:"ngOnChanges",value:function(e){var t=e.minDate||e.maxDate||e.dateFilter;if(t&&!t.firstChange){var n=this._getCurrentViewComponent();n&&(this._changeDetectorRef.detectChanges(),n._init())}this.stateChanges.next()}},{key:"focusActiveCell",value:function(){this._getCurrentViewComponent()._focusActiveCell(!1)}},{key:"updateTodaysDate",value:function(){var e=this.currentView;("month"===e?this.monthView:"year"===e?this.yearView:this.multiYearView)._init()}},{key:"_dateSelected",value:function(e){var t=e.value;(this.selected instanceof JO||t&&!this._dateAdapter.sameDate(t,this.selected))&&this.selectedChange.emit(t),this._userSelection.emit(e)}},{key:"_yearSelectedInMultiYearView",value:function(e){this.yearSelected.emit(e)}},{key:"_monthSelectedInYearView",value:function(e){this.monthSelected.emit(e)}},{key:"_goToDateInView",value:function(e,t){this.activeDate=e,this.currentView=t}},{key:"_getCurrentViewComponent",value:function(){return this.monthView||this.yearView||this.multiYearView}},{key:"startAt",get:function(){return this._startAt},set:function(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e instanceof JO?e:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"minDate",get:function(){return this._minDate},set:function(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"maxDate",get:function(){return this._maxDate},set:function(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"activeDate",get:function(){return this._clampedActiveDate},set:function(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}},{key:"currentView",get:function(){return this._currentView},set:function(e){var t=this._currentView!==e?e:null;this._currentView=e,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),t&&this.viewChanged.emit(t)}}]),e}()).\u0275fac=function(e){return new(e||oR)(Qf(MO),Qf(dA,8),Qf(hA,8),Qf(bv))},oR.\u0275cmp=zl({type:oR,selectors:[["mat-calendar"]],viewQuery:function(e,t){var n;1&e&&(my(eR,!0),my(bR,!0),my(tR,!0)),2&e&&(py(n=yy())&&(t.monthView=n.first),py(n=yy())&&(t.yearView=n.first),py(n=yy())&&(t.multiYearView=n.first))},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection"},exportAs:["matCalendar"],features:[Ug([ZO]),cu],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(e,t){1&e&&(Uf(0,RO,0,0,"ng-template",0),$f(1,"div",1),Uf(2,VO,1,8,"mat-month-view",2),Uf(3,DO,1,6,"mat-year-view",3),Uf(4,NO,1,6,"mat-multi-year-view",4),Jf()),2&e&&(Wf("cdkPortalOutlet",t._calendarHeaderPortal),dp(1),Wf("ngSwitch",t.currentView),dp(1),Wf("ngSwitchCase","month"),dp(1),Wf("ngSwitchCase","year"),dp(1),Wf("ngSwitchCase","multi-year"))},directives:[jI,HE,W_,G_,eR,bR,tR],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n'],encapsulation:2,changeDetection:0}),oR),CR={transformPanel:Zw("transformPanel",[nC("void",tC({opacity:0,transform:"scale(1, 0.8)"})),rC("void => enter",Xw("120ms cubic-bezier(0, 0, 0.2, 1)",tC({opacity:1,transform:"scale(1, 1)"}))),rC("* => void",Xw("100ms linear",tC({opacity:0})))]),fadeInCalendar:Zw("fadeInCalendar",[nC("void",tC({opacity:0})),nC("enter",tC({opacity:1})),rC("void => *",Xw("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},xR=0,SR=new $c("mat-datepicker-scroll-strategy"),PR={provide:SR,deps:[_T],useFactory:function(e){return function(){return e.scrollStrategies.reposition()}}},kR=sA(function e(t){is(this,e),this._elementRef=t}),ER=((cR=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a,s){var l;return is(this,n),(l=t.call(this,e))._changeDetectorRef=r,l._model=i,l._dateAdapter=o,l._rangeSelectionStrategy=a,l._subscriptions=new ps,l._animationState="enter",l._animationDone=new Es,l._closeButtonText=(null==s?void 0:s.closeCalendarLabel)||"Close calendar",l}return as(n,[{key:"ngAfterViewInit",value:function(){var e=this;this._subscriptions.add(this.datepicker._stateChanges.subscribe(function(){e._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}},{key:"ngOnDestroy",value:function(){this._subscriptions.unsubscribe(),this._animationDone.complete()}},{key:"_handleUserSelection",value:function(e){var t=this._model.selection,n=e.value,r=t instanceof JO;if(r&&this._rangeSelectionStrategy){var i=this._rangeSelectionStrategy.selectionFinished(n,t,e.event);this._model.updateSelection(i,this)}else!n||!r&&this._dateAdapter.sameDate(n,t)||this._model.add(n);this._model&&!this._model.isComplete()||this.datepicker.close()}},{key:"_startExitAnimation",value:function(){this._animationState="void",this._changeDetectorRef.markForCheck()}},{key:"_getSelected",value:function(){return this._model.selection}}]),n}(kR)).\u0275fac=function(e){return new(e||cR)(Qf(Yg),Qf(bv),Qf(YO),Qf(dA),Qf(XO,8),Qf(MO))},cR.\u0275cmp=zl({type:cR,selectors:[["mat-datepicker-content"]],viewQuery:function(e,t){var n;1&e&&my(wR,!0),2&e&&py(n=yy())&&(t._calendar=n.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(e,t){1&e&&rm("@transformPanel.done",function(){return t._animationDone.next()}),2&e&&(Em("@transformPanel",t._animationState),gm("mat-datepicker-content-touch",t.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[Af],decls:4,vars:16,consts:[["cdkTrapFocus",""],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],["type","button","mat-raised-button","","color","primary",1,"mat-datepicker-close-button",3,"focus","blur","click"]],template:function(e,t){1&e&&($f(0,"div",0),$f(1,"mat-calendar",1),nm("yearSelected",function(e){return t.datepicker._selectYear(e)})("monthSelected",function(e){return t.datepicker._selectMonth(e)})("viewChanged",function(e){return t.datepicker._viewChanged(e)})("_userSelection",function(e){return t._handleUserSelection(e)}),Jf(),$f(2,"button",2),nm("focus",function(){return t._closeButtonFocused=!0})("blur",function(){return t._closeButtonFocused=!1})("click",function(){return t.datepicker.close()}),Cm(3),Jf(),Jf()),2&e&&(dp(1),Wf("id",t.datepicker.id)("ngClass",t.datepicker.panelClass)("startAt",t.datepicker.startAt)("startView",t.datepicker.startView)("minDate",t.datepicker._getMinDate())("maxDate",t.datepicker._getMaxDate())("dateFilter",t.datepicker._getDateFilter())("headerComponent",t.datepicker.calendarHeaderComponent)("selected",t._getSelected())("dateClass",t.datepicker.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)("@fadeInCalendar","enter"),dp(1),gm("cdk-visually-hidden",!t._closeButtonFocused),dp(1),xm(t._closeButtonText))},directives:[kE,wR,D_,tO],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[CR.transformPanel,CR.fadeInCalendar]},changeDetection:0}),cR),AR=((uR=function(){function e(t,n,r,i,o,a,s,l,u){is(this,e),this._dialog=t,this._overlay=n,this._ngZone=r,this._viewContainerRef=i,this._dateAdapter=a,this._dir=s,this._document=l,this._model=u,this._inputStateChanges=ps.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new ty,this.monthSelected=new ty,this.viewChanged=new ty(!0),this.openedStream=new ty,this.closedStream=new ty,this._opened=!1,this.id="mat-datepicker-"+xR++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this.id+"-backdrop",this._stateChanges=new Es,this._scrollStrategy=o}return as(e,[{key:"_getMinDate",value:function(){return this._datepickerInput&&this._datepickerInput.min}},{key:"_getMaxDate",value:function(){return this._datepickerInput&&this._datepickerInput.max}},{key:"_getDateFilter",value:function(){return this._datepickerInput&&this._datepickerInput.dateFilter}},{key:"ngOnChanges",value:function(e){var t=e.xPosition||e.yPosition;t&&!t.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()}},{key:"select",value:function(e){this._model.add(e)}},{key:"_selectYear",value:function(e){this.yearSelected.emit(e)}},{key:"_selectMonth",value:function(e){this.monthSelected.emit(e)}},{key:"_viewChanged",value:function(e){this.viewChanged.emit(e)}},{key:"_registerInput",value:function(e){var t=this;return this._inputStateChanges.unsubscribe(),this._datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe(function(){return t._stateChanges.next(void 0)}),this._model}},{key:"open",value:function(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}},{key:"close",value:function(){var e=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(Kk(1)).subscribe(function(){return e._destroyPopup()})}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}}},{key:"_openAsDialog",value:function(){var e=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(ER,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(function(){return e.close()}),this._forwardContentValues(this._dialogRef.componentInstance)}},{key:"_openAsPopup",value:function(){var e=this,t=new NI(ER,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Kk(1)).subscribe(function(){e._popupRef.updatePosition()})}},{key:"_forwardContentValues",value:function(e){e.datepicker=this,e.color=this.color}},{key:"_createPopup",value:function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new eT({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),$s(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Qk(function(t){return 27===t.keyCode&&!Rk(t)||e._datepickerInput&&Rk(t,"altKey")&&38===t.keyCode}))).subscribe(function(t){t&&t.preventDefault(),e.close()})}},{key:"_destroyPopup",value:function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}},{key:"_setConnectedPositions",value:function(e){var t="end"===this.xPosition?"end":"start",n="start"===t?"end":"start",r="above"===this.yPosition?"bottom":"top",i="top"===r?"bottom":"top";return e.withPositions([{originX:t,originY:i,overlayX:t,overlayY:r},{originX:t,originY:r,overlayX:t,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:r},{originX:n,originY:r,overlayX:n,overlayY:i}])}},{key:"startAt",get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}},{key:"color",get:function(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)},set:function(e){this._color=e}},{key:"touchUi",get:function(){return this._touchUi},set:function(e){this._touchUi=eE(e)}},{key:"disabled",get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(e){var t=eE(e);t!==this._disabled&&(this._disabled=t,this._stateChanges.next(void 0))}},{key:"panelClass",get:function(){return this._panelClass},set:function(e){this._panelClass=iE(e)}},{key:"opened",get:function(){return this._opened},set:function(e){eE(e)?this.open():this.close()}}]),e}()).\u0275fac=function(e){return new(e||uR)(Qf(CO),Qf(_T),Qf(Hy),Qf(Ov),Qf(SR),Qf(dA,8),Qf($E,8),Qf(Cb,8),Qf(YO))},uR.\u0275dir=$l({type:uR,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[cu]}),uR),IR=((lR=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return n}(AR)).\u0275fac=function(e){return TR(e||lR)},lR.\u0275cmp=zl({type:lR,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[Ug([ZO]),Af],decls:0,vars:0,template:function(e,t){},encapsulation:2,changeDetection:0}),lR),TR=Wc(IR),OR=function e(t,n){is(this,e),this.target=t,this.targetElement=n,this.value=this.target.value},RR=((dR=function(){function e(t,n,r){var i=this;is(this,e),this._elementRef=t,this._dateAdapter=n,this._dateFormats=r,this.dateChange=new ty,this.dateInput=new ty,this._valueChange=new ty,this.stateChanges=new Es,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=ps.EMPTY,this._localeSubscription=ps.EMPTY,this._parseValidator=function(){return i._lastValueValid?null:{matDatepickerParse:{text:i._elementRef.nativeElement.value}}},this._filterValidator=function(e){var t=i._dateAdapter.getValidDateOrNull(i._dateAdapter.deserialize(e.value));return!t||i._matchesFilter(t)?null:{matDatepickerFilter:!0}},this._minValidator=function(e){var t=i._dateAdapter.getValidDateOrNull(i._dateAdapter.deserialize(e.value)),n=i._getMinDate();return!n||!t||i._dateAdapter.compareDate(n,t)<=0?null:{matDatepickerMin:{min:n,actual:t}}},this._maxValidator=function(e){var t=i._dateAdapter.getValidDateOrNull(i._dateAdapter.deserialize(e.value)),n=i._getMaxDate();return!n||!t||i._dateAdapter.compareDate(n,t)>=0?null:{matDatepickerMax:{max:n,actual:t}}},this._lastValueValid=!1,this._localeSubscription=n.localeChanges.subscribe(function(){i.value=i.value})}return as(e,[{key:"_getValidators",value:function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}},{key:"_registerModel",value:function(e){var t=this;this._model=e,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(function(e){if(e.source!==t){var n=t._getValueFromModel(e.selection);t._lastValueValid=t._isValidValue(n),t._cvaOnChange(n),t._onTouched(),t._formatValue(n),t._canEmitChangeEvent(e)&&(t.dateInput.emit(new OR(t,t._elementRef.nativeElement)),t.dateChange.emit(new OR(t,t._elementRef.nativeElement))),t._outsideValueChanged&&t._outsideValueChanged()}})}},{key:"ngAfterViewInit",value:function(){this._isInitialized=!0}},{key:"ngOnChanges",value:function(e){(function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=e[r[n]],o=i.previousValue,a=i.currentValue;if(!t.isDateInstance(o)||!t.isDateInstance(a))return!0;if(!t.sameDate(o,a))return!0}return!1})(e,this._dateAdapter)&&this.stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this.stateChanges.complete()}},{key:"registerOnValidatorChange",value:function(e){this._validatorOnChange=e}},{key:"validate",value:function(e){return this._validator?this._validator(e):null}},{key:"writeValue",value:function(e){this.value=e}},{key:"registerOnChange",value:function(e){this._cvaOnChange=e}},{key:"registerOnTouched",value:function(e){this._onTouched=e}},{key:"setDisabledState",value:function(e){this.disabled=e}},{key:"_onKeydown",value:function(e){e.altKey&&40===e.keyCode&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),e.preventDefault())}},{key:"_onInput",value:function(e){var t=this._lastValueValid,n=this._dateAdapter.parse(e,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(n),n=this._dateAdapter.getValidDateOrNull(n),this._dateAdapter.sameDate(n,this.value)?(e&&!this.value&&this._cvaOnChange(n),t!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(n),this._cvaOnChange(n),this._valueChange.emit(n),this.dateInput.emit(new OR(this,this._elementRef.nativeElement)))}},{key:"_onChange",value:function(){this.dateChange.emit(new OR(this,this._elementRef.nativeElement))}},{key:"_onBlur",value:function(){this.value&&this._formatValue(this.value),this._onTouched()}},{key:"_formatValue",value:function(e){this._elementRef.nativeElement.value=e?this._dateAdapter.format(e,this._dateFormats.display.dateInput):""}},{key:"_assignValue",value:function(e){this._model?(this._assignValueToModel(e),this._pendingValue=null):this._pendingValue=e}},{key:"_isValidValue",value:function(e){return!e||this._dateAdapter.isValid(e)}},{key:"_parentDisabled",value:function(){return!1}},{key:"_matchesFilter",value:function(e){var t=this._getDateFilter();return!t||t(e)}},{key:"value",get:function(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue},set:function(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=this._isValidValue(e),e=this._dateAdapter.getValidDateOrNull(e);var t=this.value;this._assignValue(e),this._formatValue(e),this._dateAdapter.sameDate(t,e)||this._valueChange.emit(e)}},{key:"disabled",get:function(){return!!this._disabled||this._parentDisabled()},set:function(e){var t=eE(e),n=this._elementRef.nativeElement;this._disabled!==t&&(this._disabled=t,this.stateChanges.next(void 0)),t&&this._isInitialized&&n.blur&&n.blur()}}]),e}()).\u0275fac=function(e){return new(e||dR)(Qf(Yg),Qf(dA,8),Qf(hA,8))},dR.\u0275dir=$l({type:dR,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[cu]}),dR),VR={provide:kS,useExisting:sl(function(){return NR}),multi:!0},DR={provide:DS,useExisting:sl(function(){return NR}),multi:!0},NR=((pR=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a,s;return is(this,n),(s=t.call(this,e,r,i))._formField=o,s._validator=FS.compose(Ya((a=ts(s),rs(n.prototype)),"_getValidators",a).call(a)),s}return as(n,[{key:"getConnectedOverlayOrigin",value:function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}},{key:"getThemePalette",value:function(){return this._formField?this._formField.color:void 0}},{key:"getStartValue",value:function(){return this.value}},{key:"_openPopup",value:function(){this._datepicker&&this._datepicker.open()}},{key:"_getValueFromModel",value:function(e){return e}},{key:"_assignValueToModel",value:function(e){this._model&&this._model.updateSelection(e,this)}},{key:"_getMinDate",value:function(){return this._min}},{key:"_getMaxDate",value:function(){return this._max}},{key:"_getDateFilter",value:function(){return this._dateFilter}},{key:"_canEmitChangeEvent",value:function(){return!0}},{key:"matDatepicker",set:function(e){e&&(this._datepicker=e,this._registerModel(e._registerInput(this)))}},{key:"min",get:function(){return this._min},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._validatorOnChange())}},{key:"max",get:function(){return this._max},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._validatorOnChange())}},{key:"dateFilter",get:function(){return this._dateFilter},set:function(e){var t=this._matchesFilter(this.value);this._dateFilter=e,this._matchesFilter(this.value)!==t&&this._validatorOnChange()}}]),n}(RR)).\u0275fac=function(e){return new(e||pR)(Qf(Yg),Qf(dA,8),Qf(hA,8),Qf(xT,8))},pR.\u0275dir=$l({type:pR,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(e,t){1&e&&nm("input",function(e){return t._onInput(e.target.value)})("change",function(){return t._onChange()})("blur",function(){return t._onBlur()})("keydown",function(e){return t._onKeydown(e)}),2&e&&(km("disabled",t.disabled),Bf("aria-haspopup",t._datepicker?"dialog":null)("aria-owns",(null==t._datepicker?null:t._datepicker.opened)&&t._datepicker.id||null)("min",t.min?t._dateAdapter.toIso8601(t.min):null)("max",t.max?t._dateAdapter.toIso8601(t.max):null)("data-mat-calendar",t._datepicker?t._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[Ug([VR,DR,{provide:SO,useExisting:pR}]),Af]}),pR),LR=((hR=function e(){is(this,e)}).\u0275mod=Wl({type:hR}),hR.\u0275inj=hl({factory:function(e){return new(e||hR)},providers:[MO,PR],imports:[[lw,nO,xO,CT,WE,BI,oA],RI]}),hR),FR=new $c("config"),MR=new $c("NEW_CONFIG"),qR=new $c("INITIAL_CONFIG"),jR={suffix:"",prefix:"",thousandSeparator:" ",decimalMarker:".",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,placeHolderCharacter:"_",dropSpecialCharacters:!0,hiddenInput:void 0,shownMaskExpression:"",separatorLimit:"",allowNegativeNumbers:!1,validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},BR=["Hh:m0:s0","Hh:m0","m0:s0"],zR=["percent","Hh","s0","m0","separator","d0/M0/0000","d0/M0","d0","M0"],UR=((yR=function(){function e(t){var n=this;is(this,e),this._config=t,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this._formatWithSeparators=function(e,t,r,i){var o=e.split(r),a=o.length>1?"".concat(r).concat(o[1]):"",s=o[0],l=n.separatorLimit.replace(/\s/g,"");l&&+l&&(s="-"===s[0]?"-"+s.slice(1,s.length).slice(0,l.length):s.slice(0,l.length));for(var u=/(\d+)(\d{3})/;t&&u.test(s);)s=s.replace(u,"$1"+t+"$2");return void 0===i?s+a:0===i?s:s+a.substr(0,i+1)},this.percentage=function(e){return Number(e)>=0&&Number(e)<=100},this.getPrecision=function(e){var t=e.split(".");return t.length>1?Number(t[t.length-1]):1/0},this.checkInputPrecision=function(e,t,r){if(t<1/0){var i=new RegExp(n._charToRegExpExpression(r)+"\\d{".concat(t,"}.*$")),o=e.match(i);o&&o[0].length-1>t&&(e=e.substring(0,e.length-(o[0].length-1-t))),0===t&&e.endsWith(r)&&(e=e.substring(0,e.length-1))}return e},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.suffix=this._config.suffix,this.thousandSeparator=this._config.thousandSeparator,this.decimalMarker=this._config.decimalMarker,this.hiddenInput=this._config.hiddenInput,this.showMaskTyped=this._config.showMaskTyped,this.placeHolderCharacter=this._config.placeHolderCharacter,this.validation=this._config.validation,this.separatorLimit=this._config.separatorLimit,this.allowNegativeNumbers=this._config.allowNegativeNumbers}return as(e,[{key:"applyMaskWithPattern",value:function(e,t){var n=Ua(t,2),r=n[0],i=n[1];return this.customPattern=i,this.applyMask(e,r)}},{key:"applyMask",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};if(null==e||void 0===t)return"";var i=0,o="",a=!1,s=!1,l=1,u=!1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length)),this.suffix&&e.endsWith(this.suffix)&&(e=e.slice(0,e.length-this.suffix.length));var c=e.toString().split("");"IP"===t&&(this.ipError=!!(c.filter(function(e){return"."===e}).length<3&&c.length<7),t="099.099.099.099");for(var d=[],h=0;h<e.length;h++)e[h].match("\\d")&&d.push(e[h]);if("CPF_CNPJ"===t&&(this.cpfCnpjError=!(11===d.length||14===d.length),t=d.length>11?"00.000.000/0000-00":"000.000.000-00"),t.startsWith("percent")){if(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/)){e=this._stripToDecimal(e);var p=this.getPrecision(t);e=this.checkInputPrecision(e,p,this.decimalMarker)}if(e.indexOf(".")>0&&!this.percentage(e.substring(0,e.indexOf(".")))){var f=e.substring(0,e.indexOf(".")-1);e="".concat(f).concat(e.substring(e.indexOf("."),e.length))}o=this.percentage(e)?e:e.substring(0,e.length-1)}else if(t.startsWith("separator")){(e.match("[w\u0430-\u044f\u0410-\u042f]")||e.match("[\u0401\u0451\u0410-\u044f]")||e.match("[a-z]|[A-Z]")||e.match(/[-@#!$%\\^&*()_\xa3\xac'+|~=`{}\[\]:";<>.?\/]/)||e.match("[^A-Za-z0-9,]"))&&(e=this._stripToDecimal(e)),e=e.length>1&&"0"===e[0]&&e[1]!==this.decimalMarker?e.slice(1,e.length):e;var m=this._charToRegExpExpression(this.thousandSeparator),g=this._charToRegExpExpression(this.decimalMarker),v='@#!$%^&*()_+|~=`{}\\[\\]:\\s,\\.";<>?\\/'.replace(m,"").replace(g,""),y=new RegExp("["+v+"]");e.match(y)&&(e=e.substring(0,e.length-1));var b=this.getPrecision(t),_=(e=this.checkInputPrecision(e,b,this.decimalMarker)).replace(new RegExp(m,"g"),""),w=(o=this._formatWithSeparators(_,this.thousandSeparator,this.decimalMarker,b)).indexOf(",")-e.indexOf(","),C=o.length-e.length;if(C>0&&","!==o[n]){s=!0;var x=0;do{this._shift.add(n+x),x++}while(x<C)}else 0!==w&&n>0&&!(o.indexOf(",")>=n&&n>3)||!(o.indexOf(".")>=n&&n>3)&&C<=0?(this._shift.clear(),s=!0,l=C,this._shift.add(n+=C)):this._shift.clear()}else for(var S=0,P=c[0];S<c.length&&i!==t.length;P=c[++S])if(this._checkSymbolMask(P,t[i])&&"?"===t[i+1])o+=P,i+=2;else if("*"===t[i+1]&&a&&this._checkSymbolMask(P,t[i+2]))o+=P,i+=3,a=!1;else if(this._checkSymbolMask(P,t[i])&&"*"===t[i+1])o+=P,a=!0;else if("?"===t[i+1]&&this._checkSymbolMask(P,t[i+2]))o+=P,i+=3;else if(this._checkSymbolMask(P,t[i])||this.hiddenInput&&this.maskAvailablePatterns[t[i]]&&this.maskAvailablePatterns[t[i]].symbol===P){if("H"===t[i]&&Number(P)>2){i+=1;var k=/[*?]/g.test(t.slice(0,i))?c.length:i;this._shift.add(k+this.prefix.length||0),S--;continue}if("h"===t[i]&&"2"===o&&Number(P)>3){i+=1,S--;continue}if("m"===t[i]&&Number(P)>5){i+=1;var E=/[*?]/g.test(t.slice(0,i))?c.length:i;this._shift.add(E+this.prefix.length||0),S--;continue}if("s"===t[i]&&Number(P)>5){i+=1;var A=/[*?]/g.test(t.slice(0,i))?c.length:i;this._shift.add(A+this.prefix.length||0),S--;continue}var I=31;if("d"===t[i]&&(Number(e.slice(i,i+2))>I||"/"===e[i+1])){i+=1;var T=/[*?]/g.test(t.slice(0,i))?c.length:i;this._shift.add(T+this.prefix.length||0),S--;continue}if("M"===t[i]){var O=12,R=0===i&&(Number(P)>2||Number(e.slice(i,i+2))>O||"/"===e[i+1]),V=e.slice(i-3,i-1).includes("/")&&("/"===e[i-2]&&Number(e.slice(i-1,i+1))>O&&"/"!==e[i]||"/"===e[i]||"/"===e[i-3]&&Number(e.slice(i-2,i))>O&&"/"!==e[i-1]||"/"===e[i-1]),D=Number(e.slice(i-3,i-1))<=I&&!e.slice(i-3,i-1).includes("/")&&"/"===e[i-1]&&(Number(e.slice(i,i+2))>O||"/"===e[i+1]),N=Number(e.slice(i-3,i-1))>I&&!e.slice(i-3,i-1).includes("/")&&!e.slice(i-2,i).includes("/")&&Number(e.slice(i-2,i))>O,L=Number(e.slice(i-3,i-1))<=I&&!e.slice(i-3,i-1).includes("/")&&"/"!==e[i-1]&&Number(e.slice(i-1,i+1))>O;if(R||V||D||N||L){i+=1;var F=/[*?]/g.test(t.slice(0,i))?c.length:i;this._shift.add(F+this.prefix.length||0),S--;continue}}o+=P,i++}else if(-1!==this.maskSpecialCharacters.indexOf(t[i])){o+=t[i],i++;var M=/[*?]/g.test(t.slice(0,i))?c.length:i;this._shift.add(M+this.prefix.length||0),S--}else this.maskSpecialCharacters.indexOf(P)>-1&&this.maskAvailablePatterns[t[i]]&&this.maskAvailablePatterns[t[i]].optional?(c[i]&&"099.099.099.099"!==t&&"000.000.000-00"!==t&&"00.000.000/0000-00"!==t&&(o+=c[i]),i++,S--):"*"===this.maskExpression[i+1]&&this._findSpecialChar(this.maskExpression[i+2])&&this._findSpecialChar(P)===this.maskExpression[i+2]&&a||"?"===this.maskExpression[i+1]&&this._findSpecialChar(this.maskExpression[i+2])&&this._findSpecialChar(P)===this.maskExpression[i+2]&&a?(i+=3,o+=P):this.showMaskTyped&&this.maskSpecialCharacters.indexOf(P)<0&&P!==this.placeHolderCharacter&&(u=!0);o.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(o+=t[t.length-1]);for(var q=n+1;this._shift.has(q);)l++,q++;var j=this._shift.has(n)?l:0;u&&j--,r(j,s),l<0&&this._shift.clear();var B="".concat(this.prefix).concat(o).concat(this.suffix);return 0===o.length&&(B="".concat(this.prefix).concat(o)),B}},{key:"_findSpecialChar",value:function(e){return this.maskSpecialCharacters.find(function(t){return t===e})}},{key:"_checkSymbolMask",value:function(e,t){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[t]&&this.maskAvailablePatterns[t].pattern&&this.maskAvailablePatterns[t].pattern.test(e)}},{key:"_stripToDecimal",value:function(e){var t=this;return e.split("").filter(function(e,n){return e.match("^-?\\d")||e.match("\\s")||"."===e||","===e||"-"===e&&0===n&&t.allowNegativeNumbers}).join("")}},{key:"_charToRegExpExpression",value:function(e){return e?" "===e?"\\s":"[\\^$.|?*+()".indexOf(e)>=0?"\\"+e:e:e}}]),e}()).\u0275fac=function(e){return new(e||yR)(md(FR))},yR.\u0275prov=dl({token:yR,factory:yR.\u0275fac}),yR),HR=((vR=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,r)).document=e,a._config=r,a._elementRef=i,a._renderer=o,a.maskExpression="",a.isNumberValue=!1,a.placeHolderCharacter="_",a.maskIsShown="",a.selStart=null,a.selEnd=null,a.writingValue=!1,a.onChange=function(e){},a._formElement=a._elementRef.nativeElement,a}return as(n,[{key:"applyMask",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};if(!t)return e;if(this.maskIsShown=this.showMaskTyped?this.showMaskInInput():"","IP"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(e||"#")),"CPF_CNPJ"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(e||"#")),!e&&this.showMaskTyped)return this.formControlResult(this.prefix),this.prefix+this.maskIsShown;var a=e&&"number"==typeof this.selStart?e[this.selStart]:"",s="";if(void 0!==this.hiddenInput){var l=this.actualValue.split("");""!==e&&l.length?"number"==typeof this.selStart&&"number"==typeof this.selEnd&&(e.length>l.length?l.splice(this.selStart,0,a):e.length<l.length&&(l.length-e.length==1?l.splice(this.selStart-1,1):l.splice(this.selStart,this.selEnd-this.selStart))):l=[],s=this.actualValue.length?this.shiftTypedSymbols(l.join("")):e}s=Boolean(s)&&s.length?s:e;var u=Ya(rs(n.prototype),"applyMask",this).call(this,s,t,i,o);if(this.actualValue=this.getActualValue(u),"."===this.thousandSeparator&&"."===this.decimalMarker&&(this.decimalMarker=","),this.maskExpression.startsWith("separator")&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter(function(e){return e!==r.decimalMarker})),this.formControlResult(u),!this.showMaskTyped)return this.hiddenInput&&u&&u.length?this.hideInput(u,this.maskExpression):u;var c=u.length,d=this.prefix+this.maskIsShown;if(this.maskExpression.includes("H")){var h=this._numberSkipedSymbols(u);return u+d.slice(c+h)}return"IP"===this.maskExpression||"CPF_CNPJ"===this.maskExpression?u+d:u+d.slice(c)}},{key:"_numberSkipedSymbols",value:function(e){for(var t=/(^|\D)(\d\D)/g,n=t.exec(e),r=0;null!=n;)r+=1,n=t.exec(e);return r}},{key:"applyValueChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this._formElement.value=this.applyMask(this._formElement.value,this.maskExpression,e,t),this._formElement!==this.document.activeElement&&this.clearIfNotMatchFn()}},{key:"hideInput",value:function(e,t){var n=this;return e.split("").map(function(e,r){return n.maskAvailablePatterns&&n.maskAvailablePatterns[t[r]]&&n.maskAvailablePatterns[t[r]].symbol?n.maskAvailablePatterns[t[r]].symbol:e}).join("")}},{key:"getActualValue",value:function(e){var t=this,n=e.split("").filter(function(e,n){return t._checkSymbolMask(e,t.maskExpression[n])||t.maskSpecialCharacters.includes(t.maskExpression[n])&&e===t.maskExpression[n]});return n.join("")===e?n.join(""):e}},{key:"shiftTypedSymbols",value:function(e){var t=this,n="";return(e&&e.split("").map(function(r,i){if(t.maskSpecialCharacters.includes(e[i+1])&&e[i+1]!==t.maskExpression[i+1])return n=r,e[i+1];if(n.length){var o=n;return n="",o}return r})||[]).join("")}},{key:"showMaskInInput",value:function(e){if(this.showMaskTyped&&this.shownMaskExpression){if(this.maskExpression.length!==this.shownMaskExpression.length)throw new Error("Mask expression must match mask placeholder length");return this.shownMaskExpression}if(this.showMaskTyped){if(e){if("IP"===this.maskExpression)return this._checkForIp(e);if("CPF_CNPJ"===this.maskExpression)return this._checkForCpfCnpj(e)}return this.maskExpression.replace(/\w/g,this.placeHolderCharacter)}return""}},{key:"clearIfNotMatchFn",value:function(){this.clearIfNotMatch&&this.prefix.length+this.maskExpression.length+this.suffix.length!==this._formElement.value.replace(/_/g,"").length&&(this.formElementProperty=["value",""],this.applyMask(this._formElement.value,this.maskExpression))}},{key:"checkSpecialCharAmount",value:function(e){var t=this;return e.split("").filter(function(e){return t._findSpecialChar(e)}).length}},{key:"removeMask",value:function(e){return this._removeMask(this._removeSuffix(this._removePrefix(e)),this.maskSpecialCharacters.concat("_").concat(this.placeHolderCharacter))}},{key:"_checkForIp",value:function(e){if("#"===e)return"".concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter);for(var t=[],n=0;n<e.length;n++)e[n].match("\\d")&&t.push(e[n]);return t.length<=3?"".concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter):t.length>3&&t.length<=6?"".concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter):t.length>6&&t.length<=9?this.placeHolderCharacter:""}},{key:"_checkForCpfCnpj",value:function(e){var t="".concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,"-").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter),n="".concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,".").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,"/").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter).concat(this.placeHolderCharacter,"-").concat(this.placeHolderCharacter).concat(this.placeHolderCharacter);if("#"===e)return t;for(var r=[],i=0;i<e.length;i++)e[i].match("\\d")&&r.push(e[i]);return r.length<=3?t.slice(r.length,t.length):r.length>3&&r.length<=6?t.slice(r.length+1,t.length):r.length>6&&r.length<=9?t.slice(r.length+2,t.length):r.length>9&&r.length<11?t.slice(r.length+3,t.length):11===r.length?"":12===r.length?n.slice(17===e.length?16:15,n.length):r.length>12&&r.length<=14?n.slice(r.length+4,n.length):""}},{key:"formControlResult",value:function(e){this.writingValue||(Array.isArray(this.dropSpecialCharacters)?this.onChange(this._removeMask(this._removeSuffix(this._removePrefix(e)),this.dropSpecialCharacters)):this.onChange(this.dropSpecialCharacters?this._checkSymbols(e):this._removeSuffix(this._removePrefix(e))))}},{key:"_removeMask",value:function(e,t){return e?e.replace(this._regExpForRemove(t),""):e}},{key:"_removePrefix",value:function(e){return this.prefix&&e?e.replace(this.prefix,""):e}},{key:"_removeSuffix",value:function(e){return this.suffix&&e?e.replace(this.suffix,""):e}},{key:"_retrieveSeparatorValue",value:function(e){return this._removeMask(this._removeSuffix(this._removePrefix(e)),this.maskSpecialCharacters)}},{key:"_regExpForRemove",value:function(e){return new RegExp(e.map(function(e){return"\\"+e}).join("|"),"gi")}},{key:"_checkSymbols",value:function(e){if(""===e)return e;var t=this._retrieveSeparatorPrecision(this.maskExpression),n=this._retrieveSeparatorValue(e);return"."!==this.decimalMarker&&(n=n.replace(this.decimalMarker,".")),this.isNumberValue?t?e===this.decimalMarker?null:this._checkPrecision(this.maskExpression,n):Number(n):n}},{key:"_retrieveSeparatorPrecision",value:function(e){var t=e.match(new RegExp("^separator\\.([^d]*)"));return t?Number(t[1]):null}},{key:"_checkPrecision",value:function(e,t){return e.indexOf("2")>0?Number(t).toFixed(2):Number(t)}},{key:"formElementProperty",set:function(e){var t=Ua(e,2),n=t[0],r=t[1];this._renderer.setProperty(this._formElement,n,r)}}]),n}(UR)).\u0275fac=function(e){return new(e||vR)(md(Cb),md(FR),md(Yg),md(Zg))},vR.\u0275prov=dl({token:vR,factory:vR.\u0275fac}),vR),QR=((gR=function(){function e(t,n,r){is(this,e),this.document=t,this._maskService=n,this._config=r,this.maskExpression="",this.specialCharacters=[],this.patterns={},this.prefix="",this.suffix="",this.thousandSeparator=" ",this.decimalMarker=".",this.dropSpecialCharacters=null,this.hiddenInput=null,this.showMaskTyped=null,this.placeHolderCharacter=null,this.shownMaskExpression=null,this.showTemplate=null,this.clearIfNotMatch=null,this.validation=null,this.separatorLimit=null,this.allowNegativeNumbers=null,this._maskValue="",this._position=null,this._maskExpressionArray=[],this.onChange=function(e){},this.onTouch=function(){}}return as(e,[{key:"ngOnChanges",value:function(e){var t=e.maskExpression,n=e.specialCharacters,r=e.patterns,i=e.prefix,o=e.suffix,a=e.thousandSeparator,s=e.decimalMarker,l=e.dropSpecialCharacters,u=e.hiddenInput,c=e.showMaskTyped,d=e.placeHolderCharacter,h=e.shownMaskExpression,p=e.showTemplate,f=e.clearIfNotMatch,m=e.validation,g=e.separatorLimit,v=e.allowNegativeNumbers;if(t&&(this._maskValue=t.currentValue||"",t.currentValue&&t.currentValue.split("||").length>1&&(this._maskExpressionArray=t.currentValue.split("||").sort(function(e,t){return e.length-t.length}),this._maskValue=this._maskExpressionArray[0],this.maskExpression=this._maskExpressionArray[0],this._maskService.maskExpression=this._maskExpressionArray[0])),n){if(!n.currentValue||!Array.isArray(n.currentValue))return;this._maskService.maskSpecialCharacters=n.currentValue||[]}r&&r.currentValue&&(this._maskService.maskAvailablePatterns=r.currentValue),i&&(this._maskService.prefix=i.currentValue),o&&(this._maskService.suffix=o.currentValue),a&&(this._maskService.thousandSeparator=a.currentValue),s&&(this._maskService.decimalMarker=s.currentValue),l&&(this._maskService.dropSpecialCharacters=l.currentValue),u&&(this._maskService.hiddenInput=u.currentValue),c&&(this._maskService.showMaskTyped=c.currentValue),d&&(this._maskService.placeHolderCharacter=d.currentValue),h&&(this._maskService.shownMaskExpression=h.currentValue),p&&(this._maskService.showTemplate=p.currentValue),f&&(this._maskService.clearIfNotMatch=f.currentValue),m&&(this._maskService.validation=m.currentValue),g&&(this._maskService.separatorLimit=g.currentValue),v&&(this._maskService.allowNegativeNumbers=v.currentValue,this._maskService.allowNegativeNumbers&&(this._maskService.maskSpecialCharacters=this._maskService.maskSpecialCharacters.filter(function(e){return"-"!==e}))),this._applyMask()}},{key:"validate",value:function(e){var t=this,n=e.value;if(!this._maskService.validation||!this._maskValue)return null;if(this._maskService.ipError)return this._createValidationError(n);if(this._maskService.cpfCnpjError)return this._createValidationError(n);if(this._maskValue.startsWith("separator"))return null;if(zR.includes(this._maskValue))return null;if(this._maskService.clearIfNotMatch)return null;if(BR.includes(this._maskValue))return this._validateTime(n);if(n&&n.toString().length>=1){var r=0,i=function(e){if(t._maskService.maskAvailablePatterns[e].optional&&!0===t._maskService.maskAvailablePatterns[e].optional){if(t._maskValue.indexOf(e)!==t._maskValue.lastIndexOf(e)?r+=t._maskValue.split("").filter(function(t){return t===e}).join("").length:-1!==t._maskValue.indexOf(e)&&r++,-1!==t._maskValue.indexOf(e)&&n.toString().length>=t._maskValue.indexOf(e))return{v:null};if(r===t._maskValue.length)return{v:null}}};for(var o in this._maskService.maskAvailablePatterns){var a=i(o);if("object"==typeof a)return a.v}if(1===this._maskValue.indexOf("{")&&n.toString().length===this._maskValue.length+Number(this._maskValue.split("{")[1].split("}")[0])-4)return null;if(1===this._maskValue.indexOf("*")||1===this._maskValue.indexOf("?"))return null;if(this._maskValue.indexOf("*")>1&&n.toString().length<this._maskValue.indexOf("*")||this._maskValue.indexOf("?")>1&&n.toString().length<this._maskValue.indexOf("?")||1===this._maskValue.indexOf("{"))return this._createValidationError(n);if(-1===this._maskValue.indexOf("*")||-1===this._maskValue.indexOf("?")){var s=this._maskService.dropSpecialCharacters?this._maskValue.length-this._maskService.checkSpecialCharAmount(this._maskValue)-r:this._maskValue.length-r;if(n.toString().length<s)return this._createValidationError(n)}}return null}},{key:"onInput",value:function(e){var t=e.target;if(this._inputValue=t.value,this._setMask(),this._maskValue){var n=1===t.selectionStart?t.selectionStart+this._maskService.prefix.length:t.selectionStart,r=0,i=!1;if(this._maskService.applyValueChanges(n,function(e,t){r=e,i=t}),this.document.activeElement===t){this._position=1===this._position&&1===this._inputValue.length?null:this._position;var o=this._position?this._inputValue.length+n+r:n+("Backspace"!==this._code||i?r:0);o>this._getActualInputLength()&&(o=this._getActualInputLength()),t.setSelectionRange(o,o),this._position=null}}else this.onChange(t.value)}},{key:"onBlur",value:function(){this._maskValue&&this._maskService.clearIfNotMatchFn(),this.onTouch()}},{key:"onFocus",value:function(e){if(this._maskValue){var t=e.target;null!==t&&null!==t.selectionStart&&t.selectionStart===t.selectionEnd&&t.selectionStart>this._maskService.prefix.length&&38!==e.keyCode&&this._maskService.showMaskTyped&&(this._maskService.maskIsShown=this._maskService.showMaskInInput(),t.setSelectionRange&&this._maskService.prefix+this._maskService.maskIsShown===t.value?(t.focus(),t.setSelectionRange(0,0)):t.selectionStart>this._maskService.actualValue.length&&t.setSelectionRange(this._maskService.actualValue.length,this._maskService.actualValue.length));var n=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown;t.value!==n&&(t.value=n),(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length?t.selectionStart=this._maskService.prefix.length:t.selectionEnd>this._getActualInputLength()&&(t.selectionEnd=this._getActualInputLength())}}},{key:"onKeyDown",value:function(e){var t;if(this._maskValue){this._code=e.code?e.code:e.key;var n=e.target;if(this._inputValue=n.value,this._setMask(),38===e.keyCode&&e.preventDefault(),37===e.keyCode||8===e.keyCode||46===e.keyCode){if(8===e.keyCode&&0===n.value.length&&(n.selectionStart=n.selectionEnd),8===e.keyCode&&0!==n.selectionStart)if(this.specialCharacters=(null===(t=this.specialCharacters)||void 0===t?void 0:t.length)?this.specialCharacters:this._config.specialCharacters,this.prefix.length>1&&n.selectionStart<=this.prefix.length)n.setSelectionRange(this.prefix.length,this.prefix.length);else{if(this._inputValue.length!==n.selectionStart&&1!==n.selectionStart)for(;this.specialCharacters.includes(this._inputValue[n.selectionStart-1].toString())&&(this.prefix.length>=1&&n.selectionStart>this.prefix.length||0===this.prefix.length);)n.setSelectionRange(n.selectionStart-1,n.selectionStart-1);this.suffixCheckOnPressDelete(e.keyCode,n)}this.suffixCheckOnPressDelete(e.keyCode,n),this._maskService.prefix.length&&n.selectionStart<=this._maskService.prefix.length&&n.selectionEnd<=this._maskService.prefix.length&&e.preventDefault();var r=n.selectionStart;8!==e.keyCode||n.readOnly||0!==r||n.selectionEnd!==n.value.length||0===n.value.length||(this._position=this._maskService.prefix?this._maskService.prefix.length:0,this._maskService.applyMask(this._maskService.prefix,this._maskService.maskExpression,this._position))}this.suffix&&this.suffix.length>1&&this._inputValue.length-this.suffix.length<n.selectionStart?n.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length):(65===e.keyCode&&!0===e.ctrlKey||65===e.keyCode&&!0===e.metaKey)&&(n.setSelectionRange(0,this._getActualInputLength()),e.preventDefault()),this._maskService.selStart=n.selectionStart,this._maskService.selEnd=n.selectionEnd}}},{key:"writeValue",value:function(e){return t=this,r=regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:void 0===e&&(e=""),"number"==typeof e&&(e=String(e),e="."!==this.decimalMarker?e.replace(".",this.decimalMarker):e,this._maskService.isNumberValue=!0),e&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?(this._maskService.writingValue=!0,this._maskService.formElementProperty=["value",this._maskService.applyMask(e,this._maskService.maskExpression)],this._maskService.writingValue=!1):this._maskService.formElementProperty=["value",e],this._inputValue=e;case 1:case"end":return t.stop()}},t,this)}),new((n=void 0)||(n=Promise))(function(e,i){function o(e){try{s(r.next(e))}catch(t){i(t)}}function a(e){try{s(r.throw(e))}catch(t){i(t)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n(function(e){e(r)})).then(o,a)}s((r=r.apply(t,[])).next())});var t,n,r}},{key:"registerOnChange",value:function(e){this.onChange=e,this._maskService.onChange=this.onChange}},{key:"registerOnTouched",value:function(e){this.onTouch=e}},{key:"suffixCheckOnPressDelete",value:function(e,t){46===e&&this.suffix.length>0&&this._inputValue.length-this.suffix.length<=t.selectionStart&&t.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length),8===e&&(this.suffix.length>1&&this._inputValue.length-this.suffix.length<t.selectionStart&&t.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length),1===this.suffix.length&&this._inputValue.length===t.selectionStart&&t.setSelectionRange(t.selectionStart-1,t.selectionStart-1))}},{key:"setDisabledState",value:function(e){this._maskService.formElementProperty=["disabled",e]}},{key:"onModelChange",value:function(e){e||(this._maskService.actualValue="")}},{key:"_repeatPatternSymbols",value:function(e){var t=this;return e.match(/{[0-9]+}/)&&e.split("").reduce(function(n,r,i){if(t._start="{"===r?i:t._start,"}"!==r)return t._maskService._findSpecialChar(r)?n+r:n;t._end=i;var o=Number(e.slice(t._start+1,t._end));return n+new Array(o+1).join(e[t._start-1])},"")||e}},{key:"_applyMask",value:function(){this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue||""),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)]}},{key:"_validateTime",value:function(e){var t=this._maskValue.split("").filter(function(e){return":"!==e}).length;return null===e||0===e.length?null:0==+e[e.length-1]&&e.length<t||e.length<=t-2?this._createValidationError(e):null}},{key:"_getActualInputLength",value:function(){return this._maskService.actualValue.length||this._maskService.actualValue.length+this._maskService.prefix.length}},{key:"_createValidationError",value:function(e){return{mask:{requiredMask:this._maskValue,actualValue:e}}}},{key:"_setMask",value:function(){var e=this;this._maskExpressionArray.length>0&&this._maskExpressionArray.some(function(t){var n=e._maskService.removeMask(e._inputValue).length<=e._maskService.removeMask(t).length;if(e._inputValue&&n)return e._maskValue=t,e.maskExpression=t,e._maskService.maskExpression=t,n;e._maskValue=e._maskExpressionArray[e._maskExpressionArray.length-1],e.maskExpression=e._maskExpressionArray[e._maskExpressionArray.length-1],e._maskService.maskExpression=e._maskExpressionArray[e._maskExpressionArray.length-1]})}}]),e}()).\u0275fac=function(e){return new(e||gR)(Qf(Cb),Qf(HR),Qf(FR))},gR.\u0275dir=$l({type:gR,selectors:[["input","mask",""],["textarea","mask",""]],hostBindings:function(e,t){1&e&&nm("input",function(e){return t.onInput(e)})("blur",function(){return t.onBlur()})("click",function(e){return t.onFocus(e)})("keydown",function(e){return t.onKeyDown(e)})("ngModelChange",function(e){return t.onModelChange(e)})},inputs:{maskExpression:["mask","maskExpression"],specialCharacters:"specialCharacters",patterns:"patterns",prefix:"prefix",suffix:"suffix",thousandSeparator:"thousandSeparator",decimalMarker:"decimalMarker",dropSpecialCharacters:"dropSpecialCharacters",hiddenInput:"hiddenInput",showMaskTyped:"showMaskTyped",placeHolderCharacter:"placeHolderCharacter",shownMaskExpression:"shownMaskExpression",showTemplate:"showTemplate",clearIfNotMatch:"clearIfNotMatch",validation:"validation",separatorLimit:"separatorLimit",allowNegativeNumbers:"allowNegativeNumbers"},features:[Ug([{provide:kS,useExisting:sl(function(){return gR}),multi:!0},{provide:DS,useExisting:sl(function(){return gR}),multi:!0},HR]),cu]}),gR),WR=((mR=function(){function e(t){is(this,e),this._maskService=t}return as(e,[{key:"transform",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e||"number"==typeof e?(n&&(this._maskService.thousandSeparator=n),"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t)):""}}]),e}()).\u0275fac=function(e){return new(e||mR)(Qf(UR))},mR.\u0275pipe=Jl({name:"mask",type:mR,pure:!0}),mR),GR=((fR=function(){function e(){is(this,e)}return as(e,null,[{key:"forRoot",value:function(t){return{ngModule:e,providers:[{provide:MR,useValue:t},{provide:qR,useValue:jR},{provide:FR,useFactory:$R,deps:[qR,MR]},UR]}}},{key:"forChild",value:function(){return{ngModule:e}}}]),e}()).\u0275mod=Wl({type:fR}),fR.\u0275inj=hl({factory:function(e){return new(e||fR)}}),fR);function $R(e,t){return Object.assign(Object.assign({},e),t instanceof Function?t():t)}var JR="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};JR.KeyboardEvent||(JR.KeyboardEvent=function(e,t){});var YR=Ga("NauR"),KR=Ga.n(YR),ZR=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this))._value=e,r}return as(n,[{key:"_subscribe",value:function(e){var t=Ya(rs(n.prototype),"_subscribe",this).call(this,e);return t&&!t.closed&&e.next(this._value),t}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ss;return this._value}},{key:"next",value:function(e){Ya(rs(n.prototype),"next",this).call(this,this._value=e)}},{key:"value",get:function(){return this.getValue()}}]),n}(Es),XR={};function eV(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=null,i=null;return Is(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&us(t[0])&&(t=t[0]),Gs(t,i).lift(new tV(r))}var tV=function(){function e(t){is(this,e),this.resultSelector=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new nV(e,this.resultSelector))}}]),e}(),nV=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).resultSelector=r,i.active=0,i.values=[],i.observables=[],i}return as(n,[{key:"_next",value:function(e){this.values.push(XR),this.observables.push(e)}},{key:"_complete",value:function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(Ls(this,r,r,n))}}}},{key:"notifyComplete",value:function(e){0==(this.active-=1)&&this.destination.complete()}},{key:"notifyNext",value:function(e,t,n,r,i){var o=this.values,a=this.toRespond?o[n]===XR?--this.toRespond:this.toRespond:0;o[n]=t,0===a&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))}},{key:"_tryResultSelector",value:function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(Fs),rV=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}();function iV(e){return function(t){return 0===e?Yk():t.lift(new oV(e))}}var oV=function(){function e(t){if(is(this,e),this.total=t,this.total<0)throw new $k}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new aV(e,this.total))}}]),e}(),aV=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).total=r,i.ring=new Array,i.count=0,i}return as(n,[{key:"_next",value:function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e}},{key:"_complete",value:function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=t++%n;e.next(r[o])}e.complete()}}]),n}(gs);function sV(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cV;return function(t){return t.lift(new lV(e))}}var lV=function(){function e(t){is(this,e),this.errorFactory=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new uV(e,this.errorFactory))}}]),e}(),uV=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).errorFactory=r,i.hasValue=!1,i}return as(n,[{key:"_next",value:function(e){this.hasValue=!0,this.destination.next(e)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}]),n}(gs);function cV(){return new rV}function dV(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t.lift(new hV(e))}}var hV=function(){function e(t){is(this,e),this.defaultValue=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new pV(e,this.defaultValue))}}]),e}(),pV=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).defaultValue=r,i.isEmpty=!0,i}return as(n,[{key:"_next",value:function(e){this.isEmpty=!1,this.destination.next(e)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(gs),fV=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];is(this,e),this.accumulator=t,this.seed=n,this.hasSeed=r}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new mV(e,this.accumulator,this.seed,this.hasSeed))}}]),e}(),mV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,e)).accumulator=r,a._seed=i,a.hasSeed=o,a.index=0,a}return as(n,[{key:"_next",value:function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(r){this.destination.error(r)}this.seed=t,this.destination.next(t)}},{key:"seed",get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e}}]),n}(gs);function gV(e){return function(t){var n=new vV(e),r=t.lift(n);return n.caught=r}}var vV=function(){function e(t){is(this,e),this.selector=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new yV(e,this.selector,this.caught))}}]),e}(),yV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e)).selector=r,o.caught=i,o}return as(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(o){return void Ya(rs(n.prototype),"error",this).call(this,o)}this._unsubscribeAndRecycle();var r=new Ts(this,void 0,void 0);this.add(r);var i=Ls(this,t,void 0,void 0,r);i!==r&&this.add(i)}}}]),n}(Fs);function bV(e,t){return Us(e,t,1)}function _V(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Qk(function(t,n){return e(t,n,r)}):bs,Kk(1),n?dV(t):sV(function(){return new rV}))}}var wV=function(){function e(t){is(this,e),this.callback=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new CV(e,this.callback))}}]),e}(),CV=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).add(new ps(r)),i}return n}(gs),xV=function e(t,n){is(this,e),this.id=t,this.url=n},SV=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return is(this,n),(i=t.call(this,e,r)).navigationTrigger=o,i.restoredState=a,i}return as(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(xV),PV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e,r)).urlAfterRedirects=i,o}return as(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(xV),kV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e,r)).reason=i,o}return as(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(xV),EV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i){var o;return is(this,n),(o=t.call(this,e,r)).error=i,o}return as(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(xV),AV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return as(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(xV),IV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return as(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(xV),TV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o,a){var s;return is(this,n),(s=t.call(this,e,r)).urlAfterRedirects=i,s.state=o,s.shouldActivate=a,s}return as(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(xV),OV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return as(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(xV),RV=function(e){Ka(n,e);var t=Xa(n);function n(e,r,i,o){var a;return is(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return as(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(xV),VV=function(){function e(t){is(this,e),this.route=t}return as(e,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),e}(),DV=function(){function e(t){is(this,e),this.route=t}return as(e,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),e}(),NV=function(){function e(t){is(this,e),this.snapshot=t}return as(e,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),LV=function(){function e(t){is(this,e),this.snapshot=t}return as(e,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),FV=function(){function e(t){is(this,e),this.snapshot=t}return as(e,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),MV=function(){function e(t){is(this,e),this.snapshot=t}return as(e,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),qV=function(){function e(t,n,r){is(this,e),this.routerEvent=t,this.position=n,this.anchor=r}return as(e,[{key:"toString",value:function(){return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(this.position?"".concat(this.position[0],", ").concat(this.position[1]):null,"')")}}]),e}(),jV=function(){function e(t){is(this,e),this.params=t||{}}return as(e,[{key:"has",value:function(e){return Object.prototype.hasOwnProperty.call(this.params,e)}},{key:"get",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null}},{key:"getAll",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),e}();function BV(e){return new jV(e)}function zV(e){var t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function UV(e,t,n){var r=n.path.split("/");if(r.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||r.length<e.length))return null;for(var i={},o=0;o<r.length;o++){var a=r[o],s=e[o];if(a.startsWith(":"))i[a.substring(1)]=s;else if(a!==s.path)return null}return{consumed:e.slice(0,r.length),posParams:i}}function HV(e,t){var n,r=Object.keys(e),i=Object.keys(t);if(!r||!i||r.length!=i.length)return!1;for(var o=0;o<r.length;o++)if(!QV(e[n=r[o]],t[n]))return!1;return!0}function QV(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;var n=Ha(e).sort(),r=Ha(t).sort();return n.every(function(e,t){return r[t]===e})}return e===t}function WV(e){return Array.prototype.concat.apply([],e)}function GV(e){return e.length>0?e[e.length-1]:null}function $V(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function JV(e){return tm(e)?e:em(e)?zs(Promise.resolve(e)):Ok(e)}function YV(e,t,n){return n?function(e,t){return HV(e,t)}(e.queryParams,t.queryParams)&&KV(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(function(n){return QV(e[n],t[n])})}(e.queryParams,t.queryParams)&&ZV(e.root,t.root)}function KV(e,t){if(!rD(e.segments,t.segments))return!1;if(e.numberOfChildren!==t.numberOfChildren)return!1;for(var n in t.children){if(!e.children[n])return!1;if(!KV(e.children[n],t.children[n]))return!1}return!0}function ZV(e,t){return XV(e,t,t.segments)}function XV(e,t,n){if(e.segments.length>n.length)return!!rD(e.segments.slice(0,n.length),n)&&!t.hasChildren();if(e.segments.length===n.length){if(!rD(e.segments,n))return!1;for(var r in t.children){if(!e.children[r])return!1;if(!ZV(e.children[r],t.children[r]))return!1}return!0}var i=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!!rD(e.segments,i)&&!!e.children.primary&&XV(e.children.primary,t,o)}var eD=function(){function e(t,n,r){is(this,e),this.root=t,this.queryParams=n,this.fragment=r}return as(e,[{key:"toString",value:function(){return sD.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=BV(this.queryParams)),this._queryParamMap}}]),e}(),tD=function(){function e(t,n){var r=this;is(this,e),this.segments=t,this.children=n,this.parent=null,$V(n,function(e,t){return e.parent=r})}return as(e,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return lD(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),e}(),nD=function(){function e(t,n){is(this,e),this.path=t,this.parameters=n}return as(e,[{key:"toString",value:function(){return mD(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=BV(this.parameters)),this._parameterMap}}]),e}();function rD(e,t){return e.length===t.length&&e.every(function(e,n){return e.path===t[n].path})}function iD(e,t){var n=[];return $V(e.children,function(e,r){"primary"===r&&(n=n.concat(t(e,r)))}),$V(e.children,function(e,r){"primary"!==r&&(n=n.concat(t(e,r)))}),n}var oD=function e(){is(this,e)},aD=function(){function e(){is(this,e)}return as(e,[{key:"parse",value:function(e){var t=new _D(e);return new eD(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}},{key:"serialize",value:function(e){return"".concat("/"+uD(e.root,!0)).concat((t=e.queryParams,n=Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return"".concat(dD(e),"=").concat(dD(t))}).join("&"):"".concat(dD(e),"=").concat(dD(n))}),n.length?"?"+n.join("&"):"")).concat("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"");var t,n}}]),e}(),sD=new aD;function lD(e){return e.segments.map(function(e){return mD(e)}).join("/")}function uD(e,t){if(!e.hasChildren())return lD(e);if(t){var n=e.children.primary?uD(e.children.primary,!1):"",r=[];return $V(e.children,function(e,t){"primary"!==t&&r.push("".concat(t,":").concat(uD(e,!1)))}),r.length>0?"".concat(n,"(").concat(r.join("//"),")"):n}var i=iD(e,function(t,n){return"primary"===n?[uD(e.children.primary,!1)]:["".concat(n,":").concat(uD(t,!1))]});return 1===Object.keys(e.children).length&&null!=e.children.primary?"".concat(lD(e),"/").concat(i[0]):"".concat(lD(e),"/(").concat(i.join("//"),")")}function cD(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function dD(e){return cD(e).replace(/%3B/gi,";")}function hD(e){return cD(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function pD(e){return decodeURIComponent(e)}function fD(e){return pD(e.replace(/\+/g,"%20"))}function mD(e){return"".concat(hD(e.path)).concat((t=e.parameters,Object.keys(t).map(function(e){return";".concat(hD(e),"=").concat(hD(t[e]))}).join("")));var t}var gD=/^[^\/()?;=#]+/;function vD(e){var t=e.match(gD);return t?t[0]:""}var yD=/^[^=?&#]+/,bD=/^[^?&#]+/,_D=function(){function e(t){is(this,e),this.url=t,this.remaining=t}return as(e,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new tD([],{}):new tD([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new tD(e,t)),n}},{key:"parseSegment",value:function(){var e=vD(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(e),new nD(pD(e),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e}},{key:"parseParam",value:function(e){var t=vD(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=vD(this.remaining);r&&(n=r,this.capture(n))}e[pD(t)]=pD(n)}}},{key:"parseQueryParam",value:function(e){var t=function(e){var t=e.match(yD);return t?t[0]:""}(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=function(e){var t=e.match(bD);return t?t[0]:""}(this.remaining);r&&(n=r,this.capture(n))}var i=fD(t),o=fD(n);if(e.hasOwnProperty(i)){var a=e[i];Array.isArray(a)||(a=[a],e[i]=a),a.push(o)}else e[i]=o}}},{key:"parseParens",value:function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=vD(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '".concat(this.url,"'"));var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i="primary");var o=this.parseChildren();t[i]=1===Object.keys(o).length?o.primary:new tD([],o),this.consumeOptional("//")}return t}},{key:"peekStartsWith",value:function(e){return this.remaining.startsWith(e)}},{key:"consumeOptional",value:function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}},{key:"capture",value:function(e){if(!this.consumeOptional(e))throw new Error('Expected "'.concat(e,'".'))}}]),e}(),wD=function(){function e(t){is(this,e),this._root=t}return as(e,[{key:"parent",value:function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}},{key:"children",value:function(e){var t=CD(e,this._root);return t?t.children.map(function(e){return e.value}):[]}},{key:"firstChild",value:function(e){var t=CD(e,this._root);return t&&t.children.length>0?t.children[0].value:null}},{key:"siblings",value:function(e){var t=xD(e,this._root);return t.length<2?[]:t[t.length-2].children.map(function(e){return e.value}).filter(function(t){return t!==e})}},{key:"pathFromRoot",value:function(e){return xD(e,this._root).map(function(e){return e.value})}},{key:"root",get:function(){return this._root.value}}]),e}();function CD(e,t){if(e===t.value)return t;var n,r=Qa(t.children);try{for(r.s();!(n=r.n()).done;){var i=CD(e,n.value);if(i)return i}}catch(o){r.e(o)}finally{r.f()}return null}function xD(e,t){if(e===t.value)return[t];var n,r=Qa(t.children);try{for(r.s();!(n=r.n()).done;){var i=xD(e,n.value);if(i.length)return i.unshift(t),i}}catch(o){r.e(o)}finally{r.f()}return[]}var SD=function(){function e(t,n){is(this,e),this.value=t,this.children=n}return as(e,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),e}();function PD(e){var t={};return e&&e.children.forEach(function(e){return t[e.value.outlet]=e}),t}var kD=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).snapshot=r,RD(ts(i),e),i}return as(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(wD);function ED(e,t){var n=function(e,t){var n=new TD([],{},{},"",{},"primary",t,null,e.root,-1,{});return new OD("",new SD(n,[]))}(e,t),r=new ZR([new nD("",{})]),i=new ZR({}),o=new ZR({}),a=new ZR({}),s=new ZR(""),l=new AD(r,i,a,s,o,"primary",t,n.root);return l.snapshot=n.root,new kD(new SD(l,[]),n)}var AD=function(){function e(t,n,r,i,o,a,s,l){is(this,e),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=s,this._futureSnapshot=l}return as(e,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(Ms(function(e){return BV(e)}))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Ms(function(e){return BV(e)}))),this._queryParamMap}}]),e}();function ID(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=e.pathFromRoot,r=0;if("always"!==t)for(r=n.length-1;r>=1;){var i=n[r],o=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function(e){return e.reduce(function(e,t){return{params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var TD=function(){function e(t,n,r,i,o,a,s,l,u,c,d){is(this,e),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=s,this.routeConfig=l,this._urlSegment=u,this._lastPathIndex=c,this._resolve=d}return as(e,[{key:"toString",value:function(){return"Route(url:'".concat(this.url.map(function(e){return e.toString()}).join("/"),"', path:'").concat(this.routeConfig?this.routeConfig.path:"","')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=BV(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=BV(this.queryParams)),this._queryParamMap}}]),e}(),OD=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,r)).url=e,RD(ts(i),r),i}return as(n,[{key:"toString",value:function(){return VD(this._root)}}]),n}(wD);function RD(e,t){t.value._routerState=e,t.children.forEach(function(t){return RD(e,t)})}function VD(e){var t=e.children.length>0?" { ".concat(e.children.map(VD).join(", ")," } "):"";return"".concat(e.value).concat(t)}function DD(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,HV(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),HV(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!HV(e[n],t[n]))return!1;return!0}(t.url,n.url)||e.url.next(n.url),HV(t.data,n.data)||e.data.next(n.data)}else e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data)}function ND(e,t){var n,r;return HV(e.params,t.params)&&rD(n=e.url,r=t.url)&&n.every(function(e,t){return HV(e.parameters,r[t].parameters)})&&!(!e.parent!=!t.parent)&&(!e.parent||ND(e.parent,t.parent))}function LD(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){var r=n.value;r._futureSnapshot=t.value;var i=function(e,t,n){return t.children.map(function(t){var r,i=Qa(n.children);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.shouldReuseRoute(t.value,o.value.snapshot))return LD(e,t,o)}}catch(a){i.e(a)}finally{i.f()}return LD(e,t)})}(e,t,n);return new SD(r,i)}var o=e.retrieve(t.value);if(o){var a=o.route;return FD(t,a),a}var s,l=new AD(new ZR((s=t.value).url),new ZR(s.params),new ZR(s.queryParams),new ZR(s.fragment),new ZR(s.data),s.outlet,s.component,s),u=t.children.map(function(t){return LD(e,t)});return new SD(l,u)}function FD(e,t){if(e.value.routeConfig!==t.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==t.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");t.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)FD(e.children[n],t.children[n])}function MD(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function qD(e){return"object"==typeof e&&null!=e&&e.outlets}function jD(e,t,n,r,i){var o={};return r&&$V(r,function(e,t){o[t]=Array.isArray(e)?e.map(function(e){return""+e}):""+e}),new eD(n.root===e?t:BD(n.root,e,t),o,i)}function BD(e,t,n){var r={};return $V(e.children,function(e,i){r[i]=e===t?n:BD(e,t,n)}),new tD(e.segments,r)}var zD=function(){function e(t,n,r){if(is(this,e),this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&MD(r[0]))throw new Error("Root segment cannot have matrix parameters");var i=r.find(qD);if(i&&i!==GV(r))throw new Error("{outlets:{}} has to be the last command")}return as(e,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),e}(),UD=function e(t,n,r){is(this,e),this.segmentGroup=t,this.processChildren=n,this.index=r};function HD(e,t,n){if(e||(e=new tD([],{})),0===e.segments.length&&e.hasChildren())return QD(e,t,n);var r=function(e,t,n){for(var r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};i<e.segments.length;){if(r>=n.length)return o;var a=e.segments[i],s=n[r];if(qD(s))break;var l=""+s,u=r<n.length-1?n[r+1]:null;if(i>0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!JD(l,u,a))return o;r+=2}else{if(!JD(l,{},a))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex<e.segments.length){var o=new tD(e.segments.slice(0,r.pathIndex),{});return o.children.primary=new tD(e.segments.slice(r.pathIndex),e.children),QD(o,0,i)}return r.match&&0===i.length?new tD(e.segments,{}):r.match&&!e.hasChildren()?WD(e,t,n):r.match?QD(e,0,i):WD(e,t,n)}function QD(e,t,n){if(0===n.length)return new tD(e.segments,{});var r=function(e){return qD(e[0])?e[0].outlets:{primary:e}}(n),i={};return $V(r,function(n,r){"string"==typeof n&&(n=[n]),null!==n&&(i[r]=HD(e.children[r],t,n))}),$V(e.children,function(e,t){void 0===r[t]&&(i[t]=e)}),new tD(e.segments,i)}function WD(e,t,n){for(var r=e.segments.slice(0,t),i=0;i<n.length;){var o=n[i];if(qD(o)){var a=GD(o.outlets);return new tD(r,a)}if(0===i&&MD(n[0]))r.push(new nD(e.segments[t].path,n[0])),i++;else{var s=qD(o)?o.outlets.primary:""+o,l=i<n.length-1?n[i+1]:null;s&&l&&MD(l)?(r.push(new nD(s,$D(l))),i+=2):(r.push(new nD(s,{})),i++)}}return new tD(r,{})}function GD(e){var t={};return $V(e,function(e,n){"string"==typeof e&&(e=[e]),null!==e&&(t[n]=WD(new tD([],{}),0,e))}),t}function $D(e){var t={};return $V(e,function(e,n){return t[n]=""+e}),t}function JD(e,t,n){return e==n.path&&HV(t,n.parameters)}var YD=function(){function e(t,n,r,i){is(this,e),this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=i}return as(e,[{key:"activate",value:function(e){var t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),DD(this.futureState.root),this.activateChildRoutes(t,n,e)}},{key:"deactivateChildRoutes",value:function(e,t,n){var r=this,i=PD(t);e.children.forEach(function(e){var t=e.value.outlet;r.deactivateRoutes(e,i[t],n),delete i[t]}),$V(i,function(e,t){r.deactivateRouteAndItsChildren(e,n)})}},{key:"deactivateRoutes",value:function(e,t,n){var r=e.value,i=t?t.value:null;if(r===i)if(r.component){var o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(e,t,o.children)}else this.deactivateChildRoutes(e,t,n);else i&&this.deactivateRouteAndItsChildren(t,n)}},{key:"deactivateRouteAndItsChildren",value:function(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}},{key:"detachAndStoreRouteSubtree",value:function(e,t){var n=t.getContext(e.value.outlet);if(n&&n.outlet){var r=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:r,route:e,contexts:i})}}},{key:"deactivateRouteAndOutlet",value:function(e,t){var n=this,r=t.getContext(e.value.outlet);if(r){var i=PD(e),o=e.value.component?r.children:t;$V(i,function(e,t){return n.deactivateRouteAndItsChildren(e,o)}),r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated())}}},{key:"activateChildRoutes",value:function(e,t,n){var r=this,i=PD(t);e.children.forEach(function(e){r.activateRoutes(e,i[e.value.outlet],n),r.forwardEvent(new MV(e.value.snapshot))}),e.children.length&&this.forwardEvent(new LV(e.value.snapshot))}},{key:"activateRoutes",value:function(e,t,n){var r=e.value,i=t?t.value:null;if(DD(r),r===i)if(r.component){var o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,o.children)}else this.activateChildRoutes(e,t,n);else if(r.component){var a=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){var s=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),a.children.onOutletReAttached(s.contexts),a.attachRef=s.componentRef,a.route=s.route.value,a.outlet&&a.outlet.attach(s.componentRef,s.route.value),KD(s.route)}else{var l=function(e){for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig;if(n&&n.component)return null}return null}(r.snapshot),u=l?l.module.componentFactoryResolver:null;a.attachRef=null,a.route=r,a.resolver=u,a.outlet&&a.outlet.activateWith(r,u),this.activateChildRoutes(e,null,a.children)}}else this.activateChildRoutes(e,null,n)}}]),e}();function KD(e){DD(e.value),e.children.forEach(KD)}var ZD=function e(t,n){is(this,e),this.routes=t,this.module=n};function XD(e){return"function"==typeof e}function eN(e){return e instanceof eD}var tN=Symbol("INITIAL_VALUE");function nN(){return pI(function(e){return eV.apply(void 0,Ha(e.map(function(e){return e.pipe(Kk(1),XE(tN))}))).pipe(function(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new fV(e,t,n))}}(function(e,t){var n=!1;return t.reduce(function(e,r,i){if(e!==tN)return e;if(r===tN&&(n=!0),!n){if(!1===r)return r;if(i===t.length-1||eN(r))return r}return e},e)},tN),Qk(function(e){return e!==tN}),Ms(function(e){return eN(e)?e:!0===e}),Kk(1))})}var rN,iN=((rN=function e(){is(this,e)}).\u0275fac=function(e){return new(e||rN)},rN.\u0275cmp=zl({type:rN,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&Yf(0,"router-outlet")},directives:function(){return[tL]},encapsulation:2}),rN);function oN(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<e.length;n++){var r=e[n];aN(r,sN(t,r))}}function aN(e,t){e.children&&oN(e.children,t)}function sN(e,t){return t?e||t.path?e&&!t.path?e+"/":!e&&t.path?t.path:"".concat(e,"/").concat(t.path):"":e}function lN(e){var t=e.children&&e.children.map(lN),n=t?Object.assign(Object.assign({},e),{children:t}):Object.assign({},e);return!n.component&&(t||n.loadChildren)&&n.outlet&&"primary"!==n.outlet&&(n.component=iN),n}function uN(e){return e.outlet||"primary"}var cN=function e(t){is(this,e),this.segmentGroup=t||null},dN=function e(t){is(this,e),this.urlTree=t};function hN(e){return new ws(function(t){return t.error(new cN(e))})}function pN(e){return new ws(function(t){return t.error(new dN(e))})}function fN(e){return new ws(function(t){return t.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(e,"'")))})}var mN=function(){function e(t,n,r,i,o){is(this,e),this.configLoader=n,this.urlSerializer=r,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=t.get(Av)}return as(e,[{key:"apply",value:function(){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(Ms(function(t){return e.createUrlTree(t,e.urlTree.queryParams,e.urlTree.fragment)})).pipe(gV(function(t){if(t instanceof dN)return e.allowRedirects=!1,e.match(t.urlTree);if(t instanceof cN)throw e.noMatchError(t);throw t}))}},{key:"match",value:function(e){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,e.root,"primary").pipe(Ms(function(n){return t.createUrlTree(n,e.queryParams,e.fragment)})).pipe(gV(function(e){if(e instanceof cN)throw t.noMatchError(e);throw e}))}},{key:"noMatchError",value:function(e){return new Error("Cannot match any routes. URL Segment: '".concat(e.segmentGroup,"'"))}},{key:"createUrlTree",value:function(e,t,n){var r=e.segments.length>0?new tD([],{primary:e}):e;return new eD(r,t,n)}},{key:"expandSegmentGroup",value:function(e,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(Ms(function(e){return new tD([],e)})):this.expandSegment(e,n,t,n.segments,r,!0)}},{key:"expandChildren",value:function(e,t,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return Ok({});var o=[],a=[],s={};return $V(n,function(n,i){var l,u,c=(l=i,u=n,r.expandSegmentGroup(e,t,u,l)).pipe(Ms(function(e){return s[i]=e}));"primary"===i?o.push(c):a.push(c)}),Ok.apply(null,o.concat(a)).pipe(KE(),function(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Qk(function(t,n){return e(t,n,r)}):bs,iV(1),n?dV(t):sV(function(){return new rV}))}}(),Ms(function(){return s}))}(n.children)}},{key:"expandSegment",value:function(e,t,n,r,i,o){var a=this,s=function(e){return e.reduce(function(e,t){var n=uN(t);return e.has(n)?e.get(n).push(t):e.set(n,[t]),e},new Map)}(n);s.has(i)||s.set(i,[]);return zs(Array.from(s.entries()).map(function(n){var s=Ua(n,2),l=s[0],u=function(n){return zs(n).pipe(bV(function(s){return a.expandSegmentAgainstRoute(e,t,n,s,r,i,o).pipe(gV(function(e){if(e instanceof cN)return Ok(null);throw e}))}),_V(function(e){return null!==e}),gV(function(e){if(e instanceof rV||"EmptyError"===e.name){if(a.noLeftoversInUrl(t,r,i))return Ok(new tD([],{}));throw new cN(t)}throw e}))}(s[1]);return l===i?u:u.pipe(Ms(function(){return null}),gV(function(){return Ok(null)}))})).pipe(function(e){return e.lift(new tV(void 0))},_V(),Ms(function(e){return e.find(function(e){return null!==e})}))}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"expandSegmentAgainstRoute",value:function(e,t,n,r,i,o,a){return uN(r)!==o&&""!==r.path?hN(t):void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,i):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o):hN(t)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(e,t,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(e,t,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?pN(o):this.lineralizeSegments(n,o).pipe(Us(function(n){var o=new tD(n,{});return i.expandSegment(e,o,t,n,r,!1)}))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(e,t,n,r,i,o){var a=this,s=gN(t,r,i),l=s.matched,u=s.consumedSegments,c=s.lastChild,d=s.positionalParamSegments;if(!l)return hN(t);var h=this.applyRedirectCommands(u,r.redirectTo,d);return r.redirectTo.startsWith("/")?pN(h):this.lineralizeSegments(r,h).pipe(Us(function(r){return a.expandSegment(e,t,n,r.concat(i.slice(c)),o,!1)}))}},{key:"matchSegmentAgainstRoute",value:function(e,t,n,r){var i=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(Ms(function(e){return n._loadedConfig=e,new tD(r,{})})):Ok(new tD(r,{}));var o=gN(t,n,r),a=o.matched,s=o.consumedSegments,l=o.lastChild;if(!a)return hN(t);var u=r.slice(l);return this.getChildConfig(e,n,r).pipe(Us(function(e){var n=e.module,r=e.routes,o=function(e,t,n,r){return n.length>0&&function(e,t,n){return n.some(function(n){return yN(e,t,n)&&"primary"!==uN(n)})}(e,n,r)?{segmentGroup:vN(new tD(t,function(e,t){var n={};n.primary=t;var r,i=Qa(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;""===o.path&&"primary"!==uN(o)&&(n[uN(o)]=new tD([],{}))}}catch(a){i.e(a)}finally{i.f()}return n}(r,new tD(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some(function(n){return yN(e,t,n)})}(e,n,r)?{segmentGroup:vN(new tD(e.segments,function(e,t,n,r){var i,o={},a=Qa(n);try{for(a.s();!(i=a.n()).done;){var s=i.value;yN(e,t,s)&&!r[uN(s)]&&(o[uN(s)]=new tD([],{}))}}catch(l){a.e(l)}finally{a.f()}return Object.assign(Object.assign({},r),o)}(e,n,r,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,s,u,r),a=o.segmentGroup,l=o.slicedSegments;return 0===l.length&&a.hasChildren()?i.expandChildren(n,r,a).pipe(Ms(function(e){return new tD(s,e)})):0===r.length&&0===l.length?Ok(new tD(s,{})):i.expandSegment(n,a,r,l,"primary",!0).pipe(Ms(function(e){return new tD(s.concat(e.segments),e.children)}))}))}},{key:"getChildConfig",value:function(e,t,n){var r=this;return t.children?Ok(new ZD(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Ok(t._loadedConfig):this.runCanLoadGuards(e.injector,t,n).pipe(Us(function(n){return n?r.configLoader.load(e.injector,t).pipe(Ms(function(e){return t._loadedConfig=e,e})):function(e){return new ws(function(t){return t.error(zV("Cannot load children because the guard of the route \"path: '".concat(e.path,"'\" returned false")))})}(t)})):Ok(new ZD([],e))}},{key:"runCanLoadGuards",value:function(e,t,n){var r=this,i=t.canLoad;return i&&0!==i.length?Ok(i.map(function(r){var i,o=e.get(r);if(function(e){return e&&XD(e.canLoad)}(o))i=o.canLoad(t,n);else{if(!XD(o))throw new Error("Invalid CanLoad guard");i=o(t,n)}return JV(i)})).pipe(nN(),Dk(function(e){if(eN(e)){var t=zV('Redirecting to "'.concat(r.urlSerializer.serialize(e),'"'));throw t.url=e,t}}),Ms(function(e){return!0===e})):Ok(!0)}},{key:"lineralizeSegments",value:function(e,t){for(var n=[],r=t.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Ok(n);if(r.numberOfChildren>1||!r.children.primary)return fN(e.redirectTo);r=r.children.primary}}},{key:"applyRedirectCommands",value:function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}},{key:"applyRedirectCreatreUrlTree",value:function(e,t,n,r){var i=this.createSegmentGroup(e,t.root,n,r);return new eD(i,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}},{key:"createQueryParams",value:function(e,t){var n={};return $V(e,function(e,r){if("string"==typeof e&&e.startsWith(":")){var i=e.substring(1);n[r]=t[i]}else n[r]=e}),n}},{key:"createSegmentGroup",value:function(e,t,n,r){var i=this,o=this.createSegments(e,t.segments,n,r),a={};return $V(t.children,function(t,o){a[o]=i.createSegmentGroup(e,t,n,r)}),new tD(o,a)}},{key:"createSegments",value:function(e,t,n,r){var i=this;return t.map(function(t){return t.path.startsWith(":")?i.findPosParam(e,t,r):i.findOrReturn(t,n)})}},{key:"findPosParam",value:function(e,t,n){var r=n[t.path.substring(1)];if(!r)throw new Error("Cannot redirect to '".concat(e,"'. Cannot find '").concat(t.path,"'."));return r}},{key:"findOrReturn",value:function(e,t){var n,r=0,i=Qa(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.path===e.path)return t.splice(r),o;r++}}catch(a){i.e(a)}finally{i.f()}return e}}]),e}();function gN(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(t.matcher||UV)(n,e,t);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function vN(e){if(1===e.numberOfChildren&&e.children.primary){var t=e.children.primary;return new tD(e.segments.concat(t.segments),t.children)}return e}function yN(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}var bN=function e(t){is(this,e),this.path=t,this.route=this.path[this.path.length-1]},_N=function e(t,n){is(this,e),this.component=t,this.route=n};function wN(e,t,n){var r=e._root;return xN(r,t?t._root:null,n,[r.value])}function CN(e,t,n){var r=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(r?r.module.injector:n).get(e)}function xN(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=PD(t);return e.children.forEach(function(e){!function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=e.value,a=t?t.value:null,s=n?n.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){var l=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!rD(e.url,t.url);case"pathParamsOrQueryParamsChange":return!rD(e.url,t.url)||!HV(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ND(e,t)||!HV(e.queryParams,t.queryParams);case"paramsChange":default:return!ND(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);l?i.canActivateChecks.push(new bN(r)):(o.data=a.data,o._resolvedData=a._resolvedData),xN(e,t,o.component?s?s.children:null:n,r,i),l&&s&&s.outlet&&s.outlet.isActivated&&i.canDeactivateChecks.push(new _N(s.outlet.component,a))}else a&&SN(t,s,i),i.canActivateChecks.push(new bN(r)),xN(e,null,o.component?s?s.children:null:n,r,i)}(e,o[e.value.outlet],n,r.concat([e.value]),i),delete o[e.value.outlet]}),$V(o,function(e,t){return SN(e,n.getContext(t),i)}),i}function SN(e,t,n){var r=PD(e),i=e.value;$V(r,function(e,r){SN(e,i.component?t?t.children.getContext(r):null:t,n)}),n.canDeactivateChecks.push(new _N(i.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,i))}function PN(e,t){return null!==e&&t&&t(new FV(e)),Ok(!0)}function kN(e,t){return null!==e&&t&&t(new NV(e)),Ok(!0)}function EN(e,t,n){var r=t.routeConfig?t.routeConfig.canActivate:null;return r&&0!==r.length?Ok(r.map(function(r){return tI(function(){var i,o=CN(r,t,n);if(function(e){return e&&XD(e.canActivate)}(o))i=JV(o.canActivate(t,e));else{if(!XD(o))throw new Error("Invalid CanActivate guard");i=JV(o(t,e))}return i.pipe(_V())})})).pipe(nN()):Ok(!0)}function AN(e,t,n){var r=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(function(e){return function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)}).filter(function(e){return null!==e}).map(function(t){return tI(function(){return Ok(t.guards.map(function(i){var o,a=CN(i,t.node,n);if(function(e){return e&&XD(e.canActivateChild)}(a))o=JV(a.canActivateChild(r,e));else{if(!XD(a))throw new Error("Invalid CanActivateChild guard");o=JV(a(r,e))}return o.pipe(_V())})).pipe(nN())})});return Ok(i).pipe(nN())}var IN=function e(){is(this,e)},TN=function(){function e(t,n,r,i,o,a){is(this,e),this.rootComponentType=t,this.config=n,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=a}return as(e,[{key:"recognize",value:function(){try{var e=VN(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,"primary"),n=new TD([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new SD(n,t),i=new OD(this.url,r);return this.inheritParamsAndData(i._root),Ok(i)}catch(o){return new ws(function(e){return e.error(o)})}}},{key:"inheritParamsAndData",value:function(e){var t=this,n=e.value,r=ID(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),e.children.forEach(function(e){return t.inheritParamsAndData(e)})}},{key:"processSegmentGroup",value:function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}},{key:"processChildren",value:function(e,t){var n,r=this,i=iD(t,function(t,n){return r.processSegmentGroup(e,t,n)});return n={},i.forEach(function(e){var t=n[e.value.outlet];if(t){var r=t.url.map(function(e){return e.toString()}).join("/"),i=e.value.url.map(function(e){return e.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(r,"' and '").concat(i,"'."))}n[e.value.outlet]=e.value}),i.sort(function(e,t){return"primary"===e.value.outlet?-1:"primary"===t.value.outlet?1:e.value.outlet.localeCompare(t.value.outlet)}),i}},{key:"processSegment",value:function(e,t,n,r){var i,o=Qa(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;try{return this.processSegmentAgainstRoute(a,t,n,r)}catch(s){if(!(s instanceof IN))throw s}}}catch(l){o.e(l)}finally{o.f()}if(this.noLeftoversInUrl(t,n,r))return[];throw new IN}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"processSegmentAgainstRoute",value:function(e,t,n,r){if(e.redirectTo)throw new IN;if((e.outlet||"primary")!==r)throw new IN;var i,o=[],a=[];if("**"===e.path){var s=n.length>0?GV(n).parameters:{};i=new TD(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,NN(e),r,e.component,e,ON(t),RN(t)+n.length,LN(e))}else{var l=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new IN;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(t.matcher||UV)(n,e,t);if(!r)throw new IN;var i={};$V(r.posParams,function(e,t){i[t]=e.path});var o=r.consumed.length>0?Object.assign(Object.assign({},i),r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o}}(t,e,n);o=l.consumedSegments,a=n.slice(l.lastChild),i=new TD(o,l.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,NN(e),r,e.component,e,ON(t),RN(t)+o.length,LN(e))}var u=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),c=VN(t,o,a,u,this.relativeLinkResolution),d=c.segmentGroup,h=c.slicedSegments;if(0===h.length&&d.hasChildren()){var p=this.processChildren(u,d);return[new SD(i,p)]}if(0===u.length&&0===h.length)return[new SD(i,[])];var f=this.processSegment(u,d,h,"primary");return[new SD(i,f)]}}]),e}();function ON(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function RN(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function VN(e,t,n,r,i){if(n.length>0&&function(e,t,n){return n.some(function(n){return DN(e,t,n)&&"primary"!==uN(n)})}(e,n,r)){var o=new tD(t,function(e,t,n,r){var i={};i.primary=r,r._sourceSegment=e,r._segmentIndexShift=t.length;var o,a=Qa(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(""===s.path&&"primary"!==uN(s)){var l=new tD([],{});l._sourceSegment=e,l._segmentIndexShift=t.length,i[uN(s)]=l}}}catch(u){a.e(u)}finally{a.f()}return i}(e,t,r,new tD(n,e.children)));return o._sourceSegment=e,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some(function(n){return DN(e,t,n)})}(e,n,r)){var a=new tD(e.segments,function(e,t,n,r,i,o){var a,s={},l=Qa(r);try{for(l.s();!(a=l.n()).done;){var u=a.value;if(DN(e,n,u)&&!i[uN(u)]){var c=new tD([],{});c._sourceSegment=e,c._segmentIndexShift="legacy"===o?e.segments.length:t.length,s[uN(u)]=c}}}catch(d){l.e(d)}finally{l.f()}return Object.assign(Object.assign({},i),s)}(e,t,n,r,e.children,i));return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:n}}var s=new tD(e.segments,e.children);return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}function DN(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function NN(e){return e.data||{}}function LN(e){return e.resolve||{}}function FN(e){return function(t){return t.pipe(pI(function(t){var n=e(t);return n?zs(n).pipe(Ms(function(){return t})):zs([t])}))}}var MN=function(e){Ka(n,e);var t=Xa(n);function n(){return is(this,n),t.apply(this,arguments)}return n}(function(){function e(){is(this,e)}return as(e,[{key:"shouldDetach",value:function(e){return!1}},{key:"store",value:function(e,t){}},{key:"shouldAttach",value:function(e){return!1}},{key:"retrieve",value:function(e){return null}},{key:"shouldReuseRoute",value:function(e,t){return e.routeConfig===t.routeConfig}}]),e}()),qN=new $c("ROUTES"),jN=function(){function e(t,n,r,i){is(this,e),this.loader=t,this.compiler=n,this.onLoadStartListener=r,this.onLoadEndListener=i}return as(e,[{key:"load",value:function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(Ms(function(r){n.onLoadEndListener&&n.onLoadEndListener(t);var i=r.create(e);return new ZD(WV(i.injector.get(qN)).map(lN),i)}))}},{key:"loadModuleFactory",value:function(e){var t=this;return"string"==typeof e?zs(this.loader.load(e)):JV(e()).pipe(Us(function(e){return e instanceof Iv?Ok(e):zs(t.compiler.compileModuleAsync(e))}))}}]),e}(),BN=function e(){is(this,e),this.outlet=null,this.route=null,this.resolver=null,this.children=new zN,this.attachRef=null},zN=function(){function e(){is(this,e),this.contexts=new Map}return as(e,[{key:"onChildOutletCreated",value:function(e,t){var n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}},{key:"onChildOutletDestroyed",value:function(e){var t=this.getContext(e);t&&(t.outlet=null)}},{key:"onOutletDeactivated",value:function(){var e=this.contexts;return this.contexts=new Map,e}},{key:"onOutletReAttached",value:function(e){this.contexts=e}},{key:"getOrCreateContext",value:function(e){var t=this.getContext(e);return t||(t=new BN,this.contexts.set(e,t)),t}},{key:"getContext",value:function(e){return this.contexts.get(e)||null}}]),e}(),UN=function(){function e(){is(this,e)}return as(e,[{key:"shouldProcessUrl",value:function(e){return!0}},{key:"extract",value:function(e){return e}},{key:"merge",value:function(e,t){return e}}]),e}();function HN(e){throw e}function QN(e,t,n){return t.parse("/")}function WN(e,t){return Ok(null)}var GN,$N,JN=(($N=function(){function e(t,n,r,i,o,a,s,l){var u=this;is(this,e),this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=r,this.location=i,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new Es,this.errorHandler=HN,this.malformedUriErrorHandler=QN,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:WN,afterPreactivation:WN},this.urlHandlingStrategy=new UN,this.routeReuseStrategy=new MN,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=o.get(Av),this.console=o.get(Oy);var c=o.get(Hy);this.isNgZoneEnabled=c instanceof Hy,this.resetConfig(l),this.currentUrlTree=new eD(new tD([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new jN(a,s,function(e){return u.triggerEvent(new VV(e))},function(e){return u.triggerEvent(new DV(e))}),this.routerState=ED(this.currentUrlTree,this.rootComponentType),this.transitions=new ZR({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return as(e,[{key:"setupNavigations",value:function(e){var t=this,n=this.events;return e.pipe(Qk(function(e){return 0!==e.id}),Ms(function(e){return Object.assign(Object.assign({},e),{extractedUrl:t.urlHandlingStrategy.extract(e.rawUrl)})}),pI(function(e){var r,i,o,a,s=!1,l=!1;return Ok(e).pipe(Dk(function(e){t.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:t.lastSuccessfulNavigation?Object.assign(Object.assign({},t.lastSuccessfulNavigation),{previousNavigation:null}):null}}),pI(function(e){var r,i,o,a,s=!t.navigated||e.extractedUrl.toString()!==t.browserUrlTree.toString();if(("reload"===t.onSameUrlNavigation||s)&&t.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Ok(e).pipe(pI(function(e){var r=t.transitions.getValue();return n.next(new SV(e.id,t.serializeUrl(e.extractedUrl),e.source,e.restoredState)),r!==t.transitions.getValue()?Jk:[e]}),pI(function(e){return Promise.resolve(e)}),(r=t.ngModule.injector,i=t.configLoader,o=t.urlSerializer,a=t.config,function(e){return e.pipe(pI(function(e){return function(e,t,n,r,i){return new mN(e,t,n,r,i).apply()}(r,i,o,e.extractedUrl,a).pipe(Ms(function(t){return Object.assign(Object.assign({},e),{urlAfterRedirects:t})}))}))}),Dk(function(e){t.currentNavigation=Object.assign(Object.assign({},t.currentNavigation),{finalUrl:e.urlAfterRedirects})}),function(e,n,r,i,o){return function(r){return r.pipe(Us(function(r){return function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";return new TN(e,t,n,r,i,o).recognize()}(e,n,r.urlAfterRedirects,(a=r.urlAfterRedirects,t.serializeUrl(a)),i,o).pipe(Ms(function(e){return Object.assign(Object.assign({},r),{targetSnapshot:e})}));var a}))}}(t.rootComponentType,t.config,0,t.paramsInheritanceStrategy,t.relativeLinkResolution),Dk(function(e){"eager"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)}),Dk(function(e){var r=new AV(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);n.next(r)}));if(s&&t.rawUrlTree&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){var l=e.id,u=e.extractedUrl,c=e.source,d=e.restoredState,h=e.extras,p=new SV(l,t.serializeUrl(u),c,d);n.next(p);var f=ED(u,t.rootComponentType).snapshot;return Ok(Object.assign(Object.assign({},e),{targetSnapshot:f,urlAfterRedirects:u,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return t.rawUrlTree=e.rawUrl,t.browserUrlTree=e.urlAfterRedirects,e.resolve(null),Jk}),FN(function(e){var n=e.targetSnapshot,r=e.id,i=e.extractedUrl,o=e.rawUrl,a=e.extras,s=a.skipLocationChange,l=a.replaceUrl;return t.hooks.beforePreactivation(n,{navigationId:r,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!l})}),Dk(function(e){var n=new IV(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}),Ms(function(e){return Object.assign(Object.assign({},e),{guards:wN(e.targetSnapshot,e.currentSnapshot,t.rootContexts)})}),function(e,t){return function(n){return n.pipe(Us(function(n){var r=n.targetSnapshot,i=n.currentSnapshot,o=n.guards,a=o.canActivateChecks,s=o.canDeactivateChecks;return 0===s.length&&0===a.length?Ok(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,r){return zs(e).pipe(Us(function(e){return function(e,t,n,r,i){var o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?Ok(o.map(function(o){var a,s=CN(o,t,i);if(function(e){return e&&XD(e.canDeactivate)}(s))a=JV(s.canDeactivate(e,t,n,r));else{if(!XD(s))throw new Error("Invalid CanDeactivate guard");a=JV(s(e,t,n,r))}return a.pipe(_V())})).pipe(nN()):Ok(!0)}(e.component,e.route,n,t,r)}),_V(function(e){return!0!==e},!0))}(s,r,i,e).pipe(Us(function(n){return n&&"boolean"==typeof n?function(e,t,n,r){return zs(t).pipe(bV(function(t){return zs([kN(t.route.parent,r),PN(t.route,r),AN(e,t.path,n),EN(e,t.route,n)]).pipe(KE(),_V(function(e){return!0!==e},!0))}),_V(function(e){return!0!==e},!0))}(r,a,e,t):Ok(n)}),Ms(function(e){return Object.assign(Object.assign({},n),{guardsResult:e})}))}))}}(t.ngModule.injector,function(e){return t.triggerEvent(e)}),Dk(function(e){if(eN(e.guardsResult)){var n=zV('Redirecting to "'.concat(t.serializeUrl(e.guardsResult),'"'));throw n.url=e.guardsResult,n}}),Dk(function(e){var n=new TV(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);t.triggerEvent(n)}),Qk(function(e){if(!e.guardsResult){t.resetUrlToCurrentUrlTree();var r=new kV(e.id,t.serializeUrl(e.extractedUrl),"");return n.next(r),e.resolve(!1),!1}return!0}),FN(function(e){if(e.guards.canActivateChecks.length)return Ok(e).pipe(Dk(function(e){var n=new OV(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}),pI(function(e){var r,i,o=!1;return Ok(e).pipe((r=t.paramsInheritanceStrategy,i=t.ngModule.injector,function(e){return e.pipe(Us(function(e){var t=e.targetSnapshot,n=e.guards.canActivateChecks;if(!n.length)return Ok(e);var o=0;return zs(n).pipe(bV(function(e){return function(e,t,n,r){return function(e,t,n,r){var i=Object.keys(e);if(0===i.length)return Ok({});var o={};return zs(i).pipe(Us(function(i){return function(e,t,n,r){var i=CN(e,t,r);return JV(i.resolve?i.resolve(t,n):i(t,n))}(e[i],t,n,r).pipe(Dk(function(e){o[i]=e}))}),iV(1),Us(function(){return Object.keys(o).length===i.length?Ok(o):Jk}))}(e._resolve,e,t,r).pipe(Ms(function(t){return e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),ID(e,n).resolve),null}))}(e.route,t,r,i)}),Dk(function(){return o++}),iV(1),Us(function(t){return o===n.length?Ok(e):Jk}))}))}),Dk({next:function(){return o=!0},complete:function(){if(!o){var r=new kV(e.id,t.serializeUrl(e.extractedUrl),"At least one route resolver didn't emit any value.");n.next(r),e.resolve(!1)}}}))}),Dk(function(e){var n=new RV(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}))}),FN(function(e){var n=e.targetSnapshot,r=e.id,i=e.extractedUrl,o=e.rawUrl,a=e.extras,s=a.skipLocationChange,l=a.replaceUrl;return t.hooks.afterPreactivation(n,{navigationId:r,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!l})}),Ms(function(e){var n=function(e,t,n){var r=LD(e,t._root,n?n._root:void 0);return new kD(r,t)}(t.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:n})}),Dk(function(e){t.currentUrlTree=e.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(t.currentUrlTree,e.rawUrl),t.routerState=e.targetRouterState,"deferred"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)}),(i=t.rootContexts,o=t.routeReuseStrategy,a=function(e){return t.triggerEvent(e)},Ms(function(e){return new YD(o,e.targetRouterState,e.currentRouterState,a).activate(i),e})),Dk({next:function(){s=!0},complete:function(){s=!0}}),(r=function(){if(!s&&!l){t.resetUrlToCurrentUrlTree();var r=new kV(e.id,t.serializeUrl(e.extractedUrl),"Navigation ID ".concat(e.id," is not equal to the current navigation id ").concat(t.navigationId));n.next(r),e.resolve(!1)}t.currentNavigation=null},function(e){return e.lift(new wV(r))}),gV(function(r){if(l=!0,(s=r)&&s.ngNavigationCancelingError){var i=eN(r.url);i||(t.navigated=!0,t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));var o=new kV(e.id,t.serializeUrl(e.extractedUrl),r.message);n.next(o),i?setTimeout(function(){var n=t.urlHandlingStrategy.merge(r.url,t.rawUrlTree);return t.scheduleNavigation(n,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})},0):e.resolve(!1)}else{t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);var a=new EV(e.id,t.serializeUrl(e.extractedUrl),r);n.next(a);try{e.resolve(t.errorHandler(r))}catch(u){e.reject(u)}}var s;return Jk}))}))}},{key:"resetRootComponentType",value:function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}},{key:"setTransition",value:function(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(t){var n=e.extractLocationChangeInfoFromEvent(t);e.shouldScheduleNavigation(e.lastLocationChangeInfo,n)&&setTimeout(function(){var t=n.source,r=n.state,i=n.urlTree,o={replaceUrl:!0};if(r){var a=Object.assign({},r);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}e.scheduleNavigation(i,t,r,o)},0),e.lastLocationChangeInfo=n}))}},{key:"extractLocationChangeInfoFromEvent",value:function(e){var t;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(t=e.state)||void 0===t?void 0:t.navigationId)?e.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(e,t){if(!e)return!0;var n=t.urlTree.toString()===e.urlTree.toString();return!(t.transitionId===e.transitionId&&n&&("hashchange"===t.source&&"popstate"===e.source||"popstate"===t.source&&"hashchange"===e.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(e){this.events.next(e)}},{key:"resetConfig",value:function(e){oN(e),this.config=e.map(lN),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}},{key:"createUrlTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relativeTo,r=t.queryParams,i=t.fragment,o=t.queryParamsHandling,a=t.preserveFragment,s=n||this.routerState.root,l=a?this.currentUrlTree.fragment:i,u=null;switch(o){case"merge":u=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=r||null}return null!==u&&(u=this.removeEmptyProps(u)),function(e,t,n,r,i){if(0===n.length)return jD(t.root,t.root,t,r,i);var o=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new zD(!0,0,e);var t=0,n=!1,r=e.reduce(function(e,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var o={};return $V(r.outlets,function(e,t){o[t]="string"==typeof e?e.split("/"):e}),[].concat(Ha(e),[{outlets:o}])}if(r.segmentPath)return[].concat(Ha(e),[r.segmentPath])}return"string"!=typeof r?[].concat(Ha(e),[r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?t++:""!=r&&e.push(r))}),e):[].concat(Ha(e),[r])},[]);return new zD(n,t,r)}(n);if(o.toRoot())return jD(t.root,new tD([],{}),t,r,i);var a=function(e,t,n){if(e.isAbsolute)return new UD(t.root,!0,0);if(-1===n.snapshot._lastPathIndex){var r=n.snapshot._urlSegment;return new UD(r,r===t.root,0)}var i=MD(e.commands[0])?0:1;return function(e,t,n){for(var r=e,i=t,o=n;o>i;){if(o-=i,!(r=r.parent))throw new Error("Invalid number of '../'");i=r.segments.length}return new UD(r,!1,i-o)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(o,t,e),s=a.processChildren?QD(a.segmentGroup,a.index,o.commands):HD(a.segmentGroup,a.index,o.commands);return jD(a.segmentGroup,s,t,r,i)}(s,this.currentUrlTree,e,u,l)}},{key:"navigateByUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1},n=eN(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,t)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return function(e){for(var t=0;t<e.length;t++){var n=e[t];if(null==n)throw new Error("The requested path contains ".concat(n," segment at index ").concat(t))}}(e),this.navigateByUrl(this.createUrlTree(e,t),t)}},{key:"serializeUrl",value:function(e){return this.urlSerializer.serialize(e)}},{key:"parseUrl",value:function(e){var t;try{t=this.urlSerializer.parse(e)}catch(n){t=this.malformedUriErrorHandler(n,this.urlSerializer,e)}return t}},{key:"isActive",value:function(e,t){if(eN(e))return YV(this.currentUrlTree,e,t);var n=this.parseUrl(e);return YV(this.currentUrlTree,n,t)}},{key:"removeEmptyProps",value:function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return null!=r&&(t[n]=r),t},{})}},{key:"processNavigations",value:function(){var e=this;this.navigations.subscribe(function(t){e.navigated=!0,e.lastSuccessfulId=t.id,e.events.next(new PV(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(e.currentUrlTree))),e.lastSuccessfulNavigation=e.currentNavigation,e.currentNavigation=null,t.resolve(!0)},function(t){e.console.warn("Unhandled Navigation Error: ")})}},{key:"scheduleNavigation",value:function(e,t,n,r,i){var o,a,s,l=this.getTransition(),u="imperative"!==t&&"imperative"===(null==l?void 0:l.source),c=(this.lastSuccessfulId===l.id||this.currentNavigation?l.rawUrl:l.urlAfterRedirects).toString()===e.toString();if(u&&c)return Promise.resolve(!0);i?(o=i.resolve,a=i.reject,s=i.promise):s=new Promise(function(e,t){o=e,a=t});var d=++this.navigationId;return this.setTransition({id:d,source:t,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:r,resolve:o,reject:a,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch(function(e){return Promise.reject(e)})}},{key:"setBrowserUrl",value:function(e,t,n,r){var i=this.urlSerializer.serialize(e);r=r||{},this.location.isCurrentPathEqualTo(i)||t?this.location.replaceState(i,"",Object.assign(Object.assign({},r),{navigationId:n})):this.location.go(i,"",Object.assign(Object.assign({},r),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),e}()).\u0275fac=function(e){return new(e||$N)(md(Yc),md(oD),md(zN),md(zb),md(kf),md(cb),md(By),md(void 0))},$N.\u0275prov=dl({token:$N,factory:$N.\u0275fac}),$N),YN=((GN=function(){function e(t,n,r){var i=this;is(this,e),this.router=t,this.route=n,this.locationStrategy=r,this.commands=[],this.onChanges=new Es,this.subscription=t.events.subscribe(function(e){e instanceof PV&&i.updateTargetUrlAndHref()})}return as(e,[{key:"ngOnChanges",value:function(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}},{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}},{key:"onClick",value:function(e,t,n,r,i){if(0!==e||t||n||r||i)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:KN(this.skipLocationChange),replaceUrl:KN(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,o),!1}},{key:"updateTargetUrlAndHref",value:function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}},{key:"routerLink",set:function(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}},{key:"urlTree",get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:KN(this.preserveFragment)})}}]),e}()).\u0275fac=function(e){return new(e||GN)(Qf(JN),Qf(AD),Qf(Db))},GN.\u0275dir=$l({type:GN,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,t){1&e&&nm("click",function(e){return t.onClick(e.button,e.ctrlKey,e.shiftKey,e.altKey,e.metaKey)}),2&e&&(km("href",t.href,oh),Bf("target",t.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[cu]}),GN);function KN(e){return""===e||!!e}var ZN,XN,eL,tL=((ZN=function(){function e(t,n,r,i,o){is(this,e),this.parentContexts=t,this.location=n,this.resolver=r,this.changeDetector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new ty,this.deactivateEvents=new ty,this.name=i||"primary",t.onChildOutletCreated(this.name,this)}return as(e,[{key:"ngOnDestroy",value:function(){this.parentContexts.onChildOutletDestroyed(this.name)}},{key:"ngOnInit",value:function(){if(!this.activated){var e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}},{key:"detach",value:function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var e=this.activated;return this.activated=null,this._activatedRoute=null,e}},{key:"attach",value:function(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)}},{key:"deactivate",value:function(){if(this.activated){var e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}},{key:"activateWith",value:function(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;var n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,i=new nL(e,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,i),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}},{key:"isActivated",get:function(){return!!this.activated}},{key:"component",get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}},{key:"activatedRoute",get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}},{key:"activatedRouteData",get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}}]),e}()).\u0275fac=function(e){return new(e||ZN)(Qf(zN),Qf(Ov),Qf(Wg),function(e,t){var n=e.attrs;if(n)for(var r=n.length,i=0;i<r;){var o=n[i];if(bc(o))break;if(0===o)i+=2;else if("number"==typeof o)for(i++;i<r&&"string"==typeof n[i];)i++;else{if("name"===o)return n[i+1];i+=2}}return null}(Lu()),Qf(bv))},ZN.\u0275dir=$l({type:ZN,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),ZN),nL=function(){function e(t,n,r){is(this,e),this.route=t,this.childContexts=n,this.parent=r}return as(e,[{key:"get",value:function(e,t){return e===AD?this.route:e===zN?this.childContexts:this.parent.get(e,t)}}]),e}(),rL=function e(){is(this,e)},iL=function(){function e(){is(this,e)}return as(e,[{key:"preload",value:function(e,t){return Ok(null)}}]),e}(),oL=((eL=function(){function e(t,n,r,i,o){is(this,e),this.router=t,this.injector=i,this.preloadingStrategy=o,this.loader=new jN(n,r,function(e){return t.triggerEvent(new VV(e))},function(e){return t.triggerEvent(new DV(e))})}return as(e,[{key:"setUpPreloading",value:function(){var e=this;this.subscription=this.router.events.pipe(Qk(function(e){return e instanceof PV}),bV(function(){return e.preload()})).subscribe(function(){})}},{key:"preload",value:function(){var e=this.injector.get(Av);return this.processRoutes(e,this.router.config)}},{key:"ngOnDestroy",value:function(){this.subscription&&this.subscription.unsubscribe()}},{key:"processRoutes",value:function(e,t){var n,r=[],i=Qa(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.loadChildren&&!o.canLoad&&o._loadedConfig){var a=o._loadedConfig;r.push(this.processRoutes(a.module,a.routes))}else o.loadChildren&&!o.canLoad?r.push(this.preloadConfig(e,o)):o.children&&r.push(this.processRoutes(e,o.children))}}catch(s){i.e(s)}finally{i.f()}return zs(r).pipe(Ws(),Ms(function(e){}))}},{key:"preloadConfig",value:function(e,t){var n=this;return this.preloadingStrategy.preload(t,function(){return n.loader.load(e.injector,t).pipe(Us(function(e){return t._loadedConfig=e,n.processRoutes(e.module,e.routes)}))})}}]),e}()).\u0275fac=function(e){return new(e||eL)(md(JN),md(cb),md(By),md(kf),md(rL))},eL.\u0275prov=dl({token:eL,factory:eL.\u0275fac}),eL),aL=((XN=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};is(this,e),this.router=t,this.viewportScroller=n,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}return as(e,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var e=this;return this.router.events.subscribe(function(t){t instanceof SV?(e.store[e.lastId]=e.viewportScroller.getScrollPosition(),e.lastSource=t.navigationTrigger,e.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof PV&&(e.lastId=t.id,e.scheduleScrollEvent(t,e.router.parseUrl(t.urlAfterRedirects).fragment))})}},{key:"consumeScrollEvents",value:function(){var e=this;return this.router.events.subscribe(function(t){t instanceof qV&&(t.position?"top"===e.options.scrollPositionRestoration?e.viewportScroller.scrollToPosition([0,0]):"enabled"===e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===e.options.anchorScrolling?e.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition([0,0]))})}},{key:"scheduleScrollEvent",value:function(e,t){this.router.triggerEvent(new qV(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||XN)(md(JN),md(uw),md(void 0))},XN.\u0275prov=dl({token:XN,factory:XN.\u0275fac}),XN),sL=new $c("ROUTER_CONFIGURATION"),lL=new $c("ROUTER_FORROOT_GUARD"),uL=[zb,{provide:oD,useClass:aD},{provide:JN,useFactory:function(e,t,n,r,i,o,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0,c=new JN(null,e,t,n,r,i,o,WV(a));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),function(e,t){e.errorHandler&&(t.errorHandler=e.errorHandler),e.malformedUriErrorHandler&&(t.malformedUriErrorHandler=e.malformedUriErrorHandler),e.onSameUrlNavigation&&(t.onSameUrlNavigation=e.onSameUrlNavigation),e.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=e.paramsInheritanceStrategy),e.relativeLinkResolution&&(t.relativeLinkResolution=e.relativeLinkResolution),e.urlUpdateStrategy&&(t.urlUpdateStrategy=e.urlUpdateStrategy)}(s,c),s.enableTracing){var d=_b();c.events.subscribe(function(e){d.logGroup("Router Event: "+e.constructor.name),d.log(e.toString()),d.log(e),d.logGroupEnd()})}return c},deps:[oD,zN,zb,kf,cb,By,qN,sL,[function(){return function e(){is(this,e)}}(),new ad],[function(){return function e(){is(this,e)}}(),new ad]]},zN,{provide:AD,useFactory:function(e){return e.routerState.root},deps:[JN]},{provide:cb,useClass:pb},oL,iL,function(){function e(){is(this,e)}return as(e,[{key:"preload",value:function(e,t){return t().pipe(gV(function(){return Ok(null)}))}}]),e}(),{provide:sL,useValue:{enableTracing:!1}}];function cL(){return new nb("Router",JN)}var dL,hL=((dL=function(){function e(t,n){is(this,e)}return as(e,null,[{key:"forRoot",value:function(t,n){return{ngModule:e,providers:[uL,gL(t),{provide:lL,useFactory:mL,deps:[[JN,new ad,new ld]]},{provide:sL,useValue:n||{}},{provide:Db,useFactory:fL,deps:[xb,[new od(qb),new ad],sL]},{provide:aL,useFactory:pL,deps:[JN,uw,sL]},{provide:rL,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:iL},{provide:nb,multi:!0,useFactory:cL},[yL,{provide:xy,multi:!0,useFactory:bL,deps:[yL]},{provide:wL,useFactory:_L,deps:[yL]},{provide:Ty,multi:!0,useExisting:wL}]]}}},{key:"forChild",value:function(t){return{ngModule:e,providers:[gL(t)]}}}]),e}()).\u0275mod=Wl({type:dL}),dL.\u0275inj=hl({factory:function(e){return new(e||dL)(md(lL,8),md(JN,8))}}),dL);function pL(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new aL(e,t,n)}function fL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new Bb(e,t):new jb(e,t)}function mL(e){return"guarded"}function gL(e){return[{provide:Jc,multi:!0,useValue:e},{provide:qN,multi:!0,useValue:e}]}var vL,yL=((vL=function(){function e(t){is(this,e),this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new Es}return as(e,[{key:"appInitializer",value:function(){var e=this;return this.injector.get(kb,Promise.resolve(null)).then(function(){var t=null,n=new Promise(function(e){return t=e}),r=e.injector.get(JN),i=e.injector.get(sL);return"disabled"===i.initialNavigation?(r.setUpLocationChangeListener(),t(!0)):"enabled"===i.initialNavigation||"enabledBlocking"===i.initialNavigation?(r.hooks.afterPreactivation=function(){return e.initNavigation?Ok(null):(e.initNavigation=!0,t(!0),e.resultOfPreactivationDone)},r.initialNavigation()):t(!0),n})}},{key:"bootstrapListener",value:function(e){var t=this.injector.get(sL),n=this.injector.get(oL),r=this.injector.get(aL),i=this.injector.get(JN),o=this.injector.get(lb);e===o.components[0]&&("enabledNonBlocking"!==t.initialNavigation&&void 0!==t.initialNavigation||i.initialNavigation(),n.setUpPreloading(),r.init(),i.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}]),e}()).\u0275fac=function(e){return new(e||vL)(md(kf))},vL.\u0275prov=dl({token:vL,factory:vL.\u0275fac}),vL);function bL(e){return e.appInitializer.bind(e)}function _L(e){return e.bootstrapListener.bind(e)}var wL=new $c("Router Initializer"),CL={prefix:"far",iconName:"briefcase",icon:[512,512,[],"f0b1","M464 128h-80V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v256c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zM176 80h160v48H176V80zM54 176h404c3.31 0 6 2.69 6 6v74H48v-74c0-3.31 2.69-6 6-6zm404 256H54c-3.31 0-6-2.69-6-6V304h144v24c0 13.25 10.75 24 24 24h80c13.25 0 24-10.75 24-24v-24h144v122c0 3.31-2.69 6-6 6z"]},xL={prefix:"far",iconName:"calendar-day",icon:[448,512,[],"f783","M112 368h96c8.8 0 16-7.2 16-16v-96c0-8.8-7.2-16-16-16h-96c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V160h352v298z"]},SL={prefix:"far",iconName:"check",icon:[512,512,[],"f00c","M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"]},PL={prefix:"far",iconName:"chevron-down",icon:[448,512,[],"f078","M441.9 167.3l-19.8-19.8c-4.7-4.7-12.3-4.7-17 0L224 328.2 42.9 147.5c-4.7-4.7-12.3-4.7-17 0L6.1 167.3c-4.7 4.7-4.7 12.3 0 17l209.4 209.4c4.7 4.7 12.3 4.7 17 0l209.4-209.4c4.7-4.7 4.7-12.3 0-17z"]},kL={prefix:"far",iconName:"chevron-left",icon:[256,512,[],"f053","M231.293 473.899l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L70.393 256 251.092 74.87c4.686-4.686 4.686-12.284 0-16.971L231.293 38.1c-4.686-4.686-12.284-4.686-16.971 0L4.908 247.515c-4.686 4.686-4.686 12.284 0 16.971L214.322 473.9c4.687 4.686 12.285 4.686 16.971-.001z"]},EL={prefix:"far",iconName:"chevron-right",icon:[256,512,[],"f054","M24.707 38.101L4.908 57.899c-4.686 4.686-4.686 12.284 0 16.971L185.607 256 4.908 437.13c-4.686 4.686-4.686 12.284 0 16.971L24.707 473.9c4.686 4.686 12.284 4.686 16.971 0l209.414-209.414c4.686-4.686 4.686-12.284 0-16.971L41.678 38.101c-4.687-4.687-12.285-4.687-16.971 0z"]},AL={prefix:"far",iconName:"chevron-up",icon:[448,512,[],"f077","M6.101 359.293L25.9 379.092c4.686 4.686 12.284 4.686 16.971 0L224 198.393l181.13 180.698c4.686 4.686 12.284 4.686 16.971 0l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L232.485 132.908c-4.686-4.686-12.284-4.686-16.971 0L6.101 342.322c-4.687 4.687-4.687 12.285 0 16.971z"]},IL={prefix:"far",iconName:"city",icon:[640,512,[],"f64f","M244 384h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm0-192h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm-96 0h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm0 192h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm0-96h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm96 0h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm288 96h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm0-96h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm84-96H512V24c0-13.26-10.74-24-24-24H280c-13.26 0-24 10.74-24 24v72h-32V16c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v80h-64V16c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v80H24c-13.26 0-24 10.74-24 24v376c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V144h256V48h160v192h128v256c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V216c0-13.26-10.75-24-24-24zM404 96h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm0 192h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12zm0-96h-40c-6.63 0-12 5.37-12 12v40c0 6.63 5.37 12 12 12h40c6.63 0 12-5.37 12-12v-40c0-6.63-5.37-12-12-12z"]},TL={prefix:"far",iconName:"cloud-upload",icon:[640,512,[],"f0ee","M543.7 200.1C539.7 142.1 491.4 96 432 96c-7.6 0-15.1.8-22.4 2.3C377.7 58.3 328.1 32 272 32c-84.6 0-155.5 59.7-172.3 139.8C39.9 196.1 0 254.4 0 320c0 88.4 71.6 160 160 160h336c79.5 0 144-64.5 144-144 0-61.8-39.2-115.8-96.3-135.9zM496 432H160c-61.9 0-112-50.1-112-112 0-56.4 41.7-103.1 96-110.9V208c0-70.7 57.3-128 128-128 53.5 0 99.3 32.8 118.4 79.4 11.2-9.6 25.7-15.4 41.6-15.4 35.3 0 64 28.7 64 64 0 11.8-3.2 22.9-8.8 32.4 2.9-.3 5.9-.4 8.8-.4 53 0 96 43 96 96s-43 96-96 96zM296.5 150.5c-4.7-4.7-12.3-4.7-17 0l-104 104c-4.7 4.7-4.7 12.3 0 17l16.9 16.9c4.7 4.7 12.4 4.7 17.1-.1l54.5-55.8V372c0 6.6 5.4 12 12 12h24c6.6 0 12-5.4 12-12V232.5l54.5 55.8c4.7 4.8 12.3 4.8 17.1.1l16.9-16.9c4.7-4.7 4.7-12.3 0-17l-104-104z"]},OL={prefix:"far",iconName:"copy",icon:[448,512,[],"f0c5","M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"]},RL={prefix:"far",iconName:"dollar-sign",icon:[288,512,[],"f155","M211.9 242.1L95.6 208.9c-15.8-4.5-28.6-17.2-31.1-33.5C60.6 150 80.3 128 105 128h73.8c15.9 0 31.5 5 44.4 14.1 6.4 4.5 15 3.8 20.5-1.7l22.9-22.9c6.8-6.8 6.1-18.2-1.5-24.1C240.4 74.3 210.4 64 178.8 64H176V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C60.3 64 14.9 95.8 3.1 143.6c-13.9 56.2 20.2 111.2 73 126.3l116.3 33.2c15.8 4.5 28.6 17.2 31.1 33.5C227.4 362 207.7 384 183 384h-73.8c-15.9 0-31.5-5-44.4-14.1-6.4-4.5-15-3.8-20.5 1.7l-22.9 22.9c-6.8 6.8-6.1 18.2 1.5 24.1 24.6 19.1 54.6 29.4 86.3 29.4h2.8v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48h2.5c49.2 0 94.6-31.8 106.4-79.6 13.9-56.2-20.2-111.2-73-126.3z"]},VL={prefix:"far",iconName:"edit",icon:[576,512,[],"f044","M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"]},DL={prefix:"far",iconName:"exclamation-circle",icon:[512,512,[],"f06a","M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm42-104c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42zm-81.37-211.401l6.8 136c.319 6.387 5.591 11.401 11.985 11.401h41.17c6.394 0 11.666-5.014 11.985-11.401l6.8-136c.343-6.854-5.122-12.599-11.985-12.599h-54.77c-6.863 0-12.328 5.745-11.985 12.599z"]},NL={prefix:"far",iconName:"exclamation-triangle",icon:[576,512,[],"f071","M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z"]},LL={prefix:"far",iconName:"external-link-alt",icon:[512,512,[],"f35d","M432,288H416a16,16,0,0,0-16,16V458a6,6,0,0,1-6,6H54a6,6,0,0,1-6-6V118a6,6,0,0,1,6-6H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V304A16,16,0,0,0,432,288ZM500,0H364a12,12,0,0,0-8.48,20.48l48.19,48.21L131.51,340.89a12,12,0,0,0,0,17l22.63,22.63a12,12,0,0,0,17,0l272.2-272.21,48.21,48.2A12,12,0,0,0,512,148V12A12,12,0,0,0,500,0Z"]},FL={prefix:"far",iconName:"eye",icon:[576,512,[],"f06e","M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"]},ML={prefix:"far",iconName:"file",icon:[384,512,[],"f15b","M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"]},qL={prefix:"far",iconName:"file-download",icon:[384,512,[],"f56d","M216 236.07c0-6.63-5.37-12-12-12h-24c-6.63 0-12 5.37-12 12v84.01h-48.88c-10.71 0-16.05 12.97-8.45 20.52l72.31 71.77c4.99 4.95 13.04 4.95 18.03 0l72.31-71.77c7.6-7.54 2.26-20.52-8.45-20.52H216v-84.01zM369.83 97.98L285.94 14.1c-9-9-21.2-14.1-33.89-14.1H47.99C21.5.1 0 21.6 0 48.09v415.92C0 490.5 21.5 512 47.99 512h287.94c26.5 0 48.07-21.5 48.07-47.99V131.97c0-12.69-5.17-24.99-14.17-33.99zM255.95 51.99l76.09 76.08h-76.09V51.99zM336 464.01H47.99V48.09h159.97v103.98c0 13.3 10.7 23.99 24 23.99H336v287.95z"]},jL={prefix:"far",iconName:"file-times",icon:[384,512,[],"f317","M369.9,98,286,14.1A48,48,0,0,0,252.1,0H48A48.16,48.16,0,0,0,0,48.1v416a48,48,0,0,0,48,48H336a48,48,0,0,0,48-48V132A48.23,48.23,0,0,0,369.9,98ZM256,52l76.1,76.1H256Zm80,412.1H48V48.1H208v104a23.94,23.94,0,0,0,24,24H336ZM264.85,264a16,16,0,0,0,0-22.63L253.53,230a16,16,0,0,0-22.63,0l-40,40-39.24-39.24a16,16,0,0,0-22.63,0l-11.31,11.31a16,16,0,0,0,0,22.63L157,303.92l-39.6,39.6a16,16,0,0,0,0,22.63l11.32,11.31a16,16,0,0,0,22.63,0L191,337.86l40,40a16,16,0,0,0,22.63,0l11.32-11.32a16,16,0,0,0,0-22.63l-40-39.95Z"]},BL={prefix:"far",iconName:"filter",icon:[512,512,[],"f0b0","M463.952 0H48.057C5.419 0-16.094 51.731 14.116 81.941L176 243.882V416c0 15.108 7.113 29.335 19.2 40l64 47.066c31.273 21.855 76.8 1.538 76.8-38.4V243.882L497.893 81.941C528.042 51.792 506.675 0 463.952 0zM288 224v240l-64-48V224L48 48h416L288 224z"]},zL={prefix:"far",iconName:"hammer",icon:[576,512,[],"f6e3","M571.31 193.94l-22.63-22.63c-6.25-6.24-16.38-6.25-22.63 0l-11.31 11.31-28.91-28.9c5.63-21.31.36-44.9-16.35-61.61l-45.25-45.25C392.99 15.62 352.05 0 311.1 0c-40.95 0-81.9 15.62-113.14 46.86l67.88 67.88v18.75c0 8.05 1.62 15.91 4.5 23.27L22.77 387.89C-6.88 415.57-7.68 462.32 21 491c14.03 14.03 32.37 21 50.69 21 19.15 0 38.27-7.62 52.42-22.77l230.92-247.34c7.56 3 15.58 4.52 23.61 4.52 5.61 0 11.23-.73 16.7-2.17l28.91 28.9-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.63c6.25 6.24 16.37 6.25 22.63 0l113.14-113.14c6.23-6.25 6.23-16.38-.02-22.63zM89.02 456.47c-9.86 10.56-25.36 9.31-34.08.59-10.21-10.22-8.44-25.66.59-34.08L300.3 194.46l17.24 17.24L89.02 456.47zm380.47-205.96l-59.74-59.73-26.68 7.05c-9.5 2.52-15.12-3.61-15.4-3.88l-49.14-49.14c-2.98-2.98-4.69-7.1-4.69-11.31V94.86l-40.4-40.4C285.37 50.21 298.06 48 311.1 48c29.92 0 58.04 11.65 79.2 32.8l45.25 45.25c5.84 5.84 4.45 13.26 3.89 15.4l-7.05 26.69 59.74 59.73-22.64 22.64z"]},UL={prefix:"far",iconName:"house",icon:[576,512,[],"f90d","M570.63,240,512,187.36V56a24,24,0,0,0-24-24H392a24,24,0,0,0-24,24v2.08l-53.44-48a40,40,0,0,0-53.12,0L5.37,240A16,16,0,0,0,4,262.58l10.62,11.95a16,16,0,0,0,22.59,1.34l26.75-24V472a40,40,0,0,0,40,40H472a40,40,0,0,0,40-40V251.85l26.75,24a16,16,0,0,0,22.59-1.34L572,262.58A16,16,0,0,0,570.63,240ZM464,464H112V208.75l176-158,176,158Zm0-319.74-48-43.09V80h48ZM224,208v96a16,16,0,0,0,16,16h96a16,16,0,0,0,16-16V208a16,16,0,0,0-16-16H240A16,16,0,0,0,224,208Z"]},HL={prefix:"far",iconName:"house-user",icon:[576,512,[],"f965","M570.61,240,512,187.37V56a24,24,0,0,0-24-24H392a24,24,0,0,0-24,24v2.08l-53.44-48C308.28,4.53,296.39,0,288,0s-20.28,4.53-26.56,10.09L5.39,240A18.21,18.21,0,0,0,0,252a18.47,18.47,0,0,0,4,10.61l10.62,12a18.15,18.15,0,0,0,12,5.37,18.54,18.54,0,0,0,10.63-4l26.75-24V472a40,40,0,0,0,40,40H472a40,40,0,0,0,40-40V251.85l26.75,24a16,16,0,0,0,22.59-1.33L572,262.59A18.47,18.47,0,0,0,576,252,18.21,18.21,0,0,0,570.61,240ZM464,464H416V448a96,96,0,0,0-96-96H256a96,96,0,0,0-96,96v16H112V208.76l176-158,176,158Zm0-319.72-48-43.1V80h48ZM224,256a64,64,0,1,0,64-64A64,64,0,0,0,224,256Z"]},QL={prefix:"far",iconName:"info-circle",icon:[512,512,[],"f05a","M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm0-338c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"]},WL={prefix:"far",iconName:"location",icon:[512,512,[],"f601","M256 168c-48.6 0-88 39.4-88 88s39.4 88 88 88 88-39.4 88-88-39.4-88-88-88zm0 128c-22.06 0-40-17.94-40-40s17.94-40 40-40 40 17.94 40 40-17.94 40-40 40zm240-64h-49.66C435.49 145.19 366.81 76.51 280 65.66V16c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v49.66C145.19 76.51 76.51 145.19 65.66 232H16c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h49.66C76.51 366.81 145.19 435.49 232 446.34V496c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-49.66C366.81 435.49 435.49 366.8 446.34 280H496c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zM256 400c-79.4 0-144-64.6-144-144s64.6-144 144-144 144 64.6 144 144-64.6 144-144 144z"]},GL={prefix:"far",iconName:"long-arrow-left",icon:[448,512,[],"f177","M152.485 396.284l19.626-19.626c4.753-4.753 4.675-12.484-.173-17.14L91.22 282H436c6.627 0 12-5.373 12-12v-28c0-6.627-5.373-12-12-12H91.22l80.717-77.518c4.849-4.656 4.927-12.387.173-17.14l-19.626-19.626c-4.686-4.686-12.284-4.686-16.971 0L3.716 247.515c-4.686 4.686-4.686 12.284 0 16.971l131.799 131.799c4.686 4.685 12.284 4.685 16.97-.001z"]},$L={prefix:"far",iconName:"long-arrow-right",icon:[448,512,[],"f178","M295.515 115.716l-19.626 19.626c-4.753 4.753-4.675 12.484.173 17.14L356.78 230H12c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h344.78l-80.717 77.518c-4.849 4.656-4.927 12.387-.173 17.14l19.626 19.626c4.686 4.686 12.284 4.686 16.971 0l131.799-131.799c4.686-4.686 4.686-12.284 0-16.971L312.485 115.716c-4.686-4.686-12.284-4.686-16.97 0z"]},JL={prefix:"far",iconName:"map-marked",icon:[576,512,[],"f59f","M560 160c-2 0-4 .4-6 1.2l-73.5 27.2c-8.2 20.4-20.2 42-34.2 63.8L528 222v193l-128 44.5V316.3c-13.7 17.3-27.9 34.3-42.5 50.8-1.7 1.9-3.6 3.5-5.5 5.1v81.4l-128-45.2v-113c-18.1-24.1-34.8-48.8-48-72.8v180.2l-.6.2L48 450V257l123.6-43c-8-15.4-14.1-30.3-18.3-44.5L20.1 216C8 220.8 0 232.6 0 245.7V496c0 9.2 7.5 16 16 16 2 0 4-.4 6-1.2L192 448l172 60.7c13 4.3 27 4.4 40 .2L555.9 456c12.2-4.9 20.1-16.6 20.1-29.7V176c0-9.2-7.5-16-16-16zM320 352c5 0 10-2 13.5-6.1 35.3-40 127.3-150.1 127.3-210.6C460.8 60.6 397.8 0 320 0S179.2 60.6 179.2 135.3c0 60.4 92 170.6 127.3 210.6C310 350 315 352 320 352zm0-304c51.2 0 92.8 39.2 92.8 87.3 0 21.4-31.8 79.1-92.8 152.6-61-73.5-92.8-131.2-92.8-152.6 0-48.1 41.6-87.3 92.8-87.3z"]},YL={prefix:"far",iconName:"map-marked-alt",icon:[576,512,[],"f5a0","M344 126c0-13.3-10.7-24-24-24s-24 10.7-24 24c0 13.2 10.7 24 24 24s24-10.8 24-24zm-24 226c5 0 10-2 13.5-6.1 35.3-40 127.3-150.1 127.3-210.6C460.8 60.6 397.8 0 320 0S179.2 60.6 179.2 135.3c0 60.4 92 170.6 127.3 210.6C310 350 315 352 320 352zm0-304c51.2 0 92.8 39.2 92.8 87.3 0 21.4-31.8 79.1-92.8 152.6-61-73.5-92.8-131.2-92.8-152.6 0-48.1 41.6-87.3 92.8-87.3zm240 112c-2 0-4 .4-6 1.2l-73.5 27.2c-8.2 20.4-20.2 42-34.2 63.8L528 222v193l-128 44.5V316.3c-13.7 17.3-27.9 34.3-42.5 50.8-1.7 1.9-3.6 3.5-5.5 5.1v81.4l-128-45.2v-113c-18.1-24.1-34.8-48.8-48-72.8v180.2l-.6.2L48 450V257l123.6-43c-8-15.4-14.1-30.3-18.3-44.5L20.1 216C8 220.8 0 232.6 0 245.7V496c0 9.2 7.5 16 16 16 2 0 4-.4 6-1.2L192 448l172 60.7c13 4.3 27 4.4 40 .2L555.9 456c12.2-4.9 20.1-16.6 20.1-29.7V176c0-9.2-7.5-16-16-16z"]},KL={prefix:"far",iconName:"paper-plane",icon:[512,512,[],"f1d8","M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z"]},ZL={prefix:"far",iconName:"pencil",icon:[512,512,[],"f040","M491.609 73.625l-53.861-53.839c-26.378-26.379-69.076-26.383-95.46-.001L24.91 335.089.329 484.085c-2.675 16.215 11.368 30.261 27.587 27.587l148.995-24.582 315.326-317.378c26.33-26.331 26.581-68.879-.628-96.087zM120.644 302l170.259-169.155 88.251 88.251L210 391.355V350h-48v-48h-41.356zM82.132 458.132l-28.263-28.263 12.14-73.587L84.409 338H126v48h48v41.59l-18.282 18.401-73.586 12.141zm378.985-319.533l-.051.051-.051.051-48.03 48.344-88.03-88.03 48.344-48.03.05-.05.05-.05c9.147-9.146 23.978-9.259 33.236-.001l53.854 53.854c9.878 9.877 9.939 24.549.628 33.861z"]},XL={prefix:"far",iconName:"phone-alt",icon:[512,512,[],"f879","M484.25 330l-101.59-43.55a45.86 45.86 0 0 0-53.39 13.1l-32.7 40a311.08 311.08 0 0 1-124.19-124.12l40-32.7a45.91 45.91 0 0 0 13.1-53.42L182 27.79a45.63 45.63 0 0 0-52.31-26.61L35.5 22.89A45.59 45.59 0 0 0 0 67.5C0 313.76 199.68 512.1 444.56 512a45.58 45.58 0 0 0 44.59-35.51l21.7-94.22a45.75 45.75 0 0 0-26.6-52.27zm-41.59 134.09C225.08 463.09 49 287 48 69.3l90.69-20.9 42.09 98.22-68.09 55.71c46.39 99 98.19 150.63 197 197l55.69-68.11 98.19 42.11z"]},eF={prefix:"far",iconName:"plus",icon:[384,512,[],"f067","M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h144v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V288h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},tF={prefix:"far",iconName:"plus-circle",icon:[512,512,[],"f055","M384 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm120 16c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-48 0c0-110.5-89.5-200-200-200S56 145.5 56 256s89.5 200 200 200 200-89.5 200-200z"]},nF={prefix:"far",iconName:"receipt",icon:[448,512,[],"f543","M344 288H104c-4.4 0-8 3.6-8 8v32c0 4.4 3.6 8 8 8h240c4.4 0 8-3.6 8-8v-32c0-4.4-3.6-8-8-8zM400.8 5.7L357.3 37 318.7 9.2c-16.8-12.1-39.2-12.1-56.1 0L224 37 185.4 9.2a47.888 47.888 0 0 0-56.1 0L90.7 37 47.2 5.7C27.4-8.5 0 5.6 0 29.9v452.3c0 23.8 27.1 38.6 47.2 24.2L90.7 475l38.6 27.8c16.8 12.1 39.2 12.1 56.1 0L224 475l38.6 27.8c16.8 12.1 39.3 12.1 56.1 0l38.6-27.8 43.5 31.3c19.8 14.2 47.2.1 47.2-24.1V29.9C448 6 420.9-8.7 400.8 5.7zm-.8 440.8l-42.7-30.7-66.7 48-66.7-48-66.7 48-66.7-48L48 446.5v-381l42.7 30.7 66.7-48 66.7 48 66.7-48 66.7 48L400 65.5v381zM344 176H104c-4.4 0-8 3.6-8 8v32c0 4.4 3.6 8 8 8h240c4.4 0 8-3.6 8-8v-32c0-4.4-3.6-8-8-8z"]},rF={prefix:"far",iconName:"redo",icon:[512,512,[],"f01e","M500 8h-27.711c-6.739 0-12.157 5.548-11.997 12.286l2.347 98.568C418.075 51.834 341.788 7.73 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.165 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-19.738-19.738c-4.498-4.498-11.753-4.785-16.501-.552C351.787 433.246 306.105 452 256 452c-108.322 0-196-87.662-196-196 0-108.322 87.662-196 196-196 79.545 0 147.941 47.282 178.675 115.302l-126.389-3.009c-6.737-.16-12.286 5.257-12.286 11.997V212c0 6.627 5.373 12 12 12h192c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"]},iF={prefix:"far",iconName:"save",icon:[448,512,[],"f0c7","M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z"]},oF={prefix:"far",iconName:"search",icon:[512,512,[],"f002","M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z"]},aF={prefix:"far",iconName:"spinner-third",icon:[512,512,[],"f3f4","M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z"]},sF={prefix:"far",iconName:"th-large",icon:[512,512,[],"f009","M0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80zm232 0v152H48V86a6 6 0 0 1 6-6h178zM48 280h184v152H54a6 6 0 0 1-6-6V280zm232 152V280h184v146a6 6 0 0 1-6 6H280zm184-200H280V80h178a6 6 0 0 1 6 6v146z"]},lF={prefix:"far",iconName:"times",icon:[320,512,[],"f00d","M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"]},uF={prefix:"far",iconName:"trash-alt",icon:[448,512,[],"f2ed","M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"]},cF={prefix:"far",iconName:"user",icon:[448,512,[],"f007","M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z"]},dF={prefix:"far",iconName:"user-hard-hat",icon:[448,512,[],"f82c","M224 272a80.13 80.13 0 0 1-78.38-64h-48c8 63.06 61.17 112 126.39 112s118.44-48.94 126.39-112h-48a80.13 80.13 0 0 1-78.4 64zm89.6 80c-28.72 0-42.45 16-89.6 16s-60.88-16-89.56-16A134.4 134.4 0 0 0 0 486.4 25.6 25.6 0 0 0 25.6 512h396.8a25.6 25.6 0 0 0 25.6-25.6A134.4 134.4 0 0 0 313.6 352zM50.94 464a86.58 86.58 0 0 1 83.5-64c14.44 0 38.28 16 89.56 16 51.47 0 75.1-16 89.6-16a86.55 86.55 0 0 1 83.46 64zM88 176h272a8 8 0 0 0 8-8v-32a8 8 0 0 0-8-8h-8c0-46.41-28.53-85.54-68.79-102.42L256 80V16a16 16 0 0 0-16-16h-32a16 16 0 0 0-16 16v64l-27.21-54.42C124.53 42.46 96 81.59 96 128h-8a8 8 0 0 0-8 8v32a8 8 0 0 0 8 8z"]};function hF(e){return(hF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){pF(e,t,n[t])})}return e}function mF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var gF={},vF={};try{"undefined"!=typeof window&&(gF=window),"undefined"!=typeof document&&(vF=document),"undefined"!=typeof MutationObserver&&MutationObserver,"undefined"!=typeof performance&&performance}catch(VZ){}var yF=(gF.navigator||{}).userAgent,bF=void 0===yF?"":yF,_F=gF,wF=vF,CF=!!wF.documentElement&&!!wF.head&&"function"==typeof wF.addEventListener&&"function"==typeof wF.createElement,xF=(~bF.indexOf("MSIE")||bF.indexOf("Trident/"),[1,2,3,4,5,6,7,8,9,10]),SF=xF.concat([11,12,13,14,15,16,17,18,19,20]),PF={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},kF=(["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter",PF.GROUP,PF.SWAP_OPACITY,PF.PRIMARY,PF.SECONDARY].concat(xF.map(function(e){return"".concat(e,"x")})).concat(SF.map(function(e){return"w-".concat(e)})),_F.FontAwesomeConfig||{});wF&&"function"==typeof wF.querySelector&&[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=mF(e,2),n=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=wF.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(t[0]));null!=r&&(kF[n]=r)});var EF=fF({},{familyPrefix:"fa",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},kF);EF.autoReplaceSvg||(EF.observeMutations=!1);var AF=fF({},EF);_F.FontAwesomeConfig=AF;var IF=_F||{};IF.___FONT_AWESOME___||(IF.___FONT_AWESOME___={}),IF.___FONT_AWESOME___.styles||(IF.___FONT_AWESOME___.styles={}),IF.___FONT_AWESOME___.hooks||(IF.___FONT_AWESOME___.hooks={}),IF.___FONT_AWESOME___.shims||(IF.___FONT_AWESOME___.shims=[]);var TF=IF.___FONT_AWESOME___,OF=[];CF&&((wF.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(wF.readyState)||wF.addEventListener("DOMContentLoaded",function e(){wF.removeEventListener("DOMContentLoaded",e),OF.map(function(e){return e()})}));var RF,VF=function(){},DF="undefined"!=typeof global&&void 0!==global.process&&"function"==typeof global.process.emit,NF="undefined"==typeof setImmediate?setTimeout:setImmediate,LF=[];function FF(){for(var e=0;e<LF.length;e++)LF[e][0](LF[e][1]);LF=[],RF=!1}function MF(e,t){LF.push([e,t]),RF||(RF=!0,NF(FF,0))}function qF(e){var t=e.owner,n=t._state,r=t._data,i=e[n],o=e.then;if("function"==typeof i){n="fulfilled";try{r=i(r)}catch(VZ){UF(o,VZ)}}jF(o,r)||("fulfilled"===n&&BF(o,r),"rejected"===n&&UF(o,r))}function jF(e,t){var n;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&("function"==typeof t||"object"===hF(t))){var r=t.then;if("function"==typeof r)return r.call(t,function(r){n||(n=!0,t===r?zF(e,r):BF(e,r))},function(t){n||(n=!0,UF(e,t))}),!0}}catch(VZ){return n||UF(e,VZ),!0}return!1}function BF(e,t){e!==t&&jF(e,t)||zF(e,t)}function zF(e,t){"pending"===e._state&&(e._state="settled",e._data=t,MF(QF,e))}function UF(e,t){"pending"===e._state&&(e._state="settled",e._data=t,MF(WF,e))}function HF(e){e._then=e._then.forEach(qF)}function QF(e){e._state="fulfilled",HF(e)}function WF(e){e._state="rejected",HF(e),!e._handled&&DF&&global.process.emit("unhandledRejection",e._data,e)}function GF(e){global.process.emit("rejectionHandled",e)}function $F(e){if("function"!=typeof e)throw new TypeError("Promise resolver "+e+" is not a function");if(this instanceof $F==0)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(e,t){function n(e){UF(t,e)}try{e(function(e){BF(t,e)},n)}catch(VZ){n(VZ)}}(e,this)}$F.prototype={constructor:$F,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(e,t){var n={owner:this,then:new this.constructor(VF),fulfilled:e,rejected:t};return!t&&!e||this._handled||(this._handled=!0,"rejected"===this._state&&DF&&MF(GF,this)),"fulfilled"===this._state||"rejected"===this._state?MF(qF,n):this._then.push(n),n.then},catch:function(e){return this.then(null,e)}},$F.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new $F(function(t,n){var r=[],i=0;function o(e){return i++,function(n){r[e]=n,--i||t(r)}}for(var a,s=0;s<e.length;s++)(a=e[s])&&"function"==typeof a.then?a.then(o(s),n):r[s]=a;i||t(r)})},$F.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new $F(function(t,n){for(var r,i=0;i<e.length;i++)(r=e[i])&&"function"==typeof r.then?r.then(t,n):t(r)})},$F.resolve=function(e){return e&&"object"===hF(e)&&e.constructor===$F?e:new $F(function(t){t(e)})},$F.reject=function(e){return new $F(function(t,n){n(e)})};var JF={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function YF(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function KF(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ZF(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n],";")},"")}function XF(e){return e.size!==JF.size||e.x!==JF.x||e.y!==JF.y||e.rotate!==JF.rotate||e.flipX||e.flipY}function eM(e){var t=e.transform,n=e.iconWidth,r={transform:"translate(".concat(e.containerWidth/2," 256)")},i="translate(".concat(32*t.x,", ").concat(32*t.y,") "),o="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)");return{outer:r,inner:{transform:"".concat(i," ").concat(o," ").concat(a)},path:{transform:"translate(".concat(n/2*-1," -256)")}}}var tM={x:0,y:0,width:"100%",height:"100%"};function nM(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function rM(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,u=e.maskId,c=e.titleId,d=e.extra,h=e.watchable,p=void 0!==h&&h,f=r.found?r:n,m=f.width,g=f.height,v="fa-w-".concat(Math.ceil(m/g*16)),y=[AF.replacementClass,o?"".concat(AF.familyPrefix,"-").concat(o):"",v].filter(function(e){return-1===d.classes.indexOf(e)}).concat(d.classes).join(" "),b={children:[],attributes:fF({},d.attributes,{"data-prefix":i,"data-icon":o,class:y,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(g)})};p&&(b.attributes["data-fa-i2svg"]=""),l&&b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(c||YF())},children:[l]});var _=fF({},b,{prefix:i,iconName:o,main:n,mask:r,maskId:u,transform:a,symbol:s,styles:d.styles}),w=r.found&&n.found?function(e){var t,n=e.children,r=e.attributes,i=e.main,o=e.mask,a=e.maskId,s=i.icon,l=o.icon,u=eM({transform:e.transform,containerWidth:o.width,iconWidth:i.width}),c={tag:"rect",attributes:fF({},tM,{fill:"white"})},d=s.children?{children:s.children.map(nM)}:{},h={tag:"g",attributes:fF({},u.inner),children:[nM(fF({tag:s.tag,attributes:fF({},s.attributes,u.path)},d))]},p={tag:"g",attributes:fF({},u.outer),children:[h]},f="mask-".concat(a||YF()),m="clip-".concat(a||YF()),g={tag:"mask",attributes:fF({},tM,{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[c,p]},v={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:(t=l,"g"===t.tag?t.children:[t])},g]};return n.push(v,{tag:"rect",attributes:fF({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(f,")")},tM)}),{children:n,attributes:r}}(_):function(e){var t=e.children,n=e.attributes,r=e.main,i=e.transform,o=ZF(e.styles);if(o.length>0&&(n.style=o),XF(i)){var a=eM({transform:i,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:fF({},a.outer),children:[{tag:"g",attributes:fF({},a.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:fF({},r.icon.attributes,a.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}(_),C=w.attributes;return _.children=w.children,_.attributes=C,s?function(e){var t=e.iconName,n=e.children,r=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:fF({},e.attributes,{id:!0===r?"".concat(e.prefix,"-").concat(AF.familyPrefix,"-").concat(t):r}),children:n}]}]}(_):function(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(XF(a)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};i.style=ZF(fF({},o,{"transform-origin":"".concat(s.x+a.x/16,"em ").concat(s.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(_)}var iM=function(e,t,n,r){var i,o,a,s=Object.keys(e),l=s.length,u=void 0!==r?function(e,t){return function(n,r,i,o){return e.call(t,n,r,i,o)}}(t,r):t;for(void 0===n?(i=1,a=e[s[0]]):(i=0,a=n);i<l;i++)a=u(a,e[o=s[i]],o,e);return a};function oM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,i=void 0!==r&&r,o=Object.keys(t).reduce(function(e,n){var r=t[n];return r.icon?e[r.iconName]=r.icon:e[n]=r,e},{});"function"!=typeof TF.hooks.addPack||i?TF.styles[e]=fF({},TF.styles[e]||{},o):TF.hooks.addPack(e,o),"fas"===e&&oM("fa",t)}var aM=TF.styles,sM=TF.shims,lM=function(){var e=function(e){return iM(aM,function(t,n,r){return t[r]=iM(n,e,{}),t},{})};e(function(e,t,n){return t[3]&&(e[t[3]]=n),e}),e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in aM;iM(sM,function(e,n){var r=n[1];return"far"!==r||t||(r="fas"),e[n[0]]={prefix:r,iconName:n[2]},e},{})};function uM(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}function cM(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,i=e.children,o=void 0===i?[]:i;return"string"==typeof e?KF(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(KF(e[n]),'" ')},"").trim()}(r),">").concat(o.map(cM).join(""),"</").concat(t,">")}function dM(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}lM(),(dM.prototype=Object.create(Error.prototype)).constructor=dM;var hM={fill:"currentColor"},pM={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},fM=(fF({},hM,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}),fF({},pM,{attributeName:"opacity"}));function mM(e){var t=e[0],n=e[1],r=mF(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(AF.familyPrefix,"-").concat(PF.GROUP)},children:[{tag:"path",attributes:{class:"".concat(AF.familyPrefix,"-").concat(PF.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(AF.familyPrefix,"-").concat(PF.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}function gM(){AF.autoAddCss&&!IM&&(function(e){if(e&&CF){var t=wF.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=wF.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}wF.head.insertBefore(t,r)}}(function(){var e="svg-inline--fa",t=AF.familyPrefix,n=AF.replacementClass,r='svg:not(:root).svg-inline--fa {\n  overflow: visible;\n}\n\n.svg-inline--fa {\n  display: inline-block;\n  font-size: inherit;\n  height: 1em;\n  overflow: visible;\n  vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n  vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n  width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n  width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n  width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n  width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n  width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n  width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n  width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n  width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n  width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n  width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n  width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n  width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n  width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n  width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n  width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n  width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n  width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n  width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n  width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n  width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n  margin-right: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n  margin-left: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-border {\n  height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n  width: 2em;\n}\n.svg-inline--fa.fa-fw {\n  width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.fa-layers {\n  display: inline-block;\n  height: 1em;\n  position: relative;\n  text-align: center;\n  vertical-align: -0.125em;\n  width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n  display: inline-block;\n  position: absolute;\n  text-align: center;\n}\n\n.fa-layers-text {\n  left: 50%;\n  top: 50%;\n  -webkit-transform: translate(-50%, -50%);\n          transform: translate(-50%, -50%);\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter {\n  background-color: #ff253a;\n  border-radius: 1em;\n  -webkit-box-sizing: border-box;\n          box-sizing: border-box;\n  color: #fff;\n  height: 1.5em;\n  line-height: 1;\n  max-width: 5em;\n  min-width: 1.5em;\n  overflow: hidden;\n  padding: 0.25em;\n  right: 0;\n  text-overflow: ellipsis;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n  bottom: 0;\n  right: 0;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom right;\n          transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n  bottom: 0;\n  left: 0;\n  right: auto;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom left;\n          transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n  right: 0;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-top-left {\n  left: 0;\n  right: auto;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top left;\n          transform-origin: top left;\n}\n\n.fa-lg {\n  font-size: 1.3333333333em;\n  line-height: 0.75em;\n  vertical-align: -0.0667em;\n}\n\n.fa-xs {\n  font-size: 0.75em;\n}\n\n.fa-sm {\n  font-size: 0.875em;\n}\n\n.fa-1x {\n  font-size: 1em;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-6x {\n  font-size: 6em;\n}\n\n.fa-7x {\n  font-size: 7em;\n}\n\n.fa-8x {\n  font-size: 8em;\n}\n\n.fa-9x {\n  font-size: 9em;\n}\n\n.fa-10x {\n  font-size: 10em;\n}\n\n.fa-fw {\n  text-align: center;\n  width: 1.25em;\n}\n\n.fa-ul {\n  list-style-type: none;\n  margin-left: 2.5em;\n  padding-left: 0;\n}\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  left: -2em;\n  position: absolute;\n  text-align: center;\n  width: 2em;\n  line-height: inherit;\n}\n\n.fa-border {\n  border: solid 0.08em #eee;\n  border-radius: 0.1em;\n  padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n  float: left;\n}\n\n.fa-pull-right {\n  float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n  margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n  margin-left: 0.3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n          animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n          animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n.fa-rotate-90 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n  -webkit-transform: rotate(90deg);\n          transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n  -webkit-transform: rotate(180deg);\n          transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n  -webkit-transform: rotate(270deg);\n          transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n  -webkit-transform: scale(-1, 1);\n          transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(1, -1);\n          transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(-1, -1);\n          transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n  -webkit-filter: none;\n          filter: none;\n}\n\n.fa-stack {\n  display: inline-block;\n  height: 2em;\n  position: relative;\n  width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n  height: 1em;\n  width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n  height: 2em;\n  width: 2.5em;\n}\n\n.fa-inverse {\n  color: #fff;\n}\n\n.sr-only {\n  border: 0;\n  clip: rect(0, 0, 0, 0);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n  clip: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  position: static;\n  width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n  fill: var(--fa-primary-color, currentColor);\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n  fill: var(--fa-secondary-color, currentColor);\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n  fill: black;\n}\n\n.fad.fa-inverse {\n  color: #fff;\n}';if("fa"!==t||n!==e){var i=new RegExp("\\.".concat("fa","\\-"),"g"),o=new RegExp("\\--".concat("fa","\\-"),"g"),a=new RegExp("\\.".concat(e),"g");r=r.replace(i,".".concat(t,"-")).replace(o,"--".concat(t,"-")).replace(a,".".concat(n))}return r}()),IM=!0)}function vM(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return cM(e)})}}),Object.defineProperty(e,"node",{get:function(){if(CF){var t=wF.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function yM(e){var t=e.prefix,n=void 0===t?"fa":t,r=e.iconName;if(r)return uM(AM.definitions,n,r)||uM(TF.styles,n,r)}fF({},hM,{cx:"256",cy:"364",r:"28"}),fF({},pM,{attributeName:"r",values:"28;14;28;28;14;28;"}),fF({},fM,{values:"1;0;1;1;0;1;"}),fF({},hM,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),fF({},fM,{values:"1;0;0;0;0;1;"}),fF({},hM,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),fF({},fM,{values:"0;0;1;1;0;0;"});var bM,_M,wM,CM,xM,SM,PM,kM,EM,AM=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t;return(t=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.reduce(this._pullDefinitions,{});Object.keys(i).forEach(function(t){e.definitions[t]=fF({},e.definitions[t]||{},i[t]),oM(t,i[t]),lM()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var r=n[t],i=r.prefix,o=r.iconName,a=r.icon;e[i]||(e[i]={}),e[i][o]=a}),e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}()),IM=!1,TM=(bM=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?JF:n,i=t.symbol,o=void 0!==i&&i,a=t.mask,s=void 0===a?null:a,l=t.maskId,u=void 0===l?null:l,c=t.title,d=void 0===c?null:c,h=t.titleId,p=void 0===h?null:h,f=t.classes,m=void 0===f?[]:f,g=t.attributes,v=void 0===g?{}:g,y=t.styles,b=void 0===y?{}:y;if(e){var _=e.prefix,w=e.iconName,C=e.icon;return vM(fF({type:"icon"},e),function(){return gM(),AF.autoA11y&&(d?v["aria-labelledby"]="".concat(AF.replacementClass,"-title-").concat(p||YF()):(v["aria-hidden"]="true",v.focusable="false")),rM({icons:{main:mM(C),mask:s?mM(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:_,iconName:w,transform:fF({},JF,r),symbol:o,title:d,maskId:u,titleId:p,extra:{attributes:v,styles:b,classes:m}})})}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:yM(e||{}),r=t.mask;return r&&(r=(r||{}).icon?r:yM(r||{})),bM(n,fF({},t,{mask:r}))}),OM=((wM=function e(){is(this,e),this.defaultPrefix="fas",this.fallbackIcon=null,this.globalLibrary=!1}).\u0275fac=function(e){return new(e||wM)},wM.\u0275prov=dl({factory:function(){return new wM},token:wM,providedIn:"root"}),wM),RM=((_M=function(){function e(){is(this,e),this.definitions={}}return as(e,[{key:"addIcons",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];o.prefix in this.definitions||(this.definitions[o.prefix]={}),this.definitions[o.prefix][o.iconName]=o}}},{key:"addIconPacks",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=function(){var t=a[o],n=Object.keys(t).map(function(e){return t[e]});e.addIcons.apply(e,Ha(n))},o=0,a=n;o<a.length;o++)i()}},{key:"getIconDefinition",value:function(e,t){return e in this.definitions&&t in this.definitions[e]?this.definitions[e][t]:null}}]),e}()).\u0275fac=function(e){return new(e||_M)},_M.\u0275prov=dl({factory:function(){return new _M},token:_M,providedIn:"root"}),_M),VM=((kM=function(){function e(){is(this,e),this.stackItemSize="1x"}return as(e,[{key:"ngOnChanges",value:function(e){if("size"in e)throw new Error('fa-icon is not allowed to customize size when used inside fa-stack. Set size on the enclosing fa-stack instead: <fa-stack size="4x">...</fa-stack>.')}}]),e}()).\u0275fac=function(e){return new(e||kM)},kM.\u0275dir=$l({type:kM,selectors:[["fa-icon","stackItemSize",""],["fa-duotone-icon","stackItemSize",""]],inputs:{stackItemSize:"stackItemSize",size:"size"},features:[cu]}),kM),DM=((PM=function(){function e(t,n,r,i){is(this,e),this.sanitizer=t,this.config=n,this.iconLibrary=r,this.stackItem=i,this.classes=[]}return as(e,[{key:"ngOnChanges",value:function(e){if(null==this.icon&&null==this.config.fallbackIcon)return function(){throw new Error("Property `icon` is required for `fa-icon`/`fa-duotone-icon` components.")}();var t;if(t=null==this.icon?this.config.fallbackIcon:this.icon,e){var n=this.findIconDefinition(t);if(null!=n){var r=this.buildParams();this.renderIcon(n,r)}}}},{key:"render",value:function(){this.ngOnChanges({})}},{key:"findIconDefinition",value:function(e){var t=function(e,t){return void 0!==(n=e).prefix&&void 0!==n.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:t,iconName:e}:void 0;var n}(e,this.config.defaultPrefix);if("icon"in t)return t;var n=this.iconLibrary.getIconDefinition(t.prefix,t.iconName);if(null!=n)return n;var r=yM(t);if(null!=r){var i="Global icon library is deprecated. Consult https://github.com/FortAwesome/angular-fontawesome/blob/master/UPGRADING.md for the migration instructions.";if("unset"===this.config.globalLibrary)console.error("FontAwesome: "+i);else if(!this.config.globalLibrary)throw new Error(i);return r}return function(e){throw new Error("Could not find icon with iconName=".concat(e.iconName," and prefix=").concat(e.prefix," in the icon library."))}(t),null}},{key:"buildParams",value:function(){var e,t,n,r,i,o={flip:this.flip,spin:this.spin,pulse:this.pulse,border:this.border,inverse:this.inverse,size:this.size||null,pull:this.pull||null,rotate:this.rotate||null,fixedWidth:"boolean"==typeof this.fixedWidth?this.fixedWidth:this.config.fixedWidth,stackItemSize:null!=this.stackItem?this.stackItem.stackItemSize:null},a="string"==typeof this.transform?(e=this.transform,t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0},e?e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],i=n.slice(1).join("-");if(r&&"h"===i)return e.flipX=!0,e;if(r&&"v"===i)return e.flipY=!0,e;if(i=parseFloat(i),isNaN(i))return e;switch(r){case"grow":e.size=e.size+i;break;case"shrink":e.size=e.size-i;break;case"left":e.x=e.x-i;break;case"right":e.x=e.x+i;break;case"up":e.y=e.y-i;break;case"down":e.y=e.y+i;break;case"rotate":e.rotate=e.rotate+i}return e},t):t):this.transform;return{title:this.title,transform:a,classes:[].concat(Ha((n=o,za(r={"fa-spin":n.spin,"fa-pulse":n.pulse,"fa-fw":n.fixedWidth,"fa-border":n.border,"fa-inverse":n.inverse,"fa-layers-counter":n.counter,"fa-flip-horizontal":"horizontal"===n.flip||"both"===n.flip,"fa-flip-vertical":"vertical"===n.flip||"both"===n.flip},"fa-"+n.size,null!==n.size),za(r,"fa-rotate-"+n.rotate,null!==n.rotate),za(r,"fa-pull-"+n.pull,null!==n.pull),za(r,"fa-stack-"+n.stackItemSize,null!=n.stackItemSize),i=r,Object.keys(i).map(function(e){return i[e]?e:null}).filter(function(e){return e}))),Ha(this.classes)),mask:null!=this.mask?this.findIconDefinition(this.mask):null,styles:null!=this.styles?this.styles:{},symbol:this.symbol,attributes:{role:this.a11yRole}}}},{key:"renderIcon",value:function(e,t){var n=TM(e,t);this.renderedIconHTML=this.sanitizer.bypassSecurityTrustHtml(n.html.join("\n"))}}]),e}()).\u0275fac=function(e){return new(e||PM)(Qf(Ww),Qf(OM),Qf(RM),Qf(VM,8))},PM.\u0275cmp=zl({type:PM,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(e,t){2&e&&(km("innerHTML",t.renderedIconHTML,ih),Bf("title",t.title))},inputs:{classes:"classes",icon:"icon",title:"title",spin:"spin",pulse:"pulse",mask:"mask",styles:"styles",flip:"flip",size:"size",pull:"pull",border:"border",inverse:"inverse",symbol:"symbol",rotate:"rotate",fixedWidth:"fixedWidth",transform:"transform",a11yRole:"a11yRole"},features:[cu],decls:0,vars:0,template:function(e,t){},encapsulation:2}),PM=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}([(SM=ad(),function(e,t){SM(e,t,3)})],PM)),NM=((xM=function e(){is(this,e)}).\u0275mod=Wl({type:xM}),xM.\u0275inj=hl({factory:function(e){return new(e||xM)}}),xM),LM=((CM=function(){function e(){is(this,e),this.farExclamationTriangle=NL}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||CM)},CM.\u0275cmp=zl({type:CM,selectors:[["pel-error-generic"]],decls:4,vars:1,consts:function(){return[[1,"text-center","text-danger","mt-2","error-loading"],["size","2x",3,"icon"],[1,"my-2"],"Une erreur de chargement s'est produite."]},template:function(e,t){1&e&&($f(0,"div",0),Yf(1,"fa-icon",1),$f(2,"p",2),Rg(3,3),Jf(),Jf()),2&e&&(dp(1),Wf("icon",t.farExclamationTriangle))},directives:[DM],styles:[""]}),CM),FM=function e(){is(this,e)},MM=function e(){is(this,e)},qM=function e(){is(this,e)},jM=function e(){is(this,e)},BM=function e(){is(this,e)},zM=((EM=function(){function e(){is(this,e)}return as(e,null,[{key:"demandeToRequestForms",value:function(e){var t=new BM;return"QS"===e.codeModule?(t.requestNature=this.getRequestNature(e),t.qsApplicant=this.getQSApplicant(e),t.qsDetails=this.getQSDetails(e),t.qsSummary=this.getQSSummary(e),t.qsLocation=this.getQSLocation(e)):(t.permitType=this.getPermitType(e),t.property=this.getProperty(e),t.applicant=this.getApplicant(e),"UR"===e.codeModule?t.urDescription=this.getUrDescription(e):"PL"===e.codeModule?t.plDescription=this.getPlDescription(e):t.workDescription=this.getWorkDescription(e),t.formAnswer=this.getFormAnswer(e),t.documents=this.getDocuments(e),t.summary=this.getSummary(e),t.responseId=this.getResponseId(e)),t.requestType=this.getRequestType(e),t.batchId=this.getBatchId(e),t.followUpNo=this.getFollowUpNo(e),t.requestId=this.getRequestId(e),t.produit=this.getProduit(e),t}},{key:"requestFormsToDemande",value:function(e,t,n){var r,i,o,a,s,l,u,c,d,h,p,f,m,g,v,y,b,_,w,C,x,S,P,k,E,A,I,T,O,R,V,D,N,L,F,M,q,j,B,z,U,H,Q,W,G,$,J,Y,K,Z=new FM,X=e.applicant,ee=e.qsApplicant,te=e.qsLocation,ne=e.property,re=e.workDescription,ie=e.documents,oe=e.qsDetails,ae=e.summary,se=e.qsSummary,le=e.urDescription,ue=e.plDescription;if(Z.codeModule=e.requestType.codeModule,void 0!==(null===(r=e.permitType)||void 0===r?void 0:r.codeType)?Z.codeType=e.permitType.codeType:void 0!==(null===(i=e.requestNature)||void 0===i?void 0:i.codeNature)&&(Z.codeNature=e.requestNature.codeNature,Z.demandeNature=e.requestNature),void 0!==X?(Z.prenomRequerant=X.applicantFirstName,Z.nomRequerant=X.applicantLastName,Z.adresseRequerant=null===(o=X.applicantAddress)||void 0===o?void 0:o.address,Z.villeRequerant=null===(a=X.applicantAddress)||void 0===a?void 0:a.city,Z.codePostalRequerant=null===(s=X.applicantAddress)||void 0===s?void 0:s.zipCode,Z.telephoneRequerant=X.applicantPhoneNumber,Z.courrielRequerant=X.applicantEmail):void 0!==ee&&(Z.prenomRequerant=ee.applicantFirstName,Z.nomRequerant=ee.applicantLastName,Z.adresseRequerant=null===(l=ee.applicantAddress)||void 0===l?void 0:l.address,Z.villeRequerant=null===(u=ee.applicantAddress)||void 0===u?void 0:u.city,Z.codePostalRequerant=null===(c=ee.applicantAddress)||void 0===c?void 0:c.zipCode,Z.telephoneRequerant=ee.applicantPhoneNumber,Z.telephoneAutre1=ee.applicantOtherPhoneNumber,Z.courrielRequerant=ee.applicantEmail,Z.isResident=null===(d=ee.applicantAddress)||void 0===d?void 0:d.isResident),void 0!==ne){switch(Z.matriculeEmplacement=null===(h=ne.ownerGroup)||void 0===h?void 0:h.ownerSelectedRegistrationNumber,Z.noCiviqueEmplacement=null===(p=ne.addressGroup)||void 0===p?void 0:p.civicNumber,Z.noApptEmplacement=null===(f=ne.addressGroup)||void 0===f?void 0:f.apartment,Z.designaEmplacement=null===(g=null===(m=ne.addressGroup)||void 0===m?void 0:m.searchStreet)||void 0===g?void 0:g.designa,Z.codeLienEmplacement=null===(y=null===(v=ne.addressGroup)||void 0===v?void 0:v.searchStreet)||void 0===y?void 0:y.lien,Z.voiePubliqueEmplacement=null===(_=null===(b=ne.addressGroup)||void 0===b?void 0:b.searchStreet)||void 0===_?void 0:_.voie,void 0===(null===(C=null===(w=ne.addressGroup)||void 0===w?void 0:w.searchStreet)||void 0===C?void 0:C.voie)&&(Z.voiePubliqueEmplacement=null===(x=ne.ownerGroup)||void 0===x?void 0:x.ownerAddress,Z.noCiviqueEmplacement&&(null===(S=ne.ownerGroup)||void 0===S?void 0:S.ownerAddress)&&(Z.voiePubliqueEmplacement=Z.voiePubliqueEmplacement.replace(Z.noCiviqueEmplacement,"").trim())),ne.searchMode){case"address":Z.propertySearchMode="0";break;case"registrationNumber":Z.propertySearchMode="1";break;case"landNumber":Z.propertySearchMode="2"}Z.landNumber=ne.landNumberGroup.searchLandNumber.lotReno}else void 0!==te&&(Z.noCiviqueEmplacement=null==te?void 0:te.civicNumber,Z.designaEmplacement=null===(P=null==te?void 0:te.searchStreet)||void 0===P?void 0:P.designa,Z.codeLienEmplacement=null===(k=null==te?void 0:te.searchStreet)||void 0===k?void 0:k.lien,Z.voiePubliqueEmplacement=null===(E=null==te?void 0:te.searchStreet)||void 0===E?void 0:E.voie,Z.coordonneeX=null==te?void 0:te.xCoordinate,Z.coordonneeY=null==te?void 0:te.yCoordinate,Z.matriculeEmplacement=null==te?void 0:te.registrationNumber,Z.noApptEmplacement=null==te?void 0:te.apartment);if(re&&(Z.description=null===(A=re.workDescriptionGroup)||void 0===A?void 0:A.workDescription,(null===(I=re.workDescriptionGroup)||void 0===I?void 0:I.workStartDate)&&(Z.dateTravaux=re.workDescriptionGroup.workStartDate),(null===(T=re.workDescriptionGroup)||void 0===T?void 0:T.workCost)&&(Z.valeurTravaux=Number(re.workDescriptionGroup.workCost)),(null===(O=re.workDescriptionGroup)||void 0===O?void 0:O.workEndDate)&&(Z.dateFinTravaux=re.workDescriptionGroup.workEndDate),re.hasLicensedContractor&&(Z.nomEntr=null===(R=re.licensedContractorGroup)||void 0===R?void 0:R.contractorName,Z.telEntr=null===(V=re.licensedContractorGroup)||void 0===V?void 0:V.contractorPhoneNumber,Z.rbq=null===(D=re.licensedContractorGroup)||void 0===D?void 0:D.contractorRBQNumber,Z.neq=null===(N=re.licensedContractorGroup)||void 0===N?void 0:N.contractorNEQNumber,Z.emailEntr=null===(L=re.licensedContractorGroup)||void 0===L?void 0:L.contractorEmail,Z.villeEntr=null===(F=re.licensedContractorGroup)||void 0===F?void 0:F.contractorCity,Z.adrEntr=null===(M=re.licensedContractorGroup)||void 0===M?void 0:M.contractorAddress,Z.cpEntr=null===(q=re.licensedContractorGroup)||void 0===q?void 0:q.contractorPostalCode.replace(/\s+/g,""))),void 0!==ie?Z.commCitoyen=ie.comment:void 0!==oe&&(Z.description=oe.description),"UR"===e.requestType.codeModule&&void 0!==le&&(Z.description=le.urDescriptionGroup.urDescription,Z.commCitoyen=le.urDescriptionGroup.urReasons),"PL"===e.requestType.codeModule&&void 0!==ue&&(Z.description=ue.plDescriptionGroup.plDescription,Z.nomEntr=null===(j=ue.surveyorGroup)||void 0===j?void 0:j.surveyorName,Z.telEntr=null===(B=ue.surveyorGroup)||void 0===B?void 0:B.surveyorPhoneNumber,Z.autreTelEntr=null===(z=ue.surveyorGroup)||void 0===z?void 0:z.surveyorOtherPhoneNumber,Z.villeEntr=null===(U=ue.surveyorGroup)||void 0===U?void 0:U.surveyorCity,Z.adrEntr=null===(H=ue.surveyorGroup)||void 0===H?void 0:H.surveyorAddress,Z.cpEntr=null===(Q=ue.surveyorGroup)||void 0===Q?void 0:Q.surveyorPostalCode.replace(/\s+/g,"")),Z.batchId=e.batchId,Z.localLanguage=t,Z.numeroSuivi=e.followUpNo,Z.id=e.requestId,Z.produit=e.produit,void 0!==ae?(Z.soumise=ae.isSubmitted,ae.followUpModeEmail&&ae.followUpEmail&&(Z.suiviCourriel=ae.followUpEmail),ae.followUpModePhone&&ae.followUpPhone&&(Z.suiviTelephone=ae.followUpPhone),Z.langueRequerant=ae.followUpLanguage):void 0!==se?(Z.soumise=se.isSubmitted,se.followUpModeEmail&&se.followUpEmail&&(Z.suiviCourriel=se.followUpEmail),se.followUpModePhone&&se.followUpPhone&&(Z.suiviTelephone=se.followUpPhone),Z.langueRequerant=se.followUpLanguage):(Z.soumise=!1,Z.langueRequerant=t),Z.demandeType=e.requestType,Z.permisType=e.permitType,(null===(W=e.permitType)||void 0===W?void 0:W.idFormulaire)&&(Z.formulaire=new MM,Z.formulaire.id=e.permitType.idFormulaire,Z.formulaire.inactif="0"),void 0!==ne&&(Z.proprietaire=new qM,"/edit"===n&&(Z.proprietaire.id=null===(G=ne.ownerGroup)||void 0===G?void 0:G.owner),Z.proprietaire.nomPrenom=null===($=ne.ownerGroup)||void 0===$?void 0:$.ownerText,Z.proprietaire.adresse=null===(J=ne.ownerGroup)||void 0===J?void 0:J.ownerAddress,Z.proprietaire.ville=null===(Y=ne.ownerGroup)||void 0===Y?void 0:Y.ownerCity,Z.proprietaire.codePostal=null===(K=ne.ownerGroup)||void 0===K?void 0:K.ownerPostalCode),e.formAnswer&&(Z.reponse=new jM,Z.reponse.json=JSON.stringify(e.formAnswer),void 0!==e.responseId&&(Z.reponse.id=e.responseId)),localStorage.getItem("requester")){var ce=JSON.parse(localStorage.getItem("requester"));ce.DelPelUserMappingKeyValue&&(Z.idCitoyen=ce.DelPelUserMappingKeyValue)}return Z}},{key:"getPermitType",value:function(e){return null==e?void 0:e.permisType}},{key:"getRequestNature",value:function(e){return null==e?void 0:e.demandeNature}},{key:"getRequestType",value:function(e){return null==e?void 0:e.demandeType}},{key:"getProperty",value:function(e){var t,n,r,i,o,a,s;switch(null==e?void 0:e.propertySearchMode){case"0":s="address";break;case"1":s="registrationNumber";break;case"2":s="landNumber";break;default:s="address"}var l={id:0,voieComplet:null==e?void 0:e.adresseEmplacement,designa:null==e?void 0:e.designaEmplacement,lien:null==e?void 0:e.codeLienEmplacement,voie:null==e?void 0:e.voiePubliqueEmplacement,codeGen:null===(t=null==e?void 0:e.codegenEmplacement)||void 0===t?void 0:t.toString(),codeLien:null==e?void 0:e.codeLienEmplacement,discriminant:""};return{addressGroup:{apartment:null==e?void 0:e.noApptEmplacement,civicNumber:null==e?void 0:e.noCiviqueEmplacement,searchStreet:l,suffix:null==e?void 0:e.civiqueAbEmplacement},registrationNumberGroup:{searchRegistrationNumber:null==e?void 0:e.matriculeEmplacement},landNumberGroup:{searchLandNumber:{matricule:null==e?void 0:e.matriculeEmplacement,lotReno:null==e?void 0:e.landNumber}},ownerGroup:{owner:null===(n=null==e?void 0:e.proprietaire)||void 0===n?void 0:n.id,ownerAddress:null===(r=null==e?void 0:e.proprietaire)||void 0===r?void 0:r.adresse,ownerCity:null===(i=null==e?void 0:e.proprietaire)||void 0===i?void 0:i.ville,ownerPostalCode:null===(o=null==e?void 0:e.proprietaire)||void 0===o?void 0:o.codePostal,ownerSelectedRegistrationNumber:null==e?void 0:e.matriculeEmplacement,ownerText:null===(a=null==e?void 0:e.proprietaire)||void 0===a?void 0:a.nomPrenom},searchMode:s}}},{key:"getApplicant",value:function(e){return{applicantAddress:{address:null==e?void 0:e.adresseRequerant,city:null==e?void 0:e.villeRequerant,zipCode:null==e?void 0:e.codePostalRequerant},applicantEmail:null==e?void 0:e.courrielRequerant,applicantEmailConfirmation:null==e?void 0:e.courrielRequerant,applicantFirstName:null==e?void 0:e.prenomRequerant,applicantLastName:null==e?void 0:e.nomRequerant,applicantPhoneNumber:null==e?void 0:e.telephoneRequerant}}},{key:"getQSApplicant",value:function(e){var t={applicantAddress:{address:null==e?void 0:e.adresseRequerant,city:null==e?void 0:e.villeRequerant,zipCode:null==e?void 0:e.codePostalRequerant,streetName:null==e?void 0:e.street,apartment:null==e?void 0:e.noApptRequerant,civicNumber:null==e?void 0:e.noCiviqueRequerant,searchStreet:null,suffix:null==e?void 0:e.noCiviqueSuffixRequerant,googleCompleteAddress:"",isResident:null==e?void 0:e.isResident,registrationNumber:""},applicantEmail:null==e?void 0:e.courrielRequerant,applicantEmailConfirmation:null==e?void 0:e.courrielRequerant,applicantFirstName:null==e?void 0:e.prenomRequerant,applicantLastName:null==e?void 0:e.nomRequerant,applicantPhoneNumber:null==e?void 0:e.telephoneRequerant,applicantOtherPhoneNumber:null==e?void 0:e.telephoneAutre1};if(e.adresseVoiePubliqueRequerant){var n=Object.values(e.adresseVoiePubliqueRequerant),r=Object.keys(e.adresseVoiePubliqueRequerant);n&&(t.applicantAddress.searchStreet=n[0]),r&&r.length>0&&""!==r[0]&&(t.applicantAddress.isResident=!0)}return t}},{key:"getQSLocation",value:function(e){var t,n={id:0,voieComplet:null==e?void 0:e.adresseEmplacement,designa:null==e?void 0:e.designaEmplacement,lien:null==e?void 0:e.codeLienEmplacement,voie:null==e?void 0:e.voiePubliqueEmplacement,codeGen:null===(t=null==e?void 0:e.codegenEmplacement)||void 0===t?void 0:t.toString(),codeLien:null==e?void 0:e.codeLienEmplacement,discriminant:""};return{civicNumber:null==e?void 0:e.noCiviqueEmplacement,searchStreet:n,xCoordinate:null==e?void 0:e.coordonneeX,yCoordinate:null==e?void 0:e.coordonneeY,registrationNumber:null==e?void 0:e.matriculeEmplacement,apartment:null==e?void 0:e.noApptEmplacement}}},{key:"getWorkDescription",value:function(e){return{workDescriptionGroup:{workDescription:null==e?void 0:e.description,workStartDate:null==e?void 0:e.dateTravaux,workEndDate:null==e?void 0:e.dateFinTravaux,workCost:null==e?void 0:e.valeurTravaux},licensedContractorGroup:{contractor:null==e?void 0:e.nomEntr,contractorName:null==e?void 0:e.nomEntr,contractorAddress:null==e?void 0:e.adrEntr,contractorCity:null==e?void 0:e.villeEntr,contractorPostalCode:null==e?void 0:e.cpEntr,contractorPhoneNumber:null==e?void 0:e.telEntr,contractorRBQNumber:null==e?void 0:e.rbq,contractorNEQNumber:null==e?void 0:e.neq,contractorEmail:null==e?void 0:e.emailEntr},hasLicensedContractor:!!(null==e?void 0:e.nomEntr)}}},{key:"getUrDescription",value:function(e){return{urDescriptionGroup:{urDescription:null==e?void 0:e.description,urReasons:null==e?void 0:e.commCitoyen}}}},{key:"getPlDescription",value:function(e){return{plDescriptionGroup:{plDescription:null==e?void 0:e.description},surveyorGroup:{surveyor:null==e?void 0:e.nomEntr,surveyorName:null==e?void 0:e.nomEntr,surveyorAddress:null==e?void 0:e.adrEntr,surveyorCity:null==e?void 0:e.villeEntr,surveyorPostalCode:null==e?void 0:e.cpEntr,surveyorPhoneNumber:null==e?void 0:e.telEntr,surveyorOtherPhoneNumber:null==e?void 0:e.autreTelEntr}}}},{key:"getFormAnswer",value:function(e){var t;return null===(t=null==e?void 0:e.reponse)||void 0===t?void 0:t.json}},{key:"getDocuments",value:function(e){var t=[];return null==e||e.fichiers.forEach(function(n){var r;(null==n?void 0:n.id)===(null==e?void 0:e.demandePDFId)||(null==n?void 0:n.id)===(null==e?void 0:e.cartonCertificatPDFId)||4===(null==n?void 0:n.codeEnregistrement)||(null===(r=null==e?void 0:e.factures)||void 0===r?void 0:r.some(function(e){return(null==e?void 0:e.idFichier)===(null==n?void 0:n.id)}))||t.push(null==n?void 0:n.nomFichierOriginal)}),{comment:null==e?void 0:e.commCitoyen,listOfDocuments:t,filesToDelete:[]}}},{key:"getQSDetails",value:function(e){var t=[];return null==e||e.fichiers.forEach(function(e){t.push(null==e?void 0:e.nomFichierOriginal)}),{description:null==e?void 0:e.description,listOfDocuments:t,filesToDelete:[]}}},{key:"getSummary",value:function(e){return{followUpEmail:null==e?void 0:e.suiviCourriel,followUpModeEmail:""!==(null==e?void 0:e.suiviCourriel)&&null!==(null==e?void 0:e.suiviCourriel),followUpPhone:null==e?void 0:e.suiviTelephone,followUpModePhone:""!==(null==e?void 0:e.suiviTelephone)&&null!==(null==e?void 0:e.suiviTelephone),followUpLanguage:null==e?void 0:e.langueRequerant,isSubmitted:null==e?void 0:e.soumise}}},{key:"getQSSummary",value:function(e){return{followUpEmail:null==e?void 0:e.suiviCourriel,followUpModeEmail:""!==(null==e?void 0:e.suiviCourriel)&&null!==(null==e?void 0:e.suiviCourriel),followUpPhone:null==e?void 0:e.suiviTelephone,followUpModePhone:""!==(null==e?void 0:e.suiviTelephone)&&null!==(null==e?void 0:e.suiviTelephone),followUpLanguage:null==e?void 0:e.langueRequerant,isSubmitted:null==e?void 0:e.soumise}}},{key:"getBatchId",value:function(e){return null==e?void 0:e.batchId}},{key:"getFollowUpNo",value:function(e){return null==e?void 0:e.numeroSuivi}},{key:"getRequestId",value:function(e){return null==e?void 0:e.id}},{key:"getProduit",value:function(e){return null==e?void 0:e.produit}},{key:"getResponseId",value:function(e){var t;return null===(t=null==e?void 0:e.reponse)||void 0===t?void 0:t.id}},{key:"decodeRequest",value:function(e){try{var t=decodeURIComponent(escape(atob(e))).split(":");return{numeroSuivi:t[0],nomRequerant:t[1],idCitoyen:null}}catch(VZ){return}}},{key:"encodeRequest",value:function(e){return btoa(e.numeroSuivi+":"+e.nomRequerant)}}]),e}()).\u0275fac=function(e){return new(e||EM)},EM.\u0275prov=dl({token:EM,factory:EM.\u0275fac}),EM),UM=function(e){return e.Error="ERROR",e.Cancelled="CANCELLED",e.Accepted="ACCEPTED",e}({}),HM=function(e){return e[e.Loading=0]="Loading",e[e.Error=1]="Error",e[e.Ready=2]="Ready",e[e.Empty=3]="Empty",e}({}),QM=function e(){is(this,e)},WM=function e(){is(this,e)},GM=function(){function e(t){var n=this;is(this,e),this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){n.headers=new Map,t.split("\n").forEach(function(e){var t=e.indexOf(":");if(t>0){var r=e.slice(0,t),i=r.toLowerCase(),o=e.slice(t+1).trim();n.maybeSetNormalizedName(r,i),n.headers.has(i)?n.headers.get(i).push(o):n.headers.set(i,[o])}})}:function(){n.headers=new Map,Object.keys(t).forEach(function(e){var r=t[e],i=e.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(n.headers.set(i,r),n.maybeSetNormalizedName(e,i))})}:this.headers=new Map}return as(e,[{key:"has",value:function(e){return this.init(),this.headers.has(e.toLowerCase())}},{key:"get",value:function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(e){return this.init(),this.headers.get(e.toLowerCase())||null}},{key:"append",value:function(e,t){return this.clone({name:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({name:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({name:e,value:t,op:"d"})}},{key:"maybeSetNormalizedName",value:function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}},{key:"init",value:function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(e){return t.applyUpdate(e)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach(function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))})}},{key:"clone",value:function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}},{key:"applyUpdate",value:function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var r=("a"===e.op?this.headers.get(t):void 0)||[];r.push.apply(r,Ha(n)),this.headers.set(t,r);break;case"d":var i=e.value;if(i){var o=this.headers.get(t);if(!o)return;0===(o=o.filter(function(e){return-1===i.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}},{key:"forEach",value:function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return e(t.normalizedNames.get(n),t.headers.get(n))})}}]),e}(),$M=function(){function e(){is(this,e)}return as(e,[{key:"encodeKey",value:function(e){return JM(e)}},{key:"encodeValue",value:function(e){return JM(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function JM(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var YM=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(is(this,e),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new $M,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){var n=new Map;return e.length>0&&e.split("&").forEach(function(e){var r=e.indexOf("="),i=Ua(-1==r?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,r)),t.decodeValue(e.slice(r+1))],2),o=i[0],a=i[1],s=n.get(o)||[];s.push(a),n.set(o,s)}),n}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(function(e){var r=n.fromObject[e];t.map.set(e,Array.isArray(r)?r:[r])})):this.map=null}return as(e,[{key:"has",value:function(e){return this.init(),this.map.has(e)}},{key:"get",value:function(e){this.init();var t=this.map.get(e);return t?t[0]:null}},{key:"getAll",value:function(e){return this.init(),this.map.get(e)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(e,t){return this.clone({param:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({param:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({param:e,value:t,op:"d"})}},{key:"toString",value:function(){var e=this;return this.init(),this.keys().map(function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map(function(t){return n+"="+e.encoder.encodeValue(t)}).join("&")}).filter(function(e){return""!==e}).join("&")}},{key:"clone",value:function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n}},{key:"init",value:function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return e.map.set(t,e.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=this.updates=null)}}]),e}();function KM(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function ZM(e){return"undefined"!=typeof Blob&&e instanceof Blob}function XM(e){return"undefined"!=typeof FormData&&e instanceof FormData}var eq=function(){function e(t,n,r,i){var o;if(is(this,e),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.params&&(this.params=o.params)),this.headers||(this.headers=new GM),this.params){var a=this.params.toString();if(0===a.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s<n.length-1?"&":"")+a}}else this.params=new YM,this.urlWithParams=n}return as(e,[{key:"serializeBody",value:function(){return null===this.body?null:KM(this.body)||ZM(this.body)||XM(this.body)||"string"==typeof this.body?this.body:this.body instanceof YM?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}},{key:"detectContentTypeHeader",value:function(){return null===this.body||XM(this.body)?null:ZM(this.body)?this.body.type||null:KM(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof YM?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,a=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,l=t.headers||this.headers,u=t.params||this.params;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce(function(e,n){return e.set(n,t.setHeaders[n])},l)),t.setParams&&(u=Object.keys(t.setParams).reduce(function(e,n){return e.set(n,t.setParams[n])},u)),new e(n,r,o,{params:u,headers:l,reportProgress:s,responseType:i,withCredentials:a})}}]),e}(),tq=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({}),nq=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";is(this,e),this.headers=t.headers||new GM,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},rq=function(e){Ka(n,e);var t=Xa(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return is(this,n),(e=t.call(this,r)).type=tq.ResponseHeader,e}return as(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(nq),iq=function(e){Ka(n,e);var t=Xa(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return is(this,n),(e=t.call(this,r)).type=tq.Response,e.body=void 0!==r.body?r.body:null,e}return as(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(nq),oq=function(e){Ka(n,e);var t=Xa(n);function n(e){var r;return is(this,n),(r=t.call(this,e,0,"Unknown Error")).name="HttpErrorResponse",r.ok=!1,r.message=r.status>=200&&r.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for ".concat(e.url||"(unknown url)",": ").concat(e.status," ").concat(e.statusText),r.error=e.error||null,r}return n}(nq);function aq(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var sq,lq,uq,cq,dq,hq,pq,fq,mq,gq,vq,yq,bq,_q,wq=((sq=function(){function e(t){is(this,e),this.handler=t}return as(e,[{key:"request",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof eq)n=e;else{var o=void 0;o=i.headers instanceof GM?i.headers:new GM(i.headers);var a=void 0;i.params&&(a=i.params instanceof YM?i.params:new YM({fromObject:i.params})),n=new eq(e,t,void 0!==i.body?i.body:null,{headers:o,params:a,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}var s=Ok(n).pipe(bV(function(e){return r.handler.handle(e)}));if(e instanceof eq||"events"===i.observe)return s;var l=s.pipe(Qk(function(e){return e instanceof iq}));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(Ms(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return l.pipe(Ms(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return l.pipe(Ms(function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return l.pipe(Ms(function(e){return e.body}))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(i.observe,"}"))}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",e,t)}},{key:"head",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",e,t)}},{key:"jsonp",value:function(e,t){return this.request("JSONP",e,{params:(new YM).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",e,t)}},{key:"patch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",e,aq(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,aq(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,aq(n,t))}}]),e}()).\u0275fac=function(e){return new(e||sq)(md(QM))},sq.\u0275prov=dl({token:sq,factory:sq.\u0275fac}),sq),Cq=function(){function e(t,n){is(this,e),this.next=t,this.interceptor=n}return as(e,[{key:"handle",value:function(e){return this.interceptor.intercept(e,this.next)}}]),e}(),xq=new $c("HTTP_INTERCEPTORS"),Sq=((lq=function(){function e(){is(this,e)}return as(e,[{key:"intercept",value:function(e,t){return t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||lq)},lq.\u0275prov=dl({token:lq,factory:lq.\u0275fac}),lq),Pq=/^\)\]\}',?\n/,kq=function e(){is(this,e)},Eq=((cq=function(){function e(){is(this,e)}return as(e,[{key:"build",value:function(){return new XMLHttpRequest}}]),e}()).\u0275fac=function(e){return new(e||cq)},cq.\u0275prov=dl({token:cq,factory:cq.\u0275fac}),cq),Aq=((uq=function(){function e(t){is(this,e),this.xhrFactory=t}return as(e,[{key:"handle",value:function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new ws(function(n){var r=t.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach(function(e,t){return r.setRequestHeader(e,t.join(","))}),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var i=e.detectContentTypeHeader();null!==i&&r.setRequestHeader("Content-Type",i)}if(e.responseType){var o=e.responseType.toLowerCase();r.responseType="json"!==o?o:"text"}var a=e.serializeBody(),s=null,l=function(){if(null!==s)return s;var t=1223===r.status?204:r.status,n=r.statusText||"OK",i=new GM(r.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new rq({headers:i,status:t,statusText:n,url:o})},u=function(){var t=l(),i=t.headers,o=t.status,a=t.statusText,s=t.url,u=null;204!==o&&(u=void 0===r.response?r.responseText:r.response),0===o&&(o=u?200:0);var c=o>=200&&o<300;if("json"===e.responseType&&"string"==typeof u){var d=u;u=u.replace(Pq,"");try{u=""!==u?JSON.parse(u):null}catch(h){u=d,c&&(c=!1,u={error:h,text:u})}}c?(n.next(new iq({body:u,headers:i,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new oq({error:u,headers:i,status:o,statusText:a,url:s||void 0}))},c=function(e){var t=l().url,i=new oq({error:e,status:r.status||0,statusText:r.statusText||"Unknown Error",url:t||void 0});n.error(i)},d=!1,h=function(t){d||(n.next(l()),d=!0);var i={type:tq.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),"text"===e.responseType&&r.responseText&&(i.partialText=r.responseText),n.next(i)},p=function(e){var t={type:tq.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return r.addEventListener("load",u),r.addEventListener("error",c),e.reportProgress&&(r.addEventListener("progress",h),null!==a&&r.upload&&r.upload.addEventListener("progress",p)),r.send(a),n.next({type:tq.Sent}),function(){r.removeEventListener("error",c),r.removeEventListener("load",u),e.reportProgress&&(r.removeEventListener("progress",h),null!==a&&r.upload&&r.upload.removeEventListener("progress",p)),r.readyState!==r.DONE&&r.abort()}})}}]),e}()).\u0275fac=function(e){return new(e||uq)(md(kq))},uq.\u0275prov=dl({token:uq,factory:uq.\u0275fac}),uq),Iq=new $c("XSRF_COOKIE_NAME"),Tq=new $c("XSRF_HEADER_NAME"),Oq=function e(){is(this,e)},Rq=((mq=function(){function e(t,n,r){is(this,e),this.doc=t,this.platform=n,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return as(e,[{key:"getToken",value:function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=T_(e,this.cookieName),this.lastCookieString=e),this.lastToken}}]),e}()).\u0275fac=function(e){return new(e||mq)(md(Cb),md(Iy),md(Iq))},mq.\u0275prov=dl({token:mq,factory:mq.\u0275fac}),mq),Vq=((fq=function(){function e(t,n){is(this,e),this.tokenService=t,this.headerName=n}return as(e,[{key:"intercept",value:function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var r=this.tokenService.getToken();return null===r||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,r)})),t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||fq)(md(Oq),md(Tq))},fq.\u0275prov=dl({token:fq,factory:fq.\u0275fac}),fq),Dq=((pq=function(){function e(t,n){is(this,e),this.backend=t,this.injector=n,this.chain=null}return as(e,[{key:"handle",value:function(e){if(null===this.chain){var t=this.injector.get(xq,[]);this.chain=t.reduceRight(function(e,t){return new Cq(e,t)},this.backend)}return this.chain.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||pq)(md(WM),md(kf))},pq.\u0275prov=dl({token:pq,factory:pq.\u0275fac}),pq),Nq=((hq=function(){function e(){is(this,e)}return as(e,null,[{key:"disable",value:function(){return{ngModule:e,providers:[{provide:Vq,useClass:Sq}]}}},{key:"withOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.cookieName?{provide:Iq,useValue:t.cookieName}:[],t.headerName?{provide:Tq,useValue:t.headerName}:[]]}}}]),e}()).\u0275mod=Wl({type:hq}),hq.\u0275inj=hl({factory:function(e){return new(e||hq)},providers:[Vq,{provide:xq,useExisting:Vq,multi:!0},{provide:Oq,useClass:Rq},{provide:Iq,useValue:"XSRF-TOKEN"},{provide:Tq,useValue:"X-XSRF-TOKEN"}]}),hq),Lq=((dq=function e(){is(this,e)}).\u0275mod=Wl({type:dq}),dq.\u0275inj=hl({factory:function(e){return new(e||dq)},providers:[wq,{provide:QM,useClass:Dq},Aq,{provide:WM,useExisting:Aq},Eq,{provide:kq,useExisting:Eq}],imports:[[Nq.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),dq),Fq=function(e){return e[e.Cardboard=0]="Cardboard",e[e.RequestPdf=1]="RequestPdf",e[e.Invoice=2]="Invoice",e[e.AdditionnalDocument=3]="AdditionnalDocument",e}({}),Mq=((_q=function(){function e(t){is(this,e),this.http=t,this.citiesConfigs=[]}return as(e,[{key:"getCitiesConfigs",value:function(){return this.citiesConfigs}},{key:"getUrlConfig",value:function(){return this.urlConfig}},{key:"load",value:function(e){var t=this;return new Promise(function(n){t.http.get(e).subscribe(function(e){t.citiesConfigs=e.cities,t.urlConfig=e.url,n()})})}}]),e}()).\u0275fac=function(e){return new(e||_q)(md(wq))},_q.\u0275prov=dl({token:_q,factory:_q.\u0275fac}),_q),qq=((bq=function(){function e(t){is(this,e),this.configService=t,this.cityCode=this.findCityCode()}return as(e,[{key:"getCityCode",value:function(){return this.cityCode}},{key:"findCityCode",value:function(){var e=this.findCityConfigBySubdomain(this.getSubdomain());return e?(localStorage.setItem("city_code",e.cityCode.toString()),e.cityCode):(console.error("This subdomain is not linked to a city code."),-1)}},{key:"findCityConfig",value:function(){var e=this;return this.configService.getCitiesConfigs().filter(function(t){return t.subdomain===e.getSubdomain()})[0]}},{key:"findCityConfigBySubdomain",value:function(e){return this.configService.getCitiesConfigs().filter(function(t){return t.subdomain===e})[0]}},{key:"getSubdomain",value:function(){return window.location.host.split(".")[0]}}]),e}()).\u0275fac=function(e){return new(e||bq)(md(Mq))},bq.\u0275prov=dl({token:bq,factory:bq.\u0275fac}),bq),jq=((yq=function(){function e(t,n,r){is(this,e),this.http=t,this.envHelper=n,this.configService=r,this.cityConfig=this.envHelper.findCityConfig(),this.isFetchingToken=!1}return as(e,[{key:"getPelToken",value:function(){var e=this;return new ws(function(t){(null==e.accessToken||new Date>=new Date(e.accessToken.emitDate.getTime()+1e3*(e.accessToken.expires_in-5)))&&!e.isFetchingToken?(e.isFetchingToken=!0,e.getPelApiToken().subscribe(function(n){e.accessToken=n,e.accessToken.emitDate=new Date,e.isFetchingToken=!1,console.log("new token fetched"),t.next(e.accessToken.access_token),t.complete()},function(n){e.isFetchingToken=!1,console.log("token fetching interrupted by an unexpected error"),t.error(n)})):e.getPreExistingToken(t)})}},{key:"getPelApiToken",value:function(){var e,t=this.cityConfig.apiClientId+":"+this.cityConfig.apiClientSecret,n=(new GM).set("Authorization","basic "+btoa(t)).set("Content-Type","application/x-www-form-urlencoded"),r=(new YM).set("username",this.cityConfig.apiUserName).set("password",this.cityConfig.apiPassword).set("grant_type","password");return this.http.post(null===(e=this.configService.getUrlConfig())||void 0===e?void 0:e.auth_url,r,{headers:n})}},{key:"getPreExistingToken",value:function(e){var t=this;this.isFetchingToken?(console.log("previous token was not finished fetching, waiting 100 ms...."),setTimeout(function(){t.getPreExistingToken(e)},100)):(console.log("previous token was finished fetching, setting value...."),e.next(this.accessToken.access_token),e.complete())}}]),e}()).\u0275fac=function(e){return new(e||yq)(md(wq),md(qq),md(Mq))},yq.\u0275prov=dl({token:yq,factory:yq.\u0275fac}),yq),Bq=((vq=function(){function e(t,n,r,i){var o;is(this,e),this.http=t,this.localeId=n,this.authService=r,this.configService=i,this.baseUrl=(null===(o=this.configService.getUrlConfig())||void 0===o?void 0:o.api_url)+"pel/"}return as(e,[{key:"getTokenHeader",value:function(){var e=this;return new ws(function(t){e.authService.getPelToken().subscribe(function(e){t.next((new GM).set("Authorization","Bearer "+e)),t.complete()},function(e){t.error(e)})})}},{key:"getAllActivePermitTypes",value:function(e){return this.callPelApi("get",this.baseUrl+"GetAllActivePermitTypes?codeModule="+e)}},{key:"getAllActiveRequestNatures",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllActiveDemandeNatures")}},{key:"getAllActiveNatureServices",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllActiveNatureServices")}},{key:"getAllStreetsFromRole",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllStreetsFromRole")}},{key:"getAllTaxMapOrLandNumbers",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllTaxMapOrLandNumbers")}},{key:"getAllRequestTypes",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllRequestTypes")}},{key:"getListOfOwnersByAddress",value:function(e){return this.callPelApi("post",this.baseUrl+"GetListOfOwnersByAddress",{body:e})}},{key:"getListOfOwnersByRegistrationNumber",value:function(e){return this.callPelApi("get",this.baseUrl+"GetListOfOwnersByRegistrationNumber?registrationNumber="+e)}},{key:"addUploadedFile",value:function(e){return this.callPelApi("post",this.baseUrl+"AddUploadedFile",{body:e})}},{key:"deleteUploadedFile",value:function(e){return this.callPelApi("delete",this.baseUrl+"DeleteUploadedFile",{body:e})}},{key:"deleteAllUploadedFiles",value:function(e){return this.callPelApi("delete",this.baseUrl+"DeleteAllUploadedFiles/?batchid="+e)}},{key:"getCityInfos",value:function(){return this.callPelApi("get",this.baseUrl+"GetCityInfos")}},{key:"getFormContentByFormId",value:function(e){return this.callPelApi("get",this.baseUrl+"GetFormContentByFormId?codificationFormulaire="+e)}},{key:"addRequest",value:function(e){return this.callPelApi("post",this.baseUrl+"AddRequest",{body:e})}},{key:"getRequestByFollowUpNumberLastName",value:function(e){return this.callPelApi("post",this.baseUrl+"GetRequestByFollowUpNumberLastName",{body:e})}},{key:"getChoicesByURL",value:function(e,t){var n=(new YM).set("search",e).set("locale",t);return this.callPelApi("get",this.baseUrl+"GetChoicesByURL",{params:n})}},{key:"getRequestStateResourceByModule",value:function(e,t){var n=(new YM).set("codeModule",e).set("language",t);return this.callPelApi("get",this.baseUrl+"GetRequestStateResourceByModule",{params:n})}},{key:"createRequestPayment",value:function(e,t){var n=(new YM).set("callbackEndpoint",t).set("language",this.localeId).set("externalCallbackEndpoint",t.match("pelV2Url")?t:null);return this.callPelApi("post",this.baseUrl+"CreateRequestPayment",{body:e,params:n})}},{key:"confirmPaymentSuccess",value:function(e){var t=(new YM).set("paymentProcessReferenceNumber",e);return this.callPelApi("get",this.baseUrl+"ConfirmPaymentSuccess",{params:t})}},{key:"getFileDataByFileId",value:function(e,t){var n=(new YM).set("fileId",e.toString());return this.callPelApi("get",t===Fq.Cardboard?this.baseUrl+"GetPermitCartonPdfByFileId":this.baseUrl+"GetFileDataByFileId",{params:n})}},{key:"addAndPayRequest",value:function(e,t){var n=(new YM).set("callbackEndpoint",t).set("language",this.localeId).set("externalCallbackEndpoint",t.match("pelV2Url")?t:null);return this.callPelApi("post",this.baseUrl+"AddAndPayRequest",{body:e,params:n})}},{key:"updateRequest",value:function(e,t){return this.callPelApi("post",this.baseUrl+"UpdateRequest",{body:e})}},{key:"updateAndPayRequest",value:function(e,t){var n=(new YM).set("callbackEndpoint",t).set("language",this.localeId).set("externalCallbackEndpoint",t.match("pelV2Url")?t:null);return this.callPelApi("post",this.baseUrl+"UpdateAndPayRequest",{body:e,params:n})}},{key:"getSchemaPermisBySchemaId",value:function(e){var t=(new YM).set("schemaId",e.toString());return this.callPelApi("get",this.baseUrl+"GetSchemaPermisBySchemaId",{params:t})}},{key:"getAllCustomResources",value:function(e){var t=(new YM).set("language",e);return this.callPelApi("get",this.baseUrl+"GetAllCustomResources",{params:t})}},{key:"getAllGeneralParameters",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllGeneralParameters")}},{key:"getAllContractors",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllContractors")}},{key:"getAllLandSurveyors",value:function(){return this.callPelApi("get",this.baseUrl+"GetAllLandSurveyors")}},{key:"getMobilitytUserInfo",value:function(e){var t=(new YM).set("mobileUserDataKey",e);return this.callPelApi("get",this.baseUrl+"GetMobilitytUserInfo",{params:t})}},{key:"validateRoleAddress",value:function(e,t){var n=(new YM).set("validateApartmentAndSuffix",t.toString());return this.callPelApi("post",this.baseUrl+"ValidateRoleAddress",{body:e,params:n})}},{key:"validateMapAddressWithRole",value:function(e){return this.callPelApi("post",this.baseUrl+"ValidateMapAddressWithRole",{body:e})}},{key:"callPelApi",value:function(e,t,n){var r=this;return new ws(function(i){r.getTokenHeader().subscribe(function(o){if(void 0===n&&(n={}),void 0!==n.headers){var a=n.headers.keys;for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(o=o.append(s,n.headers.get(s)))}n.headers=o,r.http.request(e,t,n).subscribe(function(e){i.next(e),i.complete()},function(e){i.error(e)})})})}}]),e}()).\u0275fac=function(e){return new(e||vq)(md(wq),md(Ry),md(jq),md(Mq))},vq.\u0275prov=dl({token:vq,factory:vq.\u0275fac}),vq),zq=((gq=function(){function e(t,n){is(this,e),this.pelController=t,this.localeId=n,this.newApplicationEvent=new Es,this.cityInfoAsync=new Es,this.voilaWidgetActive=!1,this.externalWidgetActive=!1,this.signalementWidgetActive=!1,this.isInIFrame=!1}return as(e,[{key:"initGlobals",value:function(){var e=this;return this.pelController.getAllCustomResources(this.localeId).subscribe(function(t){e.customResources=t.result},function(e){console.error("Error while loading customResources on globals")}),this.pelController.getAllGeneralParameters().subscribe(function(t){e.generalParameters=t.result},function(e){console.error("Error while loading generalParameters on globals")}),new ws(function(t){e.pelController.getCityInfos().subscribe(function(n){e.cityInfo=n.result,e.cityInfoAsync.next(n.result),t.next(),t.complete()},function(e){t.error()})})}},{key:"setCurrentFollowUpRequest",value:function(e){this.currentRequest=e}},{key:"getCityInfos",value:function(){return this.cityInfo}},{key:"getCurrentFollowUpRequest",value:function(){return this.currentRequest}},{key:"getLocaleCityName",value:function(){var e,t;return"en"===this.localeId?null===(e=this.cityInfo)||void 0===e?void 0:e.cityNameEn:null===(t=this.cityInfo)||void 0===t?void 0:t.cityNameFr}},{key:"getCustomResourceTextByCode",value:function(e){var t=this.customResources.find(function(t){return t.code.toLowerCase()===e.toLowerCase()});return void 0===t?"":t.text}},{key:"getGeneralParameterByCode",value:function(e){var t=this.generalParameters.find(function(t){return t.codeParam.toLowerCase()===e.toLowerCase()});return void 0===t?"":t.value}},{key:"getPermitMaxDocuments",value:function(e){var t=0,n=parseInt(this.getGeneralParameterByCode("nbr_fichiers_permis_max_telechargement"),10);return void 0!==n&&n>0&&(t=n),e>t&&(t=e),t}},{key:"setIsVoilaWidget",value:function(){this.voilaWidgetActive=!0}},{key:"isVoilaWidget",value:function(){return this.voilaWidgetActive}},{key:"setIsExternalWidget",value:function(){this.externalWidgetActive=!0}},{key:"isExternalWidget",value:function(){return this.externalWidgetActive}},{key:"setIsSignalementWidget",value:function(){this.signalementWidgetActive=!0}},{key:"isSignalementWidget",value:function(){return this.signalementWidgetActive}},{key:"setIsInIFrame",value:function(e){this.isInIFrame=e}},{key:"getIsInIFrame",value:function(){return this.isInIFrame}},{key:"setVoilaUserDataForMobile",value:function(e){this.pelController.getMobilitytUserInfo(e).subscribe(function(e){if(localStorage.getItem("voilaRequester")&&localStorage.removeItem("voilaRequester"),e.result){var t=JSON.parse(e.result.toString());localStorage.setItem("requester",JSON.stringify({Email:t.Email,FirstName:t.FirstName,FullAdress:t.FullAdress,LastName:t.LastName,PhoneNumber:t.PhoneNumber,NoCivic:t.NoCivic,NoApp:t.NoApp,Street:t.Street,PostalCode:t.PostalCode,City:t.City,StreetType:t.StreetType,StreetLink:t.StreetLink,Suffix:t.Suffix,IsResident:t.IsResident,DelPelUserMappingKeyValue:t.DelPelUserMappingKeyValue,UserRoles:t.UserRoles}))}},function(e){console.error("Error while getting userData from PELV2 api")})}}]),e}()).\u0275fac=function(e){return new(e||gq)(md(Bq),md(Ry))},gq.\u0275prov=dl({token:gq,factory:gq.\u0275fac}),gq);function Uq(e,t){if(1&e&&(cc(),Kf(0),Yf(1,"animate",7),Zf()),2&e){var n=sm();dp(1),Bf("keyTimes",n.keyTimes)("values",n.animationValues[0])("dur",n.duration)}}function Hq(e,t){if(1&e&&(cc(),Kf(0),Yf(1,"animate",7),Zf()),2&e){var n=sm();dp(1),Bf("keyTimes",n.keyTimes)("values",n.animationValues[1])("dur",n.duration)}}function Qq(e,t){if(1&e&&(cc(),Kf(0),Yf(1,"animate",7),Zf()),2&e){var n=sm();dp(1),Bf("keyTimes",n.keyTimes)("values",n.animationValues[2])("dur",n.duration)}}var Wq,Gq,$q,Jq,Yq=["*"],Kq=((Jq=function(){function e(){is(this,e),this.fixedId=Math.random().toString(36).substring(2),this.idClip=this.fixedId+"-diff",this.idGradient=this.fixedId+"-animated-diff",this.idAria=this.fixedId+"-aria",this.animate=!0,this.baseUrl="",this.speed=1.2,this.viewBox="0 0 0 0",this.gradientRatio=2,this.backgroundColor="#f5f6f7",this.backgroundOpacity=1,this.foregroundColor="#eee",this.foregroundOpacity=1,this.rtl=!1,this.interval=.25,this.style={},this.animationValues=[]}return as(e,[{key:"ngOnInit",value:function(){this.clipPath="url(".concat(this.baseUrl,"#").concat(this.idClip,")"),this.fillStyle={fill:"url(".concat(this.baseUrl,"#").concat(this.idGradient,")")},this.style=this.rtl?Object.assign(Object.assign({},this.style),{transform:"scaleX(-1)"}):this.style,this.duration=this.speed+"s",this.keyTimes="0; ".concat(this.interval,"; 1"),this.animationValues=["".concat(-this.gradientRatio,"; ").concat(-this.gradientRatio,"; 1"),"".concat(-this.gradientRatio/2,"; ").concat(-this.gradientRatio/2,"; ").concat(1+this.gradientRatio/2),"0; 0; "+(1+this.gradientRatio)]}}]),e}()).\u0275fac=function(e){return new(e||Jq)},Jq.\u0275cmp=zl({type:Jq,selectors:[["content-loader"]],inputs:{animate:"animate",baseUrl:"baseUrl",speed:"speed",viewBox:"viewBox",gradientRatio:"gradientRatio",backgroundColor:"backgroundColor",backgroundOpacity:"backgroundOpacity",foregroundColor:"foregroundColor",foregroundOpacity:"foregroundOpacity",rtl:"rtl",interval:"interval",style:"style"},ngContentSelectors:Yq,decls:12,vars:15,consts:[[3,"ngStyle"],["role","presentation","x","0","y","0","width","100%","height","100%",3,"ngStyle"],["role","presentation"],["offset","0%"],[4,"ngIf"],["offset","50%"],["offset","100%"],["attributeName","offset","repeatCount","indefinite"]],template:function(e,t){1&e&&(um(),cc(),$f(0,"svg",0),Yf(1,"rect",1),$f(2,"defs",2),$f(3,"clipPath"),cm(4),Jf(),$f(5,"linearGradient"),$f(6,"stop",3),Uf(7,Uq,2,3,"ng-container",4),Jf(),$f(8,"stop",5),Uf(9,Hq,2,3,"ng-container",4),Jf(),$f(10,"stop",6),Uf(11,Qq,2,3,"ng-container",4),Jf(),Jf(),Jf(),Jf()),2&e&&(Wf("ngStyle",t.style),Bf("viewBox",t.viewBox),dp(1),Wf("ngStyle",t.fillStyle),Bf("clip-path",t.clipPath),dp(2),Bf("id",t.idClip),dp(2),Bf("id",t.idGradient),dp(1),Bf("stop-color",t.backgroundColor)("stop-opacity",t.backgroundOpacity),dp(1),Wf("ngIf",t.animate),dp(1),Bf("stop-color",t.foregroundColor)("stop-opacity",t.foregroundOpacity),dp(1),Wf("ngIf",t.animate),dp(1),Bf("stop-color",t.backgroundColor)("stop-opacity",t.backgroundOpacity),dp(1),Wf("ngIf",t.animate))},directives:[J_,M_],styles:["[_nghost-%COMP%] {\n        display: block;\n      }"],changeDetection:0}),Jq),Zq=(($q=function(){function e(){is(this,e)}return as(e,null,[{key:"forRoot",value:function(){return{ngModule:e}}}]),e}()).\u0275mod=Wl({type:$q}),$q.\u0275inj=hl({factory:function(e){return new(e||$q)},imports:[[lw]]}),$q),Xq=((Gq=function(){function e(){is(this,e)}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||Gq)},Gq.\u0275cmp=zl({type:Gq,selectors:[["pel-follow-up-loading"]],decls:8,vars:0,consts:[["viewBox","0 0 360 400","speed","2","backgroundColor","#f3f3f3","foregroundColor","#ecebeb"],["x","16","y","5","rx","2","ry","2","width","220","height","14"],["x","16","y","34","rx","2","ry","2","width","300","height","28"],["x","16","y","78","rx","2","ry","2","width","260","height","14"],["x","16","y","106","rx","10","ry","10","width","168","height","52"],["x","16","y","164","rx","10","ry","10","width","168","height","52"],["x","190","y","106","rx","10","ry","10","width","168","height","52"],["x","190","y","164","rx","10","ry","10","width","168","height","52"]],template:function(e,t){1&e&&($f(0,"content-loader",0),cc(),Yf(1,"rect",1),Yf(2,"rect",2),Yf(3,"rect",3),Yf(4,"rect",4),Yf(5,"rect",5),Yf(6,"rect",6),Yf(7,"rect",7),Jf())},directives:[Kq],styles:["content-loader[_ngcontent-%COMP%]{display:block;max-width:360px}"]}),Gq),ej=((Wq=function(){function e(){is(this,e)}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||Wq)},Wq.\u0275cmp=zl({type:Wq,selectors:[["pel-error-payment-unavailable"]],decls:2,vars:0,consts:function(){return[["id","divErrorPaymentUnavailable","role","alert",1,"alert","alert-danger"]," Le site de paiement est temporairement indisponible. Veuillez r\xE9essayer plus tard.\n"]},template:function(e,t){1&e&&($f(0,"div",0),Rg(1,1),Jf())},styles:[""]}),Wq);function tj(e,t){1&e&&($f(0,"h2",28),Kf(1),Rg(2,29),Zf(),Jf())}function nj(e,t){1&e&&($f(0,"div"),Rg(1,30),Jf())}function rj(e,t){1&e&&($f(0,"div"),Rg(1,31),Jf())}function ij(e,t){1&e&&($f(0,"div"),Rg(1,32),Jf())}function oj(e,t){if(1&e&&($f(0,"div",33),Yf(1,"fa-icon",25),$f(2,"label",34),Rg(3,35),Jf(),Jf()),2&e){var n=sm();Wf("@slideInOut",void 0),dp(1),Wf("icon",n.farExclamationCircle)}}function aj(e,t){1&e&&Yf(0,"fa-icon",36),2&e&&Wf("icon",sm().farSpinnerThird)("spin",!0)}var sj,lj,uj=((lj=function(){function e(t,n,r,i,o){is(this,e),this.pelService=t,this.fb=n,this.localeId=r,this.router=i,this.globalsService=o,this.requestFound=new ty,this.currentSearchView="familyName",this.viewState=HM.Ready,this.viewStateEnum=HM,this.farExclamationCircle=DL,this.farSearch=oF,this.farSpinnerThird=aF}return as(e,[{key:"ngOnInit",value:function(){var e=this;this.followUpSearchForm=this.fb.group({followUpNumber:["",[FS.required]],name:["",[FS.required]]}),this.FollowUpNumber.valueChanges.subscribe(function(t){e.removeErrorState()}),this.Name.valueChanges.subscribe(function(t){e.removeErrorState()}),this.setInputPlaceholderValue(this.currentSearchView)}},{key:"setCurrentSearchView",value:function(e){this.currentSearchView=e,this.setInputPlaceholderValue(e)}},{key:"onFormSubmit",value:function(){var e=this;this.viewState=HM.Loading;var t={numeroSuivi:this.followUpSearchForm.value.followUpNumber,nomRequerant:this.followUpSearchForm.value.name,idCitoyen:null};if(localStorage.getItem("requester")){var n=JSON.parse(localStorage.getItem("requester"));n.DelPelUserMappingKeyValue&&(t.idCitoyen=n.DelPelUserMappingKeyValue)}this.pelService.getRequestByFollowUpNumberLastName(t).subscribe(function(t){e.viewState=HM.Ready,e.globalsService.setCurrentFollowUpRequest(t.result),t.result.soumise?e.requestFound.emit(t.result):e.router.navigate(["edit"],{replaceUrl:!0})},function(t){e.viewState=HM.Error})}},{key:"setInputPlaceholderValue",value:function(e){switch(e){case"familyName":this.inputPlaceholderValue="fr"===this.localeId?"Nom de famille du demandeur":"Applicant's last name";break;case"enterpriseName":this.inputPlaceholderValue="fr"===this.localeId?"Nom de l'entreprise demanderesse":"Applicant business' name";break;default:this.inputPlaceholderValue=""}}},{key:"removeErrorState",value:function(){this.viewState===HM.Error&&(this.viewState=HM.Ready)}},{key:"isVoilaWidget",value:function(){return this.globalsService.isVoilaWidget()}},{key:"FollowUpNumber",get:function(){return this.followUpSearchForm.get("followUpNumber")}},{key:"Name",get:function(){return this.followUpSearchForm.get("name")}}]),e}()).\u0275fac=function(e){return new(e||lj)(Qf(Bq),Qf(_k),Qf(Ry),Qf(JN),Qf(zq))},lj.\u0275cmp=zl({type:lj,selectors:[["pel-follow-up-search"]],outputs:{requestFound:"requestFound"},decls:36,vars:18,consts:function(){return[["class","title px-3",4,"ngIf"],[1,"card","border-0","shadow-sm","mt-3"],[1,"card-body"],[1,"text-primary","mb-4"]," Veuillez entrer les informations demand\xE9es pour rechercher une demande. ",[3,"formGroup","ngSubmit"],[1,"form-group","mb-4"],["for","followUpNumber"],"Num\xE9ro de suivi",["type","text","id","followUpNumber","name","followUpNumber","formControlName","followUpNumber","maxlength","40","data-testid","867d644a-df84-4fa3-ad0d-ba701ea484ef",1,"form-control"],[1,"form-text","text-muted"]," Fourni dans le courriel confirmant la cr\xE9ation de la demande ",[1,"invalid-feedback"],[4,"ngIf"],[1,"form-group"],["id","lblRechercherPar",1,"mb-0"],"Rechercher par",["role","group","aria-labelledby","lblRechercherPar",1,"btn-group-inline"],["type","button","data-testid","95aa0373-3abb-4970-a769-0c8e2be41f54",1,"btn","btn-underline",3,"click"],"Nom de famille",["type","button","data-testid","5f490073-53e7-44e1-a654-7b244b0840f7",1,"btn","btn-underline",3,"click"],"Nom d'entreprise",["type","text","id","name","name","name","formControlName","name","maxlength","90","data-testid","6a215138-d0b4-4be0-b7c0-58017b77a464",1,"form-control","mt-2",3,"placeholder"],["class","text-danger d-flex mb-1","data-testid","FEA6757B-2BAD-49C5-AA37-C7F3CE120ED5",4,"ngIf"],["type","submit","data-testid","b2a7fc6b-a6f9-481f-8bab-78ea4599c94c",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-3",3,"disabled"],[1,"mr-2",3,"icon"],"Rechercher",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"title","px-3"],"Suivi d'une demande"," Veuillez saisir un num\xE9ro de suivi. "," Veuillez saisir un nom de famille. "," Veuillez saisir un nom d'entreprise. ",["data-testid","FEA6757B-2BAD-49C5-AA37-C7F3CE120ED5",1,"text-danger","d-flex","mb-1"],[1,"mb-0"]," Aucune demande n'a \xE9t\xE9 trouv\xE9e avec ces informations. Veuillez vous assurer que celles-ci soient correctes. ",[1,"ml-2",3,"icon","spin"]]},template:function(e,t){1&e&&(Uf(0,tj,3,0,"h2",0),$f(1,"section",1),$f(2,"div",2),$f(3,"p",3),Rg(4,4),Jf(),$f(5,"form",5),nm("ngSubmit",function(){return t.onFormSubmit()}),$f(6,"div",6),$f(7,"label",7),Kf(8),Rg(9,8),Zf(),Cm(10," * "),Jf(),Yf(11,"input",9),$f(12,"small",10),Rg(13,11),Jf(),$f(14,"div",12),Uf(15,nj,2,0,"div",13),Jf(),Jf(),$f(16,"div",14),$f(17,"p",15),Kf(18),Rg(19,16),Zf(),Cm(20," * "),Jf(),$f(21,"div",17),$f(22,"button",18),nm("click",function(){return t.setCurrentSearchView("familyName")}),Rg(23,19),Jf(),$f(24,"button",20),nm("click",function(){return t.setCurrentSearchView("enterpriseName")}),Rg(25,21),Jf(),Jf(),Yf(26,"input",22),$f(27,"div",12),Uf(28,rj,2,0,"div",13),Uf(29,ij,2,0,"div",13),Jf(),Jf(),Uf(30,oj,4,2,"div",23),$f(31,"button",24),Yf(32,"fa-icon",25),Kf(33),Rg(34,26),Zf(),Uf(35,aj,1,2,"fa-icon",27),Jf(),Jf(),Jf(),Jf()),2&e&&(Wf("ngIf",!t.isVoilaWidget()),dp(5),Wf("formGroup",t.followUpSearchForm),dp(6),gm("is-invalid",(t.FollowUpNumber.touched||t.FollowUpNumber.dirty)&&!t.FollowUpNumber.valid),dp(4),Wf("ngIf",null==t.FollowUpNumber.errors?null:t.FollowUpNumber.errors.required),dp(7),gm("active","familyName"===t.currentSearchView),dp(2),gm("active","enterpriseName"===t.currentSearchView),dp(2),gm("is-invalid",(t.Name.touched||t.Name.dirty)&&!t.Name.valid),Wf("placeholder",t.inputPlaceholderValue),dp(2),Wf("ngIf",(null==t.Name.errors?null:t.Name.errors.required)&&"familyName"===t.currentSearchView),dp(1),Wf("ngIf",(null==t.Name.errors?null:t.Name.errors.required)&&"enterpriseName"===t.currentSearchView),dp(1),Wf("ngIf",t.viewState===t.viewStateEnum.Error),dp(1),Wf("disabled",t.followUpSearchForm.invalid||t.viewState===t.viewStateEnum.Loading),dp(1),Wf("icon",t.farSearch),dp(3),Wf("ngIf",t.viewState===t.viewStateEnum.Loading))},directives:[M_,XP,lP,nk,OS,sP,gk,yk,DM],styles:["input#followUpNumber[_ngcontent-%COMP%]{max-width:260px}"],data:{animation:[Zw("slideInOut",[rC(":enter",[tC({overflow:"hidden",height:"0"}),Xw("200ms ease-out",tC({height:"*"}))]),rC(":leave",[Xw("100ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),lj),cj=((sj=function(){function e(){is(this,e)}return as(e,null,[{key:"downloadFile",value:function(e,t,n){var r=new Blob([this.base64ToArrayBuffer(t)],{type:n.mimeType});""!==n.extension&&(e+="."+n.extension);var i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o=/CriOS/i.test(navigator.userAgent);if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(r,e);else if(o){var a=new FileReader;a.onload=function(){window.location.href=a.result},a.readAsDataURL(r)}else{var s=document.createElement("a");document.body.appendChild(s);var l=window.URL.createObjectURL(r);s.href=l,"download"in s&&!i&&(s.download=e),s.click(),setTimeout(function(){window.URL.revokeObjectURL(l)},5e3),s.remove()}}},{key:"base64ToArrayBuffer",value:function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}}]),e}()).\u0275fac=function(e){return new(e||sj)},sj.\u0275prov=dl({token:sj,factory:sj.\u0275fac}),sj),dj=function(){var e=function(){function e(t,n){is(this,e),this.extension=t,this.mimeType=n}return as(e,[{key:"toString",value:function(){return this.extension}}]),e}();return e.CSV=new e("csv","text/csv"),e.PDF=new e("pdf","application/pdf"),e.EXCEL=new e("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),e.WORD=new e("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),e.JPEG=new e("jpeg","image/jpeg"),e.JPG=new e("jpg","image/jpg"),e.BMP=new e("bmp","image/bmp"),e.PNG=new e("png","image/png"),e.SVG=new e("svg","image/svg+xml"),e.TIFF=new e("tiff","image/tiff"),e.TIF=new e("tif","image/tiff"),e.GIF=new e("gif","image/gif"),e}(),hj=function(){function e(){is(this,e)}return as(e,null,[{key:"RES_VILLE_FR",get:function(){return"Ville"}},{key:"RES_VILLE_EN",get:function(){return"City"}},{key:"RES_ERR_AUCUNE_VILLE_FR",get:function(){return"Veuillez entrer une ville."}},{key:"RES_ERR_AUCUNE_VILLE_EN",get:function(){return"Please enter a city."}},{key:"RES_ERR_AUCUNE_VILLE_DEMANDEUR_FR",get:function(){return"Veuillez entrer la ville du demandeur."}},{key:"RES_ERR_AUCUNE_VILLE_DEMANDEUR_EN",get:function(){return"Please enter the applicant's city."}},{key:"RES_AJOUTER_COMMENTAIRES_FR",get:function(){return"Si vous souhaitez ajouter des commentaires pour la Ville, veuillez les inscrire ci-dessous :"}},{key:"RES_AJOUTER_COMMENTAIRES_EN",get:function(){return"If you wish to add comments for the City, please write them down below:"}},{key:"RES_QUESTION_MODE_COMMUNICATION_FR",get:function(){return"De quelle fa\xe7on aimeriez-vous que la Ville communique avec vous lors du traitement de cette demande ? *"}},{key:"RES_QUESTION_MODE_COMMUNICATION_EN",get:function(){return"How would you like the City to contact you when processing this request? *"}},{key:"RES_ADRESSE_EMPLACEMENT_VILLE_INVALIDE_FR",get:function(){return"L'adresse s\xe9lectionn\xe9e doit se situer dans le territoire de la Ville."}},{key:"RES_ADRESSE_EMPLACEMENT_VILLE_INVALIDE_EN",get:function(){return"The selected address must be located in the territory of the City."}},{key:"RES_DESCRITPION",get:function(){return"Description"}},{key:"RES_NATURE_DEMANDE_FR",get:function(){return"Nature de la demande"}},{key:"RES_NATURE_DEMANDE_EN",get:function(){return"Nature of request"}},{key:"RES_DESCRIPTION_PL_FR",get:function(){return"Description de l'op\xe9ration cadastrale"}},{key:"RES_DESCRIPTION_PL_EN",get:function(){return"Subdivision request description"}},{key:"RES_DESCRIPTION_PA_FR",get:function(){return"Description d\xe9taill\xe9e des activit\xe9s demand\xe9es par ordre d\u2019importance"}},{key:"RES_DESCRIPTION_PA_EN",get:function(){return"Detailed description of the requested activities in order of importance"}},{key:"RES_DATE_DEBUT_FR",get:function(){return"Date de d\xe9but"}},{key:"RES_DATE_DEBUT_EN",get:function(){return"Start date"}},{key:"RES_DATE_OCCUPATION_FR",get:function(){return"Date d'occupation pr\xe9vue"}},{key:"RES_DATE_OCCUPATION_EN",get:function(){return"Expected occupation date"}},{key:"RES_DEBUT_TRAVAUX_FR",get:function(){return"D\xe9but des travaux"}},{key:"RES_DEBUT_TRAVAUX_EN",get:function(){return"Work start date"}},{key:"RES_CONSENTEMENT_FR",get:function(){return"Je consens et je comprends que les renseignements personnels (Nom, pr\xe9nom, courriel, adresse, t\xe9l\xe9phone) inscrits pour la soumission de cette demande, ne seront utilis\xe9s que pour les besoins exclusifs de suivi de cette demande. Aucune de ces donn\xe9es ne sera transmise \xe0 une solution ou une organisation tierce en dehors de l'utilisation sp\xe9cifique aux services en ligne propos\xe9s par la ville. Pour demander la suppression de mes donn\xe9es personnelles, je pourrai adresser une demande au service des citoyens de la ville."}},{key:"RES_CONSENTEMENT_EN",get:function(){return"I consent and understand that the personal information (Name, first name, email, address, telephone) entered for the submission of this request will only be used for the exclusive needs of following this request. None of this data will be transmitted to a third-party solution or organization outside the specific use of online services offered by the city. To request the deletion of my personal data, I may send a request to the city's Citizen Service."}}]),e}(),pj=function e(){is(this,e)};function fj(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",8),Cm(2),Zf()),2&e){var n=sm().$implicit,r=sm();dp(1),Wf("icon",r.farFileDownload),dp(1),Sm(" ",n.nomFichierOriginal," ")}}function mj(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",9),Cm(2),Zf()),2&e){var n=sm().$implicit,r=sm();dp(1),Wf("icon",r.farSpinnerThird)("spin",!0),dp(1),Sm(" ",n.nomFichierOriginal," ")}}function gj(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",8),Cm(2),Zf()),2&e){var n=sm().$implicit,r=sm();dp(1),Wf("icon",r.farExclamationTriangle),dp(1),Sm(" ",n.nomFichierOriginal," ")}}function vj(e,t){1&e&&($f(0,"span",10),Rg(1,11),Jf())}function yj(e,t){if(1&e){var n=Xf();$f(0,"li",2),nm("click",function(){Nu(n);var e=t.$implicit;return sm().onDownloadFile(e.id,e.codeEnregistrement)}),$f(1,"span",3),$f(2,"a",4),Kf(3,5),Uf(4,fj,3,2,"ng-container",6),Uf(5,mj,3,3,"ng-container",6),Uf(6,gj,3,2,"ng-container",6),Zf(),Jf(),Jf(),Uf(7,vj,2,0,"span",7),Jf()}if(2&e){var r=t.$implicit,i=sm();dp(2),Bf("data-testitemid",r.id),dp(1),Wf("ngSwitch",i.getItemDownloadState(r.id)),dp(1),Wf("ngSwitchCase",i.viewStateEnum.Ready),dp(1),Wf("ngSwitchCase",i.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",i.viewStateEnum.Error),dp(1),Wf("ngIf",!i.isAlreadyDownloaded(r.id))}}var bj,_j=((bj=function(){function e(t,n){is(this,e),this.pelService=t,this.localeId=n,this.downloadFileStates=[],this.viewStateEnum=HM,this.downloadPermitFileState=HM.Ready,this.downloadCopyState=HM.Ready,this.downloadCardboardState=HM.Ready,this.farExclamationTriangle=NL,this.farSpinnerThird=aF,this.farFileDownload=qL,this.prefixSeparator="_ANNEXE_"}return as(e,[{key:"ngOnInit",value:function(){var e=this;this.originalInput=[],this.permitFiles.forEach(function(t){var n=new pj;n.id=t.id,n.idDemande=t.idDemande,n.codeEnregistrement=t.codeEnregistrement,n.dateCreation=t.dateCreation,n.dateTelechargement=t.dateTelechargement,n.nomFichierOriginal=t.nomFichierOriginal,e.originalInput.push(n);var r=new wj;switch(r.fileId=t.id,r.state=e.viewStateEnum.Ready,e.downloadFileStates.push(r),t.codeEnregistrement){case 2:"Permis (carton d'affichage)"!==t.nomFichierOriginal&&"Permit (Display Sign)"!==t.nomFichierOriginal&&(t.nomFichierOriginal="fr"===e.localeId?"Permis (carton d'affichage)":"Permit (Display Sign)");break;case 3:"Permis (formulaire)"!==t.nomFichierOriginal&&"Permit (Application Form)"!==t.nomFichierOriginal&&(t.nomFichierOriginal="fr"===e.localeId?"Permis (formulaire)":"Permit (Application Form)");break;case 4:t.nomFichierOriginal=t.nomFichierOriginal.split(e.prefixSeparator).pop()}}),this.permitFiles.sort(function(e,t){return e.codeEnregistrement-t.codeEnregistrement})}},{key:"downloadEnabled",value:function(){var e;return(null===(e=this.permitFiles)||void 0===e?void 0:e.length)>0}},{key:"onDownloadFile",value:function(e,t){switch(t){case 2:this.downloadFile(e,Fq.Cardboard);break;case 3:this.downloadFile(e,Fq.RequestPdf);break;case 4:this.downloadFile(e,Fq.AdditionnalDocument)}}},{key:"updateDownloadState",value:function(e,t){var n=this;t===Fq.Cardboard?this.downloadCardboardState=e:t===Fq.RequestPdf&&(this.downloadCopyState=e),this.downloadPermitFileState=e,this.downloadFileStates.find(function(e){return e.fileId===n.currentFileItemId}).state=this.downloadPermitFileState,e===HM.Error&&setTimeout(function(){t===Fq.Cardboard?n.downloadCardboardState===HM.Error&&(n.downloadCardboardState=HM.Ready,n.downloadFileStates.find(function(e){return e.fileId===n.currentFileItemId}).state=n.downloadCardboardState):t===Fq.RequestPdf&&n.downloadCopyState===HM.Error&&(n.downloadCopyState=HM.Ready,n.downloadFileStates.find(function(e){return e.fileId===n.currentFileItemId}).state=n.downloadCopyState)},5e3)}},{key:"downloadFile",value:function(e,t){var n=this;this.currentFileItemId=this.downloadFileStates.find(function(t){return t.fileId===e}).fileId,this.updateDownloadState(HM.Loading,t);var r=this.originalInput.find(function(t){return t.id===e});if(r){var i=r.nomFichierOriginal.split(".").pop().toUpperCase();this.pelService.getFileDataByFileId(e,t).subscribe(function(o){n.updateDownloadState(HM.Ready,t);var a="";switch(r.codeEnregistrement){case 2:case 3:a=r.nomFichierOriginal,i="PDF";break;default:a=n.permitFiles.find(function(t){return t.id===e}).nomFichierOriginal}switch(i){case"PDF":cj.downloadFile(a,o.result,dj.PDF);break;case"DOCX":cj.downloadFile(a,o.result,dj.WORD);break;case"XLSX":cj.downloadFile(a,o.result,dj.EXCEL);break;case"CSV":cj.downloadFile(a,o.result,dj.CSV);break;case"JPEG":cj.downloadFile(a,o.result,dj.JPEG);break;case"JPG":cj.downloadFile(a,o.result,dj.JPG);break;case"PNG":cj.downloadFile(a,o.result,dj.PNG);break;case"TIFF":cj.downloadFile(a,o.result,dj.TIFF);break;case"TIF":cj.downloadFile(a,o.result,dj.TIF);break;case"SVG":cj.downloadFile(a,o.result,dj.SVG);break;case"GIF":cj.downloadFile(a,o.result,dj.GIF);break;case"SVG":cj.downloadFile(a,o.result,dj.SVG);break;case"BMP":cj.downloadFile(a,o.result,dj.BMP);break;default:n.updateDownloadState(HM.Error,t)}n.permitFiles.find(function(t){return t.id===e}).dateTelechargement=new Date},function(e){n.updateDownloadState(HM.Error,t)})}else this.updateDownloadState(HM.Error,t)}},{key:"isAlreadyDownloaded",value:function(e){return!!this.permitFiles.find(function(t){return t.id===e}).dateTelechargement}},{key:"getItemDownloadState",value:function(e){return this.downloadPermitFileState=this.downloadFileStates.find(function(t){return t.fileId===e}).state,this.downloadPermitFileState}}]),e}()).\u0275fac=function(e){return new(e||bj)(Qf(Bq),Qf(Ry))},bj.\u0275cmp=zl({type:bj,selectors:[["pel-permit-pdf-download"]],inputs:{permitFiles:"permitFiles"},decls:4,vars:1,consts:function(){return["Cliquer sur chaque lien pour t\xE9l\xE9charger le fichier.",[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"span-padding"],["href","javascript:void(0)",1,"link-decorator"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","chip chip-small chip-alert",4,"ngIf"],[3,"icon"],[3,"icon","spin"],[1,"chip","chip-small","chip-alert"],"Nouveau"]},template:function(e,t){1&e&&($f(0,"p"),Rg(1,0),Jf(),$f(2,"ul"),Uf(3,yj,8,6,"li",1),Jf()),2&e&&(dp(3),Wf("ngForOf",t.permitFiles))},directives:[L_,W_,G_,M_,DM],styles:[".ul.li[_ngcontent-%COMP%]{cursor:pointer!important}.p[_ngcontent-%COMP%]{padding-top:10px}.ul.li[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{vertical-align:4px;margin-left:5px;margin-right:5px}.span-padding[_ngcontent-%COMP%]{padding-right:5px}.link-decorator[_ngcontent-%COMP%]{text-decoration:underline!important}"]}),bj),wj=function e(){is(this,e)};function Cj(e,t){1&e&&(Kf(0),$f(1,"content-loader",17),cc(),Yf(2,"rect",18),Jf(),Zf())}function xj(e,t){if(1&e&&($f(0,"p",16),Cm(1),Jf()),2&e){var n=sm(3);dp(1),xm(n.paymentReference)}}function Sj(e,t){if(1&e){var n=Xf();$f(0,"div",4),$f(1,"button",5),nm("click",function(){return Nu(n),sm(2).hide()}),Yf(2,"fa-icon",6),Kf(3),Rg(4,7),Zf(),Jf(),$f(5,"h3",8),Yf(6,"fa-icon",9),Kf(7),Rg(8,10),Zf(),Jf(),$f(9,"p",11),Rg(10,12),Jf(),Uf(11,Cj,3,0,"ng-container",13),Uf(12,xj,2,1,"ng-template",null,14,Cy),$f(14,"p",11),Rg(15,15),Jf(),$f(16,"p",16),Cm(17),Jf(),Jf()}if(2&e){var r=Hf(13),i=sm(2);dp(2),Wf("icon",i.farTimes),dp(4),Wf("icon",i.farCheck),dp(5),Wf("ngIf",""===i.paymentReference)("ngIfElse",r),dp(6),xm(i.processorName)}}function Pj(e,t){if(1&e){var n=Xf();$f(0,"div",19),$f(1,"button",20),nm("click",function(){return Nu(n),sm(2).hide()}),Yf(2,"fa-icon",6),Kf(3),Rg(4,21),Zf(),Jf(),$f(5,"h3",8),Yf(6,"fa-icon",22),Kf(7),Rg(8,23),Zf(),Jf(),$f(9,"p",24),Rg(10,25),Jf(),Jf()}if(2&e){var r=sm(2);dp(2),Wf("icon",r.farTimes),dp(4),Wf("icon",r.farExclamationCircle)}}function kj(e,t){if(1&e&&($f(0,"div",1),Uf(1,Sj,18,5,"div",2),Uf(2,Pj,11,2,"div",3),Jf()),2&e){var n=sm();Wf("ngSwitch",n.paymentStatus)("@slideOut",void 0),dp(1),Wf("ngSwitchCase",n.paymentStatusEnum.Accepted),dp(1),Wf("ngSwitchCase",n.paymentStatusEnum.Error)}}var Ej,Aj=((Ej=function(){function e(t,n,r){is(this,e),this.globals=t,this.pelService=n,this.route=r,this.paymentReference="",this.processorName="",this.isDisplayed=!0,this.paymentStatusEnum=UM,this.farCheck=SL,this.farExclamationCircle=DL,this.farTimes=lF}return as(e,[{key:"ngOnInit",value:function(){var e,t=this;this.route.queryParams.subscribe(function(e){e.status===UM.Accepted&&e.pprn&&t.pelService.confirmPaymentSuccess(e.pprn).subscribe(function(e){e.result&&(t.paymentReference=e.result)})}),this.processorName=null===(e=this.globals.getCityInfos())||void 0===e?void 0:e.processorDescription}},{key:"hide",value:function(){this.isDisplayed=!1}}]),e}()).\u0275fac=function(e){return new(e||Ej)(Qf(zq),Qf(Bq),Qf(AD))},Ej.\u0275cmp=zl({type:Ej,selectors:[["pel-follow-up-payment-result"]],inputs:{paymentStatus:"paymentStatus"},decls:1,vars:1,consts:function(){return[[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],["class","alert alert-success mt-2","data-testid","AA949B83-985A-4605-8019-40C977402E5B",4,"ngSwitchCase"],["class","alert alert-danger mt-2","data-testid","7DE8E6EF-B998-47E2-9553-7B2856ED5397",4,"ngSwitchCase"],["data-testid","AA949B83-985A-4605-8019-40C977402E5B",1,"alert","alert-success","mt-2"],[1,"btn","btn-success","btn-close",3,"click"],[1,"mr-2",3,"icon"],"Fermer",[1,"text-center","mt-2","mb-4"],["size","2x",1,"d-block","mb-2",3,"icon"],"Paiement accept\xE9",[1,"mb-0","text-center"],"Num\xE9ro de confirmation",[4,"ngIf","ngIfElse"],["PaymentRef",""],"Cette charge appara\xEEtra sur votre relev\xE9 de compte de cr\xE9dit sous le nom",[1,"font-weight-medium","text-center"],["viewBox","0 0 83 13","speed","2","backgroundColor","#b8ddc0","foregroundColor","#8bbc97"],["x","0","y","0","rx","1","ry","1","width","83","height","5"],["data-testid","7DE8E6EF-B998-47E2-9553-7B2856ED5397",1,"alert","alert-danger","mt-2"],[1,"btn","btn-danger","btn-close",3,"click"],"Fermer",["size","2x",1,"d-block","mb-1",3,"icon"],"\xC9chec du paiement",[1,"text-center","mb-1"]," Veuillez vous assurer que vos informations de paiement soient correctes, puis r\xE9essayez."]},template:function(e,t){1&e&&Uf(0,kj,3,4,"div",0),2&e&&Wf("ngIf",t.isDisplayed)},directives:[M_,W_,G_,DM,Kq],styles:["content-loader[_ngcontent-%COMP%]{display:block;width:256px;margin:0 auto}.btn-close[_ngcontent-%COMP%]{position:absolute;right:.75rem}.btn-close[_ngcontent-%COMP%]:not(:hover){background-color:transparent}"],data:{animation:[Zw("slideOut",[rC(":leave",[Xw("300ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),Ej);function Ij(e,t){1&e&&($f(0,"span",38),Rg(1,39),Jf())}function Tj(e,t){if(1&e&&($f(0,"div",34),$f(1,"div"),Uf(2,Ij,2,0,"span",37),Jf(),Jf()),2&e){var n=sm(2);dp(2),Wf("ngIf",n.hasAnyNewPermitFile())}}function Oj(e,t){1&e&&($f(0,"div",34),$f(1,"div",34),Kf(2),Rg(3,40),Zf(),Jf(),Jf())}function Rj(e,t){if(1&e&&($f(0,"div",41),$f(1,"div",42),$f(2,"div",43),Yf(3,"pel-permit-pdf-download",44),Jf(),Jf(),Jf()),2&e){var n=sm(2);Wf("@slideInOut",void 0),dp(3),Wf("permitFiles",n.GetDownloadableFiles())}}function Vj(e,t){if(1&e){var n=Xf();$f(0,"div",31),$f(1,"a",32),nm("click",function(){return Nu(n),sm().setPermitPdfDialog()}),Uf(2,Tj,3,1,"div",33),Uf(3,Oj,4,0,"div",33),$f(4,"div",34),$f(5,"div",35),Yf(6,"fa-icon",8),Jf(),Jf(),Jf(),Uf(7,Rj,4,2,"div",36),Jf()}if(2&e){var r=sm();gm("expanded",r.showPermitPdfDialog),dp(2),Wf("ngIf",r.downloadEnabled()),dp(1),Wf("ngIf",r.downloadEnabled()),dp(3),Wf("icon",r.farChevronDown),dp(1),Wf("ngIf",r.showPermitPdfDialog)}}function Dj(e,t){1&e&&Yf(0,"pel-follow-up-payment-result",45),2&e&&Wf("paymentStatus",sm().paymentStatus)}function Nj(e,t){if(1&e&&($f(0,"li"),$f(1,"span",55),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;gm("step-disabled",!n.isCompleted),dp(2),xm(n.title)}}function Lj(e,t){if(1&e&&($f(0,"div",50),$f(1,"h6",51),Cm(2),Jv(3,"date"),Jf(),Cm(4),Jf()),2&e){var n=t.$implicit;dp(2),Pm("",Kv(3,3,n.dateIntervention,"medium")," - ",n.etat,""),dp(2),Sm(" ",n.noteClient," ")}}function Fj(e,t){if(1&e&&($f(0,"div",56),Uf(1,Lj,5,6,"div",57),Jf()),2&e){var n=sm(2);Wf("@slideInOut",void 0),dp(1),Wf("ngForOf",null==n.requestPermit||null==n.requestPermit.interventions?null:n.requestPermit.interventions.slice().reverse().slice(1))}}function Mj(e,t){if(1&e){var n=Xf();$f(0,"a",58),nm("click",function(){return Nu(n),sm(2).expandDisplayedInterventions(!0)}),Kf(1),Rg(2,59),Zf(),Yf(3,"fa-icon",8),Jf()}if(2&e){var r=sm(2);dp(3),Wf("icon",r.farChevronDown)}}function qj(e,t){if(1&e){var n=Xf();$f(0,"a",60),nm("click",function(){return Nu(n),sm(2).expandDisplayedInterventions(!1)}),Yf(1,"fa-icon",8),Kf(2),Rg(3,61),Zf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farChevronUp)}}function jj(e,t){if(1&e&&($f(0,"div",46),$f(1,"ul",47),Uf(2,Nj,3,3,"li",48),Jf(),$f(3,"div",49),$f(4,"div",50),$f(5,"h6",51),Cm(6),Jv(7,"date"),Jf(),Cm(8),Jf(),Uf(9,Fj,2,2,"div",52),Jf(),Uf(10,Mj,4,1,"a",53),Uf(11,qj,4,1,"a",54),Jf()),2&e){var n=sm();dp(2),Wf("ngForOf",n.getTimelineStates()),dp(4),Pm(" ",Kv(7,7,null==n.requestPermit||null==n.requestPermit.interventions?null:n.requestPermit.interventions.slice().reverse()[0].dateIntervention,"medium")," - ",null==n.requestPermit||null==n.requestPermit.interventions?null:n.requestPermit.interventions.slice().reverse()[0].etat," "),dp(2),Sm(" ",null==n.requestPermit||null==n.requestPermit.interventions?null:n.requestPermit.interventions.slice().reverse()[0].noteClient," "),dp(1),Wf("ngIf",n.showMoreInterventions),dp(1),Wf("ngIf",(null==n.requestPermit||null==n.requestPermit.interventions?null:n.requestPermit.interventions.length)>1&&!n.showMoreInterventions),dp(1),Wf("ngIf",n.showMoreInterventions)}}function Bj(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm().$implicit;dp(1),Sm(" ",n.frais[0].feeItemLabel,"")}}function zj(e,t){1&e&&(Kf(0),Rg(1,76),Zf())}function Uj(e,t){if(1&e&&($f(0,"label",77),Yf(1,"fa-icon",78),Kf(2),Rg(3,79),Zf(),Jf()),2&e){var n=sm(3);dp(1),Wf("icon",n.farCheck)}}function Hj(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",78),Yf(2,"br"),Kf(3),Rg(4,80),Zf(),Zf()),2&e){var n=sm(3);dp(1),Wf("icon",n.farFileDownload)}}function Qj(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",81),Yf(2,"br"),Kf(3),Rg(4,82),Zf(),Zf()),2&e){var n=sm(3);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function Wj(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",8),Yf(2,"br"),Kf(3),Rg(4,83),Zf(),Zf()),2&e){var n=sm(3);dp(1),Wf("icon",n.farExclamationTriangle)}}function Gj(e,t){if(1&e){var n=Xf();$f(0,"div",67),$f(1,"div",68),$f(2,"div",69),$f(3,"div",70),Yf(4,"fa-icon",71),$f(5,"span"),Uf(6,Bj,2,1,"ng-container",72),Uf(7,zj,2,0,"ng-container",72),Yf(8,"br"),$f(9,"strong"),Cm(10),Jv(11,"currency"),Jf(),Uf(12,Uj,4,1,"label",73),Jf(),Jf(),$f(13,"div",74),$f(14,"button",75),nm("click",function(){Nu(n);var e=t.$implicit,r=sm(2);return r.downloadFile(e.idFichier,r.eDownloadFileType.Invoice)}),Uf(15,Hj,5,1,"ng-container",72),Uf(16,Qj,5,2,"ng-container",72),Uf(17,Wj,5,1,"ng-container",72),Jf(),Jf(),Jf(),Jf(),Jf()}if(2&e){var r=t.$implicit,i=sm(2);Bf("data-testitemid",r.invoiceNo),dp(4),Wf("icon",i.farReceipt),dp(2),Wf("ngIf",r.frais[0]),dp(1),Wf("ngIf",!r.frais[0]),dp(2),gm("text-muted",i.isInvoicePaid(r)),dp(1),Sm(" ",(o=r.totalAmount,a="symbol-narrow",s=Vu(),l=xu(s,31),ey(s,Xv(s,31)?function(e,t,n,r,i,o,a,s){var l=t+12;return function(e,t,n,r,i){var o=jf(e,t,n,"CAD");return qf(e,t+2,"symbol-narrow")||o}(e,l,i)?Mf(e,l+3,s?r.call(s,i,o,a):r(i,o,a)):Gv(e,l+3)}(s,Hu(),0,l.transform,o,"CAD",a,l):l.transform(o,"CAD",a)))," "),dp(2),Wf("ngIf",i.isInvoicePaid(r)),dp(2),Wf("disabled",!i.downloadInvoiceEnabled(r.id)||i.invoicesInDownloading&&i.invoicesInDownloading.indexOf(r.idFichier)>-1),dp(1),Wf("ngIf",!(i.invoicesInDownloading&&-1!==i.invoicesInDownloading.indexOf(r.idFichier)||i.invoicesDownloadingError&&-1!==i.invoicesDownloadingError.indexOf(r.idFichier))),dp(1),Wf("ngIf",i.invoicesInDownloading&&i.invoicesInDownloading.indexOf(r.idFichier)>-1),dp(1),Wf("ngIf",i.invoicesDownloadingError&&i.invoicesDownloadingError.indexOf(r.idFichier)>-1)}var o,a,s,l}function $j(e,t){1&e&&($f(0,"div",65),$f(1,"div",19),$f(2,"label",84),Rg(3,85),Jf(),Jf(),Jf())}function Jj(e,t){1&e&&Yf(0,"fa-icon",89),2&e&&Wf("icon",sm(3).farSpinnerThird)("spin",!0)}function Yj(e,t){if(1&e){var n=Xf();$f(0,"button",86),nm("click",function(){return Nu(n),sm(2).payPermit()}),Yf(1,"fa-icon",71),Kf(2),Rg(3,87),Zf(),Uf(4,Jj,1,2,"fa-icon",88),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farDollarSign),dp(3),Wf("ngIf",r.isProcessing)}}function Kj(e,t){1&e&&($f(0,"div",65),$f(1,"div",70),Yf(2,"img",90),Jf(),Kf(3),$f(4,"span"),Rg(5,91),Jf(),Zf(),Jf())}function Zj(e,t){if(1&e&&($f(0,"div",18),$f(1,"div",19),$f(2,"label",20),Rg(3,62),Jf(),Uf(4,Gj,18,16,"div",63),Uf(5,$j,4,0,"div",64),$f(6,"div",65),$f(7,"div",19),Uf(8,Yj,5,2,"button",66),Jf(),Jf(),Uf(9,Kj,6,0,"div",64),Jf(),Jf()),2&e){var n=sm();dp(4),Wf("ngForOf",null==n.requestPermit?null:n.requestPermit.factures),dp(1),Wf("ngIf",!n.areAllInvoicesPayableOnline()),dp(3),Wf("ngIf",n.hasInvoicePayableOnline()&&n.hasInvoiceToPay()),dp(1),Wf("ngIf",n.isInvoiceAmountByPassMaxAllowed())}}function Xj(e,t){if(1&e&&(Kf(0),Cm(1),Jv(2,"mask"),Yf(3,"br"),Zf()),2&e){var n=sm(2);dp(1),Sm(" ",Kv(2,1,null==n.requestPermit?null:n.requestPermit.telephoneRequerant,"(000) 000-0000"),"")}}function eB(e,t){if(1&e&&($f(0,"address",92),Cm(1),Yf(2,"br"),Cm(3),Yf(4,"br"),Uf(5,Xj,4,4,"ng-container",72),Cm(6),Jf()),2&e){var n=sm();Wf("@slideInOut",void 0),dp(1),Sm(" ",null==n.requestPermit?null:n.requestPermit.adresseRequerant,""),dp(2),Pm(" ",null==n.requestPermit?null:n.requestPermit.villeRequerant," ",null==n.requestPermit?null:n.requestPermit.codePostalRequerant,""),dp(2),Wf("ngIf",null==n.requestPermit?null:n.requestPermit.telephoneRequerant),dp(1),Sm(" ",null==n.requestPermit?null:n.requestPermit.courrielRequerant," ")}}function tB(e,t){if(1&e){var n=Xf();$f(0,"a",93),nm("click",function(){return Nu(n),sm().expandApplicantAddress(!0)}),Kf(1),Rg(2,94),Zf(),Yf(3,"fa-icon",8),Jf()}if(2&e){var r=sm();dp(3),Wf("icon",r.farChevronDown)}}function nB(e,t){if(1&e){var n=Xf();$f(0,"a",95),nm("click",function(){return Nu(n),sm().expandApplicantAddress(!1)}),Yf(1,"fa-icon",8),Kf(2),Rg(3,96),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farChevronUp)}}function rB(e,t){if(1&e&&($f(0,"div",18),$f(1,"div",19),$f(2,"label",20),Cm(3),Jf(),$f(4,"p",97),Cm(5),Jf(),Jf(),Jf()),2&e){var n=sm();dp(3),xm(n.descriptionLabel),dp(2),Sm(" ",null==n.requestPermit?null:n.requestPermit.description,"")}}function iB(e,t){if(1&e&&($f(0,"div",28),$f(1,"label",20),Cm(2),Jf(),$f(3,"p",98),Cm(4),Jv(5,"date"),Jf(),Jf()),2&e){var n=sm();dp(2),xm(n.dateDebutLabel),dp(2),Sm(" ",Kv(5,2,null==n.requestPermit?null:n.requestPermit.dateTravaux,"d MMMM yyyy"),"")}}var oB,aB=((oB=function(){function e(t,n,r,i,o){is(this,e),this.pelService=t,this.route=n,this.router=r,this.globalsService=i,this.localeId=o,this.hasPaymentUnavailableError=new ty,this.showPermitPdfDialog=!1,this.downloadCopyState=HM.Ready,this.downloadCardboardState=HM.Ready,this.invoicesInDownloading=[],this.invoicesDownloadingError=[],this.viewStateEnum=HM,this.showMoreInterventions=!1,this.showApplicantAddress=!1,this.eDownloadFileType=Fq,this.isProcessing=!1,this.totalInvoiceAmount=0,this.farEye=FL,this.farFileDownload=qL,this.farCheck=SL,this.farChevronDown=PL,this.farChevronUp=AL,this.farDollarSign=RL,this.farEdit=VL,this.farExclamationTriangle=NL,this.farReceipt=nF,this.farSpinnerThird=aF}return as(e,[{key:"ngOnInit",value:function(){var e,t;this.descriptionLabel=hj.RES_DESCRITPION,"UR"===(null===(e=this.requestPermit)||void 0===e?void 0:e.codeModule)&&(this.descriptionLabel="en"===this.localeId?hj.RES_NATURE_DEMANDE_EN:hj.RES_NATURE_DEMANDE_FR),this.dateDebutLabel="PA"===(null===(t=this.requestPermit)||void 0===t?void 0:t.codeModule)?"en"===this.localeId?hj.RES_DATE_OCCUPATION_EN:hj.RES_DATE_OCCUPATION_FR:"en"===this.localeId?hj.RES_DEBUT_TRAVAUX_EN:hj.RES_DEBUT_TRAVAUX_FR}},{key:"isInvoicePaid",value:function(e){var t;return(null===(t=null==e?void 0:e.referencePaiement)||void 0===t?void 0:t.length)>0}},{key:"isStudyCostInvoice",value:function(e){var t;return null===(t=null==e?void 0:e.invoiceNo)||void 0===t?void 0:t.includes("FRAIS_ETUDE")}},{key:"hasInvoiceToPay",value:function(){var e,t=!0;if(!this.requestPermit.permisType.pel_Gratuit&&this.requestPermit.factures&&this.requestPermit.factures.length>0){var n,r=Qa(null===(e=this.requestPermit)||void 0===e?void 0:e.factures);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!this.isStudyCostInvoice(i)&&((null==i?void 0:i.totalAmount)<=0||this.isInvoicePaid(i)))t=!1;else if(!this.isStudyCostInvoice(i)){t=!0;break}}}catch(o){r.e(o)}finally{r.f()}}else t=!1;return t}},{key:"setPermitPdfDialog",value:function(){this.showPermitPdfDialog=!this.showPermitPdfDialog}},{key:"downloadPermit",value:function(){var e;this.downloadPermitEnabled()&&this.downloadFile(null===(e=this.requestPermit)||void 0===e?void 0:e.cartonCertificatPDFId,Fq.Cardboard)}},{key:"downloadPermitEnabled",value:function(){return!!this.requestPermit&&("PL"!==this.requestPermit.codeModule?!this.hasInvoiceToPay()&&this.requestPermit.cartonCertificatPDFId>0:!this.hasInvoiceToPay())}},{key:"modifyPermitEnabled",value:function(){var e;return!(!this.requestPermit||(null===(e=this.requestPermit)||void 0===e?void 0:e.convertedV1)||this.requestPermit.isReadOnly)}},{key:"downloadRequest",value:function(){var e;this.downloadRequestEnabled()&&this.downloadFile(null===(e=this.requestPermit)||void 0===e?void 0:e.demandePDFId,Fq.RequestPdf)}},{key:"downloadRequestEnabled",value:function(){return!this.requestPermit||!this.hasInvoiceToPay()&&this.requestPermit.demandePDFId>0}},{key:"downloadInvoiceEnabled",value:function(e){return null!==this.requestPermit.factures.find(function(t){return t.id===e}).idFichier}},{key:"getTimelineStates",value:function(){var e,t,n,r,i,o,a=this,s=[];if(this.requestPermitStates)if(s.push({title:null===(e=this.requestPermitStates.find(function(e){return"1"===e.value}))||void 0===e?void 0:e.text,isCompleted:!0}),this.requestPermit.requestIsCompleted){-1!==this.requestPermit.interventions.findIndex(function(e){var t;return e.etat.toUpperCase()===(null===(t=a.requestPermitStates.find(function(e){return"4"===e.value}))||void 0===t?void 0:t.text.toUpperCase())})?s.push({title:null===(n=this.requestPermitStates.find(function(e){return"4"===e.value}))||void 0===n?void 0:n.text,isCompleted:!0}):-1!==this.requestPermit.interventions.findIndex(function(e){var t;return e.etat.toUpperCase()===(null===(t=a.requestPermitStates.find(function(e){return"3"===e.value}))||void 0===t?void 0:t.text.toUpperCase())})?s.push({title:null===(r=this.requestPermitStates.find(function(e){return"3"===e.value}))||void 0===r?void 0:r.text,isCompleted:!0}):-1!==this.requestPermit.interventions.findIndex(function(e){var t;return e.etat.toUpperCase()===(null===(t=a.requestPermitStates.find(function(e){return"2"===e.value}))||void 0===t?void 0:t.text.toUpperCase())})&&s.push({title:null===(i=this.requestPermitStates.find(function(e){return"2"===e.value}))||void 0===i?void 0:i.text,isCompleted:!0});var l=null===(o=this.requestPermitStates.find(function(e){return e.value===a.requestPermit.etatActuel.toString()}))||void 0===o?void 0:o.text;"en"===this.localeId&&5===this.requestPermit.etatActuel&&(l="Permit issued"),s.push({title:l,isCompleted:!0})}else this.requestPermit.etatActuel>1&&s.push({title:null===(t=this.requestPermitStates.find(function(e){return e.value===a.requestPermit.etatActuel.toString()}))||void 0===t?void 0:t.text,isCompleted:!0});return s=this.addFutureStatesToTimeline(s)}},{key:"addFutureStatesToTimeline",value:function(e){if(1===this.requestPermit.etatActuel&&e.push({title:"en"===this.localeId?"Processing":"Traitement",isCompleted:!1}),!this.requestPermit.requestIsCompleted){var t="";switch(this.requestPermit.codeModule){case"PC":case"PL":t="en"===this.localeId?"Issuance":"\xc9mission";break;default:t="en"===this.localeId?"Request processed":"La demande a \xe9t\xe9 trait\xe9e."}e.push({title:t,isCompleted:!1})}return e}},{key:"expandDisplayedInterventions",value:function(e){this.showMoreInterventions=e}},{key:"expandApplicantAddress",value:function(e){this.showApplicantAddress=e}},{key:"downloadFile",value:function(e,t){var n=this;if(this.updateDownloadState(HM.Loading,t,e),t!==Fq.Invoice){var r=this.requestPermit.fichiers.find(function(t){return t.id===e});if(r)if("pdf"===r.nomFichierOriginal.split(".").pop().toLowerCase()){var i=r.nomFichierOriginal.split(".").shift();this.pelService.getFileDataByFileId(e,t).subscribe(function(r){n.updateDownloadState(HM.Ready,t,e),cj.downloadFile(i,r.result,dj.PDF)},function(r){n.updateDownloadState(HM.Error,t,e)})}else this.updateDownloadState(HM.Error,t,e);else this.updateDownloadState(HM.Error,t,e)}else{var o=this.requestPermit.factures.find(function(t){return t.idFichier===e});o&&this.pelService.getFileDataByFileId(e,t).subscribe(function(r){n.updateDownloadState(HM.Ready,t,e),cj.downloadFile(n.requestPermit.id+"_"+n.requestPermit.numeroSuivi+"_"+o.invoiceNo+"_FACTURE.PDF",r.result,dj.PDF)},function(r){n.updateDownloadState(HM.Error,t,e)})}}},{key:"payPermit",value:function(){var e=this;this.isProcessing=!0;var t={numeroSuivi:this.requestPermit.numeroSuivi,nomRequerant:this.requestPermit.nomRequerant,idCitoyen:null};this.pelService.createRequestPayment(t,this.getCallbackUrl(t)).subscribe(function(t){e.hasPaymentUnavailableError.emit(!1),null!==t.result.redirectUrl&&(e.globalsService.getIsInIFrame?window.parent.location.href=t.result.redirectUrl:window.location.href=t.result.redirectUrl),e.isProcessing=!1},function(t){e.hasPaymentUnavailableError.emit(!0),setTimeout(function(){var e;null===(e=window.document.getElementById("divErrorPaymentUnavailable"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500),e.isProcessing=!1})}},{key:"viewPermit",value:function(){this.router.navigate(["view"])}},{key:"editPermit",value:function(){this.modifyPermitEnabled()&&this.router.navigate(["edit"])}},{key:"hasInvoicePayableOnline",value:function(){return!this.isInvoiceAmountByPassMaxAllowed()&&this.totalInvoiceAmount>0}},{key:"isInvoicePayableOnline",value:function(e){if(!e||!(null==e?void 0:e.frais))return!1;var t=e.frais.filter(function(e){var t;return null===(t=e.feeItemLabel)||void 0===t?void 0:t.includes("*")});return!(null==t?void 0:t.length)}},{key:"areAllInvoicesPayableOnline",value:function(){var e,t,n=this,r=!0;return(null===(t=null===(e=this.requestPermit)||void 0===e?void 0:e.factures)||void 0===t?void 0:t.length)>0?this.requestPermit.factures.forEach(function(e){n.isInvoicePayableOnline(e)||(r=!1)}):r=!1,r}},{key:"updateDownloadState",value:function(e,t,n){var r,i,o,a,s=this;t===Fq.Cardboard?this.downloadCardboardState=e:t===Fq.RequestPdf?this.downloadCopyState=e:e===HM.Loading?null===(r=this.invoicesInDownloading)||void 0===r||r.push(n):e===HM.Ready?this.invoicesInDownloading=null===(i=this.invoicesInDownloading)||void 0===i?void 0:i.filter(function(e){return e!==n}):e===HM.Error&&(this.invoicesInDownloading=null===(o=this.invoicesInDownloading)||void 0===o?void 0:o.filter(function(e){return e!==n}),null===(a=this.invoicesDownloadingError)||void 0===a||a.push(n)),e===HM.Error&&setTimeout(function(){t===Fq.Cardboard?s.downloadCardboardState===HM.Error&&(s.downloadCardboardState=HM.Ready):t===Fq.RequestPdf?s.downloadCopyState===HM.Error&&(s.downloadCopyState=HM.Ready):s.invoicesDownloadingError&&s.invoicesDownloadingError.indexOf(n)>-1&&(s.invoicesDownloadingError=s.invoicesDownloadingError.filter(function(e){return e!==n}))},5e3)}},{key:"isVoilaWidget",value:function(){return this.globalsService.isVoilaWidget()}},{key:"isExternalWidget",value:function(){return this.globalsService.isExternalWidget()}},{key:"getCallbackUrl",value:function(e){var t=zM.encodeRequest(e),n="";return localStorage.getItem("originFullURL")?n=localStorage.getItem("originFullURL").includes("?")?localStorage.getItem("originFullURL")+"&pelV2Url="+encodeURIComponent(document.location.href):localStorage.getItem("originFullURL")+"?pelV2Url="+encodeURIComponent(document.location.href):document.location.href.includes("localhost")?n=n+"/request?infos="+t:n+="/".concat(this.localeId,"/request?infos=").concat(t),this.isVoilaWidget()?n+="&display=voila":this.isExternalWidget()&&(n+="&display=external"),n}},{key:"isInIframeMode",value:function(){return this.route.queryParams.subscribe(function(e){if(e.display)switch(e.display.toLowerCase()){case"external":case"voila":return!0;default:return!1}if(e.mobileUserDataKey)return!1}),!1}},{key:"hasAnyNewPermitFile",value:function(){var e,t=this;return this.downloadEnabled()&&(null===(e=this.requestPermit)||void 0===e?void 0:e.fichiers.some(function(e){return null===e.dateTelechargement&&t.isDownloadEnabled(e.id)}))}},{key:"GetDownloadableFiles",value:function(){var e,t=this;return null===(e=this.requestPermit)||void 0===e?void 0:e.fichiers.filter(function(e){return t.isDownloadEnabled(e.id)}).sort(function(e,t){return e.codeEnregistrement-t.codeEnregistrement})}},{key:"downloadEnabled",value:function(){var e,t;return"DT"!==(null===(e=this.requestPermit)||void 0===e?void 0:e.codeModule)&&(null===(t=this.GetDownloadableFiles())||void 0===t?void 0:t.length)>0}},{key:"isDownloadEnabled",value:function(e){var t=this.requestPermit.fichiers.find(function(t){return t.id===e});return(2==(null==t?void 0:t.codeEnregistrement)||3==(null==t?void 0:t.codeEnregistrement)||4==(null==t?void 0:t.codeEnregistrement))&&this.downloadPermitEnabled()}},{key:"isInvoiceAmountByPassMaxAllowed",value:function(){var e,t,n,r,i,o=this,a=!1;return 0==this.totalInvoiceAmount&&(null===(t=null===(e=this.requestPermit)||void 0===e?void 0:e.factures)||void 0===t||t.forEach(function(e){!o.isStudyCostInvoice(e)&&o.isInvoicePayableOnline(e)&&(e.referencePaiement||(o.totalInvoiceAmount+=e.totalAmount))})),null!==(null===(n=this.requestPermit)||void 0===n?void 0:n.permisType.montantMaximumPayableEnLigne)&&(null===(r=this.requestPermit)||void 0===r?void 0:r.permisType.montantMaximumPayableEnLigne)>0&&(a=this.totalInvoiceAmount>(null===(i=this.requestPermit)||void 0===i?void 0:i.permisType.montantMaximumPayableEnLigne)),a}}]),e}()).\u0275fac=function(e){return new(e||oB)(Qf(Bq),Qf(AD),Qf(JN),Qf(zq),Qf(Ry))},oB.\u0275cmp=zl({type:oB,selectors:[["pel-follow-up-permit"]],inputs:{paymentStatus:"paymentStatus",requestPermit:"requestPermit",requestPermitStates:"requestPermitStates"},outputs:{hasPaymentUnavailableError:"hasPaymentUnavailableError"},decls:44,vars:19,consts:function(){return[[1,"title","px-3"],"Demande",[1,"px-3"],[1,"subtitle","d-inline-block","mr-2"],"Type\xA0:",[1,"header-buttons","mt-2"],["data-testid","92db79b7-ac02-43df-bbe8-1c5f35130c6f",1,"btn","btn-secondary","btn-icon-tall",3,"disabled","click"],[1,"d-flex","align-items-center"],[3,"icon"],"Consulter la demande initiale",["data-testid","d9861c15-32f0-40eb-bf52-d7d42e788610",1,"btn","btn-secondary","btn-icon-tall",3,"disabled","click"],"Modifier la demande initiale",["class","btn btn-content expandable mb-1",3,"expanded",4,"ngIf"],[3,"paymentStatus",4,"ngIf"],[1,"card","border-0","shadow-sm","mt-2"],["class","card-header",4,"ngIf"],[1,"card-body","py-0"],["class","row pel-grid",4,"ngIf"],[1,"row","pel-grid"],[1,"col-12"],[1,"font-weight-bold"],"Demandeur",[1,"mb-0"],["class","mb-0","data-testid","93F1551A-EA70-4A66-AF81-20E0CB95964A",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","1c546fc5-1ea1-4b8e-938f-bfaec7e28e3e",3,"click",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","307de3a7-36f7-460d-b5d2-fcb874c4f24e",3,"click",4,"ngIf"],[1,"row","pel-grid","cols-2"],["class","col-6",4,"ngIf"],[1,"col-6"],"Emplacement",["data-testid","A5DC469A-9B70-4E1F-9027-02E9A0DFEEA5",1,"mb-0"],[1,"btn","btn-content","expandable","mb-1"],["href","javascript:void(0);","data-testid","bba253da-9680-4383-984e-227fcf547b02",3,"click"],["class","d-flex justify-content-center",4,"ngIf"],[1,"d-flex","justify-content-center"],[1,"flex-shrink-1","align-self-center","icon-expand"],["class","expandable-content",4,"ngIf"],["class","span-in-line chip chip-small chip-alert",4,"ngIf"],[1,"span-in-line","chip","chip-small","chip-alert"],"Nouveau","DOCUMENTS \xC0 T\xC9L\xC9CHARGER ",[1,"expandable-content"],["id","pdfDownloadmodal"],[1,"modal-body"],[3,"permitFiles"],[3,"paymentStatus"],[1,"card-header"],[1,"pel-progress","mb-3"],[3,"step-disabled",4,"ngFor","ngForOf"],[1,"intervention-list"],[1,"intervention-list-item"],[1,"mb-1"],["class","intervention-list-detailed",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","208b8044-072a-4f70-bf71-29ecdb2a780a",3,"click",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","95cb5d88-3850-4cf1-9c0f-8c96577aa330",3,"click",4,"ngIf"],[1,"step-title"],[1,"intervention-list-detailed"],["class","intervention-list-item",4,"ngFor","ngForOf"],["href","javascript:void(0);","data-testid","208b8044-072a-4f70-bf71-29ecdb2a780a",1,"pel-expand","mb-0",3,"click"],"Voir l'historique d\xE9taill\xE9",["href","javascript:void(0);","data-testid","95cb5d88-3850-4cf1-9c0f-8c96577aa330",1,"pel-expand","mb-0",3,"click"],"Masquer l'historique d\xE9taill\xE9","Factures",["class","card mb-2",4,"ngFor","ngForOf"],["class","row mt-3",4,"ngIf"],[1,"row","mt-3"],["class","btn btn-primary btn-big w-100","data-testid","b93ed1f1-ae9c-4bfd-9207-3602d0dcb333",3,"click",4,"ngIf"],[1,"card","mb-2"],[1,"card-body","p-2","pl-3"],[1,"row","justify-content-between","align-items-center"],[1,"col","d-flex"],[1,"mr-2",3,"icon"],[4,"ngIf"],["class","pel-badge muted ml-2 mb-0","data-testid","2F4C21C7-1816-4F21-ABCE-F91E70C2C3D1",4,"ngIf"],[1,"col-auto"],["data-testid","35845274-c93e-4630-b161-29e5e15f31da",1,"btn","btn-secondary",3,"disabled","click"],"Montant",["data-testid","2F4C21C7-1816-4F21-ABCE-F91E70C2C3D1",1,"pel-badge","muted","ml-2","mb-0"],[1,"mr-1",3,"icon"],"Pay\xE9","T\xE9l\xE9charger",[3,"icon","spin"],"T\xE9l\xE9charger\u2026 ","Erreur lors du t\xE9l\xE9chargement",[1,"text-muted","mb-0"],"* Non payable en ligne",["data-testid","b93ed1f1-ae9c-4bfd-9207-3602d0dcb333",1,"btn","btn-primary","btn-big","w-100",3,"click"],"Payer en ligne",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"],["src","assets/warning.svg"],"Montant maximum atteint pour le paiement en ligne. Doit \xEAtre pay\xE9 au comptoir. ",["data-testid","93F1551A-EA70-4A66-AF81-20E0CB95964A",1,"mb-0"],["href","javascript:void(0);","data-testid","1c546fc5-1ea1-4b8e-938f-bfaec7e28e3e",1,"pel-expand","mb-0",3,"click"],"Voir les coordonn\xE9es",["href","javascript:void(0);","data-testid","307de3a7-36f7-460d-b5d2-fcb874c4f24e",1,"pel-expand","mb-0",3,"click"],"Masquer les coordonn\xE9es",["data-testid","546C9FC5-71FA-4D0A-A303-75A6533F2DBC",1,"req-desc","mb-0"],["data-testid","8B4C8119-928D-4340-9A37-E5BC9E3057D1",1,"mb-0"]]},template:function(e,t){1&e&&($f(0,"h2",0),Kf(1),Rg(2,1),Zf(),Cm(3),Jf(),$f(4,"div",2),$f(5,"h6",3),Kf(6),Rg(7,4),Zf(),Kf(8),Cm(9),Zf(),Jf(),Jf(),$f(10,"section",5),$f(11,"button",6),nm("click",function(){return t.viewPermit()}),$f(12,"div",7),Yf(13,"fa-icon",8),Kf(14),Rg(15,9),Zf(),Jf(),Jf(),$f(16,"button",10),nm("click",function(){return t.editPermit()}),$f(17,"div",7),Yf(18,"fa-icon",8),Kf(19),Rg(20,11),Zf(),Jf(),Jf(),Jf(),Uf(21,Vj,8,6,"div",12),Uf(22,Dj,1,1,"pel-follow-up-payment-result",13),$f(23,"section",14),Uf(24,jj,12,10,"div",15),$f(25,"div",16),Uf(26,Zj,10,4,"div",17),$f(27,"div",18),$f(28,"div",19),$f(29,"label",20),Rg(30,21),Jf(),$f(31,"p",22),Cm(32),Jf(),Uf(33,eB,7,6,"address",23),Uf(34,tB,4,1,"a",24),Uf(35,nB,4,1,"a",25),Jf(),Jf(),Uf(36,rB,6,2,"div",17),$f(37,"div",26),Uf(38,iB,6,5,"div",27),$f(39,"div",28),$f(40,"label",20),Rg(41,29),Jf(),$f(42,"p",30),Cm(43),Jf(),Jf(),Jf(),Jf(),Jf()),2&e&&(dp(3),Sm(" ",null==t.requestPermit?null:t.requestPermit.numeroSuivi,"\n"),dp(6),Sm(" ","en"===t.localeId?null==t.requestPermit||null==t.requestPermit.permisType?null:t.requestPermit.permisType.descriptionEn:null==t.requestPermit||null==t.requestPermit.permisType?null:t.requestPermit.permisType.description," "),dp(2),Wf("disabled",null==t.requestPermit?null:t.requestPermit.convertedV1),dp(2),Wf("icon",t.farEye),dp(3),Wf("disabled",!t.modifyPermitEnabled()),dp(2),Wf("icon",t.farEdit),dp(3),Wf("ngIf",t.downloadEnabled()),dp(1),Wf("ngIf",t.paymentStatus),dp(2),Wf("ngIf",(null==t.requestPermit||null==t.requestPermit.interventions?null:t.requestPermit.interventions.length)>0),dp(2),Wf("ngIf",(null==t.requestPermit?null:t.requestPermit.factures.length)>0),dp(6),Pm("",null==t.requestPermit?null:t.requestPermit.prenomRequerant,"\xa0",null==t.requestPermit?null:t.requestPermit.nomRequerant,""),dp(1),Wf("ngIf",t.showApplicantAddress),dp(1),Wf("ngIf",!t.showApplicantAddress),dp(1),Wf("ngIf",t.showApplicantAddress),dp(1),Wf("ngIf",null==t.requestPermit?null:t.requestPermit.description),dp(2),Wf("ngIf",null==t.requestPermit?null:t.requestPermit.dateTravaux),dp(5),Pm(" ",null==t.requestPermit?null:t.requestPermit.noCiviqueEmplacement," ",null==t.requestPermit?null:t.requestPermit.adresseEmplacement,""))},directives:[DM,M_,_j,Aj,L_],pipes:[aw,sw,WR],styles:[".header-buttons[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:1rem;max-width:400px}@media screen and (max-width:390px){.header-buttons[_ngcontent-%COMP%]{margin-left:-1rem;padding-right:0}}.header-buttons[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{text-align:left;line-height:1rem;height:3.25rem;width:168px;font-size:.875rem;margin-bottom:.5rem;margin-left:.5rem;border-radius:.5rem}.header-buttons[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:.5rem;font-size:1.125rem;width:1.125rem;min-width:1.125rem;text-align:center}.header-buttons[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%] > .text-3lines[_ngcontent-%COMP%]{margin-top:-.25rem}.intervention-list[_ngcontent-%COMP%]{margin-left:-1rem;margin-right:-1rem}.intervention-list[_ngcontent-%COMP%]   .intervention-list-item[_ngcontent-%COMP%]{padding:.75rem 1rem}.intervention-list[_ngcontent-%COMP%]   .intervention-list-detailed[_ngcontent-%COMP%]   .intervention-list-item[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.25)}.pel-grid[_ngcontent-%COMP%]:first-child{border-top:none}.pel-grid[_ngcontent-%COMP%]:last-child{box-shadow:none}.pel-grid[_ngcontent-%COMP%]:last-child > *[_ngcontent-%COMP%]{border-bottom:none}.req-desc[_ngcontent-%COMP%]{white-space:pre-wrap}.span-padding[_ngcontent-%COMP%]{padding-left:2px}.span-in-line[_ngcontent-%COMP%], .span-padding[_ngcontent-%COMP%]{display:inline}"],data:{animation:[Zw("slideInOut",[rC(":enter",[tC({overflow:"hidden",height:"0"}),Xw("200ms ease-out",tC({height:"*"}))]),rC(":leave",[Xw("200ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),oB);function sB(e,t){if(1&e&&($f(0,"li"),$f(1,"span",37),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;gm("step-disabled",!n.isCompleted),dp(2),xm(n.title)}}function lB(e,t){if(1&e&&($f(0,"div",32),$f(1,"h6",33),Cm(2),Jv(3,"date"),Jf(),Cm(4),Jf()),2&e){var n=t.$implicit;dp(2),Pm("",Kv(3,3,n.dateIntervention,"medium")," - ",n.description,""),dp(2),Sm(" ",n.noteClient," ")}}function uB(e,t){if(1&e&&($f(0,"div",38),Uf(1,lB,5,6,"div",39),Jf()),2&e){var n=sm(2);Wf("@slideInOut",void 0),dp(1),Wf("ngForOf",null==n.requestQS||null==n.requestQS.interventions?null:n.requestQS.interventions.slice().reverse().slice(1))}}function cB(e,t){if(1&e){var n=Xf();$f(0,"a",40),nm("click",function(){return Nu(n),sm(2).expandDisplayedInterventions(!0)}),Kf(1),Rg(2,41),Zf(),Yf(3,"fa-icon",8),Jf()}if(2&e){var r=sm(2);dp(3),Wf("icon",r.farChevronDown)}}function dB(e,t){if(1&e){var n=Xf();$f(0,"a",42),nm("click",function(){return Nu(n),sm(2).expandDisplayedInterventions(!1)}),Yf(1,"fa-icon",8),Kf(2),Rg(3,43),Zf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farChevronUp)}}function hB(e,t){if(1&e&&($f(0,"div",28),$f(1,"ul",29),Uf(2,sB,3,3,"li",30),Jf(),$f(3,"div",31),$f(4,"div",32),$f(5,"h6",33),Cm(6),Jv(7,"date"),Jf(),Cm(8),Jf(),Uf(9,uB,2,2,"div",34),Jf(),Uf(10,cB,4,1,"a",35),Uf(11,dB,4,1,"a",36),Jf()),2&e){var n=sm();dp(2),Wf("ngForOf",n.getTimelineStates()),dp(4),Pm(" ",Kv(7,7,null==n.requestQS||null==n.requestQS.interventions?null:n.requestQS.interventions.slice().reverse()[0].dateIntervention,"medium")," - ",null==n.requestQS||null==n.requestQS.interventions?null:n.requestQS.interventions.slice().reverse()[0].description," "),dp(2),Sm(" ",null==n.requestQS||null==n.requestQS.interventions?null:n.requestQS.interventions.slice().reverse()[0].noteClient," "),dp(1),Wf("ngIf",n.showMoreInterventions),dp(1),Wf("ngIf",(null==n.requestQS||null==n.requestQS.interventions?null:n.requestQS.interventions.length)>1&&!n.showMoreInterventions),dp(1),Wf("ngIf",n.showMoreInterventions)}}function pB(e,t){if(1&e&&(Kf(0),Cm(1),Jv(2,"mask"),Yf(3,"br"),Zf()),2&e){var n=sm(2);dp(1),Sm(" ",Kv(2,1,null==n.requestQS?null:n.requestQS.telephoneRequerant,"(000) 000-0000"),"")}}function fB(e,t){if(1&e&&($f(0,"address",44),Cm(1),Yf(2,"br"),Cm(3),Yf(4,"br"),Uf(5,pB,4,4,"ng-container",45),Cm(6),Jf()),2&e){var n=sm();Wf("@slideInOut",void 0),dp(1),Sm(" ",null==n.requestQS?null:n.requestQS.adresseRequerant,""),dp(2),Pm(" ",null==n.requestQS?null:n.requestQS.villeRequerant," ",null==n.requestQS?null:n.requestQS.codePostalRequerant,""),dp(2),Wf("ngIf",null==n.requestQS?null:n.requestQS.telephoneRequerant),dp(1),Sm(" ",null==n.requestQS?null:n.requestQS.courrielRequerant," ")}}function mB(e,t){if(1&e){var n=Xf();$f(0,"a",46),nm("click",function(){return Nu(n),sm().expandApplicantAddress(!0)}),Kf(1),Rg(2,47),Zf(),Yf(3,"fa-icon",8),Jf()}if(2&e){var r=sm();dp(3),Wf("icon",r.farChevronDown)}}function gB(e,t){if(1&e){var n=Xf();$f(0,"a",48),nm("click",function(){return Nu(n),sm().expandApplicantAddress(!1)}),Yf(1,"fa-icon",8),Kf(2),Rg(3,49),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farChevronUp)}}function vB(e,t){if(1&e&&($f(0,"div",15),$f(1,"div",16),$f(2,"label",17),Rg(3,50),Jf(),$f(4,"p",51),Cm(5),Jf(),Jf(),Jf()),2&e){var n=sm();dp(5),Sm(" ",null==n.requestQS?null:n.requestQS.description,"")}}var yB,bB=((yB=function(){function e(t,n,r,i,o){is(this,e),this.pelService=t,this.route=n,this.router=r,this.globalsService=i,this.localeId=o,this.viewStateEnum=HM,this.showMoreInterventions=!1,this.showApplicantAddress=!1,this.farEye=FL,this.farEdit=VL,this.farChevronDown=PL,this.farChevronUp=AL}return as(e,[{key:"ngOnInit",value:function(){}},{key:"viewDemandeQS",value:function(){this.router.navigate(["view"])}},{key:"modifyRequestQSEnabled",value:function(){return!!this.requestQS&&!this.requestQS.isReadOnly}},{key:"editDemandeQS",value:function(){this.modifyRequestQSEnabled()&&this.router.navigate(["edit"])}},{key:"getTimelineStates",value:function(){var e,t,n,r,i,o,a=this,s=[];if(this.requestQSStates)if(s.push({title:null===(e=this.requestQSStates.find(function(e){return"1"===e.value}))||void 0===e?void 0:e.text,isCompleted:!0}),this.requestQS.requestIsCompleted){-1!==this.requestQS.interventions.findIndex(function(e){var t;return e.etat.toUpperCase()===(null===(t=a.requestQSStates.find(function(e){return"4"===e.value}))||void 0===t?void 0:t.text.toUpperCase())})?s.push({title:null===(n=this.requestQSStates.find(function(e){return"4"===e.value}))||void 0===n?void 0:n.text,isCompleted:!0}):-1!==this.requestQS.interventions.findIndex(function(e){var t;return e.etat.toUpperCase()===(null===(t=a.requestQSStates.find(function(e){return"3"===e.value}))||void 0===t?void 0:t.text.toUpperCase())})?s.push({title:null===(r=this.requestQSStates.find(function(e){return"3"===e.value}))||void 0===r?void 0:r.text,isCompleted:!0}):-1!==this.requestQS.interventions.findIndex(function(e){var t;return e.etat.toUpperCase()===(null===(t=a.requestQSStates.find(function(e){return"2"===e.value}))||void 0===t?void 0:t.text.toUpperCase())})&&s.push({title:null===(i=this.requestQSStates.find(function(e){return"2"===e.value}))||void 0===i?void 0:i.text,isCompleted:!0});var l=null===(o=this.requestQSStates.find(function(e){return e.value===a.requestQS.etatActuel.toString()}))||void 0===o?void 0:o.text;s.push({title:l,isCompleted:!0})}else this.requestQS.etatActuel>1&&s.push({title:null===(t=this.requestQSStates.find(function(e){return e.value===a.requestQS.etatActuel.toString()}))||void 0===t?void 0:t.text,isCompleted:!0});return s=this.addFutureStatesToTimeline(s)}},{key:"addFutureStatesToTimeline",value:function(e){var t;(1===this.requestQS.etatActuel&&e.push({title:"en"===this.localeId?"Processing":"Traitement en cours",isCompleted:!1}),this.requestQS.requestIsCompleted)||(t="en"===this.localeId?"Request processed":"Demande compl\xe9t\xe9e",e.push({title:t,isCompleted:!1}));return e}},{key:"expandDisplayedInterventions",value:function(e){this.showMoreInterventions=e}},{key:"expandApplicantAddress",value:function(e){this.showApplicantAddress=e}}]),e}()).\u0275fac=function(e){return new(e||yB)(Qf(Bq),Qf(AD),Qf(JN),Qf(zq),Qf(Ry))},yB.\u0275cmp=zl({type:yB,selectors:[["pel-follow-up-qs"]],inputs:{requestQS:"requestQS",requestQSStates:"requestQSStates"},decls:40,vars:15,consts:function(){return[[1,"title","px-3"],"Demande",[1,"px-3"],[1,"subtitle","d-inline-block","mr-2"],"Nature\xA0:",[1,"header-buttons","mt-2"],["data-testid","9AB43C31-F116-48A2-B293-1E8228D8B573",1,"btn","btn-secondary","btn-icon-tall",3,"click"],[1,"d-flex","align-items-center"],[3,"icon"],"Consulter la demande initiale",["data-testid","9EB2577A-3570-4294-A08E-B7C28ED64ED2",1,"btn","btn-secondary","btn-icon-tall",3,"disabled","hidden","click"],"Modifier la demande initiale",[1,"card","border-0","shadow-sm","mt-2"],["class","card-header",4,"ngIf"],[1,"card-body","py-0"],[1,"row","pel-grid"],[1,"col-12"],[1,"font-weight-bold"],"Demandeur",[1,"mb-0"],["class","mb-0","data-testid","5D512DA4-D765-47E4-809A-5C4F1A0E1C6D",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","9C2AB732-12EE-4306-B005-5884513605AE",3,"click",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","B3EF29F5-0CB5-48F7-873B-B48BC0244578",3,"click",4,"ngIf"],["class","row pel-grid",4,"ngIf"],[1,"row","pel-grid","cols-2"],[1,"col-6"],"Emplacement",["data-testid","990E455B-39E0-4FFA-971A-9628FA4A6CC1",1,"mb-0"],[1,"card-header"],[1,"pel-progress","mb-3"],[3,"step-disabled",4,"ngFor","ngForOf"],[1,"intervention-list"],[1,"intervention-list-item"],[1,"mb-1"],["class","intervention-list-detailed",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","D2D99479-4F84-4FC6-A1ED-E294BCD9D559",3,"click",4,"ngIf"],["class","pel-expand mb-0","href","javascript:void(0);","data-testid","A4BEA547-05D1-492E-975C-712C87F8D808",3,"click",4,"ngIf"],[1,"step-title"],[1,"intervention-list-detailed"],["class","intervention-list-item",4,"ngFor","ngForOf"],["href","javascript:void(0);","data-testid","D2D99479-4F84-4FC6-A1ED-E294BCD9D559",1,"pel-expand","mb-0",3,"click"],"Voir l'historique d\xE9taill\xE9",["href","javascript:void(0);","data-testid","A4BEA547-05D1-492E-975C-712C87F8D808",1,"pel-expand","mb-0",3,"click"],"Masquer l'historique d\xE9taill\xE9",["data-testid","5D512DA4-D765-47E4-809A-5C4F1A0E1C6D",1,"mb-0"],[4,"ngIf"],["href","javascript:void(0);","data-testid","9C2AB732-12EE-4306-B005-5884513605AE",1,"pel-expand","mb-0",3,"click"],"Voir les coordonn\xE9es",["href","javascript:void(0);","data-testid","B3EF29F5-0CB5-48F7-873B-B48BC0244578",1,"pel-expand","mb-0",3,"click"],"Masquer les coordonn\xE9es","Description",["data-testid","8F4E5297-D5A5-42A8-98B1-7295543D7C10",1,"req-desc","mb-0"]]},template:function(e,t){1&e&&($f(0,"h2",0),Kf(1),Rg(2,1),Zf(),Cm(3),Jf(),$f(4,"div",2),$f(5,"h6",3),Kf(6),Rg(7,4),Zf(),Kf(8),Cm(9),Zf(),Jf(),Jf(),$f(10,"section",5),$f(11,"button",6),nm("click",function(){return t.viewDemandeQS()}),$f(12,"div",7),Yf(13,"fa-icon",8),Kf(14),Rg(15,9),Zf(),Jf(),Jf(),$f(16,"button",10),nm("click",function(){return t.editDemandeQS()}),$f(17,"div",7),Yf(18,"fa-icon",8),Kf(19),Rg(20,11),Zf(),Jf(),Jf(),Jf(),$f(21,"section",12),Uf(22,hB,12,10,"div",13),$f(23,"div",14),$f(24,"div",15),$f(25,"div",16),$f(26,"label",17),Rg(27,18),Jf(),$f(28,"p",19),Cm(29),Jf(),Uf(30,fB,7,6,"address",20),Uf(31,mB,4,1,"a",21),Uf(32,gB,4,1,"a",22),Jf(),Jf(),Uf(33,vB,6,1,"div",23),$f(34,"div",24),$f(35,"div",25),$f(36,"label",17),Rg(37,26),Jf(),$f(38,"p",27),Cm(39),Jf(),Jf(),Jf(),Jf(),Jf()),2&e&&(dp(3),Sm(" ",null==t.requestQS?null:t.requestQS.numeroSuivi,"\n"),dp(6),Sm(" ","en"===t.localeId?null==t.requestQS||null==t.requestQS.demandeNature?null:t.requestQS.demandeNature.descriptionEn:null==t.requestQS||null==t.requestQS.demandeNature?null:t.requestQS.demandeNature.description," "),dp(4),Wf("icon",t.farEye),dp(3),Wf("disabled",!t.modifyRequestQSEnabled())("hidden",!0),dp(2),Wf("icon",t.farEdit),dp(4),Wf("ngIf",(null==t.requestQS||null==t.requestQS.interventions?null:t.requestQS.interventions.length)>0),dp(7),Pm("",null==t.requestQS?null:t.requestQS.prenomRequerant,"\xa0",null==t.requestQS?null:t.requestQS.nomRequerant,""),dp(1),Wf("ngIf",t.showApplicantAddress),dp(1),Wf("ngIf",!t.showApplicantAddress),dp(1),Wf("ngIf",t.showApplicantAddress),dp(1),Wf("ngIf",null==t.requestQS?null:t.requestQS.description),dp(6),Pm(" ",null==t.requestQS?null:t.requestQS.noCiviqueEmplacement," ",null==t.requestQS?null:t.requestQS.adresseEmplacement,""))},directives:[DM,M_,L_],pipes:[aw,WR],styles:[".header-buttons[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:1rem;max-width:400px}@media screen and (max-width:390px){.header-buttons[_ngcontent-%COMP%]{margin-left:-1rem;padding-right:0}}.header-buttons[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{text-align:left;line-height:1rem;height:3.25rem;width:168px;font-size:.875rem;margin-bottom:.5rem;margin-left:.5rem;border-radius:.5rem}.header-buttons[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:.5rem;font-size:1.125rem;width:1.125rem;min-width:1.125rem;text-align:center}.header-buttons[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%] > .text-3lines[_ngcontent-%COMP%]{margin-top:-.25rem}.intervention-list[_ngcontent-%COMP%]{margin-left:-1rem;margin-right:-1rem}.intervention-list[_ngcontent-%COMP%]   .intervention-list-item[_ngcontent-%COMP%]{padding:.75rem 1rem}.intervention-list[_ngcontent-%COMP%]   .intervention-list-detailed[_ngcontent-%COMP%]   .intervention-list-item[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.25)}.pel-grid[_ngcontent-%COMP%]:first-child{border-top:none}.pel-grid[_ngcontent-%COMP%]:last-child{box-shadow:none}.pel-grid[_ngcontent-%COMP%]:last-child > *[_ngcontent-%COMP%]{border-bottom:none}.req-desc[_ngcontent-%COMP%]{white-space:pre-wrap}"],data:{animation:[Zw("slideInOut",[rC(":enter",[tC({overflow:"hidden",height:"0"}),Xw("200ms ease-out",tC({height:"*"}))]),rC(":leave",[Xw("200ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),yB);function _B(e,t){1&e&&Yf(0,"pel-follow-up-loading")}function wB(e,t){1&e&&Yf(0,"pel-error-payment-unavailable")}function CB(e,t){if(1&e){var n=Xf();$f(0,"div",5),$f(1,"a",6),nm("click",function(){return Nu(n),sm(2).unloadRequest()}),Yf(2,"fa-icon",7),$f(3,"span",8),Rg(4,9),Jf(),Jf(),Jf()}if(2&e){var r=sm(2);dp(2),Wf("icon",r.farLongArrowLeft)}}function xB(e,t){if(1&e){var n=Xf();$f(0,"pel-follow-up-search",10),nm("requestFound",function(e){return Nu(n),sm(2).setFoundedRequest(e)}),Jf()}}function SB(e,t){if(1&e){var n=Xf();$f(0,"pel-follow-up-permit",11),nm("hasPaymentUnavailableError",function(e){return Nu(n),sm(2).changeHasPaymentUnavailableError(e)}),Jf()}if(2&e){var r=sm(2);Wf("paymentStatus",r.paymentStatus)("requestPermit",r.requestPermit)("requestPermitStates",r.requestPermitStates)}}function PB(e,t){if(1&e&&Yf(0,"pel-follow-up-qs",12),2&e){var n=sm(2);Wf("requestQS",n.requestQS)("requestQSStates",n.requestQSStates)}}function kB(e,t){if(1&e&&(Kf(0),Uf(1,CB,5,1,"div",1),Uf(2,xB,1,0,"pel-follow-up-search",2),Uf(3,SB,1,3,"pel-follow-up-permit",3),Uf(4,PB,1,2,"pel-follow-up-qs",4),Zf()),2&e){var n=sm();dp(1),Wf("ngIf",(n.requestPermit||n.requestQS)&&!n.isSignalementWidget),dp(1),Wf("ngIf",!n.requestPermit&&!n.requestQS),dp(1),Wf("ngIf",n.requestPermit),dp(1),Wf("ngIf",n.requestQS)}}var EB,AB,IB,TB,OB=((EB=function(){function e(t,n,r,i,o){is(this,e),this.globalsService=t,this.pelService=n,this.route=r,this.router=i,this.localeId=o,this.viewState=HM.Ready,this.viewStateEnum=HM,this.getRequestSub=new ps,this.getRequestStackSize=0,this.isSignalementWidget=!1,this.farLongArrowLeft=GL}return as(e,[{key:"ngOnInit",value:function(){this.processUrlQueryParams(),this.isSignalementWidget=this.globalsService.isSignalementWidget();var e=this.globalsService.getCurrentFollowUpRequest();e&&this.setFoundedRequest(e)}},{key:"processUrlQueryParams",value:function(){var e=this;this.route.queryParams.subscribe(function(t){if(t.infos){e.viewState=HM.Loading;var n=zM.decodeRequest(t.infos);Object.values(UM).find(function(e){return e===t.status})&&(e.paymentStatus=t.status),e.paymentStatus===UM.Accepted?e.pelService.confirmPaymentSuccess(t.pprn).subscribe(function(t){e.waitForPaymentToGetCurrentRequest(n)}):e.getCurrentRequest(n)}})}},{key:"setFoundedRequest",value:function(e){var t=this;"QS"===e.codeModule?this.requestQS=e:this.requestPermit=e,this.pelService.getRequestStateResourceByModule(e.codeModule,this.localeId).subscribe(function(n){"QS"===e.codeModule?t.requestQSStates=n.result:t.requestPermitStates=n.result})}},{key:"unloadRequest",value:function(){this.requestQS?(this.requestQS=void 0,this.requestQSStates=[]):(this.requestPermit=void 0,this.requestPermitStates=[]),this.globalsService.setCurrentFollowUpRequest(void 0),this.router.navigate(["request"]),this.paymentStatus=void 0}},{key:"getCurrentRequest",value:function(e){var t=this;this.pelService.getRequestByFollowUpNumberLastName(e).subscribe(function(e){t.globalsService.setCurrentFollowUpRequest(e.result),e.result.soumise?t.setFoundedRequest(e.result):t.router.navigate(["edit"],{replaceUrl:!0}),t.viewState=HM.Ready},function(e){t.unloadRequest(),t.viewState=HM.Ready})}},{key:"waitForPaymentToGetCurrentRequest",value:function(e){var t=this;this.viewState===HM.Loading&&(this.getRequestSub.unsubscribe(),this.getRequestSub=this.pelService.getRequestByFollowUpNumberLastName(e).subscribe(function(n){if(n.result.factures){var r=!0;n.result.factures.forEach(function(e){e.referencePaiement&&0!==e.referencePaiement.length||(r=!1)}),r||t.getRequestStackSize>=10?(t.globalsService.setCurrentFollowUpRequest(n.result),t.setFoundedRequest(n.result),t.viewState=HM.Ready):(t.getRequestStackSize++,setTimeout(function(){t.waitForPaymentToGetCurrentRequest(e)},500))}else t.globalsService.setCurrentFollowUpRequest(n.result),t.setFoundedRequest(n.result),t.viewState=HM.Ready},function(e){t.unloadRequest(),t.viewState=HM.Ready}))}},{key:"changeHasPaymentUnavailableError",value:function(e){this.hasPaymentUnavailableError=e}}]),e}()).\u0275fac=function(e){return new(e||EB)(Qf(zq),Qf(Bq),Qf(AD),Qf(JN),Qf(Ry))},EB.\u0275cmp=zl({type:EB,selectors:[["pel-follow-up"]],decls:3,vars:3,consts:function(){return[[4,"ngIf"],["class","mb-2 px-3",4,"ngIf"],[3,"requestFound",4,"ngIf"],[3,"paymentStatus","requestPermit","requestPermitStates","hasPaymentUnavailableError",4,"ngIf"],[3,"requestQS","requestQSStates",4,"ngIf"],[1,"mb-2","px-3"],["href","javascript:void(0);",1,"link-back",3,"click"],[1,"mr-1",3,"icon"],[1,"text-small"],"Suivre une autre demande",[3,"requestFound"],[3,"paymentStatus","requestPermit","requestPermitStates","hasPaymentUnavailableError"],[3,"requestQS","requestQSStates"]]},template:function(e,t){1&e&&(Uf(0,_B,1,0,"pel-follow-up-loading",0),Uf(1,wB,1,0,"pel-error-payment-unavailable",0),Uf(2,kB,5,4,"ng-container",0)),2&e&&(Wf("ngIf",t.viewState===t.viewStateEnum.Loading),dp(1),Wf("ngIf",t.hasPaymentUnavailableError),dp(1),Wf("ngIf",t.viewState===t.viewStateEnum.Ready))},directives:[M_,Xq,ej,DM,uj,aB,bB],styles:[""]}),EB),RB=Ga("kLqA"),VB=function(){function e(){is(this,e)}return as(e,null,[{key:"PEL_SESSIONSTORAGE_FUN_KEY",get:function(){return"pel_fun"}},{key:"PEL_SESSIONSTORAGE_NAME_KEY",get:function(){return"pel_name"}},{key:"EMAIL_VALIDATOR_PATERN",get:function(){return"^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w{2,}([-.]\\w{2,})*$"}}]),e}(),DB=((TB=function(){function e(){is(this,e)}return as(e,null,[{key:"getIconFromCodeModule",value:function(e){var t;return null===(t=this.icons)||void 0===t?void 0:t.find(function(t){return t.codeModule===e})}},{key:"isLocalModuleIcon",value:function(e){return"string"==typeof(null==e?void 0:e.icon)}},{key:"getAllIcons",value:function(){return this.icons}}]),e}()).icons=[{codeModule:"QS",icon:"icon_del_white.svg"},{codeModule:"PC",icon:"icon_pel_white.svg"},{codeModule:"DT",icon:zL},{codeModule:"PL",icon:sF},{codeModule:"PA",icon:CL},{codeModule:"UR",icon:IL}],TB.\u0275fac=function(e){return new(e||TB)},TB.\u0275prov=dl({token:TB,factory:TB.\u0275fac,providedIn:"root"}),TB),NB=((IB=function(){function e(){is(this,e)}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||IB)},IB.\u0275cmp=zl({type:IB,selectors:[["pel-request-type-loading"]],decls:11,vars:0,consts:[["viewBox","0 0 256 238"],["x","48","y","50","rx","3","ry","3","width","80","height","16"],["x","48","y","74","rx","3","ry","3","width","180","height","16"],["x","0","y","0","rx","3","ry","3","width","240","height","16"],["cx","20","cy","72","r","20"],["x","48","y","118","rx","3","ry","3","width","80","height","16"],["x","48","y","142","rx","3","ry","3","width","180","height","16"],["cx","20","cy","140","r","20"],["x","48","y","186","rx","3","ry","3","width","80","height","16"],["x","48","y","210","rx","3","ry","3","width","180","height","16"],["cx","20","cy","208","r","20"]],template:function(e,t){1&e&&($f(0,"content-loader",0),cc(),Yf(1,"rect",1),Yf(2,"rect",2),Yf(3,"rect",3),Yf(4,"circle",4),Yf(5,"rect",5),Yf(6,"rect",6),Yf(7,"circle",7),Yf(8,"rect",8),Yf(9,"rect",9),Yf(10,"circle",10),Jf())},directives:[Kq],styles:["content-loader[_ngcontent-%COMP%]{display:block;width:256px}"]}),IB),LB=((AB=function(){function e(){is(this,e),this.farInfoCircle=QL}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||AB)},AB.\u0275cmp=zl({type:AB,selectors:[["pel-empty-generic"]],decls:4,vars:1,consts:function(){return[[1,"text-center","mt-2","error-empty"],["size","2x",3,"icon"],[1,"my-2"],"Aucun item n'est disponible pour le moment."]},template:function(e,t){1&e&&($f(0,"div",0),Yf(1,"fa-icon",1),$f(2,"p",2),Rg(3,3),Jf(),Jf()),2&e&&(dp(1),Wf("icon",t.farInfoCircle))},directives:[DM],styles:[""]}),AB);function FB(e,t){1&e&&Yf(0,"pel-request-type-loading")}function MB(e,t){1&e&&Yf(0,"pel-error-generic")}function qB(e,t){1&e&&Yf(0,"pel-empty-generic")}function jB(e,t){if(1&e&&Yf(0,"fa-icon",14),2&e){var n=sm().ngIf;Wf("icon",null==n?null:n.icon)}}function BB(e,t){if(1&e&&Yf(0,"img"),2&e){var n=sm().ngIf;Bf("src","assets/"+(null==n?null:n.icon),oh)}}function zB(e,t){if(1&e&&($f(0,"div",15),Uf(1,jB,1,1,"fa-icon",16),Uf(2,BB,1,1,"img",17),Jf()),2&e){var n=t.ngIf,r=sm(3);dp(1),Wf("ngIf",!r.iconHelperService.isLocalModuleIcon(n)),dp(1),Wf("ngIf",r.iconHelperService.isLocalModuleIcon(n))}}function UB(e,t){if(1&e){var n=Xf();$f(0,"a",6),nm("click",function(){Nu(n);var e=t.$implicit;return sm(2).submitRequestType(e)}),$f(1,"div",7),$f(2,"div",8),$f(3,"div",7),$f(4,"div",9),Uf(5,zB,3,2,"div",10),Jf(),$f(6,"div",11),$f(7,"div",12),Cm(8),Jf(),$f(9,"span",13),Cm(10),Jf(),Jf(),Jf(),Jf(),$f(11,"div",9),Yf(12,"fa-icon",14),Jf(),Jf(),Jf()}if(2&e){var r=t.$implicit,i=sm(2);Bf("data-testitemid",r.codeModule),dp(5),Wf("ngIf",i.iconHelperService.getIconFromCodeModule(r.codeModule)),dp(3),xm("en"===i.localeId?r.descriptionEn:r.description),dp(2),xm("en"===i.localeId?r.sousDescriptionEn:r.sousDescriptionFr),dp(2),Wf("icon",i.farChevronRight)}}function HB(e,t){if(1&e&&(Kf(0),$f(1,"p",2),Rg(2,3),Jf(),$f(3,"div",4),Uf(4,UB,13,5,"a",5),Jf(),Zf()),2&e){var n=sm();dp(4),Wf("ngForOf",n.requestTypesData)}}var QB,WB,GB=((WB=function(){function e(t,n,r){is(this,e),this.pelService=t,this.route=n,this.localeId=r,this.stepBack=new ty,this.stepSubmit=new ty,this.stepSubmitFromMatchedURL=new ty,this.requestTypesData=[],this.viewState=HM.Loading,this.viewStateEnum=HM,this.iconHelperService=DB,this.farChevronRight=EL}return as(e,[{key:"ngOnInit",value:function(){this.readRequestTypeFromURL(),this.fetchRequestTypes()}},{key:"fetchRequestTypes",value:function(){var e=this;this.pelService.getAllRequestTypes().subscribe(function(t){e.requestTypesData=t.result,e.matchRequestTypeFromURL(),e.requestTypesData&&e.requestTypesData.length>0?e.viewState=HM.Ready:(console.error("GetAllRequestTypes returned an invalid or empty array."),e.viewState=HM.Empty)},function(t){e.viewState=HM.Error})}},{key:"readRequestTypeFromURL",value:function(){var e,t,n=this;null===(t=null===(e=this.route.parent)||void 0===e?void 0:e.url)||void 0===t||t.subscribe(function(e){var t;"create"===(null===(t=e[0])||void 0===t?void 0:t.path)&&n.route.url.subscribe(function(e){var t;n.requestTypeFromURL=null===(t=e[0])||void 0===t?void 0:t.path})})}},{key:"matchRequestTypeFromURL",value:function(){var e=this;if(this.requestTypeFromURL){var t=this.requestTypesData.find(function(t){return t.codeModule===e.requestTypeFromURL});t?this.submitRequestTypeFromMatchedURL(t):this.stepBack.emit()}}},{key:"submitRequestType",value:function(e){this.stepSubmit.emit(e)}},{key:"submitRequestTypeFromMatchedURL",value:function(e){this.stepSubmitFromMatchedURL.emit(e)}}]),e}()).\u0275fac=function(e){return new(e||WB)(Qf(Bq),Qf(AD),Qf(Ry))},WB.\u0275cmp=zl({type:WB,selectors:[["pel-request-type"]],outputs:{stepBack:"stepBack",stepSubmit:"stepSubmit",stepSubmitFromMatchedURL:"stepSubmitFromMatchedURL"},decls:5,vars:5,consts:function(){return[[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"text-center","text-primary"],"Veuillez choisir le type de demande d\xE9sir\xE9.",[1,"btn-content-list"],["class","btn btn-content mb-1","data-testid","B2DE8009-F33E-47C2-8371-D16997162272","href","javascript:void(0);",3,"click",4,"ngFor","ngForOf"],["data-testid","B2DE8009-F33E-47C2-8371-D16997162272","href","javascript:void(0);",1,"btn","btn-content","mb-1",3,"click"],[1,"d-flex"],[1,"w-100"],[1,"flex-shrink-1","align-self-center"],["class","icon-circle",4,"ngIf"],[1,"px-2"],[1,"text-primary"],[1,"text-primary-muted"],[3,"icon"],[1,"icon-circle"],[3,"icon",4,"ngIf"],[4,"ngIf"]]},template:function(e,t){1&e&&(Kf(0,0),Uf(1,FB,1,0,"pel-request-type-loading",1),Uf(2,MB,1,0,"pel-error-generic",1),Uf(3,qB,1,0,"pel-empty-generic",1),Uf(4,HB,5,1,"ng-container",1),Zf()),2&e&&(Wf("ngSwitch",t.viewState),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Error),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Empty),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Ready))},directives:[W_,G_,NB,LM,LB,L_,M_,DM],styles:["content-loader[_ngcontent-%COMP%]{display:block;width:256px}"]}),WB),$B=((QB=function(){function e(){is(this,e)}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||QB)},QB.\u0275cmp=zl({type:QB,selectors:[["pel-request-type-choice-loading"]],decls:13,vars:0,consts:[["viewBox","0 0 256 264"],["x","48","y","12","rx","3","ry","3","width","180","height","16"],["x","48","y","34","rx","3","ry","3","width","80","height","14"],["cx","20","cy","31","r","20"],["x","48","y","78","rx","3","ry","3","width","180","height","16"],["x","48","y","100","rx","3","ry","3","width","80","height","14"],["cx","20","cy","96","r","20"],["x","48","y","143","rx","3","ry","3","width","180","height","16"],["x","48","y","165","rx","3","ry","3","width","80","height","14"],["cx","20","cy","161","r","20"],["x","48","y","208","rx","3","ry","3","width","180","height","16"],["x","48","y","230","rx","3","ry","3","width","80","height","14"],["cx","20","cy","226","r","20"]],template:function(e,t){1&e&&($f(0,"content-loader",0),cc(),Yf(1,"rect",1),Yf(2,"rect",2),Yf(3,"circle",3),Yf(4,"rect",4),Yf(5,"rect",5),Yf(6,"circle",6),Yf(7,"rect",7),Yf(8,"rect",8),Yf(9,"circle",9),Yf(10,"rect",10),Yf(11,"rect",11),Yf(12,"circle",12),Jf())},directives:[Kq],styles:["content-loader[_ngcontent-%COMP%]{display:block;width:256px}"]}),QB),JB=["zoneNormes"];function YB(e,t){1&e&&Yf(0,"pel-request-type-choice-loading")}function KB(e,t){1&e&&Yf(0,"pel-error-generic")}function ZB(e,t){1&e&&Yf(0,"pel-empty-generic")}function XB(e,t){if(1&e&&($f(0,"option",20),Cm(1),Jf()),2&e){var n=t.$implicit,r=sm(3);Wf("value",n.noService),dp(1),Sm(" ","en"===r.localeId?n.descriptionEn:n.description," ")}}function ez(e,t){if(1&e){var n=Xf();$f(0,"form",6),$f(1,"div",7),$f(2,"p"),Rg(3,8),Jf(),Jf(),$f(4,"div",9),Yf(5,"fa-icon",10),$f(6,"input",11),nm("input",function(){return Nu(n),sm(2).filterNaturesData()}),Jf(),Jf(),$f(7,"div",12),$f(8,"div",13),Yf(9,"fa-icon",10),Jf(),$f(10,"div",14),$f(11,"select",15,16),nm("change",function(){return Nu(n),sm(2).filterServices()}),$f(13,"option",17),Rg(14,18),Jf(),Uf(15,XB,2,2,"option",19),Jf(),Jf(),Jf(),Jf()}if(2&e){var r=sm(2);Wf("formGroup",r.filtersForm),dp(5),Wf("icon",r.farSearch),dp(4),Wf("icon",r.farFilter),dp(6),Wf("ngForOf",r.servicesData)}}function tz(e,t){if(1&e&&($f(0,"div",21),Yf(1,"fa-icon",22),$f(2,"p",23),Rg(3,24),Jf(),Jf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farInfoCircle)}}function nz(e,t){if(1&e&&Yf(0,"fa-icon",10),2&e){var n=sm().ngIf;Wf("icon",null==n?null:n.icon)}}function rz(e,t){if(1&e&&Yf(0,"img"),2&e){var n=sm().ngIf;Bf("src","assets/"+(null==n?null:n.icon),oh)}}function iz(e,t){if(1&e&&($f(0,"div",35),Uf(1,nz,1,1,"fa-icon",36),Uf(2,rz,1,1,"img",37),Jf()),2&e){var n=t.ngIf,r=sm(3);dp(1),Wf("ngIf",!r.iconHelperService.isLocalModuleIcon(n)),dp(1),Wf("ngIf",r.iconHelperService.isLocalModuleIcon(n))}}function oz(e,t){if(1&e){var n=Xf();$f(0,"div",38),Kf(1),$f(2,"div",39),Kf(3),$f(4,"span",32),Cm(5),Jf(),Zf(),Jf(),$f(6,"div",40),$f(7,"h4",32),Rg(8,41),Jf(),Kf(9),Cm(10),Zf(),Jf(),Zf(),$f(11,"button",42),nm("click",function(){return Nu(n),sm(3).submitRequestNature()}),Kf(12),Rg(13,43),Zf(),Yf(14,"fa-icon",44),Jf(),Jf()}if(2&e){var r=sm().$implicit,i=sm(2);Wf("@slideInOut",void 0),dp(5),Sm(" ","en"===i.localeId?r.complementInfoEn:r.complementInfo," "),dp(5),Sm(" ","en"===i.localeId?r.service.descriptionEn:r.service.description," "),dp(4),Wf("icon",i.farLongArrowRight)}}function az(e,t){if(1&e){var n=Xf();$f(0,"div",25),$f(1,"a",26),nm("click",function(){Nu(n);var e=t.$implicit;return sm(2).onNatureExpanded(e)}),$f(2,"div",27),$f(3,"div",28),$f(4,"div",27),$f(5,"div",29),Uf(6,iz,3,2,"div",30),Jf(),$f(7,"div",31),$f(8,"span",32),Cm(9),Jf(),$f(10,"div",7),Kf(11),Cm(12),Zf(),Jf(),Jf(),Jf(),Jf(),$f(13,"div",33),Yf(14,"fa-icon",10),Jf(),Jf(),Jf(),Uf(15,oz,15,4,"div",34),Jf()}if(2&e){var r=t.$implicit,i=sm(2);gm("expanded",i.isNatureExpanded(r)),Bf("data-testitemid",r.codeType),dp(6),Wf("ngIf",i.iconHelperService.getIconFromCodeModule(null==i.theSelectedModule?null:i.theSelectedModule.codeModule)),dp(3),xm("en"===i.localeId?r.descriptionEn:r.description),dp(3),Sm(" ","en"===i.localeId?r.classification.descriptionEn:r.classification.description," "),dp(2),Wf("icon",i.farChevronDown),dp(1),Wf("ngIf",i.isNatureExpanded(r))}}function sz(e,t){if(1&e&&Yf(0,"fa-icon",10),2&e){var n=sm().ngIf;Wf("icon",null==n?null:n.icon)}}function lz(e,t){if(1&e&&Yf(0,"img"),2&e){var n=sm().ngIf;Bf("src","assets/"+(null==n?null:n.icon),oh)}}function uz(e,t){if(1&e&&($f(0,"div",35),Uf(1,sz,1,1,"fa-icon",36),Uf(2,lz,1,1,"img",37),Jf()),2&e){var n=t.ngIf,r=sm(3);dp(1),Wf("ngIf",!r.iconHelperService.isLocalModuleIcon(n)),dp(1),Wf("ngIf",r.iconHelperService.isLocalModuleIcon(n))}}function cz(e,t){1&e&&(Kf(0),Rg(1,45),Zf())}function dz(e,t){if(1&e&&(Kf(0),Cm(1),Jv(2,"currency"),Zf()),2&e){var n=sm(2).$implicit;dp(1),Sm(" ",Zv(2,1,n.montantPermis,"CAD","symbol-narrow","1.2-2")," ")}}function hz(e,t){1&e&&(Kf(0),Rg(1,46),Zf())}function pz(e,t){if(1&e&&(Kf(0),Cm(1," + "),Kf(2),Rg(3,47),Zf(),Cm(4),Jv(5,"currency"),Zf()),2&e){var n=sm(2).$implicit;dp(4),Sm(" ",Zv(5,1,n.fraisEtudeDemande,"CAD","symbol-narrow","1.2-2")," ")}}function fz(e,t){if(1&e&&(Kf(0),Uf(1,dz,3,6,"ng-container",37),Uf(2,hz,2,0,"ng-container",37),Uf(3,pz,6,6,"ng-container",37),Zf()),2&e){var n=sm().$implicit;dp(1),Wf("ngIf",n.montantPermis>0),dp(1),Wf("ngIf",0===n.montantPermis),dp(1),Wf("ngIf",3===n.typeCout&&n.fraisEtudeDemande>0&&1===n.payableApres)}}function mz(e,t){if(1&e&&(Kf(0),$f(1,"div",39),$f(2,"h4",32),Rg(3,56),Jf(),Kf(4),Tg(5,57),Yf(6,"span",32),Og(),Zf(),Jf(),Zf()),2&e){var n=sm(2).$implicit;dp(6),Vg(n.delaiTraiement)(n.delaiTraiement),Dg(5)}}function gz(e,t){if(1&e&&(Kf(0),$f(1,"h4",32),Rg(2,58),Jf(),Yf(3,"div",59),Zf()),2&e){var n=sm(2).$implicit,r=sm(2);dp(3),Wf("innerHTML","en"===r.localeId?n.normesEn:n.normes,ih)}}function vz(e,t){if(1&e&&($f(0,"a",60),Kf(1),Rg(2,61),Zf(),Yf(3,"fa-icon",62),Jf()),2&e){var n=sm(2).$implicit,r=sm(2);Wf("href","en"===r.localeId?n.urlNormesEn:n.urlNormesFr,oh),dp(3),Wf("icon",r.farExternalLinkAlt)}}function yz(e,t){1&e&&(Kf(0),Cm(1," * "),Zf())}function bz(e,t){if(1&e&&($f(0,"div"),Cm(1),Uf(2,yz,2,0,"ng-container",37),Jf()),2&e){var n=sm().$implicit;dp(1),xm(n.docRequisEn),dp(1),Wf("ngIf",1==n.isMandatory)}}function _z(e,t){1&e&&(Kf(0),Cm(1," * "),Zf())}function wz(e,t){if(1&e&&($f(0,"div"),Cm(1),Uf(2,_z,2,0,"ng-container",37),Jf()),2&e){var n=sm().$implicit;dp(1),xm(n.docRequis),dp(1),Wf("ngIf",1==n.isMandatory)}}function Cz(e,t){if(1&e&&($f(0,"li"),Uf(1,bz,3,2,"div",37),Uf(2,wz,3,2,"div",37),Jf()),2&e){var n=sm(5);dp(1),Wf("ngIf","en"===n.localeId),dp(1),Wf("ngIf","en"!==n.localeId)}}function xz(e,t){1&e&&($f(0,"p",67),Rg(1,68),Jf())}function Sz(e,t){if(1&e&&($f(0,"div",63),$f(1,"h4"),Rg(2,64),Jf(),$f(3,"ul"),Uf(4,Cz,3,2,"li",65),Jf(),Uf(5,xz,2,0,"p",66),Yf(6,"br"),Jf()),2&e){var n=sm(2).$implicit,r=sm(2);dp(4),Wf("ngForOf",n.documentsRequis),dp(1),Wf("ngIf",r.getNbrMandatoryDocuments()>0)}}function Pz(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm().$implicit;dp(1),xm(n.descriptionEn)}}function kz(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm().$implicit;dp(1),xm(n.description)}}function Ez(e,t){if(1&e){var n=Xf();$f(0,"button",71),nm("click",function(){Nu(n);var e=t.$implicit;return sm(5).showSchema(e)}),Uf(1,Pz,2,1,"ng-container",37),Uf(2,kz,2,1,"ng-container",37),Yf(3,"fa-icon",44),Jf()}if(2&e){var r=sm(5);dp(1),Wf("ngIf","en"===r.localeId),dp(1),Wf("ngIf","en"!==r.localeId),dp(1),Wf("icon",r.farExternalLinkAlt)}}function Az(e,t){if(1&e&&($f(0,"div",63),$f(1,"h4"),Rg(2,69),Jf(),Uf(3,Ez,4,3,"button",70),Jf()),2&e){var n=sm(2).$implicit;dp(3),Wf("ngForOf",n.schemas)}}function Iz(e,t){if(1&e){var n=Xf();$f(0,"div",38),Uf(1,mz,7,2,"ng-container",37),$f(2,"div",48,49),Uf(4,gz,4,1,"ng-container",37),Uf(5,vz,4,2,"a",50),Uf(6,Sz,7,2,"div",51),Uf(7,Az,4,1,"div",51),Jf(),$f(8,"a",52),nm("click",function(){return Nu(n),sm(3).expandDisplayedNorms()}),Kf(9),Rg(10,53),Zf(),Yf(11,"br"),Yf(12,"fa-icon",10),Jf(),$f(13,"button",54),nm("click",function(){return Nu(n),sm(3).submitPermitType()}),Kf(14),Rg(15,55),Zf(),Yf(16,"fa-icon",44),Jf(),Jf()}if(2&e){var r=sm().$implicit,i=sm(2);Wf("@slideInOut",void 0),dp(1),Wf("ngIf",r.delaiTraiement>0),dp(3),Wf("ngIf","en"===i.localeId&&r.normesEn||"fr"===i.localeId&&r.normes),dp(1),Wf("ngIf","en"===i.localeId&&r.urlNormesEn||"fr"===i.localeId&&r.urlNormesFr),dp(1),Wf("ngIf",(null==r.documentsRequis?null:r.documentsRequis.length)>0),dp(1),Wf("ngIf",(null==r.schemas?null:r.schemas.length)>0),dp(5),Wf("icon",i.farChevronDown),dp(4),Wf("icon",i.farLongArrowRight)}}function Tz(e,t){if(1&e){var n=Xf();$f(0,"div",25),$f(1,"a",26),nm("click",function(){Nu(n);var e=t.$implicit;return sm(2).onItemExpanded(e)}),$f(2,"div",27),$f(3,"div",28),$f(4,"div",27),$f(5,"div",29),Uf(6,uz,3,2,"div",30),Jf(),$f(7,"div",31),$f(8,"span",32),Cm(9),Jf(),$f(10,"div",7),Uf(11,cz,2,0,"ng-container",37),Uf(12,fz,4,3,"ng-container",37),Jf(),Jf(),Jf(),Jf(),$f(13,"div",33),Yf(14,"fa-icon",10),Jf(),Jf(),Jf(),Uf(15,Iz,17,8,"div",34),Jf()}if(2&e){var r=t.$implicit,i=sm(2);gm("expanded",i.isItemExpanded(r)),Bf("data-testitemid",r.codeType),dp(6),Wf("ngIf",i.iconHelperService.getIconFromCodeModule(null==i.theSelectedModule?null:i.theSelectedModule.codeModule)),dp(3),xm("en"===i.localeId?r.descriptionEn:r.description),dp(2),Wf("ngIf",r.pel_Gratuit),dp(1),Wf("ngIf",!r.pel_Gratuit),dp(2),Wf("icon",i.farChevronDown),dp(1),Wf("ngIf",i.isItemExpanded(r))}}function Oz(e,t){if(1&e&&(Kf(0),Uf(1,ez,16,4,"form",2),$f(2,"div",3),Uf(3,tz,4,1,"div",4),Uf(4,az,16,8,"div",5),Uf(5,Tz,16,9,"div",5),Jf(),Zf()),2&e){var n=sm();dp(1),Wf("ngIf","QS"===(null==n.theSelectedModule?null:n.theSelectedModule.codeModule)),dp(2),Wf("ngIf","QS"===(null==n.theSelectedModule?null:n.theSelectedModule.codeModule)&&0==n.filteredRequestNaturesData.length),dp(1),Wf("ngForOf",n.filteredRequestNaturesData),dp(1),Wf("ngForOf",n.permisTypesData)}}var Rz,Vz=((Rz=function(){function e(t,n,r,i,o,a){is(this,e),this.fb=t,this.pelService=n,this.renderer=r,this.route=i,this.globalsService=o,this.localeId=a,this.stepBack=new ty,this.stepSubmit=new ty,this.permisTypesData=[],this.allRequestNaturesData=[],this.filteredRequestNaturesData=[],this.servicesData=[],this.isExpanded=!1,this.viewState=HM.Loading,this.viewStateEnum=HM,this.iconHelperService=DB,this.farChevronDown=PL,this.farLongArrowLeft=GL,this.farLongArrowRight=$L,this.farExternalLinkAlt=LL,this.farFilter=BL,this.farInfoCircle=QL,this.farSearch=oF}return as(e,[{key:"ngOnInit",value:function(){if(this.readPermitTypeFromURL(),this.setFormGroup(),localStorage.getItem("requester")){var e=JSON.parse(localStorage.getItem("requester"));e.UserRoles&&(this.currentUserVoilaRoles=e.UserRoles.toString())}}},{key:"setFormGroup",value:function(){this.filtersForm=this.fb.group({selectedService:"",natureSearch:""})}},{key:"loadPermitTypes",value:function(){var e,t=this;this.viewState=HM.Loading,this.permisTypesData=[],this.allRequestNaturesData=[],this.filteredRequestNaturesData=[],this.pelService.getAllActivePermitTypes(null===(e=this.selectedModule)||void 0===e?void 0:e.codeModule).subscribe(function(e){t.permisTypesData=e.result,t.matchPermitTypeFromURL(),t.permisTypesData.length>0?t.viewState=HM.Ready:(console.log("GetAllActivePermitTypes returned an invalid or empty array."),t.viewState=HM.Empty)},function(e){t.viewState=HM.Error})}},{key:"loadRequestNatures",value:function(){var e=this;this.viewState=HM.Loading,this.permisTypesData=[],this.allRequestNaturesData=[],this.filteredRequestNaturesData=[],this.pelService.getAllActiveNatureServices().subscribe(function(t){e.servicesData=t.result,e.pelService.getAllActiveRequestNatures().subscribe(function(t){e.allRequestNaturesData=e.filterNatureAndServiceForRole(t.result),e.filteredRequestNaturesData=e.allRequestNaturesData,e.matchRequestNatureFromURL(),e.allRequestNaturesData.length>0?e.viewState=HM.Ready:(console.log("GetAllActiveRequestNatures returned an invalid or empty array."),e.viewState=HM.Empty)},function(t){e.viewState=HM.Error})},function(t){e.viewState=HM.Error})}},{key:"filterNatureAndServiceForRole",value:function(e){var t=!1,n=!0;if(this.currentUserVoilaRoles){var r=this.globalsService.cityInfo.cityCode+"cityrequestemployee";t=this.currentUserVoilaRoles.toLowerCase().includes(r),n=!t}var i=e.filter(function(e){return(1!==e.disponiblePour||n)&&(2!==e.disponiblePour||t)});return this.servicesData=this.servicesData.filter(function(e){return i.some(function(t){return t.noService===e.noService})}),i}},{key:"readPermitTypeFromURL",value:function(){var e,t,n=this;null===(t=null===(e=this.route.parent)||void 0===e?void 0:e.url)||void 0===t||t.subscribe(function(e){var t;"create"===(null===(t=e[0])||void 0===t?void 0:t.path)&&n.route.url.subscribe(function(e){var t;n.permitTypeFromURL=null===(t=e[1])||void 0===t?void 0:t.path})})}},{key:"matchPermitTypeFromURL",value:function(){var e=this;if(this.permitTypeFromURL){var t=this.permisTypesData.find(function(t){return t.codeType===+e.permitTypeFromURL});t?(this.theSelectedType=t,this.submitPermitType()):this.stepBack.emit()}}},{key:"matchRequestNatureFromURL",value:function(){var e=this;if(this.permitTypeFromURL){var t=this.allRequestNaturesData.find(function(t){return t.codeNature===e.permitTypeFromURL});t?(this.theSelectedNature=t,this.submitRequestNature()):this.stepBack.emit()}}},{key:"filterServices",value:function(){var e=this;this.natureSearch.setValue(""),this.filteredRequestNaturesData=this.selectedService.value?this.allRequestNaturesData.filter(function(t){return t.noService===e.selectedService.value}):this.allRequestNaturesData}},{key:"filterNaturesData",value:function(){var e,t=this;this.selectedService.setValue(""),e=this.removeAccent(this.natureSearch.value),this.filteredRequestNaturesData=this.natureSearch.value?this.allRequestNaturesData.filter("en"===this.localeId?function(n){var r,i;return(null===(r=t.removeAccent(n.descriptionEn))||void 0===r?void 0:r.toLowerCase().includes(e.toLowerCase()))||(null===(i=t.removeAccent(n.synonymeEn))||void 0===i?void 0:i.toLowerCase().includes(e.toLowerCase()))}:function(n){var r,i;return(null===(r=t.removeAccent(n.description))||void 0===r?void 0:r.toLowerCase().includes(e.toLowerCase()))||(null===(i=t.removeAccent(n.synonyme))||void 0===i?void 0:i.toLowerCase().includes(e.toLowerCase()))}):this.allRequestNaturesData}},{key:"updateSelectedModule",value:function(e){var t;e!==this.theSelectedModule&&(this.theSelectedModule=e,this.isExpanded=!1,this.theSelectedType=void 0,this.theSelectedNature=void 0,"QS"===(null===(t=this.selectedModule)||void 0===t?void 0:t.codeModule)?this.loadRequestNatures():this.loadPermitTypes())}},{key:"onItemExpanded",value:function(e){var t;e.codeType===(null===(t=this.theSelectedType)||void 0===t?void 0:t.codeType)?this.isExpanded=!this.isExpanded:(this.theSelectedType=e,this.isExpanded=!0)}},{key:"isItemExpanded",value:function(e){var t;return(null===(t=this.theSelectedType)||void 0===t?void 0:t.codeType)===e.codeType&&this.isExpanded}},{key:"onNatureExpanded",value:function(e){var t;e.codeNature===(null===(t=this.theSelectedNature)||void 0===t?void 0:t.codeNature)?this.isExpanded=!this.isExpanded:(this.theSelectedNature=e,this.isExpanded=!0)}},{key:"isNatureExpanded",value:function(e){var t;return(null===(t=this.theSelectedNature)||void 0===t?void 0:t.codeNature)===e.codeNature&&this.isExpanded}},{key:"expandDisplayedNorms",value:function(){var e;this.renderer.removeClass(null===(e=this.displayedNormsRef)||void 0===e?void 0:e.nativeElement,"text-preview")}},{key:"submitPermitType",value:function(){this.stepSubmit.emit(this.theSelectedType)}},{key:"submitRequestNature",value:function(){this.stepSubmit.emit(this.theSelectedNature)}},{key:"getNbrMandatoryDocuments",value:function(){var e,t;return(null===(e=this.theSelectedType)||void 0===e?void 0:e.documentsRequis)?null===(t=this.theSelectedType)||void 0===t?void 0:t.documentsRequis.filter(function(e){return"1"===e.isMandatory}).length:0}},{key:"showSchema",value:function(e){var t=this;this.pelService.getSchemaPermisBySchemaId(e.id).subscribe(function(n){if("application/pdf"!==e.mimeType){var r="data:image;base64,"+n.result,i=new Image;i.src=r;var o=window.open("");null==o||o.document.write(i.outerHTML),t.viewState=HM.Ready}else t.viewState=HM.Ready,cj.downloadFile("en"===t.localeId?e.descriptionEn:e.description,n.result,dj.PDF)},function(e){t.viewState=HM.Error})}},{key:"removeAccent",value:function(e){return null==e?void 0:e.replace(/[\xea\xe9\xe8\xeb\xca\xc9\xc8\xcb]/g,"e").replace(/[\xee\xef\xce\xcf]/g,"i").replace(/[\xe7\xc7]/g,"c").replace(/[\xe0\xe2\xe4\xc0\xc2\xc4]/g,"a").replace(/[\xf4\xf6\xd4\xd6]/g,"o").replace(/[\xfb\xf9\xfc\xdb\xd9\xdc]/g,"u").replace(/[\xff]/g,"y")}},{key:"selectedModule",get:function(){return this.theSelectedModule},set:function(e){this.updateSelectedModule(e)}},{key:"normsRef",set:function(e){var t;(null===(t=null==e?void 0:e.nativeElement)||void 0===t?void 0:t.offsetHeight)>250&&this.renderer.addClass(e.nativeElement,"text-preview"),this.displayedNormsRef=e}},{key:"selectedService",get:function(){return this.filtersForm.get("selectedService")}},{key:"natureSearch",get:function(){return this.filtersForm.get("natureSearch")}}]),e}()).\u0275fac=function(e){return new(e||Rz)(Qf(_k),Qf(Bq),Qf(Zg),Qf(AD),Qf(zq),Qf(Ry))},Rz.\u0275cmp=zl({type:Rz,selectors:[["pel-request-type-choice"]],viewQuery:function(e,t){var n;1&e&&my(JB,!0,Yg),2&e&&py(n=yy())&&(t.normsRef=n.first)},inputs:{selectedModule:"selectedModule"},outputs:{stepBack:"stepBack",stepSubmit:"stepSubmit"},decls:5,vars:5,consts:function(){var e,t,n,r,i,o,a,s,l,u,c,d,h;return e=" Vous avez la possibilit\xE9 de faire une recherche par mots cl\xE9s ou utiliser les filtres des services pour trouver plus rapidement vos natures. ",t="Rechercher par mots cl\xE9s",n="Tous les services",r="Aucun item ne correspond au filtre.",i=" Service responsable de la requ\xEAte ",o="Continuer",a=" Gratuit",s="Montant variable ",l="Frais pour l'\xE9tude de la demande ",u="Lire la suite",c="Continuer",d=" D\xE9lai ",h=Ng(h="{VAR_PLURAL, plural, =1 {1 jour.} other {{INTERPOLATION} jours.}}",{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),[[1,"card-body","text-primary",3,"ngSwitch"],[4,"ngSwitchCase"],[3,"formGroup",4,"ngIf"],["data-testid","ABBD38A6-0616-4CE0-8127-748E49A78A64",1,"btn-content-list"],["class","text-center mt-2 error-empty",4,"ngIf"],["class","btn btn-content expandable mb-1",3,"expanded",4,"ngFor","ngForOf"],[3,"formGroup"],[1,"text-primary-muted","text-small"],e,[1,"font-weight-bold","d-flex","align-items-center","mb-2"],[3,"icon"],["type","text","name","natureSearch","formControlName","natureSearch","data-testid","BE8CA14A-9307-4FE2-8648-DF25CDB83378","placeholder",t,1,"form-control","ml-3",3,"input"],[1,"form-row"],[1,"form-group","col-6","text-right","align-self-center"],[1,"form-group","filter-section","mb-3","col-6"],["id","selectedService","name","selectedService","formControlName","selectedService","data-testid","947F84C9-638B-4D33-A366-75546C0FA0F9",1,"form-control",3,"change"],["serviceSelect",""],["value",""],n,[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"text-center","mt-2","error-empty"],["size","2x",3,"icon"],[1,"my-2"],r,[1,"btn","btn-content","expandable","mb-1"],["href","javascript:void(0);",3,"click"],[1,"d-flex"],[1,"w-100"],[1,"flex-shrink-1","align-self-center"],["class","icon-circle",4,"ngIf"],[1,"px-2"],[1,"text-primary"],[1,"flex-shrink-1","align-self-center","icon-expand"],["class","expandable-content",4,"ngIf"],[1,"icon-circle"],[3,"icon",4,"ngIf"],[4,"ngIf"],[1,"expandable-content"],[1,"mb-3"],[1,"text-primary","text-small","mb-3"],i,["data-testid","49B21908-CDDB-42A4-BA2D-BECE03970F7F",1,"btn","btn-primary","btn-big","btn-rounded","w-100",3,"click"],o,[1,"ml-1",3,"icon"],a,s,l,[1,"text-zone","mb-3"],["zoneNormes",""],["class","btn btn-outline-primary mb-3","target","_blank","data-testid","2fc4f815-8a32-4bc8-8ad0-6db3c594ee9a",3,"href",4,"ngIf"],["class","text-primary text-small",4,"ngIf"],["href","javascript:void(0);","data-testid","65E59D2A-DF95-47E5-B56E-70C228FA3382",1,"text-zone-expand","text-primary",3,"click"],u,["data-testid","4CB0BC28-B3E8-4E16-87A3-F7CE31A414A0",1,"btn","btn-primary","btn-big","btn-rounded","w-100",3,"click"],c,d,"" + "\ufffd#6\ufffd" + "Le d\xE9lai de traitement de ce type de permis est de " + h + " " + "\ufffd/#6\ufffd" + ""," R\xE9glementation ",[1,"text-primary",3,"innerHTML"],["target","_blank","data-testid","2fc4f815-8a32-4bc8-8ad0-6db3c594ee9a",1,"btn","btn-outline-primary","mb-3",3,"href"],"Consulter les normes",[1,"ml-2",3,"icon"],[1,"text-primary","text-small"],"Documents requis",[4,"ngFor","ngForOf"],["class","pl-4 mt-2 mb-0",4,"ngIf"],[1,"pl-4","mt-2","mb-0"]," * Document obligatoire ","Sch\xE9mas de la r\xE9glementation",["class","btn-outline-primary btn-small mr-2",3,"click",4,"ngFor","ngForOf"],[1,"btn-outline-primary","btn-small","mr-2",3,"click"]]},template:function(e,t){1&e&&(Kf(0,0),Uf(1,YB,1,0,"pel-request-type-choice-loading",1),Uf(2,KB,1,0,"pel-error-generic",1),Uf(3,ZB,1,0,"pel-empty-generic",1),Uf(4,Oz,6,4,"ng-container",1),Zf()),2&e&&(Wf("ngSwitch",t.viewState),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Error),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Empty),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Ready))},directives:[W_,G_,$B,LM,LB,M_,L_,XP,lP,nk,DM,OS,sP,gk,_P,wP,EP],pipes:[sw],styles:["h4[_ngcontent-%COMP%]{font-size:1rem;text-decoration:underline}"],data:{animation:[Zw("slideInOut",[rC(":enter",[tC({overflow:"hidden",height:"0"}),Xw("200ms ease-out",tC({height:"*"}))]),rC(":leave",[Xw("200ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),Rz);function Dz(e){var t=e.value;return"string"==typeof t&&""!==t?{invalid:!0}:null}var Nz=["autoStreet"];function Lz(e,t){if(1&e){var n=Xf();$f(0,"div",17),$f(1,"p",18),Rg(2,19),Jf(),$f(3,"div",20),$f(4,"button",21),nm("click",function(){return Nu(n),sm().setCurrentSearchView("address")}),Rg(5,22),Jf(),$f(6,"button",23),nm("click",function(){return Nu(n),sm().setCurrentSearchView("registrationNumber")}),Tg(7,24),Yf(8,"sup"),Og(),Jf(),$f(9,"button",25),nm("click",function(){return Nu(n),sm().setCurrentSearchView("landNumber")}),Tg(10,26),Yf(11,"sup"),Og(),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(4),gm("active","address"===r.currentSearchView),dp(2),gm("active","registrationNumber"===r.currentSearchView),dp(3),gm("active","landNumber"===r.currentSearchView)}}function Fz(e,t){1&e&&($f(0,"div"),Tg(1,47),Yf(2,"sup"),Og(),Jf())}function Mz(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",48),Yf(2,"input",49),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function qz(e,t){if(1&e&&($f(0,"mat-option",54),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n),dp(2),xm(n.voieComplet)}}function jz(e,t){if(1&e){var n=Xf();Kf(0),Yf(1,"input",50),$f(2,"mat-autocomplete",51,52),nm("optionSelected",function(e){return Nu(n),sm(2).selectStreet(e)}),Uf(4,qz,3,2,"mat-option",53),Jv(5,"async"),Jf(),Zf()}if(2&e){var r=Hf(3),i=sm(2);dp(1),gm("is-invalid",(i.SearchStreet.touched||i.SearchStreet.dirty)&&!i.SearchStreet.valid),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.searchStreet),dp(1),Wf("displayWith",i.displayStreet),dp(2),Wf("ngForOf",Yv(5,6,i.filteredStreets))}}function Bz(e,t){1&e&&($f(0,"div"),Rg(1,55),Jf())}var zz=function(){return[]};function Uz(e,t){if(1&e){var n=Xf();$f(0,"div",27),$f(1,"div",28),$f(2,"div",29),$f(3,"label",30),Kf(4),Tg(5,31),Yf(6,"sup"),Og(),Zf(),Cm(7,"\xa0* "),Jf(),$f(8,"input",32),nm("change",function(e){return Nu(n),sm().validateAddress(e)}),Jf(),$f(9,"div",33),Uf(10,Fz,3,0,"div",34),Jf(),Jf(),$f(11,"div",29),$f(12,"label",35),Rg(13,36),Jf(),$f(14,"input",37),nm("change",function(e){return Nu(n),sm().validateAddress(e)}),Jf(),Jf(),$f(15,"div",29),$f(16,"label",38),Rg(17,39),Jf(),$f(18,"input",40),nm("change",function(e){return Nu(n),sm().validateAddress(e)}),Jf(),Jf(),Jf(),$f(19,"div",28),$f(20,"div",41),$f(21,"label",42),Kf(22),Rg(23,43),Zf(),Cm(24,"\xa0* "),Jf(),Kf(25,7),Uf(26,Mz,3,2,"ng-container",44),Uf(27,jz,6,8,"ng-container",44),Zf(),$f(28,"small",45),Rg(29,46),Jf(),$f(30,"div",33),Uf(31,Bz,2,0,"div",34),Jf(),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(8),gm("is-invalid",(r.CivicNumber.touched||r.CivicNumber.dirty)&&!r.CivicNumber.valid),Wf("specialCharacters",Qv(11,zz))("maxlength",r.fieldsMaxLength.addressCivicNumber),dp(2),Wf("ngIf",null==r.CivicNumber.errors?null:r.CivicNumber.errors.required),dp(4),Wf("maxlength",r.fieldsMaxLength.addressSuffix),dp(4),Wf("maxlength",r.fieldsMaxLength.addressApartment),dp(7),Wf("ngSwitch",r.streetsState),dp(1),Wf("ngSwitchCase",r.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",r.viewStateEnum.Ready),dp(4),Wf("ngIf",(null==r.SearchStreet.errors?null:r.SearchStreet.errors.required)||(null==r.SearchStreet.errors?null:r.SearchStreet.errors.invalid))}}function Hz(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",48),Yf(2,"input",60),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function Qz(e,t){if(1&e&&($f(0,"mat-option",54),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n.matricule),dp(2),xm(n.matricule)}}function Wz(e,t){if(1&e){var n=Xf();$f(0,"div",65),$f(1,"button",66),nm("click",function(){return Nu(n),sm(3).setPropertyNotFound()}),Kf(2),Rg(3,67),Zf(),Jf(),Jf()}}function Gz(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"input",61),nm("change",function(e){return Nu(n),sm(2).resetAllEvent(e)})("keyup",function(){return Nu(n),sm(2).showPropertyNotFound()}),Jf(),$f(2,"mat-autocomplete",62,63),nm("optionSelected",function(e){return Nu(n),sm(2).selectRegistrationNumber(e)}),Uf(4,Qz,3,2,"mat-option",53),Jv(5,"async"),Jf(),Uf(6,Wz,4,0,"div",64),Zf()}if(2&e){var r=Hf(3),i=sm(2);dp(1),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.searchRegistrationNumber),dp(3),Wf("ngForOf",Yv(5,4,i.filteredRegistrationNumbers)),dp(2),Wf("ngIf",i.showFindMoreProperty)}}function $z(e,t){if(1&e&&($f(0,"div",56),$f(1,"div",28),$f(2,"div",57),$f(3,"label",58),Kf(4),Rg(5,59),Zf(),Cm(6,"\xa0* "),Jf(),Kf(7,7),Uf(8,Hz,3,2,"ng-container",44),Uf(9,Gz,7,6,"ng-container",44),Zf(),Jf(),Jf(),Jf()),2&e){var n=sm();dp(7),Wf("ngSwitch",n.taxMapLandNumbersState),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Ready)}}function Jz(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",48),Yf(2,"input",72),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function Yz(e,t){if(1&e&&($f(0,"mat-option",54),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n),dp(2),xm(n.lotReno)}}function Kz(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"input",73),nm("change",function(e){return Nu(n),sm(2).resetAllEvent(e)})("keyup",function(){return Nu(n),sm(2).showPropertyNotFound()}),Jf(),$f(2,"mat-autocomplete",51,74),nm("optionSelected",function(e){return Nu(n),sm(2).selectLandNumber(e)}),Uf(4,Yz,3,2,"mat-option",53),Jv(5,"async"),Jf(),Zf()}if(2&e){var r=Hf(3),i=sm(2);dp(1),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.searchLandNumber),dp(1),Wf("displayWith",i.displayLandNumber),dp(2),Wf("ngForOf",Yv(5,4,i.filteredLandNumbers))}}function Zz(e,t){if(1&e){var n=Xf();$f(0,"div",65),$f(1,"button",66),nm("click",function(){return Nu(n),sm(2).setPropertyNotFound()}),Cm(2,"Je ne trouve pas ma propri\xe9t\xe9"),Jf(),Jf()}}function Xz(e,t){if(1&e&&($f(0,"div",68),$f(1,"div",28),$f(2,"div",69),$f(3,"label",70),Kf(4),Rg(5,71),Zf(),Cm(6,"\xa0* "),Jf(),Kf(7,7),Uf(8,Jz,3,2,"ng-container",44),Uf(9,Kz,6,6,"ng-container",44),Uf(10,Zz,3,0,"div",64),Zf(),Jf(),Jf(),Jf()),2&e){var n=sm();dp(7),Wf("ngSwitch",n.taxMapLandNumbersState),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Ready),dp(1),Wf("ngIf",n.showFindMoreProperty)}}function eU(e,t){if(1&e&&($f(0,"div",75),Yf(1,"fa-icon",76),Jf()),2&e){var n=sm();dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function tU(e,t){1&e&&($f(0,"label",82),Kf(1),Rg(2,83),Zf(),Jf())}function nU(e,t){1&e&&($f(0,"label",82),Kf(1),Rg(2,84),Zf(),Jf())}function rU(e,t){if(1&e){var n=Xf();$f(0,"div",77),$f(1,"span"),Rg(2,78),Jf(),$f(3,"div",79),$f(4,"input",80),nm("change",function(){return Nu(n),sm().useMissingRollAddress()}),Jf(),Uf(5,tU,3,0,"label",81),Uf(6,nU,3,0,"label",81),Jf(),Jf()}if(2&e){var r=sm();dp(5),Wf("ngIf","address"===r.currentSearchView),dp(1),Wf("ngIf","address"!==r.currentSearchView)}}function iU(e,t){if(1&e&&($f(0,"option",54),Cm(1),Jf()),2&e){var n=t.$implicit;Wf("value",n.noCoProp),dp(1),xm(n.nomCopr)}}function oU(e,t){if(1&e){var n=Xf();$f(0,"select",106,107),nm("change",function(){Nu(n);var e=Hf(1);return sm(2).selectOwner(e.value)}),Uf(2,iU,2,2,"option",53),Jf()}if(2&e){var r=sm(2);dp(2),Wf("ngForOf",r.lstOwners)}}function aU(e,t){if(1&e&&Yf(0,"input",108),2&e){var n=sm(2);gm("is-invalid",(n.Owner.touched||n.Owner.dirty)&&!n.Owner.valid),Wf("maxlength",n.fieldsMaxLength.ownerText)}}function sU(e,t){1&e&&($f(0,"div"),Rg(1,109),Jf())}function lU(e,t){1&e&&(Kf(0),Rg(1,112),Zf())}function uU(e,t){1&e&&(Kf(0),Rg(1,113),Zf())}function cU(e,t){if(1&e){var n=Xf();$f(0,"div",110),$f(1,"button",111),nm("click",function(){return Nu(n),sm(2).setCurrentOwnerMode()}),Uf(2,lU,2,0,"ng-container",34),Uf(3,uU,2,0,"ng-container",34),Jf(),Jf()}if(2&e){var r=sm(2);dp(2),Wf("ngIf",!r.getCurrentOwnerInEdition()),dp(1),Wf("ngIf",r.getCurrentOwnerInEdition())}}function dU(e,t){1&e&&($f(0,"div"),Rg(1,114),Jf())}function hU(e,t){if(1&e&&($f(0,"div"),Cm(1),Jf()),2&e){var n=sm(2);dp(1),Sm(" ",n.cityRequiredMessage," ")}}function pU(e,t){1&e&&($f(0,"div"),Rg(1,115),Jf())}function fU(e,t){1&e&&($f(0,"div"),Rg(1,116),Jf())}var mU=function(){return[" "]};function gU(e,t){if(1&e&&($f(0,"div",85),$f(1,"h5",1),$f(2,"div",2),Yf(3,"fa-icon",3),Jf(),$f(4,"span"),Rg(5,86),Jf(),Jf(),$f(6,"div",28),$f(7,"div",87),$f(8,"label",88),Kf(9),Rg(10,89),Zf(),Cm(11,"\xa0* "),Jf(),$f(12,"div",28),$f(13,"div",90),Uf(14,oU,3,1,"select",91),Uf(15,aU,1,3,"input",92),$f(16,"div",33),Uf(17,sU,2,0,"div",34),Jf(),Yf(18,"input",93),Jf(),Uf(19,cU,4,2,"div",94),Jf(),Jf(),Jf(),$f(20,"div",28),$f(21,"div",87),$f(22,"label",95),Kf(23),Rg(24,96),Zf(),Cm(25,"\xa0* "),Jf(),Yf(26,"input",97),$f(27,"div",33),Uf(28,dU,2,0,"div",34),Jf(),Jf(),Jf(),$f(29,"div",28),$f(30,"div",98),$f(31,"label",99),Kf(32),Cm(33),Zf(),Cm(34,"\xa0* "),Jf(),Yf(35,"input",100),$f(36,"div",33),Uf(37,hU,2,1,"div",34),Jf(),Jf(),$f(38,"div",101),$f(39,"label",102),Kf(40),Rg(41,103),Zf(),Cm(42,"\xa0* "),Jf(),Yf(43,"input",104),$f(44,"div",33),Uf(45,pU,2,0,"div",34),Uf(46,fU,2,0,"div",34),Jf(),Jf(),Jf(),Yf(47,"input",105),Jf()),2&e){var n=sm();dp(3),Wf("icon",n.farUser),dp(11),Wf("ngIf",!n.getCurrentOwnerInEdition()),dp(1),Wf("ngIf",n.getCurrentOwnerInEdition()),dp(2),Wf("ngIf",null==n.OwnerText.errors?null:n.OwnerText.errors.required),dp(2),Wf("ngIf",!n.isAddressNotFound&&!n.isReadOnlyMode&&n.displayModifyButton),dp(7),gm("is-invalid",n.getCurrentOwnerInEdition()&&(n.OwnerAddress.touched||n.OwnerAddress.dirty)&&!n.OwnerAddress.valid),Wf("maxlength",n.fieldsMaxLength.ownerAddress),dp(2),Wf("ngIf",null==n.OwnerAddress.errors?null:n.OwnerAddress.errors.required),dp(5),xm(n.cityLabel),dp(2),gm("is-invalid",n.getCurrentOwnerInEdition()&&(n.OwnerCity.touched||n.OwnerCity.dirty)&&!n.OwnerCity.valid),Wf("maxlength",n.fieldsMaxLength.ownerCity),dp(2),Wf("ngIf",null==n.OwnerCity.errors?null:n.OwnerCity.errors.required),dp(6),gm("is-invalid",n.getCurrentOwnerInEdition()&&(n.OwnerPostalCode.touched||n.OwnerPostalCode.dirty)&&!n.OwnerPostalCode.valid),Wf("specialCharacters",Qv(19,mU)),dp(2),Wf("ngIf",null==n.OwnerPostalCode.errors?null:n.OwnerPostalCode.errors.required),dp(1),Wf("ngIf",null==n.OwnerPostalCode.errors?null:n.OwnerPostalCode.errors.pattern)}}function vU(e,t){if(1&e&&($f(0,"button",117),Kf(1),Rg(2,118),Zf(),Yf(3,"fa-icon",119),Jf()),2&e){var n=sm();Wf("disabled",n.isAddressNotFound&&!n.isFormValid()||!n.isAddressNotFound&&(!n.hasOwnerToContinue()||!n.isFormValid())),dp(3),Wf("icon",n.farLongArrowRight)}}var yU,bU=((yU=function(){function e(t,n,r,i,o,a){is(this,e),this.pelService=t,this.globalsService=n,this.fb=r,this.cdr=i,this.localeId=o,this.router=a,this.isReadOnlyMode=!1,this.stepSubmit=new ty,this.addressProperty={registrationNumber:void 0,civicNumber:null,suffix:"",apartment:"",designa:"",discriminant:"",street:""},this.fieldsMaxLength={addressCivicNumber:10,addressSuffix:10,addressApartment:12,searchStreet:75,searchRegistrationNumber:23,searchLandNumber:25,ownerText:75,ownerAddress:75,ownerCity:50},this.ownerSelected="",this.currentSearchView="address",this.postalCodePattern="/^[A-Za-z]d[A-Za-z][ ]?d[A-Za-z]d$/",this.currentOwnerInEdition=!1,this.showFindMoreProperty=!1,this.displayModifyButton=!1,this.isLoadingAddress=!1,this.taxMapLandNumbers=[],this.streets=[],this.taxMapLandNumbersState=HM.Loading,this.streetsState=HM.Loading,this.viewStateEnum=HM,this.farMapMarked=JL,this.farSpinnerThird=aF,this.farUser=cF,this.farLongArrowRight=$L}return as(e,[{key:"ngOnInit",value:function(){var e=this,t=this.globalsService.getGeneralParameterByCode("bouton_modifier_proprietaire_visible");if(""!==t&&(this.displayModifyButton="1"===t),this.cityRequiredMessage=this.globalsService.getCustomResourceTextByCode("RES_ERR_AUCUNE_VILLE"),""===this.cityRequiredMessage&&(this.cityRequiredMessage="en"===this.localeId?hj.RES_ERR_AUCUNE_VILLE_EN:hj.RES_ERR_AUCUNE_VILLE_FR),this.cityLabel=this.globalsService.getCustomResourceTextByCode("RES_VILLE"),""===this.cityLabel&&(this.cityLabel="en"===this.localeId?hj.RES_VILLE_EN:hj.RES_VILLE_FR),this.pelService.getAllTaxMapOrLandNumbers().subscribe(function(t){e.taxMapLandNumbers=t.result,e.taxMapLandNumbersState=HM.Ready},function(t){e.taxMapLandNumbersState=HM.Ready}),this.pelService.getAllStreetsFromRole().subscribe(function(t){if(e.streets=t.result,e.streetsState=HM.Ready,localStorage.getItem("requester")&&!e.isEditMode()&&!e.isReadOnlyMode){var n=JSON.parse(localStorage.getItem("requester"));n.IsResident&&(e.propertyIdentificationForm.get("addressGroup.civicNumber").setValue(n.NoCivic),e.SearchStreet.setValue(e.streets.filter(function(e){return e.codeGen===n.StreetType&&e.codeLien===n.StreetLink&&e.voie===n.Street})[0]),"/view"!==e.router.url&&e.resetAllProperties(),e.getOwnerWithAddress(),n.NoApp&&e.propertyIdentificationForm.get("addressGroup.apartment").setValue(n.NoApp),""===e.SearchStreet.value&&(console.log("address not found"),e.isAddressNotFound=!0,e.UseMissingToRollAddress.setValue(!0),e.useMissingRollAddress()))}},function(t){e.streetsState=HM.Ready}),this.propertyIdentificationForm=this.fb.group({addressGroup:this.fb.group({civicNumber:[this.property?this.property.addressGroup.civicNumber:null,[FS.required,FS.maxLength(this.fieldsMaxLength.addressCivicNumber)]],suffix:[this.property?this.property.addressGroup.suffix:"",[FS.maxLength(this.fieldsMaxLength.addressSuffix)]],apartment:[this.property?this.property.addressGroup.apartment:"",[FS.maxLength(this.fieldsMaxLength.addressApartment)]],searchStreet:[this.property?this.property.addressGroup.searchStreet:"",[FS.required,Dz,FS.maxLength(this.fieldsMaxLength.searchStreet)]]}),registrationNumberGroup:this.fb.group({searchRegistrationNumber:[this.property?this.property.registrationNumberGroup.searchRegistrationNumber:"",[FS.required,FS.maxLength(this.fieldsMaxLength.searchRegistrationNumber)]]}),landNumberGroup:this.fb.group({searchLandNumber:[this.property?this.property.landNumberGroup.searchLandNumber:"",[FS.required,FS.maxLength(this.fieldsMaxLength.searchLandNumber)]]}),ownerGroup:this.fb.group({owner:[this.property?this.property.ownerGroup.owner:""],ownerText:[this.property?this.property.ownerGroup.ownerText:"",[FS.required,FS.maxLength(this.fieldsMaxLength.ownerText)]],ownerCity:[this.property?{value:this.property.ownerGroup.ownerCity,disabled:!1}:{value:"",disabled:!0},[FS.required,FS.maxLength(this.fieldsMaxLength.ownerCity)]],ownerAddress:[this.property?{value:this.property.ownerGroup.ownerAddress,disabled:!1}:{value:"",disabled:!0},[FS.required,FS.maxLength(this.fieldsMaxLength.ownerAddress)]],ownerPostalCode:[this.property?{value:this.property.ownerGroup.ownerPostalCode,disabled:!1}:{value:null,disabled:!0},[FS.required,FS.pattern(/^[a-zA-Z]\d[a-zA-Z][ ]?\d[a-zA-Z]\d/)]],ownerSelectedRegistrationNumber:[this.property?this.property.ownerGroup.ownerSelectedRegistrationNumber:""]}),searchMode:[this.property?this.property.searchMode:"address"],rollNotFoundGroup:this.fb.group({useMissingToRollAddress:!1})}),this.property)switch(this.currentSearchView=this.property.searchMode,this.addressProperty.registrationNumber=this.property.registrationNumberGroup.searchRegistrationNumber,this.addressProperty.civicNumber=Number(this.property.addressGroup.civicNumber),this.addressProperty.suffix=this.property.addressGroup.suffix,this.addressProperty.apartment=this.property.addressGroup.apartment,this.addressProperty.designa=this.property.addressGroup.searchStreet.designa,this.addressProperty.street=this.property.addressGroup.searchStreet.voieComplet,this.currentSearchView){case"address":this.getOwnerWithAddress(!0);break;case"registrationNumber":this.getOwnerInfoByRegistrationNumber(this.property.registrationNumberGroup.searchRegistrationNumber,!0);break;case"landNumber":this.getOwnerInfoByRegistrationNumber(this.property.landNumberGroup.searchLandNumber.matricule,!0);break;default:this.getOwnerWithAddress(!0)}this.isReadOnlyMode&&this.propertyIdentificationForm.disable(),this.filteredStreets=this.SearchStreet.valueChanges.pipe(XE(""),Ms(function(t){return e.filterStreet(t)})),this.filteredRegistrationNumbers=this.SearchRegistrationNumber.valueChanges.pipe(Bk(100)).pipe(XE(""),Ms(function(t){return e.filterRegistrationNumber(t)})),this.filteredLandNumbers=this.SearchLandNumber.valueChanges.pipe(Bk(100)).pipe(XE(""),Ms(function(t){return e.filterLandNumber(t)})),eV([this.SearchStreet.valueChanges,this.SearchStreet.statusChanges]).subscribe(function(t){var n=Ua(t,2);n[0],"INVALID"===n[1]&&(e.isAddressNotFound=!0,e.UseMissingToRollAddress.setValue(!1),e.resetAllProperties())})}},{key:"isEditMode",value:function(){var e;return"/edit"===(null===(e=this.router)||void 0===e?void 0:e.url)}},{key:"filterStreet",value:function(e){var t=this,n=[];return this.streets&&(null==e?void 0:e.length)>0&&(e=this.removeAccent(e).replace(/[/\\^$*+?.,()|[\]{}]/g,"").replace(/[-]/g," "),(null==(n=this.streets.filter(function(n){return 0===t.removeAccent(n.voieComplet).toLowerCase().indexOf(e.toLowerCase())}))?void 0:n.length)<5&&(n=Ha(new Set([].concat(Ha(n),Ha(this.filterAllWords(e))))))),n.slice(0,5)}},{key:"selectStreet",value:function(e){this.resetAllProperties(),null!==e.option.value&&this.getOwnerWithAddress()}},{key:"displayStreet",value:function(e){return e&&e.voie?e.voie:""}},{key:"displayLandNumber",value:function(e){return e&&e.lotReno?e.lotReno:""}},{key:"filterRegistrationNumber",value:function(e){var t=[];return this.taxMapLandNumbers&&e.length>1&&(t=this.taxMapLandNumbers.filter(function(t){return 0===t.matricule.toLowerCase().indexOf(e.toLowerCase())})),t.slice(0,5)}},{key:"selectRegistrationNumber",value:function(e){this.resetAllProperties(),this.getOwnerInfoByRegistrationNumber(e.option.value)}},{key:"selectLandNumber",value:function(e){this.resetAllProperties(),this.getOwnerInfoByRegistrationNumber(this.SearchLandNumber.value.matricule)}},{key:"selectOwner",value:function(e){this.ownerSelected=e,this.getSelectedOwnerInfo()}},{key:"resetAllEvent",value:function(e){var t;"searchStreet"===(null===(t=e.target)||void 0===t?void 0:t.name)&&(this.isAddressNotFound=!0,this.UseMissingToRollAddress.setValue(!1)),this.resetAllProperties()}},{key:"filterLandNumber",value:function(e){var t=[];return this.taxMapLandNumbers&&e.length>1&&(t=this.taxMapLandNumbers.filter(function(t){return 0===t.lotReno.toLowerCase().indexOf(e.toLowerCase())})),t.slice(0,5)}},{key:"filterAllWords",value:function(e){var t=this,n=e.split(/\s+/g).map(function(e){return e.trim()}).filter(function(e){return!!e}),r=e.endsWith(" "),i=new RegExp(n.map(function(e,t){return t+1!==n.length||r?"(?=.*\\b".concat(e,"\\b)"):"(?=.*\\b".concat(e,")")}).join("")+".+","i");return this.streets.filter(function(e){return i.test(t.removeAccent(e.voieComplet))})}},{key:"hasOwnerToContinue",value:function(){return void 0!==this.addressProperty.registrationNumber}},{key:"resetAllProperties",value:function(){this.addressProperty.registrationNumber=void 0,this.addressProperty.civicNumber=null,this.addressProperty.designa="",this.addressProperty.street="",this.addressProperty.discriminant="",this.addressProperty.suffix="",this.ownerSelected=""}},{key:"resetAllForm",value:function(){this.SearchLandNumber.setValue(""),this.SearchRegistrationNumber.setValue(""),this.CivicNumber.setValue(""),this.Suffix.setValue(""),this.Apartement.setValue(""),this.SearchStreet.setValue(""),this.OwnerSelectedRegistrationNumber.setValue("")}},{key:"setCurrentSearchView",value:function(e){this.resetAllProperties(),this.resetAllForm(),this.resetNoPropertyFound(),this.currentSearchView=e,this.SearchMode.setValue(e)}},{key:"getCurrentOwnerInEdition",value:function(){return this.currentOwnerInEdition}},{key:"setCurrentOwnerMode",value:function(){var e=this,t=this.lstOwners.find(function(t){return t.noCoProp===parseInt(e.ownerSelected,10)});void 0!==t&&(this.currentOwnerInEdition?(this.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:this.ownerSelected,ownerText:t.nomCopr,ownerAddress:t.adrsCopr,ownerCity:t.ville,ownerPostalCode:t.codePostal}),this.initializeAddressControl()):(this.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:void 0,ownerText:t.nomCopr,ownerAddress:this.OwnerAddress.enable?this.OwnerAddress.value:t.adrsCopr,ownerCity:this.OwnerCity.enable?this.OwnerCity.value:t.ville,ownerPostalCode:this.OwnerPostalCode.enable?this.OwnerPostalCode.value:t.codePostal}),this.OwnerAddress.enable(),this.OwnerPostalCode.enable(),this.OwnerCity.enable())),this.currentOwnerInEdition=!this.currentOwnerInEdition}},{key:"validateAddress",value:function(e){this.resetAllProperties(),this.getOwnerWithAddress()}},{key:"getOwnerWithAddress",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.propertyIdentificationForm.controls.addressGroup.valid){var r=this.SearchStreet.value;this.addressProperty.designa=r.designa,this.addressProperty.street=r.voie,this.addressProperty.civicNumber=parseInt(this.CivicNumber.value,10),this.addressProperty.suffix=this.Suffix.value,this.addressProperty.apartment=this.Apartement.value,this.addressProperty.discriminant=r.discriminant,this.isLoadingAddress=!0,"/view"===this.router.url?(null===(e=this.property)||void 0===e?void 0:e.ownerGroup)&&(this.lstOwners=[{idTxCopr:0,matricule:"",noCoProp:0,nomCopr:this.property.ownerGroup.ownerText,adrsCopr:this.property.ownerGroup.ownerAddress,ville:this.property.ownerGroup.ownerCity,codePostal:this.property.ownerGroup.ownerPostalCode,telephone:""}],this.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:this.lstOwners[0].noCoProp,ownerText:this.property.ownerGroup.ownerText,ownerAddress:this.property.ownerGroup.ownerAddress,ownerCity:this.property.ownerGroup.ownerCity,ownerPostalCode:this.property.ownerGroup.ownerPostalCode,ownerSelectedRegistrationNumber:this.property.ownerGroup.ownerSelectedRegistrationNumber}),this.ownerSelected=this.lstOwners[0].noCoProp.toString(),this.addressProperty.registrationNumber=this.property.ownerGroup.ownerSelectedRegistrationNumber,this.UseMissingToRollAddress.setValue(!1),this.isAddressNotFound=!1,this.isLoadingAddress=!1):this.pelService.getListOfOwnersByAddress(this.addressProperty).subscribe(function(e){0!==e.count?(t.lstOwners=e.result,t.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:t.lstOwners[0].noCoProp,ownerText:t.lstOwners[0].nomCopr,ownerAddress:e.result[0].adrsCopr,ownerCity:e.result[0].ville,ownerPostalCode:e.result[0].codePostal,ownerSelectedRegistrationNumber:e.result[0].matricule}),t.ownerSelected=t.lstOwners[0].noCoProp.toString(),t.addressProperty.registrationNumber=e.result[0].matricule,t.resetNoPropertyFound(n),t.UseMissingToRollAddress.setValue(!1),t.isAddressNotFound=!1):"/edit"===t.router.url&&n?t.setPropertyNotFound(!0):(t.isAddressNotFound=!0,t.UseMissingToRollAddress.setValue(!1)),t.isLoadingAddress=!1},function(e){t.isLoadingAddress=!1})}else"/edit"===this.router.url&&n&&this.setPropertyNotFound(!0)}},{key:"getSelectedOwnerInfo",value:function(){var e=this,t=this.lstOwners.find(function(t){return t.noCoProp===parseInt(e.ownerSelected,10)});void 0!==t&&this.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:t.noCoProp,ownerText:t.nomCopr,ownerAddress:t.adrsCopr,ownerCity:t.ville,ownerPostalCode:t.codePostal})}},{key:"getOwnerInfoByRegistrationNumber",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.isLoadingAddress=!0,this.pelService.getListOfOwnersByRegistrationNumber(e).subscribe(function(e){0!==e.count?(t.lstOwners=e.result,t.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:t.lstOwners[0].noCoProp,ownerText:t.lstOwners[0].nomCopr,ownerAddress:e.result[0].adrsCopr,ownerCity:e.result[0].ville,ownerPostalCode:e.result[0].codePostal,ownerSelectedRegistrationNumber:e.result[0].matricule}),t.ownerSelected=t.lstOwners[0].noCoProp.toString(),t.addressProperty.registrationNumber=e.result[0].matricule,t.initializeAddressControl(n)):"/edit"===t.router.url&&n&&t.setPropertyNotFound(!0),t.isLoadingAddress=!1},function(e){t.isLoadingAddress=!1})}},{key:"isFormValid",value:function(){return this.isAddressNotFound?!!this.UseMissingToRollAddress.value&&this.propertyIdentificationForm.controls.ownerGroup.valid:this.propertyIdentificationForm.controls.ownerGroup.valid}},{key:"onFormSubmit",value:function(){this.propertyIdentificationForm.controls.ownerGroup.invalid||this.stepSubmit.emit(this.propertyIdentificationForm.getRawValue())}},{key:"useMissingRollAddress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.SearchStreet.setErrors(null),this.isAddressNotFound&&this.propertyIdentificationForm.controls.rollNotFoundGroup.value.useMissingToRollAddress){if(e)this.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:this.property.ownerGroup.owner,ownerText:this.property.ownerGroup.ownerText,ownerAddress:this.property.ownerGroup.ownerAddress,ownerCity:this.property.ownerGroup.ownerCity,ownerPostalCode:this.property.ownerGroup.ownerPostalCode,ownerSelectedRegistrationNumber:""});else{var t="",n="";this.propertyIdentificationForm.controls.ownerGroup.patchValue({owner:"",ownerText:"",ownerAddress:this.formatDisplayAddress(),ownerCity:t,ownerPostalCode:n,ownerSelectedRegistrationNumber:""})}this.OwnerAddress.enable(),this.OwnerPostalCode.enable(),this.OwnerCity.enable(),this.currentOwnerInEdition=!0,this.addressProperty.registrationNumber=""}else this.addressProperty.registrationNumber=void 0;this.cdr.detectChanges()}},{key:"formatDisplayAddress",value:function(){var e=this.SearchStreet.value,t="",n="";return"address"===this.propertyIdentificationForm.value.searchMode&&("null"===(t="".concat(""!==this.Apartement.value?this.Apartement.value+"-":"").concat(this.CivicNumber.value))&&(t=""),n="object"==typeof e?"".concat(e.designa?e.designa:""," ").concat(e.lien?e.lien:""," ")+(e.voie?e.voie:"")+(this.Suffix.value&&""!==this.Suffix.value?" "+this.Suffix.value:""):this.SearchStreet.value+(this.Suffix.value&&""!==this.Suffix.value?" "+this.Suffix.value:"")),"".concat(t," ").concat(n)}},{key:"showPropertyNotFound",value:function(){this.showFindMoreProperty=!0}},{key:"setPropertyNotFound",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isAddressNotFound=!0,this.isLoadingAddress=!1,this.UseMissingToRollAddress.setValue(!0),this.useMissingRollAddress(e)}},{key:"resetNoPropertyFound",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.UseMissingToRollAddress.setValue(!1),this.isAddressNotFound=!1,this.showFindMoreProperty=!1,this.currentOwnerInEdition=!1,this.initializeAddressControl(e)}},{key:"initializeAddressControl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];""===this.OwnerAddress.value?(this.isReadOnlyMode||this.OwnerAddress.enable(),e&&this.OwnerAddress.setValue(this.property.ownerGroup.ownerAddress)):this.OwnerAddress.disable(),""===this.OwnerPostalCode.value?(this.isReadOnlyMode||this.OwnerPostalCode.enable(),e&&this.OwnerPostalCode.setValue(this.property.ownerGroup.ownerPostalCode)):this.OwnerPostalCode.disable(),""===this.OwnerCity.value?(this.isReadOnlyMode||this.OwnerCity.enable(),e&&this.OwnerCity.setValue(this.property.ownerGroup.ownerCity)):this.OwnerCity.disable()}},{key:"removeAccent",value:function(e){return null==e?void 0:e.replace(/[\xea\xe9\xe8\xeb\xca\xc9\xc8\xcb]/g,"e").replace(/[\xee\xef\xce\xcf]/g,"i").replace(/[\xe7\xc7]/g,"c").replace(/[\xe0\xe2\xe4\xc0\xc2\xc4]/g,"a").replace(/[\xf4\xf6\xd4\xd6]/g,"o").replace(/[\xfb\xf9\xfc\xdb\xd9\xdc]/g,"u").replace(/[\xff]/g,"y")}},{key:"CivicNumber",get:function(){return this.propertyIdentificationForm.get("addressGroup.civicNumber")}},{key:"SearchStreet",get:function(){return this.propertyIdentificationForm.get("addressGroup.searchStreet")}},{key:"Suffix",get:function(){return this.propertyIdentificationForm.get("addressGroup.suffix")}},{key:"Apartement",get:function(){return this.propertyIdentificationForm.get("addressGroup.apartment")}},{key:"SearchRegistrationNumber",get:function(){return this.propertyIdentificationForm.get("registrationNumberGroup.searchRegistrationNumber")}},{key:"SearchLandNumber",get:function(){return this.propertyIdentificationForm.get("landNumberGroup.searchLandNumber")}},{key:"SearchMode",get:function(){return this.propertyIdentificationForm.get("searchMode")}},{key:"OwnerAddress",get:function(){return this.propertyIdentificationForm.get("ownerGroup.ownerAddress")}},{key:"OwnerCity",get:function(){return this.propertyIdentificationForm.get("ownerGroup.ownerCity")}},{key:"OwnerPostalCode",get:function(){return this.propertyIdentificationForm.get("ownerGroup.ownerPostalCode")}},{key:"Owner",get:function(){return this.propertyIdentificationForm.get("ownerGroup.owner")}},{key:"OwnerText",get:function(){return this.propertyIdentificationForm.get("ownerGroup.ownerText")}},{key:"OwnerSelectedRegistrationNumber",get:function(){return this.propertyIdentificationForm.get("ownerGroup.ownerSelectedRegistrationNumber")}},{key:"UseMissingToRollAddress",get:function(){return this.propertyIdentificationForm.get("rollNotFoundGroup.useMissingToRollAddress")}}]),e}()).\u0275fac=function(e){return new(e||yU)(Qf(Bq),Qf(zq),Qf(_k),Qf(bv),Qf(Ry),Qf(JN))},yU.\u0275cmp=zl({type:yU,selectors:[["pel-request-permit-property"]],viewQuery:function(e,t){var n;1&e&&my(Nz,!0),2&e&&py(n=yy())&&(t.autocomplete=n.first)},inputs:{isReadOnlyMode:"isReadOnlyMode",property:"property"},outputs:{stepSubmit:"stepSubmit"},decls:17,vars:11,consts:function(){return[[3,"formGroup","ngSubmit"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],["id","lblEmplacement"],"Emplacement",["class","panel select-panel text-primary mb-3",4,"ngIf"],[3,"ngSwitch"],["class","mb-3","formGroupName","addressGroup",4,"ngSwitchCase"],["class","mb-3","formGroupName","registrationNumberGroup",4,"ngSwitchCase"],["class","mb-3","formGroupName","landNumberGroup",4,"ngSwitchCase"],["class","d-flex justify-content-center",4,"ngIf"],["class","mb-3 form-group alert alert-warning p-3","role","alert","formGroupName","rollNotFoundGroup",4,"ngIf"],["formGroupName","ownerGroup",4,"ngIf"],[1,"text-muted","my-3"],"* Champs obligatoires",["class","btn btn-primary btn-big btn-rounded w-100","type","submit","datatest-id","21CA6963-0535-4CE1-841A-2720E96B39C6",3,"disabled",4,"ngIf"],[1,"panel","select-panel","text-primary","mb-3"],["id","lblRechercherPar",1,"mb-1"],"Rechercher par",["role","group","aria-labelledby","lblRechercherPar lblEmplacement",1,"btn-group-inline"],["type","button","data-testid","C7956010-0009-4C7C-A68E-57824F1C84A0",1,"btn","btn-underline",3,"click"],"Adresse",["type","button","data-testid","CB405F06-6B84-4520-B324-F7FBADDA2583",1,"btn","btn-underline",3,"click"],"Matricule" + "\ufffd#8\ufffd" + "" + "\ufffd/#8\ufffd" + "",["type","button","data-testid","EDF24804-C646-4D7A-8598-AA4A872D75B4",1,"btn","btn-underline",3,"click"],"N" + "\ufffd#11\ufffd" + "o" + "\ufffd/#11\ufffd" + " de lot",["formGroupName","addressGroup",1,"mb-3"],[1,"form-row"],[1,"form-group","col-4"],["for","addressCivicNumber"],"N" + "\ufffd#6\ufffd" + "o" + "\ufffd/#6\ufffd" + " civique",["type","text","inputmode","numeric","mask","9999999999","id","addressCivicNumber","name","civicNumber","formControlName","civicNumber","data-testid","1FCE9902-3858-448F-B52D-5E795E297E29",1,"form-control",3,"specialCharacters","maxlength","change"],[1,"invalid-feedback"],[4,"ngIf"],["for","addressSuffix"],"Suffixe",["type","text","id","addressSuffix","name","suffix","formControlName","suffix","data-testid","311A6A89-C7A9-41A2-B918-1673A7F50B28",1,"form-control",3,"maxlength","change"],["for","addressApartment"],"App. ou local",["type","text","id","addressApartment","name","apartment","formControlName","apartment","data-testid","22BF01B1-5E6B-4C23-BC80-286A6C45E5B2",1,"form-control",3,"maxlength","change"],[1,"form-group","col-12"],["for","addressStreet"],"Voie publique",[4,"ngSwitchCase"],["id","addressStreetHelp",1,"form-text","text-muted"]," Rue, avenue, boulevard, chemin, route, etc. "," Veuillez saisir un n" + "\ufffd#2\ufffd" + "o" + "\ufffd/#2\ufffd" + " civique. ",[1,"ml-2",3,"icon","spin"],["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["matInput","","type","text","id","addressStreet","name","searchStreet","formControlName","searchStreet","aria-describedby","addressStreetHelp","placeholder","Commencez \xE0 taper\u2026","data-testid","6626B486-2B3C-4790-B765-29B314BC4546",1,"form-control",3,"matAutocomplete","maxlength"],[3,"displayWith","optionSelected"],["autoStreet","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]," Veuillez selectionner une voie dans la liste sugg\xE9r\xE9e. ",["formGroupName","registrationNumberGroup",1,"mb-3"],["id","regNumFormGroup",1,"form-group","col-auto"],["for","registrationNumber"],"Matricule",["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["matInput","","type","text","id","registrationNumber","placeholder","Commencez \xE0 taper\u2026","name","searchRegistrationNumber","formControlName","searchRegistrationNumber","data-testid","01BFE234-34C6-49F8-8200-752E26E81034",1,"form-control",3,"matAutocomplete","maxlength","change","keyup"],[3,"optionSelected"],["autoRegistrationNumber","matAutocomplete"],["class","mt-3",4,"ngIf"],[1,"mt-3"],[1,"btn","btn-secondary","btn-rounded","btn-small",3,"click"],"Je ne trouve pas ma propri\xE9t\xE9 ",["formGroupName","landNumberGroup",1,"mb-3"],["id","landNumFormGroup",1,"form-group","col-auto"],["for","landNumber"],"Num\xE9ro de lot",["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["type","text","matInput","","id","landNumber","name","searchLandNumber","placeholder","Commencez \xE0 taper\u2026","formControlName","searchLandNumber","data-testid","AAD4FDF3-5832-4F1C-BD21-A4B3339809F4",1,"form-control",3,"matAutocomplete","maxlength","change","keyup"],["autoLandNumber","matAutocomplete"],[1,"d-flex","justify-content-center"],["size","3x",3,"icon","spin"],["role","alert","formGroupName","rollNotFoundGroup",1,"mb-3","form-group","alert","alert-warning","p-3"],"La propri\xE9t\xE9 recherch\xE9e n'a pas \xE9t\xE9 trouv\xE9e \xE0 notre r\xF4le d'\xE9valuation.",[1,"custom-control","custom-checkbox","mt-2"],["id","missingRollId","name","useMissingToRollAddress","formControlName","useMissingToRollAddress","type","checkbox",1,"custom-control-input",3,"change"],["class","custom-control-label","for","missingRollId",4,"ngIf"],["for","missingRollId",1,"custom-control-label"],"Poursuivre quand m\xEAme en ajoutant une adresse","Poursuivre en ajoutant une adresse",["formGroupName","ownerGroup"],"Propri\xE9taire",[1,"form-group","col"],["for","ownerId"],"Propri\xE9taire",[1,"col"],["id","ownerId","class","form-control","name","owner","formControlName","owner","data-testid","0D7D61EB-5732-4C9E-A6FF-FDF57603F0BC",3,"change",4,"ngIf"],["type","text","id","ownerInputId","class","form-control","name","ownerInput","formControlName","ownerText","data-testid","E6850616-794A-499F-9A0F-4F027CBC7408",3,"is-invalid","maxlength",4,"ngIf"],["type","hidden","formControlName","ownerText"],["class","col-auto",4,"ngIf"],["for","ownerAddressId"],"Adresse",["type","text","id","ownerAddressId","name","ownerAddress","formControlName","ownerAddress","data-testid","88C9EE9D-DFCF-48B2-921C-71DE54000B0C",1,"form-control",3,"maxlength"],[1,"form-group","col-7"],["for","ownerCityId"],["type","text","id","ownerCityId","name","ownerCity","formControlName","ownerCity","data-testid","5490B778-5F70-4789-89F4-5AB7A3107821",1,"form-control",3,"maxlength"],[1,"form-group","col-5"],["for","ownerPostalCodeId"],"Code postal",["type","text","id","ownerPostalCodeId","name","ownerPostalCode","mask","S0S 0S0","formControlName","ownerPostalCode","data-testid","28DCD78C-7C31-4DC7-A7D1-CB3EAD83A21A",1,"form-control",3,"specialCharacters"],["type","hidden","formControlName","ownerSelectedRegistrationNumber"],["id","ownerId","name","owner","formControlName","owner","data-testid","0D7D61EB-5732-4C9E-A6FF-FDF57603F0BC",1,"form-control",3,"change"],["mySelect",""],["type","text","id","ownerInputId","name","ownerInput","formControlName","ownerText","data-testid","E6850616-794A-499F-9A0F-4F027CBC7408",1,"form-control",3,"maxlength"]," Veuillez entrer un propri\xE9taire. ",[1,"col-auto"],["id","btnEdit","type","button","data-testid","A74CE802-ED36-49F3-B532-B3FA2707710B",1,"btn","btn-secondary",3,"click"]," Modifier ","Annuler"," Veuillez entrer une adresse. "," Veuillez entrer un code postal. "," Le code postal est invalide. ",["type","submit","datatest-id","21CA6963-0535-4CE1-841A-2720E96B39C6",1,"btn","btn-primary","btn-big","btn-rounded","w-100",3,"disabled"],"Continuer",[1,"ml-1",3,"icon"]]},template:function(e,t){1&e&&($f(0,"form",0),nm("ngSubmit",function(){return t.onFormSubmit()}),$f(1,"h5",1),$f(2,"div",2),Yf(3,"fa-icon",3),Jf(),$f(4,"span",4),Rg(5,5),Jf(),Jf(),Uf(6,Lz,12,6,"div",6),Kf(7,7),Uf(8,Uz,32,12,"div",8),Uf(9,$z,10,3,"div",9),Uf(10,Xz,11,4,"div",10),Zf(),Uf(11,eU,2,2,"div",11),Uf(12,rU,7,2,"div",12),Uf(13,gU,48,20,"div",13),$f(14,"p",14),Rg(15,15),Jf(),Uf(16,vU,4,2,"button",16),Jf()),2&e&&(Wf("formGroup",t.propertyIdentificationForm),dp(3),Wf("icon",t.farMapMarked),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngSwitch",t.currentSearchView),dp(1),Wf("ngSwitchCase","address"),dp(1),Wf("ngSwitchCase","registrationNumber"),dp(1),Wf("ngSwitchCase","landNumber"),dp(1),Wf("ngIf",t.isLoadingAddress),dp(1),Wf("ngIf",t.isAddressNotFound&&!(null!=t.autocomplete&&t.autocomplete.isOpen)&&!t.isLoadingAddress),dp(1),Wf("ngIf",t.hasOwnerToContinue()),dp(3),Wf("ngIf",!t.isReadOnlyMode))},directives:[XP,lP,nk,DM,M_,W_,G_,ik,QR,OS,sP,gk,yk,$T,zT,L_,XA,AS,_P,wP,EP],pipes:[ow],styles:["#landNumFormGroup[_ngcontent-%COMP%], #regNumFormGroup[_ngcontent-%COMP%]{width:280px}#btnEdit[_ngcontent-%COMP%]{height:38px}"]}),yU);function _U(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"p",46),Tg(2,47),Yf(3,"strong"),Og(),Jf(),$f(4,"address",48),Cm(5),Yf(6,"br"),Cm(7),Yf(8,"br"),Cm(9),Jf(),$f(10,"p",49),Rg(11,50),Jf(),$f(12,"div",51),$f(13,"button",52),nm("click",function(){return Nu(n),sm().onIsApplicantOwnerChange(!0)}),Rg(14,53),Jf(),$f(15,"button",54),nm("click",function(){return Nu(n),sm().onIsApplicantOwnerChange(!1)}),Rg(16,55),Jf(),Jf(),Zf()}if(2&e){var r=sm();dp(5),Sm(" ",r.theDefaultApplicantData.ownerGroup.ownerText,""),dp(2),Sm(" ",r.theDefaultApplicantData.ownerGroup.ownerAddress,""),dp(2),Pm(" ",r.theDefaultApplicantData.ownerGroup.ownerCity,"\xa0 ",r.theDefaultApplicantData.ownerGroup.ownerPostalCode," ")}}function wU(e,t){1&e&&($f(0,"p"),Rg(1,56),Jf())}function CU(e,t){1&e&&(Kf(0),Rg(1,57),Zf())}function xU(e,t){1&e&&(Kf(0),Rg(1,58),Zf())}function SU(e,t){1&e&&($f(0,"div"),Rg(1,59),Jf())}function PU(e,t){1&e&&($f(0,"div"),Rg(1,63),Jf())}function kU(e,t){if(1&e&&($f(0,"div",38),$f(1,"label",60),Kf(2),Rg(3,61),Zf(),Cm(4,"\xa0* "),Jf(),Yf(5,"input",62),$f(6,"div",19),Uf(7,PU,2,0,"div",0),Jf(),Jf()),2&e){var n=sm();dp(5),gm("is-invalid",n.applicantFirstName.touched&&!n.applicantFirstName.valid),Wf("maxlength",n.fieldsMaxLength.applicantFirstName),dp(2),Wf("ngIf",null==n.applicantFirstName.errors?null:n.applicantFirstName.errors.required)}}function EU(e,t){1&e&&($f(0,"div"),Rg(1,64),Jf())}function AU(e,t){if(1&e&&($f(0,"div"),Cm(1),Jf()),2&e){var n=sm();dp(1),Sm(" ",n.cityRequiredMessage," ")}}function IU(e,t){1&e&&($f(0,"div"),Rg(1,65),Jf())}function TU(e,t){1&e&&($f(0,"div"),Rg(1,66),Jf())}function OU(e,t){1&e&&($f(0,"div"),Rg(1,67),Jf())}function RU(e,t){1&e&&($f(0,"div"),Rg(1,68),Jf())}function VU(e,t){1&e&&($f(0,"div"),Rg(1,69),Jf())}function DU(e,t){1&e&&($f(0,"div"),Rg(1,70),Jf())}function NU(e,t){1&e&&($f(0,"div"),Rg(1,71),Jf())}function LU(e,t){1&e&&($f(0,"div"),Rg(1,72),Jf())}function FU(e,t){1&e&&($f(0,"div"),Rg(1,73),Jf())}function MU(e,t){if(1&e){var n=Xf();$f(0,"button",74),nm("click",function(){return Nu(n),sm().onFormSubmit()}),Kf(1),Rg(2,75),Zf(),Yf(3,"fa-icon",76),Jf()}if(2&e){var r=sm();Wf("disabled",r.applicantForm.invalid||r.isSubmitting),dp(3),Wf("icon",r.farLongArrowRight)}}function qU(e,t){1&e&&Yf(0,"fa-icon",81),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function jU(e,t){if(1&e){var n=Xf();$f(0,"button",77),nm("click",function(){return Nu(n),sm().onFormSubmit(!0)}),Yf(1,"fa-icon",78),Kf(2),Rg(3,79),Zf(),Uf(4,qU,1,2,"fa-icon",80),Jf()}if(2&e){var r=sm();Wf("disabled",r.applicantForm.invalid||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var BU,zU=function(e,t){return{"btn-primary":e,"btn-secondary":t}},UU=function(){return[" "]},HU=function(){return["-"," "]},QU=((BU=function(){function e(t,n,r,i){is(this,e),this.localeId=t,this.globalsService=n,this.fb=r,this.router=i,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.isApplicantContractor=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.isLoaded=!1,this.fieldsMaxLength={applicantFirstName:75,applicantLastName:75,address:75,city:50,applicantEmail:200},this.farUser=cF,this.farLongArrowRight=$L,this.farSave=iF,this.farSpinnerThird=aF}return as(e,[{key:"ngOnInit",value:function(){var e;if(this.cityRequiredMessage=this.globalsService.getCustomResourceTextByCode("RES_ERR_AUCUNE_VILLE_DEMANDEUR"),""===this.cityRequiredMessage&&(this.cityRequiredMessage="en"===this.localeId?hj.RES_ERR_AUCUNE_VILLE_DEMANDEUR_EN:hj.RES_ERR_AUCUNE_VILLE_DEMANDEUR_FR),this.cityLabel=this.globalsService.getCustomResourceTextByCode("RES_VILLE"),""===this.cityLabel&&(this.cityLabel="en"===this.localeId?hj.RES_VILLE_EN:hj.RES_VILLE_FR),this.applicantForm=this.fb.group({applicantEmail:[this.applicant?this.applicant.applicantEmail:"",[FS.required,FS.pattern(VB.EMAIL_VALIDATOR_PATERN),FS.maxLength(this.fieldsMaxLength.applicantEmail)]],applicantEmailConfirmation:[this.applicant?this.applicant.applicantEmail:"",[FS.required,FS.pattern(VB.EMAIL_VALIDATOR_PATERN),FS.maxLength(this.fieldsMaxLength.applicantEmail)]],applicantPhoneNumber:[this.applicant?this.applicant.applicantPhoneNumber:"",[FS.required]],applicantLastName:[this.applicant?this.applicant.applicantLastName:"",[FS.required,FS.maxLength(this.fieldsMaxLength.applicantLastName)]],applicantFirstName:[this.applicant?this.applicant.applicantFirstName:"",[FS.required,FS.maxLength(this.fieldsMaxLength.applicantFirstName)]],applicantAddress:this.fb.group({address:[this.applicant?this.applicant.applicantAddress.address:"",[FS.required,FS.maxLength(this.fieldsMaxLength.address)]],city:[this.applicant?this.applicant.applicantAddress.city:"",[FS.required,FS.maxLength(this.fieldsMaxLength.city)]],zipCode:[this.applicant?this.applicant.applicantAddress.zipCode:"",FS.required]})}),this.applicantForm.setValidators(this.emailMatchValidator),this.isReadOnlyMode&&this.applicantForm.disable(),(this.isReadOnlyMode||this.isEditMode())&&""===(null===(e=this.applicant)||void 0===e?void 0:e.applicantFirstName)&&(this.isApplicantContractor=!0,this.applicantFirstName.setValidators(null)),localStorage.getItem("requester")&&!this.isEditMode()&&!this.isReadOnlyMode){var t=JSON.parse(localStorage.getItem("requester"));this.applicantForm.get("applicantEmail").setValue(t.Email),this.applicantForm.get("applicantLastName").setValue(t.LastName),this.applicantForm.get("applicantFirstName").setValue(t.FirstName),this.applicantForm.get("applicantPhoneNumber").setValue(t.PhoneNumber),this.applicantForm.get("applicantAddress.address").setValue(t.NoCivic+" "+t.FullAdress.trim()),this.applicantForm.get("applicantAddress.city").setValue(t.City),this.applicantForm.get("applicantAddress.zipCode").setValue(t.PostalCode)}}},{key:"onIsApplicantContractorChange",value:function(e){var t,n,r;if(this.isApplicantContractor=e,e)this.applicantLastName.setValue((this.applicantFirstName.value+" "+this.applicantLastName.value).trim()),this.applicantFirstName.setValidators(null),this.applicantFirstName.setValue("");else{var i="",o="";if(this.applicantFirstName.setValidators([FS.required]),void 0!==this.applicantLastName.value&&""!==this.applicantLastName.value){var a=this.applicantLastName.value.split(" ");i=void 0===(null===(t=a[a.length-1])||void 0===t?void 0:t.trim())?"":null===(n=a[a.length-1])||void 0===n?void 0:n.trim(),o=null===(r=this.applicantLastName.value.replace(i,""))||void 0===r?void 0:r.trim()}""===this.applicantFirstName.value&&this.applicantFirstName.setValue(o),this.applicantLastName.setValue(i)}this.applicantFirstName.updateValueAndValidity(),this.applicantForm.updateValueAndValidity()}},{key:"onFormSubmit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?this.stepSubmitIsSaveForLater.emit(this.applicantForm.value):this.stepSubmit.emit(this.applicantForm.value)}},{key:"emailMatchValidator",value:function(e){if(e){var t=e.get("applicantEmail").value,n=e.get("applicantEmailConfirmation").value;if(""!==t&&""!==n&&t!==n)return{notMatching:!0}}return null}},{key:"onIsApplicantOwnerChange",value:function(e){this.isApplicantOwner=e,this.isApplicantOwner?this.setFormDefaultValues(this.theDefaultApplicantData):localStorage.getItem("requester")||this.clearFormDefaultValues()}},{key:"clearFormDefaultValues",value:function(){var e,t,n,r,i;this.theDefaultApplicantData={addressGroup:{apartment:"",civicNumber:"",searchStreet:void 0,suffix:""},landNumberGroup:{searchLandNumber:{matricule:"",lotReno:""}},registrationNumberGroup:{searchRegistrationNumber:""},ownerGroup:{owner:void 0,ownerAddress:"",ownerCity:"",ownerPostalCode:"",ownerSelectedRegistrationNumber:"",ownerText:""},searchMode:""},null===(e=this.address)||void 0===e||e.setValue(""),null===(t=this.city)||void 0===t||t.setValue(""),null===(n=this.zipCode)||void 0===n||n.setValue(""),null===(r=this.applicantLastName)||void 0===r||r.setValue(""),null===(i=this.applicantFirstName)||void 0===i||i.setValue("")}},{key:"setFormDefaultValues",value:function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p,f,m,g,v,y;if(void 0!==e&&Object.keys(e).length>0&&void 0!==this.applicantForm){null===(t=this.address)||void 0===t||t.setValue(null===(n=e.ownerGroup)||void 0===n?void 0:n.ownerAddress),null===(r=this.city)||void 0===r||r.setValue(null===(i=e.ownerGroup)||void 0===i?void 0:i.ownerCity),null===(o=this.zipCode)||void 0===o||o.setValue(null===(a=e.ownerGroup)||void 0===a?void 0:a.ownerPostalCode);var b=null===(l=null===(s=e.ownerGroup)||void 0===s?void 0:s.ownerText)||void 0===l?void 0:l.split(" ");this.isApplicantContractor?(this.applicantFirstName.setValidators(null),null===(u=this.applicantFirstName)||void 0===u||u.setValue(""),null===(c=this.applicantLastName)||void 0===c||c.setValue(((null===(d=e.ownerGroup)||void 0===d?void 0:d.ownerText)?null===(h=e.ownerGroup)||void 0===h?void 0:h.ownerText:"").trim())):(null===(p=this.applicantFirstName)||void 0===p||p.setValue(null===(g=null===(m=null===(f=e.ownerGroup)||void 0===f?void 0:f.ownerText)||void 0===m?void 0:m.replace(b[0],""))||void 0===g?void 0:g.trim()),null===(v=this.applicantLastName)||void 0===v||v.setValue(null===(y=b[0])||void 0===y?void 0:y.trim()))}}},{key:"isEditMode",value:function(){var e;return"/edit"===(null===(e=this.router)||void 0===e?void 0:e.url)}},{key:"defaultApplicantData",set:function(e){this.applicant||this.theDefaultApplicantData&&this.theDefaultApplicantData===e||(this.theDefaultApplicantData=e,this.setFormDefaultValues(this.theDefaultApplicantData))}},{key:"applicantEmail",get:function(){return this.applicantForm.get("applicantEmail")}},{key:"applicantEmailConfirmation",get:function(){return this.applicantForm.get("applicantEmailConfirmation")}},{key:"applicantLastName",get:function(){return this.applicantForm.get("applicantLastName")}},{key:"applicantFirstName",get:function(){return this.applicantForm.get("applicantFirstName")}},{key:"address",get:function(){return this.applicantForm.get("applicantAddress.address")}},{key:"city",get:function(){return this.applicantForm.get("applicantAddress.city")}},{key:"applicantPhoneNumber",get:function(){return this.applicantForm.get("applicantPhoneNumber")}},{key:"zipCode",get:function(){return this.applicantForm.get("applicantAddress.zipCode")}}]),e}()).\u0275fac=function(e){return new(e||BU)(Qf(Ry),Qf(zq),Qf(_k),Qf(JN))},BU.\u0275cmp=zl({type:BU,selectors:[["pel-request-permit-applicant"]],inputs:{defaultApplicantData:"defaultApplicantData",applicant:"applicant",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting"},outputs:{isApplicantContractor:"isApplicantContractor",stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:92,vars:57,consts:function(){return[[4,"ngIf"],[3,"hidden"],[3,"formGroup"],[1,"d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],[1,"font-weight-bold","text-primary"],"Demandeur",[1,"form-row",3,"hidden"],[1,"form-group","col"],[1,"d-block"],"Type de demandeur",["type","button","data-testid","525B807D-301D-44CD-9830-965680F2DFCB",1,"btn","mr-1",3,"ngClass","click"]," Particulier",["type","button","data-testid","04FFC315-2558-4689-B64A-39F447319715",1,"btn",3,"ngClass","click"]," Entreprise",[1,"form-row"],["for","applicantLastName"],["type","text","id","applicantLastName","name","applicantLastName","formControlName","applicantLastName","data-testid","F0ABE133-84C9-471F-A7E9-7A5AF794DFB7",1,"form-control",3,"maxlength"],[1,"invalid-feedback"],["class","form-group col-6",4,"ngIf"],["formGroupName","applicantAddress"],["for","address"],"Adresse",["type","text","id","address","name","address","formControlName","address","data-testid","E163399E-D8BE-45CA-AC2B-03E6714F94C7",1,"form-control",3,"maxlength"],[1,"form-group","col-7"],["for","city"],["type","text","id","city","name","city","formControlName","city","data-testid","3253E256-A304-4DED-8E9B-660B01407C08",1,"form-control",3,"maxlength"],[1,"form-group","col-5"],["for","zipCode"],"Code postal",["type","text","mask","S0S 0S0","id","zipCode","name","zipCode","formControlName","zipCode","data-testid","F0666A3C-40CF-4682-85F6-FCD970689044",1,"form-control",3,"specialCharacters"],["for","applicantEmail"],"Courriel",["type","email","id","applicantEmail","name","applicantEmail","formControlName","applicantEmail","data-testid","BC9B5282-4C02-46D5-A977-47D67F4DC046",1,"form-control",3,"maxlength"],["for","applicantEmailConfirmation"]," Confirmation du courriel",["type","email","id","applicantEmailConfirmation","name","applicantEmailConfirmation","formControlName","applicantEmailConfirmation","data-testid","26B08BF0-3B8E-42AC-8C6A-5ED36BF3D751",1,"form-control",3,"maxlength"],[1,"form-group","col-6"],["for","applicantPhoneNumber"],"T\xE9l\xE9phone",["type","tel","mask","000 000-0000","id","applicantPhoneNumber","name","applicantPhoneNumber","formControlName","applicantPhoneNumber","data-testid","1106A7BC-A359-4274-A979-9C36327A3562",1,"form-control",3,"specialCharacters"],[1,"text-muted","my-3"],"* Champs obligatoires",["type","submit","class","btn btn-primary btn-rounded btn-big w-100","data-testid","E18703F6-9B91-4F31-A494-F9AE9E8D5A9A",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","38651479-3890-4763-afb7-f7d616acf84c",3,"disabled","click",4,"ngIf"],[1,"text-center"]," Ce propri\xE9taire est-il \xE9galement le " + "\ufffd#3\ufffd" + "demandeur" + "\ufffd/#3\ufffd" + "? ",[1,"font-weight-medium","text-center","text-primary"],[1,"text-muted","text-small","text-center"]," Le demandeur sera le contact de pr\xE9f\xE9rence pour cette demande. ",[1,"d-flex","mt-2"],["data-testid","3FC4F163-509C-43E7-A4BC-6B559F4AFE02",1,"btn","btn-secondary","col","mr-2",3,"click"],"Oui, continuer",["data-testid","82AD2CCD-1474-4B46-A8CA-BF98890DB750",1,"btn","btn-secondary","col","ml-2",3,"click"],"Non, modifier"," Veuillez vous assurer que les informations sont correctes, puis compl\xE9tez les informations manquantes. "," Nom"," Nom d'entreprise"," Veuillez entrer le nom du demandeur. ",["for","applicantFirstName"],"Pr\xE9nom",["type","text","id","applicantFirstName","name","applicantFirstName","formControlName","applicantFirstName","data-testid","2E0A4125-84A7-43E0-A3C6-A506411A09BB",1,"form-control",3,"maxlength"]," Veuillez entrer le pr\xE9nom du demandeur. "," Veuillez entrer l'adresse du demandeur. "," Veuillez entrer le code postal du demandeur. "," Veuillez entrer un code postal valide. "," Veuillez entrer le courriel du demandeur. "," Veuillez entrer une adresse courriel valide. "," Veuillez entrer le courriel du demandeur. "," Veuillez entrer une adresse courriel valide. "," Les adresses courriel ne correspondent pas. "," Veuillez entrer le num\xE9ro de t\xE9l\xE9phone du demandeur. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. ",["type","submit","data-testid","E18703F6-9B91-4F31-A494-F9AE9E8D5A9A",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled","click"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","38651479-3890-4763-afb7-f7d616acf84c",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"]]},template:function(e,t){1&e&&(Uf(0,_U,17,4,"ng-container",0),$f(1,"div",1),$f(2,"form",2),$f(3,"h5",3),$f(4,"div",4),Yf(5,"fa-icon",5),Jf(),$f(6,"span",6),Rg(7,7),Jf(),Jf(),Uf(8,wU,2,0,"p",0),$f(9,"div",8),$f(10,"div",9),$f(11,"label",10),Kf(12),Rg(13,11),Zf(),Cm(14,"\xa0* "),Jf(),$f(15,"button",12),nm("click",function(){return t.onIsApplicantContractorChange(!1)}),Rg(16,13),Jf(),$f(17,"button",14),nm("click",function(){return t.onIsApplicantContractorChange(!0)}),Rg(18,15),Jf(),Jf(),Jf(),$f(19,"div",16),$f(20,"div",9),$f(21,"label",17),Uf(22,CU,2,0,"ng-container",0),Uf(23,xU,2,0,"ng-container",0),Cm(24,"\xa0* "),Jf(),Yf(25,"input",18),$f(26,"div",19),Uf(27,SU,2,0,"div",0),Jf(),Jf(),Uf(28,kU,8,4,"div",20),Jf(),$f(29,"div",21),$f(30,"div",16),$f(31,"div",9),$f(32,"label",22),Kf(33),Rg(34,23),Zf(),Cm(35,"\xa0* "),Jf(),Yf(36,"input",24),$f(37,"div",19),Uf(38,EU,2,0,"div",0),Jf(),Jf(),Jf(),$f(39,"div",16),$f(40,"div",25),$f(41,"label",26),Kf(42),Cm(43),Zf(),Cm(44,"\xa0* "),Jf(),Yf(45,"input",27),$f(46,"div",19),Uf(47,AU,2,1,"div",0),Jf(),Jf(),$f(48,"div",28),$f(49,"label",29),Kf(50),Rg(51,30),Zf(),Cm(52,"\xa0* "),Jf(),Yf(53,"input",31),$f(54,"div",19),Uf(55,IU,2,0,"div",0),Uf(56,TU,2,0,"div",0),Jf(),Jf(),Jf(),Jf(),$f(57,"div",16),$f(58,"div",9),$f(59,"label",32),Kf(60),Rg(61,33),Zf(),Cm(62,"\xa0* "),Jf(),Yf(63,"input",34),$f(64,"div",19),Uf(65,OU,2,0,"div",0),Uf(66,RU,2,0,"div",0),Jf(),Jf(),Jf(),$f(67,"div",16),$f(68,"div",9),$f(69,"label",35),Kf(70),Rg(71,36),Zf(),Cm(72,"\xa0* "),Jf(),Yf(73,"input",37),$f(74,"div",19),Uf(75,VU,2,0,"div",0),Uf(76,DU,2,0,"div",0),Uf(77,NU,2,0,"div",0),Jf(),Jf(),Jf(),$f(78,"div",16),$f(79,"div",38),$f(80,"label",39),Kf(81),Rg(82,40),Zf(),Cm(83,"\xa0* "),Jf(),Yf(84,"input",41),$f(85,"div",19),Uf(86,LU,2,0,"div",0),Uf(87,FU,2,0,"div",0),Jf(),Jf(),Jf(),$f(88,"p",42),Rg(89,43),Jf(),Uf(90,MU,4,2,"button",44),Uf(91,jU,5,3,"button",45),Jf(),Jf()),2&e&&(Wf("ngIf",void 0===t.isApplicantOwner&&(null==t.theDefaultApplicantData?null:t.theDefaultApplicantData.ownerGroup)&&!t.isReadOnlyMode&&!t.isEditMode()),dp(1),Wf("hidden",void 0===t.isApplicantOwner&&(null==t.theDefaultApplicantData?null:t.theDefaultApplicantData.ownerGroup)&&!t.isReadOnlyMode&&!t.isEditMode()),dp(1),Wf("formGroup",t.applicantForm),dp(3),Wf("icon",t.farUser),dp(3),Wf("ngIf",t.isApplicantOwner),dp(1),Wf("hidden",t.isReadOnlyMode),dp(6),Wf("ngClass",Wv(49,zU,!t.isApplicantContractor,t.isApplicantContractor)),dp(2),Wf("ngClass",Wv(52,zU,t.isApplicantContractor,!t.isApplicantContractor)),dp(3),gm("col-6",!t.isApplicantContractor),dp(2),Wf("ngIf",!t.isApplicantContractor),dp(1),Wf("ngIf",t.isApplicantContractor),dp(2),gm("is-invalid",t.applicantLastName.touched&&!t.applicantLastName.valid),Wf("maxlength",t.fieldsMaxLength.applicantLastName),dp(2),Wf("ngIf",null==t.applicantLastName.errors?null:t.applicantLastName.errors.required),dp(1),Wf("ngIf",!t.isApplicantContractor),dp(8),gm("is-invalid",t.address.touched&&!t.address.valid),Wf("maxlength",t.fieldsMaxLength.address),dp(2),Wf("ngIf",null==t.address.errors?null:t.address.errors.required),dp(5),xm(t.cityLabel),dp(2),gm("is-invalid",t.city.touched&&!t.city.valid),Wf("maxlength",t.fieldsMaxLength.city),dp(2),Wf("ngIf",null==t.city.errors?null:t.city.errors.required),dp(6),gm("is-invalid",t.zipCode.touched&&!t.zipCode.valid),Wf("specialCharacters",Qv(55,UU)),dp(2),Wf("ngIf",null==t.zipCode.errors?null:t.zipCode.errors.required),dp(1),Wf("ngIf",null==t.zipCode.errors?null:t.zipCode.errors.mask),dp(7),gm("is-invalid",t.applicantEmail.touched&&!t.applicantEmail.valid),Wf("maxlength",t.fieldsMaxLength.applicantEmail),dp(2),Wf("ngIf",null==t.applicantEmail.errors?null:t.applicantEmail.errors.required),dp(1),Wf("ngIf",null==t.applicantEmail.errors?null:t.applicantEmail.errors.pattern),dp(7),gm("is-invalid",t.applicantEmailConfirmation.touched&&(!t.applicantEmailConfirmation.valid||t.applicantForm.hasError("notMatching"))),Wf("maxlength",t.fieldsMaxLength.applicantEmail),dp(2),Wf("ngIf",null==t.applicantEmailConfirmation.errors?null:t.applicantEmailConfirmation.errors.required),dp(1),Wf("ngIf",null==t.applicantEmailConfirmation.errors?null:t.applicantEmailConfirmation.errors.pattern),dp(1),Wf("ngIf",t.applicantForm.hasError("notMatching")),dp(7),gm("is-invalid",t.applicantPhoneNumber.touched&&!t.applicantPhoneNumber.valid),Wf("specialCharacters",Qv(56,HU)),dp(2),Wf("ngIf",null==t.applicantPhoneNumber.errors?null:t.applicantPhoneNumber.errors.required),dp(1),Wf("ngIf",null==t.applicantPhoneNumber.errors?null:t.applicantPhoneNumber.errors.mask),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[M_,XP,lP,nk,DM,D_,OS,sP,gk,yk,ik,QR],styles:[""]}),BU);function WU(e,t){if(1&e&&($f(0,"h5",12),$f(1,"div",13),Yf(2,"fa-icon",14),Jf(),$f(3,"span",15),Rg(4,16),Jf(),Jf()),2&e){var n=sm();dp(2),Wf("icon",n.farHammer)}}function GU(e,t){if(1&e&&($f(0,"label",23),Kf(1),Cm(2),Zf(),Cm(3,"\xa0* "),Jf()),2&e){var n=sm(2);dp(2),xm(n.descriptionLabel)}}function $U(e,t){if(1&e&&($f(0,"h5",24),$f(1,"div",13),Yf(2,"fa-icon",14),Jf(),$f(3,"span"),Cm(4),Jf(),Jf()),2&e){var n=sm(2);dp(2),Wf("icon",n.farPencil),dp(2),Sm("",n.descriptionLabel,"\xa0*")}}function JU(e,t){1&e&&($f(0,"div"),Rg(1,25),Jf())}function YU(e,t){if(1&e&&($f(0,"div",4),$f(1,"div",17),Uf(2,GU,4,1,"label",18),Uf(3,$U,5,2,"h5",19),$f(4,"textarea",20),Cm(5,"                "),Jf(),$f(6,"div",21),Uf(7,JU,2,0,"div",22),Jf(),Jf(),Jf()),2&e){var n=sm();dp(2),Wf("ngIf","PC"===n.codeModule||"DT"===n.codeModule),dp(1),Wf("ngIf","PL"===n.codeModule||"PA"===n.codeModule),dp(1),gm("is-invalid",n.WorkDescription.touched&&!n.WorkDescription.valid),Wf("maxlength",n.fieldsMaxLength.workDescription),dp(3),Wf("ngIf",null==n.WorkDescription.errors?null:n.WorkDescription.errors.required)}}function KU(e,t){if(1&e){var n=Xf();$f(0,"button",31),nm("click",function(){return Nu(n),sm(2).clearWorkStartDate()}),Yf(1,"fa-icon",14),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farTimes)}}function ZU(e,t){1&e&&($f(0,"div"),Rg(1,32),Jf())}function XU(e,t){if(1&e){var n=Xf();$f(0,"div",26),$f(1,"label",27),Kf(2),Cm(3),Zf(),Jf(),$f(4,"input",28),nm("focus",function(){return Nu(n),Hf(9).open()})("click",function(){return Nu(n),Hf(9).open()}),Jf(),Uf(5,KU,2,1,"button",29),$f(6,"div",21),Uf(7,ZU,2,0,"div",22),Jf(),Yf(8,"mat-datepicker",null,30),Jf()}if(2&e){var r=Hf(9),i=sm();dp(3),Sm("",i.dateDebutLabel,"\xa0*"),dp(1),gm("readonly-style",i.isReadOnlyMode)("is-invalid",i.WorkStartDate.touched&&!i.WorkStartDate.valid),Wf("matDatepicker",r)("min",i.issueMinDate)("max",i.issueMaxDate)("placeholder",i.getInputDatePlaceholder()),dp(1),Wf("ngIf",i.workStartDateValidator!==i.validatorsObj.required&&""!==i.WorkStartDate.value),dp(2),Wf("ngIf",null==i.WorkStartDate.errors?null:i.WorkStartDate.errors.required)}}function eH(e,t){1&e&&($f(0,"span"),Cm(1,"\xa0*"),Jf())}function tH(e,t){if(1&e){var n=Xf();$f(0,"button",31),nm("click",function(){return Nu(n),sm(2).clearWorkEndDate()}),Yf(1,"fa-icon",14),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farTimes)}}function nH(e,t){1&e&&($f(0,"div"),Rg(1,37),Jf())}function rH(e,t){1&e&&($f(0,"div"),Rg(1,38),Jf())}function iH(e,t){if(1&e&&($f(0,"div"),Rg(1,39),Jf()),2&e){var n=sm(2);dp(1),Vg(n.permitType.delaiMaximal)(n.permitType.delaiMaximal),Dg(1)}}function oH(e,t){if(1&e){var n=Xf();$f(0,"div",26),$f(1,"label",33),Kf(2),Rg(3,34),Zf(),Uf(4,eH,2,0,"span",22),Jf(),$f(5,"input",35),nm("focus",function(){return Nu(n),Hf(12).open()})("click",function(){return Nu(n),Hf(12).open()}),Jf(),Uf(6,tH,2,1,"button",29),$f(7,"div",21),Uf(8,nH,2,0,"div",22),Uf(9,rH,2,0,"div",22),Uf(10,iH,2,2,"div",22),Jf(),Yf(11,"mat-datepicker",null,36),Jf()}if(2&e){var r=Hf(12),i=sm();dp(4),Wf("ngIf","1"===i.paramWorkEndDateRequired),dp(1),gm("readonly-style",i.isReadOnlyMode)("is-invalid",i.WorkEndDate.touched&&!i.WorkEndDate.valid),Wf("matDatepicker",r)("min",i.issueMinDate)("placeholder",i.getInputDatePlaceholder()),dp(1),Wf("ngIf",""!==i.WorkEndDate.value),dp(2),Wf("ngIf",null==i.WorkEndDate.errors?null:i.WorkEndDate.errors.required),dp(1),Wf("ngIf",null==i.WorkEndDate.errors?null:i.WorkEndDate.errors.invaliddaterange),dp(1),Wf("ngIf",null==i.WorkEndDate.errors?null:i.WorkEndDate.errors.invalidmaxdelay)}}function aH(e,t){1&e&&($f(0,"span"),Cm(1,"\xa0*"),Jf())}function sH(e,t){1&e&&($f(0,"div"),Rg(1,46),Jf())}function lH(e,t){if(1&e&&($f(0,"div",4),$f(1,"div",40),$f(2,"label",41),Kf(3),Rg(4,42),Zf(),Uf(5,aH,2,0,"span",22),Jf(),Yf(6,"input",43),$f(7,"div",21),Uf(8,sH,2,0,"div",22),Jf(),$f(9,"small",44),Rg(10,45),Jf(),Jf(),Jf()),2&e){var n=sm();dp(5),Wf("ngIf","1"===n.paramWorkCostRequired),dp(1),gm("is-invalid",n.WorkCost.touched&&!n.WorkCost.valid),Wf("thousandSeparator","en"===n.localeId?",":" ")("prefix","en"===n.localeId?"$ ":"")("suffix","en"===n.localeId?"":" $")("maxlength",n.fieldsMaxLength.workCost),dp(2),Wf("ngIf",null==n.WorkCost.errors?null:n.WorkCost.errors.required)}}function uH(e,t){if(1&e&&($f(0,"h5",47),$f(1,"div",13),Yf(2,"fa-icon",14),Jf(),$f(3,"span",15),Rg(4,48),Jf(),Jf()),2&e){var n=sm();dp(2),Wf("icon",n.farUserHardHat)}}var cH=function(e,t){return{"btn-primary":e,"btn-secondary":t}};function dH(e,t){if(1&e){var n=Xf();$f(0,"div",4),$f(1,"div",17),$f(2,"label",49),Kf(3),Rg(4,50),Zf(),Cm(5,"\xa0* "),Jf(),$f(6,"button",51),nm("click",function(){return Nu(n),sm().setHasLicensedContractor(!0)}),Rg(7,52),Jf(),$f(8,"button",53),nm("click",function(){return Nu(n),sm().setHasLicensedContractor(!1)}),Rg(9,54),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(6),Wf("disabled",r.isReadOnlyMode)("ngClass",Wv(4,cH,r.HasLicensedContractor.value,!r.HasLicensedContractor.value)),dp(2),Wf("disabled",r.isReadOnlyMode)("ngClass",Wv(7,cH,!r.HasLicensedContractor.value&&null!=r.HasLicensedContractor.value,r.HasLicensedContractor.value||null==r.HasLicensedContractor.value))}}function hH(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",84),Yf(2,"input",85),Zf()),2&e){var n=sm(3);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function pH(e,t){if(1&e&&($f(0,"mat-option",90),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n),dp(2),xm(n.nomPrenom)}}function fH(e,t){if(1&e){var n=Xf();Kf(0),Yf(1,"input",86),$f(2,"mat-autocomplete",87,88),nm("optionSelected",function(e){return Nu(n),sm(3).selectContractor(e)}),Uf(4,pH,3,2,"mat-option",89),Jv(5,"async"),Jf(),Zf()}if(2&e){var r=Hf(3),i=sm(3);dp(1),gm("is-invalid",(i.Contractor.touched||i.Contractor.dirty)&&!i.Contractor.valid),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.contractor),dp(1),Wf("displayWith",i.displayContractor),dp(2),Wf("ngForOf",Yv(5,6,i.filteredContractors))}}function mH(e,t){if(1&e&&(Kf(0,82),Uf(1,hH,3,2,"ng-container",83),Uf(2,fH,6,8,"ng-container",83),Zf()),2&e){var n=sm(2);Wf("ngSwitch",n.contractorsState),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Ready)}}function gH(e,t){1&e&&Yf(0,"input",91),2&e&&Wf("maxlength",sm(2).fieldsMaxLength.contractorAddress)}function vH(e,t){1&e&&($f(0,"div"),Rg(1,92),Jf())}function yH(e,t){1&e&&($f(0,"div"),Rg(1,93),Jf())}function bH(e,t){1&e&&($f(0,"div"),Rg(1,94),Jf())}function _H(e,t){1&e&&($f(0,"div"),Tg(1,95),Yf(2,"sup"),Og(),Jf())}function wH(e,t){1&e&&($f(0,"div"),Rg(1,96),Jf())}var CH=function(){return[" "]},xH=function(){return["-"," "]},SH=function(){return["-"]};function PH(e,t){if(1&e&&($f(0,"div",55),$f(1,"div",4),$f(2,"div",17),$f(3,"label",56),Rg(4,57),Jf(),Uf(5,mH,3,3,"ng-container",58),Uf(6,gH,1,1,"input",59),Jf(),Jf(),$f(7,"div",4),$f(8,"div",17),$f(9,"label",60),Rg(10,61),Jf(),Yf(11,"input",62),Jf(),Jf(),$f(12,"div",4),$f(13,"div",63),$f(14,"label",64),Cm(15),Jf(),Yf(16,"input",65),Jf(),$f(17,"div",66),$f(18,"label",67),Rg(19,68),Jf(),Yf(20,"input",69),$f(21,"div",21),Uf(22,vH,2,0,"div",22),Jf(),Jf(),Jf(),$f(23,"div",4),$f(24,"div",40),$f(25,"label",70),Rg(26,71),Jf(),Yf(27,"input",72),$f(28,"div",21),Uf(29,yH,2,0,"div",22),Jf(),Jf(),$f(30,"div",40),$f(31,"label",73),Rg(32,74),Jf(),Yf(33,"input",75),$f(34,"div",21),Uf(35,bH,2,0,"div",22),Jf(),Jf(),Jf(),$f(36,"div",4),$f(37,"div",40),$f(38,"label",76),Tg(39,77),Yf(40,"sup"),Og(),Jf(),Yf(41,"input",78),$f(42,"div",21),Uf(43,_H,3,0,"div",22),Jf(),Jf(),$f(44,"div",40),$f(45,"label",79),Tg(46,80),Yf(47,"sup"),Og(),Jf(),Yf(48,"input",81),$f(49,"div",21),Uf(50,wH,2,0,"div",22),Jf(),Jf(),Jf(),Jf()),2&e){var n=sm();dp(5),Wf("ngIf","1"===n.paramContractorsListVisible),dp(1),Wf("ngIf","1"!==n.paramContractorsListVisible),dp(5),Wf("maxlength",n.fieldsMaxLength.contractor),dp(4),xm(n.cityLabel),dp(1),Wf("maxlength",n.fieldsMaxLength.contractorCity),dp(4),gm("is-invalid",n.ContractorPostalCode.touched&&!n.ContractorPostalCode.valid),Wf("specialCharacters",Qv(23,CH)),dp(2),Wf("ngIf",null==n.ContractorPostalCode.errors?null:n.ContractorPostalCode.errors.mask),dp(5),gm("is-invalid",n.ContractorPhoneNumber.touched&&!n.ContractorPhoneNumber.valid),Wf("specialCharacters",Qv(24,xH)),dp(2),Wf("ngIf",null==n.ContractorPhoneNumber.errors?null:n.ContractorPhoneNumber.errors.mask),dp(4),gm("is-invalid",n.ContractorEmail.touched&&!n.ContractorEmail.valid),dp(2),Wf("ngIf",null==n.ContractorEmail.errors?null:n.ContractorEmail.errors.email),dp(6),gm("is-invalid",n.ContractorRBQNumber.touched&&!n.ContractorRBQNumber.valid),Wf("specialCharacters",Qv(25,SH)),dp(2),Wf("ngIf",null==n.ContractorRBQNumber.errors?null:n.ContractorRBQNumber.errors.mask),dp(5),gm("is-invalid",n.ContractorNEQNumber.touched&&!n.ContractorNEQNumber.valid),dp(2),Wf("ngIf",null==n.ContractorNEQNumber.errors?null:n.ContractorNEQNumber.errors.mask)}}function kH(e,t){if(1&e&&($f(0,"button",97),Kf(1),Rg(2,98),Zf(),Yf(3,"fa-icon",99),Jf()),2&e){var n=sm();Wf("disabled",!n.formIsValid()||n.isSubmitting),dp(3),Wf("icon",n.farLongArrowRight)}}function EH(e,t){1&e&&Yf(0,"fa-icon",84),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function AH(e,t){if(1&e){var n=Xf();$f(0,"button",100),nm("click",function(){return Nu(n),sm().onFormSubmit(!0)}),Yf(1,"fa-icon",101),Kf(2),Rg(3,102),Zf(),Uf(4,EH,1,2,"fa-icon",103),Jf()}if(2&e){var r=sm();Wf("disabled",!r.formIsValid()||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var IH,TH=((IH=function(){function e(t,n,r,i){is(this,e),this.pelService=t,this.fb=n,this.globalsService=r,this.localeId=i,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.contractors=[],this.contractorsState=HM.Loading,this.viewStateEnum=HM,this.validatorsObj=FS,this.farCalendarDay=xL,this.farHammer=zL,this.farLongArrowRight=$L,this.farUserHardHat=dF,this.farSpinnerThird=aF,this.farTimes=lF,this.farPencil=ZL,this.farSave=iF,this.fieldsMaxLength={workDescription:2500,workCost:13,contractor:90,contractorAddress:200,contractorCity:75,contractorEmail:200,contractorRBQNumber:12,contractorNEQNumber:10}}return as(e,[{key:"ngOnInit",value:function(){var e,t=this;this.paramWorkCostRequired=this.globalsService.getGeneralParameterByCode("valeur_travaux_obligatoire"),this.paramContractorsListVisible=this.globalsService.getGeneralParameterByCode("liste_entrepreneurs_visible"),this.cityLabel=this.globalsService.getCustomResourceTextByCode("RES_VILLE"),""===this.cityLabel&&(this.cityLabel="en"===this.localeId?hj.RES_VILLE_EN:hj.RES_VILLE_FR),this.descriptionLabel=hj.RES_DESCRITPION,"PL"===this.codeModule?this.descriptionLabel="en"===this.localeId?hj.RES_DESCRIPTION_PL_EN:hj.RES_DESCRIPTION_PL_FR:"PA"===this.codeModule&&(this.descriptionLabel="en"===this.localeId?hj.RES_DESCRIPTION_PA_EN:hj.RES_DESCRIPTION_PA_FR),this.dateDebutLabel="PA"===this.codeModule?"en"===this.localeId?hj.RES_DATE_OCCUPATION_EN:hj.RES_DATE_OCCUPATION_FR:"en"===this.localeId?hj.RES_DATE_DEBUT_EN:hj.RES_DATE_DEBUT_FR;var n=[FS.maxLength(this.fieldsMaxLength.workCost)];"1"===this.paramWorkCostRequired&&0!==(null===(e=this.permitType)||void 0===e?void 0:e.opt_BlocTrav)&&("PC"!==this.codeModule&&"DT"!==this.codeModule||(n=n.concat(FS.required))),this.workDescriptionForm=this.fb.group({workDescriptionGroup:this.fb.group({workDescription:[this.workDescription?this.workDescription.workDescriptionGroup.workDescription:"",this.workDescriptionValidator],workStartDate:[this.workDescription?this.workDescription.workDescriptionGroup.workStartDate:"",this.workStartDateValidator],workEndDate:[this.workDescription?this.workDescription.workDescriptionGroup.workEndDate:"",this.workEndDateValidator],workCost:[this.workDescription?this.workDescription.workDescriptionGroup.workCost:"",n]}),licensedContractorGroup:this.fb.group({contractor:[this.workDescription?this.getContractor():"",[FS.maxLength(this.fieldsMaxLength.contractor)]],contractorName:[""],contractorAddress:[this.workDescription?this.workDescription.licensedContractorGroup.contractorAddress:"",[FS.maxLength(this.fieldsMaxLength.contractorAddress)]],contractorCity:[this.workDescription?this.workDescription.licensedContractorGroup.contractorCity:"",[FS.maxLength(this.fieldsMaxLength.contractorCity)]],contractorPostalCode:[this.workDescription?this.workDescription.licensedContractorGroup.contractorPostalCode:"",[FS.pattern(/^[a-zA-Z]\d[a-zA-Z][ ]?\d[a-zA-Z]\d/)]],contractorPhoneNumber:[this.workDescription?this.workDescription.licensedContractorGroup.contractorPhoneNumber:""],contractorRBQNumber:[this.workDescription?this.workDescription.licensedContractorGroup.contractorRBQNumber:"",[FS.maxLength(this.fieldsMaxLength.contractorRBQNumber)]],contractorNEQNumber:[this.workDescription?this.workDescription.licensedContractorGroup.contractorNEQNumber:"",[FS.maxLength(this.fieldsMaxLength.contractorNEQNumber)]],contractorEmail:[this.workDescription?this.workDescription.licensedContractorGroup.contractorEmail:"",[FS.email,FS.maxLength(this.fieldsMaxLength.contractorEmail)]]}),hasLicensedContractor:this.workDescription?this.workDescription.hasLicensedContractor:void 0}),this.pelService.getAllContractors().subscribe(function(e){t.contractors=e.result,t.contractorsState=HM.Ready},function(e){t.contractorsState=HM.Ready}),this.filteredContractors=this.Contractor.valueChanges.pipe(XE(""),Ms(function(e){return t.filterContractor(e)})),this.isReadOnlyMode&&this.workDescriptionForm.disable()}},{key:"updateRequestPermitType",value:function(e){e!==this.permitType&&(this.selectedPermitType=e,this.initPermitDates(),this.setValidator())}},{key:"initPermitDates",value:function(){var e=new Date(this.permitType.emissionDu),t=new Date(this.permitType.emissionAu),n=e.getDate(),r=e.getMonth()+1,i=t.getDate(),o=t.getMonth()+1;1===n&&1===r&&31===i&&12===o?(this.issueMinDate=new Date((new Date).getFullYear()-1,(new Date).getMonth(),(new Date).getDate()),this.issueMaxDate=new Date(t.getFullYear()+1,o-1,i)):(this.issueMinDate=e,this.issueMaxDate=t)}},{key:"filterContractor",value:function(e){var t=this,n=[];return this.contractors&&(null==e?void 0:e.length)>0&&(e=this.removeAccent(e).replace(/[/\\^$*+?.,()|[\]{}]/g,"").replace(/[-]/g," "),(null==(n=this.contractors.filter(function(n){return 0===t.removeAccent(n.nomPrenom).toLowerCase().indexOf(e.toLowerCase())}))?void 0:n.length)<5&&(n=Ha(new Set([].concat(Ha(n),Ha(this.filterAllWords(e))))))),n.slice(0,5)}},{key:"filterAllWords",value:function(e){var t=this,n=e.split(/\s+/g).map(function(e){return e.trim()}).filter(function(e){return!!e}),r=e.endsWith(" "),i=new RegExp(n.map(function(e,t){return t+1!==n.length||r?"(?=.*\\b".concat(e,"\\b)"):"(?=.*\\b".concat(e,")")}).join("")+".+","i");return this.contractors.filter(function(e){return i.test(t.removeAccent(e.nomPrenom))})}},{key:"displayContractor",value:function(e){return e&&e.nomPrenom?e.nomPrenom:""}},{key:"getInputDatePlaceholder",value:function(){return this.isReadOnlyMode?"":"en"===this.localeId?"Select a date\u2026":"Choisir une date\u2026"}},{key:"setHasLicensedContractor",value:function(e){this.HasLicensedContractor.setValue(e)}},{key:"onFormSubmit",value:function(){var e,t,n,r,i,o,a,s,l,u,c=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.ContractorName.setValue(this.Contractor.value.nomPrenom?this.Contractor.value.nomPrenom:this.Contractor.value),this.HasLicensedContractor.value||this.emptyContractor(),0!==(null===(e=this.permitType)||void 0===e?void 0:e.opt_DateDebut)&&0!==(null===(t=this.permitType)||void 0===t?void 0:t.opt_DateFin)&&""!==(null===(n=this.WorkEndDate)||void 0===n?void 0:n.value)&&null!==(null===(r=this.WorkEndDate)||void 0===r?void 0:r.value)){if(new Date(null===(i=this.WorkStartDate)||void 0===i?void 0:i.value).setHours(0,0,0,0)>new Date(null===(o=this.WorkEndDate)||void 0===o?void 0:o.value).setHours(0,0,0,0))return this.WorkEndDate.setErrors({invaliddaterange:!0});if((null===(a=this.permitType)||void 0===a?void 0:a.delaiMaximal)>0){var d=new Date(null===(s=this.WorkEndDate)||void 0===s?void 0:s.value).setHours(0,0,0,0)-new Date(null===(l=this.WorkStartDate)||void 0===l?void 0:l.value).setHours(0,0,0,0);if(null!==d&&d>0&&this.convertMillisecondsToDays(d)>(null===(u=this.permitType)||void 0===u?void 0:u.delaiMaximal))return this.WorkEndDate.setErrors({invalidmaxdelay:!0})}}c?this.stepSubmitIsSaveForLater.emit(this.workDescriptionForm.value):this.stepSubmit.emit(this.workDescriptionForm.value)}},{key:"formIsValid",value:function(){var e,t;return"PC"===this.codeModule||"DT"===this.codeModule?!(!this.workDescriptionForm.controls.workDescriptionGroup.valid||0!==(null===(e=this.permitType)||void 0===e?void 0:e.opt_BlocTrav)&&null===this.HasLicensedContractor.value)&&(!this.HasLicensedContractor.value||0===(null===(t=this.permitType)||void 0===t?void 0:t.opt_BlocTrav)||this.workDescriptionForm.controls.licensedContractorGroup.valid):this.workDescriptionForm.controls.workDescriptionGroup.valid}},{key:"clearWorkStartDate",value:function(){this.WorkStartDate.setValue("")}},{key:"clearWorkEndDate",value:function(){this.WorkEndDate.setValue(""),this.WorkEndDate.setErrors({invaliddaterange:null,invalidmaxdelay:null}),this.WorkEndDate.updateValueAndValidity()}},{key:"selectContractor",value:function(e){null!==e.option.value&&(this.workDescriptionForm.get("licensedContractorGroup.contractorAddress").setValue(e.option.value.adresse),this.workDescriptionForm.get("licensedContractorGroup.contractorCity").setValue(e.option.value.ville),this.workDescriptionForm.get("licensedContractorGroup.contractorPostalCode").setValue(e.option.value.codePostal),e.option.value.telephone1?this.workDescriptionForm.get("licensedContractorGroup.contractorPhoneNumber").setValue(e.option.value.telephone1):e.option.value.telephone2?this.workDescriptionForm.get("licensedContractorGroup.contractorPhoneNumber").setValue(e.option.value.telephone2):e.option.value.telephone3&&this.workDescriptionForm.get("licensedContractorGroup.contractorPhoneNumber").setValue(e.option.value.telephone3),this.workDescriptionForm.get("licensedContractorGroup.contractorRBQNumber").setValue(e.option.value.rbq),this.workDescriptionForm.get("licensedContractorGroup.contractorNEQNumber").setValue(e.option.value.neq),this.workDescriptionForm.get("licensedContractorGroup.contractorEmail").setValue(e.option.value.courriel))}},{key:"emptyContractor",value:function(){this.workDescriptionForm.get("licensedContractorGroup.contractor").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorAddress").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorCity").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorPostalCode").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorPhoneNumber").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorRBQNumber").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorNEQNumber").setValue(""),this.workDescriptionForm.get("licensedContractorGroup.contractorEmail").setValue("")}},{key:"getContractor",value:function(){return this.workDescription.hasLicensedContractor?"1"===this.paramContractorsListVisible?this.findContractor(this.workDescription.licensedContractorGroup.contractor)||{noEntr:1,nomPrenom:this.workDescription.licensedContractorGroup.contractor,adresse:"",ville:"",telephone1:"",telephone2:"",telephone3:"",codePostal:"",courriel:"",codeAcces:"",inactif:"",rbq:"",neq:""}:this.workDescription.licensedContractorGroup.contractor:""}},{key:"findContractor",value:function(e){return this.contractors.find(function(t){return t.nomPrenom===e})}},{key:"setValidator",value:function(){var e,t,n;0!==(null===(e=this.permitType)||void 0===e?void 0:e.opt_BlocTrav)?(this.workDescriptionValidator=FS.required,FS.maxLength(this.fieldsMaxLength.workDescription)):this.workDescriptionValidator=FS.nullValidator,this.workStartDateValidator=0!==(null===(t=this.permitType)||void 0===t?void 0:t.opt_DateDebut)?FS.required:FS.nullValidator,this.paramWorkEndDateRequired=this.globalsService.getGeneralParameterByCode("date_fin_travaux_obligatoire"),this.workEndDateValidator=0!==(null===(n=this.permitType)||void 0===n?void 0:n.opt_DateFin)&&"1"===this.paramWorkEndDateRequired?FS.required:FS.nullValidator}},{key:"removeAccent",value:function(e){return null==e?void 0:e.replace(/[\xea\xe9\xe8\xeb\xca\xc9\xc8\xcb]/g,"e").replace(/[\xee\xef\xce\xcf]/g,"i").replace(/[\xe7\xc7]/g,"c").replace(/[\xe0\xe2\xe4\xc0\xc2\xc4]/g,"a").replace(/[\xf4\xf6\xd4\xd6]/g,"o").replace(/[\xfb\xf9\xfc\xdb\xd9\xdc]/g,"u").replace(/[\xff]/g,"y")}},{key:"convertMillisecondsToDays",value:function(e){return e/864e5}},{key:"permitType",get:function(){return this.selectedPermitType},set:function(e){this.updateRequestPermitType(e)}},{key:"WorkDescription",get:function(){return this.workDescriptionForm.get("workDescriptionGroup.workDescription")}},{key:"WorkStartDate",get:function(){return this.workDescriptionForm.get("workDescriptionGroup.workStartDate")}},{key:"WorkEndDate",get:function(){return this.workDescriptionForm.get("workDescriptionGroup.workEndDate")}},{key:"WorkCost",get:function(){return this.workDescriptionForm.get("workDescriptionGroup.workCost")}},{key:"Contractor",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractor")}},{key:"ContractorName",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorName")}},{key:"ContractorAddress",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorAddress")}},{key:"ContractorCity",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorCity")}},{key:"ContractorPostalCode",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorPostalCode")}},{key:"ContractorPhoneNumber",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorPhoneNumber")}},{key:"ContractorRBQNumber",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorRBQNumber")}},{key:"ContractorNEQNumber",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorNEQNumber")}},{key:"ContractorEmail",get:function(){return this.workDescriptionForm.get("licensedContractorGroup.contractorEmail")}},{key:"HasLicensedContractor",get:function(){return this.workDescriptionForm.get("hasLicensedContractor")}}]),e}()).\u0275fac=function(e){return new(e||IH)(Qf(Bq),Qf(_k),Qf(zq),Qf(Ry))},IH.\u0275cmp=zl({type:IH,selectors:[["pel-request-permit-work-description"]],inputs:{permitType:"permitType",isReadOnlyMode:"isReadOnlyMode",workDescription:"workDescription",codeModule:"codeModule",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:15,vars:11,consts:function(){var e,t,n,r,i,o,a,s;return e="* Champs obligatoires",t="Travaux",n=" Vous devez obligatoirement saisir du texte. ",r=" Veuillez choisir une date. ",i="Date de fin pr\xE9vue",o=" Veuillez saisir une date de fin des travaux. ",a=" La date de fin doit \xEAtre sup\xE9rieure ou \xE9gale \xE0 la date de d\xE9but des travaux. ",s=Ng(s="{VAR_PLURAL, plural, =1 {1 jour cons\xE9cutif.} other {{INTERPOLATION} jours cons\xE9cutifs.}}",{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),[[3,"formGroup","ngSubmit"],["class","d-flex align-items-center mb-3",4,"ngIf"],["formGroupName","workDescriptionGroup"],["class","form-row",4,"ngIf"],[1,"form-row"],["class","form-group pel-datepicker col-6",4,"ngIf"],["class","d-flex align-items-center my-3",4,"ngIf"],["formGroupName","licensedContractorGroup",4,"ngIf"],[1,"text-muted","my-3"],e,["type","submit","class","btn btn-primary btn-rounded btn-big w-100","data-testid","6CF78BF7-80B5-4916-85C6-0E84C67D4FBE",3,"disabled",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","38651479-3890-4763-afb7-f7d616acf84c",3,"disabled","click",4,"ngIf"],[1,"d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],[1,"font-weight-bold","text-primary"],t,[1,"form-group","col"],["for","workDescriptionId",4,"ngIf"],["class","font-weight-bold text-primary d-flex align-items-center mb-3",4,"ngIf"],["id","workDescriptionId","name","workDescription","formControlName","workDescription","rows","4","data-testid","01E06D76-A527-405A-B384-B821F06D1171",1,"form-control",3,"maxlength"],[1,"invalid-feedback"],[4,"ngIf"],["for","workDescriptionId"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],n,[1,"form-group","pel-datepicker","col-6"],["for","workStartDate"],["readonly","","matInput","","formControlName","workStartDate","data-testid","1937039E-8DAE-4D7A-AD04-F08EB9203F70",1,"form-control","pel-datepicker",3,"matDatepicker","min","max","placeholder","focus","click"],["type","button","class","pel-datepicker-clear",3,"click",4,"ngIf"],["workStartDatePicker",""],["type","button",1,"pel-datepicker-clear",3,"click"],r,["for","workEndDate"],i,["readonly","","matInput","","formControlName","workEndDate","data-testid","6FDFD90A-8C30-4A90-A542-2C3CCCF3AD9B",1,"form-control",3,"matDatepicker","min","placeholder","focus","click"],["workEndDatePicker",""],o,a," Le d\xE9lai maximum est de " + s + " ",[1,"form-group","col-6"],["for","workCostId"],"Valeur",["type","text","id","workCostId","name","workCost","formControlName","workCost","mask","separator.0","data-testid","CD04D153-FB34-4BEA-A5C0-0FB8AF1C71C0",1,"form-control",3,"thousandSeparator","prefix","suffix","maxlength"],[1,"form-text","text-muted"]," Ne pas saisir les cents "," Veuillez saisir la valeur des travaux. ",[1,"d-flex","align-items-center","my-3"],"Ex\xE9cutant des travaux",[1,"d-block"]," L'ex\xE9cutant des travaux est-il un entrepreneur licenci\xE9?",["type","button","data-testid","525B807D-301D-44CD-9830-965680F2DFCB",1,"btn","mr-1",3,"disabled","ngClass","click"],"Oui",["type","button","data-testid","04FFC315-2558-4689-B64A-39F447319715",1,"btn",3,"disabled","ngClass","click"],"Non",["formGroupName","licensedContractorGroup"],["for","contractorId"],"Ex\xE9cutant des travaux",[3,"ngSwitch",4,"ngIf"],["type","text","id","contractorIdText","name","contractorText","formControlName","contractor","class","form-control","data-testid","661E4F8C-FE7C-4247-8286-96CC9542C33C",3,"maxlength",4,"ngIf"],["for","contractorAddressId"],"Adresse de l'ex\xE9cutant",["type","text","id","contractorAddressId","name","contractorAddress","formControlName","contractorAddress","data-testid","9AF9311E-8555-46C5-BD54-4A69BDA5E357",1,"form-control",3,"maxlength"],[1,"form-group","col-7"],["for","contractorCityId"],["type","text","id","contractorCityId","name","contractorCity","formControlName","contractorCity",1,"form-control",3,"maxlength"],[1,"form-group","col-5"],["for","contractorPostalCodeId"],"Code postal",["type","text","id","contractorPostalCodeId","name","contractorPostalCode","formControlName","contractorPostalCode","mask","S0S 0S0","data-testid","A6EC987C-FE95-4947-811D-A948918DE278",1,"form-control",3,"specialCharacters"],["for","contractorPhoneNumberId"],"T\xE9l\xE9phone",["type","tel","id","contractorPhoneNumberId","name","contractorPhoneNumber","formControlName","contractorPhoneNumber","mask","000 000-0000",1,"form-control",3,"specialCharacters"],["for","contractorEmailId"],"Courriel",["type","email","id","contractorEmailId","name","contractorEmail","formControlName","contractorEmail","data-testid","BD5459DA-69CB-4B7A-974C-7C6FDEB59650",1,"form-control"],["for","contractorRBQNumberId"],"N" + "\ufffd#40\ufffd" + "o" + "\ufffd/#40\ufffd" + " de licence RBQ",["type","text","id","contractorRBQNumberId","name","contractorRBQNumber","formControlName","contractorRBQNumber","mask","0000-0000-00","data-testid","88A4FBA3-44F8-445D-AD3E-E9D8F181DD49",1,"form-control",3,"specialCharacters"],["for","contractorNEQNumberId"]," N" + "\ufffd#47\ufffd" + "o" + "\ufffd/#47\ufffd" + " d'entreprise (NEQ)",["type","text","id","contractorNEQNumberId","name","contractorNEQNumber","formControlName","contractorNEQNumber","mask","0000000000","data-testid","9CA0F852-D1A0-4F3B-98D3-14E2057FA7F7",1,"form-control"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"ml-2",3,"icon","spin"],["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["matInput","","type","text","id","contractorId","name","contractor","formControlName","contractor","data-testid","2c20fe70-2cb7-4222-8426-be603adf2edd",1,"form-control",3,"matAutocomplete","maxlength"],["id","autoCompleteId",3,"displayWith","optionSelected"],["autoContractor","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["type","text","id","contractorIdText","name","contractorText","formControlName","contractor","data-testid","661E4F8C-FE7C-4247-8286-96CC9542C33C",1,"form-control",3,"maxlength"]," Le code postal est invalide. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. "," Veuillez entrer une adresse courriel valide. "," Le n" + "\ufffd#2\ufffd" + "o" + "\ufffd/#2\ufffd" + " de licence RBQ est invalide. "," Le NEQ est invalide. ",["type","submit","data-testid","6CF78BF7-80B5-4916-85C6-0E84C67D4FBE",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","38651479-3890-4763-afb7-f7d616acf84c",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"]]},template:function(e,t){1&e&&($f(0,"form",0),nm("ngSubmit",function(){return t.onFormSubmit()}),Uf(1,WU,5,1,"h5",1),$f(2,"div",2),Uf(3,YU,8,6,"div",3),$f(4,"div",4),Uf(5,XU,10,11,"div",5),Uf(6,oH,13,12,"div",5),Jf(),Uf(7,lH,11,8,"div",3),Jf(),Uf(8,uH,5,1,"h5",6),Uf(9,dH,10,10,"div",3),Uf(10,PH,51,26,"div",7),$f(11,"p",8),Rg(12,9),Jf(),Uf(13,kH,4,2,"button",10),Uf(14,AH,5,3,"button",11),Jf()),2&e&&(Wf("formGroup",t.workDescriptionForm),dp(1),Wf("ngIf","PC"===t.codeModule||"DT"===t.codeModule),dp(2),Wf("ngIf",0!=t.permitType.opt_BlocTrav),dp(2),Wf("ngIf",0!=t.permitType.opt_DateDebut),dp(1),Wf("ngIf",0!=t.permitType.opt_DateFin),dp(1),Wf("ngIf",0!=t.permitType.opt_BlocTrav&&("PC"===t.codeModule||"DT"===t.codeModule)),dp(1),Wf("ngIf",0!=t.permitType.opt_BlocTrav&&("PC"===t.codeModule||"DT"===t.codeModule)),dp(1),Wf("ngIf",0!=t.permitType.opt_BlocTrav&&("PC"===t.codeModule||"DT"===t.codeModule)),dp(1),Wf("ngIf",t.HasLicensedContractor.value&&0!=t.permitType.opt_BlocTrav),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[XP,lP,nk,M_,ik,DM,OS,sP,gk,yk,NR,IR,QR,D_,W_,G_,$T,zT,L_,XA],pipes:[ow],styles:["textarea[_ngcontent-%COMP%]{min-height:85px}"]}),IH);function OH(e,t){1&e&&($f(0,"div"),Rg(1,21),Jf())}function RH(e,t){if(1&e&&($f(0,"button",22),Kf(1),Rg(2,23),Zf(),Yf(3,"fa-icon",24),Jf()),2&e){var n=sm();Wf("disabled",!n.formIsValid()||n.isSubmitting),dp(3),Wf("icon",n.farLongArrowRight)}}function VH(e,t){1&e&&Yf(0,"fa-icon",29),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function DH(e,t){if(1&e){var n=Xf();$f(0,"button",25),nm("click",function(){return Nu(n),sm().onFormSubmit(!0)}),Yf(1,"fa-icon",26),Kf(2),Rg(3,27),Zf(),Uf(4,VH,1,2,"fa-icon",28),Jf()}if(2&e){var r=sm();Wf("disabled",!r.formIsValid()||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var NH,LH=((NH=function(){function e(t,n,r){is(this,e),this.fb=t,this.globalsService=n,this.localeId=r,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.viewStateEnum=HM,this.validatorsObj=FS,this.farLongArrowRight=$L,this.farPencil=ZL,this.farSave=iF,this.farSpinnerThird=aF,this.fieldsMaxLength={urDescription:2500,urReasons:2500}}return as(e,[{key:"ngOnInit",value:function(){this.descriptionLabel=hj.RES_NATURE_DEMANDE_FR,"en"===this.localeId&&(this.descriptionLabel=hj.RES_NATURE_DEMANDE_EN),this.urDescriptionForm=this.fb.group({urDescriptionGroup:this.fb.group({urDescription:[this.urDescriptionInput?this.urDescriptionInput.urDescriptionGroup.urDescription:"",this.urDescriptionValidator],urReasons:[this.urDescriptionInput?this.urDescriptionInput.urDescriptionGroup.urReasons:""]})}),this.isReadOnlyMode&&this.urDescriptionForm.disable()}},{key:"updateRequestPermitType",value:function(e){e!==this.permitType&&(this.selectedPermitType=e,this.setValidator())}},{key:"onFormSubmit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?this.stepSubmitIsSaveForLater.emit(this.urDescriptionForm.value):this.stepSubmit.emit(this.urDescriptionForm.value)}},{key:"formIsValid",value:function(){return this.urDescriptionForm.controls.urDescriptionGroup.valid}},{key:"setValidator",value:function(){this.urDescriptionValidator=FS.required,FS.maxLength(this.fieldsMaxLength.urDescription)}},{key:"permitType",get:function(){return this.selectedPermitType},set:function(e){this.updateRequestPermitType(e)}},{key:"urDescription",get:function(){return this.urDescriptionForm.get("urDescriptionGroup.urDescription")}},{key:"urReasons",get:function(){return this.urDescriptionForm.get("urDescriptionGroup.urReasons")}}]),e}()).\u0275fac=function(e){return new(e||NH)(Qf(_k),Qf(zq),Qf(Ry))},NH.\u0275cmp=zl({type:NH,selectors:[["pel-request-permit-ur-description"]],inputs:{permitType:"permitType",isReadOnlyMode:"isReadOnlyMode",urDescriptionInput:"urDescriptionInput",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:33,vars:11,consts:function(){return[[3,"formGroup","ngSubmit"],["formGroupName","urDescriptionGroup"],[1,"form-row"],[1,"form-group","col"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],["for","urDescriptionId"],"D\xE9crire le but vis\xE9 ou les changements souhait\xE9s.",["id","urDescriptionId","name","urDescription","formControlName","urDescription","rows","4","data-testid","8BFA3677-352A-4C6D-8CDF-A1EB37691938",1,"form-control",3,"maxlength"],[1,"invalid-feedback"],[4,"ngIf"],[1,"form-row","mt-4"],"Raisons",["for","urReasonsId"],"Expliquer ce qui justifie de faire votre demande. Quels sont les pr\xE9judices?",["id","urReasonsId","name","urReasons","formControlName","urReasons","rows","4","data-testid","DBDDCBEF-A815-43EE-83C2-A7A76A457E5D",1,"form-control",3,"maxlength"],[1,"text-muted","my-3"],"* Champs obligatoires",["type","submit","class","btn btn-primary btn-rounded btn-big w-100","data-testid","6CF78BF7-80B5-4916-85C6-0E84C67D4FBE",3,"disabled",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","38651479-3890-4763-afb7-f7d616acf84c",3,"disabled","click",4,"ngIf"]," Vous devez obligatoirement saisir du texte. ",["type","submit","data-testid","6CF78BF7-80B5-4916-85C6-0E84C67D4FBE",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","38651479-3890-4763-afb7-f7d616acf84c",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"]]},template:function(e,t){1&e&&($f(0,"form",0),nm("ngSubmit",function(){return t.onFormSubmit()}),$f(1,"div",1),$f(2,"div",2),$f(3,"div",3),$f(4,"h5",4),$f(5,"div",5),Yf(6,"fa-icon",6),Jf(),Kf(7),Cm(8),Zf(),Jf(),$f(9,"label",7),Kf(10),Rg(11,8),Zf(),Cm(12,"\xa0* "),Jf(),$f(13,"textarea",9),Cm(14,"                "),Jf(),$f(15,"div",10),Uf(16,OH,2,0,"div",11),Jf(),Jf(),Jf(),$f(17,"div",12),$f(18,"div",3),$f(19,"h5",4),$f(20,"div",5),Yf(21,"fa-icon",6),Jf(),$f(22,"span"),Rg(23,13),Jf(),Jf(),$f(24,"label",14),Kf(25),Rg(26,15),Zf(),Jf(),$f(27,"textarea",16),Cm(28,"                "),Jf(),Jf(),Jf(),Jf(),$f(29,"p",17),Rg(30,18),Jf(),Uf(31,RH,4,2,"button",19),Uf(32,DH,5,3,"button",20),Jf()),2&e&&(Wf("formGroup",t.urDescriptionForm),dp(6),Wf("icon",t.farPencil),dp(2),xm(t.descriptionLabel),dp(5),gm("is-invalid",t.urDescription.touched&&!t.urDescription.valid),Wf("maxlength",t.fieldsMaxLength.urDescription),dp(3),Wf("ngIf",null==t.urDescription.errors?null:t.urDescription.errors.required),dp(5),Wf("icon",t.farPencil),dp(6),Wf("maxlength",t.fieldsMaxLength.urReasons),dp(4),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[XP,lP,nk,ik,DM,OS,sP,gk,yk,M_],styles:["textarea[_ngcontent-%COMP%]{min-height:85px}"]}),NH);function FH(e,t){1&e&&($f(0,"div"),Rg(1,40),Jf())}function MH(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",43),Yf(2,"input",44),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function qH(e,t){if(1&e&&($f(0,"mat-option",49),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n),dp(2),xm(n.nomPrenom)}}function jH(e,t){if(1&e){var n=Xf();Kf(0),Yf(1,"input",45),$f(2,"mat-autocomplete",46,47),nm("optionSelected",function(e){return Nu(n),sm(2).selectSurveyor(e)}),Uf(4,qH,3,2,"mat-option",48),Jv(5,"async"),Jf(),Zf()}if(2&e){var r=Hf(3),i=sm(2);dp(1),gm("is-invalid",(i.Surveyor.touched||i.Surveyor.dirty)&&!i.Surveyor.valid),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.surveyor),dp(1),Wf("displayWith",i.displaySurveyor),dp(2),Wf("ngForOf",Yv(5,6,i.filteredSurveyors))}}function BH(e,t){if(1&e&&(Kf(0,41),Uf(1,MH,3,2,"ng-container",42),Uf(2,jH,6,8,"ng-container",42),Zf()),2&e){var n=sm();Wf("ngSwitch",n.surveyorsState),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Ready)}}function zH(e,t){1&e&&Yf(0,"input",50),2&e&&Wf("maxlength",sm().fieldsMaxLength.surveyorAddress)}function UH(e,t){1&e&&($f(0,"div"),Rg(1,51),Jf())}function HH(e,t){1&e&&($f(0,"div"),Rg(1,52),Jf())}function QH(e,t){1&e&&($f(0,"div"),Rg(1,53),Jf())}function WH(e,t){1&e&&($f(0,"div"),Rg(1,54),Jf())}function GH(e,t){if(1&e&&($f(0,"button",55),Kf(1),Rg(2,56),Zf(),Yf(3,"fa-icon",57),Jf()),2&e){var n=sm();Wf("disabled",!n.formIsValid()||n.isSubmitting),dp(3),Wf("icon",n.farLongArrowRight)}}function $H(e,t){1&e&&Yf(0,"fa-icon",43),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function JH(e,t){if(1&e){var n=Xf();$f(0,"button",58),nm("click",function(){return Nu(n),sm().onFormSubmit(!0)}),Yf(1,"fa-icon",59),Kf(2),Rg(3,60),Zf(),Uf(4,$H,1,2,"fa-icon",61),Jf()}if(2&e){var r=sm();Wf("disabled",!r.formIsValid()||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var YH,KH,ZH=function(){return[" "]},XH=function(){return["-"," "]},eQ=((KH=function(){function e(t,n,r,i){is(this,e),this.pelService=t,this.fb=n,this.globalsService=r,this.localeId=i,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.farUserHardHat=dF,this.farPencil=ZL,this.farLongArrowRight=$L,this.farSpinnerThird=aF,this.farSave=iF,this.fieldsMaxLength={plDescription:2500,surveyor:90,surveyorCity:75,surveyorAddress:200},this.surveyors=[],this.surveyorsState=HM.Loading,this.viewStateEnum=HM}return as(e,[{key:"ngOnInit",value:function(){var e=this;this.paramSurveyorsListVisible=this.globalsService.getGeneralParameterByCode("liste_entrepreneurs_visible"),this.cityLabel=this.globalsService.getCustomResourceTextByCode("RES_VILLE"),""===this.cityLabel&&(this.cityLabel="en"===this.localeId?hj.RES_VILLE_EN:hj.RES_VILLE_FR),this.descriptionLabel="en"===this.localeId?hj.RES_DESCRIPTION_PL_EN:hj.RES_DESCRIPTION_PL_FR,this.plDescriptionForm=this.fb.group({plDescriptionGroup:this.fb.group({plDescription:[this.plDescriptionInput?this.plDescriptionInput.plDescriptionGroup.plDescription:"",FS.required]}),surveyorGroup:this.fb.group({surveyor:[this.plDescriptionInput?this.getSurveyor():"",[FS.required,FS.maxLength(this.fieldsMaxLength.surveyor)]],surveyorName:[""],surveyorAddress:[this.plDescriptionInput?this.plDescriptionInput.surveyorGroup.surveyorAddress:"",[FS.maxLength(this.fieldsMaxLength.surveyorAddress)]],surveyorCity:[this.plDescriptionInput?this.plDescriptionInput.surveyorGroup.surveyorCity:"",[FS.maxLength(this.fieldsMaxLength.surveyorCity)]],surveyorPostalCode:[this.plDescriptionInput?this.plDescriptionInput.surveyorGroup.surveyorPostalCode:"",[FS.pattern(/^[a-zA-Z]\d[a-zA-Z][ ]?\d[a-zA-Z]\d/)]],surveyorPhoneNumber:[this.plDescriptionInput?this.plDescriptionInput.surveyorGroup.surveyorPhoneNumber:""],surveyorOtherPhoneNumber:[this.plDescriptionInput?this.plDescriptionInput.surveyorGroup.surveyorOtherPhoneNumber:""]})}),this.pelService.getAllLandSurveyors().subscribe(function(t){e.surveyors=t.result,e.surveyorsState=HM.Ready},function(t){e.surveyorsState=HM.Ready}),this.filteredSurveyors=this.Surveyor.valueChanges.pipe(XE(""),Ms(function(t){return e.filterSurveyor(t)})),this.isReadOnlyMode&&this.plDescriptionForm.disable()}},{key:"getSurveyor",value:function(){return"1"===this.paramSurveyorsListVisible?this.findSurveyor(this.plDescriptionInput.surveyorGroup.surveyor)||{noEntr:1,nomPrenom:this.plDescriptionInput.surveyorGroup.surveyor,adresse:"",ville:"",telephone1:"",telephone2:"",telephone3:"",codePostal:"",courriel:"",codeAcces:"",inactif:"",rbq:"",neq:""}:this.plDescriptionInput.surveyorGroup.surveyor}},{key:"findSurveyor",value:function(e){return this.surveyors.find(function(t){return t.nomPrenom===e})}},{key:"updateRequestPermitType",value:function(e){e!==this.permitType&&(this.selectedPermitType=e)}},{key:"selectSurveyor",value:function(e){null!==e.option.value&&(this.SurveyorAddress.setValue(e.option.value.adresse),this.SurveyorCity.setValue(e.option.value.ville),this.SurveyorPostalCode.setValue(e.option.value.codePostal),e.option.value.telephone1&&this.SurveyorPhoneNumber.setValue(e.option.value.telephone1),e.option.value.telephone2&&this.SurveyorOtherPhoneNumber.setValue(e.option.value.telephone2))}},{key:"filterSurveyor",value:function(e){var t=this,n=[];return this.surveyors&&(null==e?void 0:e.length)>0&&(e=this.removeAccent(e).replace(/[/\\^$*+?.,()|[\]{}]/g,"").replace(/[-]/g," "),(null==(n=this.surveyors.filter(function(n){return 0===t.removeAccent(n.nomPrenom).toLowerCase().indexOf(e.toLowerCase())}))?void 0:n.length)<5&&(n=Ha(new Set([].concat(Ha(n),Ha(this.filterAllWords(e))))))),n.slice(0,5)}},{key:"filterAllWords",value:function(e){var t=this,n=e.split(/\s+/g).map(function(e){return e.trim()}).filter(function(e){return!!e}),r=e.endsWith(" "),i=new RegExp(n.map(function(e,t){return t+1!==n.length||r?"(?=.*\\b".concat(e,"\\b)"):"(?=.*\\b".concat(e,")")}).join("")+".+","i");return this.surveyors.filter(function(e){return i.test(t.removeAccent(e.nomPrenom))})}},{key:"displaySurveyor",value:function(e){return e&&e.nomPrenom?e.nomPrenom:""}},{key:"formIsValid",value:function(){return this.plDescriptionForm.valid}},{key:"onFormSubmit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.SurveyorName.setValue(this.Surveyor.value.nomPrenom?this.Surveyor.value.nomPrenom:this.Surveyor.value),e?this.stepSubmitIsSaveForLater.emit(this.plDescriptionForm.value):this.stepSubmit.emit(this.plDescriptionForm.value)}},{key:"removeAccent",value:function(e){return null==e?void 0:e.replace(/[\xea\xe9\xe8\xeb\xca\xc9\xc8\xcb]/g,"e").replace(/[\xee\xef\xce\xcf]/g,"i").replace(/[\xe7\xc7]/g,"c").replace(/[\xe0\xe2\xe4\xc0\xc2\xc4]/g,"a").replace(/[\xf4\xf6\xd4\xd6]/g,"o").replace(/[\xfb\xf9\xfc\xdb\xd9\xdc]/g,"u").replace(/[\xff]/g,"y")}},{key:"permitType",get:function(){return this.selectedPermitType},set:function(e){this.updateRequestPermitType(e)}},{key:"plDescription",get:function(){return this.plDescriptionForm.get("plDescriptionGroup.plDescription")}},{key:"Surveyor",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyor")}},{key:"SurveyorName",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyorName")}},{key:"SurveyorAddress",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyorAddress")}},{key:"SurveyorCity",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyorCity")}},{key:"SurveyorPostalCode",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyorPostalCode")}},{key:"SurveyorPhoneNumber",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyorPhoneNumber")}},{key:"SurveyorOtherPhoneNumber",get:function(){return this.plDescriptionForm.get("surveyorGroup.surveyorOtherPhoneNumber")}}]),e}()).\u0275fac=function(e){return new(e||KH)(Qf(Bq),Qf(_k),Qf(zq),Qf(Ry))},KH.\u0275cmp=zl({type:KH,selectors:[["pel-request-permit-pl-description"]],inputs:{permitType:"permitType",isReadOnlyMode:"isReadOnlyMode",plDescriptionInput:"plDescriptionInput",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:66,vars:31,consts:function(){return[[3,"formGroup","ngSubmit"],["formGroupName","plDescriptionGroup"],[1,"form-row"],[1,"form-group","col"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],["for","plDescriptionId"],"Description de l'op\xE9ration cadastrale",["id","plDescriptionId","name","plDescription","formControlName","plDescription","rows","4","data-testid","55085887-E9A6-4F81-B507-BAD05D2D7CA5",1,"form-control",3,"maxlength"],[1,"invalid-feedback"],[4,"ngIf"],["formGroupName","surveyorGroup"],[1,"font-weight-bold","text-primary"],"Arpenteur-g\xE9om\xE8tre",["for","surveyorId"],"Arpenteur-g\xE9om\xE8tre",[3,"ngSwitch",4,"ngIf"],["type","text","id","surveyorIdText","name","surveyorText","formControlName","surveyor","class","form-control","data-testid","A89960F5-6B13-47B4-A636-C20B90D9B8D4",3,"maxlength",4,"ngIf"],["for","surveyorAddressId"],"Adresse de l'arpenteur",["type","text","id","surveyorAddressId","name","surveyorAddress","formControlName","surveyorAddress","data-testid","A504134D-0954-4194-88B7-FB8B66B34E1D",1,"form-control",3,"maxlength"],[1,"form-group","col-7"],["for","surveyorCityId"],["type","text","id","surveyorCityId","name","surveyorCity","formControlName","surveyorCity","data-testid","E9AFECCC-5C36-4A20-8ECF-850ED7942F06",1,"form-control",3,"maxlength"],[1,"form-group","col-5"],["for","surveyorPostalCodeId"],"Code postal",["type","text","id","surveyorPostalCodeId","name","surveyorPostalCode","formControlName","surveyorPostalCode","mask","S0S 0S0","data-testid","D488491B-E080-42B8-A769-DD5F23FAD011",1,"form-control",3,"specialCharacters"],[1,"form-group","col-6"],["for","surveyorPhoneNumberId"],"T\xE9l\xE9phone",["type","tel","id","surveyorPhoneNumberId","name","surveyorPhoneNumber","formControlName","surveyorPhoneNumber","mask","000 000-0000","data-testid","4C1F2C1D-9E0F-401E-AA2E-F434C04C97B2",1,"form-control",3,"specialCharacters"],["for","surveyorOtherPhoneNumberId"],"T\xE9l\xE9phone secondaire",["type","tel","id","surveyorOtherPhoneNumberId","name","surveyorOtherPhoneNumber","formControlName","surveyorOtherPhoneNumber","mask","000 000-0000","data-testid","98CE81B9-3ABE-4C3F-91B4-AA46B8E7ED25",1,"form-control",3,"specialCharacters"],[1,"text-muted","my-3"],"* Champs obligatoires",["type","submit","class","btn btn-primary btn-rounded btn-big w-100","data-testid","EE5E602E-C994-486B-A971-7B025222F654",3,"disabled",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","f70fbcbb-d92d-4cb8-835d-2f3e4b39b40e",3,"disabled","click",4,"ngIf"]," Vous devez obligatoirement saisir du texte. ",[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"ml-2",3,"icon","spin"],["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["matInput","","type","text","id","surveyorId","name","surveyor","formControlName","surveyor","data-testid","A0884907-330B-4BB3-8911-04D4AFA96670",1,"form-control",3,"matAutocomplete","maxlength"],["id","autoCompleteId",3,"displayWith","optionSelected"],["autoSurveyor","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["type","text","id","surveyorIdText","name","surveyorText","formControlName","surveyor","data-testid","A89960F5-6B13-47B4-A636-C20B90D9B8D4",1,"form-control",3,"maxlength"]," Vous devez obligatoirement saisir un arpenteur-g\xE9om\xE8tre. "," Le code postal est invalide. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. ",["type","submit","data-testid","EE5E602E-C994-486B-A971-7B025222F654",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","f70fbcbb-d92d-4cb8-835d-2f3e4b39b40e",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"]]},template:function(e,t){1&e&&($f(0,"form",0),nm("ngSubmit",function(){return t.onFormSubmit()}),$f(1,"div",1),$f(2,"div",2),$f(3,"div",3),$f(4,"h5",4),$f(5,"div",5),Yf(6,"fa-icon",6),Jf(),Kf(7),Cm(8),Zf(),Jf(),$f(9,"label",7),Kf(10),Rg(11,8),Zf(),Cm(12,"\xa0* "),Jf(),$f(13,"textarea",9),Cm(14,"                "),Jf(),$f(15,"div",10),Uf(16,FH,2,0,"div",11),Jf(),Jf(),Jf(),Jf(),$f(17,"div",12),$f(18,"div",2),$f(19,"div",3),$f(20,"h5",4),$f(21,"div",5),Yf(22,"fa-icon",6),Jf(),$f(23,"span",13),Rg(24,14),Jf(),Jf(),$f(25,"label",15),Kf(26),Rg(27,16),Zf(),Cm(28,"\xa0* "),Jf(),Uf(29,BH,3,3,"ng-container",17),Uf(30,zH,1,1,"input",18),$f(31,"div",10),Uf(32,UH,2,0,"div",11),Jf(),Jf(),Jf(),$f(33,"div",2),$f(34,"div",3),$f(35,"label",19),Rg(36,20),Jf(),Yf(37,"input",21),Jf(),Jf(),$f(38,"div",2),$f(39,"div",22),$f(40,"label",23),Cm(41),Jf(),Yf(42,"input",24),Jf(),$f(43,"div",25),$f(44,"label",26),Rg(45,27),Jf(),Yf(46,"input",28),$f(47,"div",10),Uf(48,HH,2,0,"div",11),Jf(),Jf(),Jf(),$f(49,"div",2),$f(50,"div",29),$f(51,"label",30),Rg(52,31),Jf(),Yf(53,"input",32),$f(54,"div",10),Uf(55,QH,2,0,"div",11),Jf(),Jf(),$f(56,"div",29),$f(57,"label",33),Rg(58,34),Jf(),Yf(59,"input",35),$f(60,"div",10),Uf(61,WH,2,0,"div",11),Jf(),Jf(),Jf(),Jf(),$f(62,"p",36),Rg(63,37),Jf(),Uf(64,GH,4,2,"button",38),Uf(65,JH,5,3,"button",39),Jf()),2&e&&(Wf("formGroup",t.plDescriptionForm),dp(6),Wf("icon",t.farPencil),dp(2),xm(t.descriptionLabel),dp(5),gm("is-invalid",t.plDescription.touched&&!t.plDescription.valid),Wf("maxlength",t.fieldsMaxLength.plDescription),dp(3),Wf("ngIf",null==t.plDescription.errors?null:t.plDescription.errors.required),dp(6),Wf("icon",t.farUserHardHat),dp(7),Wf("ngIf","1"===t.paramSurveyorsListVisible),dp(1),Wf("ngIf","1"!==t.paramSurveyorsListVisible),dp(2),Wf("ngIf",null==t.Surveyor.errors?null:t.Surveyor.errors.required),dp(5),Wf("maxlength",t.fieldsMaxLength.surveyorAddress),dp(4),xm(t.cityLabel),dp(1),Wf("maxlength",t.fieldsMaxLength.surveyorCity),dp(4),gm("is-invalid",t.SurveyorPostalCode.touched&&!t.SurveyorPostalCode.valid),Wf("specialCharacters",Qv(28,ZH)),dp(2),Wf("ngIf",null==t.SurveyorPostalCode.errors?null:t.SurveyorPostalCode.errors.mask),dp(5),gm("is-invalid",t.SurveyorPhoneNumber.touched&&!t.SurveyorPhoneNumber.valid),Wf("specialCharacters",Qv(29,XH)),dp(2),Wf("ngIf",null==t.SurveyorPhoneNumber.errors?null:t.SurveyorPhoneNumber.errors.mask),dp(4),gm("is-invalid",t.SurveyorOtherPhoneNumber.touched&&!t.SurveyorOtherPhoneNumber.valid),Wf("specialCharacters",Qv(30,XH)),dp(2),Wf("ngIf",null==t.SurveyorOtherPhoneNumber.errors?null:t.SurveyorOtherPhoneNumber.errors.mask),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[XP,lP,nk,ik,DM,OS,sP,gk,yk,M_,QR,W_,G_,$T,zT,L_,XA],pipes:[ow],styles:["textarea[_ngcontent-%COMP%]{min-height:85px}"]}),KH),tQ=((YH=function(){function e(){is(this,e)}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||YH)},YH.\u0275cmp=zl({type:YH,selectors:[["pel-request-permit-form-loading"]],decls:16,vars:0,consts:[["viewBox","0 0 256 512"],["x","12","y","12","rx","3","ry","3","width","200","height","16"],["x","12","y","48","rx","3","ry","3","width","90","height","14"],["x","12","y","72","rx","3","ry","3","width","160","height","14"],["x","12","y","112","rx","3","ry","3","width","90","height","14"],["x","12","y","136","rx","3","ry","3","width","160","height","14"],["x","12","y","178","rx","3","ry","3","width","200","height","16"],["x","12","y","214","rx","3","ry","3","width","90","height","14"],["x","12","y","238","rx","3","ry","3","width","160","height","14"],["x","12","y","278","rx","3","ry","3","width","90","height","14"],["x","12","y","302","rx","3","ry","3","width","160","height","14"],["x","12","y","342","rx","3","ry","3","width","200","height","16"],["x","12","y","378","rx","3","ry","3","width","90","height","14"],["x","12","y","402","rx","3","ry","3","width","160","height","14"],["x","12","y","442","rx","3","ry","3","width","90","height","14"],["x","12","y","466","rx","3","ry","3","width","160","height","14"]],template:function(e,t){1&e&&($f(0,"content-loader",0),cc(),Yf(1,"rect",1),Yf(2,"rect",2),Yf(3,"rect",3),Yf(4,"rect",4),Yf(5,"rect",5),Yf(6,"rect",6),Yf(7,"rect",7),Yf(8,"rect",8),Yf(9,"rect",9),Yf(10,"rect",10),Yf(11,"rect",11),Yf(12,"rect",12),Yf(13,"rect",13),Yf(14,"rect",14),Yf(15,"rect",15),Jf())},directives:[Kq],styles:["content-loader[_ngcontent-%COMP%]{display:block;width:256px}"]}),YH),nQ=Ga("S+eF"),rQ=function(){function e(){}var t;return t=e,e.forRoot=function(){return{ngModule:t}},e.\u0275mod=Wl({type:e}),e.\u0275inj=hl({factory:function(t){return new(t||e)},imports:[[lw]]}),e}();Ga("IHAH");var iQ,oQ,aQ,sQ,lQ,uQ=((lQ=function(){function e(t,n){is(this,e),this.environment=t,this.http=n}return as(e,[{key:"getUrlConfig",value:function(){return this.urlConfig}},{key:"load",value:function(){var e=this;if(this.environment.city_code_config)return Object(nQ.Promise)(function(t){e.http.get(e.environment.city_code_config).subscribe(function(n){e.urlConfig=n.url,t(!0)})})}}]),e}()).\u0275fac=function(e){return new(e||lQ)(md("env"),md(wq))},lQ.\u0275prov=dl({token:lQ,factory:lQ.\u0275fac}),lQ),cQ=((sQ=function(){function e(t,n){is(this,e),this.config=t,this.http=n,this.baseUrl=this.config.getUrlConfig().api_url+"defaultforms/"}return as(e,[{key:"getAllForms",value:function(){return this.http.get(this.baseUrl,{headers:(new GM).set("Authorization",this.getUserToken())})}},{key:"getAllReferences",value:function(){return this.http.get(this.baseUrl+"GetAllReferences",{headers:(new GM).set("Authorization",this.getUserToken())})}},{key:"addNewForm",value:function(e){return this.http.post(this.baseUrl,e,{headers:(new GM).set("Authorization",this.getUserToken())})}},{key:"updateForm",value:function(e){return this.http.put(this.baseUrl,e,{headers:(new GM).set("Authorization",this.getUserToken())})}},{key:"getUserToken",value:function(){return"Bearer "+localStorage.getItem("token")}}]),e}()).\u0275fac=function(e){return new(e||sQ)(md(uQ),md(wq))},sQ.\u0275prov=dl({factory:function(){return new sQ(md(uQ),md(wq))},token:sQ,providedIn:"root"}),sQ),dQ=((aQ=function(){function e(){is(this,e)}return as(e,null,[{key:"filterExtraDataResComm",value:function(e,t){return e}},{key:"formatOwnerPropertiesChoices",value:function(e,t){return e.forEach(function(e){}),[]}},{key:"formatOwnerExtraData",value:function(e,t){var n=[];return n.push({text:"",value:""}),e.forEach(function(e){"fr-ca"===t?(e.name.toUpperCase(),n.push({text:e.name+" - NON TRADUIT",value:e.name})):n.push({text:e.name+" - "+e.description,value:e.name})}),n}},{key:"formatMatrixCodificationData",value:function(e,t){var n=[];return n.push({text:"",value:""}),e.forEach(function(e){"fr-ca"===t?(e.name.toUpperCase(),n.push({text:e.name+" - NON TRADUIT",value:e.name})):n.push({text:e.name+" - "+e.description,value:e.name})}),n}},{key:"filterExtraDataByProcess",value:function(e,t,n){var r,i=this;return r=e.filter(function(e){return i.allProcessExtraData.includes(e.name.toUpperCase())}),this.formatOwnerExtraData(r,n)}},{key:"filterMatrixExtraDataByProcess",value:function(e,t,n){var r;return r=[],this.formatMatrixCodificationData(r,n)}}]),e}()).\u0275fac=function(e){return new(e||aQ)},aQ.\u0275prov=dl({token:aQ,factory:aQ.\u0275fac}),aQ.allProcessExtraData=["AD00SECT"],aQ.incExpProcessExtraData=["EL8105A"],aQ.invMaintProcessExtraData=[],aQ.incExpProcessMatrixCod=["RES"],aQ.invMaintProcessMatrixCod=[],aQ),hQ=((oQ=function(){function e(){is(this,e)}return as(e,null,[{key:"initLotGeneratorWidget",value:function(e,t){var n={name:"batchreplacement",title:"Remplacement en lot",iconName:"",widgetIsLoaded:function(){return!0},isFit:function(e){return"batchreplacement"===e.getType()},activatedByChanged:function(n){e.JsonObject.metaData.addClass("batchreplacement",[],null,"text"),e.JsonObject.metaData.addProperties("batchreplacement",[{name:"buttonText",displayName:"Texte du bouton",default:"fr-ca"===t||"fr"===t?"Ajouter":"Add",category:"Remplacement"}])},isDefaultRender:!1,htmlTemplate:"fr-ca"===t||"fr"===t?'<fieldset><div class="sv_btn_batchreplacement" style="margin-top: 5px;"><label for="from" style="padding-right: 34px">De&nbsp;:&nbsp;</label><input style="width:100px" type="number" name="from" id="from" value="1" min="1"> <label for="to" style="padding-left: 10px; padding-right: 20px">\xc0 :&nbsp;</label><input style="width:100px" type="number" name="to" id="to" value="1" min="1"><button style="margin-left:10px"></button></div></fieldset><fieldset><div style="display: flex;"><div style="display: flex; flex-direction: column; justify-content: space-between; margin-right: 5px;"><label for="front" style="padding-top:1px">Front.&nbsp;:&nbsp;</label><label for="depth" style="padding-top:1px">Prof.&nbsp;:&nbsp;</label><label for="area" style="padding-top:1px">Superf.&nbsp;:&nbsp;</label></div><div style="display: flex; flex-direction: column;"><input style="width:100px; margin-bottom: 3px" type="number" name="front" id="front"><input style="width:100px; margin-bottom: 3px" type="number" name="depth" id="depth"><input style="width:100px" type="number" name="area" id="area"></div><div style="display: flex; flex-direction: column; justify-content: space-between; margin-right: 5px;"><label for="front" style="padding-top:1px">&nbsp;m</label><label for="depth" style="padding-top:1px">&nbsp;m</label><label for="area" style="padding-top:1px">&nbsp;m<sup>2</sup></label></div></div></fieldset>':'<fieldset><div class="sv_btn_batchreplacement" style="margin-top: 5px;"><label for="from" style="padding-right: 14px">From&nbsp;:&nbsp;</label><input style="width:100px" type="number" name="from" id="from" value="1" min="1"> <label for="to" style="padding-left: 10px; padding-right: 20px">To :&nbsp;</label><input style="width:100px" type="number" name="to" id="to" value="1" min="1"><button style="margin-left:10px"></button></div></fieldset><fieldset><div style="display: flex;"><div style="display: flex; flex-direction: column; justify-content: space-between; margin-right: 5px;"><label for="front" style="padding-top:1px">Front.&nbsp;:&nbsp;</label><label for="depth" style="padding-top:1px">Depth.&nbsp;:&nbsp;</label><label for="area" style="padding-top:1px">Area&nbsp;:&nbsp;</label></div><div style="display: flex; flex-direction: column;"><input style="width:100px; margin-bottom: 3px" type="number" name="front" id="front"><input style="width:100px; margin-bottom: 3px" type="number" name="depth" id="depth"><input style="width:100px" type="number" name="area" id="area"></div><div style="display: flex; flex-direction: column; justify-content: space-between; margin-right: 5px;"><label for="front" style="padding-top:1px">&nbsp;m</label><label for="depth" style="padding-top:1px">&nbsp;m</label><label for="area" style="padding-top:1px">&nbsp;m<sup>2</sup></label></div></div></fieldset>',afterRender:function(e,n){var r=n.getElementsByTagName("button")[0];r.innerText=e.buttonText,r.onclick=function(){var n=document.getElementById("from"),r=document.getElementById("to");if(""===n.value)"fr-ca"===t||"fr"===t?alert("Le champ De ne peut \xeatre vide."):alert("The From field cannot be empty.");else if(""===r.value)"fr-ca"===t||"fr"===t?alert("Le champ \xc0 ne peut \xeatre vide."):alert("The To field cannot be empty.");else if(Number(n.value)>Number(r.value))"fr-ca"===t||"fr"===t?alert("Le champ De ne peut \xeatre sup\xe9rieur au champ \xc0."):alert("The From field cannot be greater than the To field.");else{var i=function(e){if(!e||!e.page)return null;var t=e.page.questions.indexOf(e);return t<1?null:e.page.questions[t-1]}(e);if("matrixdynamic"===i.getType()){for(var o=i.rowCount,a=!0,s=0;a&&o>s;){try{var l=i.visibleRows[s];l.cells[0].value!==Number(n.value)&&l.cells[0].value!==Number(r.value)||(a=!1,"fr-ca"===t||"fr"===t?alert("Ajout de s\xe9quence impossible : au moins un des num\xe9ros de lots saisis existe d\xe9j\xe0 !"):alert("Cannot proceed:duplicaded subdivision land number are not allowed !"))}catch(g){console.log(g.message)}s+=1}if(!0===a){var u=document.getElementById("front"),c=document.getElementById("depth"),d=document.getElementById("area");i.rowCount=i.rowCount+(Number(r.value)-Number(n.value)+1);for(var h=i.rowCount,p=Number(n.value),f=o;f<h;f++){var m=i.visibleRows[f];m.cells[0].value=p,m.cells[1].value=Number(u.value),m.cells[2].value=Number(c.value),m.cells[3].value=Number(d.value),p+=1}u.value="",c.value="",d.value="",r.value="",n.value=""}}}}},willUnmount:function(e,t){}};null===e.CustomWidgetCollection.Instance.getCustomWidgetByName(n.name)&&e.CustomWidgetCollection.Instance.addCustomWidget(n,"customtype")}},{key:"registerBatchLotDeleteWidget",value:function(e,t){var n={name:"batchdelete",title:"Suppression en lot",iconName:"",widgetIsLoaded:function(){return!0},isFit:function(e){return"batchdelete"===e.getType()},activatedByChanged:function(n){e.JsonObject.metaData.addClass("batchdelete",[],null,"text"),e.JsonObject.metaData.addProperties("batchdelete",[{name:"buttonText",displayName:"Texte du bouton",default:"fr-ca"===t||"fr"===t?"Supprimer":"Delete",category:"Delete"}])},isDefaultRender:!1,htmlTemplate:"fr-ca"===t||"fr"===t?'<div class="sv_btn_batchreplacement" style="margin-top: 5px;"><label for="fromDelete" style="padding-right: 5px">De :&nbsp;</label><input style="width:100px; margin-right: 5px" type="number" name="fromDelete" id="fromDelete" value="1" min="1"> <label for="toDelete" style="padding-right: 5px">\xc0&nbsp;:&nbsp;</label><input style="width:100px" type="number" name="toDelete" id="toDelete" value="1" min="1"><button style="margin-left:10px"></button></div>':'<div class="sv_btn_batchreplacement" style="margin-top: 5px;"><label for="fromDelete" style="padding-right: 5px">From :&nbsp;</label><input style="width:100px; margin-right: 5px" type="number" name="fromDelete" id="fromDelete" value="1" min="1"> <label for="toDelete" style="padding-right: 5px">To&nbsp;:&nbsp;</label><input style="width:100px" type="number" name="toDelete" id="toDelete" value="1" min="1"><button style="margin-left:10px"></button></div>',afterRender:function(e,n){var r=n.getElementsByTagName("button")[0];r.innerText=e.buttonText,r.onclick=function(){var n=document.getElementById("fromDelete"),r=document.getElementById("toDelete");if(""===n.value)"fr-ca"===t||"fr"===t?alert("Le champ De ne peut \xeatre vide"):alert("The From field cannot be empty");else if(""===r.value)"fr-ca"===t||"fr"===t?alert("Le champ \xc0 ne peut \xeatre vide"):alert("The To field cannot be empty");else if(Number(n.value)>Number(r.value))"fr-ca"===t||"fr"===t?alert("Le champ De ne peut \xeatre sup\xe9rieur au champ \xc0."):alert("The From field cannot be greater than the To field.");else if(window.confirm("fr-ca"===t||"fr"===t?"\xcates-vous certain de vouloir supprimer ces lots ?":"Do you realy want to proceed ?")){var i=function(e){if(!e||!e.page)return null;var t=e.page.questions.indexOf(e);return t<1?null:e.page.questions[t-2]}(e);if("matrixdynamic"===i.getType()){for(var o=i.rowCount-1;o>=0;){try{var a=i.visibleRows[o];a.cells[0].value>=Number(n.value)&&a.cells[0].value<=Number(r.value)&&i.removeRow(o)}catch(s){console.log(s.message)}o+=-1}r.value="",n.value=""}}}},willUnmount:function(e,t){}};null===e.CustomWidgetCollection.Instance.getCustomWidgetByName(n.name)&&e.CustomWidgetCollection.Instance.addCustomWidget(n,"customtype")}}]),e}()).\u0275fac=function(e){return new(e||oQ)},oQ.\u0275prov=dl({token:oQ,factory:oQ.\u0275fac}),oQ),pQ=((iQ=function(){function e(t){is(this,e),this.localeId=t,this.formReady=new ty,this.formAnswerValidatedEvent=new ty,this.defaultLanguage=this.localeId.split("-")[0]}return as(e,[{key:"ngOnInit",value:function(){}},{key:"initSurveyContent",value:function(e){var t=this;Ga.e(11).then(Ga.t.bind(null,"NfUx",7)).then(function(n){return Ga.e(1).then(Ga.t.bind(null,"FXFD",7)).then(function(r){return Ga.e(2).then(Ga.t.bind(null,"qZCD",7)).then(function(){hQ.initLotGeneratorWidget(n,t.localeId),hQ.registerBatchLotDeleteWidget(n,t.localeId),e&&(n.ChoicesRestfull.onBeforeSendRequest=function(e,t){t.request.setRequestHeader("Authorization","Bearer "+localStorage.getItem("pel_api_token"))},r.inputmask(n),t.initSurvey(n,e))})})})}},{key:"delayedResponse",value:function(){return new Promise(function(e,t){setTimeout(function(){e(!0)},500)})}},{key:"initSurvey",value:function(e,t){var n=this;this.surveyModel=new e.Model(t),this.formAnswer&&""!==this.formAnswer&&this.delayedResponse().then(function(e){n.surveyModel.data=JSON.parse(n.formAnswer)}),this.surveyModel.locale=this.defaultLanguage,this.surveyModel.showNavigationButtons=!1;var r=e.StylesManager.ThemeColors.winter;r["$main-color"]="var(--pel-primary)",r["$main-hover-color"]="var(--pel-primary-light)",r["$slider-color"]="var(--pel-primary-lighter)",r["$body-container-background-color"]="white",r["$border-color"]="#CFCFCF",e.StylesManager.applyTheme("winter"),e.SurveyNG.render("dynamicFormContainer2",{model:this.surveyModel}),this.surveyModel.onValueChanged.isEmpty&&this.surveyModel.onValueChanged.add(function(e,t){"dropdown"===t.question.getType()&&t.question.choicesByUrl.processedUrl&&t.value&&"UNIT"===t.question.choicesByUrl.processedUrl.split("=")[1].split("&")[0].substring(0,4).toUpperCase()&&e.getAllQuestions(!0).forEach(function(e){"dropdown"===e.getType()&&e.choicesByUrl.processedUrl&&("UNIT"!==e.choicesByUrl.processedUrl.split("=")[1].split("&")[0].substring(0,4).toUpperCase()||e.value||e.choicesFromUrl.find(function(e){return e.value===t.value&&e.text==t.question.selectedItem.text})&&(e.value=t.value))})}),this.formCompleteEvent.subscribe(function(){return n.surveyModel.completeLastPage()}),this.surveyModel.onComplete.add(function(e){n.surveyModel.clear(!1,!0),n.formAnswerValidatedEvent.emit(e.data)}),this.formReady.emit(),this.isReadOnly&&(this.surveyModel.mode="display")}},{key:"formContent",set:function(e){this.initSurveyContent(e)}}]),e}()).\u0275fac=function(e){return new(e||iQ)(Qf(Ry))},iQ.\u0275cmp=zl({type:iQ,selectors:[["lib-form-answer"]],inputs:{formContent:"formContent",formAnswer:"formAnswer",isReadOnly:"isReadOnly",formCompleteEvent:"formCompleteEvent"},outputs:{formReady:"formReady",formAnswerValidatedEvent:"formAnswerValidatedEvent"},decls:1,vars:0,consts:[["id","dynamicFormContainer2"]],template:function(e,t){1&e&&Yf(0,"div",0)},styles:[""]}),iQ);function fQ(e){return function(){return e.load()}}var mQ,gQ=((mQ=function(){function e(){is(this,e)}return as(e,null,[{key:"forRoot",value:function(t){return{ngModule:e,providers:[cQ,dQ,{provide:"env",useValue:t}]}}}]),e}()).\u0275mod=Wl({type:mQ}),mQ.\u0275inj=hl({factory:function(e){return new(e||mQ)},providers:[cQ,dQ,uQ,{provide:xy,useFactory:fQ,deps:[uQ],multi:!0}],imports:[[lw,rQ,wk,Ck]]}),mQ);function vQ(e,t){1&e&&Yf(0,"pel-request-permit-form-loading")}function yQ(e,t){1&e&&Yf(0,"pel-error-generic")}function bQ(e,t){1&e&&Yf(0,"pel-request-permit-form-loading")}function _Q(e,t){if(1&e){var n=Xf();$f(0,"button",6),nm("click",function(){return Nu(n),sm(2).onStepSubmit()}),Kf(1),Rg(2,7),Zf(),Yf(3,"fa-icon",8),Jf()}if(2&e){var r=sm(2);Wf("disabled",r.isSubmitting),dp(3),Wf("icon",r.farLongArrowRight)}}function wQ(e,t){1&e&&Yf(0,"fa-icon",13),2&e&&Wf("icon",sm(3).farSpinnerThird)("spin",!0)}function CQ(e,t){if(1&e){var n=Xf();$f(0,"button",9),nm("click",function(){return Nu(n),sm(2).onStepSubmit(!0)}),Yf(1,"fa-icon",10),Kf(2),Rg(3,11),Zf(),Uf(4,wQ,1,2,"fa-icon",12),Jf()}if(2&e){var r=sm(2);Wf("disabled",r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}function xQ(e,t){if(1&e){var n=Xf();Kf(0),Uf(1,bQ,1,0,"pel-request-permit-form-loading",2),$f(2,"lib-form-answer",3),nm("formReady",function(){return Nu(n),sm().onFormReady()})("formAnswerValidatedEvent",function(e){return Nu(n),sm().onFormValidated(e)}),Jf(),Uf(3,_Q,4,2,"button",4),Uf(4,CQ,5,3,"button",5),Zf()}if(2&e){var r=sm();dp(1),Wf("ngIf",r.formState===r.viewStateEnum.Loading),dp(1),Wf("formContent",r.formContent)("formAnswer",r.formAnswer)("isReadOnly",r.isReadOnlyMode)("formCompleteEvent",r.formValidationTrigger),dp(1),Wf("ngIf",r.formState===r.viewStateEnum.Ready&&!r.isReadOnlyMode),dp(1),Wf("ngIf",r.formState===r.viewStateEnum.Ready&&!r.isReadOnlyMode)}}var SQ,PQ,kQ=((PQ=function(){function e(t,n,r,i){is(this,e),this.localeId=t,this.pelService=n,this.authService=r,this.configService=i,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.hasBeenSubmitted=!1,this.formValidationTrigger=new ty,this.viewState=HM.Loading,this.formState=HM.Loading,this.viewStateEnum=HM,this.defaultLanguage=this.localeId.split("-")[0],this.farLongArrowRight=$L,this.farSave=iF,this.farSpinnerThird=aF}return as(e,[{key:"ngOnInit",value:function(){}},{key:"initSurvey",value:function(e){var t=this;e?(this.viewState=HM.Loading,this.authService.getPelToken().subscribe(function(n){localStorage.setItem("pel_api_token",n),t.pelService.getFormContentByFormId(e).subscribe(function(e){var n;if(e.result&&""!==e.result){var r=e.result.replace(new RegExp("http://localhost:0000/v1/","gi"),null===(n=t.configService.getUrlConfig())||void 0===n?void 0:n.api_url);r=r.replace(new RegExp("{locale}","gi"),t.defaultLanguage),t.formContent=r,t.viewState=HM.Ready}else console.error("GetFormContentByFormId returned an empty formContent string."),t.viewState=HM.Error},function(e){t.viewState=HM.Error})},function(e){t.viewState=HM.Error})):this.viewState=HM.Error}},{key:"onStepSubmit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isSaveForLater=e,this.hasBeenSubmitted=!1,this.formValidationTrigger.emit()}},{key:"onFormReady",value:function(){this.formState=HM.Ready}},{key:"onFormValidated",value:function(e){this.hasBeenSubmitted||(this.isSaveForLater?this.stepSubmitIsSaveForLater.emit(e):this.stepSubmit.emit(e),this.hasBeenSubmitted=!0)}},{key:"codificationFormulaire",set:function(e){this.initSurvey(e)}}]),e}()).\u0275fac=function(e){return new(e||PQ)(Qf(Ry),Qf(Bq),Qf(jq),Qf(Mq))},PQ.\u0275cmp=zl({type:PQ,selectors:[["pel-request-permit-form"]],inputs:{codificationFormulaire:"codificationFormulaire",formAnswer:"formAnswer",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:4,vars:4,consts:function(){return[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngIf"],[3,"formContent","formAnswer","isReadOnly","formCompleteEvent","formReady","formAnswerValidatedEvent"],["class","btn btn-primary btn-rounded btn-big w-100 mt-3","data-testid","ED1B65A9-7A94-4AE1-9E12-3313819896DF",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","981fd01b-c9d1-48a2-99de-f2fbd540a15e",3,"disabled","click",4,"ngIf"],["data-testid","ED1B65A9-7A94-4AE1-9E12-3313819896DF",1,"btn","btn-primary","btn-rounded","btn-big","w-100","mt-3",3,"disabled","click"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","981fd01b-c9d1-48a2-99de-f2fbd540a15e",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"]]},template:function(e,t){1&e&&(Kf(0,0),Uf(1,vQ,1,0,"pel-request-permit-form-loading",1),Uf(2,yQ,1,0,"pel-error-generic",1),Uf(3,xQ,5,7,"ng-container",1),Zf()),2&e&&(Wf("ngSwitch",t.viewState),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Error),dp(1),Wf("ngSwitchCase",t.viewStateEnum.Ready))},directives:[W_,G_,tQ,LM,M_,pQ,DM],styles:["lib-form-answer[_ngcontent-%COMP%]{display:block;margin-left:-1rem;margin-right:-1rem}"]}),PQ),EQ=((SQ=function(){function e(t){is(this,e),this.pelService=t}return as(e,[{key:"uploadFile",value:function(e,t,n,r){var i,o=this,a=new FileReader;return a.readAsDataURL(e),new ws(function(e){a.onload=function(){i={documentFileId:-1*n,batchId:r,fileName:t,fileContent:a.result},o.pelService.addUploadedFile(i).subscribe(function(t){e.next(i),e.complete()},function(t){e.error(t.error)})}})}},{key:"removeFile",value:function(e){return e.fileContent="",this.pelService.deleteUploadedFile(e)}}]),e}()).\u0275fac=function(e){return new(e||SQ)(md(Bq))},SQ.\u0275prov=dl({token:SQ,factory:SQ.\u0275fac}),SQ),AQ=["fileToAdd"];function IQ(e,t){1&e&&($f(0,"p"),Rg(1,20),Jf())}function TQ(e,t){1&e&&(Kf(0),Cm(1,"*"),Zf())}function OQ(e,t){if(1&e&&($f(0,"li"),Cm(1),Uf(2,TQ,2,0,"ng-container",13),Jf()),2&e){var n=t.$implicit,r=sm(3);dp(1),Sm(" ","en"===r.localeId?n.docRequisEn:n.docRequis," "),dp(1),Wf("ngIf","1"===n.isMandatory)}}function RQ(e,t){1&e&&($f(0,"p",21),Rg(1,22),Jf())}function VQ(e,t){if(1&e&&(Kf(0),Uf(1,IQ,2,0,"p",13),$f(2,"ul"),Uf(3,OQ,3,2,"li",18),Jf(),Uf(4,RQ,2,0,"p",19),Zf()),2&e){var n=sm(2);dp(1),Wf("ngIf",n.getMaxRequiredDocuments()>0),dp(2),Wf("ngForOf",n.requiredDocuments),dp(1),Wf("ngIf",n.getMinDocuments()>0)}}function DQ(e,t){1&e&&(Kf(0),$f(1,"p"),Rg(2,23),Jf(),Zf())}function NQ(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"input",24,25),nm("change",function(e){return Nu(n),sm(2).onUploadFiles(e)})("dragenter",function(){return Nu(n),sm(2).setFileDragged(!0)})("dragleave",function(){return Nu(n),sm(2).setFileDragged(!1)})("drop",function(){return Nu(n),sm(2).setFileDragged(!1)}),Jf(),Yf(3,"fa-icon",11),$f(4,"label"),Tg(5,26),Yf(6,"br"),Yf(7,"small"),Og(),Jf(),Zf()}if(2&e){var r=sm(2);dp(3),Wf("icon",r.farCloudUpload),dp(4),Vg(r.maxDocuments)(r.fileMaxSizeMb),Dg(5)}}function LQ(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",11),$f(2,"label"),Rg(3,27),Jf(),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farFileTimes)}}function FQ(e,t){if(1&e){var n=Xf();$f(0,"button",32),nm("click",function(){Nu(n);var e=sm().$implicit;return sm(2).onRemoveFile(e)}),Yf(1,"fa-icon",11),Jf()}if(2&e){var r=sm(3);dp(1),Wf("icon",r.farTrashAlt)}}function MQ(e,t){if(1&e&&($f(0,"div",28),$f(1,"span",29),Yf(2,"fa-icon",30),Cm(3),Jf(),Uf(4,FQ,2,1,"button",31),Jf()),2&e){var n=t.$implicit,r=sm(2);Bf("data-testitemid",n.documentFileId),dp(2),Wf("icon",r.farFile),dp(1),Sm("",n.fileName," "),dp(1),Wf("ngIf",!r.isReadOnlyMode)}}function qQ(e,t){if(1&e&&($f(0,"div",33),$f(1,"span",29),Yf(2,"fa-icon",34),Cm(3),Jf(),$f(4,"button",35),Yf(5,"fa-icon",11),Jf(),Jf()),2&e){var n=t.$implicit,r=sm(2);dp(2),Wf("icon",r.farSpinnerThird)("spin",!0),dp(1),Sm("",n," "),dp(2),Wf("icon",r.farTrashAlt)}}function jQ(e,t){if(1&e&&($f(0,"div",36),Cm(1),Jf()),2&e){var n=t.$implicit;dp(1),Sm(" ",n," ")}}function BQ(e,t){if(1&e&&($f(0,"section",8),$f(1,"h5",9),$f(2,"div",10),Yf(3,"fa-icon",11),Jf(),$f(4,"span"),Rg(5,12),Jf(),Jf(),Uf(6,VQ,5,3,"ng-container",13),Uf(7,DQ,3,0,"ng-container",13),$f(8,"div",14),Uf(9,NQ,8,3,"ng-container",13),Uf(10,LQ,4,1,"ng-container",13),Jf(),Uf(11,MQ,5,4,"div",15),Uf(12,qQ,6,4,"div",16),Uf(13,jQ,2,1,"div",17),Jf()),2&e){var n=sm();dp(3),Wf("icon",n.farCopy),dp(3),Wf("ngIf",!n.isReadOnlyMode),dp(1),Wf("ngIf",!(null!=n.documents&&null!=n.documents.listOfDocuments&&n.documents.listOfDocuments.length)&&n.isReadOnlyMode),dp(1),gm("dragging",n.fileDragged)("disabled",n.uploadedFile.length+n.filesInProgress.length>=n.maxDocuments),Wf("hidden",n.isReadOnlyMode),dp(1),Wf("ngIf",n.uploadedFile.length+n.filesInProgress.length<n.maxDocuments),dp(1),Wf("ngIf",n.uploadedFile.length+n.filesInProgress.length>=n.maxDocuments),dp(1),Wf("ngForOf",n.uploadedFile),dp(1),Wf("ngForOf",n.filesInProgress),dp(1),Wf("ngForOf",n.messages)}}function zQ(e,t){if(1&e&&($f(0,"h5",9),$f(1,"div",10),Yf(2,"fa-icon",11),Jf(),$f(3,"span"),Rg(4,37),Jf(),Jf()),2&e){var n=sm();dp(2),Wf("icon",n.farPlus)}}function UQ(e,t){if(1&e&&($f(0,"div",38),$f(1,"label",39),Cm(2),Jf(),Yf(3,"textarea",40),Jf()),2&e){var n=sm();dp(2),Sm(" ",n.remarqueCommentaire,""),dp(1),Wf("maxlength",n.fieldsMaxLength.comment)}}function HQ(e,t){if(1&e&&($f(0,"p",41),Rg(1,42),Jf()),2&e){var n=sm();dp(1),Vg(n.getMinDocuments())(n.getMinDocuments()),Dg(1)}}function QQ(e,t){if(1&e&&($f(0,"button",43),Kf(1),Rg(2,44),Zf(),Yf(3,"fa-icon",45),Jf()),2&e){var n=sm();dp(3),Wf("icon",n.farSpinnerThird)("spin",!0)}}function WQ(e,t){if(1&e&&($f(0,"button",46),Kf(1),Rg(2,47),Zf(),Yf(3,"fa-icon",48),Jf()),2&e){var n=sm();Wf("disabled",!n.isFormValid()||n.isSubmitting),dp(3),Wf("icon",n.farLongArrowRight)}}function GQ(e,t){1&e&&Yf(0,"fa-icon",45),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function $Q(e,t){if(1&e){var n=Xf();$f(0,"button",49),nm("click",function(){return Nu(n),sm().onSubmitForm(!0)}),Yf(1,"fa-icon",30),Kf(2),Rg(3,50),Zf(),Uf(4,GQ,1,2,"fa-icon",51),Jf()}if(2&e){var r=sm();Wf("disabled",!r.isFormValid()||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var JQ,YQ=((JQ=function(){function e(t,n,r,i){is(this,e),this.filesUploadHelper=t,this.globalsService=n,this.fb=r,this.localeId=i,this.followUpNumber="",this.isReadOnlyMode=!1,this.lastName="",this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.requiredDocuments=[],this.messages=[],this.fileMaxSize=5242880,this.fileMaxSizeMb=5,this.maxDocuments=0,this.uploadedFile=[],this.filesInProgress=[],this.fileDragged=!1,this.filesToDelete=[],this.farCloudUpload=TL,this.farCopy=OL,this.farFile=ML,this.farFileTimes=jL,this.farLongArrowRight=$L,this.farPlus=eF,this.farSpinnerThird=aF,this.farTrashAlt=uF,this.farSave=iF,this.FILE_TYPE_BLACKLIST="(sql|bat|exe|com|zip|7z|dll|rar|shs|msi|reg|js|pif|application|gadget|msp|scr|hta|cpl|msc|jar|cmd|vb|ws|ps|msh|scf|lnk|inf|docm|dotm|xlsm|xltm|pptm|potm|ppam|ppsm|sldm)",this.fieldsMaxLength={comment:2500}}return as(e,[{key:"ngOnInit",value:function(){var e=this,t=parseInt(this.globalsService.getGeneralParameterByCode("taille_max_telechargement"),10);void 0!==t&&t>0&&(this.fileMaxSize=1048576*t,this.fileMaxSizeMb=t),this.maxDocuments=this.globalsService.getPermitMaxDocuments(this.requiredDocuments?this.requiredDocuments.length:0),this.remarqueCommentaire=this.globalsService.getCustomResourceTextByCode("RES_AJOUTER_COMMENTAIRES"),""===this.remarqueCommentaire&&(this.remarqueCommentaire="en"===this.localeId?hj.RES_AJOUTER_COMMENTAIRES_EN:hj.RES_AJOUTER_COMMENTAIRES_FR),this.documentsForm=this.fb.group({comment:[this.documents?this.documents.comment:"",[FS.maxLength(this.fieldsMaxLength.comment)]]}),this.documents&&this.documents.listOfDocuments.forEach(function(t){e.uploadedFile.push({documentFileId:0,batchId:"",fileName:t,fileContent:""})}),this.isReadOnlyMode&&this.documentsForm.disable()}},{key:"onUploadFiles",value:function(e){console.log("enter in onUploadFiles at: "+Date.now()),this.messages=[];var t=e.target.files;if(t.length>this.maxDocuments)this.messages.push("en"===this.localeId?"Please select a maximum of "+this.maxDocuments.toString()+" file(s).":"Veuillez s\xe9lectionner un maximum de "+this.maxDocuments.toString()+" fichier(s).");else for(var n=0;n<t.length;n++)this.onUploadCurrentFile(e.target.files[n],this.maxDocuments)}},{key:"onUploadCurrentFile",value:function(e,t){var n=this,r=this.uploadedFile.length+1,i=e.name;this.isFileValid(e)?(this.filesInProgress.push(i),e.size<this.fileMaxSize&&r<=t?this.filesUploadHelper.uploadFile(e,e.name,r,this.batchId).subscribe(function(e){r+=1,n.uploadedFile.push(e),n.filesInProgress=n.filesInProgress.filter(function(t){return t!==e.fileName}),console.log("File is uploaded at: "+Date.now()),n.fileInput&&(n.fileInput.nativeElement.value="")},function(t){-1!==t.errors[0].indexOf("contains virus")?n.messages.push("en"===n.localeId?e.name+" is potentially malware, so it cannot be added.":"Le fichier "+e.name+" est potentiellement malveillant, donc impossible de l'ajouter."):n.messages.push("en"===n.localeId?e.name+" cannot be added.":"Impossible d'ajouter "+e.name+"."),n.filesInProgress=n.filesInProgress.filter(function(e){return e!==i}),n.fileInput&&(n.fileInput.nativeElement.value="")}):e.size>=this.fileMaxSize?(this.filesInProgress=this.filesInProgress.filter(function(e){return e!==i}),this.messages.push("en"===this.localeId?e.name+" is too large (maximum "+this.fileMaxSizeMb+"MB).":e.name+" est trop volumineux (maximum "+this.fileMaxSizeMb+"Mo)."),this.fileInput&&(this.fileInput.nativeElement.value="")):(this.filesInProgress=this.filesInProgress.filter(function(e){return e!==i}),this.messages.push("en"===this.localeId?e.name+" cannot be added because the file limit has been reached.":"Impossible d'ajouter "+e.name+" car la limite de fichiers est atteinte."),this.fileInput&&(this.fileInput.nativeElement.value=""))):this.messages.push("en"===this.localeId?"The type for the file ".concat(i," is not accepted."):"Le type pour le fichier ".concat(i," n'est pas accept\xe9."))}},{key:"onRemoveFile",value:function(e){var t=this;""!==e.batchId?(this.messages=[],this.filesUploadHelper.removeFile(e).subscribe(function(n){t.uploadedFile=t.uploadedFile.filter(function(t){return t!==e})},function(n){t.messages.push("en"===t.localeId?e.fileName+" cannot be deleted at this time.":e.fileName+" ne peut \xeatre supprim\xe9 pour le moment.")})):(this.filesToDelete.push(e.fileName),this.uploadedFile=this.uploadedFile.filter(function(t){return t!==e}))}},{key:"onSubmitForm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isFormValid()){var t={comment:this.Comment.value,listOfDocuments:[],filesToDelete:this.filesToDelete};void 0!==this.uploadedFile&&this.uploadedFile.length>0&&this.uploadedFile.forEach(function(e){t.listOfDocuments.push(e.fileName.toString())}),e?this.stepSubmitIsSaveForLater.emit(t):this.stepSubmit.emit(t)}}},{key:"setFileDragged",value:function(e){this.fileDragged=e}},{key:"updateRequestPermitType",value:function(e){e!==this.theSelectedPermitType&&(this.theSelectedPermitType=e,this.requiredDocuments=e.documentsRequis,this.uploadedFile=[])}},{key:"getMinDocuments",value:function(){return this.requiredDocuments?this.requiredDocuments.filter(function(e){return"1"===e.isMandatory}).length:0}},{key:"isFormValid",value:function(){return this.uploadedFile.length>=this.getMinDocuments()}},{key:"getMaxRequiredDocuments",value:function(){return this.requiredDocuments?this.requiredDocuments.length:0}},{key:"isFileValid",value:function(e){var t=/^.+\.([^.]+)$/.exec(e.name),n=null==t?"":t[1];return!new RegExp(this.FILE_TYPE_BLACKLIST,"i").test(n)}},{key:"requestPermitType",set:function(e){this.updateRequestPermitType(e)}},{key:"Comment",get:function(){return this.documentsForm.get("comment")}}]),e}()).\u0275fac=function(e){return new(e||JQ)(Qf(EQ),Qf(zq),Qf(_k),Qf(Ry))},JQ.\u0275cmp=zl({type:JQ,selectors:[["pel-request-permit-documents"]],viewQuery:function(e,t){var n;1&e&&my(AQ,!0),2&e&&py(n=yy())&&(t.fileInput=n.first)},inputs:{requestPermitType:"requestPermitType",batchId:"batchId",documents:"documents",followUpNumber:"followUpNumber",isReadOnlyMode:"isReadOnlyMode",lastName:"lastName",codeModule:"codeModule",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:9,vars:8,consts:function(){var e,t,n,r,i,o,a,s,l,u;return e="Documents",t="Veuillez joindre les documents suivants \xE0 votre demande\xA0: ",n=" * Document obligatoire",r="Aucun document n'a \xE9t\xE9 ajout\xE9 pour cette demande. ",i="Glissez ou cliquez pour ajouter des fichiers" + "\ufffd#6\ufffd\ufffd/#6\ufffd" + "" + "\ufffd#7\ufffd" + "(maximum " + "\ufffd0\ufffd" + " fichier(s) - maximum " + "\ufffd1\ufffd" + " Mo par fichier)" + "\ufffd/#7\ufffd" + "",o="Limite de fichiers atteinte",a="Retirer",s="Retirer",l="Informations compl\xE9mentaires",u=Ng(u="{VAR_PLURAL, plural, =1 {1 document} other {{INTERPOLATION} documents}}",{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),[["class","mb-5",4,"ngIf"],["class","font-weight-bold text-primary d-flex align-items-center mb-3",4,"ngIf"],[3,"formGroup","ngSubmit"],["class","form-group mb-4",4,"ngIf"],["class","mb-3 text-danger text-center",4,"ngIf"],["class","btn btn-primary btn-rounded btn-big w-100","type","submit","disabled","","data-testid","BA2D0ABC-7F11-4D4B-9B73-AAD5F94196B0",4,"ngIf"],["class","btn btn-primary btn-rounded btn-big w-100","type","submit","data-testid","21762E45-6436-4B58-AE1B-E564AB612941",3,"disabled",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","892b9848-c82e-4e2c-8a67-4dad6c5a3cd7",3,"disabled","click",4,"ngIf"],[1,"mb-5"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],e,[4,"ngIf"],[1,"pel-file-upload-zone","mt-3",3,"hidden"],["class","card py-1 pl-3 pr-1 mt-1 d-flex justify-content-between align-items-center flex-row","data-testid","92E69F82-7EAE-49A6-A414-DBF7A8EC303E",4,"ngFor","ngForOf"],["class","card py-1 pl-3 pr-1 mt-1 d-flex justify-content-between align-items-center flex-row",4,"ngFor","ngForOf"],["class","text-center text-danger my-2","data-testid","7BA6147C-B5BA-4284-ACE2-5878479B522A",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["class","text-muted pl-4 mt-2 mb-0",4,"ngIf"],t,[1,"text-muted","pl-4","mt-2","mb-0"],n,r,["type","file","id","fileToAdd","multiple","","title","","data-testid","768EBF58-2418-4785-A144-C73AEE15FEE7",3,"change","dragenter","dragleave","drop"],["fileToAdd",""],i,o,["data-testid","92E69F82-7EAE-49A6-A414-DBF7A8EC303E",1,"card","py-1","pl-3","pr-1","mt-1","d-flex","justify-content-between","align-items-center","flex-row"],[1,"text-ellipsis"],[1,"mr-2",3,"icon"],["type","button","class","btn btn-danger","aria-label",a,3,"click",4,"ngIf"],["type","button","aria-label",s,1,"btn","btn-danger",3,"click"],[1,"card","py-1","pl-3","pr-1","mt-1","d-flex","justify-content-between","align-items-center","flex-row"],[1,"mr-1",3,"icon","spin"],["type","button","disabled","",1,"btn","btn-danger"],["data-testid","7BA6147C-B5BA-4284-ACE2-5878479B522A",1,"text-center","text-danger","my-2"],l,[1,"form-group","mb-4"],["for","commentId"],["id","commentId","name","comment","formControlName","comment","rows","4","data-testid","A2319555-F6EE-4656-9A84-78640B6E3439",1,"form-control",3,"maxlength"],[1,"mb-3","text-danger","text-center"]," Veuillez joindre au moins " + u + ". ",["type","submit","disabled","","data-testid","BA2D0ABC-7F11-4D4B-9B73-AAD5F94196B0",1,"btn","btn-primary","btn-rounded","btn-big","w-100"],"Chargement des fichiers",[1,"ml-2",3,"icon","spin"],["type","submit","data-testid","21762E45-6436-4B58-AE1B-E564AB612941",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","892b9848-c82e-4e2c-8a67-4dad6c5a3cd7",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"]]},template:function(e,t){1&e&&(Uf(0,BQ,14,13,"section",0),$f(1,"section"),Uf(2,zQ,5,1,"h5",1),$f(3,"form",2),nm("ngSubmit",function(){return t.onSubmitForm()}),Uf(4,UQ,4,2,"div",3),Uf(5,HQ,2,2,"p",4),Uf(6,QQ,4,2,"button",5),Uf(7,WQ,4,2,"button",6),Uf(8,$Q,5,3,"button",7),Jf(),Jf()),2&e&&(Wf("ngIf",t.maxDocuments>0),dp(2),Wf("ngIf","UR"!==t.codeModule),dp(1),Wf("formGroup",t.documentsForm),dp(1),Wf("ngIf","UR"!==t.codeModule),dp(1),Wf("ngIf",t.uploadedFile.length<t.getMinDocuments()),dp(1),Wf("ngIf",t.filesInProgress.length),dp(1),Wf("ngIf",!t.filesInProgress.length&&!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.filesInProgress.length&&!t.isReadOnlyMode))},directives:[M_,XP,lP,nk,DM,L_,OS,sP,gk,yk],styles:["textarea[_ngcontent-%COMP%]{min-height:100px}"]}),JQ);function KQ(e,t){if(1&e&&($f(0,"div",10),$f(1,"label",32),$f(2,"strong"),Rg(3,33),Jf(),Jf(),$f(4,"p",34),Cm(5),Jf(),Jf()),2&e){var n=sm();dp(5),Sm(" ",n.requestSummary.permitCost,"")}}function ZQ(e,t){if(1&e&&($f(0,"div",10),$f(1,"label",32),$f(2,"strong"),Cm(3),Jf(),Jf(),$f(4,"p",35),Cm(5),Jv(6,"date"),Jf(),Jf()),2&e){var n=sm();dp(3),xm(n.dateDebutLabel),dp(2),Sm(" ",Kv(6,2,n.requestSummary.workStartDate,"d MMMM yyyy"),"")}}function XQ(e,t){if(1&e&&(Kf(0),Rg(1,39),Zf()),2&e){var n=sm(2);dp(1),Vg(n.requestSummary.periodOfValidity)(n.requestSummary.periodOfValidity),Dg(1)}}function eW(e,t){if(1&e&&(Kf(0),Rg(1,40),Zf()),2&e){var n=sm(2);dp(1),Vg(n.requestSummary.periodOfValidity)(n.requestSummary.periodOfValidity),Dg(1)}}function tW(e,t){if(1&e&&($f(0,"div",10),$f(1,"label",32),$f(2,"strong"),Rg(3,36),Jf(),Jf(),$f(4,"p",37),Uf(5,XQ,2,2,"ng-container",18),Uf(6,eW,2,2,"ng-container",18),Kf(7),Rg(8,38),Zf(),Jf(),Jf()),2&e){var n=sm();dp(5),Wf("ngIf",1==n.requestSummary.periodOfValidityUnit),dp(1),Wf("ngIf",2==n.requestSummary.periodOfValidityUnit)}}function nW(e,t){if(1&e&&($f(0,"div",10),$f(1,"label",32),$f(2,"strong"),Rg(3,41),Jf(),Jf(),$f(4,"p",42),Cm(5),Jf(),Jf()),2&e){var n=sm();dp(5),Sm(" ",n.requestSummary.location,"")}}function rW(e,t){if(1&e&&($f(0,"div",43),$f(1,"div",44),$f(2,"label",32),$f(3,"strong"),Rg(4,45),Jf(),Jf(),$f(5,"address",46),Cm(6),Yf(7,"br"),Cm(8),Yf(9,"br"),Cm(10),Yf(11,"br"),Cm(12),Jf(),Jf(),Jf()),2&e){var n=sm();dp(6),Sm(" ",n.requestSummary.applicantName,""),dp(2),Sm(" ",n.requestSummary.applicantFullAddress,""),dp(2),Pm(" ",n.requestSummary.applicantCity," ",n.requestSummary.applicantPostalCode,""),dp(2),Sm(" ",n.requestSummary.applicantEmail," ")}}function iW(e,t){if(1&e&&($f(0,"div",43),$f(1,"div",44),$f(2,"label",32),$f(3,"strong"),Cm(4),Jf(),Jf(),$f(5,"p",47),Cm(6),Jf(),Jf(),Jf()),2&e){var n=sm();dp(4),xm(n.descriptionLabel),dp(2),Sm("",n.requestSummary.description," ")}}function oW(e,t){if(1&e&&($f(0,"li"),Yf(1,"fa-icon",51),Cm(2),Jf()),2&e){var n=t.$implicit,r=sm(2);dp(1),Wf("icon",r.farFile),dp(1),Sm("",n," ")}}function aW(e,t){if(1&e&&($f(0,"div",43),$f(1,"div",44),$f(2,"label",32),Tg(3,48),Yf(4,"strong"),Og(),Jf(),$f(5,"ul",49),Uf(6,oW,3,2,"li",50),Jf(),Jf(),Jf()),2&e){var n=sm();dp(4),Vg(n.getListOfDocuments().length),Dg(3),dp(2),Wf("ngForOf",n.getListOfDocuments())}}function sW(e,t){1&e&&($f(0,"div"),Rg(1,52),Jf())}function lW(e,t){1&e&&($f(0,"div"),Rg(1,53),Jf())}function uW(e,t){1&e&&($f(0,"div"),Rg(1,54),Jf())}function cW(e,t){1&e&&($f(0,"div"),Rg(1,55),Jf())}function dW(e,t){1&e&&($f(0,"small",56),Rg(1,57),Jf())}var hW=function(e,t){return{"btn-primary":e,"btn-secondary":t}};function pW(e,t){if(1&e){var n=Xf();$f(0,"div",9),$f(1,"div",25),$f(2,"label",58),Kf(3),Rg(4,59),Zf(),Cm(5,"\xa0* "),Jf(),$f(6,"button",60),nm("click",function(){return Nu(n),sm().FollowUpLanguage.setValue("fr")}),Cm(7," Fran\xe7ais"),Jf(),$f(8,"button",61),nm("click",function(){return Nu(n),sm().FollowUpLanguage.setValue("en")}),Cm(9," English"),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(6),Wf("ngClass",Wv(4,hW,"fr"===r.FollowUpLanguage.value,"fr"!==r.FollowUpLanguage.value))("disabled",r.isReadOnlyMode),dp(2),Wf("ngClass",Wv(7,hW,"en"===r.FollowUpLanguage.value,"en"!==r.FollowUpLanguage.value))("disabled",r.isReadOnlyMode)}}function fW(e,t){1&e&&($f(0,"div"),Rg(1,62),Jf())}function mW(e,t){1&e&&($f(0,"div"),Rg(1,65),Jf())}function gW(e,t){if(1&e&&($f(0,"div",9),$f(1,"div",25),$f(2,"div",11),Yf(3,"input",63),$f(4,"label",64),Cm(5),Jf(),$f(6,"div",17),Uf(7,mW,2,0,"div",18),Jf(),Jf(),Jf(),Jf()),2&e){var n=sm();dp(3),gm("is-invalid",null==n.Signature.errors?null:n.Signature.errors.required),Wf("readonly",n.isReadOnlyMode),dp(2),xm(n.signatureText),dp(2),Wf("ngIf",null==n.Signature.errors?null:n.Signature.errors.required)}}function vW(e,t){1&e&&Yf(0,"fa-icon",69),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function yW(e,t){if(1&e){var n=Xf();$f(0,"button",66),nm("click",function(){return Nu(n),sm().saveRequestForLater()}),Yf(1,"fa-icon",51),Kf(2),Rg(3,67),Zf(),Uf(4,vW,1,2,"fa-icon",68),Jf()}if(2&e){var r=sm();Wf("disabled",r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting&&r.isSubmittingSaveForLater)}}function bW(e,t){1&e&&(Kf(0),Rg(1,71),Zf())}function _W(e,t){1&e&&(Kf(0),Rg(1,72),Zf())}function wW(e,t){1&e&&Yf(0,"fa-icon",69),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function CW(e,t){if(1&e){var n=Xf();$f(0,"button",70),nm("click",function(){return Nu(n),sm().submitRequest()}),Yf(1,"fa-icon",51),Uf(2,bW,2,0,"ng-container",18),Uf(3,_W,2,0,"ng-container",18),Uf(4,wW,1,2,"fa-icon",68),Jf()}if(2&e){var r=sm();Wf("disabled",r.requestSummaryForm.invalid||r.isSubmitting),dp(1),Wf("icon",r.farPaperPlane),dp(1),Wf("ngIf",!r.requestSummary.isRequestPaidNow||r.requestIsPaid),dp(1),Wf("ngIf",r.requestSummary.isRequestPaidNow&&!r.requestIsPaid),dp(1),Wf("ngIf",r.isSubmitting&&!r.isSubmittingSaveForLater)}}var xW,SW=function(){return["-"," "]},PW=((xW=function(){function e(t,n,r,i){is(this,e),this.currencyPipe=t,this.fb=n,this.globalsService=r,this.localeId=i,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.requestSummary={periodOfValidity:void 0,periodOfValidityUnit:void 0,permitCost:"",workStartDate:void 0,description:"",location:"",applicantName:"",applicantFullAddress:"",applicantCity:"",applicantPostalCode:"",applicantEmail:"",phoneNumber:"",email:"",documents:[],isRequestPaidNow:!1,pel_Gratuit:!1,opt_BlocSign:0,signature:"",isWorkStartDateShown:!0,isWorkDescriptionShown:!0,followUpModeEmail:!0,followUpModePhone:!1,followUpEmail:"",followUpPhone:"",followUpLanguage:"",consent:!1},this.isSubmittingSaveForLater=!1,this.signatureText="",this.farFile=ML,this.farPaperPlane=KL,this.farPhoneAlt=XL,this.farSave=iF,this.farSpinnerThird=aF,this.fieldsMaxLength={followUpEmail:200}}return as(e,[{key:"hasMultilingual",value:function(){var e;return null===(e=this.globalsService.getCityInfos())||void 0===e?void 0:e.multilingual}},{key:"ngOnInit",value:function(){var e=this;this.descriptionLabel=hj.RES_DESCRITPION,"UR"===this.codeModule&&(this.descriptionLabel="en"===this.localeId?hj.RES_NATURE_DEMANDE_EN:hj.RES_NATURE_DEMANDE_FR),this.dateDebutLabel="PA"===this.codeModule?"en"===this.localeId?hj.RES_DATE_OCCUPATION_EN:hj.RES_DATE_OCCUPATION_FR:"en"===this.localeId?hj.RES_DEBUT_TRAVAUX_EN:hj.RES_DEBUT_TRAVAUX_FR,this.questionModeCommunication=this.globalsService.getCustomResourceTextByCode("RES_QUESTION_MODE_COMMUNICATION"),""===this.questionModeCommunication&&(this.questionModeCommunication="en"===this.localeId?hj.RES_QUESTION_MODE_COMMUNICATION_EN:hj.RES_QUESTION_MODE_COMMUNICATION_FR),this.consentText=this.globalsService.getCustomResourceTextByCode("RES_CONSENTEMENT"),""===this.consentText&&(this.consentText="en"===this.localeId?hj.RES_CONSENTEMENT_EN:hj.RES_CONSENTEMENT_FR),this.consentText+=" *",this.requestSummaryForm=this.fb.group({followUpModeEmail:[this.requestSummary.followUpModeEmail],followUpEmail:["",[FS.required,FS.email,FS.maxLength(this.fieldsMaxLength.followUpEmail)]],followUpModePhone:[this.requestSummary.followUpModePhone],followUpPhone:[{value:"",disabled:!0},FS.required],followUpLanguage:[this.requestSummary.followUpLanguage?this.requestSummary.followUpLanguage:this.localeId],isSubmitted:[""],signature:[""],consent:[this.requestSummary.consent]},{validators:[this.validateAtLeastOneCommunicationMean]}),this.requestSummary.followUpModeEmail?(this.FollowUpEmail.setValue(null===this.requestSummary.followUpEmail||""===this.requestSummary.followUpEmail?this.requestSummary.email:this.requestSummary.followUpEmail),this.FollowUpEmail.enable()):this.FollowUpEmail.disable(),this.requestSummary.followUpModePhone?(this.FollowUpPhone.setValue(null===this.requestSummary.followUpPhone||""===this.requestSummary.followUpPhone?this.requestSummary.phoneNumber:this.requestSummary.followUpPhone),this.FollowUpPhone.enable()):this.FollowUpPhone.disable(),this.FollowUpModeEmail.valueChanges.subscribe(function(t){t?(e.FollowUpEmail.enable(),e.FollowUpEmail.setValue(null===e.requestSummary.followUpEmail||""===e.requestSummary.followUpEmail?e.requestSummary.email:e.requestSummary.followUpEmail)):(e.FollowUpEmail.disable(),e.FollowUpEmail.setValue("")),e.FollowUpEmail.updateValueAndValidity()}),this.FollowUpModePhone.valueChanges.subscribe(function(t){t?(e.FollowUpPhone.enable(),e.FollowUpPhone.setValue(null===e.requestSummary.followUpPhone||""===e.requestSummary.followUpPhone?e.requestSummary.phoneNumber:e.requestSummary.followUpPhone)):(e.FollowUpPhone.disable(),e.FollowUpPhone.setValue("")),e.FollowUpPhone.updateValueAndValidity()}),this.isReadOnlyMode&&(this.Consent.setValue(!0),this.Signature.setValue(!0),this.requestSummaryForm.disable())}},{key:"permitCostIsVisible",value:function(){return!0}},{key:"workStartDateIsVisible",value:function(){return!(void 0===this.requestSummary.workStartDate||!this.requestSummary.isWorkStartDateShown)}},{key:"periodOfValidityIsVisible",value:function(){return!(void 0===this.requestSummary.periodOfValidity||this.requestSummary.periodOfValidity<1)}},{key:"locationIsVisible",value:function(){return!0}},{key:"descriptionIsVisible",value:function(){return!!this.requestSummary.isWorkDescriptionShown}},{key:"applicantIsVisible",value:function(){return!0}},{key:"updatePermitFormsData",value:function(e){var t;if(this.requestSummary.documents=null===(t=e.documents)||void 0===t?void 0:t.listOfDocuments,e.permitType.pel_Gratuit?(this.requestSummary.permitCost="en"===this.localeId?"Free":"Gratuit",this.requestSummary.isRequestPaidNow=!1):(this.requestSummary.permitCost=e.permitType.montantPermis>0?this.currencyPipe.transform(e.permitType.montantPermis,"CAD","symbol-narrow","1.2-2"):"en"===this.localeId?"Variable amount":"Montant variable",3===e.permitType.typeCout&&e.permitType.fraisEtudeDemande>0&&1===e.permitType.payableApres?(this.requestSummary.permitCost+="en"===this.localeId?" + Application study cost ":" + Frais pour l'\xe9tude de la demande ",this.requestSummary.permitCost+=this.currencyPipe.transform(e.permitType.fraisEtudeDemande,"CAD","symbol-narrow","1.2-2"),this.requestSummary.isRequestPaidNow=!0):this.requestSummary.isRequestPaidNow=1===e.permitType.payableAvant&&0===e.permitType.payableApres),this.requestSummary.periodOfValidity=e.permitType.delaiValidite,this.requestSummary.periodOfValidityUnit=e.permitType.uniteDelai,this.requestSummary.opt_BlocSign=e.permitType.opt_BlocSign,e.permitType.signature){var n=e.permitType.signature.split("|");this.signatureText="en"===this.localeId&&n.length>1?n[1]+" *":n[0]+" *"}this.requestSummary.isWorkDescriptionShown=1===e.permitType.opt_BlocTrav,this.requestSummary.isWorkStartDateShown=1===e.permitType.opt_DateDebut,e.summary&&(this.requestSummary.followUpModeEmail=e.summary.followUpModeEmail,this.requestSummary.followUpModePhone=e.summary.followUpModePhone,this.requestSummary.followUpEmail=e.summary.followUpEmail,this.requestSummary.followUpPhone=e.summary.followUpPhone,this.requestSummary.followUpLanguage=e.summary.followUpLanguage),this.setApplicantData(e.applicant),"UR"===e.requestType.codeModule?this.setUrDescriptionData(e.urDescription):"PL"===e.requestType.codeModule?this.setPlDescriptionData(e.plDescription):this.setWorkDescriptionData(e.workDescription),this.setPropertyData(e.property)}},{key:"setApplicantData",value:function(e){this.requestSummary.applicantName=e.applicantFirstName+(e.applicantLastName?" "+e.applicantLastName:""),this.requestSummary.applicantFullAddress=e.applicantAddress.address,this.requestSummary.applicantCity=e.applicantAddress.city,this.requestSummary.applicantPostalCode=e.applicantAddress.zipCode,this.requestSummary.applicantEmail=e.applicantEmail,this.requestSummary.email=e.applicantEmail,this.requestSummary.phoneNumber=e.applicantPhoneNumber}},{key:"setWorkDescriptionData",value:function(e){void 0!==e&&(this.requestSummary.description=e.workDescriptionGroup.workDescription,this.requestSummary.workStartDate=e.workDescriptionGroup.workStartDate)}},{key:"setUrDescriptionData",value:function(e){void 0!==e&&(this.requestSummary.description=e.urDescriptionGroup.urDescription)}},{key:"setPlDescriptionData",value:function(e){void 0!==e&&(this.requestSummary.description=e.plDescriptionGroup.plDescription)}},{key:"setPropertyData",value:function(e){var t,n,r,i,o,a,s,l;switch(e.searchMode){case"address":this.requestSummary.location=(null===(t=e.addressGroup)||void 0===t?void 0:t.civicNumber)?e.addressGroup.civicNumber+((null===(r=null===(n=e.addressGroup)||void 0===n?void 0:n.searchStreet)||void 0===r?void 0:r.voieComplet)?" "+e.addressGroup.searchStreet.voieComplet:""):(null===(o=null===(i=e.addressGroup)||void 0===i?void 0:i.searchStreet)||void 0===o?void 0:o.voieComplet)?e.addressGroup.searchStreet.voieComplet:"";break;case"registrationNumber":this.requestSummary.location=(null===(a=e.registrationNumberGroup)||void 0===a?void 0:a.searchRegistrationNumber)?("en"===this.localeId?"Registration n\xb0 ":"N\xb0 de matricule ")+e.registrationNumberGroup.searchRegistrationNumber:"";break;case"landNumber":this.requestSummary.location=(null===(l=null===(s=e.landNumberGroup)||void 0===s?void 0:s.searchLandNumber)||void 0===l?void 0:l.lotReno)?("en"===this.localeId?"Land n\xb0 ":"N\xb0 de lot ")+e.landNumberGroup.searchLandNumber.lotReno:""}}},{key:"saveRequestForLater",value:function(){this.isSubmittingSaveForLater=!0,this.stepSubmit.emit({followUpEmail:this.FollowUpEmail.value,followUpModeEmail:this.FollowUpModeEmail.value,followUpPhone:this.FollowUpPhone.value,followUpModePhone:this.FollowUpModePhone.value,followUpLanguage:this.FollowUpLanguage.value,isSubmitted:!1})}},{key:"submitRequest",value:function(){this.isSubmittingSaveForLater=!1,this.Consent.setValidators([FS.requiredTrue]),this.Consent.updateValueAndValidity(),1===this.requestSummary.opt_BlocSign&&(this.Signature.setValidators([FS.requiredTrue]),this.Signature.updateValueAndValidity()),this.requestSummaryForm.valid&&this.stepSubmit.emit({followUpEmail:this.FollowUpEmail.value,followUpModeEmail:this.FollowUpModeEmail.value,followUpPhone:this.FollowUpPhone.value,followUpModePhone:this.FollowUpModePhone.value,followUpLanguage:this.FollowUpLanguage.value,isSubmitted:!0})}},{key:"getListOfDocuments",value:function(){return this.requestSummary.documents?this.requestSummary.documents:[]}},{key:"validateAtLeastOneCommunicationMean",value:function(e){if(e){var t=e.get("followUpModeEmail").value,n=e.get("followUpModePhone").value;if(!t&&!n)return{noCommunication:!0}}return null}},{key:"requestFormsData",set:function(e){this.updatePermitFormsData(e)}},{key:"FollowUpModeEmail",get:function(){return this.requestSummaryForm.get("followUpModeEmail")}},{key:"FollowUpEmail",get:function(){return this.requestSummaryForm.get("followUpEmail")}},{key:"FollowUpModePhone",get:function(){return this.requestSummaryForm.get("followUpModePhone")}},{key:"FollowUpPhone",get:function(){return this.requestSummaryForm.get("followUpPhone")}},{key:"FollowUpLanguage",get:function(){return this.requestSummaryForm.get("followUpLanguage")}},{key:"Signature",get:function(){return this.requestSummaryForm.get("signature")}},{key:"Consent",get:function(){return this.requestSummaryForm.get("consent")}}]),e}()).\u0275fac=function(e){return new(e||xW)(Qf(sw),Qf(_k),Qf(zq),Qf(Ry))},xW.\u0275cmp=zl({type:xW,selectors:[["pel-request-permit-summary"]],inputs:{requestFormsData:"requestFormsData",requestIsPaid:"requestIsPaid",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting",codeModule:"codeModule"},outputs:{stepSubmit:"stepSubmit"},decls:53,vars:35,consts:function(){var e,t,n,r,i,o,a,s,l,u,c,d,h,p;return e="Communication",t="Courriel",n="T\xE9l\xE9phone",r="* Champs obligatoires",i="Co\xFBt",o="D\xE9lai de validit\xE9",a=" \xE0 compter de la date d'\xE9mission ",s=Ng(s="{VAR_PLURAL, plural, =1 {1 mois} other {{INTERPOLATION} mois}}",{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),l=" " + s + " ",u=Ng(u="{VAR_PLURAL, plural, =1 {1 jour} other {{INTERPOLATION} jours}}",{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),c=" " + u + " ",d="Emplacement",h="Demandeur",p=Ng(p="{VAR_PLURAL, plural, =1 {Document } other {Documents }}",{VAR_PLURAL:"\ufffd0\ufffd"}),[[1,"mb-3"],[1,"row","pel-grid","cols-2"],["class","col-6",4,"ngIf"],["class","row pel-grid",4,"ngIf"],[3,"formGroup"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],e,[1,"form-row"],[1,"col-6"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","followUpModeEmailId","name","followUpModeEmail","formControlName","followUpModeEmail","data-testid","F937FFC8-765C-4C24-A98E-01571408D681",1,"custom-control-input",3,"readonly"],["for","followUpModeEmailId",1,"custom-control-label"],t,[1,"form-group","mt-1"],["type","email","id","followUpEmailId","name","followUpEmail","formControlName","followUpEmail","data-testid","5F068907-E1AA-4652-A9BA-8CD75967AEA4",1,"form-control",3,"readonly","maxlength"],[1,"invalid-feedback"],[4,"ngIf"],["type","checkbox","id","followUpModePhoneId","name","followUpModePhone","formControlName","followUpModePhone","data-testid","B4A795D7-8CF2-4072-89D5-7CD00C88E4BB",1,"custom-control-input",3,"readonly"],["for","followUpModePhoneId",1,"custom-control-label"],n,["type","tel","id","followUpPhoneId","name","followUpPhone","formControlName","followUpPhone","data-testid","2F221948-36AC-49F3-B068-3CA5BE088D4D","mask","000 000-0000",1,"form-control",3,"specialCharacters","readonly"],["id","err-comm","class","col-12 mb-3 text-danger",4,"ngIf"],["class","form-row",4,"ngIf"],[1,"form-group","col"],["type","checkbox","id","consentId","name","consent","formControlName","consent","data-testid","88bfdbf1-66e4-426e-83e1-2e5fbf72d3c8",1,"custom-control-input",3,"readonly"],["for","consentId",1,"custom-control-label"],[1,"text-muted","mt-2","mb-4"],r,["class","btn btn-secondary btn-big btn-rounded w-100","type","button","data-testid","37B6B2A9-D997-44D7-B3D5-89F8F9026AF7",3,"disabled","click",4,"ngIf"],["class","btn btn-primary btn-big btn-rounded w-100 mt-2","type","button","data-testid","81A8E72F-BD96-4DC2-90C6-E3DC536B4F60",3,"disabled","click",4,"ngIf"],[1,"mb-1"],i,["data-testid","11C3C860-4F3E-489C-9B13-7CEEAB3B02A0",1,"mb-0"],["data-testid","41939ED3-5684-4B5A-B275-B080B6B0C141",1,"mb-0"],o,["data-testid","14B73357-99E7-4EBD-A2DC-E6E4D23FD606",1,"mb-0"],a,l,c,d,["data-testid","AF4D2D8D-7A65-4F53-B7C6-2F2D8CD22A9E",1,"mb-0"],[1,"row","pel-grid"],[1,"col-12"],h,["data-testid","398E3D1A-9884-4027-9FB0-CED709E8B2FD",1,"mb-0"],["data-testid","5802FA88-A728-48DD-AD92-B9D0FEEF85C7",1,"req-desc","mb-0"],"" + "\ufffd#4\ufffd" + "" + p + "" + "\ufffd/#4\ufffd" + "",["data-testid","BB3AA5EC-2D3A-47CD-B41D-EAB555F96C45",1,"list-unstyled","pl-3","mb-0"],[4,"ngFor","ngForOf"],[1,"mr-2",3,"icon"]," Veuillez entrer une adresse courriel. "," Veuillez entrer une adresse courriel valide. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. ",["id","err-comm",1,"col-12","mb-3","text-danger"],"Veuillez fournir au moins un moyen de communication. ",[1,"d-block"],"Langue de correspondance",["type","button","data-testid","4E5114E0-B7B8-4F97-BC72-1F28B38761DD",1,"btn","mr-1",3,"ngClass","disabled","click"],["type"," button","data-testid","2BF21BF3-0E34-4F80-8B2C-8F81E26A1063",1,"btn",3,"ngClass","disabled","click"]," Vous devez confirmer votre consentement sur l'utilisation des donn\xE9es personnelles pour pouvoir soumettre votre demande. ",["type","checkbox","id","signatureId","name","signature","formControlName","signature","data-testid","c6a72246-2a1f-4e8c-9ee0-84984891abef",1,"custom-control-input",3,"readonly"],["for","signatureId",1,"custom-control-label"]," Vous devez confirmer avoir lu et accept\xE9 les conditions et exigences en cochant la case ci-contre avant de continuer. ",["type","button","data-testid","37B6B2A9-D997-44D7-B3D5-89F8F9026AF7",1,"btn","btn-secondary","btn-big","btn-rounded","w-100",3,"disabled","click"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"],["type","button","data-testid","81A8E72F-BD96-4DC2-90C6-E3DC536B4F60",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],"Soumettre","Soumettre et payer "]},template:function(e,t){1&e&&($f(0,"section",0),$f(1,"div",1),Uf(2,KQ,6,1,"div",2),Uf(3,ZQ,7,5,"div",2),Uf(4,tW,9,2,"div",2),Uf(5,nW,6,1,"div",2),Jf(),Uf(6,rW,13,5,"div",3),Uf(7,iW,7,2,"div",3),Uf(8,aW,7,2,"div",3),Jf(),$f(9,"form",4),$f(10,"h5",5),$f(11,"div",6),Yf(12,"fa-icon",7),Jf(),$f(13,"span"),Rg(14,8),Jf(),Jf(),$f(15,"p"),Cm(16),Jf(),$f(17,"div",9),$f(18,"div",10),$f(19,"div",11),Yf(20,"input",12),$f(21,"label",13),Rg(22,14),Jf(),Jf(),$f(23,"div",15),Yf(24,"input",16),$f(25,"div",17),Uf(26,sW,2,0,"div",18),Uf(27,lW,2,0,"div",18),Jf(),Jf(),Jf(),$f(28,"div",10),$f(29,"div",11),Yf(30,"input",19),$f(31,"label",20),Rg(32,21),Jf(),Jf(),$f(33,"div",15),Yf(34,"input",22),$f(35,"div",17),Uf(36,uW,2,0,"div",18),Uf(37,cW,2,0,"div",18),Jf(),Jf(),Jf(),Uf(38,dW,2,0,"small",23),Jf(),Uf(39,pW,10,10,"div",24),$f(40,"div",9),$f(41,"div",25),$f(42,"div",11),Yf(43,"input",26),$f(44,"label",27),Cm(45),Jf(),$f(46,"div",17),Uf(47,fW,2,0,"div",18),Jf(),Jf(),Jf(),Jf(),Uf(48,gW,8,5,"div",24),$f(49,"p",28),Rg(50,29),Jf(),Uf(51,yW,5,3,"button",30),Uf(52,CW,5,5,"button",31),Jf()),2&e&&(dp(2),Wf("ngIf",t.permitCostIsVisible()),dp(1),Wf("ngIf",t.workStartDateIsVisible()),dp(1),Wf("ngIf",t.periodOfValidityIsVisible()),dp(1),Wf("ngIf",t.locationIsVisible()),dp(1),Wf("ngIf",t.applicantIsVisible()),dp(1),Wf("ngIf",t.descriptionIsVisible()),dp(1),Wf("ngIf",t.getListOfDocuments().length>0),dp(1),Wf("formGroup",t.requestSummaryForm),dp(3),Wf("icon",t.farPhoneAlt),dp(4),xm(t.questionModeCommunication),dp(4),Wf("readonly",t.isReadOnlyMode),dp(4),gm("is-invalid",t.FollowUpEmail.touched&&!t.FollowUpEmail.valid&&!t.FollowUpEmail.disabled),Wf("readonly",t.isReadOnlyMode)("maxlength",t.fieldsMaxLength.followUpEmail),dp(2),Wf("ngIf",null==t.FollowUpEmail.errors?null:t.FollowUpEmail.errors.required),dp(1),Wf("ngIf",null==t.FollowUpEmail.errors?null:t.FollowUpEmail.errors.email),dp(3),Wf("readonly",t.isReadOnlyMode),dp(4),gm("is-invalid",t.FollowUpPhone.touched&&!t.FollowUpPhone.valid&&!t.FollowUpPhone.disabled),Wf("specialCharacters",Qv(34,SW))("readonly",t.isReadOnlyMode),dp(2),Wf("ngIf",null==t.FollowUpPhone.errors?null:t.FollowUpPhone.errors.required),dp(1),Wf("ngIf",null==t.FollowUpPhone.errors?null:t.FollowUpPhone.errors.mask),dp(1),Wf("ngIf",t.requestSummaryForm.hasError("noCommunication")),dp(1),Wf("ngIf",t.hasMultilingual()),dp(4),gm("is-invalid",null==t.Consent.errors?null:t.Consent.errors.required),Wf("readonly",t.isReadOnlyMode),dp(2),xm(t.consentText),dp(2),Wf("ngIf",null==t.Consent.errors?null:t.Consent.errors.required),dp(1),Wf("ngIf",1===t.requestSummary.opt_BlocSign&&""!==t.signatureText),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[M_,XP,lP,nk,DM,AS,sP,gk,OS,yk,QR,L_,D_],pipes:[aw],styles:[".pel-grid[_ngcontent-%COMP%]:first-child{margin-top:-1rem}.req-desc[_ngcontent-%COMP%]{white-space:pre-wrap}#err-comm[_ngcontent-%COMP%]{margin-top:-.75rem}"]}),xW);function kW(e,t){1&e&&(Kf(0),$f(1,"content-loader",21),cc(),Yf(2,"rect",22),Jf(),Zf())}function EW(e,t){if(1&e&&($f(0,"p",23),Cm(1),Jf()),2&e){var n=sm(2);dp(1),xm(n.paymentReference)}}function AW(e,t){1&e&&(Kf(0),$f(1,"content-loader",21),cc(),Yf(2,"rect",22),Jf(),Zf())}function IW(e,t){if(1&e&&($f(0,"p",23),Cm(1),Jf()),2&e){var n=sm(2);dp(1),xm(n.processorName)}}function TW(e,t){if(1&e&&(Kf(0),$f(1,"h3",12),Yf(2,"fa-icon",13),Kf(3),Rg(4,14),Zf(),Jf(),$f(5,"p",15),Rg(6,16),Jf(),Uf(7,kW,3,0,"ng-container",17),Uf(8,EW,2,1,"ng-template",null,18,Cy),$f(10,"p",15),Rg(11,19),Jf(),Uf(12,AW,3,0,"ng-container",17),Uf(13,IW,2,1,"ng-template",null,20,Cy),Zf()),2&e){var n=Hf(9),r=Hf(14),i=sm();dp(2),Wf("icon",i.farCheck),dp(5),Wf("ngIf",""===i.paymentReference)("ngIfElse",n),dp(5),Wf("ngIf",""===i.processorName)("ngIfElse",r)}}function OW(e,t){if(1&e&&($f(0,"h3",24),Yf(1,"fa-icon",13),Kf(2),Rg(3,25),Zf(),Jf()),2&e){var n=sm();dp(1),Wf("icon",n.farExclamationCircle)}}function RW(e,t){if(1&e&&($f(0,"div",26),$f(1,"h3"),Yf(2,"fa-icon",13),Kf(3),Rg(4,27),Zf(),Jf(),$f(5,"h6"),Rg(6,28),Jf(),Jf()),2&e){var n=sm();dp(2),Wf("icon",n.farExclamationCircle)}}function VW(e,t){1&e&&(Kf(0),Rg(1,30),Zf())}function DW(e,t){1&e&&(Kf(0),Rg(1,31),Zf())}function NW(e,t){if(1&e&&($f(0,"h3",24),Yf(1,"fa-icon",13),Uf(2,VW,2,0,"ng-container",29),Uf(3,DW,2,0,"ng-container",29),Jf()),2&e){var n=sm();dp(1),Wf("icon",n.farCheck),dp(1),Wf("ngIf",n.isSubmitted),dp(1),Wf("ngIf",!n.isSubmitted)}}function LW(e,t){1&e&&(Kf(0),Rg(1,32),Zf())}function FW(e,t){1&e&&(Kf(0),$f(1,"p"),Rg(2,33),Jf(),Zf())}function MW(e,t){1&e&&(Kf(0),Rg(1,34),Zf())}function qW(e,t){if(1&e){var n=Xf();Kf(0),Tg(1,35),$f(2,"a",36),nm("click",function(){return Nu(n),sm().retryPayment()}),Jf(),Og(),Zf()}}function jW(e,t){1&e&&(Kf(0),Rg(1,37),Zf())}function BW(e,t){if(1&e&&($f(0,"section",38),$f(1,"label",39),Rg(2,40),Jf(),$f(3,"h6",41),Cm(4),Jf(),Yf(5,"hr"),$f(6,"label",39),Rg(7,42),Jf(),$f(8,"h6",43),Cm(9),Jf(),Jf()),2&e){var n=sm();dp(4),xm(n.followUpNumber),dp(5),xm(n.getApplicantName())}}function zW(e,t){if(1&e&&($f(0,"p",44),Rg(1,45),Jf()),2&e){var n=sm();dp(1),Vg(n.getCityName()),Dg(1)}}function UW(e,t){if(1&e){var n=Xf();$f(0,"button",46),nm("click",function(){return Nu(n),sm().retryPayment()}),Yf(1,"fa-icon",47),Kf(2),Rg(3,48),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farRedo)}}function HW(e,t){if(1&e){var n=Xf();$f(0,"button",49),nm("click",function(){return Nu(n),sm().onCompleted()}),Yf(1,"fa-icon",47),Kf(2),Rg(3,50),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farPlusCircle)}}function QW(e,t){if(1&e){var n=Xf();$f(0,"button",51),nm("click",function(){return Nu(n),sm().goBackToFollowUp()}),Yf(1,"fa-icon",47),Kf(2),Rg(3,52),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farLongArrowLeft)}}function WW(e,t){1&e&&($f(0,"button",53),$f(1,"content-loader",54),cc(),Yf(2,"rect",55),Yf(3,"rect",56),Jf(),Jf())}var GW,$W=function(e){return e[e.SaveSuccess=0]="SaveSuccess",e[e.SubmitSuccess=1]="SubmitSuccess",e[e.SubmitSuccessEmail=2]="SubmitSuccessEmail",e[e.TryAgainNow=3]="TryAgainNow",e[e.TryAgainEmail=4]="TryAgainEmail",e}({}),JW=((GW=function(){function e(t,n,r,i){is(this,e),this.globals=t,this.pelService=n,this.router=r,this.localeId=i,this.stepSubmit=new ty,this.viewStateEnum=HM,this.paymentStatusEnum=UM,this.completeMessageDisplayEnum=$W,this.getRequestSub=new ps,this.getRequestStackSize=0,this.followUpStatus=HM.Empty,this.farCheck=SL,this.farExclamationCircle=DL,this.farPlusCircle=tF,this.farRedo=rF,this.farLongArrowLeft=GL}return as(e,[{key:"ngOnInit",value:function(){var e=this;this.processorName="",this.pelService.getCityInfos().subscribe(function(t){t.result&&(e.processorName=t.result.processorDescription)}),this.paymentStatus!==UM.Accepted&&void 0!==this.paymentStatus||(void 0===this.globals.getCurrentFollowUpRequest()?(this.followUpStatus=HM.Loading,this.unlockGoToFollowUp()):this.followUpStatus=HM.Ready)}},{key:"isVoilaWidget",value:function(){return this.globals.isVoilaWidget()}},{key:"isExternalWidget",value:function(){return this.globals.isExternalWidget()}},{key:"ngOnDestroy",value:function(){this.getRequestSub.unsubscribe()}},{key:"retryPayment",value:function(){var e=this,t={numeroSuivi:this.followUpNumber,nomRequerant:this.getApplicantName(),idCitoyen:null},n="";if(localStorage.getItem("originFullURL")){var r="/".concat(this.localeId,"/create");window.location.origin.match("localhost")&&(r="/create"),n=localStorage.getItem("originFullURL").includes("?")?localStorage.getItem("originFullURL")+"&pelV2Url="+encodeURIComponent(window.location.origin+r):localStorage.getItem("originFullURL")+"?pelV2Url="+encodeURIComponent(window.location.origin+r),this.isVoilaWidget()?n+=encodeURIComponent("?display=voila"):this.isExternalWidget()&&(n+=encodeURIComponent("?display=external"))}else n="/".concat(this.localeId,"/create"),this.isVoilaWidget()?n+=encodeURIComponent("?display=voila"):this.isExternalWidget()&&(n+=encodeURIComponent("?display=external"));this.pelService.createRequestPayment(t,n).subscribe(function(t){var n;(null===(n=null==t?void 0:t.result)||void 0===n?void 0:n.redirectUrl)&&(e.globals.getIsInIFrame?window.parent.location.href=t.result.redirectUrl:window.location.href=t.result.redirectUrl)})}},{key:"unlockGoToFollowUp",value:function(){var e=this;if(console.log("Nombre de passe : "+this.getRequestStackSize.toString()),this.getRequestStackSize>=10&&(this.followUpStatus=HM.Error),this.followUpStatus===HM.Loading){this.getRequestSub.unsubscribe();var t={numeroSuivi:this.followUpNumber,nomRequerant:this.getApplicantName(),idCitoyen:null};this.getRequestSub=this.pelService.getRequestByFollowUpNumberLastName(t).subscribe(function(t){t.result.soumise||!e.isSubmitted?(e.globals.setCurrentFollowUpRequest(t.result),e.followUpStatus=HM.Ready):(e.getRequestStackSize++,setTimeout(function(){e.unlockGoToFollowUp()},500))},function(t){e.followUpStatus=HM.Error})}}},{key:"isFollowUpDataAvailable",value:function(){var e,t;return(null===(e=this.followUpNumber)||void 0===e?void 0:e.length)>0&&(null===(t=this.getApplicantName())||void 0===t?void 0:t.length)>0}},{key:"isFollowUpLinkAvailable",value:function(){return this.isSubmitted&&this.followUpStatus===HM.Ready}},{key:"getCompleteMessageDisplay",value:function(){return void 0===this.paymentStatus||this.paymentStatus===UM.Accepted?this.isSubmitted?this.isFollowUpDataAvailable()?$W.SubmitSuccess:$W.SubmitSuccessEmail:$W.SaveSuccess:this.isFollowUpDataAvailable()?$W.TryAgainNow:$W.TryAgainEmail}},{key:"getApplicantName",value:function(){var e;return(null===(e=this.applicantName)||void 0===e?void 0:e.length)>0?this.applicantName:sessionStorage.getItem(VB.PEL_SESSIONSTORAGE_NAME_KEY)}},{key:"getCityName",value:function(){return this.globals.getLocaleCityName()}},{key:"onCompleted",value:function(){this.stepSubmit.emit()}},{key:"goBackToFollowUp",value:function(){this.router.navigate(["/request"])}}]),e}()).\u0275fac=function(e){return new(e||GW)(Qf(zq),Qf(Bq),Qf(JN),Qf(Ry))},GW.\u0275cmp=zl({type:GW,selectors:[["pel-request-permit-complete"]],inputs:{applicantName:"applicantName",followUpNumber:"followUpNumber",isSubmitted:"isSubmitted",paymentStatus:"paymentStatus",paymentReference:"paymentReference"},outputs:{stepSubmit:"stepSubmit"},decls:17,vars:16,consts:function(){return[["data-testid","469D7930-059D-44AF-A52E-CE50B7A7DC31",3,"ngSwitch"],[4,"ngSwitchCase"],["class","text-center text-primary mt-2 mb-4",4,"ngSwitchCase"],["class","text-center text-danger mt-2 mb-4",4,"ngSwitchCase"],["class","text-center text-primary mt-2 mb-4",4,"ngSwitchDefault"],["data-testid","C4ACCB34-D61A-4100-A073-8ED37A50F3B6",1,"text-center",3,"ngSwitch"],["class","panel text-center my-3",4,"ngIf"],["class","text-center my-3",4,"ngIf"],["class","btn btn-primary btn-big btn-rounded w-100 mt-2","type","button","data-testid","3FE965A6-EA67-43CE-95D8-168941C68F11",3,"click",4,"ngIf"],["class","btn btn-primary btn-big btn-rounded w-100 mt-2","type","button","data-testid","BDD33B10-D41D-441C-B23D-1C3552E368EA",3,"click",4,"ngIf"],["type","button","class","btn btn-primary btn-big btn-rounded w-100 mt-2","data-testid","cf77fe31-d786-48d2-94ff-a461426d667a",3,"click",4,"ngIf"],["type","button","disabled","","class","btn btn-primary btn-big btn-rounded w-100 mt-2",4,"ngIf"],[1,"text-center","text-success","mt-2","mb-4"],["size","2x",1,"d-block","mb-2",3,"icon"],"Demande pay\xE9e",[1,"text-muted","mb-0","text-center"],"Num\xE9ro de confirmation",[4,"ngIf","ngIfElse"],["PaymentRef",""],"Cette charge appara\xEEtra sur votre relev\xE9 de compte de cr\xE9dit sous le nom",["ProcessorName",""],["viewBox","0 0 83 13","speed","2","backgroundColor","#f5f5f5","foregroundColor","#ecebeb"],["x","0","y","0","rx","1","ry","1","width","83","height","5"],[1,"text-primary","font-weight-medium","text-center"],[1,"text-center","text-primary","mt-2","mb-4"],"Paiement annul\xE9",[1,"text-center","text-danger","mt-2","mb-4"],"\xC9chec du paiement"," Veuillez vous assurer que vos informations de paiement soient correctes, puis r\xE9essayez.",[4,"ngIf"],"Demande soumise","Demande enregistr\xE9e"," Votre demande a bien \xE9t\xE9 enregistr\xE9e. Veuillez utiliser les informations ci-dessous pour revenir la modifier plus tard via le menu de suivi d'une demande, dans un d\xE9lai maximal de 7 jours. Vous recevrez \xE9galement une copie de ces informations par courriel. ","Votre demande a bien \xE9t\xE9 soumise et sera trait\xE9e d\xE8s que possible. Veuillez utiliser les informations ci-dessous pour en faire le suivi. Vous recevrez \xE9galement une copie de ces informations par courriel."," Votre demande a bien \xE9t\xE9 soumise et sera trait\xE9e d\xE8s que possible. Vous recevrez sous peu un courriel vous permettant d'en faire le suivi. "," Veuillez " + "\ufffd#2\ufffd" + "r\xE9essayer" + "\ufffd/#2\ufffd" + " ou noter les informations de suivi ci-dessous pour r\xE9essayer plus tard, dans un d\xE9lai maximal de 7 jours. Votre demande ne sera pas trait\xE9e avant la r\xE9ception de votre paiement. ",["href","javascript:void(0)",1,"alert-link",3,"click"]," Vous recevrez sous peu un courriel vous permettant de faire le suivi de votre demande. Vous pourrez ensuite r\xE9essayer le paiement, dans un d\xE9lai maximal de 7 jours. Votre demande ne sera pas trait\xE9e avant la r\xE9ception de votre paiement. ",[1,"panel","text-center","my-3"],[1,"text-muted","mb-0"],"Num\xE9ro de suivi",["id","followUpNumberID","data-testid","283E386C-62CA-4277-98C2-7E875C331094",1,"title"],"Nom de famille ou d'entreprise",["id","applicantLastNameID","data-testid","6B5D4518-9467-4222-8BA5-C9199900294D",1,"title"],[1,"text-center","my-3"]," Merci d'utiliser les services en ligne de " + "\ufffd0\ufffd" + "",["type","button","data-testid","3FE965A6-EA67-43CE-95D8-168941C68F11",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"click"],[1,"mr-2",3,"icon"],"R\xE9essayer le paiement",["type","button","data-testid","BDD33B10-D41D-441C-B23D-1C3552E368EA",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"click"],"Commencer une nouvelle demande",["type","button","data-testid","cf77fe31-d786-48d2-94ff-a461426d667a",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"click"],"Aller au suivi de la demande",["type","button","disabled","",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2"],["viewBox","0 0 112 6","speed","2","backgroundColor","#bdbdbd","foregroundColor","#eeeeee"],["x","0","y","0","rx","1","ry","1","width","8","height","6"],["x","12","y","0","rx","1","ry","1","width","100","height","6"]]},template:function(e,t){1&e&&($f(0,"div",0),Uf(1,TW,15,5,"ng-container",1),Uf(2,OW,4,1,"h3",2),Uf(3,RW,7,1,"div",3),Uf(4,NW,4,3,"h3",4),Jf(),$f(5,"p",5),Uf(6,LW,2,0,"ng-container",1),Uf(7,FW,3,0,"ng-container",1),Uf(8,MW,2,0,"ng-container",1),Uf(9,qW,3,0,"ng-container",1),Uf(10,jW,2,0,"ng-container",1),Jf(),Uf(11,BW,10,2,"section",6),Uf(12,zW,2,1,"p",7),Uf(13,UW,4,1,"button",8),Uf(14,HW,4,1,"button",9),Uf(15,QW,4,1,"button",10),Uf(16,WW,4,0,"button",11)),2&e&&(Wf("ngSwitch",t.paymentStatus),dp(1),Wf("ngSwitchCase",t.paymentStatusEnum.Accepted),dp(1),Wf("ngSwitchCase",t.paymentStatusEnum.Cancelled),dp(1),Wf("ngSwitchCase",t.paymentStatusEnum.Error),dp(2),Wf("ngSwitch",t.getCompleteMessageDisplay()),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.SaveSuccess),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.SubmitSuccess),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.SubmitSuccessEmail),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.TryAgainNow),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.TryAgainEmail),dp(1),Wf("ngIf",t.isFollowUpDataAvailable()),dp(1),Wf("ngIf",t.getCompleteMessageDisplay()!==t.completeMessageDisplayEnum.TryAgainNow&&t.getCompleteMessageDisplay()!==t.completeMessageDisplayEnum.TryAgainEmail),dp(1),Wf("ngIf",t.getCompleteMessageDisplay()===t.completeMessageDisplayEnum.TryAgainNow),dp(1),Wf("ngIf",t.getCompleteMessageDisplay()!==t.completeMessageDisplayEnum.TryAgainNow),dp(1),Wf("ngIf",t.isFollowUpLinkAvailable()),dp(1),Wf("ngIf",t.isSubmitted&&t.followUpStatus===t.viewStateEnum.Loading))},directives:[W_,G_,$_,M_,DM,Kq],styles:["content-loader[_ngcontent-%COMP%]{display:block;width:256px;margin:0 auto}"]}),GW);function YW(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function KW(e,t){return function(n,r){t(n,r,e)}}function ZW(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function XW(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(VZ){o(VZ)}}function s(e){try{l(r.throw(e))}catch(VZ){o(VZ)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function eG(e,t,n){return n?eG(e,t).pipe(Ms(function(e){return us(e)?n.apply(void 0,Ha(e)):n(e)})):new ws(function(n){var r,i=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.next(1===t.length?t[0]:t)};try{r=e(i)}catch(o){return void n.error(o)}if(Za(t))return function(){return t(i,r)}})}var tG=function(){function e(t){is(this,e),this.notifier=t}return as(e,[{key:"call",value:function(e,t){var n=new nG(e),r=t.subscribe(n);return r.add(Ls(n,this.notifier)),r}}]),e}(),nG=function(e){Ka(n,e);var t=Xa(n);function n(){var e;return is(this,n),(e=t.apply(this,arguments)).hasValue=!1,e}return as(n,[{key:"_next",value:function(e){this.value=e,this.hasValue=!0}},{key:"notifyNext",value:function(e,t,n,r,i){this.emitValue()}},{key:"notifyComplete",value:function(){this.emitValue()}},{key:"emitValue",value:function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))}}]),n}(Fs);function rG(e){return function(t){return t.lift(new mG(e))}}var iG,oG,aG,sG,lG,uG,cG,dG,hG,pG,fG,mG=function(){function e(t){is(this,e),this.total=t}return as(e,[{key:"call",value:function(e,t){return t.subscribe(new gG(e,this.total))}}]),e}(),gG=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e)).total=r,i.count=0,i}return as(n,[{key:"_next",value:function(e){++this.count>this.total&&this.destination.next(e)}}]),n}(gs),vG=["*"],yG=((lG=function e(){is(this,e)}).\u0275fac=function(e){return new(e||lG)},lG.\u0275prov=dl({token:lG,factory:function(e){return lG.\u0275fac(e)}}),lG),bG=((sG=function(){function e(t,n){var r=this;is(this,e),this._loader=t,this._zone=n,this._map=new Promise(function(e){r._mapResolver=e})}return as(e,[{key:"createMap",value:function(e,t){var n=this;return this._zone.runOutsideAngular(function(){return n._loader.load().then(function(){var r=new google.maps.Map(e,t);n._mapResolver(r)})})}},{key:"setMapOptions",value:function(e){this._map.then(function(t){t.setOptions(e)})}},{key:"createMarker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this._map.then(function(n){return t&&(e.map=n),new google.maps.Marker(e)})}},{key:"createInfoWindow",value:function(e){return this._map.then(function(){return new google.maps.InfoWindow(e)})}},{key:"createCircle",value:function(e){return this._map.then(function(t){return"string"==typeof e.strokePosition&&(e.strokePosition=google.maps.StrokePosition[e.strokePosition]),e.map=t,new google.maps.Circle(e)})}},{key:"createRectangle",value:function(e){return this._map.then(function(t){return e.map=t,new google.maps.Rectangle(e)})}},{key:"createPolyline",value:function(e){return this.getNativeMap().then(function(t){var n=new google.maps.Polyline(e);return n.setMap(t),n})}},{key:"createPolygon",value:function(e){return this.getNativeMap().then(function(t){var n=new google.maps.Polygon(e);return n.setMap(t),n})}},{key:"createDataLayer",value:function(e){return this._map.then(function(t){var n=new google.maps.Data(e);return n.setMap(t),n})}},{key:"createTransitLayer",value:function(e){return this._map.then(function(t){var n=new google.maps.TransitLayer;return n.setMap(e.visible?t:null),n})}},{key:"createBicyclingLayer",value:function(e){return this._map.then(function(t){var n=new google.maps.BicyclingLayer;return n.setMap(e.visible?t:null),n})}},{key:"containsLocation",value:function(e,t){return google.maps.geometry.poly.containsLocation(e,t)}},{key:"subscribeToMapEvent",value:function(e){var t=this;return new ws(function(n){t._map.then(function(r){r.addListener(e,function(e){t._zone.run(function(){return n.next(e)})})})})}},{key:"clearInstanceListeners",value:function(){this._map.then(function(e){google.maps.event.clearInstanceListeners(e)})}},{key:"setCenter",value:function(e){return this._map.then(function(t){return t.setCenter(e)})}},{key:"getZoom",value:function(){return this._map.then(function(e){return e.getZoom()})}},{key:"getBounds",value:function(){return this._map.then(function(e){return e.getBounds()})}},{key:"getMapTypeId",value:function(){return this._map.then(function(e){return e.getMapTypeId()})}},{key:"setZoom",value:function(e){return this._map.then(function(t){return t.setZoom(e)})}},{key:"getCenter",value:function(){return this._map.then(function(e){return e.getCenter()})}},{key:"panTo",value:function(e){return this._map.then(function(t){return t.panTo(e)})}},{key:"panBy",value:function(e,t){return this._map.then(function(n){return n.panBy(e,t)})}},{key:"fitBounds",value:function(e,t){return this._map.then(function(n){return n.fitBounds(e,t)})}},{key:"panToBounds",value:function(e,t){return this._map.then(function(n){return n.panToBounds(e,t)})}},{key:"getNativeMap",value:function(){return this._map}},{key:"triggerMapEvent",value:function(e){return this._map.then(function(t){return google.maps.event.trigger(t,e)})}}]),e}()).\u0275fac=function(e){return new(e||sG)(md(yG),md(Hy))},sG.\u0275prov=dl({token:sG,factory:function(e){return sG.\u0275fac(e)}}),sG=YW([ZW("design:paramtypes",[yG,Hy])],sG)),_G=((aG=function(){function e(t){is(this,e),this._wrapper=t,this._layers=new Map}return as(e,[{key:"addTransitLayer",value:function(e,t){var n=this._wrapper.createTransitLayer(t);this._layers.set(e,n)}},{key:"addBicyclingLayer",value:function(e,t){var n=this._wrapper.createBicyclingLayer(t);this._layers.set(e,n)}},{key:"deleteLayer",value:function(e){var t=this;return this._layers.get(e).then(function(n){n.setMap(null),t._layers.delete(e)})}},{key:"toggleLayerVisibility",value:function(e,t){var n=this;return this._layers.get(e).then(function(e){return t.visible?n._wrapper.getNativeMap().then(function(t){e.setMap(t)}):void e.setMap(null)})}}]),e}()).\u0275fac=function(e){return new(e||aG)(md(bG))},aG.\u0275prov=dl({token:aG,factory:function(e){return aG.\u0275fac(e)}}),aG=YW([ZW("design:paramtypes",[bG])],aG)),wG=((oG=function(){function e(t,n){is(this,e),this._apiWrapper=t,this._zone=n,this._circles=new Map}return as(e,[{key:"addCircle",value:function(e){this._circles.set(e,this._apiWrapper.createCircle({center:{lat:e.latitude,lng:e.longitude},clickable:e.clickable,draggable:e.draggable,editable:e.editable,fillColor:e.fillColor,fillOpacity:e.fillOpacity,radius:e.radius,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokePosition:e.strokePosition,strokeWeight:e.strokeWeight,visible:e.visible,zIndex:e.zIndex}))}},{key:"removeCircle",value:function(e){var t=this;return this._circles.get(e).then(function(n){n.setMap(null),t._circles.delete(e)})}},{key:"setOptions",value:function(e,t){return this._circles.get(e).then(function(e){"string"==typeof t.strokePosition&&(t.strokePosition=google.maps.StrokePosition[t.strokePosition]),e.setOptions(t)})}},{key:"getBounds",value:function(e){return this._circles.get(e).then(function(e){return e.getBounds()})}},{key:"getCenter",value:function(e){return this._circles.get(e).then(function(e){return e.getCenter()})}},{key:"getRadius",value:function(e){return this._circles.get(e).then(function(e){return e.getRadius()})}},{key:"setCenter",value:function(e){return this._circles.get(e).then(function(t){return t.setCenter({lat:e.latitude,lng:e.longitude})})}},{key:"setEditable",value:function(e){return this._circles.get(e).then(function(t){return t.setEditable(e.editable)})}},{key:"setDraggable",value:function(e){return this._circles.get(e).then(function(t){return t.setDraggable(e.draggable)})}},{key:"setVisible",value:function(e){return this._circles.get(e).then(function(t){return t.setVisible(e.visible)})}},{key:"setRadius",value:function(e){return this._circles.get(e).then(function(t){return t.setRadius(e.radius)})}},{key:"getNativeCircle",value:function(e){return this._circles.get(e)}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){var i=null;return n._circles.get(t).then(function(t){i=t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})}),function(){null!==i&&i.remove()}})}}]),e}()).\u0275fac=function(e){return new(e||oG)(md(bG),md(Hy))},oG.\u0275prov=dl({token:oG,factory:function(e){return oG.\u0275fac(e)}}),oG=YW([ZW("design:paramtypes",[bG,Hy])],oG)),CG=((iG=function(){function e(t,n){is(this,e),this._wrapper=t,this._zone=n,this._layers=new Map}return as(e,[{key:"addDataLayer",value:function(e){var t=this,n=this._wrapper.createDataLayer({style:e.style}).then(function(n){return e.geoJson&&t.getDataFeatures(n,e.geoJson).then(function(e){return n.features=e}),n});this._layers.set(e,n)}},{key:"deleteDataLayer",value:function(e){var t=this;this._layers.get(e).then(function(n){n.setMap(null),t._layers.delete(e)})}},{key:"updateGeoJson",value:function(e,t){var n=this;this._layers.get(e).then(function(e){e.forEach(function(t){e.remove(t);var n=e.features.indexOf(t,0);n>-1&&e.features.splice(n,1)}),n.getDataFeatures(e,t).then(function(t){return e.features=t})})}},{key:"setDataOptions",value:function(e,t){this._layers.get(e).then(function(e){e.setControlPosition(t.controlPosition),e.setControls(t.controls),e.setDrawingMode(t.drawingMode),e.setStyle(t.style)})}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){n._layers.get(t).then(function(t){t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})})})}},{key:"getDataFeatures",value:function(e,t){return new Promise(function(n,r){if("object"==typeof t)try{n(e.addGeoJson(t))}catch(VZ){r(VZ)}else"string"==typeof t?e.loadGeoJson(t,null,n):r("Impossible to extract features from geoJson: wrong argument type")})}}]),e}()).\u0275fac=function(e){return new(e||iG)(md(bG),md(Hy))},iG.\u0275prov=dl({token:iG,factory:function(e){return iG.\u0275fac(e)}}),iG=YW([ZW("design:paramtypes",[bG,Hy])],iG)),xG=function e(){is(this,e)},SG=((dG=function(){function e(t){var n,r,i=this;is(this,e),this._boundsChangeSampleTime$=new ZR(200),this._includeInBounds$=new ZR(new Map),this.bounds$=zs(t.load()).pipe(Us(function(){return i._includeInBounds$}),(n=this._boundsChangeSampleTime$.pipe(pI(function(e){return sI(0,e)})),function(e){return e.lift(new tG(n))}),Ms(function(e){return i._generateBounds(e)}),(r={bufferSize:1,windowTime:void 0,refCount:!1,scheduler:void 0},function(e){return e.lift(function(e){var t,n,r=e.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=e.windowTime,a=void 0===o?Number.POSITIVE_INFINITY:o,s=e.refCount,l=e.scheduler,u=0,c=!1,d=!1;return function(e){u++,t&&!c||(c=!1,t=new AI(i,a,l),n=e.subscribe({next:function(e){t.next(e)},error:function(e){c=!0,t.error(e)},complete:function(){d=!0,n=void 0,t.complete()}}));var r=t.subscribe(this);this.add(function(){u--,r.unsubscribe(),n&&!d&&s&&0===u&&(n.unsubscribe(),n=void 0,t=void 0)})}}(r))}))}return as(e,[{key:"_generateBounds",value:function(e){var t=new google.maps.LatLngBounds;return e.forEach(function(e){return t.extend(e)}),t}},{key:"addToBounds",value:function(e){var t=this._createIdentifier(e);if(!this._includeInBounds$.value.has(t)){var n=this._includeInBounds$.value;n.set(t,e),this._includeInBounds$.next(n)}}},{key:"removeFromBounds",value:function(e){var t=this._includeInBounds$.value;t.delete(this._createIdentifier(e)),this._includeInBounds$.next(t)}},{key:"changeFitBoundsChangeSampleTime",value:function(e){this._boundsChangeSampleTime$.next(e)}},{key:"getBounds$",value:function(){return this.bounds$}},{key:"_createIdentifier",value:function(e){return"".concat(e.lat,"+").concat(e.lng)}}]),e}()).\u0275fac=function(e){return new(e||dG)(md(yG))},dG.\u0275prov=dl({token:dG,factory:function(e){return dG.\u0275fac(e)}}),dG=YW([ZW("design:paramtypes",[yG])],dG)),PG=((cG=function(){function e(t,n){is(this,e),this._mapsWrapper=t,this._zone=n,this._markers=new Map}return as(e,[{key:"convertAnimation",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null===e?null:this._mapsWrapper.getNativeMap().then(function(){return google.maps.Animation[e]}));case 1:case"end":return t.stop()}},t,this)}))}},{key:"deleteMarker",value:function(e){var t=this,n=this._markers.get(e);return null==n?Promise.resolve():n.then(function(n){return t._zone.run(function(){n.setMap(null),t._markers.delete(e)})})}},{key:"updateMarkerPosition",value:function(e){return this._markers.get(e).then(function(t){return t.setPosition({lat:e.latitude,lng:e.longitude})})}},{key:"updateTitle",value:function(e){return this._markers.get(e).then(function(t){return t.setTitle(e.title)})}},{key:"updateLabel",value:function(e){return this._markers.get(e).then(function(t){t.setLabel(e.label)})}},{key:"updateDraggable",value:function(e){return this._markers.get(e).then(function(t){return t.setDraggable(e.draggable)})}},{key:"updateIcon",value:function(e){return this._markers.get(e).then(function(t){return t.setIcon(e.iconUrl)})}},{key:"updateOpacity",value:function(e){return this._markers.get(e).then(function(t){return t.setOpacity(e.opacity)})}},{key:"updateVisible",value:function(e){return this._markers.get(e).then(function(t){return t.setVisible(e.visible)})}},{key:"updateZIndex",value:function(e){return this._markers.get(e).then(function(t){return t.setZIndex(e.zIndex)})}},{key:"updateClickable",value:function(e){return this._markers.get(e).then(function(t){return t.setClickable(e.clickable)})}},{key:"updateAnimation",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._markers.get(e);case 2:return t.t0=t.sent,t.next=5,this.convertAnimation(e.animation);case 5:t.t1=t.sent,t.t0.setAnimation.call(t.t0,t.t1);case 7:case"end":return t.stop()}},t,this)}))}},{key:"addMarker",value:function(e){var t=this,n=new Promise(function(n){return XW(t,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this._mapsWrapper,t.t1={lat:e.latitude,lng:e.longitude},t.t2=e.label,t.t3=e.draggable,t.t4=e.iconUrl,t.t5=e.opacity,t.t6=e.visible,t.t7=e.zIndex,t.t8=e.title,t.t9=e.clickable,t.next=12,this.convertAnimation(e.animation);case 12:return t.t10=t.sent,t.t11={position:t.t1,label:t.t2,draggable:t.t3,icon:t.t4,opacity:t.t5,visible:t.t6,zIndex:t.t7,title:t.t8,clickable:t.t9,animation:t.t10},t.abrupt("return",t.t0.createMarker.call(t.t0,t.t11).then(n));case 15:case"end":return t.stop()}},t,this)}))});this._markers.set(e,n)}},{key:"getNativeMarker",value:function(e){return this._markers.get(e)}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){n._markers.get(t).then(function(t){t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})})})}}]),e}()).\u0275fac=function(e){return new(e||cG)(md(bG),md(Hy))},cG.\u0275prov=dl({token:cG,factory:function(e){return cG.\u0275fac(e)}}),cG=YW([ZW("design:paramtypes",[bG,Hy])],cG)),kG=((uG=function(){function e(t,n,r){is(this,e),this._mapsWrapper=t,this._zone=n,this._markerManager=r,this._infoWindows=new Map}return as(e,[{key:"deleteInfoWindow",value:function(e){var t=this,n=this._infoWindows.get(e);return null==n?Promise.resolve():n.then(function(n){return t._zone.run(function(){n.close(),t._infoWindows.delete(e)})})}},{key:"setPosition",value:function(e){return this._infoWindows.get(e).then(function(t){return t.setPosition({lat:e.latitude,lng:e.longitude})})}},{key:"setZIndex",value:function(e){return this._infoWindows.get(e).then(function(t){return t.setZIndex(e.zIndex)})}},{key:"open",value:function(e){var t=this;return this._infoWindows.get(e).then(function(n){return null!=e.hostMarker?t._markerManager.getNativeMarker(e.hostMarker).then(function(e){return t._mapsWrapper.getNativeMap().then(function(t){return n.open(t,e)})}):t._mapsWrapper.getNativeMap().then(function(e){return n.open(e)})})}},{key:"close",value:function(e){return this._infoWindows.get(e).then(function(e){return e.close()})}},{key:"setOptions",value:function(e,t){return this._infoWindows.get(e).then(function(e){return e.setOptions(t)})}},{key:"addInfoWindow",value:function(e){var t={content:e.content,maxWidth:e.maxWidth,zIndex:e.zIndex,disableAutoPan:e.disableAutoPan};"number"==typeof e.latitude&&"number"==typeof e.longitude&&(t.position={lat:e.latitude,lng:e.longitude});var n=this._mapsWrapper.createInfoWindow(t);this._infoWindows.set(e,n)}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){n._infoWindows.get(t).then(function(t){t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})})})}}]),e}()).\u0275fac=function(e){return new(e||uG)(md(bG),md(Hy),md(PG))},uG.\u0275prov=dl({token:uG,factory:function(e){return uG.\u0275fac(e)}}),uG=YW([ZW("design:paramtypes",[bG,Hy,PG])],uG)),EG=0,AG=((fG=hG=function(){function e(t,n){is(this,e),this._infoWindowManager=t,this._el=n,this.isOpen=!1,this.infoWindowClose=new ty,this._infoWindowAddedToManager=!1,this._id=(EG++).toString()}return as(e,[{key:"ngOnInit",value:function(){this.content=this._el.nativeElement.querySelector(".agm-info-window-content"),this._infoWindowManager.addInfoWindow(this),this._infoWindowAddedToManager=!0,this._updateOpenState(),this._registerEventListeners()}},{key:"ngOnChanges",value:function(e){this._infoWindowAddedToManager&&((e.latitude||e.longitude)&&"number"==typeof this.latitude&&"number"==typeof this.longitude&&this._infoWindowManager.setPosition(this),e.zIndex&&this._infoWindowManager.setZIndex(this),e.isOpen&&this._updateOpenState(),this._setInfoWindowOptions(e))}},{key:"_registerEventListeners",value:function(){var e=this;this._infoWindowManager.createEventObservable("closeclick",this).subscribe(function(){e.isOpen=!1,e.infoWindowClose.emit()})}},{key:"_updateOpenState",value:function(){this.isOpen?this.open():this.close()}},{key:"_setInfoWindowOptions",value:function(e){var t={};Object.keys(e).filter(function(e){return-1!==hG._infoWindowOptionsInputs.indexOf(e)}).forEach(function(n){t[n]=e[n].currentValue}),this._infoWindowManager.setOptions(this,t)}},{key:"open",value:function(){return this._infoWindowManager.open(this)}},{key:"close",value:function(){var e=this;return this._infoWindowManager.close(this).then(function(){e.infoWindowClose.emit()})}},{key:"id",value:function(){return this._id}},{key:"toString",value:function(){return"AgmInfoWindow-"+this._id.toString()}},{key:"ngOnDestroy",value:function(){this._infoWindowManager.deleteInfoWindow(this)}}]),e}()).\u0275fac=function(e){return new(e||fG)(Qf(kG),Qf(Yg))},fG.\u0275cmp=zl({type:fG,selectors:[["agm-info-window"]],inputs:{isOpen:"isOpen",latitude:"latitude",longitude:"longitude",disableAutoPan:"disableAutoPan",zIndex:"zIndex",maxWidth:"maxWidth"},outputs:{infoWindowClose:"infoWindowClose"},features:[cu],ngContentSelectors:vG,decls:2,vars:0,consts:[[1,"agm-info-window-content"]],template:function(e,t){1&e&&(um(),$f(0,"div",0),cm(1),Jf())},encapsulation:2}),fG._infoWindowOptionsInputs=["disableAutoPan","maxWidth"],fG=hG=YW([ZW("design:paramtypes",[kG,Yg])],fG)),IG=((pG=function(){function e(t,n){is(this,e),this._wrapper=t,this._zone=n,this._layers=new Map}return as(e,[{key:"addKmlLayer",value:function(e){var t=this._wrapper.getNativeMap().then(function(t){return new google.maps.KmlLayer({clickable:e.clickable,map:t,preserveViewport:e.preserveViewport,screenOverlays:e.screenOverlays,suppressInfoWindows:e.suppressInfoWindows,url:e.url,zIndex:e.zIndex})});this._layers.set(e,t)}},{key:"setOptions",value:function(e,t){this._layers.get(e).then(function(e){return e.setOptions(t)})}},{key:"deleteKmlLayer",value:function(e){var t=this;this._layers.get(e).then(function(n){n.setMap(null),t._layers.delete(e)})}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){n._layers.get(t).then(function(t){t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})})})}}]),e}()).\u0275fac=function(e){return new(e||pG)(md(bG),md(Hy))},pG.\u0275prov=dl({token:pG,factory:function(e){return pG.\u0275fac(e)}}),pG=YW([ZW("design:paramtypes",[bG,Hy])],pG));function TG(e){var t=["insert_at","remove_at","set_at"];return eG(function(n){return t.map(function(t){return e.addListener(t,function(r,i){return n.apply(e,[{newArr:e.getArray(),evName:t,index:r,previous:i}])})})},function(e,t){return t.forEach(function(e){return e.remove()})})}var OG,RG,VG,DG,NG,LG,FG,MG,qG,jG,BG,zG,UG=((OG=function(){function e(t,n){is(this,e),this._mapsWrapper=t,this._zone=n,this._polygons=new Map}return as(e,[{key:"addPolygon",value:function(e){var t=this._mapsWrapper.createPolygon({clickable:e.clickable,draggable:e.draggable,editable:e.editable,fillColor:e.fillColor,fillOpacity:e.fillOpacity,geodesic:e.geodesic,paths:e.paths,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight,visible:e.visible,zIndex:e.zIndex});this._polygons.set(e,t)}},{key:"updatePolygon",value:function(e){var t=this,n=this._polygons.get(e);return null==n?Promise.resolve():n.then(function(n){return t._zone.run(function(){n.setPaths(e.paths)})})}},{key:"setPolygonOptions",value:function(e,t){return this._polygons.get(e).then(function(e){e.setOptions(t)})}},{key:"deletePolygon",value:function(e){var t=this,n=this._polygons.get(e);return null==n?Promise.resolve():n.then(function(n){return t._zone.run(function(){n.setMap(null),t._polygons.delete(e)})})}},{key:"getPath",value:function(e){return this._polygons.get(e).then(function(e){return e.getPath().getArray()})}},{key:"getPaths",value:function(e){return this._polygons.get(e).then(function(e){return e.getPaths().getArray().map(function(e){return e.getArray()})})}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){n._polygons.get(t).then(function(t){t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})})})}},{key:"createPathEventObservable",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._polygons.get(e);case 2:return n=t.sent.getPaths(),t.abrupt("return",TG(n).pipe(XE({newArr:n.getArray()}),pI(function(e){return $s.apply(void 0,Ha(e.newArr.map(function(t,n){return TG(t).pipe(Ms(function(t){return{parentMVEvent:e,chMVCEvent:t,pathIndex:n}}))}))).pipe(XE({parentMVEvent:e,chMVCEvent:null,pathIndex:null}))}),rG(1),Ms(function(e){var t,n=e.parentMVEvent,r=e.chMVCEvent,i=e.pathIndex;return r?(t={newArr:n.newArr.map(function(e){return e.getArray().map(function(e){return e.toJSON()})}),pathIndex:i,eventName:r.evName,index:r.index},r.previous&&(t.previous=r.previous)):(t={newArr:n.newArr.map(function(e){return e.getArray().map(function(e){return e.toJSON()})}),eventName:n.evName,index:n.index},n.previous&&(t.previous=n.previous.getArray())),t})));case 4:case"end":return t.stop()}},t,this)}))}}]),e}()).\u0275fac=function(e){return new(e||OG)(md(bG),md(Hy))},OG.\u0275prov=dl({token:OG,factory:function(e){return OG.\u0275fac(e)}}),OG=YW([ZW("design:paramtypes",[bG,Hy])],OG)),HG=((DG=RG=function(){function e(t,n){is(this,e),this._mapsWrapper=t,this._zone=n,this._polylines=new Map}return as(e,[{key:"addPolyline",value:function(e){var t=this,n=this._mapsWrapper.getNativeMap().then(function(){return[RG._convertPoints(e),RG._convertIcons(e)]}).then(function(n){var r=Ua(n,2),i=r[0],o=r[1];return t._mapsWrapper.createPolyline({clickable:e.clickable,draggable:e.draggable,editable:e.editable,geodesic:e.geodesic,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight,visible:e.visible,zIndex:e.zIndex,path:i,icons:o})});this._polylines.set(e,n)}},{key:"updatePolylinePoints",value:function(e){var t=this,n=RG._convertPoints(e),r=this._polylines.get(e);return null==r?Promise.resolve():r.then(function(e){return t._zone.run(function(){e.setPath(n)})})}},{key:"updateIconSequences",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){var n,r,i=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._mapsWrapper.getNativeMap();case 2:if(n=RG._convertIcons(e),null==(r=this._polylines.get(e))){t.next=5;break}return t.abrupt("return",r.then(function(e){return i._zone.run(function(){return e.setOptions({icons:n})})}));case 5:case"end":return t.stop()}},t,this)}))}},{key:"setPolylineOptions",value:function(e,t){return this._polylines.get(e).then(function(e){e.setOptions(t)})}},{key:"deletePolyline",value:function(e){var t=this,n=this._polylines.get(e);return null==n?Promise.resolve():n.then(function(n){return t._zone.run(function(){n.setMap(null),t._polylines.delete(e)})})}},{key:"getMVCPath",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._polylines.get(e);case 2:return t.abrupt("return",t.sent.getPath());case 3:case"end":return t.stop()}},t,this)}))}},{key:"getPath",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getMVCPath(e);case 2:return t.abrupt("return",t.sent.getArray());case 3:case"end":return t.stop()}},t,this)}))}},{key:"createEventObservable",value:function(e,t){var n=this;return new ws(function(r){n._polylines.get(t).then(function(t){t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})})})}},{key:"createPathEventObservable",value:function(e){return XW(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=TG,t.next=3,this.getMVCPath(e);case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}},t,this)}))}}],[{key:"_convertPoints",value:function(e){return e._getPoints().map(function(e){return{lat:e.latitude,lng:e.longitude}})}},{key:"_convertPath",value:function(e){var t=google.maps.SymbolPath[e];return"number"==typeof t?t:e}},{key:"_convertIcons",value:function(e){var t=e._getIcons().map(function(e){return{fixedRotation:e.fixedRotation,offset:e.offset,repeat:e.repeat,icon:{anchor:new google.maps.Point(e.anchorX,e.anchorY),fillColor:e.fillColor,fillOpacity:e.fillOpacity,path:RG._convertPath(e.path),rotation:e.rotation,scale:e.scale,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight}}});return t.forEach(function(e){Object.entries(e).forEach(function(t){var n=Ua(t,2),r=n[0];void 0===n[1]&&delete e[r]}),void 0!==e.icon.anchor.x&&void 0!==e.icon.anchor.y||delete e.icon.anchor}),t}}]),e}()).\u0275fac=function(e){return new(e||DG)(md(bG),md(Hy))},DG.\u0275prov=dl({token:DG,factory:function(e){return DG.\u0275fac(e)}}),DG=RG=YW([ZW("design:paramtypes",[bG,Hy])],DG)),QG=((VG=function(){function e(t,n){is(this,e),this._apiWrapper=t,this._zone=n,this._rectangles=new Map}return as(e,[{key:"addRectangle",value:function(e){this._rectangles.set(e,this._apiWrapper.createRectangle({bounds:{north:e.north,east:e.east,south:e.south,west:e.west},clickable:e.clickable,draggable:e.draggable,editable:e.editable,fillColor:e.fillColor,fillOpacity:e.fillOpacity,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokePosition:e.strokePosition,strokeWeight:e.strokeWeight,visible:e.visible,zIndex:e.zIndex}))}},{key:"removeRectangle",value:function(e){var t=this;return this._rectangles.get(e).then(function(n){n.setMap(null),t._rectangles.delete(e)})}},{key:"setOptions",value:function(e,t){return this._rectangles.get(e).then(function(e){return e.setOptions(t)})}},{key:"getBounds",value:function(e){return this._rectangles.get(e).then(function(e){return e.getBounds()})}},{key:"setBounds",value:function(e){return this._rectangles.get(e).then(function(t){return t.setBounds({north:e.north,east:e.east,south:e.south,west:e.west})})}},{key:"setEditable",value:function(e){return this._rectangles.get(e).then(function(t){return t.setEditable(e.editable)})}},{key:"setDraggable",value:function(e){return this._rectangles.get(e).then(function(t){return t.setDraggable(e.draggable)})}},{key:"setVisible",value:function(e){return this._rectangles.get(e).then(function(t){return t.setVisible(e.visible)})}},{key:"createEventObservable",value:function(e,t){var n=this;return ws.create(function(r){var i=null;return n._rectangles.get(t).then(function(t){i=t.addListener(e,function(e){return n._zone.run(function(){return r.next(e)})})}),function(){null!==i&&i.remove()}})}}]),e}()).\u0275fac=function(e){return new(e||VG)(md(bG),md(Hy))},VG.\u0275prov=dl({token:VG,factory:function(e){return VG.\u0275fac(e)}}),VG=YW([ZW("design:paramtypes",[bG,Hy])],VG)),WG=((LG=NG=function(){function e(t,n,r,i){is(this,e),this._elem=t,this._mapsWrapper=n,this._fitBoundsService=r,this._zone=i,this.longitude=0,this.latitude=0,this.zoom=8,this.draggable=!0,this.disableDoubleClickZoom=!1,this.disableDefaultUI=!1,this.scrollwheel=!0,this.keyboardShortcuts=!0,this.styles=[],this.usePanning=!1,this.fitBounds=!1,this.scaleControl=!1,this.mapTypeControl=!1,this.panControl=!1,this.rotateControl=!1,this.fullscreenControl=!1,this.mapTypeId="roadmap",this.clickableIcons=!0,this.showDefaultInfoWindow=!0,this.gestureHandling="auto",this.tilt=0,this._observableSubscriptions=[],this.mapClick=new ty,this.mapRightClick=new ty,this.mapDblClick=new ty,this.centerChange=new ty,this.boundsChange=new ty,this.mapTypeIdChange=new ty,this.idle=new ty,this.zoomChange=new ty,this.mapReady=new ty,this.tilesLoaded=new ty}return as(e,[{key:"ngOnInit",value:function(){var e=this._elem.nativeElement.querySelector(".agm-map-container-inner");this._initMapInstance(e)}},{key:"_initMapInstance",value:function(e){var t=this;this._mapsWrapper.createMap(e,{center:{lat:this.latitude||0,lng:this.longitude||0},zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom,controlSize:this.controlSize,disableDefaultUI:this.disableDefaultUI,disableDoubleClickZoom:this.disableDoubleClickZoom,scrollwheel:this.scrollwheel,backgroundColor:this.backgroundColor,draggable:this.draggable,draggableCursor:this.draggableCursor,draggingCursor:this.draggingCursor,keyboardShortcuts:this.keyboardShortcuts,styles:this.styles,zoomControl:this.zoomControl,zoomControlOptions:this.zoomControlOptions,streetViewControl:this.streetViewControl,streetViewControlOptions:this.streetViewControlOptions,scaleControl:this.scaleControl,scaleControlOptions:this.scaleControlOptions,mapTypeControl:this.mapTypeControl,mapTypeControlOptions:this.mapTypeControlOptions,panControl:this.panControl,panControlOptions:this.panControlOptions,rotateControl:this.rotateControl,rotateControlOptions:this.rotateControlOptions,fullscreenControl:this.fullscreenControl,fullscreenControlOptions:this.fullscreenControlOptions,mapTypeId:this.mapTypeId,clickableIcons:this.clickableIcons,gestureHandling:this.gestureHandling,tilt:this.tilt,restriction:this.restriction}).then(function(){return t._mapsWrapper.getNativeMap()}).then(function(e){return t.mapReady.emit(e)}),this._handleMapCenterChange(),this._handleMapZoomChange(),this._handleMapMouseEvents(),this._handleBoundsChange(),this._handleMapTypeIdChange(),this._handleTilesLoadedEvent(),this._handleIdleEvent()}},{key:"ngOnDestroy",value:function(){this._observableSubscriptions.forEach(function(e){return e.unsubscribe()}),this._mapsWrapper.clearInstanceListeners(),this._fitBoundsSubscription&&this._fitBoundsSubscription.unsubscribe()}},{key:"ngOnChanges",value:function(e){this._updateMapOptionsChanges(e),this._updatePosition(e)}},{key:"_updateMapOptionsChanges",value:function(e){var t={};Object.keys(e).filter(function(e){return-1!==NG._mapOptionsAttributes.indexOf(e)}).forEach(function(n){t[n]=e[n].currentValue}),this._mapsWrapper.setMapOptions(t)}},{key:"triggerResize",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise(function(n){setTimeout(function(){return e._mapsWrapper.triggerMapEvent("resize").then(function(){t&&(null!=e.fitBounds?e._fitBounds():e._setCenter()),n()})})})}},{key:"_updatePosition",value:function(e){(null!=e.latitude||null!=e.longitude||e.fitBounds)&&("fitBounds"in e?this._fitBounds():"number"==typeof this.latitude&&"number"==typeof this.longitude&&this._setCenter())}},{key:"_setCenter",value:function(){var e={lat:this.latitude,lng:this.longitude};this.usePanning?this._mapsWrapper.panTo(e):this._mapsWrapper.setCenter(e)}},{key:"_fitBounds",value:function(){switch(this.fitBounds){case!0:this._subscribeToFitBoundsUpdates();break;case!1:this._fitBoundsSubscription&&this._fitBoundsSubscription.unsubscribe();break;default:this._updateBounds(this.fitBounds,this.fitBoundsPadding)}}},{key:"_subscribeToFitBoundsUpdates",value:function(){var e=this;this._zone.runOutsideAngular(function(){e._fitBoundsSubscription=e._fitBoundsService.getBounds$().subscribe(function(t){e._zone.run(function(){return e._updateBounds(t,e.fitBoundsPadding)})})})}},{key:"_updateBounds",value:function(e,t){if(e){if(this._isLatLngBoundsLiteral(e)&&"undefined"!=typeof google&&google&&google.maps&&google.maps.LatLngBounds){var n=new google.maps.LatLngBounds;n.union(e),e=n}this.usePanning?this._mapsWrapper.panToBounds(e,t):this._mapsWrapper.fitBounds(e,t)}}},{key:"_isLatLngBoundsLiteral",value:function(e){return null!=e&&void 0===e.extend}},{key:"_handleMapCenterChange",value:function(){var e=this,t=this._mapsWrapper.subscribeToMapEvent("center_changed").subscribe(function(){e._mapsWrapper.getCenter().then(function(t){e.latitude=t.lat(),e.longitude=t.lng(),e.centerChange.emit({lat:e.latitude,lng:e.longitude})})});this._observableSubscriptions.push(t)}},{key:"_handleBoundsChange",value:function(){var e=this,t=this._mapsWrapper.subscribeToMapEvent("bounds_changed").subscribe(function(){e._mapsWrapper.getBounds().then(function(t){e.boundsChange.emit(t)})});this._observableSubscriptions.push(t)}},{key:"_handleMapTypeIdChange",value:function(){var e=this,t=this._mapsWrapper.subscribeToMapEvent("maptypeid_changed").subscribe(function(){e._mapsWrapper.getMapTypeId().then(function(t){e.mapTypeIdChange.emit(t)})});this._observableSubscriptions.push(t)}},{key:"_handleMapZoomChange",value:function(){var e=this,t=this._mapsWrapper.subscribeToMapEvent("zoom_changed").subscribe(function(){e._mapsWrapper.getZoom().then(function(t){e.zoom=t,e.zoomChange.emit(t)})});this._observableSubscriptions.push(t)}},{key:"_handleIdleEvent",value:function(){var e=this,t=this._mapsWrapper.subscribeToMapEvent("idle").subscribe(function(){e.idle.emit(void 0)});this._observableSubscriptions.push(t)}},{key:"_handleTilesLoadedEvent",value:function(){var e=this,t=this._mapsWrapper.subscribeToMapEvent("tilesloaded").subscribe(function(){return e.tilesLoaded.emit(void 0)});this._observableSubscriptions.push(t)}},{key:"_handleMapMouseEvents",value:function(){var e=this;[{name:"click",emitter:this.mapClick},{name:"rightclick",emitter:this.mapRightClick},{name:"dblclick",emitter:this.mapDblClick}].forEach(function(t){var n=e._mapsWrapper.subscribeToMapEvent(t.name).subscribe(function(n){var r={coords:{lat:n.latLng.lat(),lng:n.latLng.lng()},placeId:n.placeId};r.placeId&&!e.showDefaultInfoWindow&&n.stop(),t.emitter.emit(r)});e._observableSubscriptions.push(n)})}}]),e}()).\u0275fac=function(e){return new(e||LG)(Qf(Yg),Qf(bG),Qf(SG),Qf(Hy))},LG.\u0275cmp=zl({type:LG,selectors:[["agm-map"]],hostVars:2,hostBindings:function(e,t){2&e&&gm("sebm-google-map-container",!0)},inputs:{longitude:"longitude",latitude:"latitude",zoom:"zoom",draggable:["mapDraggable","draggable"],disableDoubleClickZoom:"disableDoubleClickZoom",disableDefaultUI:"disableDefaultUI",scrollwheel:"scrollwheel",keyboardShortcuts:"keyboardShortcuts",styles:"styles",usePanning:"usePanning",fitBounds:"fitBounds",scaleControl:"scaleControl",mapTypeControl:"mapTypeControl",panControl:"panControl",rotateControl:"rotateControl",fullscreenControl:"fullscreenControl",mapTypeId:"mapTypeId",clickableIcons:"clickableIcons",showDefaultInfoWindow:"showDefaultInfoWindow",gestureHandling:"gestureHandling",tilt:"tilt",minZoom:"minZoom",maxZoom:"maxZoom",controlSize:"controlSize",backgroundColor:"backgroundColor",draggableCursor:"draggableCursor",draggingCursor:"draggingCursor",zoomControl:"zoomControl",zoomControlOptions:"zoomControlOptions",streetViewControl:"streetViewControl",streetViewControlOptions:"streetViewControlOptions",fitBoundsPadding:"fitBoundsPadding",scaleControlOptions:"scaleControlOptions",mapTypeControlOptions:"mapTypeControlOptions",panControlOptions:"panControlOptions",rotateControlOptions:"rotateControlOptions",fullscreenControlOptions:"fullscreenControlOptions",restriction:"restriction"},outputs:{mapClick:"mapClick",mapRightClick:"mapRightClick",mapDblClick:"mapDblClick",centerChange:"centerChange",boundsChange:"boundsChange",mapTypeIdChange:"mapTypeIdChange",idle:"idle",zoomChange:"zoomChange",mapReady:"mapReady",tilesLoaded:"tilesLoaded"},features:[Ug([wG,CG,CG,SG,bG,kG,IG,_G,PG,UG,HG,QG]),cu],ngContentSelectors:vG,decls:3,vars:0,consts:[[1,"agm-map-container-inner","sebm-google-map-container-inner"],[1,"agm-map-content"]],template:function(e,t){1&e&&(um(),Yf(0,"div",0),$f(1,"div",1),cm(2),Jf())},styles:[".agm-map-container-inner[_ngcontent-%COMP%] {\n      width: inherit;\n      height: inherit;\n    }\n    .agm-map-content[_ngcontent-%COMP%] {\n      display:none;\n    }"]}),LG._mapOptionsAttributes=["disableDoubleClickZoom","scrollwheel","draggable","draggableCursor","draggingCursor","keyboardShortcuts","zoomControl","zoomControlOptions","styles","streetViewControl","streetViewControlOptions","zoom","mapTypeControl","mapTypeControlOptions","minZoom","maxZoom","panControl","panControlOptions","rotateControl","rotateControlOptions","fullscreenControl","fullscreenControlOptions","scaleControl","scaleControlOptions","mapTypeId","clickableIcons","gestureHandling","tilt","restriction"],LG=NG=YW([ZW("design:paramtypes",[Yg,bG,SG,Hy])],LG)),GG=0,$G=((MG=FG=function(){function e(t){is(this,e),this._markerManager=t,this.draggable=!1,this.visible=!0,this.openInfoWindow=!0,this.opacity=1,this.zIndex=1,this.clickable=!0,this.animationChange=new ty,this.markerClick=new ty,this.markerRightClick=new ty,this.dragStart=new ty,this.drag=new ty,this.dragEnd=new ty,this.mouseOver=new ty,this.mouseOut=new ty,this.infoWindow=new ry,this._markerAddedToManger=!1,this._observableSubscriptions=[],this._fitBoundsDetails$=new AI(1),this._id=(GG++).toString()}return as(e,[{key:"ngAfterContentInit",value:function(){var e=this;this.handleInfoWindowUpdate(),this.infoWindow.changes.subscribe(function(){return e.handleInfoWindowUpdate()})}},{key:"handleInfoWindowUpdate",value:function(){var e=this;if(this.infoWindow.length>1)throw new Error("Expected no more than one info window.");this.infoWindow.forEach(function(t){t.hostMarker=e})}},{key:"ngOnChanges",value:function(e){if("string"==typeof this.latitude&&(this.latitude=Number(this.latitude)),"string"==typeof this.longitude&&(this.longitude=Number(this.longitude)),"number"==typeof this.latitude&&"number"==typeof this.longitude){if(!this._markerAddedToManger)return this._markerManager.addMarker(this),this._updateFitBoundsDetails(),this._markerAddedToManger=!0,void this._addEventListeners();(e.latitude||e.longitude)&&(this._markerManager.updateMarkerPosition(this),this._updateFitBoundsDetails()),e.title&&this._markerManager.updateTitle(this),e.label&&this._markerManager.updateLabel(this),e.draggable&&this._markerManager.updateDraggable(this),e.iconUrl&&this._markerManager.updateIcon(this),e.opacity&&this._markerManager.updateOpacity(this),e.visible&&this._markerManager.updateVisible(this),e.zIndex&&this._markerManager.updateZIndex(this),e.clickable&&this._markerManager.updateClickable(this),e.animation&&this._markerManager.updateAnimation(this)}}},{key:"getFitBoundsDetails$",value:function(){return this._fitBoundsDetails$.asObservable()}},{key:"_updateFitBoundsDetails",value:function(){this._fitBoundsDetails$.next({latLng:{lat:this.latitude,lng:this.longitude}})}},{key:"_addEventListeners",value:function(){var e=this,t=this._markerManager.createEventObservable("click",this).subscribe(function(){e.openInfoWindow&&e.infoWindow.forEach(function(e){return e.open()}),e.markerClick.emit(e)});this._observableSubscriptions.push(t);var n=this._markerManager.createEventObservable("rightclick",this).subscribe(function(){e.markerRightClick.emit(null)});this._observableSubscriptions.push(n);var r=this._markerManager.createEventObservable("dragstart",this).subscribe(function(t){e.dragStart.emit({coords:{lat:t.latLng.lat(),lng:t.latLng.lng()}})});this._observableSubscriptions.push(r);var i=this._markerManager.createEventObservable("drag",this).subscribe(function(t){e.drag.emit({coords:{lat:t.latLng.lat(),lng:t.latLng.lng()}})});this._observableSubscriptions.push(i);var o=this._markerManager.createEventObservable("dragend",this).subscribe(function(t){e.dragEnd.emit({coords:{lat:t.latLng.lat(),lng:t.latLng.lng()}})});this._observableSubscriptions.push(o);var a=this._markerManager.createEventObservable("mouseover",this).subscribe(function(t){e.mouseOver.emit({coords:{lat:t.latLng.lat(),lng:t.latLng.lng()}})});this._observableSubscriptions.push(a);var s=this._markerManager.createEventObservable("mouseout",this).subscribe(function(t){e.mouseOut.emit({coords:{lat:t.latLng.lat(),lng:t.latLng.lng()}})});this._observableSubscriptions.push(s);var l=this._markerManager.createEventObservable("animation_changed",this).subscribe(function(){e.animationChange.emit(e.animation)});this._observableSubscriptions.push(l)}},{key:"id",value:function(){return this._id}},{key:"toString",value:function(){return"AgmMarker-"+this._id.toString()}},{key:"ngOnDestroy",value:function(){this._markerManager.deleteMarker(this),this._observableSubscriptions.forEach(function(e){return e.unsubscribe()})}}]),e}()).\u0275fac=function(e){return new(e||MG)(Qf(PG))},MG.\u0275dir=$l({type:MG,selectors:[["agm-marker"]],contentQueries:function(e,t,n){var r;1&e&&vy(n,AG,!1),2&e&&py(r=yy())&&(t.infoWindow=r)},inputs:{latitude:"latitude",longitude:"longitude",title:"title",label:"label",draggable:["markerDraggable","draggable"],iconUrl:"iconUrl",openInfoWindow:"openInfoWindow",opacity:"opacity",visible:"visible",zIndex:"zIndex",animation:"animation",clickable:["markerClickable","clickable"]},outputs:{markerClick:"markerClick",dragStart:"dragStart",drag:"drag",dragEnd:"dragEnd",mouseOver:"mouseOver",mouseOut:"mouseOut",animationChange:"animationChange",markerRightClick:"markerRightClick"},features:[Ug([{provide:xG,useExisting:sl(function(){return FG})}]),cu]}),MG=FG=YW([ZW("design:paramtypes",[PG])],MG)),JG=function(){function e(){is(this,e)}return as(e,[{key:"getNativeWindow",value:function(){return window}}]),e}(),YG=function(){function e(){is(this,e)}return as(e,[{key:"getNativeDocument",value:function(){return document}}]),e}(),KG=[JG,YG],ZG=function(e){return e[e.HTTP=1]="HTTP",e[e.HTTPS=2]="HTTPS",e[e.AUTO=3]="AUTO",e}({}),XG=new $c("angular-google-maps LAZY_MAPS_API_CONFIG"),e$=((qG=function(e){Ka(n,e);var t=Xa(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return is(this,n),(e=t.call(this))._SCRIPT_ID="agmGoogleMapsApiScript",e.callbackName="agmLazyMapsAPILoader",e._config=r||{},e._windowRef=i,e._documentRef=o,e}return as(n,[{key:"load",value:function(){var e=this._windowRef.getNativeWindow();if(e.google&&e.google.maps)return Promise.resolve();if(this._scriptLoadingPromise)return this._scriptLoadingPromise;var t=this._documentRef.getNativeDocument().getElementById(this._SCRIPT_ID);if(t)return this._assignScriptLoadingPromise(t),this._scriptLoadingPromise;var n=this._documentRef.getNativeDocument().createElement("script");return n.type="text/javascript",n.async=!0,n.defer=!0,n.id=this._SCRIPT_ID,n.src=this._getScriptSrc(this.callbackName),this._assignScriptLoadingPromise(n),this._documentRef.getNativeDocument().body.appendChild(n),this._scriptLoadingPromise}},{key:"_assignScriptLoadingPromise",value:function(e){var t=this;this._scriptLoadingPromise=new Promise(function(n,r){t._windowRef.getNativeWindow()[t.callbackName]=function(){n()},e.onerror=function(e){r(e)}})}},{key:"_getScriptSrc",value:function(e){var t;switch(this._config&&this._config.protocol||ZG.HTTPS){case ZG.AUTO:t="";break;case ZG.HTTP:t="http:";break;case ZG.HTTPS:t="https:"}var n={v:this._config.apiVersion||"quarterly",callback:e,key:this._config.apiKey,client:this._config.clientId,channel:this._config.channel,libraries:this._config.libraries,region:this._config.region,language:this._config.language};return"".concat(t,"//").concat(this._config.hostAndPath||"maps.googleapis.com/maps/api/js","?").concat(Object.keys(n).filter(function(e){return null!=n[e]}).filter(function(e){return!Array.isArray(n[e])||Array.isArray(n[e])&&n[e].length>0}).map(function(e){var t=n[e];return Array.isArray(t)?{key:e,value:t.join(",")}:{key:e,value:n[e]}}).map(function(e){return"".concat(e.key,"=").concat(e.value)}).join("&"))}}]),n}(yG)).\u0275fac=function(e){return new(e||qG)(md(XG,8),md(JG),md(YG))},qG.\u0275prov=dl({token:qG,factory:function(e){return qG.\u0275fac(e)}}),qG=YW([KW(0,ad()),KW(0,od(XG)),ZW("design:paramtypes",[Object,JG,YG])],qG)),t$=((zG=jG=function(){function e(){is(this,e)}return as(e,null,[{key:"forRoot",value:function(e){return{ngModule:jG,providers:[].concat(KG,[{provide:yG,useClass:e$},{provide:XG,useValue:e}])}}}]),e}()).\u0275mod=Wl({type:zG}),zG.\u0275inj=hl({factory:function(e){return new(e||zG)}}),zG),n$=((BG=function(e){Ka(n,e);var t=Xa(n);function n(e,r){var i;return is(this,n),(i=t.call(this,e,r)).loader=e,i.zone=r,i}return as(n,[{key:"getAddress",value:function(e,t){var n=this;return new ws(function(r){try{n.loader.load().then(function(){(new google.maps.Geocoder).geocode({location:{lat:e,lng:t}},function(e,t){t===google.maps.GeocoderStatus.OK?(r.next(e[0]),r.complete()):(console.error("Error - ",e," & Status - ",t),t===google.maps.GeocoderStatus.ZERO_RESULTS?r.error("Address not found!"):r.error(t),r.complete())})})}catch(i){r.error("error getGeocoding"+i),r.complete()}})}},{key:"getLatLan",value:function(e){var t=this;return new ws(function(n){try{t.loader.load().then(function(){(new google.maps.Geocoder).geocode({address:e},function(e,t){t===google.maps.GeocoderStatus.OK?(n.next(e[0].geometry.location),n.complete()):(console.error("Error - ",e," & Status - ",t),t===google.maps.GeocoderStatus.ZERO_RESULTS?n.error("Address not found!"):n.error(t),n.complete())})})}catch(r){n.error("error getGeocoding"+r),n.complete()}})}},{key:"setAutocompleteField",value:function(e,t){try{this.loader.load().then(function(){var n=new google.maps.places.Autocomplete(e,{types:["address"]});n.addListener("place_changed",function(){var e=n.getPlace();t(e)}),n.addListener("keydown",function(e){13===e.keyCode&&e.preventDefault()})})}catch(n){console.error(n)}}}]),n}(bG)).\u0275fac=function(e){return new(e||BG)(md(yG),md(Hy))},BG.\u0275prov=dl({token:BG,factory:BG.\u0275fac}),BG),r$=["autoStreet"];function i$(e,t){1&e&&(Kf(0),Rg(1,47),Zf())}function o$(e,t){1&e&&(Kf(0),Rg(1,48),Zf())}function a$(e,t){1&e&&($f(0,"div"),Rg(1,49),Jf())}function s$(e,t){1&e&&($f(0,"div"),Rg(1,53),Jf())}function l$(e,t){if(1&e&&($f(0,"div",26),$f(1,"label",50),Kf(2),Rg(3,51),Zf(),Cm(4,"\xa0* "),Jf(),Yf(5,"input",52),$f(6,"div",18),Uf(7,s$,2,0,"div",16),Jf(),Jf()),2&e){var n=sm();dp(5),gm("is-invalid",n.applicantFirstName.touched&&!n.applicantFirstName.valid),Wf("maxlength",n.fieldsMaxLength.applicantFirstName),dp(2),Wf("ngIf",null==n.applicantFirstName.errors?null:n.applicantFirstName.errors.required)}}function u$(e,t){1&e&&($f(0,"div"),Rg(1,54),Jf())}function c$(e,t){1&e&&($f(0,"div"),Rg(1,55),Jf())}function d$(e,t){1&e&&($f(0,"div"),Rg(1,56),Jf())}function h$(e,t){1&e&&($f(0,"div"),Rg(1,57),Jf())}function p$(e,t){1&e&&($f(0,"div"),Rg(1,58),Jf())}function f$(e,t){1&e&&($f(0,"div"),Rg(1,59),Jf())}function m$(e,t){1&e&&($f(0,"div"),Rg(1,60),Jf())}function g$(e,t){1&e&&($f(0,"div"),Rg(1,61),Jf())}function v$(e,t){if(1&e){var n=Xf();$f(0,"div",14),$f(1,"div",62),$f(2,"input",63),nm("change",function(e){return Nu(n),sm().onIsResidentChange(e)}),Jf(),$f(3,"label",64),Rg(4,65),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(4),Vg(r.cityName),Dg(4)}}function y$(e,t){1&e&&($f(0,"div"),Tg(1,76),Yf(2,"sup"),Og(),Jf())}var b$=function(){return[]};function _$(e,t){if(1&e){var n=Xf();$f(0,"div",14),$f(1,"div",66),$f(2,"label",67),Kf(3),Tg(4,68),Yf(5,"sup"),Og(),Zf(),Jf(),$f(6,"input",69),nm("change",function(){return Nu(n),sm().addressFieldsChange()}),Jf(),$f(7,"div",18),Uf(8,y$,3,0,"div",16),Jf(),Jf(),$f(9,"div",66),$f(10,"label",70),Rg(11,71),Jf(),$f(12,"input",72),nm("change",function(){return Nu(n),sm().addressFieldsChange()}),Jf(),Jf(),$f(13,"div",66),$f(14,"label",73),Rg(15,74),Jf(),$f(16,"input",75),nm("change",function(){return Nu(n),sm().addressFieldsChange()}),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(6),gm("is-invalid",(r.civicNumber.touched||r.civicNumber.dirty)&&!r.civicNumber.valid),Wf("specialCharacters",Qv(7,b$))("maxlength",r.fieldsMaxLength.addressCivicNumber),dp(2),Wf("ngIf",null==r.civicNumber.errors?null:r.civicNumber.errors.required),dp(4),Wf("maxlength",r.fieldsMaxLength.addressSuffix),dp(4),Wf("maxlength",r.fieldsMaxLength.addressApartment)}}function w$(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",81),Yf(2,"input",82),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function C$(e,t){if(1&e&&($f(0,"mat-option",87),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n),dp(2),xm(n.voieComplet)}}function x$(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"input",83),nm("change",function(){return Nu(n),sm(2).addressFieldsChange()}),Jf(),$f(2,"mat-autocomplete",84,85),nm("optionSelected",function(e){return Nu(n),sm(2).selectStreet(e)}),Uf(4,C$,3,2,"mat-option",86),Jv(5,"async"),Jf(),Zf()}if(2&e){var r=Hf(3),i=sm(2);dp(1),gm("is-invalid",(i.searchStreet.touched||i.searchStreet.dirty)&&!i.searchStreet.valid),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.searchStreet),dp(1),Wf("displayWith",i.displayStreet),dp(2),Wf("ngForOf",Yv(5,6,i.filteredStreets))}}function S$(e,t){1&e&&($f(0,"div"),Rg(1,88),Jf())}function P$(e,t){if(1&e&&($f(0,"div",14),$f(1,"div",38),$f(2,"label",77),Kf(3),Rg(4,78),Zf(),Jf(),Kf(5,79),Uf(6,w$,3,2,"ng-container",80),Uf(7,x$,6,8,"ng-container",80),$f(8,"div",18),Uf(9,S$,2,0,"div",16),Jf(),Zf(),Jf(),Jf()),2&e){var n=sm();dp(5),Wf("ngSwitch",n.streetsState),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",n.viewStateEnum.Ready),dp(2),Wf("ngIf",(null==n.searchStreet.errors?null:n.searchStreet.errors.required)||(null==n.searchStreet.errors?null:n.searchStreet.errors.invalid))}}function k$(e,t){if(1&e){var n=Xf();$f(0,"div",89),$f(1,"span"),Rg(2,90),Jf(),$f(3,"div",91),nm("click",function(){return Nu(n),sm().switchToManual()}),Kf(4),Rg(5,92),Zf(),Yf(6,"fa-icon",42),Jf(),Jf()}if(2&e){var r=sm();dp(6),Wf("icon",r.farLongArrowRight)}}function E$(e,t){1&e&&($f(0,"div",14),$f(1,"div",38),$f(2,"label",93),Kf(3),Rg(4,94),Zf(),Jf(),Yf(5,"input",95),Yf(6,"input",96),Jf(),Jf())}function A$(e,t){if(1&e&&($f(0,"div",97),$f(1,"label",98),Kf(2),Cm(3),Zf(),Jf(),Yf(4,"input",99),Jf()),2&e){var n=sm();dp(3),xm(n.cityLabel),dp(1),Wf("maxlength",n.fieldsMaxLength.city)}}var I$=function(){return[" "]};function T$(e,t){1&e&&($f(0,"div",100),$f(1,"label",101),Kf(2),Rg(3,102),Zf(),Jf(),Yf(4,"input",103),Jf()),2&e&&(dp(4),Wf("specialCharacters",Qv(1,I$)))}function O$(e,t){if(1&e){var n=Xf();$f(0,"button",104),nm("click",function(){return Nu(n),sm().onFormSubmit(!1)}),Kf(1),Rg(2,105),Zf(),Yf(3,"fa-icon",42),Jf()}if(2&e){var r=sm();Wf("disabled",r.applicantForm.invalid||r.isSubmitting||!1===r.isAddressValid&&r.isAddressNotFound&&!(null!=r.autocomplete&&r.autocomplete.isOpen)&&!r.isLoadingAddress&&r.isResident),dp(3),Wf("icon",r.farLongArrowRight)}}function R$(e,t){1&e&&Yf(0,"fa-icon",81),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function V$(e,t){if(1&e){var n=Xf();$f(0,"button",106),nm("click",function(){return Nu(n),sm().onFormSubmit(!0)}),Yf(1,"fa-icon",107),Kf(2),Rg(3,108),Zf(),Uf(4,R$,1,2,"fa-icon",109),Jf()}if(2&e){var r=sm();Wf("disabled",r.applicantForm.invalid||r.isSubmitting||!1===r.isAddressValid&&r.isAddressNotFound&&!(null!=r.autocomplete&&r.autocomplete.isOpen)&&!r.isLoadingAddress&&r.isResident),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var D$,N$,L$,F$=function(e,t){return{"btn-primary":e,"btn-secondary":t}},M$=function(){return["-"," "]},q$=((D$=function(){function e(t,n,r,i,o,a){is(this,e),this.localeId=t,this.googleMapsService=n,this.pelService=r,this.globalsService=i,this.fb=o,this.router=a,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.isApplicantContractor=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.isManualMode=this.isReadOnlyMode,this.isLoaded=!1,this.isLoadingAddress=!1,this.isAddressValid=this.isReadOnlyMode,this.addressProperty={registrationNumber:void 0,civicNumber:null,suffix:"",apartment:"",designa:"",discriminant:"",street:""},this.fieldsMaxLength={addressCivicNumber:10,addressSuffix:10,addressApartment:12,searchStreet:75,streetName:128,applicantFirstName:75,applicantLastName:75,address:75,city:50,applicantEmail:200,completeAddress:128},this.streets=[],this.streetsState=HM.Loading,this.viewStateEnum=HM,this.farUser=cF,this.farLongArrowRight=$L,this.farSpinnerThird=aF,this.farSave=iF}return as(e,[{key:"ngOnInit",value:function(){var e,t=this;if(this.isResident=!this.applicant||this.applicant.applicantAddress.isResident,this.cityName="en"===this.localeId?this.globalsService.cityInfo.cityNameEn:this.globalsService.cityInfo.cityNameFr,this.cityLabel=this.globalsService.getCustomResourceTextByCode("RES_VILLE"),""===this.cityLabel&&(this.cityLabel="en"===this.localeId?hj.RES_VILLE_EN:hj.RES_VILLE_FR),this.googleMapsService.setAutocompleteField(document.getElementById("googleAutocomplete"),function(e){t.selectAddress(e)}),this.pelService.getAllStreetsFromRole().subscribe(function(e){var n,r;if(t.streets=e.result,t.streetsState=HM.Ready,!localStorage.getItem("requester")||t.isEditMode()||t.isReadOnlyMode){if(null===(r=null===(n=t.applicant)||void 0===n?void 0:n.applicantAddress)||void 0===r?void 0:r.searchStreet){var i=Object.keys(t.globalsService.currentRequest.adresseVoiePubliqueRequerant);if(i.length>0&&""!==i[0]){var o=Object.values(t.globalsService.currentRequest.adresseVoiePubliqueRequerant);t.applicantForm.get("applicantAddress.searchStreet").setValue(t.streets.filter(function(e){return e.designa===o[0].designa&&e.voie===o[0].voie})[0]),t.registrationNumber.setValue(i),t.isAddressNotFound=!1,t.isAddressValid=!0}}}else{var a=JSON.parse(localStorage.getItem("requester"));a.FullAdress&&a.IsResident&&(t.isResidentControl.setValue(!0),t.isResident=!0,t.applicantForm.get("applicantAddress.searchStreet").setValue(t.streets.filter(function(e){return e.codeGen===a.StreetType&&e.codeLien===a.StreetLink&&e.voie===a.Street})[0]),t.validateRoleAddress())}},function(e){t.streetsState=HM.Ready}),this.applicantForm=this.fb.group({applicantEmail:[this.applicant?this.applicant.applicantEmail:"",[FS.required,FS.pattern(VB.EMAIL_VALIDATOR_PATERN),FS.maxLength(this.fieldsMaxLength.applicantEmail)]],applicantEmailConfirmation:[this.applicant?this.applicant.applicantEmail:"",[FS.required,FS.pattern(VB.EMAIL_VALIDATOR_PATERN),FS.maxLength(this.fieldsMaxLength.applicantEmail)]],applicantPhoneNumber:[this.applicant?this.applicant.applicantPhoneNumber:"",[FS.required]],applicantOtherPhoneNumber:[this.applicant?this.applicant.applicantOtherPhoneNumber:"",null],applicantLastName:[this.applicant?this.applicant.applicantLastName:"",[FS.required,FS.maxLength(this.fieldsMaxLength.applicantLastName)]],applicantFirstName:[this.applicant?this.applicant.applicantFirstName:"",[FS.required,FS.maxLength(this.fieldsMaxLength.applicantFirstName)]],applicantAddress:this.fb.group({isResident:[!this.applicant||this.applicant.applicantAddress.isResident,null],address:[this.applicant?this.applicant.applicantAddress.address:"",null],city:[this.applicant?this.applicant.applicantAddress.city:"",null],zipCode:[this.applicant?this.applicant.applicantAddress.zipCode:"",null],searchStreet:[this.applicant?this.applicant.applicantAddress.searchStreet:"",[FS.maxLength(this.fieldsMaxLength.searchStreet),Dz]],civicNumber:[this.applicant?this.applicant.applicantAddress.civicNumber:"",[FS.maxLength(this.fieldsMaxLength.addressCivicNumber)]],suffix:[this.applicant?this.applicant.applicantAddress.suffix:"",[FS.maxLength(this.fieldsMaxLength.addressSuffix)]],apartment:[this.applicant?this.applicant.applicantAddress.apartment:"",[FS.maxLength(this.fieldsMaxLength.addressApartment)]],streetName:[this.applicant?this.applicant.applicantAddress.streetName:"",null],googleCompleteAddress:[this.applicant?this.applicant.applicantAddress.googleCompleteAddress:"",null],registrationNumber:[this.applicant?this.applicant.applicantAddress.registrationNumber:null]})}),this.applicantForm.setValidators(this.emailMatchValidator),this.isResidentControl.valueChanges.subscribe(function(e){t.isResidentControl.setValue(e),t.isResident=e,t.isManualMode=!e,t.residentSelectionChanged()}),this.filteredStreets=this.searchStreet.valueChanges.pipe(XE(""),Ms(function(e){return t.filterStreet(e)})),!this.isResident&&(this.isManualMode=!0,this.searchStreet.value&&this.searchStreet.valid)){var n=this.searchStreet.value;this.streetName.setValue(n.designa&&n.voie?n.designa+" "+n.voie:n.voie)}if(this.isReadOnlyMode&&this.applicantForm.disable(),(this.isReadOnlyMode||this.isEditMode())&&""===(null===(e=this.applicant)||void 0===e?void 0:e.applicantFirstName)&&(this.isApplicantContractor=!0),localStorage.getItem("requester")&&!this.isEditMode()&&!this.isReadOnlyMode){var r=JSON.parse(localStorage.getItem("requester"));this.applicantForm.get("applicantEmail").setValue(r.Email),this.applicantForm.get("applicantLastName").setValue(r.LastName),this.applicantForm.get("applicantFirstName").setValue(r.FirstName),this.applicantForm.get("applicantPhoneNumber").setValue(r.PhoneNumber),r.FullAdress&&(r.IsResident?(this.applicantForm.get("applicantAddress.civicNumber").setValue(r.NoCivic),this.applicantForm.get("applicantAddress.apartment").setValue(r.NoApp),this.applicantForm.get("applicantAddress.suffix").setValue(r.Suffix)):(this.switchToManual(),this.applicantForm.get("applicantAddress.civicNumber").setValue(r.NoCivic),this.applicantForm.get("applicantAddress.apartment").setValue(r.NoApp),this.applicantForm.get("applicantAddress.streetName").setValue(r.FullAdress.trim()),this.applicantForm.get("applicantAddress.city").setValue(r.City),this.applicantForm.get("applicantAddress.zipCode").setValue(r.PostalCode)))}}},{key:"onIsResidentChange",value:function(e){e.target.checked&&this.validateRoleAddress()}},{key:"switchToManual",value:function(){if(this.isResident&&this.searchStreet.value&&this.searchStreet.valid){var e=this.searchStreet.value;this.streetName.setValue(e.designa&&e.voie?e.designa+" "+e.voie:e),this.city.setValue(this.cityName)}this.registrationNumber.setValue(""),this.isResidentControl.setValue(!1),this.isManualMode=!0,this.isAddressValid=!0,this.city.setValidators([FS.maxLength(this.fieldsMaxLength.city)]),this.civicNumber.setValidators([FS.maxLength(this.fieldsMaxLength.addressCivicNumber)]),this.suffix.setValidators([FS.maxLength(this.fieldsMaxLength.addressSuffix)]),this.apartement.setValidators([FS.maxLength(this.fieldsMaxLength.addressApartment)]),this.streetName.setValidators([FS.maxLength(this.fieldsMaxLength.streetName)]),this.searchStreet.setValidators(null),this.city.updateValueAndValidity(),this.civicNumber.updateValueAndValidity(),this.suffix.updateValueAndValidity(),this.searchStreet.updateValueAndValidity(),this.apartement.updateValueAndValidity(),this.streetName.updateValueAndValidity()}},{key:"residentSelectionChanged",value:function(){this.isResident?(this.civicNumber.setValidators([FS.maxLength(this.fieldsMaxLength.addressCivicNumber)]),this.searchStreet.setValidators([FS.maxLength(this.fieldsMaxLength.searchStreet)]),this.suffix.setValidators([FS.maxLength(this.fieldsMaxLength.addressSuffix)]),this.apartement.setValidators([FS.maxLength(this.fieldsMaxLength.addressApartment)]),this.city.setValidators(null)):(this.civicNumber.setValidators(null),this.searchStreet.setValidators(null),this.suffix.setValidators(null),this.apartement.setValidators(null)),this.isAddressValid=!1,this.city.updateValueAndValidity(),this.civicNumber.updateValueAndValidity(),this.searchStreet.updateValueAndValidity(),this.suffix.updateValueAndValidity(),this.apartement.updateValueAndValidity()}},{key:"selectAddress",value:function(e){if(e&&e.address_components){var t=this.getAddressComponent(e.address_components,"street_number"),n=this.getAddressComponent(e.address_components,"route"),r=this.getAddressComponent(e.address_components,"locality");""===r&&(r=this.getAddressComponent(e.address_components,"administrative_area_level_3"));var i=this.getAddressComponent(e.address_components,"postal_code");this.applicantForm.controls.applicantAddress.patchValue({address:t+" "+n,civicNumber:t,streetName:n,city:r,zipCode:i}),this.isAddressValid=!0,this.googleCompleteAddress.updateValueAndValidity()}}},{key:"resetAddress",value:function(){this.isAddressValid=!1}},{key:"getAddressComponent",value:function(e,t){var n=e.find(function(e){if(e.types.includes(t))return e});return n?n.long_name:""}},{key:"onIsApplicantContractorChange",value:function(e){var t,n,r;if(this.isApplicantContractor=e,e)this.applicantLastName.setValue((this.applicantFirstName.value+" "+this.applicantLastName.value).trim()),this.applicantFirstName.setValidators(null),this.applicantFirstName.setValue("");else{var i="",o="";if(this.applicantFirstName.setValidators([FS.required]),void 0!==this.applicantLastName.value&&""!==this.applicantLastName.value){var a=this.applicantLastName.value.split(" ");i=void 0===(null===(t=a[a.length-1])||void 0===t?void 0:t.trim())?"":null===(n=a[a.length-1])||void 0===n?void 0:n.trim(),o=null===(r=this.applicantLastName.value.replace(i,""))||void 0===r?void 0:r.trim()}""===this.applicantFirstName.value&&this.applicantFirstName.setValue(o),this.applicantLastName.setValue(i)}this.applicantFirstName.updateValueAndValidity(),this.applicantForm.updateValueAndValidity()}},{key:"filterStreet",value:function(e){var t=this,n=[];return this.streets&&(null==e?void 0:e.length)>0&&(e=this.removeAccent(e).replace(/[/\\^$*+?.,()|[\]{}]/g,"").replace(/[-]/g," "),(null==(n=this.streets.filter(function(n){return 0===t.removeAccent(n.voieComplet).toLowerCase().indexOf(e.toLowerCase())}))?void 0:n.length)<5&&(n=Ha(new Set([].concat(Ha(n),Ha(this.filterAllWords(e))))))),n.slice(0,5)}},{key:"filterAllWords",value:function(e){var t=this,n=e.split(/\s+/g).map(function(e){return e.trim()}).filter(function(e){return!!e}),r=e.endsWith(" "),i=new RegExp(n.map(function(e,t){return t+1!==n.length||r?"(?=.*\\b".concat(e,"\\b)"):"(?=.*\\b".concat(e,")")}).join("")+".+","i");return this.streets.filter(function(e){return i.test(t.removeAccent(e.voieComplet))})}},{key:"addressFieldsChange",value:function(){this.isResident&&""===this.civicNumber.value&&""===this.searchStreet.value?(this.civicNumber.setValidators(null),this.civicNumber.markAsTouched(),this.searchStreet.setValidators(null),this.searchStreet.markAsTouched(),this.civicNumber.updateValueAndValidity(),this.searchStreet.updateValueAndValidity(),this.applicantForm.updateValueAndValidity()):""!==this.searchStreet.value&&this.validateRoleAddress()}},{key:"selectStreet",value:function(e){null!==e.option.value&&this.validateRoleAddress()}},{key:"displayStreet",value:function(e){return e&&e.voie?e.voie:""}},{key:"validateRoleAddress",value:function(){var e=this;if(!this.isManualMode&&this.searchStreet.valid){var t=this.searchStreet.value;this.addressProperty.designa=t.designa,this.addressProperty.street=t.voie,this.addressProperty.civicNumber=parseInt(this.civicNumber.value,10),this.addressProperty.suffix=this.suffix.value,this.addressProperty.apartment=this.apartement.value,this.addressProperty.discriminant=t.discriminant,this.isLoadingAddress=!0,this.pelService.validateRoleAddress(this.addressProperty,!0).subscribe(function(t){0!==t.count&&t.result&&""!==t.result?(e.registrationNumber.setValue(t.result),e.city.setValue(e.cityName),e.address.setValue(e.formatRoleAddress(e.addressProperty)),e.isAddressNotFound=!1,e.isAddressValid=!0):(e.isAddressNotFound=!0,e.isAddressValid=!1),e.isLoadingAddress=!1},function(t){e.isLoadingAddress=!1})}}},{key:"delayEmit",value:function(){return new Promise(function(e,t){setTimeout(function(){e(!0)},100)})}},{key:"onFormSubmit",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isManualMode&&this.applicantForm.controls.applicantAddress.patchValue({address:this.formatManualAddress()}),this.isResident&&(""!==this.searchStreet.value&&""===this.civicNumber.value?(this.isAddressValid=!1,this.civicNumber.setValidators([FS.required,FS.maxLength(this.fieldsMaxLength.addressCivicNumber)]),this.civicNumber.setErrors([{invalid:!0}]),this.civicNumber.markAsTouched(),this.civicNumber.updateValueAndValidity()):""===this.searchStreet.value&&""!==this.civicNumber.value?(this.isAddressValid=!1,this.searchStreet.setValidators([FS.required,FS.maxLength(this.fieldsMaxLength.addressCivicNumber)]),this.searchStreet.setErrors([{invalid:!0}]),this.searchStreet.markAsTouched(),this.searchStreet.updateValueAndValidity()):""!==this.searchStreet.value&&""!==this.civicNumber.value?this.validateRoleAddress():(this.isResidentControl.setValue(!1),this.suffix.setValue(""),this.apartement.setValue(""),this.zipCode.setValue(""),this.isAddressValid=!0)),this.delayEmit().then(function(n){(e.isManualMode||e.isResident&&e.isAddressValid)&&(t?e.stepSubmitIsSaveForLater.emit(e.applicantForm.value):e.stepSubmit.emit(e.applicantForm.value))})}},{key:"formatManualAddress",value:function(){var e="";return this.apartement.value&&(e=this.apartement.value+"-"),this.civicNumber.value&&(e+=this.civicNumber.value),this.suffix.value&&(e+=this.suffix.value),this.streetName.value&&(e=e+" "+this.streetName.value),e}},{key:"formatRoleAddress",value:function(e){var t="";e.apartment&&(t=e.apartment+"-"),t+=e.civicNumber,e.suffix&&(t+=e.suffix);var n=this.searchStreet.value;return t="".concat(t?t+" ":"").concat(n.designa?n.designa:"").concat(n.lien?" "+n.lien:"")+(n.voie?" "+n.voie:"")}},{key:"emailMatchValidator",value:function(e){if(e){var t=e.get("applicantEmail").value,n=e.get("applicantEmailConfirmation").value;if(""!==t&&""!==n&&t!==n)return{notMatching:!0}}return null}},{key:"isEditMode",value:function(){var e;return"/edit"===(null===(e=this.router)||void 0===e?void 0:e.url)}},{key:"removeAccent",value:function(e){return null==e?void 0:e.replace(/[\xea\xe9\xe8\xeb\xca\xc9\xc8\xcb]/g,"e").replace(/[\xee\xef\xce\xcf]/g,"i").replace(/[\xe7\xc7]/g,"c").replace(/[\xe0\xe2\xe4\xc0\xc2\xc4]/g,"a").replace(/[\xf4\xf6\xd4\xd6]/g,"o").replace(/[\xfb\xf9\xfc\xdb\xd9\xdc]/g,"u").replace(/[\xff]/g,"y")}},{key:"applicantEmail",get:function(){return this.applicantForm.get("applicantEmail")}},{key:"applicantEmailConfirmation",get:function(){return this.applicantForm.get("applicantEmailConfirmation")}},{key:"applicantLastName",get:function(){return this.applicantForm.get("applicantLastName")}},{key:"applicantFirstName",get:function(){return this.applicantForm.get("applicantFirstName")}},{key:"applicantPhoneNumber",get:function(){return this.applicantForm.get("applicantPhoneNumber")}},{key:"applicantOtherPhoneNumber",get:function(){return this.applicantForm.get("applicantOtherPhoneNumber")}},{key:"isResidentControl",get:function(){return this.applicantForm.get("applicantAddress.isResident")}},{key:"address",get:function(){return this.applicantForm.get("applicantAddress.address")}},{key:"zipCode",get:function(){return this.applicantForm.get("applicantAddress.zipCode")}},{key:"city",get:function(){return this.applicantForm.get("applicantAddress.city")}},{key:"civicNumber",get:function(){return this.applicantForm.get("applicantAddress.civicNumber")}},{key:"searchStreet",get:function(){return this.applicantForm.get("applicantAddress.searchStreet")}},{key:"streetName",get:function(){return this.applicantForm.get("applicantAddress.streetName")}},{key:"suffix",get:function(){return this.applicantForm.get("applicantAddress.suffix")}},{key:"apartement",get:function(){return this.applicantForm.get("applicantAddress.apartment")}},{key:"googleCompleteAddress",get:function(){return this.applicantForm.get("applicantAddress.googleCompleteAddress")}},{key:"registrationNumber",get:function(){return this.applicantForm.get("applicantAddress.registrationNumber")}}]),e}()).\u0275fac=function(e){return new(e||D$)(Qf(Ry),Qf(n$),Qf(Bq),Qf(zq),Qf(_k),Qf(JN))},D$.\u0275cmp=zl({type:D$,selectors:[["pel-request-qs-applicant"]],viewQuery:function(e,t){var n;1&e&&my(r$,!0),2&e&&py(n=yy())&&(t.autocomplete=n.first)},inputs:{applicant:"applicant",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting"},outputs:{isApplicantContractor:"isApplicantContractor",stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:85,vars:51,consts:function(){return[[3,"formGroup"],[1,"d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],[1,"font-weight-bold","text-primary"],"Demandeur",[1,"form-row",3,"hidden"],[1,"form-group","col"],[1,"d-block"],"Type de demandeur",["type","button","data-testid","A470C7FE-3FC6-40E8-B360-191EE15E002A",1,"btn","mr-1",3,"ngClass","click"]," Particulier",["type","button","data-testid","F12E8F5A-B3FA-4063-88B9-A126F0792DA5",1,"btn",3,"ngClass","click"]," Entreprise",[1,"form-row"],["for","applicantLastName"],[4,"ngIf"],["type","text","id","applicantLastName","name","applicantLastName","formControlName","applicantLastName","data-testid","EFA77D31-441D-4FE7-9A26-C6C4461865C9",1,"form-control",3,"maxlength"],[1,"invalid-feedback"],["class","form-group col-6",4,"ngIf"],["for","applicantEmail"],"Courriel",["type","email","id","applicantEmail","name","applicantEmail","formControlName","applicantEmail","data-testid","2D6BD451-6949-4328-8ABD-023EF7E5B8D6",1,"form-control",3,"maxlength"],["for","applicantEmailConfirmation"]," Confirmation du courriel",["type","email","id","applicantEmailConfirmation","name","applicantEmailConfirmation","formControlName","applicantEmailConfirmation","data-testid","925A5F6B-8EB5-4102-933C-F329109D1712",1,"form-control",3,"maxlength"],[1,"form-group","col-6"],["for","applicantPhoneNumber"],"T\xE9l\xE9phone (principal)",["type","tel","mask","000 000-0000","id","applicantPhoneNumber","name","applicantPhoneNumber","formControlName","applicantPhoneNumber","data-testid","6FED0A9D-0D5D-4222-9EE6-7931764299F2",1,"form-control",3,"specialCharacters"],["for","applicantOtherPhoneNumber"],"T\xE9l\xE9phone (autre)",["type","tel","mask","000 000-0000","id","applicantOtherPhoneNumber","name","applicantOtherPhoneNumber","formControlName","applicantOtherPhoneNumber","data-testid","CE163596-F71A-4CEC-836D-72CBE7793533",1,"form-control",3,"specialCharacters"],["formGroupName","applicantAddress",1,"mt-4"],["class","form-row",4,"ngIf"],["class","mb-3 form-group alert alert-warning p-3","role","alert","data-testid","830B5BCE-28F0-458C-9FA6-6BAB384B3F53",4,"ngIf"],["class","form-group col-7",4,"ngIf"],["class","form-group col-5",4,"ngIf"],[1,"form-group","col-12"],["type","text","id","googleAutocomplete","data-testid","826CEEDA-4FEE-4B34-9319-6DAD26B219DF","name","googleCompleteAddress","maxlength","128","formControlName","googleCompleteAddress","placeholder","Commencez \xE0 taper une adresse...",1,"form-control",3,"keydown"],["data-testid","8B69E093-5C70-4D26-9063-5929672BD2D6",1,"text-primary",3,"click"],"Je ne trouve pas mon adresse dans la liste. ",[1,"ml-1",3,"icon"],[1,"text-muted","my-3"],"* Champs obligatoires",["type","submit","class","btn btn-primary btn-rounded btn-big w-100","data-testid","98991F61-C567-4303-9BA0-7E3772863E1F",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","C8869F78-1588-4915-B7CB-E28063A72123",3,"disabled","click",4,"ngIf"]," Nom"," Nom d'entreprise"," Veuillez entrer le nom du demandeur. ",["for","applicantFirstName"],"Pr\xE9nom",["type","text","id","applicantFirstName","name","applicantFirstName","formControlName","applicantFirstName","data-testid","CE8D2124-D6E9-4049-B65D-66BC251C9D96",1,"form-control",3,"maxlength"]," Veuillez entrer le pr\xE9nom du demandeur. "," Veuillez entrer le courriel du demandeur. "," Veuillez entrer une adresse courriel valide. "," Veuillez entrer le courriel du demandeur. "," Veuillez entrer une adresse courriel valide. "," Les adresses courriel ne correspondent pas. "," Veuillez entrer le num\xE9ro de t\xE9l\xE9phone du demandeur. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. ",[1,"custom-control","custom-checkbox","mb-3"],["type","checkbox","id","isResident","name","isResident","formControlName","isResident","data-testid","853A9826-82CC-4C48-A9F9-5EA02CAF7E20",1,"custom-control-input",3,"change"],["for","isResident",1,"custom-control-label"],"Je r\xE9side \xE0 " + "\ufffd0\ufffd" + "",[1,"form-group","col-4"],["for","addressCivicNumber"],"N" + "\ufffd#5\ufffd" + "o" + "\ufffd/#5\ufffd" + " civique",["type","text","inputmode","numeric","mask","9999999999","id","addressCivicNumber","name","civicNumber","formControlName","civicNumber","data-testid","1FCE9902-3858-448F-B52D-5E795E297E29",1,"form-control",3,"specialCharacters","maxlength","change"],["for","addressSuffix"],"Suffixe",["type","text","id","addressSuffix","name","suffix","formControlName","suffix","data-testid","311A6A89-C7A9-41A2-B918-1673A7F50B28",1,"form-control",3,"maxlength","change"],["for","addressApartment"],"App. ou local",["type","text","id","addressApartment","name","apartment","formControlName","apartment","data-testid","22BF01B1-5E6B-4C23-BC80-286A6C45E5B2",1,"form-control",3,"maxlength","change"]," Veuillez saisir un n" + "\ufffd#2\ufffd" + "o" + "\ufffd/#2\ufffd" + " civique. ",["for","addressStreet"],"Voie publique",[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"ml-2",3,"icon","spin"],["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["matInput","","type","text","id","addressStreet","name","searchStreet","formControlName","searchStreet","aria-describedby","addressStreetHelp","placeholder","Rue, avenue, boulevard, chemin, route, etc.","data-testid","719C7F35-98FB-465C-8D89-DAF51503850C",1,"form-control",3,"matAutocomplete","maxlength","change"],[3,"displayWith","optionSelected"],["autoStreet","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]," Veuillez selectionner une voie dans la liste sugg\xE9r\xE9e. ",["role","alert","data-testid","830B5BCE-28F0-458C-9FA6-6BAB384B3F53",1,"mb-3","form-group","alert","alert-warning","p-3"],"La propri\xE9t\xE9 recherch\xE9e n'a pas \xE9t\xE9 trouv\xE9e \xE0 notre r\xF4le d'\xE9valuation.",[1,"text-primary",3,"click"],"Entrer mon adresse manuellement",["for","streetName"],"Voie publique",["type","text","id","streetName","data-testid","6686CCE7-F39E-4D56-9E8D-5C8E1B189679","name","streetName","formControlName","streetName","placeholder","Rue, avenue, boulevard, chemin, route, etc.",1,"form-control"],["type","hidden","formControlName","registrationNumber"],[1,"form-group","col-7"],["for","city"],["type","text","id","city","name","city","formControlName","city","data-testid","3253E256-A304-4DED-8E9B-660B01407C08",1,"form-control",3,"maxlength"],[1,"form-group","col-5"],["for","zipCode"],"Code postal",["type","text","mask","S0S 0S0","id","zipCode","name","zipCode","formControlName","zipCode","data-testid","F0666A3C-40CF-4682-85F6-FCD970689044",1,"form-control",3,"specialCharacters"],["type","submit","data-testid","98991F61-C567-4303-9BA0-7E3772863E1F",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled","click"],"Continuer",["type","submit","data-testid","C8869F78-1588-4915-B7CB-E28063A72123",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"]]},template:function(e,t){1&e&&($f(0,"div"),$f(1,"form",0),$f(2,"h5",1),$f(3,"div",2),Yf(4,"fa-icon",3),Jf(),$f(5,"span",4),Rg(6,5),Jf(),Jf(),$f(7,"div",6),$f(8,"div",7),$f(9,"label",8),Kf(10),Rg(11,9),Zf(),Cm(12,"\xa0* "),Jf(),$f(13,"button",10),nm("click",function(){return t.onIsApplicantContractorChange(!1)}),Rg(14,11),Jf(),$f(15,"button",12),nm("click",function(){return t.onIsApplicantContractorChange(!0)}),Rg(16,13),Jf(),Jf(),Jf(),$f(17,"div",14),$f(18,"div",7),$f(19,"label",15),Uf(20,i$,2,0,"ng-container",16),Uf(21,o$,2,0,"ng-container",16),Cm(22,"\xa0* "),Jf(),Yf(23,"input",17),$f(24,"div",18),Uf(25,a$,2,0,"div",16),Jf(),Jf(),Uf(26,l$,8,4,"div",19),Jf(),$f(27,"div",14),$f(28,"div",7),$f(29,"label",20),Kf(30),Rg(31,21),Zf(),Cm(32,"\xa0* "),Jf(),Yf(33,"input",22),$f(34,"div",18),Uf(35,u$,2,0,"div",16),Uf(36,c$,2,0,"div",16),Jf(),Jf(),Jf(),$f(37,"div",14),$f(38,"div",7),$f(39,"label",23),Kf(40),Rg(41,24),Zf(),Cm(42,"\xa0* "),Jf(),Yf(43,"input",25),$f(44,"div",18),Uf(45,d$,2,0,"div",16),Uf(46,h$,2,0,"div",16),Uf(47,p$,2,0,"div",16),Jf(),Jf(),Jf(),$f(48,"div",14),$f(49,"div",26),$f(50,"label",27),Kf(51),Rg(52,28),Zf(),Cm(53,"\xa0* "),Jf(),Yf(54,"input",29),$f(55,"div",18),Uf(56,f$,2,0,"div",16),Uf(57,m$,2,0,"div",16),Jf(),Jf(),$f(58,"div",26),$f(59,"label",30),Kf(60),Rg(61,31),Zf(),Jf(),Yf(62,"input",32),$f(63,"div",18),Uf(64,g$,2,0,"div",16),Jf(),Jf(),Jf(),$f(65,"div",33),Uf(66,v$,5,1,"div",34),Uf(67,_$,17,8,"div",34),Uf(68,P$,10,4,"div",34),Uf(69,k$,7,1,"div",35),Uf(70,E$,7,0,"div",34),$f(71,"div",14),Uf(72,A$,5,2,"div",36),Uf(73,T$,5,2,"div",37),Jf(),$f(74,"div",6),$f(75,"div",38),$f(76,"input",39),nm("keydown",function(){return t.resetAddress()}),Jf(),$f(77,"div",40),nm("click",function(){return t.switchToManual()}),Kf(78),Rg(79,41),Zf(),Yf(80,"fa-icon",42),Jf(),Jf(),Jf(),Jf(),$f(81,"p",43),Rg(82,44),Jf(),Uf(83,O$,4,2,"button",45),Uf(84,V$,5,3,"button",46),Jf(),Jf()),2&e&&(dp(1),Wf("formGroup",t.applicantForm),dp(3),Wf("icon",t.farUser),dp(3),Wf("hidden",t.isReadOnlyMode),dp(6),Wf("ngClass",Wv(43,F$,!t.isApplicantContractor,t.isApplicantContractor)),dp(2),Wf("ngClass",Wv(46,F$,t.isApplicantContractor,!t.isApplicantContractor)),dp(3),gm("col-6",!t.isApplicantContractor),dp(2),Wf("ngIf",!t.isApplicantContractor),dp(1),Wf("ngIf",t.isApplicantContractor),dp(2),gm("is-invalid",t.applicantLastName.touched&&!t.applicantLastName.valid),Wf("maxlength",t.fieldsMaxLength.applicantLastName),dp(2),Wf("ngIf",null==t.applicantLastName.errors?null:t.applicantLastName.errors.required),dp(1),Wf("ngIf",!t.isApplicantContractor),dp(7),gm("is-invalid",t.applicantEmail.touched&&!t.applicantEmail.valid),Wf("maxlength",t.fieldsMaxLength.applicantEmail),dp(2),Wf("ngIf",null==t.applicantEmail.errors?null:t.applicantEmail.errors.required),dp(1),Wf("ngIf",null==t.applicantEmail.errors?null:t.applicantEmail.errors.pattern),dp(7),gm("is-invalid",t.applicantEmailConfirmation.touched&&(!t.applicantEmailConfirmation.valid||t.applicantForm.hasError("notMatching"))),Wf("maxlength",t.fieldsMaxLength.applicantEmail),dp(2),Wf("ngIf",null==t.applicantEmailConfirmation.errors?null:t.applicantEmailConfirmation.errors.required),dp(1),Wf("ngIf",null==t.applicantEmailConfirmation.errors?null:t.applicantEmailConfirmation.errors.pattern),dp(1),Wf("ngIf",t.applicantForm.hasError("notMatching")),dp(7),gm("is-invalid",t.applicantPhoneNumber.touched&&!t.applicantPhoneNumber.valid),Wf("specialCharacters",Qv(49,M$)),dp(2),Wf("ngIf",null==t.applicantPhoneNumber.errors?null:t.applicantPhoneNumber.errors.required),dp(1),Wf("ngIf",null==t.applicantPhoneNumber.errors?null:t.applicantPhoneNumber.errors.mask),dp(5),Wf("specialCharacters",Qv(50,M$)),dp(2),Wf("ngIf",null==t.applicantOtherPhoneNumber.errors?null:t.applicantOtherPhoneNumber.errors.mask),dp(2),Wf("ngIf",!t.isManualMode),dp(1),Wf("ngIf",t.isResident||t.isManualMode),dp(1),Wf("ngIf",t.isResident),dp(1),Wf("ngIf",t.isAddressNotFound&&!(null!=t.autocomplete&&t.autocomplete.isOpen)&&!t.isLoadingAddress&&t.isResident),dp(1),Wf("ngIf",t.isManualMode),dp(2),Wf("ngIf",!t.isResident&&t.isManualMode),dp(1),Wf("ngIf",t.isResident||t.isManualMode),dp(1),Wf("hidden",t.isResident||t.isManualMode),dp(6),Wf("icon",t.farLongArrowRight),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[XP,lP,nk,DM,D_,M_,OS,sP,gk,yk,QR,ik,AS,W_,G_,$T,zT,L_,XA],pipes:[ow],styles:[""]}),D$),j$=function(e){return e.RequesterAddress="RequesterAddress",e.ManualAddress="ManualAddress",e.LocationOnMap="LocationOnMap",e}({}),B$=new Set,z$=((L$=function(){function e(t){is(this,e),this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):U$}return as(e,[{key:"matchMedia",value:function(e){return this._platform.WEBKIT&&function(e){if(!B$.has(e))try{N$||((N$=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(N$)),N$.sheet&&(N$.sheet.insertRule("@media ".concat(e," {.fx-query-test{ }}"),0),B$.add(e))}catch(VZ){console.error(VZ)}}(e),this._matchMedia(e)}}]),e}()).\u0275fac=function(e){return new(e||L$)(md(Ek))},L$.\u0275prov=dl({factory:function(){return new L$(md(Ek))},token:L$,providedIn:"root"}),L$);function U$(e){return{matches:"all"===e||""===e,media:e,addListener:function(){},removeListener:function(){}}}var H$,Q$=((H$=function(){function e(t,n){is(this,e),this._mediaMatcher=t,this._zone=n,this._queries=new Map,this._destroySubject=new Es}return as(e,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(e){var t=this;return W$(tE(e)).some(function(e){return t._registerQuery(e).mql.matches})}},{key:"observe",value:function(e){var t=this,n=eV(W$(tE(e)).map(function(e){return t._registerQuery(e).observable}));return(n=ZE(n.pipe(Kk(1)),n.pipe(rG(1),Bk(0)))).pipe(Ms(function(e){var t={matches:!1,breakpoints:{}};return e.forEach(function(e){var n=e.matches,r=e.query;t.matches=t.matches||n,t.breakpoints[r]=n}),t}))}},{key:"_registerQuery",value:function(e){var t=this;if(this._queries.has(e))return this._queries.get(e);var n=this._mediaMatcher.matchMedia(e),r={observable:new ws(function(e){var r=function(n){return t._zone.run(function(){return e.next(n)})};return n.addListener(r),function(){n.removeListener(r)}}).pipe(XE(n),Ms(function(t){var n=t.matches;return{query:e,matches:n}}),cI(this._destroySubject)),mql:n};return this._queries.set(e,r),r}}]),e}()).\u0275fac=function(e){return new(e||H$)(md(z$),md(Hy))},H$.\u0275prov=dl({factory:function(){return new H$(md(z$),md(Hy))},token:H$,providedIn:"root"}),H$);function W$(e){return e.map(function(e){return e.split(",")}).reduce(function(e,t){return e.concat(t)}).map(function(e){return e.trim()})}var G$,$$,J$,Y$,K$={tooltipState:Zw("state",[nC("initial, void, hidden",tC({opacity:0,transform:"scale(0)"})),nC("visible",tC({transform:"scale(1)"})),rC("* => visible",Xw("200ms cubic-bezier(0, 0, 0.2, 1)",(G$=[tC({opacity:0,transform:"scale(0)",offset:0}),tC({opacity:.5,transform:"scale(0.99)",offset:.5}),tC({opacity:1,transform:"scale(1)",offset:1})],{type:5,steps:G$}))),rC("* => hidden",Xw("100ms cubic-bezier(0, 0, 0.2, 1)",tC({opacity:0})))])},Z$=Ik({passive:!0}),X$=new $c("mat-tooltip-scroll-strategy"),eJ={provide:X$,deps:[_T],useFactory:function(e){return function(){return e.scrollStrategies.reposition({scrollThrottle:20})}}},tJ=new $c("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),nJ=((Y$=function(){function e(t,n,r,i,o,a,s,l,u,c,d){var h=this;is(this,e),this._overlay=t,this._elementRef=n,this._scrollDispatcher=r,this._viewContainerRef=i,this._ngZone=o,this._platform=a,this._ariaDescriber=s,this._focusMonitor=l,this._dir=c,this._defaultOptions=d,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Es,this._handleKeydown=function(e){h._isTooltipVisible()&&27===e.keyCode&&!Rk(e)&&(e.preventDefault(),e.stopPropagation(),h._ngZone.run(function(){return h.hide(0)}))},this._scrollStrategy=u,d&&(d.position&&(this.position=d.position),d.touchGestures&&(this.touchGestures=d.touchGestures)),o.runOutsideAngular(function(){n.nativeElement.addEventListener("keydown",h._handleKeydown)})}return as(e,[{key:"ngAfterViewInit",value:function(){var e=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(cI(this._destroyed)).subscribe(function(t){t?"keyboard"===t&&e._ngZone.run(function(){return e.show()}):e._ngZone.run(function(){return e.hide(0)})})}},{key:"ngOnDestroy",value:function(){var e=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),e.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(function(t){var n=Ua(t,2),r=n[0],i=n[1];e.removeEventListener(r,i,Z$)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message),this._focusMonitor.stopMonitoring(e)}},{key:"show",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new NI(rJ,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(cI(this._destroyed)).subscribe(function(){return e._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(e)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var e=this;if(this._overlayRef)return this._overlayRef;var t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return n.positionChanges.pipe(cI(this._destroyed)).subscribe(function(t){e._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&e._tooltipInstance.isVisible()&&e._ngZone.run(function(){return e.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(cI(this._destroyed)).subscribe(function(){return e._detach()}),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var e=this._overlayRef.getConfig().positionStrategy,t=this._getOrigin(),n=this._getOverlayPosition();e.withPositions([Object.assign(Object.assign({},t.main),n.main),Object.assign(Object.assign({},t.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var e,t=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?e={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&t||"right"==n&&!t?e={originX:"start",originY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(e={originX:"end",originY:"center"});var r=this._invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:r.x,originY:r.y}}}},{key:"_getOverlayPosition",value:function(){var e,t=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?e={overlayX:"center",overlayY:"bottom"}:"below"==n?e={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&t||"right"==n&&!t?e={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(e={overlayX:"start",overlayY:"center"});var r=this._invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:r.x,overlayY:r.y}}}},{key:"_updateTooltipMessage",value:function(){var e=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Kk(1),cI(this._destroyed)).subscribe(function(){e._tooltipInstance&&e._overlayRef.updatePosition()}))}},{key:"_setTooltipClass",value:function(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(e,t){return"above"===this.position||"below"===this.position?"top"===t?t="bottom":"bottom"===t&&(t="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:t}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var e=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){e._setupPointerExitEventsIfNeeded(),e.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){e._setupPointerExitEventsIfNeeded(),clearTimeout(e._touchstartTimeout),e._touchstartTimeout=setTimeout(function(){return e.show()},500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var e,t=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return t.hide()}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var r=function(){clearTimeout(t._touchstartTimeout),t.hide(t._defaultOptions.touchendHideDelay)};n.push(["touchend",r],["touchcancel",r])}this._addListeners(n),(e=this._passiveListeners).push.apply(e,n)}}},{key:"_addListeners",value:function(e){var t=this;e.forEach(function(e){var n=Ua(e,2),r=n[0],i=n[1];t._elementRef.nativeElement.addEventListener(r,i,Z$)})}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_disableNativeGesturesIfNecessary",value:function(){var e=this.touchGestures;if("off"!==e){var t=this._elementRef.nativeElement,n=t.style;("on"===e||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==e&&t.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=eE(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(e){var t=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=e?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){t._ariaDescriber.describe(t._elementRef.nativeElement,t.message)})}))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),e}()).\u0275fac=function(e){return new(e||Y$)(Qf(_T),Qf(Yg),Qf(TI),Qf(Ov),Qf(Hy),Qf(Ek),Qf(vE),Qf(FE),Qf(X$),Qf($E,8),Qf(tJ,8))},Y$.\u0275dir=$l({type:Y$,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),Y$),rJ=((J$=function(){function e(t,n){is(this,e),this._changeDetectorRef=t,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new Es,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)")}return as(e,[{key:"show",value:function(e){var t=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){t._visibility="visible",t._showTimeoutId=null,t._markForCheck()},e)}},{key:"hide",value:function(e){var t=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){t._visibility="hidden",t._hideTimeoutId=null,t._markForCheck()},e)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(e){var t=e.toState;"hidden"!==t||this.isVisible()||this._onHide.next(),"visible"!==t&&"hidden"!==t||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),e}()).\u0275fac=function(e){return new(e||J$)(Qf(bv),Qf(Q$))},J$.\u0275cmp=zl({type:J$,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,t){1&e&&nm("click",function(){return t._handleBodyInteraction()},!1,mh),2&e&&mm("zoom","visible"===t._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(e,t){var n;(1&e&&($f(0,"div",0),nm("@state.start",function(){return t._animationStart()})("@state.done",function(e){return t._animationDone(e)}),Jv(1,"async"),Cm(2),Jf()),2&e)&&(gm("mat-tooltip-handset",null==(n=Yv(1,5,t._isHandset))?null:n.matches),Wf("ngClass",t.tooltipClass)("@state",t._visibility),dp(2),xm(t.message))},directives:[D_],pipes:[ow],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[K$.tooltipState]},changeDetection:0}),J$),iJ=(($$=function e(){is(this,e)}).\u0275mod=Wl({type:$$}),$$.\u0275inj=hl({factory:function(e){return new(e||$$)},providers:[eJ],imports:[[WE,lw,CT,oA],oA,RI]}),$$),oJ=["autoStreet"];function aJ(e,t){if(1&e){var n=Xf();$f(0,"button",23),nm("click",function(){return Nu(n),sm(3).onFormSubmit()}),Kf(1),Rg(2,24),Zf(),Yf(3,"fa-icon",25),Jf()}if(2&e){var r=sm(3);Wf("disabled",r.isSubmitting),dp(3),Wf("icon",r.farLongArrowRight)}}function sJ(e,t){1&e&&Yf(0,"fa-icon",30),2&e&&Wf("icon",sm(4).farSpinnerThird)("spin",!0)}function lJ(e,t){if(1&e){var n=Xf();$f(0,"button",26),nm("click",function(){return Nu(n),sm(3).onFormSubmit(!1,!0)}),Yf(1,"fa-icon",27),Kf(2),Rg(3,28),Zf(),Uf(4,sJ,1,2,"fa-icon",29),Jf()}if(2&e){var r=sm(3);Wf("disabled",r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}function uJ(e,t){if(1&e&&($f(0,"div",18),Kf(1),$f(2,"div",19),Kf(3),$f(4,"span",10),Rg(5,20),Jf(),Zf(),Jf(),Zf(),Uf(6,aJ,4,2,"button",21),Uf(7,lJ,5,3,"button",22),Jf()),2&e){var n=sm(2);Wf("@slideInOut",void 0),dp(6),Wf("ngIf",!n.isReadOnlyMode),dp(1),Wf("ngIf",!n.isReadOnlyMode)}}function cJ(e,t){if(1&e){var n=Xf();$f(0,"div",2),$f(1,"a",3),nm("click",function(){Nu(n);var e=sm();return e.onLocationExpanded(e.locationTypeEnum.RequesterAddress)}),$f(2,"div",4),$f(3,"div",5),$f(4,"div",4),$f(5,"div",6),$f(6,"div",7),Yf(7,"fa-icon",8),Jf(),Jf(),$f(8,"div",15),$f(9,"span",10),Rg(10,16),Jf(),$f(11,"div",17),Kf(12),Cm(13),Zf(),Jf(),Jf(),Jf(),Jf(),$f(14,"div",12),Yf(15,"fa-icon",8),Jf(),Jf(),Jf(),Uf(16,uJ,8,3,"div",13),Jf()}if(2&e){var r=sm();gm("expanded",r.isLocationExpanded(r.locationTypeEnum.RequesterAddress)),dp(7),Wf("icon",r.farHouseUser),dp(6),Sm(" ",r.aplicantAddress," "),dp(2),Wf("icon",r.farChevronDown),dp(1),Wf("ngIf",r.isLocationExpanded(r.locationTypeEnum.RequesterAddress))}}function dJ(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",30),Yf(2,"input",51),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farSpinnerThird)("spin",!0)}}function hJ(e,t){if(1&e&&($f(0,"mat-option",56),$f(1,"span"),Cm(2),Jf(),Jf()),2&e){var n=t.$implicit;Wf("value",n),dp(2),xm(n.voieComplet)}}function pJ(e,t){if(1&e){var n=Xf();Kf(0),Yf(1,"input",52),$f(2,"mat-autocomplete",53,54),nm("optionSelected",function(e){return Nu(n),sm(2).selectStreet(e)}),Uf(4,hJ,3,2,"mat-option",55),Jv(5,"async"),Jf(),Zf()}if(2&e){var r=Hf(3),i=sm(2);dp(1),gm("is-invalid",(i.searchStreet.touched||i.searchStreet.dirty)&&!i.searchStreet.valid),Wf("matAutocomplete",r)("maxlength",i.fieldsMaxLength.searchStreet),dp(1),Wf("displayWith",i.displayStreet),dp(2),Wf("ngForOf",Yv(5,6,i.filteredStreets))}}function fJ(e,t){1&e&&($f(0,"div"),Rg(1,57),Jf())}function mJ(e,t){1&e&&($f(0,"div",58),$f(1,"span"),Rg(2,59),Jf(),Jf())}function gJ(e,t){if(1&e){var n=Xf();$f(0,"div",60),$f(1,"span"),Rg(2,61),Jf(),$f(3,"span",62),nm("click",function(){Nu(n);var e=sm(2);return e.onLocationExpanded(e.locationTypeEnum.LocationOnMap)}),Kf(4),Rg(5,63),Zf(),Jf(),Jf()}}function vJ(e,t){if(1&e){var n=Xf();$f(0,"button",64),nm("click",function(){return Nu(n),sm(2).onFormSubmit()}),Kf(1),Rg(2,65),Zf(),Yf(3,"fa-icon",25),Jf()}if(2&e){var r=sm(2);Wf("disabled",r.qsLocationForm.invalid||!r.isAddressValid||r.isSubmitting),dp(3),Wf("icon",r.farLongArrowRight)}}function yJ(e,t){1&e&&Yf(0,"fa-icon",30),2&e&&Wf("icon",sm(3).farSpinnerThird)("spin",!0)}function bJ(e,t){if(1&e){var n=Xf();$f(0,"button",66),nm("click",function(){return Nu(n),sm(2).onFormSubmit(!1,!0)}),Yf(1,"fa-icon",27),Kf(2),Rg(3,67),Zf(),Uf(4,yJ,1,2,"fa-icon",29),Jf()}if(2&e){var r=sm(2);Wf("disabled",r.qsLocationForm.invalid||!r.isAddressValid||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var _J=function(){return[]};function wJ(e,t){if(1&e){var n=Xf();$f(0,"div",18),$f(1,"form",31),$f(2,"div",32),$f(3,"label",33),Kf(4),Tg(5,34),Yf(6,"sup"),Og(),Zf(),Jf(),$f(7,"input",35),nm("change",function(){return Nu(n),sm().addressFieldsChange()}),Jf(),Jf(),$f(8,"div",36),$f(9,"label",37),Kf(10),Rg(11,38),Zf(),Cm(12,"\xa0* "),Jf(),Kf(13,39),Uf(14,dJ,3,2,"ng-container",40),Uf(15,pJ,6,8,"ng-container",40),Zf(),$f(16,"div",41),Uf(17,fJ,2,0,"div",42),Jf(),Uf(18,mJ,3,0,"div",43),Uf(19,gJ,6,0,"div",44),Uf(20,vJ,4,2,"button",45),Uf(21,bJ,5,3,"button",46),Yf(22,"input",47),Yf(23,"input",48),Yf(24,"input",49),Yf(25,"input",50),Jf(),Jf(),Jf()}if(2&e){var r=sm();Wf("@slideInOut",void 0),dp(1),Wf("formGroup",r.qsLocationForm),dp(6),Wf("specialCharacters",Qv(12,_J))("maxlength",r.fieldsMaxLength.civicNumber),dp(6),Wf("ngSwitch",r.streetsState),dp(1),Wf("ngSwitchCase",r.viewStateEnum.Loading),dp(1),Wf("ngSwitchCase",r.viewStateEnum.Ready),dp(2),Wf("ngIf",(null==r.searchStreet.errors?null:r.searchStreet.errors.required)||(null==r.searchStreet.errors?null:r.searchStreet.errors.invalid)),dp(1),Wf("ngIf",r.isAddressNotFound&&!(null!=r.autocomplete&&r.autocomplete.isOpen)),dp(1),Wf("ngIf",!r.isReadOnlyMode),dp(1),Wf("ngIf",!r.isReadOnlyMode),dp(1),Wf("ngIf",!r.isReadOnlyMode)}}function CJ(e,t){if(1&e){var n=Xf();$f(0,"button",76),nm("click",function(){return Nu(n),sm(2).setCurrentLocation(!0)}),Yf(1,"fa-icon",77),Kf(2),Rg(3,78),Zf(),Jf()}if(2&e){var r=sm(2);Wf("disabled",!r.currentLocationEnabled),dp(1),Wf("icon",r.farLocation)}}function xJ(e,t){if(1&e&&(Kf(0),Rg(1,79),Zf()),2&e){var n=sm(2);dp(1),Vg(n.googleFormattedAddress),Dg(1)}}function SJ(e,t){1&e&&(Kf(0),Rg(1,80),Zf())}function PJ(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm(2);dp(1),xm(n.addressLocationInvalidLabel)}}function kJ(e,t){1&e&&($f(0,"div",81),$f(1,"span"),Rg(2,82),Jf(),Jf())}function EJ(e,t){if(1&e){var n=Xf();$f(0,"button",83),nm("click",function(){return Nu(n),sm(2).onFormSubmit(!0)}),Kf(1),Rg(2,84),Zf(),Yf(3,"fa-icon",25),Jf()}if(2&e){var r=sm(2);Wf("disabled",!r.hasRealLocation||r.isSubmitting),dp(3),Wf("icon",r.farLongArrowRight)}}function AJ(e,t){1&e&&Yf(0,"fa-icon",30),2&e&&Wf("icon",sm(3).farSpinnerThird)("spin",!0)}function IJ(e,t){if(1&e){var n=Xf();$f(0,"button",85),nm("click",function(){return Nu(n),sm(2).onFormSubmit(!0,!0)}),Yf(1,"fa-icon",27),Kf(2),Rg(3,86),Zf(),Uf(4,AJ,1,2,"fa-icon",29),Jf()}if(2&e){var r=sm(2);Wf("disabled",!r.hasRealLocation||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}function TJ(e,t){if(1&e){var n=Xf();$f(0,"div",18),Kf(1),$f(2,"div",19),Kf(3),$f(4,"div",68),Uf(5,CJ,4,2,"button",69),Jf(),$f(6,"div",36),$f(7,"label"),Uf(8,xJ,2,1,"ng-container",42),Uf(9,SJ,2,0,"ng-container",42),Uf(10,PJ,2,1,"ng-container",42),Jf(),Jf(),$f(11,"span",10),$f(12,"div",70),$f(13,"agm-map",71),nm("mapClick",function(e){return Nu(n),sm().addMarker(e.coords.lat,e.coords.lng)}),Yf(14,"agm-marker",72),Jf(),Jf(),Jf(),Uf(15,kJ,3,0,"div",73),Uf(16,EJ,4,2,"button",74),Uf(17,IJ,5,3,"button",75),Zf(),Jf(),Zf(),Jf()}if(2&e){var r=sm();Wf("@slideInOut",void 0),dp(4),Wf("matTooltip",r.getToolTipLocationDisabled())("matTooltipDisabled",r.currentLocationEnabled),dp(1),Wf("ngIf",!r.isReadOnlyMode),dp(3),Wf("ngIf",r.hasRealLocation&&r.hasLocationInSameCity),dp(1),Wf("ngIf",!r.hasRealLocation),dp(1),Wf("ngIf",r.hasRealLocation&&!r.hasLocationInSameCity),dp(3),Wf("latitude",r.latitude)("zoom",15)("longitude",r.longitude),dp(1),Wf("latitude",r.latitude)("longitude",r.longitude),dp(1),Wf("ngIf",r.isAddressNotFound&&!r.hasRealLocation),dp(1),Wf("ngIf",!r.isReadOnlyMode),dp(1),Wf("ngIf",!r.isReadOnlyMode)}}var OJ,RJ=((OJ=function(){function e(t,n,r,i,o){is(this,e),this.localeId=t,this.pelService=n,this.mapsService=r,this.globals=i,this.fb=o,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.iconHelperService=DB,this.viewStateEnum=HM,this.farLongArrowRight=$L,this.farChevronDown=PL,this.farChevronUp=AL,this.farHouseUser=HL,this.farHouse=UL,this.farLocation=WL,this.farfaMapMarkedAlt=YL,this.farSpinnerThird=aF,this.farSave=iF,this.locationTypeEnum=j$,this.expandedLocation="",this.isExpanded=!1,this.aplicantAddress="",this.fieldsMaxLength={address:75,civicNumber:10,suffix:10,apartment:12,searchStreet:75,city:50,zipCode:10},this.addressProperty={registrationNumber:void 0,civicNumber:null,suffix:"",apartment:"",designa:"",discriminant:"",street:""},this.streets=[],this.streetsState=HM.Loading,this.isLoadingAddress=!1,this.isAddressValid=this.isReadOnlyMode}return as(e,[{key:"ngOnInit",value:function(){var e=this;this.addressLocationInvalidLabel=this.globals.getCustomResourceTextByCode("RES_ADRESSE_EMPLACEMENT_VILLE_INVALIDE"),""===this.addressLocationInvalidLabel&&(this.addressLocationInvalidLabel="en"===this.localeId?hj.RES_ADRESSE_EMPLACEMENT_VILLE_INVALIDE_EN:hj.RES_ADRESSE_EMPLACEMENT_VILLE_INVALIDE_FR),this.pelService.getAllStreetsFromRole().subscribe(function(t){e.streets=t.result,e.streetsState=HM.Ready},function(t){e.streetsState=HM.Ready}),this.qsLocationForm=this.fb.group({civicNumber:[this.location?this.location.civicNumber:null,[FS.maxLength(this.fieldsMaxLength.civicNumber)]],searchStreet:[this.location?this.location.searchStreet:"",[FS.required,Dz,FS.maxLength(this.fieldsMaxLength.searchStreet)]],xCoordinate:[this.location?this.location.xCoordinate:null],yCoordinate:[this.location?this.location.yCoordinate:null],registrationNumber:[this.location?this.location.registrationNumber:null],apartment:[this.location?this.location.apartment:null]}),this.filteredStreets=this.searchStreet.valueChanges.pipe(XE(""),Ms(function(t){return e.filterStreet(t)})),this.isReadOnlyMode&&this.qsLocationForm.disable()}},{key:"onLocationExpanded",value:function(e){if(e===this.expandedLocation)this.isExpanded=!this.isExpanded;else switch(this.expandedLocation=e,this.isExpanded=!0,e){case j$.RequesterAddress:this.civicNumber.setValidators(null),this.searchStreet.setValidators(null),this.civicNumber.updateValueAndValidity(),this.searchStreet.updateValueAndValidity(),this.setFormToApplicantValues(this.defaultQSAplicantData);break;case j$.ManualAddress:this.civicNumber.setValidators([FS.maxLength(this.fieldsMaxLength.civicNumber)]),this.searchStreet.setValidators([FS.required,FS.maxLength(this.fieldsMaxLength.searchStreet)]),this.civicNumber.updateValueAndValidity(),this.searchStreet.updateValueAndValidity(),this.setFormToLocationValues(this.location);break;case j$.LocationOnMap:this.civicNumber.setValidators(null),this.searchStreet.setValidators(null),this.civicNumber.updateValueAndValidity(),this.searchStreet.updateValueAndValidity(),this.setCurrentLocation()}}},{key:"isLocationExpanded",value:function(e){return this.expandedLocation===e&&this.isExpanded}},{key:"filterStreet",value:function(e){var t=this,n=[];return this.streets&&(null==e?void 0:e.length)>0&&(e=this.removeAccent(e).replace(/[/\\^$*+?.,()|[\]{}]/g,"").replace(/[-]/g," "),(null==(n=this.streets.filter(function(n){return 0===t.removeAccent(n.voieComplet).toLowerCase().indexOf(e.toLowerCase())}))?void 0:n.length)<5&&(n=Ha(new Set([].concat(Ha(n),Ha(this.filterAllWords(e))))))),n.slice(0,5)}},{key:"setFormToApplicantValues",value:function(e){var t,n,r,i,o,a,s,l;void 0!==e&&Object.keys(e).length>0&&void 0!==this.qsLocationForm&&(null===(t=this.civicNumber)||void 0===t||t.setValue(null===(n=null==e?void 0:e.applicantAddress)||void 0===n?void 0:n.civicNumber),null===(r=this.searchStreet)||void 0===r||r.setValue(null===(i=null==e?void 0:e.applicantAddress)||void 0===i?void 0:i.searchStreet),null===(o=this.registrationNumber)||void 0===o||o.setValue(null===(a=null==e?void 0:e.applicantAddress)||void 0===a?void 0:a.registrationNumber),null===(s=this.apartment)||void 0===s||s.setValue(null===(l=null==e?void 0:e.applicantAddress)||void 0===l?void 0:l.apartment))}},{key:"setFormToLocationValues",value:function(e){var t,n,r;null===(t=this.civicNumber)||void 0===t||t.setValue((null==e?void 0:e.civicNumber)?e.civicNumber:""),null===(n=this.searchStreet)||void 0===n||n.setValue((null==e?void 0:e.searchStreet)?e.searchStreet:""),null===(r=this.apartment)||void 0===r||r.setValue("")}},{key:"setFormToMapLocationValues",value:function(e){var t,n,r,i,o;null===(t=this.civicNumber)||void 0===t||t.setValue((null==e?void 0:e.civicNumber)?e.civicNumber:""),null===(n=this.searchStreet)||void 0===n||n.setValue((null==e?void 0:e.searchStreet)?e.searchStreet:""),null===(r=this.xCoordinate)||void 0===r||r.setValue((null==e?void 0:e.xCoordinate)?null==e?void 0:e.xCoordinate:""),null===(i=this.yCoordinate)||void 0===i||i.setValue((null==e?void 0:e.yCoordinate)?null==e?void 0:e.yCoordinate:""),null===(o=this.apartment)||void 0===o||o.setValue("")}},{key:"displayStreet",value:function(e){return e&&e.voie?e.voie:""}},{key:"filterAllWords",value:function(e){var t=this,n=e.split(/\s+/g).map(function(e){return e.trim()}).filter(function(e){return!!e}),r=e.endsWith(" "),i=new RegExp(n.map(function(e,t){return t+1!==n.length||r?"(?=.*\\b".concat(e,"\\b)"):"(?=.*\\b".concat(e,")")}).join("")+".+","i");return this.streets.filter(function(e){return i.test(t.removeAccent(e.voieComplet))})}},{key:"selectStreet",value:function(e){this.validateRoleAddress()}},{key:"addressFieldsChange",value:function(){this.searchStreet&&this.validateRoleAddress()}},{key:"validateRoleAddress",value:function(){var e,t=this;if(this.searchStreet.valid)if(null===this.civicNumber.value||""===this.civicNumber.value){var n=this.filterStreet(null===(e=this.searchStreet.value)||void 0===e?void 0:e.voie);this.isAddressValid=0!==(null==n?void 0:n.length),this.isAddressNotFound=!1,this.registrationNumber.setValue("")}else{var r=this.searchStreet.value;this.addressProperty.designa=r.designa,this.addressProperty.street=r.voie,this.addressProperty.civicNumber=parseInt(this.civicNumber.value,10),this.addressProperty.apartment=this.apartment.value,this.addressProperty.discriminant=r.discriminant,this.isLoadingAddress=!0,this.pelService.validateRoleAddress(this.addressProperty,!1).subscribe(function(e){e.result&&""!==e.result?(t.isAddressNotFound=!1,t.isAddressValid=!0,t.registrationNumber.setValue(e.result)):(t.isAddressNotFound=!0,t.isAddressValid=!1),t.isLoadingAddress=!1},function(e){t.isLoadingAddress=!1})}}},{key:"onFormSubmit",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n)this.addressProperty.street=this.googleStreet,this.addressProperty.civicNumber=parseInt(this.civicNumber.value,10),this.addressProperty.apartment=this.apartment.value,this.pelService.validateMapAddressWithRole(this.addressProperty).subscribe(function(e){var n,i;if(e.result){if(void 0!==e.result&&Object.keys(e.result).length>0){var o=Object.values(e.result),a=Object.keys(e.result);a&&t.registrationNumber.setValue(a[0]),t.searchStreet.setValue(o[0]),t.isAddressNotFound=!1,null===(n=t.xCoordinate)||void 0===n||n.setValue(t.longitude),null===(i=t.yCoordinate)||void 0===i||i.setValue(t.latitude),r?t.stepSubmitIsSaveForLater.emit(t.qsLocationForm.value):t.stepSubmit.emit(t.qsLocationForm.value)}}else t.isAddressNotFound=!0;t.isLoadingAddress=!1},function(e){t.isLoadingAddress=!1});else if(this.isReadOnlyMode)this.stepSubmit.emit(this.qsLocationForm.value);else if(this.searchStreet.valid)if(null===this.civicNumber.value||""===this.civicNumber.value){var i=this.filterStreet(null===(e=this.searchStreet.value)||void 0===e?void 0:e.voie);this.isAddressValid=0!==(null==i?void 0:i.length),this.isAddressNotFound=!1,this.registrationNumber.setValue(""),this.isAddressValid&&(r?this.stepSubmitIsSaveForLater.emit(this.qsLocationForm.value):this.stepSubmit.emit(this.qsLocationForm.value))}else{var o=this.searchStreet.value;this.addressProperty.designa=o.designa,this.addressProperty.street=o.voie,this.addressProperty.civicNumber=parseInt(this.civicNumber.value,10),this.addressProperty.apartment=this.apartment.value,this.addressProperty.discriminant=o.discriminant,this.isLoadingAddress=!0,this.pelService.validateRoleAddress(this.addressProperty,!1).subscribe(function(e){e.result&&""!==e.result?(t.isAddressNotFound=!1,t.isAddressValid=!0,t.registrationNumber.setValue(e.result)):(t.isAddressNotFound=!0,t.isAddressValid=!1),t.isLoadingAddress=!1,t.isAddressValid&&(r?t.stepSubmitIsSaveForLater.emit(t.qsLocationForm.value):t.stepSubmit.emit(t.qsLocationForm.value))},function(e){t.isLoadingAddress=!1})}}},{key:"addMarker",value:function(e,t){var n=this;this.mapsService.getAddress(e,t).subscribe(function(r){n.selectAddress(r),n.latitude=e,n.longitude=t},function(e){n.mapsService.getLatLan(n.getCityName()).subscribe(function(e){n.selectAddress(e),n.latitude=e.lat(),n.longitude=e.lng()},function(e){console.log(e),n.hasRealLocation=!1})})}},{key:"selectAddress",value:function(e){var t,n;if(this.googleStreet="",e&&e.address_components){var r=this.getAddressComponent(e.address_components,"street_number"),i=this.getAddressComponent(e.address_components,"route"),o=this.getAddressComponent(e.address_components,"locality");""===o&&(o=this.getAddressComponent(e.address_components,"administrative_area_level_3")),i?(this.hasRealLocation=!0,o.toUpperCase()===(null===(t=this.getCityName())||void 0===t?void 0:t.toUpperCase())?(null===(n=this.civicNumber)||void 0===n||n.setValue(r),this.apartment.setValue(""),this.googleStreet=i,this.googleFormattedAddress=e.formatted_address,this.hasLocationInSameCity=!0):this.hasLocationInSameCity=!1):this.hasRealLocation=!1}else this.hasRealLocation=!1}},{key:"getAddressComponent",value:function(e,t){var n=e.find(function(e){if(e.types.includes(t))return e});return n?n.long_name:""}},{key:"setCurrentLocation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(!this.latitude&&!this.longitude||t)&&navigator.geolocation.getCurrentPosition(function(t){e.latitude=t.coords.latitude,e.longitude=t.coords.longitude,e.addMarker(t.coords.latitude,t.coords.longitude),e.currentLocationEnabled=!0},function(t){e.currentLocationEnabled=!1,e.mapsService.getLatLan(e.getCityName()).subscribe(function(t){e.selectAddress(t),e.latitude=t.lat(),e.longitude=t.lng()},function(t){console.log(t),e.hasRealLocation=!1})})}},{key:"getCityName",value:function(){return this.globals.getLocaleCityName()}},{key:"getToolTipLocationDisabled",value:function(){return"en"===this.localeId?"We cannot acces your location":"On ne peut pas acc\xe9der \xe0 votre emplacement"}},{key:"removeAccent",value:function(e){return null==e?void 0:e.replace(/[\xea\xe9\xe8\xeb\xca\xc9\xc8\xcb]/g,"e").replace(/[\xee\xef\xce\xcf]/g,"i").replace(/[\xe7\xc7]/g,"c").replace(/[\xe0\xe2\xe4\xc0\xc2\xc4]/g,"a").replace(/[\xf4\xf6\xd4\xd6]/g,"o").replace(/[\xfb\xf9\xfc\xdb\xd9\xdc]/g,"u").replace(/[\xff]/g,"y")}},{key:"setSearchStreetAllButMatchValidator",value:function(){this.searchStreet.setValidators([FS.required,FS.maxLength(this.fieldsMaxLength.searchStreet)])}},{key:"applicant",set:function(e){var t,n;this.defaultQSAplicantData&&this.defaultQSAplicantData===e||(this.defaultQSAplicantData=e,this.aplicantAddress=null===(n=null===(t=this.defaultQSAplicantData)||void 0===t?void 0:t.applicantAddress)||void 0===n?void 0:n.address)}},{key:"civicNumber",get:function(){return this.qsLocationForm.get("civicNumber")}},{key:"searchStreet",get:function(){return this.qsLocationForm.get("searchStreet")}},{key:"xCoordinate",get:function(){return this.qsLocationForm.get("xCoordinate")}},{key:"yCoordinate",get:function(){return this.qsLocationForm.get("yCoordinate")}},{key:"registrationNumber",get:function(){return this.qsLocationForm.get("registrationNumber")}},{key:"apartment",get:function(){return this.qsLocationForm.get("apartment")}}]),e}()).\u0275fac=function(e){return new(e||OJ)(Qf(Ry),Qf(Bq),Qf(n$),Qf(zq),Qf(_k))},OJ.\u0275cmp=zl({type:OJ,selectors:[["pel-request-qs-location"]],viewQuery:function(e,t){var n;1&e&&my(oJ,!0),2&e&&py(n=yy())&&(t.autocomplete=n.first)},inputs:{applicant:"applicant",location:"location",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:31,vars:11,consts:function(){return[" Veuillez nous indiquer quel endroit est vis\xE9 par cette requ\xEAte.\n",["class","btn btn-content expandable mb-1",3,"expanded",4,"ngIf"],[1,"btn","btn-content","expandable","mb-1"],["href","javascript:void(0);",3,"click"],[1,"d-flex"],[1,"w-100"],[1,"flex-shrink-1","align-self-center"],[1,"icon-circle"],[3,"icon"],[1,"px-2","align-self-center"],[1,"text-primary"],"Entrer une adresse",[1,"flex-shrink-1","align-self-center","icon-expand"],["class","expandable-content",4,"ngIf"],"S\xE9lectionner sur une carte",[1,"px-2"],"Utiliser l'adresse du demandeur",[1,"text-primary-muted","text-small"],[1,"expandable-content"],[1,"mb-3"]," Si l'adresse du demandeur est erron\xE9e, veuillez la modifier \xE0 l'\xE9tape pr\xE9c\xE9dente. ",["type","submit","class","btn btn-primary btn-rounded btn-big w-100","data-testid","7B323D44-10A1-4A3B-9A3A-CF3062207661",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-saveforlater-location btn-big btn-rounded w-100 mt-2","data-testid","37F41F74-60E2-4FB1-A370-7EE287BD8A6A",3,"disabled","click",4,"ngIf"],["type","submit","data-testid","7B323D44-10A1-4A3B-9A3A-CF3062207661",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled","click"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","37F41F74-60E2-4FB1-A370-7EE287BD8A6A",1,"btn","btn-secondary","btn-saveforlater-location","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],[1,"mr-2",3,"icon"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"],[3,"formGroup"],[1,"form-group","col-4"],["for","civicNumber"],"N" + "\ufffd#6\ufffd" + "o" + "\ufffd/#6\ufffd" + " civique",["type","text","inputmode","numeric","mask","9999999999","id","civicNumber","name","civicNumber","formControlName","civicNumber","data-testid","a93a3824-bb0d-4f21-a089-e3596aa06a3c",1,"form-control",3,"specialCharacters","maxlength","change"],[1,"form-group","col-12"],["for","addressStreet"],"Voie publique",[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"invalid-feedback"],[4,"ngIf"],["class","mb-3 form-group alert alert-warning p-3","role","alert","data-testid","830B5BCE-28F0-458C-9FA6-6BAB384B3F53",4,"ngIf"],["class","mt-3","data-testid","2df978ee-ec0c-46bc-b94f-2263a31e34cc",4,"ngIf"],["type","submit","class","btn btn-primary btn-rounded btn-big w-100 mt-3","data-testid","DC98CCBF-D82E-42CE-AC4C-5EA0C5159DE5",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-saveforlater-location btn-big btn-rounded w-100 mt-2","data-testid","95C40288-0FBA-407F-889D-BC1CFA60CDC2",3,"disabled","click",4,"ngIf"],["type","hidden","formControlName","xCoordinate"],["type","hidden","formControlName","yCoordinate"],["type","hidden","formControlName","registrationNumber"],["type","hidden","formControlName","apartment"],["type","text","disabled","","placeholder","Chargement\u2026",1,"form-control"],["matInput","","type","text","id","searchStreet","name","searchStreet","formControlName","searchStreet","placeholder","Rue, avenue, boulevard, chemin, route, etc.","data-testid","0d62197e-c4be-4209-8cfe-00dc4bba707c",1,"form-control",3,"matAutocomplete","maxlength"],[3,"displayWith","optionSelected"],["autoStreet","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]," Veuillez selectionner une voie dans la liste sugg\xE9r\xE9e. ",["role","alert","data-testid","830B5BCE-28F0-458C-9FA6-6BAB384B3F53",1,"mb-3","form-group","alert","alert-warning","p-3"],"La propri\xE9t\xE9 recherch\xE9e n'a pas \xE9t\xE9 trouv\xE9e \xE0 notre r\xF4le d'\xE9valuation.",["data-testid","2df978ee-ec0c-46bc-b94f-2263a31e34cc",1,"mt-3"],"Si vous ne connaissez pas l'emplacement exact, vous pouvez ",[1,"text-primary","link",3,"click"],"utiliser la carte pour le localiser.",["type","submit","data-testid","DC98CCBF-D82E-42CE-AC4C-5EA0C5159DE5",1,"btn","btn-primary","btn-rounded","btn-big","w-100","mt-3",3,"disabled","click"],"Continuer",["type","submit","data-testid","95C40288-0FBA-407F-889D-BC1CFA60CDC2",1,"btn","btn-secondary","btn-saveforlater-location","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],"Enregistrer pour plus tard",["matTooltipClass","custom-tooltip",1,"mb-3",3,"matTooltip","matTooltipDisabled"],["type","submit","class","btn btn-primary btn-rounded btn-big w-100 button","mat-button","","data-testid","17877F28-CECD-4E96-9505-F284855F2A6B",3,"disabled","click",4,"ngIf"],[1,"card-map"],[3,"latitude","zoom","longitude","mapClick"],[3,"latitude","longitude"],["class","mb-3 form-group alert alert-warning p-3","role","alert","data-testid","426CA7B1-1B07-4A04-9D4E-8877EBABD804",4,"ngIf"],["type","submit","class","btn btn-primary btn-rounded btn-big w-100 mt-3","data-testid","E40B9EF9-FB79-49BC-B3C8-ED61EC6E2785",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-saveforlater-location btn-big btn-rounded w-100 mt-2","data-testid","1D5C3F7D-A405-4E23-9401-754241ADE684",3,"disabled","click",4,"ngIf"],["type","submit","mat-button","","data-testid","17877F28-CECD-4E96-9505-F284855F2A6B",1,"btn","btn-primary","btn-rounded","btn-big","w-100","button",3,"disabled","click"],[1,"ml-1","icon-padding",3,"icon"],"Utiliser ma localisation actuelle","Adresse : " + "\ufffd0\ufffd" + "","Aucune adresse \xE0 cet emplacement",["role","alert","data-testid","426CA7B1-1B07-4A04-9D4E-8877EBABD804",1,"mb-3","form-group","alert","alert-warning","p-3"],"La propri\xE9t\xE9 recherch\xE9e n'a pas \xE9t\xE9 trouv\xE9e \xE0 notre r\xF4le d'\xE9valuation.",["type","submit","data-testid","E40B9EF9-FB79-49BC-B3C8-ED61EC6E2785",1,"btn","btn-primary","btn-rounded","btn-big","w-100","mt-3",3,"disabled","click"],"Continuer",["type","submit","data-testid","1D5C3F7D-A405-4E23-9401-754241ADE684",1,"btn","btn-secondary","btn-saveforlater-location","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],"Enregistrer pour plus tard"]},template:function(e,t){1&e&&($f(0,"p"),Rg(1,0),Jf(),Uf(2,cJ,17,6,"div",1),$f(3,"div",2),$f(4,"a",3),nm("click",function(){return t.onLocationExpanded(t.locationTypeEnum.ManualAddress)}),$f(5,"div",4),$f(6,"div",5),$f(7,"div",4),$f(8,"div",6),$f(9,"div",7),Yf(10,"fa-icon",8),Jf(),Jf(),$f(11,"div",9),$f(12,"span",10),Rg(13,11),Jf(),Jf(),Jf(),Jf(),$f(14,"div",12),Yf(15,"fa-icon",8),Jf(),Jf(),Jf(),Uf(16,wJ,26,13,"div",13),Jf(),$f(17,"div",2),$f(18,"a",3),nm("click",function(){return t.onLocationExpanded(t.locationTypeEnum.LocationOnMap)}),$f(19,"div",4),$f(20,"div",5),$f(21,"div",4),$f(22,"div",6),$f(23,"div",7),Yf(24,"fa-icon",8),Jf(),Jf(),$f(25,"div",9),$f(26,"span",10),Rg(27,14),Jf(),Jf(),Jf(),Jf(),$f(28,"div",12),Yf(29,"fa-icon",8),Jf(),Jf(),Jf(),Uf(30,TJ,18,15,"div",13),Jf()),2&e&&(dp(2),Wf("ngIf",(null==t.defaultQSAplicantData.applicantAddress?null:t.defaultQSAplicantData.applicantAddress.isResident)&&t.aplicantAddress),dp(1),gm("expanded",t.isLocationExpanded(t.locationTypeEnum.ManualAddress)),dp(7),Wf("icon",t.farHouse),dp(5),Wf("icon",t.farChevronDown),dp(1),Wf("ngIf",t.isLocationExpanded(t.locationTypeEnum.ManualAddress)),dp(1),gm("expanded",t.isLocationExpanded(t.locationTypeEnum.LocationOnMap)),dp(7),Wf("icon",t.farfaMapMarkedAlt),dp(5),Wf("icon",t.farChevronDown),dp(1),Wf("ngIf",t.isLocationExpanded(t.locationTypeEnum.LocationOnMap)))},directives:[M_,DM,XP,lP,nk,QR,OS,sP,gk,yk,W_,G_,$T,zT,L_,XA,nJ,WG,$G],pipes:[ow],styles:[".pel-grid:first-child{margin-top:-1rem}.req-desc{white-space:pre-wrap}#err-comm{margin-top:-.75rem}agm-map{height:500px;width:100%}.icon-padding{padding-right:10px}.custom-tooltip{background-color:#000}.link{text-decoration:underline;cursor:pointer}"],encapsulation:2,data:{animation:[Zw("slideInOut",[rC(":enter",[tC({overflow:"hidden",height:"0"}),Xw("200ms ease-out",tC({height:"*"}))]),rC(":leave",[Xw("200ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),OJ),VJ=["fileToAdd"];function DJ(e,t){if(1&e&&($f(0,"button",15),Kf(1),Rg(2,16),Zf(),Yf(3,"fa-icon",17),Jf()),2&e){var n=sm();dp(3),Wf("icon",n.farSpinnerThird)("spin",!0)}}function NJ(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"input",25,26),nm("change",function(e){return Nu(n),sm(2).onUploadFiles(e)})("dragenter",function(){return Nu(n),sm(2).setFileDragged(!0)})("dragleave",function(){return Nu(n),sm(2).setFileDragged(!1)})("drop",function(){return Nu(n),sm(2).setFileDragged(!1)}),Jf(),Yf(3,"fa-icon",2),$f(4,"label"),Tg(5,27),Yf(6,"br"),Yf(7,"small"),Og(),Jf(),Zf()}if(2&e){var r=sm(2);dp(3),Wf("icon",r.farCloudUpload),dp(4),Vg(r.maxDocuments)(r.fileMaxSizeMb),Dg(5)}}function LJ(e,t){if(1&e&&(Kf(0),Yf(1,"fa-icon",2),$f(2,"label"),Rg(3,28),Jf(),Zf()),2&e){var n=sm(2);dp(1),Wf("icon",n.farFileTimes)}}function FJ(e,t){if(1&e){var n=Xf();$f(0,"button",33),nm("click",function(){Nu(n);var e=sm().$implicit;return sm(2).onRemoveFile(e)}),Yf(1,"fa-icon",2),Jf()}if(2&e){var r=sm(3);dp(1),Wf("icon",r.farTrashAlt)}}function MJ(e,t){if(1&e&&($f(0,"div",29),$f(1,"span",30),Yf(2,"fa-icon",31),Cm(3),Jf(),Uf(4,FJ,2,1,"button",32),Jf()),2&e){var n=t.$implicit,r=sm(2);Bf("data-testitemid",n.documentFileId),dp(2),Wf("icon",r.farFile),dp(1),Sm("",n.fileName," "),dp(1),Wf("ngIf",!r.isReadOnlyMode)}}function qJ(e,t){if(1&e&&($f(0,"div",34),$f(1,"span",30),Yf(2,"fa-icon",35),Cm(3),Jf(),$f(4,"button",36),Yf(5,"fa-icon",2),Jf(),Jf()),2&e){var n=t.$implicit,r=sm(2);dp(2),Wf("icon",r.farSpinnerThird)("spin",!0),dp(1),Sm("",n," "),dp(2),Wf("icon",r.farTrashAlt)}}function jJ(e,t){if(1&e&&($f(0,"div",37),Cm(1),Jf()),2&e){var n=t.$implicit;dp(1),Sm(" ",n," ")}}function BJ(e,t){if(1&e&&($f(0,"section",18),$f(1,"h5",0),$f(2,"div",1),Yf(3,"fa-icon",2),Jf(),$f(4,"span"),Rg(5,19),Jf(),Jf(),$f(6,"div",20),Uf(7,NJ,8,3,"ng-container",21),Uf(8,LJ,4,1,"ng-container",21),Jf(),Uf(9,MJ,5,4,"div",22),Uf(10,qJ,6,4,"div",23),Uf(11,jJ,2,1,"div",24),Jf()),2&e){var n=sm();dp(3),Wf("icon",n.farCopy),dp(3),gm("dragging",n.fileDragged)("disabled",n.uploadedFile.length+n.filesInProgress.length>=n.maxDocuments),Wf("hidden",n.isReadOnlyMode),dp(1),Wf("ngIf",n.uploadedFile.length+n.filesInProgress.length<n.maxDocuments),dp(1),Wf("ngIf",n.uploadedFile.length+n.filesInProgress.length>=n.maxDocuments),dp(1),Wf("ngForOf",n.uploadedFile),dp(1),Wf("ngForOf",n.filesInProgress),dp(1),Wf("ngForOf",n.messages)}}function zJ(e,t){if(1&e){var n=Xf();$f(0,"button",38),nm("click",function(){return Nu(n),sm().onFormSubmit()}),Kf(1),Rg(2,39),Zf(),Yf(3,"fa-icon",40),Jf()}if(2&e){var r=sm();Wf("disabled",r.qsDetailsForm.invalid||r.isSubmitting),dp(3),Wf("icon",r.farLongArrowRight)}}function UJ(e,t){1&e&&Yf(0,"fa-icon",17),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function HJ(e,t){if(1&e){var n=Xf();$f(0,"button",41),nm("click",function(){return Nu(n),sm().onFormSubmit(!0)}),Yf(1,"fa-icon",31),Kf(2),Rg(3,42),Zf(),Uf(4,UJ,1,2,"fa-icon",43),Jf()}if(2&e){var r=sm();Wf("disabled",r.qsDetailsForm.invalid||r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting)}}var QJ,WJ=((QJ=function(){function e(t,n,r,i){is(this,e),this.filesUploadHelper=t,this.globalsService=n,this.fb=r,this.localeId=i,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.stepSubmitIsSaveForLater=new ty,this.farLongArrowRight=$L,this.farCloudUpload=TL,this.farCopy=OL,this.farFile=ML,this.farFileTimes=jL,this.farSpinnerThird=aF,this.farTrashAlt=uF,this.farPencil=ZL,this.farSave=iF,this.messages=[],this.fileMaxSize=5242880,this.fileMaxSizeMb=5,this.maxDocuments=3,this.uploadedFile=[],this.filesInProgress=[],this.fileDragged=!1,this.filesToDelete=[],this.FILE_TYPE_BLACKLIST="(sql|bat|exe|com|zip|7z|dll|rar|shs|msi|reg|js|pif|application|gadget|msp|scr|hta|cpl|msc|jar|cmd|vb|ws|ps|msh|scf|lnk|inf|docm|dotm|xlsm|xltm|pptm|potm|ppam|ppsm|sldm)",this.fieldsMaxLength={description:2500}}return as(e,[{key:"ngOnInit",value:function(){var e=this,t=parseInt(this.globalsService.getGeneralParameterByCode("taille_max_telechargement"),10),n=parseInt(this.globalsService.getGeneralParameterByCode("nbr_fichiers_requete_max_telechargement"),10);void 0!==t&&t>0&&(this.fileMaxSize=1048576*t,this.fileMaxSizeMb=t),void 0!==n&&n>0&&(this.maxDocuments=n),this.qsDetails&&this.qsDetails.listOfDocuments.forEach(function(t){e.uploadedFile.push({documentFileId:0,batchId:"",fileName:t,fileContent:""})}),this.qsDetailsForm=this.fb.group({description:[this.qsDetails?this.qsDetails.description:"",[FS.maxLength(this.fieldsMaxLength.description),FS.required]]}),this.isReadOnlyMode&&this.qsDetailsForm.disable()}},{key:"onUploadFiles",value:function(e){console.log("enter in onUploadFiles at: "+Date.now()),this.messages=[];var t=e.target.files;if(t.length>this.maxDocuments)this.messages.push("en"===this.localeId?"Please select a maximum of "+this.maxDocuments.toString()+" file(s).":"Veuillez s\xe9lectionner un maximum de "+this.maxDocuments.toString()+" fichier(s).");else for(var n=0;n<t.length;n++)this.onUploadCurrentFile(e.target.files[n])}},{key:"onUploadCurrentFile",value:function(e){var t=this,n=this.uploadedFile.length+1,r=e.name;this.isFileValid(e)?(this.filesInProgress.push(r),e.size<this.fileMaxSize&&n<=this.maxDocuments?this.filesUploadHelper.uploadFile(e,e.name,n,this.batchId).subscribe(function(e){n+=1,t.uploadedFile.push(e),t.filesInProgress=t.filesInProgress.filter(function(t){return t!==e.fileName}),console.log("File is uploaded at: "+Date.now()),t.fileInput&&(t.fileInput.nativeElement.value="")},function(n){-1!==n.errors[0].indexOf("contains virus")?t.messages.push("en"===t.localeId?e.name+" is potentially malware, so it cannot be added.":"Le fichier "+e.name+" est potentiellement malveillant, donc impossible de l'ajouter."):t.messages.push("en"===t.localeId?e.name+" cannot be added.":"Impossible d'ajouter "+e.name+"."),t.filesInProgress=t.filesInProgress.filter(function(e){return e!==r}),t.fileInput&&(t.fileInput.nativeElement.value="")}):e.size>=this.fileMaxSize?(this.filesInProgress=this.filesInProgress.filter(function(e){return e!==r}),this.messages.push("en"===this.localeId?e.name+" is too large (maximum "+this.fileMaxSizeMb+"MB).":e.name+" est trop volumineux (maximum "+this.fileMaxSizeMb+"Mo)."),this.fileInput&&(this.fileInput.nativeElement.value="")):(this.filesInProgress=this.filesInProgress.filter(function(e){return e!==r}),this.messages.push("en"===this.localeId?e.name+" cannot be added because the file limit has been reached.":"Impossible d'ajouter "+e.name+" car la limite de fichiers est atteinte."),this.fileInput&&(this.fileInput.nativeElement.value=""))):this.messages.push("en"===this.localeId?"The type for the file ".concat(r," is not accepted."):"Le type pour le fichier ".concat(r," n'est pas accept\xe9."))}},{key:"onRemoveFile",value:function(e){var t=this;""!==e.batchId?(this.messages=[],this.filesUploadHelper.removeFile(e).subscribe(function(n){t.uploadedFile=t.uploadedFile.filter(function(t){return t!==e})},function(n){t.messages.push("en"===t.localeId?e.fileName+" cannot be deleted at this time.":e.fileName+" ne peut \xeatre supprim\xe9 pour le moment.")})):(this.filesToDelete.push(e.fileName),this.uploadedFile=this.uploadedFile.filter(function(t){return t!==e}))}},{key:"updateRequestNature",value:function(e){e!==this.theSelectedNature&&(this.theSelectedNature=e,this.uploadedFile=[])}},{key:"setFileDragged",value:function(e){this.fileDragged=e}},{key:"isFileValid",value:function(e){var t=/^.+\.([^.]+)$/.exec(e.name),n=null==t?"":t[1];return!new RegExp(this.FILE_TYPE_BLACKLIST,"i").test(n)}},{key:"onFormSubmit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={description:this.Description.value,listOfDocuments:[],filesToDelete:this.filesToDelete};void 0!==this.uploadedFile&&this.uploadedFile.length>0&&this.uploadedFile.forEach(function(e){t.listOfDocuments.push(e.fileName.toString())}),e?this.stepSubmitIsSaveForLater.emit(t):this.stepSubmit.emit(t)}},{key:"requestNature",set:function(e){this.updateRequestNature(e)}},{key:"Description",get:function(){return this.qsDetailsForm.get("description")}}]),e}()).\u0275fac=function(e){return new(e||QJ)(Qf(EQ),Qf(zq),Qf(_k),Qf(Ry))},QJ.\u0275cmp=zl({type:QJ,selectors:[["pel-request-qs-details"]],viewQuery:function(e,t){var n;1&e&&my(VJ,!0),2&e&&py(n=yy())&&(t.fileInput=n.first)},inputs:{requestNature:"requestNature",batchId:"batchId",qsDetails:"qsDetails",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit",stepSubmitIsSaveForLater:"stepSubmitIsSaveForLater"},decls:17,vars:7,consts:function(){return[[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],"Description",[3,"formGroup"],[1,"form-group","mb-4"],["for","descriptionId"],"Veuillez nous d\xE9crire votre demande en mentionnant le lieu, les faits et ou les autres \xE9l\xE9ments pertinents. *",["id","descriptionId","name","description","formControlName","description","rows","4","data-testid","7B57F56A-213A-4D62-9393-AAD4B75B9C8F",1,"form-control",3,"maxlength"],["class","btn btn-primary btn-rounded btn-big w-100","type","submit","disabled","","data-testid","D36F73E5-19DA-4727-A092-23F56C2239DB",4,"ngIf"],["class","mb-5",4,"ngIf"],[1,"text-muted","my-3"],"* Champs obligatoires",["class","btn btn-primary btn-rounded btn-big w-100","data-testid","97094152-7F1C-408A-9F80-90DACBF89B0D",3,"disabled","click",4,"ngIf"],["type","submit","class","btn btn-secondary btn-big btn-rounded w-100 mt-2","data-testid","619C048F-D854-45C4-A8D4-759CDE7C33E7",3,"disabled","click",4,"ngIf"],["type","submit","disabled","","data-testid","D36F73E5-19DA-4727-A092-23F56C2239DB",1,"btn","btn-primary","btn-rounded","btn-big","w-100"],"Chargement des fichiers",[1,"ml-2",3,"icon","spin"],[1,"mb-5"],"Photos et pi\xE8ces jointes",[1,"pel-file-upload-zone","mt-3",3,"hidden"],[4,"ngIf"],["class","card py-1 pl-3 pr-1 mt-1 d-flex justify-content-between align-items-center flex-row","data-testid","1CDE057D-6480-4AE9-9EEB-2797481F2A85",4,"ngFor","ngForOf"],["class","card py-1 pl-3 pr-1 mt-1 d-flex justify-content-between align-items-center flex-row",4,"ngFor","ngForOf"],["class","text-center text-danger my-2","data-testid","EA1A3333-5708-4B80-AD15-099FEA55EAE4",4,"ngFor","ngForOf"],["type","file","id","fileToAdd","multiple","","title","","data-testid","62AF8E59-EF32-4178-A6B6-9723CDA9E7E2",3,"change","dragenter","dragleave","drop"],["fileToAdd",""],"Glissez ou cliquez pour ajouter des fichiers" + "\ufffd#6\ufffd\ufffd/#6\ufffd" + "" + "\ufffd#7\ufffd" + "(maximum " + "\ufffd0\ufffd" + " fichier(s) - maximum " + "\ufffd1\ufffd" + " Mo par fichier)" + "\ufffd/#7\ufffd" + "","Limite de fichiers atteinte",["data-testid","1CDE057D-6480-4AE9-9EEB-2797481F2A85",1,"card","py-1","pl-3","pr-1","mt-1","d-flex","justify-content-between","align-items-center","flex-row"],[1,"text-ellipsis"],[1,"mr-2",3,"icon"],["type","button","class","btn btn-danger","aria-label","Retirer",3,"click",4,"ngIf"],["type","button","aria-label","Retirer",1,"btn","btn-danger",3,"click"],[1,"card","py-1","pl-3","pr-1","mt-1","d-flex","justify-content-between","align-items-center","flex-row"],[1,"mr-1",3,"icon","spin"],["type","button","disabled","",1,"btn","btn-danger"],["data-testid","EA1A3333-5708-4B80-AD15-099FEA55EAE4",1,"text-center","text-danger","my-2"],["data-testid","97094152-7F1C-408A-9F80-90DACBF89B0D",1,"btn","btn-primary","btn-rounded","btn-big","w-100",3,"disabled","click"],"Continuer",[1,"ml-1",3,"icon"],["type","submit","data-testid","619C048F-D854-45C4-A8D4-759CDE7C33E7",1,"btn","btn-secondary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"]]},template:function(e,t){1&e&&($f(0,"section"),$f(1,"h5",0),$f(2,"div",1),Yf(3,"fa-icon",2),Jf(),$f(4,"span"),Rg(5,3),Jf(),Jf(),$f(6,"form",4),$f(7,"div",5),$f(8,"label",6),Rg(9,7),Jf(),Yf(10,"textarea",8),Jf(),Uf(11,DJ,4,2,"button",9),Jf(),Jf(),Uf(12,BJ,12,11,"section",10),$f(13,"p",11),Rg(14,12),Jf(),Uf(15,zJ,4,2,"button",13),Uf(16,HJ,5,3,"button",14)),2&e&&(dp(3),Wf("icon",t.farPencil),dp(3),Wf("formGroup",t.qsDetailsForm),dp(4),Wf("maxlength",t.fieldsMaxLength.description),dp(1),Wf("ngIf",t.filesInProgress.length),dp(1),Wf("ngIf",t.maxDocuments>0),dp(3),Wf("ngIf",!t.filesInProgress.length&&!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.filesInProgress.length&&!t.isReadOnlyMode))},directives:[DM,XP,lP,nk,OS,sP,gk,yk,M_,L_],styles:["textarea[_ngcontent-%COMP%]{min-height:100px}"]}),QJ);function GJ(e,t){if(1&e&&($f(0,"li"),Yf(1,"fa-icon",43),Cm(2),Jf()),2&e){var n=t.$implicit,r=sm(2);dp(1),Wf("icon",r.farFile),dp(1),Sm("",n," ")}}function $J(e,t){if(1&e&&($f(0,"div",6),$f(1,"div",7),$f(2,"label",3),Tg(3,40),Yf(4,"strong"),Og(),Jf(),$f(5,"ul",41),Uf(6,GJ,3,2,"li",42),Jf(),Jf(),Jf()),2&e){var n=sm();dp(6),Wf("ngForOf",n.getListOfDocuments())}}function JJ(e,t){1&e&&($f(0,"div"),Rg(1,44),Jf())}function YJ(e,t){1&e&&($f(0,"div"),Rg(1,45),Jf())}function KJ(e,t){1&e&&($f(0,"div"),Rg(1,46),Jf())}function ZJ(e,t){1&e&&($f(0,"div"),Rg(1,47),Jf())}function XJ(e,t){1&e&&($f(0,"small",48),Rg(1,49),Jf())}var eY=function(e,t){return{"btn-primary":e,"btn-secondary":t}};function tY(e,t){if(1&e){var n=Xf();$f(0,"div",18),$f(1,"div",33),$f(2,"label",50),Kf(3),Rg(4,51),Zf(),Cm(5,"\xa0* "),Jf(),$f(6,"button",52),nm("click",function(){return Nu(n),sm().FollowUpLanguage.setValue("fr")}),Cm(7," Fran\xe7ais"),Jf(),$f(8,"button",53),nm("click",function(){return Nu(n),sm().FollowUpLanguage.setValue("en")}),Cm(9," English"),Jf(),Jf(),Jf()}if(2&e){var r=sm();dp(6),Wf("ngClass",Wv(4,eY,"fr"===r.FollowUpLanguage.value,"fr"!==r.FollowUpLanguage.value))("disabled",r.isReadOnlyMode),dp(2),Wf("ngClass",Wv(7,eY,"en"===r.FollowUpLanguage.value,"en"!==r.FollowUpLanguage.value))("disabled",r.isReadOnlyMode)}}function nY(e,t){1&e&&($f(0,"div"),Rg(1,54),Jf())}function rY(e,t){1&e&&Yf(0,"fa-icon",58),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function iY(e,t){if(1&e){var n=Xf();$f(0,"button",55),nm("click",function(){return Nu(n),sm().saveRequestForLater()}),Yf(1,"fa-icon",43),Kf(2),Rg(3,56),Zf(),Uf(4,rY,1,2,"fa-icon",57),Jf()}if(2&e){var r=sm();Wf("disabled",r.isSubmitting),dp(1),Wf("icon",r.farSave),dp(3),Wf("ngIf",r.isSubmitting&&r.isSubmittingSaveForLater)}}function oY(e,t){1&e&&Yf(0,"fa-icon",58),2&e&&Wf("icon",sm(2).farSpinnerThird)("spin",!0)}function aY(e,t){if(1&e){var n=Xf();$f(0,"button",59),nm("click",function(){return Nu(n),sm().submitRequest()}),Yf(1,"fa-icon",43),Kf(2),Rg(3,60),Zf(),Uf(4,oY,1,2,"fa-icon",57),Jf()}if(2&e){var r=sm();Wf("disabled",r.requestSummaryForm.invalid||r.isSubmitting),dp(1),Wf("icon",r.farPaperPlane),dp(3),Wf("ngIf",r.isSubmitting&&!r.isSubmittingSaveForLater)}}var sY,lY=function(){return["-"," "]},uY=((sY=function(){function e(t,n,r){is(this,e),this.fb=t,this.globalsService=n,this.localeId=r,this.isReadOnlyMode=!1,this.isSubmitting=!1,this.stepSubmit=new ty,this.requestSummary={description:"",applicantName:"",applicantFullAddress:"",applicantCity:"",applicantPostalCode:"",applicantEmail:"",location:"",phoneNumber:"",email:"",documents:[],followUpModeEmail:!0,followUpModePhone:!1,followUpEmail:"",followUpPhone:"",followUpLanguage:"",consent:!1},this.isSubmittingSaveForLater=!1,this.farFile=ML,this.farPaperPlane=KL,this.farPhoneAlt=XL,this.farSave=iF,this.farSpinnerThird=aF,this.fieldsMaxLength={followUpEmail:200}}return as(e,[{key:"hasMultilingual",value:function(){var e;return null===(e=this.globalsService.getCityInfos())||void 0===e?void 0:e.multilingual}},{key:"ngOnInit",value:function(){var e=this;this.questionModeCommunication=this.globalsService.getCustomResourceTextByCode("RES_QUESTION_MODE_COMMUNICATION"),""===this.questionModeCommunication&&(this.questionModeCommunication="en"===this.localeId?hj.RES_QUESTION_MODE_COMMUNICATION_EN:hj.RES_QUESTION_MODE_COMMUNICATION_FR),this.consentText=this.globalsService.getCustomResourceTextByCode("RES_CONSENTEMENT"),""===this.consentText&&(this.consentText="en"===this.localeId?hj.RES_CONSENTEMENT_EN:hj.RES_CONSENTEMENT_FR),this.consentText+=" *",this.requestSummaryForm=this.fb.group({followUpModeEmail:[this.requestSummary.followUpModeEmail],followUpEmail:["",[FS.required,FS.email,FS.maxLength(this.fieldsMaxLength.followUpEmail)]],followUpModePhone:[this.requestSummary.followUpModePhone],followUpPhone:[{value:"",disabled:!0},FS.required],followUpLanguage:[this.requestSummary.followUpLanguage?this.requestSummary.followUpLanguage:this.localeId],isSubmitted:[""],consent:[this.requestSummary.consent]},{validators:[this.validateAtLeastOneCommunicationMean]}),this.requestSummary.followUpModeEmail?(this.FollowUpEmail.setValue(null===this.requestSummary.followUpEmail||""===this.requestSummary.followUpEmail?this.requestSummary.email:this.requestSummary.followUpEmail),this.FollowUpEmail.enable()):this.FollowUpEmail.disable(),this.requestSummary.followUpModePhone?(this.FollowUpPhone.setValue(null===this.requestSummary.followUpPhone||""===this.requestSummary.followUpPhone?this.requestSummary.phoneNumber:this.requestSummary.followUpPhone),this.FollowUpPhone.enable()):this.FollowUpPhone.disable(),this.FollowUpModeEmail.valueChanges.subscribe(function(t){t?(e.FollowUpEmail.enable(),e.FollowUpEmail.setValue(null===e.requestSummary.followUpEmail||""===e.requestSummary.followUpEmail?e.requestSummary.email:e.requestSummary.followUpEmail)):(e.FollowUpEmail.disable(),e.FollowUpEmail.setValue("")),e.FollowUpEmail.updateValueAndValidity()}),this.FollowUpModePhone.valueChanges.subscribe(function(t){t?(e.FollowUpPhone.enable(),e.FollowUpPhone.setValue(null===e.requestSummary.followUpPhone||""===e.requestSummary.followUpPhone?e.requestSummary.phoneNumber:e.requestSummary.followUpPhone)):(e.FollowUpPhone.disable(),e.FollowUpPhone.setValue("")),e.FollowUpPhone.updateValueAndValidity()}),this.isReadOnlyMode&&(this.Consent.setValue(!0),this.requestSummaryForm.disable())}},{key:"updateQSFormsData",value:function(e){var t,n;this.requestSummary.documents=null===(t=e.qsDetails)||void 0===t?void 0:t.listOfDocuments,this.requestSummary.description=null===(n=e.qsDetails)||void 0===n?void 0:n.description,e.qsSummary&&(this.requestSummary.followUpModeEmail=e.qsSummary.followUpModeEmail,this.requestSummary.followUpModePhone=e.qsSummary.followUpModePhone,this.requestSummary.followUpEmail=e.qsSummary.followUpEmail,this.requestSummary.followUpPhone=e.qsSummary.followUpPhone,this.requestSummary.followUpLanguage=e.qsSummary.followUpLanguage),this.setApplicantData(e.qsApplicant),this.setLocationData(e.qsLocation)}},{key:"setApplicantData",value:function(e){this.requestSummary.applicantName=e.applicantFirstName+(e.applicantLastName?" "+e.applicantLastName:""),this.requestSummary.applicantFullAddress=e.applicantAddress.address,this.requestSummary.applicantCity=e.applicantAddress.city,this.requestSummary.applicantPostalCode=e.applicantAddress.zipCode,this.requestSummary.applicantEmail=e.applicantEmail,this.requestSummary.email=e.applicantEmail,this.requestSummary.phoneNumber=e.applicantPhoneNumber}},{key:"setLocationData",value:function(e){var t=this.setFormattedAddress(e.searchStreet);this.requestSummary.location="".concat(e.civicNumber?e.civicNumber:"").concat(t?" "+t:"")}},{key:"setFormattedAddress",value:function(e){return e?"".concat(e.designa?e.designa:"").concat(e.lien?" "+e.lien:"").concat(e.voie?" "+e.voie:"").concat(this.getCityName()?", "+this.getCityName():""):""}},{key:"saveRequestForLater",value:function(){this.isSubmittingSaveForLater=!0,this.stepSubmit.emit({followUpEmail:this.FollowUpEmail.value,followUpModeEmail:this.FollowUpModeEmail.value,followUpPhone:this.FollowUpPhone.value,followUpModePhone:this.FollowUpModePhone.value,followUpLanguage:this.FollowUpLanguage.value,isSubmitted:!1})}},{key:"submitRequest",value:function(){this.isSubmittingSaveForLater=!1,this.Consent.setValidators([FS.requiredTrue]),this.Consent.updateValueAndValidity(),this.requestSummaryForm.valid&&this.stepSubmit.emit({followUpEmail:this.FollowUpEmail.value,followUpModeEmail:this.FollowUpModeEmail.value,followUpPhone:this.FollowUpPhone.value,followUpModePhone:this.FollowUpModePhone.value,followUpLanguage:this.FollowUpLanguage.value,isSubmitted:!0})}},{key:"getListOfDocuments",value:function(){return this.requestSummary.documents?this.requestSummary.documents:[]}},{key:"validateAtLeastOneCommunicationMean",value:function(e){if(e){var t=e.get("followUpModeEmail").value,n=e.get("followUpModePhone").value;if(!t&&!n)return{noCommunication:!0}}return null}},{key:"getCityName",value:function(){return this.globalsService.getLocaleCityName()}},{key:"requestFormsData",set:function(e){this.updateQSFormsData(e)}},{key:"FollowUpModeEmail",get:function(){return this.requestSummaryForm.get("followUpModeEmail")}},{key:"FollowUpEmail",get:function(){return this.requestSummaryForm.get("followUpEmail")}},{key:"FollowUpModePhone",get:function(){return this.requestSummaryForm.get("followUpModePhone")}},{key:"FollowUpPhone",get:function(){return this.requestSummaryForm.get("followUpPhone")}},{key:"FollowUpLanguage",get:function(){return this.requestSummaryForm.get("followUpLanguage")}},{key:"Consent",get:function(){return this.requestSummaryForm.get("consent")}}]),e}()).\u0275fac=function(e){return new(e||sY)(Qf(_k),Qf(zq),Qf(Ry))},sY.\u0275cmp=zl({type:sY,selectors:[["pel-request-qs-summary"]],inputs:{requestFormsData:"requestFormsData",isReadOnlyMode:"isReadOnlyMode",isSubmitting:"isSubmitting"},outputs:{stepSubmit:"stepSubmit"},decls:72,vars:35,consts:function(){return[[1,"mb-3"],[1,"row","pel-grid","cols-2"],[1,"col-6"],[1,"mb-1"],"Emplacement",["data-testid","2933F194-C677-4CC1-9D60-D5F339256756",1,"mb-0"],[1,"row","pel-grid"],[1,"col-12"],"Demandeur",["data-testid","A7245647-8DD0-433F-AB3F-FCF1ADE73F0F",1,"mb-0"],"Description",["data-testid","AF103ED7-D98D-42ED-8798-B402A27E272C",1,"req-desc","mb-0"],["class","row pel-grid",4,"ngIf"],[3,"formGroup"],[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-3"],[1,"icon-circle","light","flex-shrink-0","mr-2"],[3,"icon"],"Communication",[1,"form-row"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","followUpModeEmailId","name","followUpModeEmail","formControlName","followUpModeEmail","data-testid","91C2426A-D822-4AB0-83DC-E242AE88A6E9",1,"custom-control-input",3,"readonly"],["for","followUpModeEmailId",1,"custom-control-label"],"Courriel",[1,"form-group","mt-1"],["type","email","id","followUpEmailId","name","followUpEmail","formControlName","followUpEmail","data-testid","7F75652A-0100-4805-911B-02405B22D3DE",1,"form-control",3,"readonly","maxlength"],[1,"invalid-feedback"],[4,"ngIf"],["type","checkbox","id","followUpModePhoneId","name","followUpModePhone","formControlName","followUpModePhone","data-testid","C3AB2F3C-053A-4E6F-BADA-35CE34175344",1,"custom-control-input",3,"readonly"],["for","followUpModePhoneId",1,"custom-control-label"],"T\xE9l\xE9phone",["type","tel","id","followUpPhoneId","name","followUpPhone","formControlName","followUpPhone","data-testid","A463BD0E-A3DE-46FF-9222-E0FE0D8B2BF0","mask","000 000-0000",1,"form-control",3,"specialCharacters","readonly"],["id","err-comm","class","col-12 mb-3 text-danger",4,"ngIf"],["class","form-row",4,"ngIf"],[1,"form-group","col"],["type","checkbox","id","consentId","name","consent","formControlName","consent","data-testid","88bfdbf1-66e4-426e-83e1-2e5fbf72d3c8",1,"custom-control-input",3,"readonly"],["for","consentId",1,"custom-control-label"],[1,"text-muted","mt-2","mb-4"],"* Champs obligatoires",["class","btn btn-secondary btn-big btn-rounded w-100","type","button","data-testid","A771CB94-262C-422D-9E77-3A7440430CE3",3,"disabled","click",4,"ngIf"],["class","btn btn-primary btn-big btn-rounded w-100 mt-2","type","button","data-testid","941F1C00-1253-498C-A902-207ADA91ECE5",3,"disabled","click",4,"ngIf"],"" + "\ufffd#4\ufffd" + "Photos et pi\xE8ces jointes" + "\ufffd/#4\ufffd" + "",["data-testid","E137C62E-EA92-4757-AB8C-1522937BEB51",1,"list-unstyled","pl-3","mb-0"],[4,"ngFor","ngForOf"],[1,"mr-2",3,"icon"]," Veuillez entrer une adresse courriel. "," Veuillez entrer une adresse courriel valide. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone. "," Veuillez entrer un num\xE9ro de t\xE9l\xE9phone valide. ",["id","err-comm",1,"col-12","mb-3","text-danger"],"Veuillez fournir au moins un moyen de communication. ",[1,"d-block"],"Langue de correspondance",["type","button","data-testid","53E84E3A-9EB5-4C80-96C8-B58F5E723E88",1,"btn","mr-1",3,"ngClass","disabled","click"],["type"," button","data-testid","3C287F45-C8C2-4EFB-AE46-267EA22A16DB",1,"btn",3,"ngClass","disabled","click"]," Vous devez confirmer votre consentement sur l'utilisation des donn\xE9es personnelles pour pouvoir soumettre votre demande. ",["type","button","data-testid","A771CB94-262C-422D-9E77-3A7440430CE3",1,"btn","btn-secondary","btn-big","btn-rounded","w-100",3,"disabled","click"],"Enregistrer pour plus tard",["class","ml-2",3,"icon","spin",4,"ngIf"],[1,"ml-2",3,"icon","spin"],["type","button","data-testid","941F1C00-1253-498C-A902-207ADA91ECE5",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"disabled","click"],"Soumettre"]},template:function(e,t){1&e&&($f(0,"section",0),$f(1,"div",1),$f(2,"div",2),$f(3,"label",3),$f(4,"strong"),Rg(5,4),Jf(),Jf(),$f(6,"p",5),Cm(7),Jf(),Jf(),Jf(),$f(8,"div",6),$f(9,"div",7),$f(10,"label",3),$f(11,"strong"),Rg(12,8),Jf(),Jf(),$f(13,"address",9),Cm(14),Yf(15,"br"),Cm(16),Yf(17,"br"),Cm(18),Yf(19,"br"),Cm(20),Jf(),Jf(),Jf(),$f(21,"div",6),$f(22,"div",7),$f(23,"label",3),$f(24,"strong"),Rg(25,10),Jf(),Jf(),$f(26,"p",11),Cm(27),Jf(),Jf(),Jf(),Uf(28,$J,7,1,"div",12),Jf(),$f(29,"form",13),$f(30,"h5",14),$f(31,"div",15),Yf(32,"fa-icon",16),Jf(),$f(33,"span"),Rg(34,17),Jf(),Jf(),$f(35,"p"),Cm(36),Jf(),$f(37,"div",18),$f(38,"div",2),$f(39,"div",19),Yf(40,"input",20),$f(41,"label",21),Rg(42,22),Jf(),Jf(),$f(43,"div",23),Yf(44,"input",24),$f(45,"div",25),Uf(46,JJ,2,0,"div",26),Uf(47,YJ,2,0,"div",26),Jf(),Jf(),Jf(),$f(48,"div",2),$f(49,"div",19),Yf(50,"input",27),$f(51,"label",28),Rg(52,29),Jf(),Jf(),$f(53,"div",23),Yf(54,"input",30),$f(55,"div",25),Uf(56,KJ,2,0,"div",26),Uf(57,ZJ,2,0,"div",26),Jf(),Jf(),Jf(),Uf(58,XJ,2,0,"small",31),Jf(),Uf(59,tY,10,10,"div",32),$f(60,"div",18),$f(61,"div",33),$f(62,"div",19),Yf(63,"input",34),$f(64,"label",35),Cm(65),Jf(),$f(66,"div",25),Uf(67,nY,2,0,"div",26),Jf(),Jf(),Jf(),Jf(),$f(68,"p",36),Rg(69,37),Jf(),Uf(70,iY,5,3,"button",38),Uf(71,aY,5,3,"button",39),Jf()),2&e&&(dp(7),Sm(" ",t.requestSummary.location,""),dp(7),Sm(" ",t.requestSummary.applicantName,""),dp(2),Sm(" ",t.requestSummary.applicantFullAddress,""),dp(2),Pm(" ",t.requestSummary.applicantCity," ",t.requestSummary.applicantPostalCode,""),dp(2),Sm(" ",t.requestSummary.applicantEmail," "),dp(7),Sm("",t.requestSummary.description," "),dp(1),Wf("ngIf",t.getListOfDocuments().length>0),dp(1),Wf("formGroup",t.requestSummaryForm),dp(3),Wf("icon",t.farPhoneAlt),dp(4),xm(t.questionModeCommunication),dp(4),Wf("readonly",t.isReadOnlyMode),dp(4),gm("is-invalid",t.FollowUpEmail.touched&&!t.FollowUpEmail.valid&&!t.FollowUpEmail.disabled),Wf("readonly",t.isReadOnlyMode)("maxlength",t.fieldsMaxLength.followUpEmail),dp(2),Wf("ngIf",null==t.FollowUpEmail.errors?null:t.FollowUpEmail.errors.required),dp(1),Wf("ngIf",null==t.FollowUpEmail.errors?null:t.FollowUpEmail.errors.email),dp(3),Wf("readonly",t.isReadOnlyMode),dp(4),gm("is-invalid",t.FollowUpPhone.touched&&!t.FollowUpPhone.valid&&!t.FollowUpPhone.disabled),Wf("specialCharacters",Qv(34,lY))("readonly",t.isReadOnlyMode),dp(2),Wf("ngIf",null==t.FollowUpPhone.errors?null:t.FollowUpPhone.errors.required),dp(1),Wf("ngIf",null==t.FollowUpPhone.errors?null:t.FollowUpPhone.errors.mask),dp(1),Wf("ngIf",t.requestSummaryForm.hasError("noCommunication")),dp(1),Wf("ngIf",t.hasMultilingual()),dp(4),gm("is-invalid",null==t.Consent.errors?null:t.Consent.errors.required),Wf("readonly",t.isReadOnlyMode),dp(2),xm(t.consentText),dp(2),Wf("ngIf",null==t.Consent.errors?null:t.Consent.errors.required),dp(3),Wf("ngIf",!t.isReadOnlyMode),dp(1),Wf("ngIf",!t.isReadOnlyMode))},directives:[M_,XP,lP,nk,DM,AS,sP,gk,OS,yk,QR,L_,D_],styles:[".pel-grid[_ngcontent-%COMP%]:first-child{margin-top:-1rem}.req-desc[_ngcontent-%COMP%]{white-space:pre-wrap}#err-comm[_ngcontent-%COMP%]{margin-top:-.75rem}"]}),sY);function cY(e,t){1&e&&(Kf(0),Rg(1,11),Zf())}function dY(e,t){1&e&&(Kf(0),Rg(1,12),Zf())}function hY(e,t){1&e&&(Kf(0),Rg(1,13),Zf())}function pY(e,t){1&e&&(Kf(0),$f(1,"p"),Rg(2,14),Jf(),Zf())}function fY(e,t){1&e&&(Kf(0),Rg(1,15),Zf())}function mY(e,t){if(1&e&&($f(0,"section",16),$f(1,"label",17),Rg(2,18),Jf(),$f(3,"h6",19),Cm(4),Jf(),Yf(5,"hr"),$f(6,"label",17),Rg(7,20),Jf(),$f(8,"h6",21),Cm(9),Jf(),Jf()),2&e){var n=sm();dp(4),xm(n.followUpNumber),dp(5),xm(n.getApplicantName())}}function gY(e,t){if(1&e){var n=Xf();$f(0,"button",22),nm("click",function(){return Nu(n),sm().onCompleted()}),Yf(1,"fa-icon",23),Kf(2),Rg(3,24),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farPlusCircle)}}function vY(e,t){if(1&e){var n=Xf();$f(0,"button",25),nm("click",function(){return Nu(n),sm().goBackToFollowUp()}),Yf(1,"fa-icon",23),Kf(2),Rg(3,26),Zf(),Jf()}if(2&e){var r=sm();dp(1),Wf("icon",r.farLongArrowLeft)}}var yY,bY=function(e){return e[e.SaveSuccess=0]="SaveSuccess",e[e.SubmitSuccess=1]="SubmitSuccess",e[e.SubmitSuccessEmail=2]="SubmitSuccessEmail",e}({}),_Y=((yY=function(){function e(t,n,r){is(this,e),this.globals=t,this.router=n,this.localeId=r,this.stepSubmit=new ty,this.farCheck=SL,this.farPlusCircle=tF,this.farLongArrowLeft=GL,this.isSignalementWidget=!1,this.completeMessageDisplayEnum=bY}return as(e,[{key:"ngOnInit",value:function(){this.isSignalementWidget=this.globals.isSignalementWidget()}},{key:"isFollowUpDataAvailable",value:function(){var e,t;return(null===(e=this.followUpNumber)||void 0===e?void 0:e.length)>0&&(null===(t=this.getApplicantName())||void 0===t?void 0:t.length)>0}},{key:"getCompleteMessageDisplay",value:function(){return this.isSubmitted?this.isFollowUpDataAvailable()?bY.SubmitSuccess:bY.SubmitSuccessEmail:bY.SaveSuccess}},{key:"getApplicantName",value:function(){var e;return(null===(e=this.applicantName)||void 0===e?void 0:e.length)>0?this.applicantName:""}},{key:"getCityName",value:function(){return this.globals.getLocaleCityName()}},{key:"onCompleted",value:function(){this.stepSubmit.emit()}},{key:"goBackToFollowUp",value:function(){this.router.navigate(["/request"])}}]),e}()).\u0275fac=function(e){return new(e||yY)(Qf(zq),Qf(JN),Qf(Ry))},yY.\u0275cmp=zl({type:yY,selectors:[["pel-request-qs-complete"]],inputs:{applicantName:"applicantName",followUpNumber:"followUpNumber",isSubmitted:"isSubmitted"},outputs:{stepSubmit:"stepSubmit"},decls:14,vars:11,consts:function(){return[["data-testid","761A5FA3-3600-49C6-B295-58787D623957"],[1,"text-center","text-primary","mt-2","mb-4"],["size","2x",1,"d-block","mb-2",3,"icon"],[4,"ngIf"],["data-testid","E4412A08-F517-44FF-9C10-7D89F9371744",1,"text-center",3,"ngSwitch"],[4,"ngSwitchCase"],["class","panel text-center my-3",4,"ngIf"],[1,"text-center","my-3"]," Merci d'utiliser les services en ligne de " + "\ufffd0\ufffd" + "",["class","btn btn-primary btn-big btn-rounded w-100 mt-2","type","button","data-testid","FB4066F0-C3F3-40F2-A4E2-BDDD426BEEB0",3,"click",4,"ngIf"],["type","button","class","btn btn-primary btn-big btn-rounded w-100 mt-2","data-testid","708AC9E8-DEAD-4DC6-8A20-AE6B10EB05C6",3,"click",4,"ngIf"],"Demande soumise","Demande enregistr\xE9e"," Votre demande a bien \xE9t\xE9 enregistr\xE9e. Veuillez utiliser les informations ci-dessous pour revenir la modifier plus tard via le menu de suivi d'une demande, dans un d\xE9lai maximal de 7 jours. Vous recevrez \xE9galement une copie de ces informations par courriel. ","Votre demande a bien \xE9t\xE9 soumise et sera trait\xE9e d\xE8s que possible. Veuillez utiliser les informations ci-dessous pour en faire le suivi. Vous recevrez \xE9galement une copie de ces informations par courriel."," Votre demande a bien \xE9t\xE9 soumise et sera trait\xE9e d\xE8s que possible. Vous recevrez sous peu un courriel vous permettant d'en faire le suivi. ",[1,"panel","text-center","my-3"],[1,"text-muted","mb-0"],"Num\xE9ro de suivi",["id","followUpNumberID","data-testid","9AC88B63-9329-4738-B964-465FE53E7FEB",1,"title"],"Nom de famille ou d'entreprise",["id","applicantLastNameID","data-testid","7C140B08-0DD8-4F5F-BD9B-9416D00B0395",1,"title"],["type","button","data-testid","FB4066F0-C3F3-40F2-A4E2-BDDD426BEEB0",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"click"],[1,"mr-2",3,"icon"],"Commencer une nouvelle demande",["type","button","data-testid","708AC9E8-DEAD-4DC6-8A20-AE6B10EB05C6",1,"btn","btn-primary","btn-big","btn-rounded","w-100","mt-2",3,"click"],"Aller au suivi de la demande"]},template:function(e,t){1&e&&($f(0,"div",0),$f(1,"h3",1),Yf(2,"fa-icon",2),Uf(3,cY,2,0,"ng-container",3),Uf(4,dY,2,0,"ng-container",3),Jf(),Jf(),$f(5,"p",4),Uf(6,hY,2,0,"ng-container",5),Uf(7,pY,3,0,"ng-container",5),Uf(8,fY,2,0,"ng-container",5),Jf(),Uf(9,mY,10,2,"section",6),$f(10,"p",7),Rg(11,8),Jf(),Uf(12,gY,4,1,"button",9),Uf(13,vY,4,1,"button",10)),2&e&&(dp(2),Wf("icon",t.farCheck),dp(1),Wf("ngIf",t.isSubmitted),dp(1),Wf("ngIf",!t.isSubmitted),dp(1),Wf("ngSwitch",t.getCompleteMessageDisplay()),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.SaveSuccess),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.SubmitSuccess),dp(1),Wf("ngSwitchCase",t.completeMessageDisplayEnum.SubmitSuccessEmail),dp(1),Wf("ngIf",t.isFollowUpDataAvailable()),dp(2),Vg(t.getCityName()),Dg(11),dp(1),Wf("ngIf",!t.isSignalementWidget),dp(1),Wf("ngIf",t.isSubmitted))},directives:[DM,M_,W_,G_],styles:[""]}),yY),wY=["permitChoice"],CY=["permitProperty"],xY=["permitApplicant"],SY=["requestQSApplicant"],PY=["permitDescription"],kY=["permitForm"],EY=["permitDoc"],AY=["permitComplete"],IY=["requestQSLocation"],TY=["requestQSDetails"],OY=["requestQSSummary"],RY=["requestQSComplete"];function VY(e,t){1&e&&($f(0,"div",23),Tg(1,24),Yf(2,"br"),Yf(3,"br"),Og(),Jf())}function DY(e,t){1&e&&Yf(0,"pel-error-payment-unavailable")}function NY(e,t){if(1&e){var n=Xf();$f(0,"a",31),nm("click",function(){return Nu(n),sm(2).restartNewRequest()}),Yf(1,"fa-icon",32),$f(2,"span",33),Rg(3,34),Jf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farLongArrowLeft)}}function LY(e,t){if(1&e){var n=Xf();$f(0,"a",35),nm("click",function(){return Nu(n),sm(2).restartRequest()}),Yf(1,"fa-icon",32),$f(2,"span",33),Rg(3,36),Jf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farPlusCircle)}}function FY(e,t){if(1&e){var n=Xf();$f(0,"a",37),nm("click",function(){return Nu(n),sm(2).goBackToFollowUp(!1)}),Yf(1,"fa-icon",32),$f(2,"span",33),Rg(3,38),Jf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farLongArrowLeft)}}function MY(e,t){if(1&e){var n=Xf();$f(0,"a",39),nm("click",function(){return Nu(n),sm(2).goBackToFollowUp(!1)}),Yf(1,"fa-icon",32),$f(2,"span",33),Rg(3,40),Jf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farLongArrowLeft)}}function qY(e,t){if(1&e){var n=Xf();$f(0,"a",41),nm("click",function(){return Nu(n),sm(2).goBackToFollowUp(!0)}),Yf(1,"fa-icon",32),$f(2,"span",33),Rg(3,42),Jf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farLongArrowLeft)}}function jY(e,t){if(1&e&&($f(0,"div",25),Uf(1,NY,4,1,"a",26),Uf(2,LY,4,1,"a",27),Uf(3,FY,4,1,"a",28),Uf(4,MY,4,1,"a",29),Uf(5,qY,4,1,"a",30),Jf()),2&e){var n=sm();dp(1),Wf("ngIf",!n.isReadOnlyMode()&&!n.isComplete()&&n.isCreateMode()&&!n.directExternalWidget&&!n.directSignalementWidget),dp(1),Wf("ngIf",!n.isReadOnlyMode()&&n.isComplete()&&n.isCreateMode()&&!n.isSubmitted()&&!n.directSignalementWidget),dp(1),Wf("ngIf",n.isReadOnlyMode()||!n.isReadOnlyMode()&&n.isSubmitted()&&!n.isComplete()),dp(1),Wf("ngIf",n.isComplete()&&(null==n.permitComplete?null:n.permitComplete.isFollowUpLinkAvailable())),dp(1),Wf("ngIf",!(n.isReadOnlyMode()||n.isSubmitted()||n.isCreateMode()||n.directSignalementWidget||n.isSignalementWidget))}}function BY(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm(3);dp(1),Sm(" - ","en"===n.localeId?n.currentRequest.requestType.descriptionEn:n.currentRequest.requestType.description," ")}}function zY(e,t){if(1&e&&(Kf(0),Kf(1),Rg(2,44),Zf(),Uf(3,BY,2,1,"ng-container",1),Zf()),2&e){var n=sm(2);dp(3),Wf("ngIf",!n.isLandingPage()&&n.currentRequest.requestType)}}function UY(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm(3);dp(1),Sm(" - ",n.currentRequest.followUpNo," ")}}function HY(e,t){if(1&e&&(Kf(0),Kf(1),Rg(2,45),Zf(),Uf(3,UY,2,1,"ng-container",1),Zf()),2&e){var n=sm(2);dp(3),Wf("ngIf",!n.isLandingPage()&&n.currentRequest.requestType)}}function QY(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm(3);dp(1),Sm(" - ",n.currentRequest.followUpNo," ")}}function WY(e,t){if(1&e&&(Kf(0),Kf(1),Rg(2,46),Zf(),Uf(3,QY,2,1,"ng-container",1),Zf()),2&e){var n=sm(2);dp(3),Wf("ngIf",!n.isLandingPage()&&n.currentRequest.requestType)}}function GY(e,t){if(1&e&&($f(0,"h2",43),Uf(1,zY,4,1,"ng-container",1),Uf(2,HY,4,1,"ng-container",1),Uf(3,WY,4,1,"ng-container",1),Jf()),2&e){var n=sm();dp(1),Wf("ngIf",n.router.url.includes("/create")),dp(1),Wf("ngIf",n.router.url.includes("/edit")),dp(1),Wf("ngIf",n.router.url.includes("/view"))}}function $Y(e,t){1&e&&Yf(0,"fa-icon",54),2&e&&Wf("icon",sm(2).farTimes)}function JY(e,t){1&e&&(Kf(0),Rg(1,64),Zf())}function YY(e,t){if(1&e&&(Kf(0),Cm(1),Jv(2,"currency"),Zf()),2&e){var n=sm(4);dp(1),Sm(" ",Zv(2,1,n.currentRequest.permitType.montantPermis,"CAD","symbol-narrow","1.2-2")," ")}}function KY(e,t){1&e&&(Kf(0),Rg(1,65),Zf())}function ZY(e,t){if(1&e&&(Kf(0),Cm(1," + "),Kf(2),Rg(3,66),Zf(),Cm(4),Jv(5,"currency"),Zf()),2&e){var n=sm(4);dp(4),Sm(" ",Zv(5,1,n.currentRequest.permitType.fraisEtudeDemande,"CAD","symbol-narrow","1.2-2")," ")}}function XY(e,t){if(1&e&&(Kf(0),Uf(1,YY,3,6,"ng-container",1),Uf(2,KY,2,0,"ng-container",1),Uf(3,ZY,6,6,"ng-container",1),Zf()),2&e){var n=sm(3);dp(1),Wf("ngIf",n.currentRequest.permitType.montantPermis>0),dp(1),Wf("ngIf",0===n.currentRequest.permitType.montantPermis),dp(1),Wf("ngIf",3===n.currentRequest.permitType.typeCout&&n.currentRequest.permitType.fraisEtudeDemande>0&&1===n.currentRequest.permitType.payableApres)}}function eK(e,t){if(1&e&&(Kf(0),$f(1,"h4",67),Rg(2,68),Jf(),Kf(3),Tg(4,69),Yf(5,"span",67),Og(),Zf(),Zf()),2&e){var n=sm(3);dp(5),Vg(n.currentRequest.permitType.delaiTraiement)(n.currentRequest.permitType.delaiTraiement),Dg(4)}}function tK(e,t){if(1&e&&(Kf(0),$f(1,"h4",67),Rg(2,70),Jf(),Yf(3,"div",71),Zf()),2&e){var n=sm(3);dp(3),Wf("innerHTML","en"===n.localeId?n.currentRequest.permitType.normesEn:n.currentRequest.permitType.normes,ih)}}function nK(e,t){if(1&e&&($f(0,"a",72),Kf(1),Rg(2,73),Zf(),Yf(3,"fa-icon",54),Jf()),2&e){var n=sm(3);Wf("href","en"===n.localeId?n.currentRequest.permitType.urlNormesEn:n.currentRequest.permitType.urlNormesFr,oh),dp(3),Wf("icon",n.farExternalLinkAlt)}}function rK(e,t){1&e&&(Kf(0),Cm(1," *"),Zf())}function iK(e,t){if(1&e&&($f(0,"div"),Cm(1),Uf(2,rK,2,0,"ng-container",1),Jf()),2&e){var n=sm().$implicit;dp(1),xm(n.docRequisEn),dp(1),Wf("ngIf",1==n.isMandatory)}}function oK(e,t){1&e&&(Kf(0),Cm(1," * "),Zf())}function aK(e,t){if(1&e&&($f(0,"div"),Cm(1),Uf(2,oK,2,0,"ng-container",1),Jf()),2&e){var n=sm().$implicit;dp(1),xm(n.docRequis),dp(1),Wf("ngIf",1==n.isMandatory)}}function sK(e,t){if(1&e&&($f(0,"li"),Uf(1,iK,3,2,"div",1),Uf(2,aK,3,2,"div",1),Jf()),2&e){var n=sm(4);dp(1),Wf("ngIf","en"===n.localeId),dp(1),Wf("ngIf","en"!==n.localeId)}}function lK(e,t){1&e&&($f(0,"p",78),Rg(1,79),Jf())}function uK(e,t){if(1&e&&($f(0,"div",74),$f(1,"h4"),Rg(2,75),Jf(),$f(3,"ul"),Uf(4,sK,3,2,"li",76),Jf(),Uf(5,lK,2,0,"p",77),Yf(6,"br"),Jf()),2&e){var n=sm(3);dp(4),Wf("ngForOf",n.currentRequest.permitType.documentsRequis),dp(1),Wf("ngIf",n.getNbrMandatoryDocuments()>0)}}function cK(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm().$implicit;dp(1),xm(n.descriptionEn)}}function dK(e,t){if(1&e&&(Kf(0),Cm(1),Zf()),2&e){var n=sm().$implicit;dp(1),xm(n.description)}}function hK(e,t){if(1&e){var n=Xf();$f(0,"button",82),nm("click",function(){Nu(n);var e=t.$implicit;return sm(4).showSchema(e)}),Uf(1,cK,2,1,"ng-container",1),Uf(2,dK,2,1,"ng-container",1),Yf(3,"fa-icon",83),Jf()}if(2&e){var r=sm(4);dp(1),Wf("ngIf","en"===r.localeId),dp(1),Wf("ngIf","en"!==r.localeId),dp(1),Wf("icon",r.farExternalLinkAlt)}}function pK(e,t){if(1&e&&($f(0,"div",74),$f(1,"h4"),Rg(2,80),Jf(),Uf(3,hK,4,3,"button",81),Jf()),2&e){var n=sm(3);dp(3),Wf("ngForOf",n.currentRequest.permitType.schemas)}}function fK(e,t){if(1&e){var n=Xf();$f(0,"div",55),Kf(1),Rg(2,56),Zf(),Uf(3,JY,2,0,"ng-container",1),Uf(4,XY,4,3,"ng-container",1),$f(5,"div",57),Uf(6,eK,6,2,"ng-container",1),Jf(),$f(7,"div",57),Uf(8,tK,4,1,"ng-container",1),Uf(9,nK,4,2,"a",58),Uf(10,uK,7,2,"div",59),Uf(11,pK,4,1,"div",59),Jf(),$f(12,"div",60),$f(13,"button",61),nm("click",function(){return Nu(n),sm(2).toggleInfoVisibility(!1)}),Yf(14,"fa-icon",62),Kf(15),Rg(16,63),Zf(),Jf(),Jf(),Jf()}if(2&e){var r=sm(2);Wf("@slideInOut",void 0),dp(3),Wf("ngIf",r.currentRequest.permitType.pel_Gratuit),dp(1),Wf("ngIf",!r.currentRequest.permitType.pel_Gratuit),dp(2),Wf("ngIf",r.currentRequest.permitType.delaiTraiement>0),dp(2),Wf("ngIf","en"===r.localeId&&r.currentRequest.permitType.normesEn||"fr"===r.localeId&&r.currentRequest.permitType.normes),dp(1),Wf("ngIf","en"===r.localeId&&r.currentRequest.permitType.urlNormesEn||"fr"===r.localeId&&r.currentRequest.permitType.urlNormesFr),dp(1),Wf("ngIf",(null==r.currentRequest.permitType.documentsRequis?null:r.currentRequest.permitType.documentsRequis.length)>0),dp(1),Wf("ngIf",(null==r.currentRequest.permitType.schemas?null:r.currentRequest.permitType.schemas.length)>0),dp(3),Wf("icon",r.farTimes)}}function mK(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"div",47),$f(2,"h3",48),Kf(3),Rg(4,49),Zf(),Cm(5),Jf(),$f(6,"button",50),nm("click",function(){return Nu(n),sm().toggleInfoVisibility()}),Yf(7,"fa-icon",32),Kf(8),Rg(9,51),Zf(),Uf(10,$Y,1,1,"fa-icon",52),Jf(),Jf(),Uf(11,fK,17,9,"div",53),Zf()}if(2&e){var r=sm();dp(5),Sm(" ","en"===r.localeId?r.currentRequest.permitType.descriptionEn:r.currentRequest.permitType.description," "),dp(1),gm("btn-tab",r.isInfoVisible),dp(1),Wf("icon",r.farInfoCircle),dp(3),Wf("ngIf",r.isInfoVisible),dp(1),Wf("ngIf",r.isInfoVisible)}}function gK(e,t){1&e&&Yf(0,"fa-icon",54),2&e&&Wf("icon",sm(2).farTimes)}function vK(e,t){if(1&e){var n=Xf();$f(0,"div",55),Kf(1),$f(2,"div",86),Kf(3),$f(4,"span",67),Cm(5),Jf(),Zf(),Jf(),$f(6,"div",87),$f(7,"h4",67),Rg(8,88),Jf(),Kf(9),Cm(10),Zf(),Jf(),Zf(),$f(11,"div",60),$f(12,"button",61),nm("click",function(){return Nu(n),sm(2).toggleInfoVisibility(!1)}),Yf(13,"fa-icon",62),Kf(14),Rg(15,89),Zf(),Jf(),Jf(),Jf()}if(2&e){var r=sm(2);Wf("@slideInOut",void 0),dp(5),Sm(" ","en"===r.localeId?r.currentRequest.requestNature.complementInfoEn:r.currentRequest.requestNature.complementInfo," "),dp(5),Sm(" ","en"===r.localeId?r.currentRequest.requestNature.service.descriptionEn:r.currentRequest.requestNature.service.description," "),dp(3),Wf("icon",r.farTimes)}}function yK(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"div",47),$f(2,"h3",48),Kf(3),Rg(4,84),Zf(),Cm(5),Jf(),$f(6,"button",50),nm("click",function(){return Nu(n),sm().toggleInfoVisibility()}),Yf(7,"fa-icon",32),Kf(8),Rg(9,85),Zf(),Uf(10,gK,1,1,"fa-icon",52),Jf(),Jf(),Uf(11,vK,16,4,"div",53),Zf()}if(2&e){var r=sm();dp(5),Sm(" ","en"===r.localeId?r.currentRequest.requestNature.descriptionEn:r.currentRequest.requestNature.description," "),dp(1),gm("btn-tab",r.isInfoVisible),dp(1),Wf("icon",r.farInfoCircle),dp(3),Wf("ngIf",r.isInfoVisible),dp(1),Wf("ngIf",r.isInfoVisible)}}function bK(e,t){if(1&e){var n=Xf();$f(0,"button",99),nm("click",function(){return Nu(n),sm(2).goToPreviousStep()}),Yf(1,"fa-icon",100),$f(2,"span"),Rg(3,101),Jf(),Jf()}if(2&e){var r=sm(2);dp(1),Wf("icon",r.farChevronLeft)}}function _K(e,t){if(1&e&&($f(0,"p",102),Kf(1),Rg(2,103),Zf(),Cm(3),Kf(4),Rg(5,104),Zf(),Cm(6),Jf()),2&e){var n=sm(2);dp(3),Sm(" ",n.getDisplayedStepNumber()," "),dp(3),Sm(" ",n.getDisplayedTotalSteps()," ")}}function wK(e,t){if(1&e){var n=Xf();$f(0,"button",105),nm("click",function(){return Nu(n),sm(2).submitFormOnNextButtonClicked()}),Yf(1,"fa-icon",100),$f(2,"span"),Rg(3,106),Jf(),Jf()}if(2&e){var r=sm(2);Wf("disabled",!r.setNextButton()),dp(1),Wf("icon",r.farChevronRight)}}function CK(e,t){if(1&e&&($f(0,"div",90),$f(1,"div",91),$f(2,"div",92),Uf(3,bK,4,1,"button",93),Jf(),$f(4,"div",94),Uf(5,_K,7,2,"p",95),$f(6,"h5",96),Cm(7),Jf(),Jf(),$f(8,"div",97),Uf(9,wK,4,2,"button",98),Jf(),Jf(),Jf()),2&e){var n=sm();dp(3),Wf("ngIf",!n.hideGoBackButton()),dp(2),Wf("ngIf",n.getDisplayedStepNumber()>0&&n.getDisplayedStepNumber()<=n.getDisplayedTotalSteps()),dp(2),xm(n.getDisplayedStepTitle()),dp(2),Wf("ngIf",n.isNextStepEnabled())}}function xK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-type",107),nm("stepBack",function(){return Nu(n),sm().goToPreviousStep()})("stepSubmit",function(e){return Nu(n),sm().onRequestTypeSubmitted(e)})("stepSubmitFromMatchedURL",function(e){return Nu(n),sm().onRequestTypeSubmitted(e,!0)}),Jf()}2&e&&Wf("hidden",0!==sm().getCurrentStep())}function SK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-type-choice",108,109),nm("stepBack",function(){return Nu(n),sm().goToPreviousStep()})("stepSubmit",function(e){return Nu(n),sm().onPermitChoiceSubmitted(e)}),Jf()}if(2&e){var r=sm();Wf("hidden",1!==r.getCurrentStep())("selectedModule",r.currentRequest.requestType)}}function PK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-property",110,111),nm("stepSubmit",function(e){return Nu(n),sm().onPropertySubmitted(e)}),Jf()}if(2&e){var r=sm();Wf("hidden",2!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("property",r.currentRequest.property)}}function kK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-applicant",112,113),nm("stepSubmit",function(e){return Nu(n),sm().onApplicantSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onApplicantSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",3!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("isSubmitting",r.isCurrentlySubmitting)("defaultApplicantData",r.currentRequest.property)("applicant",r.currentRequest.applicant)}}function EK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-work-description",114,115),nm("stepSubmit",function(e){return Nu(n),sm().onWorkDescriptionSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onWorkDescriptionSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",4!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("isSubmitting",r.isCurrentlySubmitting)("workDescription",r.currentRequest.workDescription)("permitType",r.currentRequest.permitType)("codeModule",r.currentRequest.requestType.codeModule)}}function AK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-ur-description",116,115),nm("stepSubmit",function(e){return Nu(n),sm().onUrDescriptionSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onUrDescriptionSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",4!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("isSubmitting",r.isCurrentlySubmitting)("urDescriptionInput",r.currentRequest.urDescription)("permitType",r.currentRequest.permitType)}}function IK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-pl-description",117,115),nm("stepSubmit",function(e){return Nu(n),sm().onPlDescriptionSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onPlDescriptionSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",4!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("isSubmitting",r.isCurrentlySubmitting)("plDescriptionInput",r.currentRequest.plDescription)("permitType",r.currentRequest.permitType)}}function TK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-form",118,119),nm("stepSubmit",function(e){return Nu(n),sm().onFormAnswerSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onFormAnswerSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",5!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("formAnswer",r.currentRequest.formAnswer)("isSubmitting",r.isCurrentlySubmitting)("codificationFormulaire",r.currentRequest.permitType.codificationFormulaire)}}function OK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-documents",120,121),nm("stepSubmit",function(e){return Nu(n),sm().onDocumentsSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onDocumentsSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",6!==r.getCurrentStep())("requestPermitType",r.currentRequest.permitType)("batchId",r.currentRequest.batchId)("followUpNumber",r.currentRequest.followUpNo)("isSubmitting",r.isCurrentlySubmitting)("lastName",r.currentRequest.applicant.applicantLastName)("documents",r.currentRequest.documents)("isReadOnlyMode",r.isReadOnlyMode())("codeModule",r.currentRequest.requestType.codeModule)}}function RK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-summary",122),nm("stepSubmit",function(e){return Nu(n),sm().onCompletedFormSubmitted(e)}),Jf()}if(2&e){var r=sm();Wf("hidden",7!==r.getCurrentStep())("requestFormsData",r.currentRequest)("isReadOnlyMode",r.isReadOnlyMode())("requestIsPaid",r.currentRequestIsPaid)("isSubmitting",r.isCurrentlySubmitting)("codeModule",r.currentRequest.requestType.codeModule)}}function VK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-permit-complete",123,124),nm("stepSubmit",function(){return Nu(n),sm().restartRequest()}),Jf()}if(2&e){var r=sm();Wf("hidden",8!==r.getCurrentStep()||!0===r.getIsQSMode())("followUpNumber",r.currentRequest.followUpNo)("applicantName",null==r.currentRequest.applicant?null:r.currentRequest.applicant.applicantLastName)("isSubmitted",r.isSubmitted())("paymentStatus",r.paymentStatus)("paymentReference",r.paymentReference)}}function DK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-qs-applicant",125,126),nm("stepSubmit",function(e){return Nu(n),sm().onQSApplicantSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onQSApplicantSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",2!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("applicant",r.currentRequest.qsApplicant)("isSubmitting",r.isCurrentlySubmitting)}}function NK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-qs-location",127,128),nm("stepSubmit",function(e){return Nu(n),sm().onQSLocationSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onQSLocationSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",3!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("applicant",r.currentRequest.qsApplicant)("location",r.currentRequest.qsLocation)("isSubmitting",r.isCurrentlySubmitting)}}function LK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-qs-details",129,130),nm("stepSubmit",function(e){return Nu(n),sm().onQSDetailsSubmitted(e)})("stepSubmitIsSaveForLater",function(e){return Nu(n),sm().onQSDetailsSubmitted(e,!0)}),Jf()}if(2&e){var r=sm();Wf("hidden",4!==r.getCurrentStep())("isReadOnlyMode",r.isReadOnlyMode())("batchId",r.currentRequest.batchId)("requestNature",r.currentRequest.requestNature)("qsDetails",r.currentRequest.qsDetails)("isSubmitting",r.isCurrentlySubmitting)}}function FK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-qs-summary",131,132),nm("stepSubmit",function(e){return Nu(n),sm().onCompletedQSFormSubmitted(e)}),Jf()}if(2&e){var r=sm();Wf("hidden",5!==r.getCurrentStep())("requestFormsData",r.currentRequest)("isReadOnlyMode",r.isReadOnlyMode())("isSubmitting",r.isCurrentlySubmitting)}}function MK(e,t){if(1&e){var n=Xf();$f(0,"pel-request-qs-complete",133,134),nm("stepSubmit",function(){return Nu(n),sm().restartRequest()}),Jf()}if(2&e){var r=sm();Wf("hidden",6!==r.getCurrentStep())("followUpNumber",r.currentRequest.followUpNo)("applicantName",null==r.currentRequest.qsApplicant?null:r.currentRequest.qsApplicant.applicantLastName)("isSubmitted",r.isQSSubmitted())}}var qK,jK=function(e){return e[e.TransphereServiceUnavailable=-9]="TransphereServiceUnavailable",e}({}),BK=((qK=function(){function e(t,n,r,i,o){var a=this;is(this,e),this.pelService=t,this.route=n,this.router=r,this.localeId=i,this.globalsService=o,this.currentRequest=new BM,this.stepMeta=[],this.isQSMode=!1,this.isCurrentlyNavigating=!1,this.isCurrentlySubmitting=!1,this.isRestartingRequest=!1,this.isInfoVisible=!1,this.hasError=!1,this.hasPaymentUnavailableError=!1,this.isAlreadySubmitted=!1,this.directExternalWidget=!1,this.directSignalementWidget=!1,this.currentRequestIsPaid=!1,this.farChevronLeft=kL,this.farChevronRight=EL,this.farLongArrowLeft=GL,this.farInfoCircle=QL,this.farPlusCircle=tF,this.farTimes=lF,this.farExternalLinkAlt=LL,this.globalsService.newApplicationEvent.subscribe(function(){a.restartNewRequest()})}return as(e,[{key:"ngOnInit",value:function(){var e,t;switch(this.paymentReference="",this.router.url){case"/edit":var n=this.globalsService.getCurrentFollowUpRequest();if(n){if(this.currentRequest=zM.demandeToRequestForms(n),(4===n.etatActuel||1===n.etatActuel)&&(null===(e=n.factures)||void 0===e?void 0:e.length)>0){var r,i=Qa(null==n?void 0:n.factures);try{for(i.s();!(r=i.n()).done;)if(r.value.referencePaiement){this.currentRequestIsPaid=!0;break}}catch(a){i.e(a)}finally{i.f()}}this.manageQSMode("QS"===n.codeModule),this.processPermitBusinessRules(this.currentRequest.permitType),this.currentRequest.batchId=RB.Guid.create().toString(),this.isAlreadySubmitted=null===(t=this.currentRequest.summary)||void 0===t?void 0:t.isSubmitted,this.currentStep=2,this.lastLoadedStep=2}else this.router.navigate(["/request"],{replaceUrl:!0});break;case"/view":var o=this.globalsService.getCurrentFollowUpRequest();o?(this.currentRequest=zM.demandeToRequestForms(o),this.manageQSMode("QS"===o.codeModule),this.processPermitBusinessRules(this.currentRequest.permitType),this.currentStep=this.stepMeta.length,this.lastLoadedStep=this.stepMeta.length):this.router.navigate(["/request"],{replaceUrl:!0});break;case"/create":default:this.processUrlQueryParams()}}},{key:"canDeactivate",value:function(){return this.lastLoadedStep<2&&!this.isRestartingRequest||this.isCurrentlyNavigating||this.isComplete()||this.isReadOnlyMode()}},{key:"processUrlQueryParams",value:function(){var e=this;this.route.queryParams.subscribe(function(t){Object.values(UM).find(function(e){return e===t.status})?(e.manageQSMode(!1),t.status===UM.Accepted&&t.pprn&&e.pelService.confirmPaymentSuccess(t.pprn).subscribe(function(t){t.result&&(e.paymentReference=t.result)}),e.processPaymentStatus(t.status)):e.startNewRequest()})}},{key:"processPaymentStatus",value:function(e){this.updateFollowUpNo(sessionStorage.getItem(VB.PEL_SESSIONSTORAGE_FUN_KEY)),this.paymentStatus=e,this.currentStep=this.stepMeta.length+1}},{key:"startNewRequest",value:function(){this.currentRequest=new BM,this.currentStep=0,this.lastLoadedStep=0,this.paymentStatus=void 0,this.hasError=!1,this.hasPaymentUnavailableError=!1,this.currentRequestIsPaid=!1,sessionStorage.removeItem(VB.PEL_SESSIONSTORAGE_NAME_KEY),sessionStorage.removeItem(VB.PEL_SESSIONSTORAGE_FUN_KEY);var e=this.route.snapshot.queryParams.display;e&&"signalement"===e&&(this.manageQSMode(!0),this.directSignalementWidget=!0)}},{key:"restartRequest",value:function(){this.startNewRequest(),this.router.navigate(["/create"]),this.adjustUrlParams()}},{key:"restartNewRequest",value:function(){var e=this;this.lastLoadedStep>=2&&(this.isRestartingRequest=!0),this.router.navigate(["/"],{relativeTo:this.route,replaceUrl:!0}),setTimeout(function(){"/create"===e.router.url&&e.startNewRequest(),e.isRestartingRequest=!1},100)}},{key:"goToPreviousStep",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];do{if(this.currentStep<=0)break;this.currentStep--}while(!this.getCurrentStepMeta().enabled);e&&this.adjustUrlParams(),this.currentStep<=1&&this.toggleInfoVisibility(!1)}},{key:"goToNextStep",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];do{if(this.isComplete())break;this.currentStep++}while(!this.getCurrentStepMeta().enabled);this.currentStep===this.stepMeta.length&&(this.currentRequest=Object.assign({},this.currentRequest)),e&&this.adjustUrlParams(),this.currentStep>this.lastLoadedStep&&(this.lastLoadedStep=this.currentStep),window.parent.postMessage("PELWidgetParentScrollTop","*")}},{key:"adjustUrlParams",value:function(){var e,t,n,r,i,o,a,s=this;if(!this.isReadOnlyMode()&&"/edit"!==this.router.url){var l;this.isCurrentlyNavigating=!0;var u=this.route.snapshot.queryParams.display,c=this.route.snapshot.queryParams.infos,d=this.route.snapshot.queryParams.product,h=this.route.snapshot.queryParams.mobileUserDataKey;switch(this.currentStep){case 0:this.router.navigate(["/"],{relativeTo:this.route,replaceUrl:!0});break;case 1:var p=null===(e=this.currentRequest.requestType)||void 0===e?void 0:e.codeModule;p&&(this.router.navigate(["./"+p],{relativeTo:this.route.parent,replaceUrl:!0}),l={relativeTo:this.route.parent,replaceUrl:!0},!u||"voila"!==u&&"external"!==u&&"signalement"!==u||(u&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{display:u},queryParamsHandling:"merge"}),c&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{infos:c},queryParamsHandling:"merge"}),h&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{mobileUserDataKey:h},queryParamsHandling:"merge"}),d&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{product:d},queryParamsHandling:"merge"}))),this.router.navigate(["./"+p],l);break;case 2:if(l={relativeTo:this.route.parent,replaceUrl:!0},!u||"voila"!==u&&"external"!==u&&"signalement"!==u||(u&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{display:u},queryParamsHandling:"merge"}),c&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{infos:c},queryParamsHandling:"merge"}),h&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{mobileUserDataKey:h},queryParamsHandling:"merge"}),d&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{product:d},queryParamsHandling:"merge"}),this.directExternalWidget=!0),this.currentRequest.requestType){var f=null===(t=this.currentRequest.requestType)||void 0===t?void 0:t.codeModule,m=null===(n=this.currentRequest.permitType)||void 0===n?void 0:n.codeType;f&&m&&this.router.navigate(["./"+f+"/"+m],l)}if(this.currentRequest.requestNature){var g=null===(r=this.currentRequest.requestType)||void 0===r?void 0:r.codeModule,v=null===(i=this.currentRequest.requestNature)||void 0===i?void 0:i.codeNature;g&&v&&this.router.navigate(["./"+g+"/"+v],l)}break;case 3:if(l={relativeTo:this.route.parent,replaceUrl:!0},!u||"voila"!==u&&"external"!==u&&"signalement"!==u||(u&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{display:u},queryParamsHandling:"merge"}),c&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{infos:c},queryParamsHandling:"merge"}),h&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{mobileUserDataKey:h},queryParamsHandling:"merge"}),d&&(l={relativeTo:this.route.parent,replaceUrl:!0,queryParams:{product:d},queryParamsHandling:"merge"})),this.currentRequest.requestType){var y=null===(o=this.currentRequest.requestType)||void 0===o?void 0:o.codeModule,b=null===(a=this.currentRequest.permitType)||void 0===a?void 0:a.codeType;y&&b&&this.router.navigate(["./"+y+"/"+b],l)}}setTimeout(function(){s.isCurrentlyNavigating=!1},100)}}},{key:"toggleInfoVisibility",value:function(e){this.isInfoVisible=void 0!==e?e:!this.isInfoVisible}},{key:"getCurrentStepMeta",value:function(){var e=this;return this.stepMeta.find(function(t){return t.id===e.currentStep})||this.stepMeta[0]}},{key:"getIsQSMode",value:function(){return this.isQSMode}},{key:"getDisplayedStepTitle",value:function(){return"en"===this.localeId?this.getCurrentStepMeta().en:this.getCurrentStepMeta().fr}},{key:"getDisplayedStepNumber",value:function(){var e=this;return this.stepMeta.filter(function(t){return t.enabled&&t.id<=e.currentStep}).length-1}},{key:"getDisplayedTotalSteps",value:function(){return this.stepMeta.filter(function(e){return e.enabled}).length-1}},{key:"isVoilaWidget",value:function(){return this.globalsService.isVoilaWidget()}},{key:"isExternalWidget",value:function(){return this.globalsService.isExternalWidget()}},{key:"isSignalementWidget",value:function(){return this.globalsService.isSignalementWidget()}},{key:"isLandingPage",value:function(){return!this.currentStep||this.currentStep<1}},{key:"isComplete",value:function(){return this.currentStep>this.stepMeta.length}},{key:"isNextStepEnabled",value:function(){return!(this.isReadOnlyMode()&&this.currentStep>=this.stepMeta.length)&&!(1===this.currentStep&&!this.currentRequest.permitType&&!this.currentRequest.requestNature)&&this.currentStep<this.lastLoadedStep}},{key:"isReadOnlyMode",value:function(){return"/view"===this.router.url}},{key:"isCreateMode",value:function(){return this.router.url.includes("create")}},{key:"isSubmitted",value:function(){var e;return(null===(e=this.currentRequest)||void 0===e?void 0:e.summary)?this.currentRequest.summary.isSubmitted:this.paymentStatus===UM.Accepted}},{key:"isQSSubmitted",value:function(){var e;return!!(null===(e=this.currentRequest)||void 0===e?void 0:e.qsSummary)&&this.currentRequest.qsSummary.isSubmitted}},{key:"goBackToFollowUp",value:function(e){e&&(this.globalsService.currentRequest=void 0),this.router.navigate(["/request"])}},{key:"updateCurrentRequestType",value:function(e){this.currentRequest.requestType!==e&&(this.updateCurrentPermitType(void 0),this.updateCurrentRequestNature(void 0),this.manageQSMode("QS"===e.codeModule),this.currentRequest.requestType=e)}},{key:"updateCurrentPermitType",value:function(e){this.currentRequest.permitType!==e&&(this.updateFormAnswer(void 0),void 0!==this.currentRequest.batchId&&this.deleteAllUploadedFiles(),this.currentRequest.batchId=RB.Guid.create().toString(),this.processPermitBusinessRules(e),this.currentRequest.permitType=e)}},{key:"updateCurrentRequestNature",value:function(e){this.currentRequest.requestNature!==e&&(this.updateFormAnswer(void 0),void 0!==this.currentRequest.batchId&&this.deleteAllUploadedQSFiles(),this.currentRequest.batchId=RB.Guid.create().toString(),this.currentRequest.requestNature=e)}},{key:"manageQSMode",value:function(e){this.isQSMode=e,this.stepMeta=e?[{id:1,enabled:!0,fr:"Choix de la nature de la requ\xeate",en:"Request's nature choice"},{id:2,enabled:!0,fr:"Identification du demandeur",en:"Applicant identification"},{id:3,enabled:!0,fr:"Emplacement vis\xe9 par la requ\xeate",en:"Location affected by the request"},{id:4,enabled:!0,fr:"D\xe9tails de la requ\xeate",en:"Request details"},{id:5,enabled:!0,fr:"R\xe9sum\xe9",en:"Summary"}]:[{id:1,enabled:!0,fr:"Choix du type",en:"Type choice"},{id:2,enabled:!0,fr:"Propri\xe9t\xe9 vis\xe9e par la demande",en:"Property covered by the application"},{id:3,enabled:!0,fr:"Identification du demandeur",en:"Applicant identification"},{id:4,enabled:!0,fr:"D\xe9tails de la demande",en:"Application details"},{id:5,enabled:!0,fr:"D\xe9tails de la demande",en:"Application details"},{id:6,enabled:!0,fr:"Documents et annexes",en:"Documents and appendices"},{id:7,enabled:!0,fr:"R\xe9sum\xe9",en:"Summary"}]}},{key:"deleteAllUploadedFiles",value:function(){void 0!==this.currentRequest.documents&&(this.currentRequest.documents.listOfDocuments=[]),this.pelService.deleteAllUploadedFiles(this.currentRequest.batchId)}},{key:"deleteAllUploadedQSFiles",value:function(){void 0!==this.currentRequest.qsDetails&&(this.currentRequest.qsDetails.listOfDocuments=[]),this.pelService.deleteAllUploadedFiles(this.currentRequest.batchId)}},{key:"updatePropertyForm",value:function(e){this.currentRequest.property=e}},{key:"updateApplicantForm",value:function(e){this.currentRequest.applicant=e}},{key:"updateQSApplicantForm",value:function(e){this.currentRequest.qsApplicant=e}},{key:"updateQSLocationForm",value:function(e){this.currentRequest.qsLocation=e}},{key:"updateWorkDescriptionForm",value:function(e){this.currentRequest.workDescription=e}},{key:"updateUrDescriptionForm",value:function(e){this.currentRequest.urDescription=e}},{key:"updatePlDescriptionForm",value:function(e){this.currentRequest.plDescription=e}},{key:"updateFormAnswer",value:function(e){this.currentRequest.formAnswer=e}},{key:"updateDocumentsForm",value:function(e){this.currentRequest.documents=e}},{key:"updateSummaryForm",value:function(e){this.currentRequest.summary=e}},{key:"updateQSSummaryForm",value:function(e){this.currentRequest.qsSummary=e}},{key:"updateFollowUpNo",value:function(e){this.currentRequest.followUpNo=e}},{key:"updateQSDetailsForm",value:function(e){this.currentRequest.qsDetails=e}},{key:"getCurrentStep",value:function(){return this.currentStep}},{key:"onRequestTypeSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&e.codeModule&&(this.updateCurrentRequestType(e),this.goToNextStep(!t))}},{key:"onPermitChoiceSubmitted",value:function(e){void 0!==e&&("QS"===this.currentRequest.requestType.codeModule?this.updateCurrentRequestNature(e):this.updateCurrentPermitType(e),this.goToNextStep())}},{key:"onCompletedFormSubmitted",value:function(e){if(this.hasError=!1,this.hasPaymentUnavailableError=!1,void 0!==e){this.isCurrentlySubmitting=!0,this.updateSummaryForm(e);var t=zM.requestFormsToDemande(this.currentRequest,this.localeId.split("-")[0],this.router.url);t.produit||(t.produit=this.route.snapshot.queryParams.product||"PelV2-DelV2"),"/edit"===this.router.url?(t.filesToDelete=this.currentRequest.documents.filesToDelete,t.soumise&&(1===t.permisType.payableAvant&&0===t.permisType.payableApres||t.permisType.fraisEtudeDemande>0&&3===t.permisType.typeCout&&1===t.permisType.payableApres)&&!t.permisType.pel_Gratuit&&!this.currentRequestIsPaid?this.updateAndPayRequest(t):this.updateRequest(t,this.currentRequest.documents.filesToDelete,!0)):t.soumise&&(1===t.permisType.payableAvant&&0===t.permisType.payableApres||t.permisType.fraisEtudeDemande>0&&3===t.permisType.typeCout&&1===t.permisType.payableApres)&&!t.permisType.pel_Gratuit?this.addAndPayRequest(t):this.addRequest(t,!0)}}},{key:"onCompletedQSFormSubmitted",value:function(e){if(this.hasError=!1,this.hasPaymentUnavailableError=!1,void 0!==e){this.isCurrentlySubmitting=!0,this.updateQSSummaryForm(e);var t=zM.requestFormsToDemande(this.currentRequest,this.localeId.split("-")[0],this.router.url);t.produit||(t.produit=this.route.snapshot.queryParams.product||"PelV2-DelV2"),"/edit"===this.router.url?(t.filesToDelete=this.currentRequest.qsDetails.filesToDelete,this.updateRequest(t,this.currentRequest.qsDetails.filesToDelete,!1)):this.addRequest(t,!1)}}},{key:"onSaveForLaterQS",value:function(){this.hasError=!1,this.hasPaymentUnavailableError=!1,this.isCurrentlySubmitting=!0;var e=zM.requestFormsToDemande(this.currentRequest,this.localeId.split("-")[0],this.router.url);e.produit||(e.produit=this.route.snapshot.queryParams.product||"PelV2-DelV2"),"/edit"===this.router.url?(e.filesToDelete=this.currentRequest.qsDetails.filesToDelete,this.updateRequest(e,this.currentRequest.qsDetails.filesToDelete,!1,!0)):this.addRequest(e,!1,!0)}},{key:"onSaveForLater",value:function(){this.hasError=!1,this.hasPaymentUnavailableError=!1,this.isCurrentlySubmitting=!0;var e=zM.requestFormsToDemande(this.currentRequest,this.localeId.split("-")[0],this.router.url);e.produit||(e.produit=this.route.snapshot.queryParams.product||"PelV2-DelV2"),"/edit"===this.router.url?this.updateRequest(e,this.currentRequest.documents.filesToDelete,!0,!0):this.addRequest(e,!0,!0)}},{key:"updateRequest",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.pelService.updateRequest(e,t).subscribe(function(e){n?r.currentRequest&&r.currentRequest.applicant&&e.result&&(r.currentRequest.followUpNo=e.result.numeroSuivi,r.currentRequest.applicant.applicantLastName=e.result.nomRequerant,r.globalsService.setCurrentFollowUpRequest(e.result)):r.currentRequest&&r.currentRequest.qsApplicant&&e.result&&(r.currentRequest.followUpNo=e.result.numeroSuivi,r.currentRequest.qsApplicant.applicantLastName=e.result.nomRequerant,r.globalsService.setCurrentFollowUpRequest(e.result)),i?(r.currentStep=r.stepMeta.length,r.goToNextStep()):r.goToNextStep(),r.isCurrentlySubmitting=!1},function(e){var t,i;r.isCurrentlySubmitting=!1,r.hasError=!0,n?(null===(t=r.currentRequest)||void 0===t?void 0:t.summary)&&(r.currentRequest.summary.isSubmitted=r.isAlreadySubmitted):(null===(i=r.currentRequest)||void 0===i?void 0:i.qsSummary)&&(r.currentRequest.qsSummary.isSubmitted=r.isAlreadySubmitted),setTimeout(function(){var e;null===(e=window.document.getElementById("divError"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500)})}},{key:"addRequest",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.pelService.addRequest(e).subscribe(function(e){t?n.currentRequest&&n.currentRequest.applicant&&e.result&&(n.currentRequest.followUpNo=e.result.numeroSuivi,n.currentRequest.applicant.applicantLastName=e.result.nomRequerant,n.globalsService.setCurrentFollowUpRequest(e.result)):n.currentRequest&&n.currentRequest.qsApplicant&&e.result&&(n.currentRequest.followUpNo=e.result.numeroSuivi,n.currentRequest.qsApplicant.applicantLastName=e.result.nomRequerant,n.globalsService.setCurrentFollowUpRequest(e.result)),r?(n.currentStep=n.stepMeta.length,n.goToNextStep()):n.goToNextStep(),n.isCurrentlySubmitting=!1},function(e){var r,i;n.isCurrentlySubmitting=!1,n.hasError=!0,t?(null===(r=n.currentRequest)||void 0===r?void 0:r.summary)&&(n.currentRequest.summary.isSubmitted=!1):(null===(i=n.currentRequest)||void 0===i?void 0:i.qsSummary)&&(n.currentRequest.qsSummary.isSubmitted=!1),setTimeout(function(){var e;null===(e=window.document.getElementById("divError"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500)})}},{key:"updateAndPayRequest",value:function(e){var t=this;this.pelService.updateAndPayRequest(e,this.getCallbackUrl()).subscribe(function(e){var n,r,i,o;sessionStorage.setItem(VB.PEL_SESSIONSTORAGE_FUN_KEY,null===(r=null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.request)||void 0===r?void 0:r.numeroSuivi),sessionStorage.setItem(VB.PEL_SESSIONSTORAGE_NAME_KEY,null===(o=null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.request)||void 0===o?void 0:o.nomRequerant),t.isCurrentlyNavigating=!0,e.result.redirectUrl?t.globalsService.getIsInIFrame?window.parent.location.href=e.result.redirectUrl:window.location.href=e.result.redirectUrl:t.isCurrentlySubmitting=!1},function(e){var n,r;t.isCurrentlySubmitting=!1,(null===(n=e.error)||void 0===n?void 0:n.processStatus)===jK.TransphereServiceUnavailable?(t.hasPaymentUnavailableError=!0,setTimeout(function(){var e;null===(e=window.document.getElementById("divErrorPaymentUnavailable"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500)):(t.hasError=!0,setTimeout(function(){var e;null===(e=window.document.getElementById("divError"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500)),(null===(r=t.currentRequest)||void 0===r?void 0:r.summary)&&(t.currentRequest.summary.isSubmitted=t.isAlreadySubmitted)})}},{key:"addAndPayRequest",value:function(e){var t=this;this.pelService.addAndPayRequest(e,this.getCallbackUrl()).subscribe(function(e){var n,r,i,o;sessionStorage.setItem(VB.PEL_SESSIONSTORAGE_FUN_KEY,null===(r=null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.request)||void 0===r?void 0:r.numeroSuivi),sessionStorage.setItem(VB.PEL_SESSIONSTORAGE_NAME_KEY,null===(o=null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.request)||void 0===o?void 0:o.nomRequerant),t.isCurrentlyNavigating=!0,e.result.redirectUrl?t.globalsService.getIsInIFrame?window.parent.location.href=e.result.redirectUrl:window.location.href=e.result.redirectUrl:t.isCurrentlySubmitting=!1},function(e){var n,r;t.isCurrentlySubmitting=!1,(null===(n=e.error)||void 0===n?void 0:n.processStatus)===jK.TransphereServiceUnavailable?(t.hasPaymentUnavailableError=!0,setTimeout(function(){var e;null===(e=window.document.getElementById("divErrorPaymentUnavailable"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500)):(t.hasError=!0,setTimeout(function(){var e;null===(e=window.document.getElementById("divError"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},500)),(null===(r=t.currentRequest)||void 0===r?void 0:r.summary)&&(t.currentRequest.summary.isSubmitted=!1)})}},{key:"onPropertySubmitted",value:function(e){var t,n;if(void 0!==e&&Object.keys(e).length>0){var r=null===(n=null===(t=this.currentRequest.property)||void 0===t?void 0:t.ownerGroup)||void 0===n?void 0:n.owner;r>0&&(e.ownerGroup.owner=r),this.updatePropertyForm(e),this.goToNextStep()}}},{key:"onApplicantSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateApplicantForm(e),t?this.onSaveForLater():this.goToNextStep())}},{key:"onQSApplicantSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateQSApplicantForm(e),t?this.onSaveForLaterQS():this.goToNextStep())}},{key:"onQSLocationSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateQSLocationForm(e),t?this.onSaveForLaterQS():this.goToNextStep())}},{key:"onQSDetailsSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateQSDetailsForm(e),t?this.onSaveForLaterQS():this.goToNextStep())}},{key:"onWorkDescriptionSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateWorkDescriptionForm(e),t?this.onSaveForLater():this.goToNextStep())}},{key:"onUrDescriptionSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateUrDescriptionForm(e),t?this.onSaveForLater():this.goToNextStep())}},{key:"onPlDescriptionSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updatePlDescriptionForm(e),t?this.onSaveForLater():this.goToNextStep())}},{key:"onFormAnswerSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&(this.updateFormAnswer(e),t?this.onSaveForLater():this.goToNextStep())}},{key:"onDocumentsSubmitted",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&Object.keys(e).length>0&&(this.updateDocumentsForm(e),t?this.onSaveForLater():this.goToNextStep())}},{key:"hideGoBackButton",value:function(){var e,t,n,r,i=null===(t=null===(e=this.currentRequest)||void 0===e?void 0:e.permitType)||void 0===t?void 0:t.sansLieuAffaire;return"PA"===(null===(r=null===(n=this.currentRequest)||void 0===n?void 0:n.requestType)||void 0===r?void 0:r.codeModule)&&1===i&&this.currentStep<=3||!!(this.isReadOnlyMode()&&this.currentStep<=2||"/edit"===this.router.url&&this.currentStep<=2||this.directExternalWidget&&this.currentStep<=2&&!this.directSignalementWidget||this.directSignalementWidget&&this.currentStep<=1)}},{key:"showSchema",value:function(e){var t=this;this.pelService.getSchemaPermisBySchemaId(e.id).subscribe(function(n){if("application/pdf"!==e.mimeType){var r="data:image;base64,"+n.result,i=new Image;i.src=r;var o=window.open("");null==o||o.document.write(i.outerHTML)}else cj.downloadFile("en"===t.localeId?e.descriptionEn:e.description,n.result,dj.PDF)},function(e){console.log(e)})}},{key:"setNextButton",value:function(){var e,t,n,r;if(this.isReadOnlyMode())return!0;if(this.isNextStepEnabled()&&!this.isCurrentlyNavigating)switch(this.currentStep){case 2:return null===(e=this.permitProperty)||void 0===e?void 0:e.propertyIdentificationForm.controls.ownerGroup.valid;case 3:return null===(t=this.permitApplicant)||void 0===t?void 0:t.applicantForm.valid;case 4:return null===(n=this.permitDescription)||void 0===n?void 0:n.formIsValid();case 6:return null===(r=this.permitDoc)||void 0===r?void 0:r.isFormValid();default:return!0}}},{key:"submitFormOnNextButtonClicked",value:function(){if(this.isNextStepEnabled())if(this.isQSMode)switch(this.currentStep){case 2:this.requestQSApplicant.onFormSubmit();break;case 3:this.requestQSLocation.onFormSubmit();break;case 4:this.requestQSDetails.onFormSubmit();break;default:this.goToNextStep()}else switch(this.currentStep){case 2:this.permitProperty.onFormSubmit();break;case 3:this.permitApplicant.onFormSubmit();break;case 4:this.permitDescription.onFormSubmit();break;case 5:this.permitForm.onStepSubmit();break;case 6:this.permitDoc.onSubmitForm();break;default:this.goToNextStep()}}},{key:"getCallbackUrl",value:function(){var e="";if(localStorage.getItem("originFullURL")){var t="/".concat(this.localeId,"/create");window.location.origin.match("localhost")&&(t="/create"),e=localStorage.getItem("originFullURL").includes("?")?localStorage.getItem("originFullURL")+"&pelV2Url="+encodeURIComponent(window.location.origin+t):localStorage.getItem("originFullURL")+"?pelV2Url="+encodeURIComponent(window.location.origin+t),this.isVoilaWidget()?e+=encodeURIComponent("?display=voila"):this.isExternalWidget()&&(e+=encodeURIComponent("?display=external"))}else window.location.origin.includes("localhost")?e+="/create":e+="/".concat(this.localeId,"/create"),this.isVoilaWidget()?e+="?display=voila":this.isExternalWidget()&&(e+="?display=external");return e}},{key:"processPermitBusinessRules",value:function(e){this.defineDynamicWorkDescriptionEnabledStatus(e),this.defineDynamicFormEnabledStatus(e),this.defineDynamicDocumentsEnabledStatus(e),this.defineDynamicPropertyEnabledStatus(e)}},{key:"defineDynamicWorkDescriptionEnabledStatus",value:function(e){var t=this.stepMeta.find(function(e){return 4===e.id});t&&e&&(t.enabled=0!==e.opt_BlocTrav||0!==e.opt_DateDebut||0!==e.opt_DateFin)}},{key:"defineDynamicFormEnabledStatus",value:function(e){var t,n=this.stepMeta.find(function(e){return 5===e.id});n&&(n.enabled=null!==(null==e?void 0:e.idFormulaire)&&null!==(null==e?void 0:e.codificationFormulaire)&&"Territoire"!==(null===(t=this.currentRequest)||void 0===t?void 0:t.produit))}},{key:"defineDynamicDocumentsEnabledStatus",value:function(e){var t,n,r=this.stepMeta.find(function(e){return 6===e.id});r&&(r.enabled=!0,"UR"===this.currentRequest.requestType.codeModule&&(r.enabled=this.globalsService.getPermitMaxDocuments((null===(t=null==e?void 0:e.documentsRequis)||void 0===t?void 0:t.length)?null===(n=null==e?void 0:e.documentsRequis)||void 0===n?void 0:n.length:0)>0))}},{key:"defineDynamicPropertyEnabledStatus",value:function(e){var t=this.stepMeta.find(function(e){return 2===e.id});t&&(t.enabled=!0,"PA"===this.currentRequest.requestType.codeModule&&1===e.sansLieuAffaire&&(t.enabled=!1))}},{key:"getNbrMandatoryDocuments",value:function(){return this.currentRequest.permitType.documentsRequis?this.currentRequest.permitType.documentsRequis.filter(function(e){return"1"===e.isMandatory}).length:0}}]),e}()).\u0275fac=function(e){return new(e||qK)(Qf(Bq),Qf(AD),Qf(JN),Qf(Ry),Qf(zq))},qK.\u0275cmp=zl({type:qK,selectors:[["pel-request"]],viewQuery:function(e,t){var n;1&e&&(my(wY,!0),my(CY,!0),my(xY,!0),my(SY,!0),my(PY,!0),my(kY,!0),my(EY,!0),my(AY,!0),my(IY,!0),my(TY,!0),my(OY,!0),my(RY,!0)),2&e&&(py(n=yy())&&(t.permitType=n.first),py(n=yy())&&(t.permitProperty=n.first),py(n=yy())&&(t.permitApplicant=n.first),py(n=yy())&&(t.requestQSApplicant=n.first),py(n=yy())&&(t.permitDescription=n.first),py(n=yy())&&(t.permitForm=n.first),py(n=yy())&&(t.permitDoc=n.first),py(n=yy())&&(t.permitComplete=n.first),py(n=yy())&&(t.requestQSLocation=n.first),py(n=yy())&&(t.requestQSDetails=n.first),py(n=yy())&&(t.requestQSSummary=n.first),py(n=yy())&&(t.requestQSComplete=n.first))},hostBindings:function(e,t){1&e&&nm("beforeunload",function(){return t.canDeactivate()},!1,fh)},decls:25,vars:23,consts:function(){var e,t,n,r,i,o,a,s,l,u,c,d,h,p,f,m,g,v;return e=Ng(e=" Une erreur s'est produite lors de la sauvegarde de votre demande. " + "[\ufffd#2\ufffd\ufffd/#2\ufffd|\ufffd#3\ufffd\ufffd/#3\ufffd]" + "" + "[\ufffd#2\ufffd\ufffd/#2\ufffd|\ufffd#3\ufffd\ufffd/#3\ufffd]" + " Si le probl\xE8me persiste, veuillez contacter votre ville.\n"),t="Recommencer la demande",n="Commencer une nouvelle demande",r="Retourner au suivi de la demande",i="Aller au suivi de la demande",o="Suivre une autre demande",a="Nouvelle demande",s="Modification de la demande",l="Consultation de la demande",u="Type\xA0:",c="Infos",d="Co\xFBt\xA0:",h="Fermer",p=" Gratuit",f=" Montant variable ",m="Frais pour l'\xE9tude de la demande ",g=" D\xE9lai ",v=Ng(v="{VAR_PLURAL, plural, =1 {1 jour.} other {{INTERPOLATION} jours.}}",{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),[["id","divError","class","alert alert-danger","role","alert","data-testid","940C468B-1976-45D3-926E-70A6450886D2",4,"ngIf"],[4,"ngIf"],["class","mb-2 px-3",4,"ngIf"],["class","title px-3",4,"ngIf"],[1,"card","border-0","shadow-sm","mt-3"],["class","card-header",4,"ngIf"],[1,"card-body"],[3,"hidden","stepBack","stepSubmit","stepSubmitFromMatchedURL",4,"ngIf"],[3,"hidden","selectedModule","stepBack","stepSubmit",4,"ngIf"],[3,"hidden","isReadOnlyMode","property","stepSubmit",4,"ngIf"],[3,"hidden","isReadOnlyMode","isSubmitting","defaultApplicantData","applicant","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","isReadOnlyMode","isSubmitting","workDescription","permitType","codeModule","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","isReadOnlyMode","isSubmitting","urDescriptionInput","permitType","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","isReadOnlyMode","isSubmitting","plDescriptionInput","permitType","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","isReadOnlyMode","formAnswer","isSubmitting","codificationFormulaire","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","requestPermitType","batchId","followUpNumber","isSubmitting","lastName","documents","isReadOnlyMode","codeModule","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","requestFormsData","isReadOnlyMode","requestIsPaid","isSubmitting","codeModule","stepSubmit",4,"ngIf"],[3,"hidden","followUpNumber","applicantName","isSubmitted","paymentStatus","paymentReference","stepSubmit",4,"ngIf"],[3,"hidden","isReadOnlyMode","applicant","isSubmitting","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","isReadOnlyMode","applicant","location","isSubmitting","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","isReadOnlyMode","batchId","requestNature","qsDetails","isSubmitting","stepSubmit","stepSubmitIsSaveForLater",4,"ngIf"],[3,"hidden","requestFormsData","isReadOnlyMode","isSubmitting","stepSubmit",4,"ngIf"],[3,"hidden","followUpNumber","applicantName","isSubmitted","stepSubmit",4,"ngIf"],["id","divError","role","alert","data-testid","940C468B-1976-45D3-926E-70A6450886D2",1,"alert","alert-danger"],e,[1,"mb-2","px-3"],["class","link-back","href","javascript:void(0);","data-testid","113cad6a-5c0d-4081-a9cd-5673b618065d",3,"click",4,"ngIf"],["class","link-back","href","javascript:void(0);","data-testid","5F585C7D-2802-4497-88A8-9433B05CC224",3,"click",4,"ngIf"],["class","link-back","href","javascript:void(0);","data-testid","E13C3BFC-259A-4754-8DDD-7D497FB51B4E",3,"click",4,"ngIf"],["class","link-back","href","javascript:void(0);","data-testid","4A92D6F3-BF01-4E7F-BE7F-450E10A0CB16",3,"click",4,"ngIf"],["class","link-back","href","javascript:void(0);","data-testid","1a096018-8520-4dd7-897f-e3d482aac3ad",3,"click",4,"ngIf"],["href","javascript:void(0);","data-testid","113cad6a-5c0d-4081-a9cd-5673b618065d",1,"link-back",3,"click"],[1,"mr-1",3,"icon"],[1,"text-small"],t,["href","javascript:void(0);","data-testid","5F585C7D-2802-4497-88A8-9433B05CC224",1,"link-back",3,"click"],n,["href","javascript:void(0);","data-testid","E13C3BFC-259A-4754-8DDD-7D497FB51B4E",1,"link-back",3,"click"],r,["href","javascript:void(0);","data-testid","4A92D6F3-BF01-4E7F-BE7F-450E10A0CB16",1,"link-back",3,"click"],i,["href","javascript:void(0);","data-testid","1a096018-8520-4dd7-897f-e3d482aac3ad",1,"link-back",3,"click"],o,[1,"title","px-3"],a,s,l,[1,"px-3"],[1,"subtitle","d-inline-block","mr-2"],u,[1,"btn-secondary","btn-small","d-inline-block","btn-infos",3,"click"],c,["class","ml-2",3,"icon",4,"ngIf"],["class","panel",4,"ngIf"],[1,"ml-2",3,"icon"],[1,"panel"],d,[1,"mt-2"],["class","btn btn-outline-primary mb-3","target","_blank","data-testid","75c60a71-5b3b-4412-b4f4-f8fec353befa",3,"href",4,"ngIf"],["class","text-primary text-small",4,"ngIf"],[1,"mt-2","text-right"],[1,"btn-secondary",3,"click"],[1,"mr-2",3,"icon"],h,p,f,m,[1,"text-primary"],g,"" + "\ufffd#5\ufffd" + "Le d\xE9lai de traitement de ce type de permis est de " + v + " " + "\ufffd/#5\ufffd" + ""," R\xE9glementation ",[1,"text-primary",3,"innerHTML"],["target","_blank","data-testid","75c60a71-5b3b-4412-b4f4-f8fec353befa",1,"btn","btn-outline-primary","mb-3",3,"href"],"Consulter les normes",[1,"text-primary","text-small"],"Documents requis",[4,"ngFor","ngForOf"],["class","pl-4 mt-2 mb-0",4,"ngIf"],[1,"pl-4","mt-2","mb-0"]," * Document obligatoire ","Sch\xE9mas de la r\xE9glementation",["class","btn-outline-primary btn-small mr-2",3,"click",4,"ngFor","ngForOf"],[1,"btn-outline-primary","btn-small","mr-2",3,"click"],[1,"ml-1",3,"icon"],"Nature\xA0:","Infos",[1,"mb-3"],[1,"text-primary","text-small","mb-3"]," Service responsable de la requ\xEAte ","Fermer",[1,"card-header"],[1,"d-flex"],[1,"card-header-nav-item","text-left"],["class","link-arrow","data-testid","9CFA79AE-EAE3-4DD7-A688-114A34FD3133",3,"click",4,"ngIf"],[1,"w-100","my-1","px-2","d-flex","align-items-center","justify-content-center","flex-column"],["class","text-small mb-0",4,"ngIf"],[1,"mb-0"],[1,"card-header-nav-item","text-right"],["class","link-arrow","data-testid","AAB2AEAD-5D3E-4FC4-A51F-703D855C5320",3,"disabled","click",4,"ngIf"],["data-testid","9CFA79AE-EAE3-4DD7-A688-114A34FD3133",1,"link-arrow",3,"click"],[3,"icon"],"Pr\xE9c.",[1,"text-small","mb-0"],"\xC9tape","de",["data-testid","AAB2AEAD-5D3E-4FC4-A51F-703D855C5320",1,"link-arrow",3,"disabled","click"],"Suiv.",[3,"hidden","stepBack","stepSubmit","stepSubmitFromMatchedURL"],[3,"hidden","selectedModule","stepBack","stepSubmit"],["permitChoice",""],[3,"hidden","isReadOnlyMode","property","stepSubmit"],["permitProperty",""],[3,"hidden","isReadOnlyMode","isSubmitting","defaultApplicantData","applicant","stepSubmit","stepSubmitIsSaveForLater"],["permitApplicant",""],[3,"hidden","isReadOnlyMode","isSubmitting","workDescription","permitType","codeModule","stepSubmit","stepSubmitIsSaveForLater"],["permitDescription",""],[3,"hidden","isReadOnlyMode","isSubmitting","urDescriptionInput","permitType","stepSubmit","stepSubmitIsSaveForLater"],[3,"hidden","isReadOnlyMode","isSubmitting","plDescriptionInput","permitType","stepSubmit","stepSubmitIsSaveForLater"],[3,"hidden","isReadOnlyMode","formAnswer","isSubmitting","codificationFormulaire","stepSubmit","stepSubmitIsSaveForLater"],["permitForm",""],[3,"hidden","requestPermitType","batchId","followUpNumber","isSubmitting","lastName","documents","isReadOnlyMode","codeModule","stepSubmit","stepSubmitIsSaveForLater"],["permitDoc",""],[3,"hidden","requestFormsData","isReadOnlyMode","requestIsPaid","isSubmitting","codeModule","stepSubmit"],[3,"hidden","followUpNumber","applicantName","isSubmitted","paymentStatus","paymentReference","stepSubmit"],["permitComplete",""],[3,"hidden","isReadOnlyMode","applicant","isSubmitting","stepSubmit","stepSubmitIsSaveForLater"],["requestQSApplicant",""],[3,"hidden","isReadOnlyMode","applicant","location","isSubmitting","stepSubmit","stepSubmitIsSaveForLater"],["requestQSLocation",""],[3,"hidden","isReadOnlyMode","batchId","requestNature","qsDetails","isSubmitting","stepSubmit","stepSubmitIsSaveForLater"],["requestQSDetails",""],[3,"hidden","requestFormsData","isReadOnlyMode","isSubmitting","stepSubmit"],["requestQSSummary",""],[3,"hidden","followUpNumber","applicantName","isSubmitted","stepSubmit"],["requestQSComplete",""]]},template:function(e,t){1&e&&(Uf(0,VY,4,0,"div",0),Uf(1,DY,1,0,"pel-error-payment-unavailable",1),Uf(2,jY,6,5,"div",2),Uf(3,GY,4,3,"h2",3),Uf(4,mK,12,6,"ng-container",1),Uf(5,yK,12,6,"ng-container",1),$f(6,"section",4),Uf(7,CK,10,4,"div",5),$f(8,"div",6),Uf(9,xK,1,1,"pel-request-type",7),Uf(10,SK,2,2,"pel-request-type-choice",8),Uf(11,PK,2,3,"pel-request-permit-property",9),Uf(12,kK,2,5,"pel-request-permit-applicant",10),Uf(13,EK,2,6,"pel-request-permit-work-description",11),Uf(14,AK,2,5,"pel-request-permit-ur-description",12),Uf(15,IK,2,5,"pel-request-permit-pl-description",13),Uf(16,TK,2,5,"pel-request-permit-form",14),Uf(17,OK,2,9,"pel-request-permit-documents",15),Uf(18,RK,1,6,"pel-request-permit-summary",16),Uf(19,VK,2,6,"pel-request-permit-complete",17),Uf(20,DK,2,4,"pel-request-qs-applicant",18),Uf(21,NK,2,5,"pel-request-qs-location",19),Uf(22,LK,2,6,"pel-request-qs-details",20),Uf(23,FK,2,4,"pel-request-qs-summary",21),Uf(24,MK,2,4,"pel-request-qs-complete",22),Jf(),Jf()),2&e&&(Wf("ngIf",!t.isCurrentlySubmitting&&t.hasError),dp(1),Wf("ngIf",!t.isCurrentlySubmitting&&t.hasPaymentUnavailableError),dp(1),Wf("ngIf",!t.isLandingPage()),dp(1),Wf("ngIf",!t.isVoilaWidget()),dp(1),Wf("ngIf",t.getCurrentStep()>=2&&t.currentRequest.permitType),dp(1),Wf("ngIf",t.getCurrentStep()>=2&&t.currentRequest.requestNature),dp(2),Wf("ngIf",!t.isLandingPage()&&!t.isComplete()),dp(2),Wf("ngIf",t.lastLoadedStep>=0),dp(1),Wf("ngIf",t.lastLoadedStep>=1),dp(1),Wf("ngIf",t.lastLoadedStep>=2&&!1===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=3&&!1===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=4&&!1===t.getIsQSMode()&&"UR"!==t.currentRequest.requestType.codeModule&&"PL"!==t.currentRequest.requestType.codeModule),dp(1),Wf("ngIf",t.lastLoadedStep>=4&&!1===t.getIsQSMode()&&"UR"===t.currentRequest.requestType.codeModule),dp(1),Wf("ngIf",t.lastLoadedStep>=4&&!1===t.getIsQSMode()&&"PL"===t.currentRequest.requestType.codeModule),dp(1),Wf("ngIf",t.lastLoadedStep>=5&&!1===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=6&&!1===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=7&&!1===t.getIsQSMode()),dp(1),Wf("ngIf",(t.lastLoadedStep>=8||t.isComplete())&&!1===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=2&&!0===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=3&&!0===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=4&&!0===t.getIsQSMode()),dp(1),Wf("ngIf",t.lastLoadedStep>=5&&!0===t.getIsQSMode()),dp(1),Wf("ngIf",(t.lastLoadedStep>=6||t.isComplete())&&!0===t.getIsQSMode()))},directives:[M_,ej,DM,L_,GB,Vz,bU,QU,TH,LH,eQ,kQ,YQ,PW,JW,q$,RJ,WJ,uY,_Y],pipes:[sw],styles:[".btn-infos[_ngcontent-%COMP%]{width:85px}h4[_ngcontent-%COMP%]{font-size:1rem;text-decoration:underline}.card-header-nav-item.text-right[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{float:right}.card-header-nav-item.text-left[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{float:left}.card-header-nav-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;clear:both}"],data:{animation:[Zw("slideInOut",[rC(":enter",[tC({overflow:"hidden",height:"0"}),Xw("300ms ease-out",tC({height:"*"}))]),rC(":leave",[Xw("300ms ease-out",tC({overflow:"hidden",height:"0"}))])])]}}),qK);function zK(e,t){1&e&&($f(0,"div",1),$f(1,"h2",2),Kf(2),Rg(3,3),Zf(),Jf(),$f(4,"p"),Rg(5,4),Jf(),$f(6,"h5",5),$f(7,"span"),Rg(8,6),Jf(),Jf(),$f(9,"p"),Rg(10,7),Jf(),$f(11,"h5",5),$f(12,"span"),Rg(13,8),Jf(),Jf(),$f(14,"p"),Rg(15,9),Jf(),$f(16,"h5",5),$f(17,"span"),Rg(18,10),Jf(),Jf(),$f(19,"p"),Rg(20,11),Jf(),$f(21,"h5",5),$f(22,"span"),Rg(23,12),Jf(),Jf(),$f(24,"p"),Rg(25,13),Jf(),$f(26,"h5",5),$f(27,"span"),Rg(28,14),Jf(),Jf(),$f(29,"p"),Rg(30,15),Jf(),Jf())}var UK,HK=((UK=function(){function e(t){is(this,e),this.router=t,this.changeLanguage=new ty}return as(e,[{key:"ngOnInit",value:function(){switch(this.router.url){case"/legalTerms":this.legalTerm=!0;break;case"/privacy":default:this.legalTerm=!1}}}]),e}()).\u0275fac=function(e){return new(e||UK)(Qf(JN))},UK.\u0275cmp=zl({type:UK,selectors:[["pel-terms"]],outputs:{changeLanguage:"changeLanguage"},decls:1,vars:1,consts:function(){return[["class","text-justify",4,"ngIf"],[1,"text-justify"],[1,"title"],"Avis l\xE9gaux","Derni\xE8re mise \xE0 jour : Novembre 2016",[1,"font-weight-bold","text-primary","d-flex","align-items-center","mb-2"],"D\xC9FINITION DES TERMES","Voil\xE0! d\xE9signe les modules Permis et/ou Requ\xEAte de PG Solutions","INTERRUPTION TEMPORAIRE DU SERVICE","PG Solutions peut interrompre, en tout temps, de fa\xE7on temporaire, l'acc\xE8s au site \xE0 des fins de mise \xE0 jour ou de maintenance des programmes et/ou des \xE9quipements. PG Solutions s'engage \xE0 minimiser ces interruptions afin de perturber le moins possible les activit\xE9s des abonn\xE9s.","LIEN VERS D'AUTRES SITES","Ce site peut contenir des liens vers des sites externes exploit\xE9s par des tierces parties. PG Solutions n'exerce aucun contr\xF4le sur ces sites externes et ne peut donc, en aucun cas, \xEAtre tenu responsable de la teneur des propos et du contenu de ces sites. L'insertion de ces liens par PG Solutions vers d'autres sites Web ne suppose aucun endossement du mat\xE9riel pr\xE9sent\xE9 dans ces sites ni aucune association avec les entit\xE9s qui les exploitent.","EXACTITUDE DES DONN\xC9ES","Bien que les informations soient habituellement exactes, PG Solutions ne garantit pas la parfaite exactitude des donn\xE9es recueillies et n'assume aucune responsabilit\xE9 quant aux erreurs qu'elles pourraient contenir ou aux erreurs d'interpr\xE9tation auxquelles elles pourraient donner lieu. En cas de divergence entre un texte officiel et l'information obtenue de ce site, le texte officiel a pr\xE9s\xE9ance. Le client est le seul responsable du r\xE9sultat de ses recherches. Les textes et les donn\xE9es disponibles sont susceptibles de contenir des inexactitudes techniques ou des erreurs typographiques. De plus, en cas de divergence entre un texte officiel et le contenu du site, le texte officiel a pr\xE9s\xE9ance.","RECOURS","Vous \xEAtes le seul responsable des dommages d\xE9coulant de l'utilisation des informations r\xE9unis par Voil\xE0!"]},template:function(e,t){1&e&&Uf(0,zK,31,0,"div",0),2&e&&Wf("ngIf",t.legalTerm)},directives:[M_],styles:[""]}),UK);function QK(e,t){if(1&e){var n=Xf();Kf(0),$f(1,"div",2),$f(2,"p"),$f(3,"button",3),nm("click",function(){return Nu(n),sm().onNewRequestClicked(!0)}),Kf(4),Cm(5,"Nouvelle demande R\xe9sident"),Zf(),Jf(),Jf(),$f(6,"p"),$f(7,"button",4),nm("click",function(){return Nu(n),sm().onNewRequestClicked(!1)}),Kf(8),Cm(9,"Nouvelle demande Non R\xe9sident"),Zf(),Jf(),Jf(),$f(10,"p"),$f(11,"button",5),nm("click",function(){return Nu(n),sm().onFollowUpClicked()}),Kf(12),Cm(13,"Suivi d'une demande"),Zf(),Jf(),Jf(),Jf(),Zf()}}function WK(e,t){if(1&e&&(Kf(0),Yf(1,"iframe",6),Zf()),2&e){var n=sm();dp(1),Wf("src",n.widgetSourceUrl,ah)}}var GK,$K,JK,YK,KK,ZK,XK=((JK=function(){function e(t,n,r){is(this,e),this.sanitizer=t,this.route=n,this.localeId=r,this.userInfoBaseResident={Email:"test@test.ca",FirstName:"Jean",FullAdress:"Avenue de l'\xc9tang",LastName:"Paul",PhoneNumber:"1112223333",NoCivic:"10",NoApp:"",Street:"\xc9TANG",PostalCode:"G5L1T5",City:"Mascouche",StreetType:"AV",StreetLink:"K",Suffix:"",IsResident:!0},this.userInfoBaseNonResident={Email:"test@test.ca",FirstName:"Jean",FullAdress:"Avenue L\xe9onidas",LastName:"Paul",PhoneNumber:"1112223333",NoCivic:"217",NoApp:"102",Street:"Avenue L\xe9onidas",PostalCode:"G5L1T5",City:"Rimouski",StreetType:"",StreetLink:"",Suffix:"",IsResident:!1},this.isResident=!1}return as(e,[{key:"ngOnInit",value:function(){var e=this;this.route.queryParams.subscribe(function(t){t.pelV2Url&&t.pprn&&t.status&&(e.widgetSourceUrl=e.sanitizer.bypassSecurityTrustResourceUrl(t.pelV2Url+"&pprn="+t.pprn+"&status="+t.status))})}},{key:"onNewRequestClicked",value:function(e){this.isResident=e,this.widgetSourceUrl=window.location.href.match("localhost")?this.sanitizer.bypassSecurityTrustResourceUrl(window.location.origin+"/create?display=external&product=Widget"):this.sanitizer.bypassSecurityTrustResourceUrl(window.location.origin+"/".concat(this.localeId,"/create?display=external&product=Widget"))}},{key:"onFollowUpClicked",value:function(){this.widgetSourceUrl=window.location.href.match("localhost")?this.sanitizer.bypassSecurityTrustResourceUrl(window.location.origin+"/request?display=external"):this.sanitizer.bypassSecurityTrustResourceUrl(window.location.origin+"/".concat(this.localeId,"/request?display=external"))}},{key:"onReceiveMessage",value:function(e){if("PELWidgetExternalCommCompleted"===e.data){var t=document.location.origin+document.location.pathname;document.getElementById("iframeWidget").contentWindow.postMessage({User:this.isResident?this.userInfoBaseResident:this.userInfoBaseNonResident,OriginFullURL:t},"*")}else"PELWidgetParentScrollTop"===e.data&&window.scroll({top:0,left:0,behavior:"smooth"})}}]),e}()).\u0275fac=function(e){return new(e||JK)(Qf(Ww),Qf(AD),Qf(Ry))},JK.\u0275cmp=zl({type:JK,selectors:[["pel-widget"]],hostBindings:function(e,t){1&e&&nm("message",function(e){return t.onReceiveMessage(e)},!1,fh)},decls:4,vars:2,consts:[[4,"ngIf"],[1,"h_iframe"],[1,"col-md-12","text-center"],["type","button","data-testid","9DE53B55-ABA3-4A43-AEE0-BB3232134E18",1,"btn","btn-success","mt-3",3,"click"],["type","button","data-testid","362D39C0-3492-4EDF-BB72-E68305B44867",1,"btn","btn-success","mt-3",3,"click"],["type","button","data-testid","9010AEC6-C0B5-44C6-BF91-9019BBF5A20B",1,"btn","btn-success","mt-3",3,"click"],["id","iframeWidget",3,"src"]],template:function(e,t){1&e&&($f(0,"div"),Uf(1,QK,14,0,"ng-container",0),$f(2,"div",1),Uf(3,WK,2,1,"ng-container",0),Jf(),Jf()),2&e&&(dp(1),Wf("ngIf",!t.widgetSourceUrl),dp(2),Wf("ngIf",t.widgetSourceUrl))},directives:[M_],styles:[".h_iframe[_ngcontent-%COMP%]   iframe[_ngcontent-%COMP%]{width:100%;height:100%}.h_iframe[_ngcontent-%COMP%]{height:800px;width:100%}"]}),JK),eZ=(($K=function(){function e(t,n,r){is(this,e),this.router=t,this.globals=n,this.localeId=r}return as(e,[{key:"canActivate",value:function(){var e=this;return this.globals.cityInfoAsync.subscribe(function(t){t.multilingual||window.location.href.match("localhost")||"fr"===e.localeId||(window.location.href="/fr"+e.router.url)}),!0}}]),e}()).\u0275fac=function(e){return new(e||$K)(md(JN),md(zq),md(Ry))},$K.\u0275prov=dl({token:$K,factory:$K.\u0275fac}),$K),tZ=((GK=function(){function e(t){is(this,e),this.localeId=t}return as(e,[{key:"canDeactivate",value:function(e){var t="en"===this.localeId?"You have not completed your application. Press Cancel to stay and complete it or OK to leave and abandon your application.":"Vous n'avez pas compl\xe9t\xe9 votre demande. Appuyez sur Annuler pour rester et la compl\xe9ter ou OK pour quitter et abandonner votre demande.";return!!e.canDeactivate()||confirm(t)}}]),e}()).\u0275fac=function(e){return new(e||GK)(md(Ry))},GK.\u0275prov=dl({token:GK,factory:GK.\u0275fac}),GK),nZ=[{path:"create",canActivate:[eZ],children:[{path:"**",component:BK,canDeactivate:[tZ]}]},{path:"view",canActivate:[eZ],component:BK},{path:"edit",canActivate:[eZ],children:[{path:"**",component:BK,canDeactivate:[tZ]}]},{path:"request",canActivate:[eZ],component:OB},{path:"error",canActivate:[eZ],component:LM},{path:"privacy",canActivate:[eZ],component:HK},{path:"legalTerms",canActivate:[eZ],component:HK},{path:"widget",canActivate:[eZ],component:XK},{path:"**",redirectTo:"create"}],rZ=((ZK=function e(){is(this,e)}).\u0275mod=Wl({type:ZK}),ZK.\u0275inj=hl({factory:function(e){return new(e||ZK)},imports:[[hL.forRoot(nZ,{relativeLinkResolution:"legacy"})],hL]}),ZK),iZ=((KK=function(){function e(t){is(this,e),this.localeId=t}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||KK)(Qf(Ry))},KK.\u0275cmp=zl({type:KK,selectors:[["pel-splash-screen"]],decls:9,vars:1,consts:[[1,"splash-pel"],[1,"central"],[1,"branding"],["alt","Demandes en ligne",3,"src"],[1,"progress"],[1,"spinner"],[1,"bounce1"],[1,"bounce2"],[1,"bounce3"]],template:function(e,t){1&e&&($f(0,"section",0),$f(1,"div",1),$f(2,"div",2),Yf(3,"img",3),Jf(),$f(4,"div",4),$f(5,"div",5),Yf(6,"div",6),Yf(7,"div",7),Yf(8,"div",8),Jf(),Jf(),Jf(),Jf()),2&e&&(dp(3),dm("src","assets/pel_logo_title_",t.localeId,".svg",oh))},styles:[""]}),KK),oZ=((YK=function(){function e(){is(this,e),this.farExclamationTriangle=NL}return as(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||YK)},YK.\u0275cmp=zl({type:YK,selectors:[["pel-offline"]],decls:5,vars:1,consts:function(){return[[1,"offline-pel"],[1,"center","text-message","text-danger","error-loading"],["size","3x",3,"icon"],[1,"my-4","p"],"Le site est pr\xE9sentement hors-ligne."]},template:function(e,t){1&e&&($f(0,"div",0),$f(1,"div",1),Yf(2,"fa-icon",2),$f(3,"p",3),Rg(4,4),Jf(),Jf(),Jf()),2&e&&(dp(2),Wf("icon",t.farExclamationTriangle))},directives:[DM],styles:[".offline-pel[_ngcontent-%COMP%]{position:fixed;z-index:100000;background-color:#fff;width:100%;height:100%}.offline-pel[_ngcontent-%COMP%]   .center[_ngcontent-%COMP%]{margin:32vh auto 0;text-align:center}.offline-pel[_ngcontent-%COMP%]   .text-message[_ngcontent-%COMP%]{font-size:1.2rem}"]}),YK);function aZ(e,t){if(1&e){var n=Xf();$f(0,"button",24),nm("click",function(){return Nu(n),sm().changeLang()}),Rg(1,25),Jf()}}function sZ(e,t){if(1&e){var n=Xf();$f(0,"button",26),nm("click",function(){return Nu(n),sm().changeLang()}),Rg(1,27),Jf()}}var lZ,uZ,cZ=function(){return["/request"]},dZ=((lZ=function(){function e(t,n,r,i){is(this,e),this.router=t,this.route=n,this.globalsService=r,this.configService=i,this.jumpToNewApplication=new ty,this.changeLanguage=new ty}return as(e,[{key:"ngOnInit",value:function(){this.cityInfos=this.globalsService.getCityInfos(),this.setLogoPaths()}},{key:"changeLang",value:function(){this.changeLanguage.emit()}},{key:"setLogoPaths",value:function(){var e,t;this.logoUrl="".concat(null===(e=this.configService.getUrlConfig())||void 0===e?void 0:e.api_url,"pel/GetCityLogoImage?cityCode=").concat(this.cityInfos.cityCode),this.bgUrl="".concat(null===(t=this.configService.getUrlConfig())||void 0===t?void 0:t.api_url,"pel/GetCityBackgroundImage?cityCode=").concat(this.cityInfos.cityCode)}},{key:"goToNewFollowUp",value:function(){this.globalsService.currentRequest=void 0,this.router.navigate(["/request"])}},{key:"goToNewApplication",value:function(){this.globalsService.currentRequest=void 0,"/create"!==this.router.url&&(this.router.url.indexOf("/request")>=0?this.router.navigate(["/create"]):this.jumpToNewApplication.emit())}}]),e}()).\u0275fac=function(e){return new(e||lZ)(Qf(JN),Qf(AD),Qf(zq),Qf(Mq))},lZ.\u0275cmp=zl({type:lZ,selectors:[["pel-header"]],outputs:{jumpToNewApplication:"jumpToNewApplication",changeLanguage:"changeLanguage"},decls:26,vars:16,consts:function(){return[[1,"pel-header"],[1,"background-image"],[1,"card","header-content"],[1,"header-logo"],["alt","logo",3,"src","hidden","error"],["logoImg",""],"Demandes en ligne",[1,"pel-nav","d-none","d-lg-block"],[1,"pel-nav-side"],["data-testid","C16C0F83-6195-4D3B-862F-42E2121536F9",1,"pel-nav-item"],[3,"click"],"Nouvelle demande",["data-testid","3378101D-88AF-4387-B884-6D5060B0F76C",1,"pel-nav-item"],["href","javascript:void(0);",3,"click"],"Suivi d'une demande",["class","btn btn-secondary btn-small lang","data-testid","0156C272-23ED-497C-B679-5917E8B9687E",3,"click",4,"ngIf"],[1,"pel-nav","d-lg-none"],[1,"pel-nav-inline"],["data-testid","3D68B093-252B-46E6-9D79-27B028FBE95A",1,"pel-nav-item"],"Nouvelle demande",["data-testid","B9D50ED6-7799-46C7-AE38-4C356BF9195A",1,"pel-nav-item"],[3,"routerLink"],"Suivi d'une demande",["class","btn btn-secondary btn-small lang","data-testid","631CF38D-CEAE-4FC0-A9BE-E2DD04822B56",3,"click",4,"ngIf"],["data-testid","0156C272-23ED-497C-B679-5917E8B9687E",1,"btn","btn-secondary","btn-small","lang",3,"click"],"English",["data-testid","631CF38D-CEAE-4FC0-A9BE-E2DD04822B56",1,"btn","btn-secondary","btn-small","lang",3,"click"],"En"]},template:function(e,t){if(1&e){var n=Xf();$f(0,"header",0),Yf(1,"div",1),$f(2,"div",2),$f(3,"figure",3),$f(4,"img",4,5),nm("error",function(){return Nu(n),Hf(5).hidden=!0}),Jf(),$f(6,"figcaption"),Rg(7,6),Jf(),Jf(),$f(8,"nav",7),$f(9,"ul",8),$f(10,"li",9),$f(11,"a",10),nm("click",function(){return t.goToNewApplication()}),Rg(12,11),Jf(),Jf(),$f(13,"li",12),$f(14,"a",13),nm("click",function(){return t.goToNewFollowUp()}),Rg(15,14),Jf(),Jf(),Jf(),Uf(16,aZ,2,0,"button",15),Jf(),Jf(),Jf(),$f(17,"nav",16),$f(18,"ul",17),$f(19,"li",18),$f(20,"a",10),nm("click",function(){return t.goToNewApplication()}),Rg(21,19),Jf(),Jf(),$f(22,"li",20),$f(23,"a",21),Rg(24,22),Jf(),Jf(),Jf(),Uf(25,sZ,2,0,"button",23),Jf()}if(2&e){var r=Hf(5);dp(1),mm("background-image","url("+t.bgUrl+")"),dp(3),Wf("src",t.logoUrl,oh)("hidden",r.hidden),dp(7),gm("active",t.router.url.includes("/create")),dp(3),gm("active",t.router.url.includes("/request")),dp(2),Wf("ngIf",t.cityInfos.multilingual),dp(4),gm("active",t.router.url.includes("/create")),dp(3),gm("active",t.router.url.includes("/request")),Wf("routerLink",Qv(15,cZ)),dp(2),Wf("ngIf",t.cityInfos.multilingual)}},directives:[M_,YN],styles:['.pel-header[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;padding:8px;text-align:center;height:125px;background-color:var(--pel-primary);overflow:hidden}@media screen and (min-width:1024px){.pel-header[_ngcontent-%COMP%]{height:100%;width:100%;align-items:flex-start;justify-content:flex-end;padding:2rem 1rem}}@media screen and (min-width:1200px){.pel-header[_ngcontent-%COMP%]{padding:2rem}}.pel-header[_ngcontent-%COMP%] > .background-image[_ngcontent-%COMP%]{content:"";display:block;position:absolute;top:0;right:0;left:0;height:125px;background-size:cover;background-position:50%;filter:grayscale(1);opacity:.1}@media screen and (min-width:1024px){.pel-header[_ngcontent-%COMP%] > .background-image[_ngcontent-%COMP%]{height:100%}}.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]{width:240px;padding:.75rem;box-shadow:0 0 4px 3px rgba(0,0,0,.25);z-index:10}@media screen and (min-width:1024px){.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]{width:340px;font-size:1.3em}}.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]   .header-logo[_ngcontent-%COMP%]{margin:0}@media screen and (min-width:1024px){.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]   .header-logo[_ngcontent-%COMP%]{margin-bottom:.5rem}}.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]   .header-logo[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-height:50px;max-width:210px;margin-bottom:.5rem}@media screen and (min-width:1024px){.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]   .header-logo[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin:1rem 0}}.pel-header[_ngcontent-%COMP%]   .header-content[_ngcontent-%COMP%]   .header-logo[_ngcontent-%COMP%]   figcaption[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1.25em;font-weight:700;color:var(--pel-primary);text-shadow:1px 2px var(--pel-primary-light)}.pel-nav[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0}.pel-nav[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]{margin:.25rem}.pel-nav[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--pel-primary);border-radius:6px;transition:background-color .2s ease-out}.pel-nav[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]   a.active[_ngcontent-%COMP%], .pel-nav[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus, .pel-nav[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:none;background-color:var(--pel-primary-lighter)}.pel-nav[_ngcontent-%COMP%]   .pel-nav-inline[_ngcontent-%COMP%]{margin:.5rem 0;text-align:center}.pel-nav[_ngcontent-%COMP%]   .pel-nav-inline[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]{display:inline-block}.pel-nav[_ngcontent-%COMP%]   .pel-nav-inline[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{padding:.25rem .5rem}.pel-nav[_ngcontent-%COMP%]   .pel-nav-side[_ngcontent-%COMP%]{text-align:left}.pel-nav[_ngcontent-%COMP%]   .pel-nav-side[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]{display:block;width:100%}.pel-nav[_ngcontent-%COMP%]   .pel-nav-side[_ngcontent-%COMP%]   .pel-nav-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:block;font-size:18px;padding:6px 12px;width:calc(100% - .5rem)}.pel-nav[_ngcontent-%COMP%]   button.lang[_ngcontent-%COMP%]{position:absolute;top:8px;right:.5rem}@media screen and (min-width:1024px){.pel-nav[_ngcontent-%COMP%]   button.lang[_ngcontent-%COMP%]{bottom:-50px;top:auto;right:0}}']}),lZ),hZ=function(){return[]},pZ=function(){return["/legalTerms"]},fZ=((uZ=function(){function e(t,n){is(this,e),this.router=t,this.localeId=n}return as(e,[{key:"ngOnInit",value:function(){this.initCurrentYear()}},{key:"initCurrentYear",value:function(){this.currentYear=(new Date).getFullYear(),this.confidentialityUrl="en"===this.localeId?"https://www.pgsolutions.com/en/confidentiality":"https://www.pgsolutions.com/fr/confidentialite/"}}]),e}()).\u0275fac=function(e){return new(e||uZ)(Qf(JN),Qf(Ry))},uZ.\u0275cmp=zl({type:uZ,selectors:[["pel-footer"]],decls:12,vars:7,consts:function(){return[[1,"footer","text-center"],[1,"signature","mr-1"],"Tous droits r\xE9serv\xE9s",[1,"links"],["target","_blank",3,"href"],"Confidentialit\xE9",["target","_blank",3,"routerLink"],"Avis l\xE9gal"]},template:function(e,t){1&e&&($f(0,"footer",0),$f(1,"div",1),Cm(2),Kf(3),Rg(4,2),Zf(),Cm(5,". "),Jf(),$f(6,"div",3),$f(7,"a",4),Rg(8,5),Jf(),Cm(9," \xa0-\xa0 "),$f(10,"a",6),Rg(11,7),Jf(),Jf(),Jf()),2&e&&(dp(2),Sm("\xa9 ",t.currentYear," PG Solutions. "),dp(5),Wf("href",t.confidentialityUrl,oh),dp(3),gm("active",t.router.url.includes("/legalTerms")),Wf("routerLink",t.router.url.includes("/legalTerms")?Qv(5,hZ):Qv(6,pZ)))},directives:[YN],styles:[".footer[_ngcontent-%COMP%]{width:100%;max-width:340px;margin-top:1.5rem;margin-left:auto;margin-right:auto}.footer[_ngcontent-%COMP%], .footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#979797}@media screen and (min-width:1024px){.footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:2rem;right:calc(65% + 1rem)}}@media screen and (min-width:1024px) and (min-width:1200px){.footer[_ngcontent-%COMP%]{right:calc(65% + 2rem)}}@media screen and (min-width:1024px){.footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#fff}}"]}),uZ);function mZ(e,t){1&e&&Yf(0,"pel-splash-screen")}function gZ(e,t){1&e&&Yf(0,"pel-offline")}function vZ(e,t){1&e&&Yf(0,"pel-widget")}function yZ(e,t){1&e&&($f(0,"div",3),Yf(1,"div",4),Yf(2,"div",5),Yf(3,"div",6),Yf(4,"div",7),$f(5,"div",8),Kf(6),Rg(7,9),Zf(),Jf(),Jf())}function bZ(e,t){if(1&e){var n=Xf();$f(0,"pel-header",14),nm("changeLanguage",function(){return Nu(n),sm(2).changeLanguage()})("jumpToNewApplication",function(){return Nu(n),sm(2).goToNewApplication()}),Jf()}}function _Z(e,t){1&e&&Yf(0,"pel-footer")}function wZ(e,t){if(1&e&&($f(0,"div",10),Uf(1,bZ,1,0,"pel-header",11),$f(2,"main",12),$f(3,"section",13),Yf(4,"router-outlet"),Uf(5,_Z,1,0,"pel-footer",0),Jf(),Jf(),Jf()),2&e){var n=sm();dp(1),Wf("ngIf",!n.isWidget()),dp(4),Wf("ngIf",!n.isWidget())}}var CZ,xZ,SZ,PZ,kZ,EZ=((xZ=function(){function e(t,n,r,i,o){is(this,e),this.elementRef=t,this.globals=n,this.router=r,this.route=i,this.localeId=o,this.isLoading=!0,this.isOffline=!1,this.isWidgetRequest=!1,r.events.subscribe(function(e){window.parent.postMessage("PELWidgetParentScrollTop","*")})}return as(e,[{key:"onReceiveMessage",value:function(e){localStorage.getItem("voilaRequester")&&localStorage.removeItem("voilaRequester"),e.data.IsFromVoila&&e.data.User||e.origin===window.origin&&e.data.User?localStorage.setItem("requester",JSON.stringify(e.data.User)):e.origin!==window.origin&&console.log(e.origin+"trying to communicate, ignoring."),e.data.OriginFullURL&&localStorage.setItem("originFullURL",e.data.OriginFullURL)}},{key:"ngOnInit",value:function(){var e=this;this.isWidgetRequest=window.location.href.indexOf("/widget")>=0,this.route.queryParams.subscribe(function(t){if(t.display)switch(t.display.toLowerCase()){case"external":e.globals.setIsExternalWidget(),e.globals.setIsInIFrame(!0),window.parent.postMessage("PELWidgetExternalCommCompleted","*");break;case"voila":e.globals.setIsVoilaWidget(),e.globals.setIsInIFrame(!0),window.parent.postMessage("PELWidgetCommCompleted","*");break;case"signalement":e.globals.setIsSignalementWidget(),e.globals.setIsInIFrame(!0)}t.mobileUserDataKey&&(e.globals.setVoilaUserDataForMobile(t.mobileUserDataKey),e.globals.setIsInIFrame(!1))}),this.globals.initGlobals().subscribe(function(){var t,n;e.updateDocTitleWithCityInfo(),e.isLoading=!1,e.setThemeVariables(),!(null===(t=e.globals.getCityInfos())||void 0===t?void 0:t.offline)&&(null===(n=e.globals.getCityInfos())||void 0===n?void 0:n.active)||(e.isOffline=!0,e.isLoading=!1)},function(){e.router.navigate(["error"]),console.error("Error while loading globals"),e.isLoading=!1})}},{key:"setThemeVariables",value:function(){this.elementRef.nativeElement.style.setProperty("--pel-primary","#0F5F96"),this.elementRef.nativeElement.style.setProperty("--pel-primary-light","#CFDFEA"),this.elementRef.nativeElement.style.setProperty("--pel-primary-lighter","#E6EFF4");var e=this.globals.getCityInfos();(null==e?void 0:e.appearanceParameters)&&(e.appearanceParameters.colorPrimary&&this.elementRef.nativeElement.style.setProperty("--pel-primary",e.appearanceParameters.colorPrimary),e.appearanceParameters.colorPrimaryLight&&this.elementRef.nativeElement.style.setProperty("--pel-primary-light",e.appearanceParameters.colorPrimaryLight),e.appearanceParameters.colorPrimaryLighter&&this.elementRef.nativeElement.style.setProperty("--pel-primary-lighter",e.appearanceParameters.colorPrimaryLighter))}},{key:"updateDocTitleWithCityInfo",value:function(){var e="en"===this.localeId?" - Online Requests":" - Demandes en ligne";document.title=this.globals.getLocaleCityName()+e}},{key:"changeLanguage",value:function(){window.location.href="/"+("fr"===this.localeId?"en":"fr")}},{key:"isWidget",value:function(){return this.globals.isVoilaWidget()||this.globals.isExternalWidget()||this.globals.isSignalementWidget()}},{key:"isInternetExplorerBrowser",value:function(){var e=window.navigator.userAgent;return/MSIE|Trident/.test(e)}},{key:"goToNewApplication",value:function(){"/create"!==this.router.url&&this.globals.newApplicationEvent.next()}},{key:"ngOnDestroy",value:function(){this.globals.newApplicationEvent.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||xZ)(Qf(Yg),Qf(zq),Qf(JN),Qf(AD),Qf(Ry))},xZ.\u0275cmp=zl({type:xZ,selectors:[["pel-root"]],hostBindings:function(e,t){1&e&&nm("message",function(e){return t.onReceiveMessage(e)},!1,fh)},decls:5,vars:5,consts:function(){return[[4,"ngIf"],["class","IEwarning",4,"ngIf"],["class","pel-frame",4,"ngIf"],[1,"IEwarning"],[1,"browser-chrome","d-inline-block"],[1,"browser-edge","d-inline-block"],[1,"browser-safari","d-inline-block"],[1,"browser-firefox","d-inline-block"],[1,"IEwarningText","font-weight-bold","text-white","d-inline-block","ml-3"]," La version de votre navigateur n\u2019est pas pris en charge. Veuillez plut\xF4t utiliser la version la plus r\xE9cente de Google Chrome, Microsoft Edge, Safari ou Mozilla Firefox. ",[1,"pel-frame"],[3,"changeLanguage","jumpToNewApplication",4,"ngIf"],[1,"content-wrapper"],[1,"content"],[3,"changeLanguage","jumpToNewApplication"]]},template:function(e,t){1&e&&(Uf(0,mZ,1,0,"pel-splash-screen",0),Uf(1,gZ,1,0,"pel-offline",0),Uf(2,vZ,1,0,"pel-widget",0),Uf(3,yZ,8,0,"div",1),Uf(4,wZ,6,2,"div",2)),2&e&&(Wf("ngIf",t.isLoading),dp(1),Wf("ngIf",t.isOffline),dp(1),Wf("ngIf",t.isWidgetRequest),dp(1),Wf("ngIf",t.isInternetExplorerBrowser()&&!t.isLoading&&!t.isOffline),dp(1),Wf("ngIf",!t.isLoading&&!t.isOffline&&!t.isWidgetRequest))},directives:[M_,iZ,oZ,XK,tL,dZ,fZ],styles:[".content-wrapper[_ngcontent-%COMP%]{padding:1rem}@media screen and (max-width:600px){.content-wrapper[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem}}.content-wrapper[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{max-width:640px;margin-left:auto;margin-right:auto}@media screen and (min-width:1024px){.pel-frame[_ngcontent-%COMP%]{height:100vh;overflow:hidden}.pel-frame[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline-block;height:100vh;overflow-y:auto}.pel-frame[_ngcontent-%COMP%]   pel-header[_ngcontent-%COMP%]{width:35%}.pel-frame[_ngcontent-%COMP%]   .content-wrapper[_ngcontent-%COMP%]{width:65%;padding:2rem}.pel-frame[_ngcontent-%COMP%]   .content-wrapper[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{margin:0}}.browser-chrome[_ngcontent-%COMP%]{background-image:url(Chrome.1bffca36b067e00ee22c.svg)}.browser-chrome[_ngcontent-%COMP%], .browser-edge[_ngcontent-%COMP%]{width:100%;max-width:35px;height:35px;background-size:contain;background-repeat:no-repeat;background-position:50%;margin-left:5px;margin-right:5px}.browser-edge[_ngcontent-%COMP%]{background-image:url(Edge.f8037b481cf4996a76c8.svg)}.browser-safari[_ngcontent-%COMP%]{background-image:url(Safari.3feaa4f5becc973b9629.svg)}.browser-firefox[_ngcontent-%COMP%], .browser-safari[_ngcontent-%COMP%]{width:100%;max-width:35px;height:35px;background-size:contain;background-repeat:no-repeat;background-position:50%;margin-left:5px;margin-right:5px}.browser-firefox[_ngcontent-%COMP%]{background-image:url(Firefox.512482d47a5fe2391076.svg)}.IEwarning[_ngcontent-%COMP%]{background-color:#990101;opacity:.9;width:100%;padding-top:10px;text-align:center}.IEwarningText[_ngcontent-%COMP%]{vertical-align:10px}"]}),xZ),AZ=((CZ=function(){function e(){is(this,e)}return as(e,[{key:"intercept",value:function(e,t){if("GET"===e.method&&e.url.indexOf("GetUserInformation")>=0){var n=e.clone({headers:e.headers.set("Cache-Control","no-cache").set("Pragma","no-cache")});return t.handle(n)}return t.handle(e)}}]),e}()).\u0275fac=function(e){return new(e||CZ)},CZ.\u0275prov=dl({token:CZ,factory:CZ.\u0275fac}),CZ);function IZ(e){return function(){return e.load(yb.city_code_config)}}SZ=KR.a,kZ=void 0,"string"!=typeof(PZ=void 0)&&(kZ=PZ,PZ=SZ[Dm.LocaleId]),PZ=PZ.toLowerCase().replace(/_/g,"-"),Tm[PZ]=SZ,kZ&&(Tm[PZ][Dm.ExtraData]=kZ);var TZ,OZ=((TZ=function e(){is(this,e)}).\u0275mod=Wl({type:TZ,bootstrap:[EZ]}),TZ.\u0275inj=hl({factory:function(e){return new(e||TZ)},providers:[sw,qq,zM,EQ,cj,zq,Mq,{provide:xy,useFactory:IZ,deps:[Mq],multi:!0},n$,{provide:xq,useClass:AZ,multi:!0},jq,Bq,tZ,eZ],imports:[[t$.forRoot({apiKey:"AIzaSyBMeNqFtC_6C6ay_YvlO3MKqcadGgy3jTQ",libraries:["places"]}),Yw,CS,rZ,Zq,NM,Lq,wk,Ck,YT,GR.forRoot(),gQ.forRoot(yb),rQ,LR,RA,iJ]]}),TZ);yb.production&&function(){if(Td)throw new Error("Cannot enable prod mode after platform setup.");Id=!1}(),$w().bootstrapModule(OZ).catch(function(e){return console.error(e)})},zn8P:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"}},[[0,0]]])}();