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U,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,UAEd,SAASC,GAAkBriJ,GAIvB,OAAOA,EAAKxQ,QAAQ,oBAHLyiC,GACJmwH,GAAW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K,MAAO,SAAK,OAAK,OAsH9C8+L,IArH6B3mM,MAAME,KAAKumM,IACvCzmM,MAAME,KAAKwmM,KACc1mM,MAAME,KAAKumM,IAmHT/kH,GAAcklH,IAAkBz+L,IAAIu5E,IAAcA,GAG9EklH,IAAoB,IAAIr/L,IAAI,CAC9B,CAAC2yL,GAAQA,IACT,CAACG,GAASA,IACV,CAACY,GAASC,IACV,CAACA,GAAYD,IACb,CAACG,GAAWD,IACZ,CAACA,GAAUC,IACX,CAACC,GAAYC,IACb,CAACA,GAAYD,IACb,CAACE,GAAYC,IACb,CAACA,GAAYD,IACb,CAAC0I,GAAWA,IACZ,CAACC,GAAYA,IACb,CAACnF,GAAWA,IACZ,CAACF,GAAYC,IACb,CAACA,GAAYD,IACb,CAACG,GAAOA,IACR,CAACrB,GAAUA,IACX,CAACC,GAAUA,IACX,CAACC,GAAUA,IACX,CAACC,GAAaA,IACd,CAACC,GAAYA,IACb,CAACC,GAAWA,IACZ,CAACC,GAAaA,IACd,CAACC,GAASA,IACV,CAACC,GAASA,IACV,CAACC,GAASA,IACV,CAACC,GAASA,IACV,CAACtC,GAAgBA,IACjB,CAACC,GAAiBA,IAClB,CAACC,GAAaI,IACd,CAACH,GAAcI,IACf,CAACH,GAAeI,IAChB,CAACH,GAAgBI,IACjB,CAACD,GAAcJ,IACf,CAACK,GAAeJ,IAChB,CAACC,GAAgBJ,IACjB,CAACK,GAAiBJ,IAClB,CAACO,GAAYI,IACb,CAACH,GAAaI,IACd,CAACH,GAAYI,IACb,CAACH,GAAaI,IACd,CAACH,GAAYJ,IACb,CAACK,GAAaJ,IACd,CAACK,GAAYJ,IACb,CAACK,GAAaJ,IACd,CAACK,GAAmBA,IACpB,CAACC,GAAoBA,IACrB,CAACC,GAAmBA,IACpB,CAACC,GAAoBA,IACrB,CAACC,GAAaA,IACd,CAACC,GAAcA,IACf,CAACC,GAAaA,IACd,CAACC,GAAcA,IACf,CAACgC,GAAYU,IACb,CAACQ,GAAaK,IACd,CAACjB,GAAcL,IACf,CAACqB,GAAeH,IAChB,CAACT,GAAeV,IAChB,CAACuB,GAAgBL,IACjB,CAACjB,GAAaK,IACd,CAACa,GAAcG,IACf,CAACzB,GAAeA,IAChB,CAACe,GAAgBA,IACjB,CAACT,GAAWL,IACZ,CAACsB,GAAYP,IACb,CAACL,GAAWJ,IACZ,CAACU,GAAYO,IACb,CAACvB,GAAWK,IACZ,CAACU,GAAYO,IACb,CAAChB,GAAWI,IACZ,CAACa,GAAYP,IACb,CAACZ,GAAeG,IAChB,CAACW,GAAgBC,IACjB,CAACZ,GAAkBH,IACnB,CAACe,GAAmBD,IACpB,CAACjB,GAAkBA,IACnB,CAACgB,GAAmBA,IACpB,CAACR,GAAkBA,IACnB,CAACiB,GAAmBA,IACpB,CAACf,GAAgBE,IACjB,CAACc,GAAiBC,IAClB,CAACf,GAAiBF,IAClB,CAACiB,GAAkBD,IACnB,CAACO,GAAYG,IACb,CAACK,GAAaE,IACd,CAACR,GAAcD,IACf,CAACQ,GAAeE,IAChB,CAACR,GAAeH,IAChB,CAACU,GAAgBF,IACjB,CAACP,GAAaC,IACd,CAACS,GAAcF,IACf,CAACL,GAAWG,IACZ,CAACK,GAAYE,IACb,CAACR,GAAWD,IACZ,CAACQ,GAAYE,IACb,CAACR,GAAWH,IACZ,CAACU,GAAYF,IACb,CAACP,GAAWC,IACZ,CAACS,GAAYF,IACb,CAACM,GAAeE,IAChB,CAACM,GAAgBE,IACjB,CAACT,GAAiBE,IAClB,CAACM,GAAkBE,IACnB,CAACR,GAAgBF,IACjB,CAACU,GAAkBF,IACnB,CAACP,GAAkBF,IACnB,CAACU,GAAmBF,IACpB,CAACJ,GAAeE,IAChB,CAACM,GAAgBE,IACjB,CAACT,GAAiBE,IAClB,CAACM,GAAkBE,IACnB,CAACT,GAAkBF,IACnB,CAACU,GAAmBF,IACpB,CAACL,GAAgBF,IACjB,CAACU,GAAiBF,MAEhBqD,IAAuB,CACzBzL,GACAD,GACAI,GACAC,GACAW,GACAC,GACAG,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACA8C,GACAgB,GACArB,GACAkB,GACAhB,GACAiB,GACAZ,GACAM,GACAhB,GACAe,GACAT,GACAiB,GACAZ,GACAgB,GACAd,GACAe,GACAQ,GACAO,GACAR,GACAU,GACAP,GACAQ,GACAN,GACAO,GACAN,GACAO,GACAT,GACAU,GACAK,GACAQ,GACAN,GACAQ,GACAN,GACAQ,GACAN,GACAQ,IAEEoD,IAAqB,CACvB7L,GACAC,GACAG,GACAC,GACA2I,GACAC,GACAjI,GACAC,GACAG,GACAC,GACAG,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAwC,GACAkB,GACAR,GACAa,GACApB,GACAiB,GACAZ,GACAM,GACAhB,GACAe,GACAT,GACAiB,GACAnB,GACAc,GACAX,GACAY,GACAe,GACAQ,GACAL,GACAO,GACAN,GACAQ,GACAN,GACAO,GACAN,GACAO,GACAT,GACAU,GACAI,GACAQ,GACAN,GACAQ,GACAN,GACAQ,GACAN,GACAQ,IAYmB,IAAIjxL,QAAa/mB,GA0uHxC,MAAMs7M,IACEvyL,eACA,OAAO5vB,KAAKoiN,aAAapoH,aAC7B,CACIpqE,aAASvb,GACTrU,KAAKqiN,eAAe/jH,YAAYjqF,EACpC,CACAxU,YAAYwiN,GACRriN,KAAKqiN,eAAiBA,EACtBriN,KAAKsiN,eAAiB,IAAIj+M,eAC1BrE,KAAKuiN,aAAe,IAAIl+M,eACxBrE,KAAKqiN,eAAetkH,OAAO,IAAM/9F,KAAK+9F,UACtC,MAAMykH,EAAgBxiN,KAAKqiN,eAAe7/L,UAK1CxiB,KAAKoiN,aAAeI,EAAc5gF,OAAOhjC,QAAQ4jH,EAAc5gF,OAAOhjC,QAAQx8F,OAAS,EAC3F,CACA4sC,OACIhvC,KAAKqiN,eAAerzK,MACxB,CACAivD,OACIj+F,KAAKsiN,eAAer9M,KAAK,CAAEw9M,MAAOziN,OAClCA,KAAK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GAEJ,MAAM,IAAIi/B,UAAU,yCAAwC,CAEpE,gCClBO,SAAS/4B,IAAS,sFCClB,SAAStc,KAAQq0S,GACpB,OAAOzG,EAAcyG,EACzB,CACO,SAASzG,EAAcyG,GAC1B,OAAmB,IAAfA,EAAI97U,OACG2mC,IAEQ,IAAfm1S,EAAI97U,OACG87U,EAAI,GAER,SAAexxQ,GAClB,OAAOwxQ,EAAI7yS,OAAO,CAACo2C,EAAMhhF,IAAOA,EAAGghF,GAAO/U,EAC9C,CACJ,yECZO,SAASisQ,EAAqB14R,GACjC64R,eAA2B,KACvB,MAAQS,oBAAqBhwS,IAC7B,IAAIgwS,EAIA,MAAMt5R,EAHNs5R,EAAiBt5R,EAGXA,EAGlB,gCCZO,SAAS06R,EAAiCjuQ,GAC7C,OAAO,IAAIwS,UAAW,gBAAyB,OAAVxS,GAAmC,iBAAVA,EAAqB,oBAAuB,IAAGA,+HACjH,mCCFA,OACA,YACA,eACA,WACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,cACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,cACA,iBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,cACA,iBACA,eACA,kBACA,cACA,iBACA,eACA,kBACA,eACA,kBACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,qBACA,kBACA,qBACA,YACA,eACA,YACA,eACA,WACA,cACA,WACA,cACA,YACA,eACA,eACA,kBACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,UACA,aACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,eACA,kBACA,cACA,YACA,eACA,eACA,kBACA,cACA,iBACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,iBACA,oBACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,YACA,kBACA,qBACA,eACA,cACA,iBACA,YACA,eACA,YACA,eACA,YACA,iBACA,oBACA,eACA,YACA,eACA,kBACA,qBACA,YACA,eACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,mBAIA,cACA,WACA,WACA,CACA,cACA,cACA,8CACA,gCACAnhD,EAEA,WACA,CACA4yT,kBACA,qBACA,EACAA,YACAz+N,aACAy+N,wCC9NO,sBAEP,6CACA,gBAAoC,IAAMrvN,eAA2C,CAA3C,MAA+BvjG,IAAYwiD,QACrF,gBAAmC,IAAM+gD,gBAA+C,CAA/C,MAAmCvjG,IAAYwiD,QACxF,gBAAgCzxD,qBAJhC,gBAA4B,+CAA+D6xC,QAAiB,CAI5EiwR,uBAChCtvN,iCACA,EACA,CAiGO,eACP,mDACA,CAEO,oBACP,qFACA,kCACA,aAAiBuvN,wEAAuF,aAAc7rU,GACtH,gBAAuB6iD,6BAAgC,mCAAqC2gB,qCAA2C,GACvI,mBAA4B,KAC5B,gBAAuBlzC,+EADWgsF,YAA6B,CAA7B,MAAiBvjG,IAAY+yT,iBA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SAASQ,GAAsBR,GAE3B,OADiBr2D,KACD82D,6BAA6B1Z,GAAiB,SAAQiZ,EAAKtqZ,KAAKoU,qBAAiBk2Y,EACrG,CAMA,SAASU,GAAoBV,GAEzB,OADiBr2D,KACDg3D,2BAA2B5Z,GAAiB,SAAQiZ,EAAKtqZ,KAAKoU,oBAAgBk2Y,EAClG,CAMA,SAASY,GAAoBZ,GAEzB,OADiBr2D,KACDk3D,2BAA2B9Z,GAAiB,SAAQiZ,EAAKtqZ,KAAKoU,oBAAgBk2Y,EAClG,CAMA,SAASc,GAAgBd,GAErB,OADiBr2D,KACDo3D,uBAAuBha,GAAiB,SAAQiZ,EAAKtqZ,KAAKoU,qBAAiBk2Y,EAC/F,CAgEA,SAASrvV,GAAgB1jC,EAAW6I,GAEhC,MAAM2gV,EAAe3hC,GAAgB7nT,GAC/B+zX,EAAkBlrX,EAAQkrX,iBAAmBjhD,KAEnD,OADgB,IAAI2W,GAAiBD,GACtB1gW,OAAOirY,EAAiBlrX,EAAQqhV,iBAAkBrhV,EAAQ25F,YAAa35F,EAAQs5B,oBAClG,CAwCA,SAAS6xV,GAAqBh0X,GAC1B,MAAMwpV,EAAe3hC,GAAgB7nT,GACrC,IAAKwpV,EACD,OAAO,KACX,MAAMzmX,EAAU,IAAI0mX,GAAiBD,GACrC,MAAO,CACCj7U,eACA,OAAOxrC,EAAQwrC,QACnB,EACI9lC,WACA,OAAO1F,EAAQ+mX,aACnB,EACIzgU,aACA,OAAOtmD,EAAQsmD,MACnB,EACIynG,cACA,OAAO/tJ,EAAQ+tJ,OACnB,EACIrC,yBACA,OAAO1rJ,EAAQ0rJ,kBACnB,EACIq6L,mBACA,OAAO0gC,EAAalwQ,UACxB,EAER","sources":["da.js","./node_modules/@angular/common/fesm2020/common.mjs","./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs","./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","./node_modules/rxjs/dist/esm/internal/operators/filter.js","./node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","./node_modules/@ngneat/elf/index.esm.js","./node_modules/rxjs/dist/esm/internal/operators/skip.js","./node_modules/@ngneat/elf-devtools/index.esm.js","./node_modules/rxjs/dist/esm/internal/observable/of.js","./node_modules/rxjs/dist/esm/internal/operators/concatMap.js","./node_modules/@angular/common/fesm2020/http.mjs","./node_modules/@auth0/angular-jwt/__ivy_ngcc__/fesm2015/auth0-angular-jwt.js","./node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","./node_modules/rxjs/dist/esm/internal/ReplaySubject.js","./node_modules/rxjs/dist/esm/internal/operators/switchMap.js","./node_modules/@ngneat/elf-persist-state/index.esm.js","./node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js","./node_modules/rxjs/dist/esm/internal/observable/defer.js","./node_modules/rxjs/dist/esm/internal/operators/tap.js","./node_modules/@ngneat/elf-requests/index.esm.js","./node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","./node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","./node_modules/rxjs/dist/esm/internal/util/createObject.js","./node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","./node_modules/rxjs/dist/esm/internal/scheduler/Action.js","./node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","./node_modules/rxjs/dist/esm/internal/Scheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/async.js","./node_modules/rxjs/dist/esm/internal/observable/timer.js","./node_modules/rxjs/dist/esm/internal/util/isDate.js","./node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js","./src/app/modules/shared/helpers/env-state.ts","./src/app/modules/core/interceptors/image.interceptor.ts","./src/app/state/auth.repository.ts","./node_modules/rxjs/dist/esm/internal/util/EmptyError.js","./node_modules/rxjs/dist/esm/internal/observable/concat.js","./node_modules/rxjs/dist/esm/internal/operators/concatAll.js","./node_modules/rxjs/dist/esm/internal/observable/throwError.js","./node_modules/rxjs/dist/esm/internal/operators/refCount.js","./node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","./node_modules/rxjs/dist/esm/internal/operators/startWith.js","./node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/first.js","./node_modules/rxjs/dist/esm/internal/operators/catchError.js","./node_modules/rxjs/dist/esm/internal/operators/scan.js","./node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","./node_modules/rxjs/dist/esm/internal/operators/takeLast.js","./node_modules/rxjs/dist/esm/internal/operators/last.js","./node_modules/rxjs/dist/esm/internal/operators/mapTo.js","./node_modules/rxjs/dist/esm/internal/operators/finalize.js","./node_modules/@angular/router/fesm2020/router.mjs","./node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","./src/app/state/ui.repository.ts","./node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","./src/app/modules/shared/services/connection.service.ts","./node_modules/@ngneat/elf-entities/index.esm.js","./src/app/state/requests.repository.ts","./src/app/modules/core/interceptors/retry.interceptor.ts","./node_modules/@ngneat/elf-pagination/pagination.esm.js","./src/app/modules/shared/pipes/sort.pipe.ts","./src/app/state/abstract/base.repository.ts","./src/app/state/vehicles.repository.ts","./src/app/state/trailers.repository.ts","./src/app/modules/truck/services/settings-requests-resolver.service.ts","./src/app/state/auth.service.ts","./node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","./src/app/state/abstract/base.service.ts","./src/app/state/accessories.repository.ts","./src/app/state/accessory.service.ts","./src/app/state/cleaning.repository.ts","./src/app/state/cleaning.service.ts","./src/app/state/companies.repository.ts","./src/app/state/companies.service.ts","./src/app/state/products.repository.ts","./src/app/state/products.service.ts","./src/app/state/trailers.service.ts","./src/app/state/vehicles.service.ts","./src/app/state/trips.repository.ts","./src/app/state/orders.repository.ts","./src/app/state/tripevents.repository.ts","./src/app/modules/shared/services/dayjs.service.ts","./src/app/state/trips.service.ts","./src/app/state/orders.service.ts","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","./src/app/state/workdays.repository.ts","./src/app/state/workdayevents.repository.ts","./src/app/state/workdayevents.service.ts","./src/app/modules/shared/services/location.service.ts","./src/app/state/workdays.service.ts","./src/app/modules/truck/services/driver-data-preloader.service.ts","./src/app/modules/shared/components/simple-card/simple-card.component.html","./src/app/modules/shared/components/simple-card/simple-card.component.ts","./src/app/modules/core/components/session-over-state/session-over-state.component.ts","./src/app/modules/core/components/session-over-state/session-over-state.component.html","./node_modules/@angular/animations/fesm2020/animations.mjs","./src/app/modules/shared/helpers/animaions.ts","./src/app/modules/core/components/offline-label/offline-label.component.html","./src/app/modules/core/components/offline-label/offline-label.component.ts","./src/app/modules/core/components/pwa-install-button/pwa-install-button.component.html","./src/app/modules/core/components/pwa-install-button/pwa-install-button.component.ts","./src/app/state/requests.service.ts","./src/app/modules/shared/directives/ng-var.directive.ts","./src/app/modules/shared/components/spinner/spinner.component.html","./src/app/modules/shared/components/spinner/spinner.component.ts","./src/app/modules/shared/pipes/timing.pipe.ts","./src/app/modules/core/components/unsynced-changes/unsynced-changes.component.html","./src/app/modules/core/components/unsynced-changes/unsynced-changes.component.ts","./src/app/app.component.html","./src/app/app.component.ts","./src/environments/environment.prod.ts","./node_modules/@angular/forms/fesm2020/forms.mjs","./node_modules/lodash-es/isObject.js","./node_modules/lodash-es/_freeGlobal.js","./node_modules/lodash-es/_root.js","./node_modules/lodash-es/_Symbol.js","./node_modules/lodash-es/_getRawTag.js","./node_modules/lodash-es/_objectToString.js","./node_modules/lodash-es/_baseGetTag.js","./node_modules/lodash-es/isObjectLike.js","./node_modules/lodash-es/toNumber.js","./node_modules/lodash-es/debounce.js","./node_modules/lodash-es/eq.js","./node_modules/lodash-es/_assocIndexOf.js","./node_modules/lodash-es/_listCacheDelete.js","./node_modules/lodash-es/_ListCache.js","./node_modules/lodash-es/_listCacheClear.js","./node_modules/lodash-es/_listCacheGet.js","./node_modules/lodash-es/_listCacheHas.js","./node_modules/lodash-es/_listCacheSet.js","./node_modules/lodash-es/isFunction.js","./node_modules/lodash-es/_coreJsData.js","./node_modules/lodash-es/_isMasked.js","./node_modules/lodash-es/_toSource.js","./node_modules/lodash-es/_baseIsNative.js","./node_modules/lodash-es/_getNative.js","./node_modules/lodash-es/_getValue.js","./node_modules/lodash-es/_Map.js","./node_modules/lodash-es/_nativeCreate.js","./node_modules/lodash-es/_hashGet.js","./node_modules/lodash-es/_hashHas.js","./node_modules/lodash-es/_Hash.js","./node_modules/lodash-es/_hashClear.js","./node_modules/lodash-es/_hashDelete.js","./node_modules/lodash-es/_hashSet.js","./node_modules/lodash-es/_getMapData.js","./node_modules/lodash-es/_isKeyable.js","./node_modules/lodash-es/_MapCache.js","./node_modules/lodash-es/_mapCacheClear.js","./node_modules/lodash-es/_mapCacheDelete.js","./node_modules/lodash-es/_mapCacheGet.js","./node_modules/lodash-es/_mapCacheHas.js","./node_modules/lodash-es/_mapCacheSet.js","./node_modules/lodash-es/_Stack.js","./node_modules/lodash-es/_stackClear.js","./node_modules/lodash-es/_stackDelete.js","./node_modules/lodash-es/_stackGet.js","./node_modules/lodash-es/_stackHas.js","./node_modules/lodash-es/_stackSet.js","./node_modules/lodash-es/_defineProperty.js","./node_modules/lodash-es/_baseAssignValue.js","./node_modules/lodash-es/_assignValue.js","./node_modules/lodash-es/_baseIsArguments.js","./node_modules/lodash-es/isArguments.js","./node_modules/lodash-es/isArray.js","./node_modules/lodash-es/isBuffer.js","./node_modules/lodash-es/stubFalse.js","./node_modules/lodash-es/_isIndex.js","./node_modules/lodash-es/isLength.js","./node_modules/lodash-es/_baseIsTypedArray.js","./node_modules/lodash-es/_baseUnary.js","./node_modules/lodash-es/_nodeUtil.js","./node_modules/lodash-es/isTypedArray.js","./node_modules/lodash-es/_arrayLikeKeys.js","./node_modules/lodash-es/_baseTimes.js","./node_modules/lodash-es/_isPrototype.js","./node_modules/lodash-es/_overArg.js","./node_modules/lodash-es/_nativeKeys.js","./node_modules/lodash-es/isArrayLike.js","./node_modules/lodash-es/_baseKeysIn.js","./node_modules/lodash-es/_nativeKeysIn.js","./node_modules/lodash-es/keysIn.js","./node_modules/lodash-es/_cloneBuffer.js","./node_modules/lodash-es/_getPrototype.js","./node_modules/lodash-es/_DataView.js","./node_modules/lodash-es/_Promise.js","./node_modules/lodash-es/_Set.js","./node_modules/lodash-es/_WeakMap.js","./node_modules/lodash-es/_getTag.js","./node_modules/lodash-es/_Uint8Array.js","./node_modules/lodash-es/_cloneTypedArray.js","./node_modules/lodash-es/_cloneArrayBuffer.js","./node_modules/lodash-es/_baseCreate.js","./node_modules/lodash-es/isMap.js","./node_modules/lodash-es/isSet.js","./node_modules/lodash-es/_baseClone.js","./node_modules/lodash-es/isPlainObject.js","./node_modules/@ckeditor/ckeditor5-angular/__ivy_ngcc__/fesm2015/ckeditor-ckeditor5-angular.js","./node_modules/@angular/animations/fesm2020/browser.mjs","./node_modules/@angular/platform-browser/fesm2020/animations.mjs","./node_modules/ngx-bootstrap/__ivy_ngcc__/utils/fesm2015/ngx-bootstrap-utils.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js","./node_modules/ngx-bootstrap/__ivy_ngcc__/positioning/fesm2015/ngx-bootstrap-positioning.js","./node_modules/ngx-bootstrap/__ivy_ngcc__/component-loader/fesm2015/ngx-bootstrap-component-loader.js","./node_modules/ngx-bootstrap/__ivy_ngcc__/focus-trap/fesm2015/ngx-bootstrap-focus-trap.js","./node_modules/ngx-bootstrap/__ivy_ngcc__/modal/fesm2015/ngx-bootstrap-modal.js","./node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","./node_modules/rxjs/dist/esm/internal/util/Immediate.js","./node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/asap.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js","./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js","./node_modules/rxjs/dist/esm/internal/operators/auditTime.js","./node_modules/rxjs/dist/esm/internal/operators/audit.js","./node_modules/lodash-es/_assignMergeValue.js","./node_modules/lodash-es/_baseFor.js","./node_modules/lodash-es/_createBaseFor.js","./node_modules/lodash-es/_safeGet.js","./node_modules/lodash-es/toPlainObject.js","./node_modules/lodash-es/_copyObject.js","./node_modules/lodash-es/_baseMergeDeep.js","./node_modules/lodash-es/isArrayLikeObject.js","./node_modules/lodash-es/_copyArray.js","./node_modules/lodash-es/_initCloneObject.js","./node_modules/lodash-es/_baseMerge.js","./node_modules/lodash-es/identity.js","./node_modules/lodash-es/_apply.js","./node_modules/lodash-es/_overRest.js","./node_modules/lodash-es/constant.js","./node_modules/lodash-es/_baseSetToString.js","./node_modules/lodash-es/_shortOut.js","./node_modules/lodash-es/_setToString.js","./node_modules/lodash-es/_baseRest.js","./node_modules/lodash-es/_createAssigner.js","./node_modules/lodash-es/_isIterateeCall.js","./node_modules/lodash-es/mergeWith.js","./node_modules/@igniteui/material-icons-extended/build/src/index.js","./node_modules/igniteui-angular/fesm2020/igniteui-angular.mjs","./src/app/modules/shared/shared.module.ts","./src/app/modules/news/news.module.ts","./src/app/modules/core/interceptors/session.interceptor.ts","./src/app/modules/core/interceptors/date.interceptor.ts","./src/app/modules/core/interceptors/base-url.interceptor.ts","./node_modules/ng-circle-progress/__ivy_ngcc__/fesm2015/ng-circle-progress.js","./src/app/modules/core/core.module.ts","./node_modules/@angular/cdk/fesm2020/platform.mjs","./node_modules/@ctrl/tinycolor/dist/module/util.js","./node_modules/@ctrl/tinycolor/dist/module/conversion.js","./node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","./node_modules/@ctrl/tinycolor/dist/module/format-input.js","./node_modules/@ctrl/tinycolor/dist/module/index.js","./node_modules/@ant-design/colors/dist/index.esm.js","./node_modules/@ant-design/icons-angular/fesm2020/ant-design-icons-angular.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-environments.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-logger.mjs","./node_modules/@ant-design/icons-angular/fesm2020/ant-design-icons-angular-icons.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-color.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-util.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-config.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-icon.mjs","./node_modules/@angular/cdk/fesm2020/bidi.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-transition-patch.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-core-wave.mjs","./node_modules/ng-zorro-antd/fesm2020/ng-zorro-antd-button.mjs","./src/app/modules/truck/truck.module.ts","./src/app/auth.guard.ts","./src/app/modules/core/components/footerinfo/footerinfo.component.ts","./src/app/modules/core/components/footerinfo/footerinfo.component.html","./src/app/modules/shared/pipes/join.pipe.ts","./src/app/modules/shared/pipes/translate-roles.pipe.ts","./src/app/modules/core/components/user-card/user-card.component.html","./src/app/modules/core/components/user-card/user-card.component.ts","./src/app/modules/core/components/logo/logo.component.ts","./src/app/modules/core/components/logo/logo.component.html","./src/app/modules/core/components/headermenu/headermenu.component.ts","./src/app/modules/core/components/headermenu/headermenu.component.html","./src/app/state/feature.repository.ts","./src/app/state/statistics.repository.ts","./src/app/state/statistics.service.ts","./src/app/modules/core/components/sidebar/sidebar.component.html","./src/app/modules/core/components/sidebar/sidebar.component.ts","./src/app/modules/core/layouts/apphomelayout/apphomelayout.component.ts","./src/app/modules/core/layouts/apphomelayout/apphomelayout.component.html","./src/app/modules/core/components/headerback/headerback.component.ts","./src/app/modules/core/components/headerback/headerback.component.html","./src/app/modules/core/layouts/appinnerlayout/appinnerlayout.component.ts","./src/app/modules/core/layouts/appinnerlayout/appinnerlayout.component.html","./src/app/modules/core/layouts/authlayout/authlayout.component.ts","./src/app/modules/core/layouts/authlayout/authlayout.component.html","./src/app/modules/shared/directives/validate-state.directive.ts","./src/app/modules/core/pages/forgetpassword/forgetpassword.component.html","./src/app/modules/core/pages/forgetpassword/forgetpassword.component.ts","./src/app/modules/core/pages/pagenotauthorized/pagenotauthorized.component.ts","./src/app/modules/core/pages/pagenotauthorized/pagenotauthorized.component.html","./src/app/modules/core/pages/pagenotfound/pagenotfound.component.ts","./src/app/modules/core/pages/pagenotfound/pagenotfound.component.html","./src/app/state/users.repository.ts","./src/app/state/users.service.ts","./src/app/modules/shared/components/error-alert/error-alert.component.html","./src/app/modules/shared/components/error-alert/error-alert.component.ts","./src/app/modules/shared/components/datalist-select/datalist-select.component.html","./src/app/modules/shared/components/datalist-select/datalist-select.component.ts","./src/app/modules/core/components/user-basic-info-form/user-basic-info-form.component.html","./src/app/modules/core/components/user-basic-info-form/user-basic-info-form.component.ts","./src/app/modules/core/components/user-header-image/user-header-image.component.ts","./src/app/modules/core/components/user-header-image/user-header-image.component.html","./src/app/modules/core/components/change-password-form/change-password-form.component.html","./src/app/modules/core/components/change-password-form/change-password-form.component.ts","./src/app/modules/core/pages/profile-edit/profile-edit.component.html","./src/app/modules/core/pages/profile-edit/profile-edit.component.ts","./src/app/state/tenants.repository.ts","./src/app/state/tenants.service.ts","./src/app/modules/core/components/impersonation-modal/impersonation-modal.component.ts","./src/app/modules/core/components/impersonation-modal/impersonation-modal.component.html","./src/app/modules/core/pages/profile/profile.component.html","./src/app/modules/core/pages/profile/profile.component.ts","./src/app/modules/core/pages/resetpassword/resetpassword.component.html","./src/app/modules/core/pages/resetpassword/resetpassword.component.ts","./src/app/modules/core/pages/signin/signin.component.html","./src/app/modules/core/pages/signin/signin.component.ts","./node_modules/rxjs/dist/esm/internal/operators/skipWhile.js","./src/app/modules/shared/services/url-id-resolver.service.ts","./src/app/state/feature.service.ts","./src/app/modules/core/components/tenant-form/tenant-form.component.html","./src/app/modules/core/components/tenant-form/tenant-form.component.ts","./src/app/modules/core/pages/tenants-create-page/tenants-create-page.component.html","./src/app/modules/core/pages/tenants-create-page/tenants-create-page.component.ts","./src/app/modules/shared/components/sort-dropdown/sort-dropdown.component.html","./src/app/modules/shared/components/sort-dropdown/sort-dropdown.component.ts","./src/app/modules/shared/components/role-pin/role-pin.component.html","./src/app/modules/shared/components/role-pin/role-pin.component.ts","./src/app/modules/shared/components/entity-avatar/entity-avatar.component.html","./src/app/modules/shared/components/entity-avatar/entity-avatar.component.ts","./src/app/modules/shared/components/confirm-delete/confirm-delete.component.html","./src/app/modules/shared/components/confirm-delete/confirm-delete.component.ts","./src/app/modules/core/components/tenant-list/tenant-list.component.html","./src/app/modules/core/components/tenant-list/tenant-list.component.ts","./src/app/modules/core/pages/tenants-page/tenants-page.component.html","./src/app/modules/core/pages/tenants-page/tenants-page.component.ts","./src/app/modules/core/pages/users-create-page/users-create-page.component.html","./src/app/modules/core/pages/users-create-page/users-create-page.component.ts","./src/app/modules/shared/components/pagination/pagination.component.html","./src/app/modules/shared/components/pagination/pagination.component.ts","./src/app/modules/shared/components/import-export/import-export.component.html","./src/app/modules/shared/components/import-export/import-export.component.ts","./src/app/modules/shared/pipes/find-by.pipe.ts","./src/app/modules/shared/pipes/prop.pipe.ts","./src/app/modules/core/components/users-list/users-list.component.html","./src/app/modules/core/components/users-list/users-list.component.ts","./src/app/modules/core/pages/users-list-page/users-list-page.component.html","./src/app/modules/core/pages/users-list-page/users-list-page.component.ts","./src/app/routing/core-routing.module.ts","./src/app/modules/truck/components/accessory-form/accessory-form.component.html","./src/app/modules/truck/components/accessory-form/accessory-form.component.ts","./src/app/modules/truck/pages/accessory-create-page/accessory-create-page.component.html","./src/app/modules/truck/pages/accessory-create-page/accessory-create-page.component.ts","./src/app/modules/truck/components/model-card/model-card.component.html","./src/app/modules/truck/components/model-card/model-card.component.ts","./src/app/modules/truck/components/accessory-list/accessory-list.component.html","./src/app/modules/truck/components/accessory-list/accessory-list.component.ts","./src/app/modules/truck/pages/accessory-page/accessory-page.component.html","./src/app/modules/truck/pages/accessory-page/accessory-page.component.ts","./src/app/modules/truck/components/cleaning-form/cleaning-form.component.html","./src/app/modules/truck/components/cleaning-form/cleaning-form.component.ts","./src/app/modules/truck/pages/cleaning-create-page/cleaning-create-page.component.html","./src/app/modules/truck/pages/cleaning-create-page/cleaning-create-page.component.ts","./src/app/modules/truck/components/cleaning-list/cleaning-list.component.html","./src/app/modules/truck/components/cleaning-list/cleaning-list.component.ts","./src/app/modules/truck/pages/cleaning-page/cleaning-page.component.html","./src/app/modules/truck/pages/cleaning-page/cleaning-page.component.ts","./src/app/modules/truck/components/company-form/company-form.component.html","./src/app/modules/truck/components/company-form/company-form.component.ts","./src/app/modules/truck/pages/company-create-page/company-create-page.component.html","./src/app/modules/truck/pages/company-create-page/company-create-page.component.ts","./src/app/state/templates.repository.ts","./src/app/state/templates.service.ts","./src/app/modules/truck/components/company-list/company-list.component.html","./src/app/modules/truck/components/company-list/company-list.component.ts","./src/app/modules/truck/pages/company-page/company-page.component.html","./src/app/modules/truck/pages/company-page/company-page.component.ts","./src/app/modules/shared/services/requests-resolver.ts","./src/app/state/eproducts.repository.ts","./src/app/state/eproducts.service.ts","./src/app/modules/shared/components/confirm-refresh-redirect/confirm-refresh-redirect.component.html","./src/app/modules/shared/components/confirm-refresh-redirect/confirm-refresh-redirect.component.ts","./src/app/modules/truck/components/start-day-form/start-day-form.component.html","./src/app/modules/truck/components/start-day-form/start-day-form.component.ts","./src/app/modules/truck/components/start-trip-form/start-trip-form.component.html","./src/app/modules/truck/components/start-trip-form/start-trip-form.component.ts","./src/app/modules/shared/components/single-textbox-modal/single-textbox-modal.component.ts","./src/app/modules/shared/components/single-textbox-modal/single-textbox-modal.component.html","./src/app/modules/truck/components/end-day-form/end-day-form.component.html","./src/app/modules/truck/components/end-day-form/end-day-form.component.ts","./src/app/modules/truck/components/end-trip-form/end-trip-form.component.html","./src/app/modules/truck/components/end-trip-form/end-trip-form.component.ts","./src/app/modules/truck/components/active-pause/active-pause.component.html","./src/app/modules/truck/components/active-pause/active-pause.component.ts","./src/app/modules/shared/components/image-slider/image-slider.component.html","./src/app/modules/shared/components/image-slider/image-slider.component.ts","./src/app/modules/truck/components/notes-info-modal/notes-info-modal.component.html","./src/app/modules/truck/components/notes-info-modal/notes-info-modal.component.ts","./src/app/modules/truck/components/go-info/go-info.component.html","./src/app/modules/truck/components/go-info/go-info.component.ts","./src/app/modules/truck/components/start-order-form/start-order-form.component.html","./src/app/modules/truck/components/start-order-form/start-order-form.component.ts","./src/app/modules/truck/components/end-order-form/end-order-form.component.html","./src/app/modules/truck/components/end-order-form/end-order-form.component.ts","./src/app/modules/truck/components/go-order-info/go-order-info.component.html","./src/app/modules/truck/components/go-order-info/go-order-info.component.ts","./src/app/modules/truck/components/parked-trips-modal/parked-trips-modal.component.html","./src/app/modules/truck/components/parked-trips-modal/parked-trips-modal.component.ts","./src/app/modules/truck/pages/go-page/go-page.component.html","./src/app/modules/truck/pages/go-page/go-page.component.ts","./src/app/modules/truck/components/product-form/product-form.component.html","./src/app/modules/truck/components/product-form/product-form.component.ts","./src/app/modules/truck/pages/product-create-page/product-create-page.component.html","./src/app/modules/truck/pages/product-create-page/product-create-page.component.ts","./src/app/modules/truck/components/product-list/product-list.component.html","./src/app/modules/truck/components/product-list/product-list.component.ts","./src/app/modules/truck/pages/product-page/product-page.component.html","./src/app/modules/truck/pages/product-page/product-page.component.ts","./src/app/modules/truck/components/trailer-form/trailer-form.component.html","./src/app/modules/truck/components/trailer-form/trailer-form.component.ts","./src/app/modules/truck/pages/trailer-create-page/trailer-create-page.component.html","./src/app/modules/truck/pages/trailer-create-page/trailer-create-page.component.ts","./src/app/modules/truck/components/trailer-list/trailer-list.component.html","./src/app/modules/truck/components/trailer-list/trailer-list.component.ts","./src/app/modules/truck/pages/trailer-page/trailer-page.component.html","./src/app/modules/truck/pages/trailer-page/trailer-page.component.ts","./src/app/modules/truck/components/trip-settings/trip-settings.component.html","./src/app/modules/truck/components/trip-settings/trip-settings.component.ts","./src/app/modules/truck/pages/trip-settings-page/trip-settings-page.component.html","./src/app/modules/truck/pages/trip-settings-page/trip-settings-page.component.ts","./src/app/state/tripevents.service.ts","./node_modules/ngx-google-places-autocomplete/objects/options/options.js","./src/app/modules/shared/components/image-uploader/image-uploader.component.ts","./src/app/modules/shared/components/image-uploader/image-uploader.component.html","./src/app/modules/shared/components/image-card/image-card.component.html","./src/app/modules/shared/components/image-card/image-card.component.ts","./src/app/modules/truck/components/trip-info-form/trip-info-form.component.html","./src/app/modules/truck/components/trip-info-form/trip-info-form.component.ts","./src/app/modules/truck/pages/trip-event-page/trip-event-page.component.html","./src/app/modules/truck/pages/trip-event-page/trip-event-page.component.ts","./src/app/modules/truck/components/vehicle-form/vehicle-form.component.html","./src/app/modules/truck/components/vehicle-form/vehicle-form.component.ts","./src/app/modules/truck/pages/vehicle-create-page/vehicle-create-page.component.html","./src/app/modules/truck/pages/vehicle-create-page/vehicle-create-page.component.ts","./src/app/modules/truck/components/vehicle-list/vehicle-list.component.html","./src/app/modules/truck/components/vehicle-list/vehicle-list.component.ts","./src/app/modules/truck/pages/vehicle-page/vehicle-page.component.html","./src/app/modules/truck/pages/vehicle-page/vehicle-page.component.ts","./src/app/modules/truck/components/sortable.directive.ts","./node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","./node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","./node_modules/rxjs/dist/esm/internal/operators/delay.js","./src/app/modules/truck/components/sort-table-workdays/sort-table-workdays.component.html","./src/app/modules/truck/components/sort-table-workdays/sort-table-workdays.component.ts","./src/app/modules/truck/pages/day-history-page/day-history-page.component.ts","./src/app/modules/truck/pages/day-history-page/day-history-page.component.html","./src/app/state/columns.repository.ts","./src/app/state/columns.service.ts","./src/app/state/dataSelect.service.ts","./src/app/state/export.service.ts","./src/app/modules/shared/components/trip-image-slider/trip-image-slider.component.html","./src/app/modules/shared/components/trip-image-slider/trip-image-slider.component.ts","./src/app/modules/truck/components/sort-table-modal/sort-table-modal.component.html","./src/app/modules/truck/components/sort-table-modal/sort-table-modal.component.ts","./src/app/modules/truck/components/trip-change-driver-modal/trip-change-driver-modal.component.ts","./src/app/modules/truck/components/trip-change-driver-modal/trip-change-driver-modal.component.html","./src/app/modules/truck/components/sort-table-pagination/sort-table-pagination.component.html","./src/app/modules/truck/components/sort-table-pagination/sort-table-pagination.component.ts","./src/app/modules/truck/components/sort-table1/sort-table1.component.html","./src/app/modules/truck/components/sort-table1/sort-table1.component.ts","./src/app/modules/truck/pages/trip-history-page/trip-history-page.component.html","./src/app/modules/truck/pages/trip-history-page/trip-history-page.component.ts","./src/app/modules/truck/components/day-info-form/day-info-form.component.html","./src/app/modules/truck/components/day-info-form/day-info-form.component.ts","./src/app/modules/truck/pages/day-event-page/day-event-page.component.html","./src/app/modules/truck/pages/day-event-page/day-event-page.component.ts","./src/app/home.guard.ts","./src/app/base-service.ts","./src/app/modules/shared/components/timepicker-dropdown/timepicker-dropdown.component.html","./src/app/modules/shared/components/timepicker-dropdown/timepicker-dropdown.component.ts","./src/app/modules/truck/services/fileuploader.service.ts","./src/app/modules/shared/components/big-spinner/big-spinner.component.ts","./src/app/modules/shared/components/big-spinner/big-spinner.component.html","./src/app/modules/truck/components/file-uploader/file-uploader.component.html","./src/app/modules/truck/components/file-uploader/file-uploader.component.ts","./src/app/modules/truck/components/commentphotos-form/commentphotos-form.component.html","./src/app/modules/truck/components/commentphotos-form/commentphotos-form.component.ts","./src/app/modules/truck/components/order-form/order-form.component.html","./src/app/modules/truck/components/order-form/order-form.component.ts","./src/app/state/vendors.repository.ts","./src/app/state/vendors.service.ts","./src/app/modules/shared/components/stat-card/stat-card.component.html","./src/app/modules/shared/components/stat-card/stat-card.component.ts","./src/app/modules/truck/components/orders-filter/orders-filter.component.html","./src/app/modules/truck/components/orders-filter/orders-filter.component.ts","./src/app/modules/truck/pages/dashboard/dashboard.component.html","./src/app/modules/truck/pages/dashboard/dashboard.component.ts","./src/app/modules/truck/pages/driver-logs-page/driver-logs-page.component.html","./src/app/modules/truck/pages/driver-logs-page/driver-logs-page.component.ts","./src/app/modules/truck/pages/drivers-workdays-page/drivers-workdays-page.component.ts","./src/app/modules/truck/pages/drivers-workdays-page/drivers-workdays-page.component.html","./src/app/modules/truck/components/column-card/column-card.component.html","./src/app/modules/truck/components/column-card/column-card.component.ts","./src/app/modules/truck/components/columns-list/columns-list.component.html","./src/app/modules/truck/components/columns-list/columns-list.component.ts","./src/app/modules/truck/pages/columns-page/columns-page.component.html","./src/app/modules/truck/pages/columns-page/columns-page.component.ts","./src/app/state/activedrivers.repository.ts","./src/app/state/activedrivers.service.ts","./src/app/modules/truck/components/active-drivers-list/active-drivers-list.component.html","./src/app/modules/truck/components/active-drivers-list/active-drivers-list.component.ts","./src/app/modules/truck/pages/active-drivers-page/active-drivers-page.component.ts","./src/app/modules/truck/pages/active-drivers-page/active-drivers-page.component.html","./src/app/modules/truck/pages/orders-page/orders-page.component.html","./src/app/modules/truck/pages/orders-page/orders-page.component.ts","./src/app/modules/truck/components/order-info-form/order-info-form.component.html","./src/app/modules/truck/components/order-info-form/order-info-form.component.ts","./src/app/modules/truck/pages/order-event-page/order-event-page.component.html","./src/app/modules/truck/pages/order-event-page/order-event-page.component.ts","./src/app/modules/truck/pages/navigation-page/navigation-page.component.html","./src/app/modules/truck/pages/navigation-page/navigation-page.component.ts","./src/app/state/pricetypes.repository.ts","./src/app/state/pricetypes.service.ts","./src/app/state/temp/temp.service.ts","./src/app/modules/shared/components/confirm-action/confirm-action.component.ts","./src/app/modules/shared/components/confirm-action/confirm-action.component.html","./src/app/modules/shared/components/img-slider/img-slider.component.html","./src/app/modules/shared/components/img-slider/img-slider.component.ts","./src/app/modules/truck/components/single-group-modal/single-group-modal.component.html","./src/app/modules/truck/components/single-group-modal/single-group-modal.component.ts","./src/app/modules/truck/components/client-update-modal/client-update-modal.component.html","./src/app/modules/truck/components/client-update-modal/client-update-modal.component.ts","./src/app/modules/truck/components/office-note-form/office-note-form.component.html","./src/app/modules/truck/components/office-note-form/office-note-form.component.ts","./src/app/modules/truck/components/office-address-form/office-address-form.component.html","./src/app/modules/truck/components/office-address-form/office-address-form.component.ts","./src/app/modules/truck/components/economic-table1/economic-table1.component.html","./src/app/modules/truck/components/economic-table1/economic-table1.component.ts","./src/app/modules/truck/pages/economic-page/economic-page.component.html","./src/app/modules/truck/pages/economic-page/economic-page.component.ts","./src/app/modules/core/components/product-card/product-card.component.html","./src/app/modules/core/components/product-card/product-card.component.ts","./src/app/modules/truck/components/eproduct-list/eproduct-list.component.html","./src/app/modules/truck/components/eproduct-list/eproduct-list.component.ts","./src/app/modules/truck/pages/eproducts-page/eproducts-page.component.html","./src/app/modules/truck/pages/eproducts-page/eproducts-page.component.ts","./src/app/modules/truck/components/eproduct-form/eproduct-form.component.html","./src/app/modules/truck/components/eproduct-form/eproduct-form.component.ts","./src/app/modules/truck/pages/eproduct-edit-page/eproduct-edit-page.component.html","./src/app/modules/truck/pages/eproduct-edit-page/eproduct-edit-page.component.ts","./src/app/state/deletedtrips.repository.ts","./src/app/state/deletedtrips.service.ts","./src/app/modules/truck/components/deleteted-trips-list/deleteted-trips-list.component.html","./src/app/modules/truck/components/deleteted-trips-list/deleteted-trips-list.component.ts","./src/app/modules/truck/pages/deleted-trips-page/deleted-trips-page.component.html","./src/app/modules/truck/pages/deleted-trips-page/deleted-trips-page.component.ts","./src/app/modules/truck/pages/trip-navigation-page/trip-navigation-page.component.html","./src/app/modules/truck/pages/trip-navigation-page/trip-navigation-page.component.ts","./src/app/modules/truck/components/templates-list/templates-list.component.html","./src/app/modules/truck/components/templates-list/templates-list.component.ts","./src/app/modules/truck/pages/templates-page/templates-page.component.html","./src/app/modules/truck/pages/templates-page/templates-page.component.ts","./src/app/modules/truck/pages/create-template-page/create-template-page.component.html","./src/app/modules/truck/pages/create-template-page/create-template-page.component.ts","./src/app/routing/truck-routing.module.ts","./src/app/state/posts.repository.ts","./src/app/state/posts.service.ts","./src/app/modules/news/news-form/news-form.component.ts","./src/app/modules/news/news-form/news-form.component.html","./src/app/modules/news/news-edit/news-edit.component.html","./src/app/modules/news/news-edit/news-edit.component.ts","./src/app/modules/news/news-post/news-post.component.html","./src/app/modules/news/news-post/news-post.component.ts","./src/app/modules/shared/pipes/strip-html.pipe.ts","./src/app/modules/news/news/news.component.html","./src/app/routing/news-routing.module.ts","./src/app/modules/news/news/news.component.ts","./node_modules/rxjs/dist/esm/internal/observable/never.js","./node_modules/rxjs/dist/esm/internal/operators/connect.js","./node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js","./node_modules/@angular/service-worker/fesm2020/service-worker.mjs","./node_modules/rxjs/dist/esm/internal/operators/publish.js","./node_modules/rxjs/dist/esm/internal/operators/multicast.js","./src/app/modules/truck/services/truck-requests-resolver.service.ts","./src/app/modules/truck/services/day-requests-resolver.service.ts","./src/app/app.module.ts","./src/main.ts","./node_modules/dayjs/dayjs.min.js","./node_modules/dayjs/locale/da.js","./node_modules/dayjs/locale/en-gb.js","./node_modules/dayjs/plugin/calendar.js","./node_modules/dayjs/plugin/duration.js","./node_modules/dayjs/plugin/localeData.js","./node_modules/dayjs/plugin/relativeTime.js","./node_modules/dayjs/plugin/utc.js","./node_modules/igniteui-trial-watermark/index.js","./node_modules/moment/locale/af.js","./node_modules/moment/locale/ar-dz.js","./node_modules/moment/locale/ar-kw.js","./node_modules/moment/locale/ar-ly.js","./node_modules/moment/locale/ar-ma.js","./node_modules/moment/locale/ar-sa.js","./node_modules/moment/locale/ar-tn.js","./node_modules/moment/locale/ar.js","./node_modules/moment/locale/az.js","./node_modules/moment/locale/be.js","./node_modules/moment/locale/bg.js","./node_modules/moment/locale/bm.js","./node_modules/moment/locale/bn-bd.js","./node_modules/moment/locale/bn.js","./node_modules/moment/locale/bo.js","./node_modules/moment/locale/br.js","./node_modules/moment/locale/bs.js","./node_modules/moment/locale/ca.js","./node_modules/moment/locale/cs.js","./node_modules/moment/locale/cv.js","./node_modules/moment/locale/cy.js","./node_modules/moment/locale/da.js","./node_modules/moment/locale/de-at.js","./node_modules/moment/locale/de-ch.js","./node_modules/moment/locale/de.js","./node_modules/moment/locale/dv.js","./node_modules/moment/locale/el.js","./node_modules/moment/locale/en-au.js","./node_modules/moment/locale/en-ca.js","./node_modules/moment/locale/en-gb.js","./node_modules/moment/locale/en-ie.js","./node_modules/moment/locale/en-il.js","./node_modules/moment/locale/en-in.js","./node_modules/moment/locale/en-nz.js","./node_modules/moment/locale/en-sg.js","./node_modules/moment/locale/eo.js","./node_modules/moment/locale/es-do.js","./node_modules/moment/locale/es-mx.js","./node_modules/moment/locale/es-us.js","./node_modules/moment/locale/es.js","./node_modules/moment/locale/et.js","./node_modules/moment/locale/eu.js","./node_modules/moment/locale/fa.js","./node_modules/moment/locale/fi.js","./node_modules/moment/locale/fil.js","./node_modules/moment/locale/fo.js","./node_modules/moment/locale/fr-ca.js","./node_modules/moment/locale/fr-ch.js","./node_modules/moment/locale/fr.js","./node_modules/moment/locale/fy.js","./node_modules/moment/locale/ga.js","./node_modules/moment/locale/gd.js","./node_modules/moment/locale/gl.js","./node_modules/moment/locale/gom-deva.js","./node_modules/moment/locale/gom-latn.js","./node_modules/moment/locale/gu.js","./node_modules/moment/locale/he.js","./node_modules/moment/locale/hi.js","./node_modules/moment/locale/hr.js","./node_modules/moment/locale/hu.js","./node_modules/moment/locale/hy-am.js","./node_modules/moment/locale/id.js","./node_modules/moment/locale/is.js","./node_modules/moment/locale/it-ch.js","./node_modules/moment/locale/it.js","./node_modules/moment/locale/ja.js","./node_modules/moment/locale/jv.js","./node_modules/moment/locale/ka.js","./node_modules/moment/locale/kk.js","./node_modules/moment/locale/km.js","./node_modules/moment/locale/kn.js","./node_modules/moment/locale/ko.js","./node_modules/moment/locale/ku.js","./node_modules/moment/locale/ky.js","./node_modules/moment/locale/lb.js","./node_modules/moment/locale/lo.js","./node_modules/moment/locale/lt.js","./node_modules/moment/locale/lv.js","./node_modules/moment/locale/me.js","./node_modules/moment/locale/mi.js","./node_modules/moment/locale/mk.js","./node_modules/moment/locale/ml.js","./node_modules/moment/locale/mn.js","./node_modules/moment/locale/mr.js","./node_modules/moment/locale/ms-my.js","./node_modules/moment/locale/ms.js","./node_modules/moment/locale/mt.js","./node_modules/moment/locale/my.js","./node_modules/moment/locale/nb.js","./node_modules/moment/locale/ne.js","./node_modules/moment/locale/nl-be.js","./node_modules/moment/locale/nl.js","./node_modules/moment/locale/nn.js","./node_modules/moment/locale/oc-lnc.js","./node_modules/moment/locale/pa-in.js","./node_modules/moment/locale/pl.js","./node_modules/moment/locale/pt-br.js","./node_modules/moment/locale/pt.js","./node_modules/moment/locale/ro.js","./node_modules/moment/locale/ru.js","./node_modules/moment/locale/sd.js","./node_modules/moment/locale/se.js","./node_modules/moment/locale/si.js","./node_modules/moment/locale/sk.js","./node_modules/moment/locale/sl.js","./node_modules/moment/locale/sq.js","./node_modules/moment/locale/sr-cyrl.js","./node_modules/moment/locale/sr.js","./node_modules/moment/locale/ss.js","./node_modules/moment/locale/sv.js","./node_modules/moment/locale/sw.js","./node_modules/moment/locale/ta.js","./node_modules/moment/locale/te.js","./node_modules/moment/locale/tet.js","./node_modules/moment/locale/tg.js","./node_modules/moment/locale/th.js","./node_modules/moment/locale/tk.js","./node_modules/moment/locale/tl-ph.js","./node_modules/moment/locale/tlh.js","./node_modules/moment/locale/tr.js","./node_modules/moment/locale/tzl.js","./node_modules/moment/locale/tzm-latn.js","./node_modules/moment/locale/tzm.js","./node_modules/moment/locale/ug-cn.js","./node_modules/moment/locale/uk.js","./node_modules/moment/locale/ur.js","./node_modules/moment/locale/uz-latn.js","./node_modules/moment/locale/uz.js","./node_modules/moment/locale/vi.js","./node_modules/moment/locale/x-pseudo.js","./node_modules/moment/locale/yo.js","./node_modules/moment/locale/zh-cn.js","./node_modules/moment/locale/zh-hk.js","./node_modules/moment/locale/zh-mo.js","./node_modules/moment/locale/zh-tw.js","./node_modules/moment/moment.js","./node_modules/ngx-google-places-autocomplete/__ivy_ngcc__/bundles/ngx-google-places-autocomplete.umd.js","./node_modules/rxjs/dist/esm/internal/Observable.js","./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/dist/esm/internal/Subject.js","./node_modules/rxjs/dist/esm/internal/NotificationFactories.js","./node_modules/rxjs/dist/esm/internal/Subscriber.js","./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","./node_modules/rxjs/dist/esm/internal/Subscription.js","./node_modules/rxjs/dist/esm/internal/config.js","./node_modules/rxjs/dist/esm/internal/observable/empty.js","./node_modules/rxjs/dist/esm/internal/operators/observeOn.js","./node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/observable/from.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","./node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","./node_modules/rxjs/dist/esm/internal/observable/merge.js","./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","./node_modules/rxjs/dist/esm/internal/operators/map.js","./node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","./node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","./node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","./node_modules/rxjs/dist/esm/internal/operators/share.js","./node_modules/rxjs/dist/esm/internal/operators/take.js","./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","./node_modules/rxjs/dist/esm/internal/symbol/iterator.js","./node_modules/rxjs/dist/esm/internal/symbol/observable.js","./node_modules/rxjs/dist/esm/internal/util/args.js","./node_modules/rxjs/dist/esm/internal/util/arrRemove.js","./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","./node_modules/rxjs/dist/esm/internal/util/errorContext.js","./node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","./node_modules/rxjs/dist/esm/internal/util/identity.js","./node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/util/isFunction.js","./node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","./node_modules/rxjs/dist/esm/internal/util/isIterable.js","./node_modules/rxjs/dist/esm/internal/util/isPromise.js","./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/util/isScheduler.js","./node_modules/rxjs/dist/esm/internal/util/lift.js","./node_modules/rxjs/dist/esm/internal/util/noop.js","./node_modules/rxjs/dist/esm/internal/util/pipe.js","./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","./node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","./node_modules/moment/locale/ sync ^\\.\\/.*$","./node_modules/tslib/tslib.es6.js","./node_modules/@angular/core/fesm2020/core.mjs"],"sourcesContent":["\"use strict\";(function(global){global.ng=global.ng||{};global.ng.common=global.ng.common||{};global.ng.common.locales=global.ng.common.locales||{};const u=undefined;function plural(val){const n=val,i=Math.floor(Math.abs(val)),t=parseInt(val.toString().replace(/^[^.]*\\.?|0+$/g,\"\"),10)||0;if(n===1||!(t===0)&&(i===0||i===1))return 1;return 5}global.ng.common.locales[\"da\"]=[\"da\",[[\"a\",\"p\"],[\"AM\",\"PM\"],u],[[\"AM\",\"PM\"],u,u],[[\"S\",\"M\",\"T\",\"O\",\"T\",\"F\",\"L\"],[\"s\\xF8n.\",\"man.\",\"tir.\",\"ons.\",\"tor.\",\"fre.\",\"l\\xF8r.\"],[\"s\\xF8ndag\",\"mandag\",\"tirsdag\",\"onsdag\",\"torsdag\",\"fredag\",\"l\\xF8rdag\"],[\"s\\xF8\",\"ma\",\"ti\",\"on\",\"to\",\"fr\",\"l\\xF8\"]],[[\"S\",\"M\",\"T\",\"O\",\"T\",\"F\",\"L\"],[\"s\\xF8n\",\"man\",\"tir\",\"ons\",\"tor\",\"fre\",\"l\\xF8r\"],[\"s\\xF8ndag\",\"mandag\",\"tirsdag\",\"onsdag\",\"torsdag\",\"fredag\",\"l\\xF8rdag\"],[\"s\\xF8\",\"ma\",\"ti\",\"on\",\"to\",\"fr\",\"l\\xF8\"]],[[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],[\"jan.\",\"feb.\",\"mar.\",\"apr.\",\"maj\",\"jun.\",\"jul.\",\"aug.\",\"sep.\",\"okt.\",\"nov.\",\"dec.\"],[\"januar\",\"februar\",\"marts\",\"april\",\"maj\",\"juni\",\"juli\",\"august\",\"september\",\"oktober\",\"november\",\"december\"]],u,[[\"fKr\",\"eKr\"],[\"f.Kr.\",\"e.Kr.\"],u],1,[6,0],[\"dd.MM.y\",\"d. MMM y\",\"d. MMMM y\",\"EEEE 'den' d. MMMM y\"],[\"HH.mm\",\"HH.mm.ss\",\"HH.mm.ss z\",\"HH.mm.ss zzzz\"],[\"{1} {0}\",u,\"{1} 'kl'. {0}\",u],[\",\",\".\",\";\",\"%\",\"+\",\"-\",\"E\",\"\\xD7\",\"\\u2030\",\"\\u221E\",\"NaN\",\".\"],[\"#,##0.###\",\"#,##0\\xA0%\",\"#,##0.00\\xA0\\xA4\",\"#E0\"],\"DKK\",\"kr.\",\"dansk krone\",{\"AUD\":[\"AU$\",\"$\"],\"BYN\":[u,\"Br.\"],\"DKK\":[\"kr.\"],\"ISK\":[u,\"kr.\"],\"JPY\":[\"JP\\xA5\",\"\\xA5\"],\"NOK\":[u,\"kr.\"],\"PHP\":[u,\"\\u20B1\"],\"RON\":[u,\"L\"],\"SEK\":[u,\"kr.\"],\"THB\":[\"\\u0E3F\"],\"TWD\":[\"NT$\"],\"USD\":[\"US$\",\"$\"]},\"ltr\",plural,[[[\"midnat\",\"om morgenen\",\"om formiddagen\",\"om eftermiddagen\",\"om aftenen\",\"om natten\"],u,u],[[\"midnat\",\"morgen\",\"formiddag\",\"eftermiddag\",\"aften\",\"nat\"],u,u],[\"00:00\",[\"05:00\",\"10:00\"],[\"10:00\",\"12:00\"],[\"12:00\",\"18:00\"],[\"18:00\",\"24:00\"],[\"00:00\",\"05:00\"]]]]})(typeof globalThis!==\"undefined\"&&globalThis||typeof global!==\"undefined\"&&global||typeof window!==\"undefined\"&&window);","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, PLATFORM_ID, NgZone } from '@angular/core';\n\nlet _DOM = null;\nfunction getDOM() {\n return _DOM;\n}\nfunction setRootDomAdapter(adapter) {\n if (!_DOM) {\n _DOM = adapter;\n }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass DomAdapter {\n}\n\n/**\n * A DI Token representing the main rendering context.\n * In a browser and SSR this is the DOM Document.\n * When using SSR, that document is created by [Domino](https://github.com/angular/domino).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\nclass PlatformLocation {\n historyGo(relativePosition) {\n throw new Error('Not implemented');\n }\n}\nPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PlatformLocation, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: useBrowserPlatformLocation\n }]\n }] });\nfunction useBrowserPlatformLocation() {\n return ɵɵinject(BrowserPlatformLocation);\n}\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nconst LOCATION_INITIALIZED = new InjectionToken('Location Initialized');\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * @publicApi\n */\nclass BrowserPlatformLocation extends PlatformLocation {\n constructor(_doc) {\n super();\n this._doc = _doc;\n this._location = window.location;\n this._history = window.history;\n }\n getBaseHrefFromDOM() {\n return getDOM().getBaseHref(this._doc);\n }\n onPopState(fn) {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('popstate', fn, false);\n return () => window.removeEventListener('popstate', fn);\n }\n onHashChange(fn) {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('hashchange', fn, false);\n return () => window.removeEventListener('hashchange', fn);\n }\n get href() {\n return this._location.href;\n }\n get protocol() {\n return this._location.protocol;\n }\n get hostname() {\n return this._location.hostname;\n }\n get port() {\n return this._location.port;\n }\n get pathname() {\n return this._location.pathname;\n }\n get search() {\n return this._location.search;\n }\n get hash() {\n return this._location.hash;\n }\n set pathname(newPath) {\n this._location.pathname = newPath;\n }\n pushState(state, title, url) {\n if (supportsState()) {\n this._history.pushState(state, title, url);\n }\n else {\n this._location.hash = url;\n }\n }\n replaceState(state, title, url) {\n if (supportsState()) {\n this._history.replaceState(state, title, url);\n }\n else {\n this._location.hash = url;\n }\n }\n forward() {\n this._history.forward();\n }\n back() {\n this._history.back();\n }\n historyGo(relativePosition = 0) {\n this._history.go(relativePosition);\n }\n getState() {\n return this._history.state;\n }\n}\nBrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserPlatformLocation, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: createBrowserPlatformLocation,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nfunction supportsState() {\n return !!window.history.pushState;\n}\nfunction createBrowserPlatformLocation() {\n return new BrowserPlatformLocation(ɵɵinject(DOCUMENT));\n}\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n let slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * http://example.com#/foo,\n * and `PathLocationStrategy` produces\n * http://example.com/foo as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nclass LocationStrategy {\n historyGo(relativePosition) {\n throw new Error('Not implemented');\n }\n}\nLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LocationStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]\n }] });\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_BASE_HREF = new InjectionToken('appBaseHref');\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}\n * or add a `` element to the document to override the default.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,\n * the `` and/or `APP_BASE_HREF` should end with a `/`.\n *\n * Similarly, if you add `` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass PathLocationStrategy extends LocationStrategy {\n constructor(_platformLocation, href) {\n super();\n this._platformLocation = _platformLocation;\n this._removeListenerFns = [];\n this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ??\n inject(DOCUMENT).location?.origin ?? '';\n }\n /** @nodoc */\n ngOnDestroy() {\n while (this._removeListenerFns.length) {\n this._removeListenerFns.pop()();\n }\n }\n onPopState(fn) {\n this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n }\n getBaseHref() {\n return this._baseHref;\n }\n prepareExternalUrl(internal) {\n return joinWithSlash(this._baseHref, internal);\n }\n path(includeHash = false) {\n const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n const hash = this._platformLocation.hash;\n return hash && includeHash ? `${pathname}${hash}` : pathname;\n }\n pushState(state, title, url, queryParams) {\n const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.pushState(state, title, externalUrl);\n }\n replaceState(state, title, url, queryParams) {\n const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.replaceState(state, title, externalUrl);\n }\n forward() {\n this._platformLocation.forward();\n }\n back() {\n this._platformLocation.back();\n }\n getState() {\n return this._platformLocation.getState();\n }\n historyGo(relativePosition = 0) {\n this._platformLocation.historyGo?.(relativePosition);\n }\n}\nPathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nPathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PathLocationStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; } });\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass HashLocationStrategy extends LocationStrategy {\n constructor(_platformLocation, _baseHref) {\n super();\n this._platformLocation = _platformLocation;\n this._baseHref = '';\n this._removeListenerFns = [];\n if (_baseHref != null) {\n this._baseHref = _baseHref;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n while (this._removeListenerFns.length) {\n this._removeListenerFns.pop()();\n }\n }\n onPopState(fn) {\n this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n }\n getBaseHref() {\n return this._baseHref;\n }\n path(includeHash = false) {\n // the hash value is always prefixed with a `#`\n // and if it is empty then it will stay empty\n let path = this._platformLocation.hash;\n if (path == null)\n path = '#';\n return path.length > 0 ? path.substring(1) : path;\n }\n prepareExternalUrl(internal) {\n const url = joinWithSlash(this._baseHref, internal);\n return url.length > 0 ? ('#' + url) : url;\n }\n pushState(state, title, path, queryParams) {\n let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.pushState(state, title, url);\n }\n replaceState(state, title, path, queryParams) {\n let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.replaceState(state, title, url);\n }\n forward() {\n this._platformLocation.forward();\n }\n back() {\n this._platformLocation.back();\n }\n getState() {\n return this._platformLocation.getState();\n }\n historyGo(relativePosition = 0) {\n this._platformLocation.historyGo?.(relativePosition);\n }\n}\nHashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nHashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HashLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HashLocationStrategy, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; } });\n\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router.navigate()` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * \n *\n * @publicApi\n */\nclass Location {\n constructor(locationStrategy) {\n /** @internal */\n this._subject = new EventEmitter();\n /** @internal */\n this._urlChangeListeners = [];\n /** @internal */\n this._urlChangeSubscription = null;\n this._locationStrategy = locationStrategy;\n const baseHref = this._locationStrategy.getBaseHref();\n // Note: This class's interaction with base HREF does not fully follow the rules\n // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm.\n // Instead of trying to fix individual bugs with more and more code, we should\n // investigate using the URL constructor and providing the base as a second\n // argument.\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters\n this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref)));\n this._locationStrategy.onPopState((ev) => {\n this._subject.emit({\n 'url': this.path(true),\n 'pop': true,\n 'state': ev.state,\n 'type': ev.type,\n });\n });\n }\n /** @nodoc */\n ngOnDestroy() {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n /**\n * Normalizes the URL path for this location.\n *\n * @param includeHash True to include an anchor fragment in the path.\n *\n * @returns The normalized URL path.\n */\n // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n // removed.\n path(includeHash = false) {\n return this.normalize(this._locationStrategy.path(includeHash));\n }\n /**\n * Reports the current state of the location history.\n * @returns The current value of the `history.state` object.\n */\n getState() {\n return this._locationStrategy.getState();\n }\n /**\n * Normalizes the given path and compares to the current normalized path.\n *\n * @param path The given URL path.\n * @param query Query parameters.\n *\n * @returns True if the given URL path is equal to the current normalized path, false\n * otherwise.\n */\n isCurrentPathEqualTo(path, query = '') {\n return this.path() == this.normalize(path + normalizeQueryParams(query));\n }\n /**\n * Normalizes a URL path by stripping any trailing slashes.\n *\n * @param url String representing a URL.\n *\n * @returns The normalized URL string.\n */\n normalize(url) {\n return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));\n }\n /**\n * Normalizes an external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n * before normalizing. Adds a hash if `HashLocationStrategy` is\n * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n *\n * @param url String representing a URL.\n *\n * @returns A normalized platform-specific URL.\n */\n prepareExternalUrl(url) {\n if (url && url[0] !== '/') {\n url = '/' + url;\n }\n return this._locationStrategy.prepareExternalUrl(url);\n }\n // TODO: rename this method to pushState\n /**\n * Changes the browser's URL to a normalized version of a given URL, and pushes a\n * new item onto the platform's history.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n *\n */\n go(path, query = '', state = null) {\n this._locationStrategy.pushState(state, '', path, query);\n this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n }\n /**\n * Changes the browser's URL to a normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n */\n replaceState(path, query = '', state = null) {\n this._locationStrategy.replaceState(state, '', path, query);\n this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n }\n /**\n * Navigates forward in the platform's history.\n */\n forward() {\n this._locationStrategy.forward();\n }\n /**\n * Navigates back in the platform's history.\n */\n back() {\n this._locationStrategy.back();\n }\n /**\n * Navigate to a specific page from session history, identified by its relative position to the\n * current page.\n *\n * @param relativePosition Position of the target page in the history relative to the current\n * page.\n * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`\n * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go\n * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs\n * when `relativePosition` equals 0.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history\n */\n historyGo(relativePosition = 0) {\n this._locationStrategy.historyGo?.(relativePosition);\n }\n /**\n * Registers a URL change listener. Use to catch updates performed by the Angular\n * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n *\n * @param fn The change handler function, which take a URL and a location history state.\n * @returns A function that, when executed, unregisters a URL change listener.\n */\n onUrlChange(fn) {\n this._urlChangeListeners.push(fn);\n if (!this._urlChangeSubscription) {\n this._urlChangeSubscription = this.subscribe(v => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n }\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n /** @internal */\n _notifyUrlChangeListeners(url = '', state) {\n this._urlChangeListeners.forEach(fn => fn(url, state));\n }\n /**\n * Subscribes to the platform's `popState` events.\n *\n * Note: `Location.go()` does not trigger the `popState` event in the browser. Use\n * `Location.onUrlChange()` to subscribe to URL changes instead.\n *\n * @param value Event that is triggered when the state history changes.\n * @param exception The exception to throw.\n *\n * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)\n *\n * @returns Subscribed events.\n */\n subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nLocation.normalizeQueryParams = normalizeQueryParams;\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nLocation.joinWithSlash = joinWithSlash;\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nLocation.stripTrailingSlash = stripTrailingSlash;\nLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });\nLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Location, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n // See #23917\n useFactory: createLocation,\n }]\n }], ctorParameters: function () { return [{ type: LocationStrategy }]; } });\nfunction createLocation() {\n return new Location(ɵɵinject(LocationStrategy));\n}\nfunction _stripBasePath(basePath, url) {\n if (!basePath || !url.startsWith(basePath)) {\n return url;\n }\n const strippedUrl = url.substring(basePath.length);\n if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) {\n return strippedUrl;\n }\n return url;\n}\nfunction _stripIndexHtml(url) {\n return url.replace(/\\/index.html$/, '');\n}\nfunction _stripOrigin(baseHref) {\n // DO NOT REFACTOR! Previously, this check looked like this:\n // `/^(https?:)?\\/\\//.test(baseHref)`, but that resulted in\n // syntactically incorrect code after Closure Compiler minification.\n // This was likely caused by a bug in Closure Compiler, but\n // for now, the check is rewritten to use `new RegExp` instead.\n const isAbsoluteUrl = (new RegExp('^(https?:)?//')).test(baseHref);\n if (isAbsoluteUrl) {\n const [, pathname] = baseHref.split(/\\/\\/[^\\/]+/);\n return pathname;\n }\n return baseHref;\n}\n\n/** @internal */\nconst CURRENCIES_EN = { \"ADP\": [undefined, undefined, 0], \"AFN\": [undefined, \"؋\", 0], \"ALL\": [undefined, undefined, 0], \"AMD\": [undefined, \"֏\", 2], \"AOA\": [undefined, \"Kz\"], \"ARS\": [undefined, \"$\"], \"AUD\": [\"A$\", \"$\"], \"AZN\": [undefined, \"₼\"], \"BAM\": [undefined, \"KM\"], \"BBD\": [undefined, \"$\"], \"BDT\": [undefined, \"৳\"], \"BHD\": [undefined, undefined, 3], \"BIF\": [undefined, undefined, 0], \"BMD\": [undefined, \"$\"], \"BND\": [undefined, \"$\"], \"BOB\": [undefined, \"Bs\"], \"BRL\": [\"R$\"], \"BSD\": [undefined, \"$\"], \"BWP\": [undefined, \"P\"], \"BYN\": [undefined, undefined, 2], \"BYR\": [undefined, undefined, 0], \"BZD\": [undefined, \"$\"], \"CAD\": [\"CA$\", \"$\", 2], \"CHF\": [undefined, undefined, 2], \"CLF\": [undefined, undefined, 4], \"CLP\": [undefined, \"$\", 0], \"CNY\": [\"CN¥\", \"¥\"], \"COP\": [undefined, \"$\", 2], \"CRC\": [undefined, \"₡\", 2], \"CUC\": [undefined, \"$\"], \"CUP\": [undefined, \"$\"], \"CZK\": [undefined, \"Kč\", 2], \"DJF\": [undefined, undefined, 0], \"DKK\": [undefined, \"kr\", 2], \"DOP\": [undefined, \"$\"], \"EGP\": [undefined, \"E£\"], \"ESP\": [undefined, \"₧\", 0], \"EUR\": [\"€\"], \"FJD\": [undefined, \"$\"], \"FKP\": [undefined, \"£\"], \"GBP\": [\"£\"], \"GEL\": [undefined, \"₾\"], \"GHS\": [undefined, \"GH₵\"], \"GIP\": [undefined, \"£\"], \"GNF\": [undefined, \"FG\", 0], \"GTQ\": [undefined, \"Q\"], \"GYD\": [undefined, \"$\", 2], \"HKD\": [\"HK$\", \"$\"], \"HNL\": [undefined, \"L\"], \"HRK\": [undefined, \"kn\"], \"HUF\": [undefined, \"Ft\", 2], \"IDR\": [undefined, \"Rp\", 2], \"ILS\": [\"₪\"], \"INR\": [\"₹\"], \"IQD\": [undefined, undefined, 0], \"IRR\": [undefined, undefined, 0], \"ISK\": [undefined, \"kr\", 0], \"ITL\": [undefined, undefined, 0], \"JMD\": [undefined, \"$\"], \"JOD\": [undefined, undefined, 3], \"JPY\": [\"¥\", undefined, 0], \"KHR\": [undefined, \"៛\"], \"KMF\": [undefined, \"CF\", 0], \"KPW\": [undefined, \"₩\", 0], \"KRW\": [\"₩\", undefined, 0], \"KWD\": [undefined, undefined, 3], \"KYD\": [undefined, \"$\"], \"KZT\": [undefined, \"₸\"], \"LAK\": [undefined, \"₭\", 0], \"LBP\": [undefined, \"L£\", 0], \"LKR\": [undefined, \"Rs\"], \"LRD\": [undefined, \"$\"], \"LTL\": [undefined, \"Lt\"], \"LUF\": [undefined, undefined, 0], \"LVL\": [undefined, \"Ls\"], \"LYD\": [undefined, undefined, 3], \"MGA\": [undefined, \"Ar\", 0], \"MGF\": [undefined, undefined, 0], \"MMK\": [undefined, \"K\", 0], \"MNT\": [undefined, \"₮\", 2], \"MRO\": [undefined, undefined, 0], \"MUR\": [undefined, \"Rs\", 2], \"MXN\": [\"MX$\", \"$\"], \"MYR\": [undefined, \"RM\"], \"NAD\": [undefined, \"$\"], \"NGN\": [undefined, \"₦\"], \"NIO\": [undefined, \"C$\"], \"NOK\": [undefined, \"kr\", 2], \"NPR\": [undefined, \"Rs\"], \"NZD\": [\"NZ$\", \"$\"], \"OMR\": [undefined, undefined, 3], \"PHP\": [\"₱\"], \"PKR\": [undefined, \"Rs\", 2], \"PLN\": [undefined, \"zł\"], \"PYG\": [undefined, \"₲\", 0], \"RON\": [undefined, \"lei\"], \"RSD\": [undefined, undefined, 0], \"RUB\": [undefined, \"₽\"], \"RWF\": [undefined, \"RF\", 0], \"SBD\": [undefined, \"$\"], \"SEK\": [undefined, \"kr\", 2], \"SGD\": [undefined, \"$\"], \"SHP\": [undefined, \"£\"], \"SLE\": [undefined, undefined, 2], \"SLL\": [undefined, undefined, 0], \"SOS\": [undefined, undefined, 0], \"SRD\": [undefined, \"$\"], \"SSP\": [undefined, \"£\"], \"STD\": [undefined, undefined, 0], \"STN\": [undefined, \"Db\"], \"SYP\": [undefined, \"£\", 0], \"THB\": [undefined, \"฿\"], \"TMM\": [undefined, undefined, 0], \"TND\": [undefined, undefined, 3], \"TOP\": [undefined, \"T$\"], \"TRL\": [undefined, undefined, 0], \"TRY\": [undefined, \"₺\"], \"TTD\": [undefined, \"$\"], \"TWD\": [\"NT$\", \"$\", 2], \"TZS\": [undefined, undefined, 2], \"UAH\": [undefined, \"₴\"], \"UGX\": [undefined, undefined, 0], \"USD\": [\"$\"], \"UYI\": [undefined, undefined, 0], \"UYU\": [undefined, \"$\"], \"UYW\": [undefined, undefined, 4], \"UZS\": [undefined, undefined, 2], \"VEF\": [undefined, \"Bs\", 2], \"VND\": [\"₫\", undefined, 0], \"VUV\": [undefined, undefined, 0], \"XAF\": [\"FCFA\", undefined, 0], \"XCD\": [\"EC$\", \"$\"], \"XOF\": [\"F CFA\", undefined, 0], \"XPF\": [\"CFPF\", undefined, 0], \"XXX\": [\"¤\"], \"YER\": [undefined, undefined, 0], \"ZAR\": [undefined, \"R\"], \"ZMK\": [undefined, undefined, 0], \"ZMW\": [undefined, \"ZK\"], \"ZWD\": [undefined, undefined, 0] };\n\n/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar NumberFormatStyle;\n(function (NumberFormatStyle) {\n NumberFormatStyle[NumberFormatStyle[\"Decimal\"] = 0] = \"Decimal\";\n NumberFormatStyle[NumberFormatStyle[\"Percent\"] = 1] = \"Percent\";\n NumberFormatStyle[NumberFormatStyle[\"Currency\"] = 2] = \"Currency\";\n NumberFormatStyle[NumberFormatStyle[\"Scientific\"] = 3] = \"Scientific\";\n})(NumberFormatStyle || (NumberFormatStyle = {}));\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar Plural;\n(function (Plural) {\n Plural[Plural[\"Zero\"] = 0] = \"Zero\";\n Plural[Plural[\"One\"] = 1] = \"One\";\n Plural[Plural[\"Two\"] = 2] = \"Two\";\n Plural[Plural[\"Few\"] = 3] = \"Few\";\n Plural[Plural[\"Many\"] = 4] = \"Many\";\n Plural[Plural[\"Other\"] = 5] = \"Other\";\n})(Plural || (Plural = {}));\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar FormStyle;\n(function (FormStyle) {\n FormStyle[FormStyle[\"Format\"] = 0] = \"Format\";\n FormStyle[FormStyle[\"Standalone\"] = 1] = \"Standalone\";\n})(FormStyle || (FormStyle = {}));\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nvar TranslationWidth;\n(function (TranslationWidth) {\n /** 1 character for `en-US`. For example: 'S' */\n TranslationWidth[TranslationWidth[\"Narrow\"] = 0] = \"Narrow\";\n /** 3 characters for `en-US`. For example: 'Sun' */\n TranslationWidth[TranslationWidth[\"Abbreviated\"] = 1] = \"Abbreviated\";\n /** Full length for `en-US`. For example: \"Sunday\" */\n TranslationWidth[TranslationWidth[\"Wide\"] = 2] = \"Wide\";\n /** 2 characters for `en-US`, For example: \"Su\" */\n TranslationWidth[TranslationWidth[\"Short\"] = 3] = \"Short\";\n})(TranslationWidth || (TranslationWidth = {}));\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()`\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n * @publicApi\n */\nvar FormatWidth;\n(function (FormatWidth) {\n /**\n * For `en-US`, 'M/d/yy, h:mm a'`\n * (Example: `6/15/15, 9:03 AM`)\n */\n FormatWidth[FormatWidth[\"Short\"] = 0] = \"Short\";\n /**\n * For `en-US`, `'MMM d, y, h:mm:ss a'`\n * (Example: `Jun 15, 2015, 9:03:01 AM`)\n */\n FormatWidth[FormatWidth[\"Medium\"] = 1] = \"Medium\";\n /**\n * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n */\n FormatWidth[FormatWidth[\"Long\"] = 2] = \"Long\";\n /**\n * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n */\n FormatWidth[FormatWidth[\"Full\"] = 3] = \"Full\";\n})(FormatWidth || (FormatWidth = {}));\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nvar NumberSymbol;\n(function (NumberSymbol) {\n /**\n * Decimal separator.\n * For `en-US`, the dot character.\n * Example: 2,345`.`67\n */\n NumberSymbol[NumberSymbol[\"Decimal\"] = 0] = \"Decimal\";\n /**\n * Grouping separator, typically for thousands.\n * For `en-US`, the comma character.\n * Example: 2`,`345.67\n */\n NumberSymbol[NumberSymbol[\"Group\"] = 1] = \"Group\";\n /**\n * List-item separator.\n * Example: \"one, two, and three\"\n */\n NumberSymbol[NumberSymbol[\"List\"] = 2] = \"List\";\n /**\n * Sign for percentage (out of 100).\n * Example: 23.4%\n */\n NumberSymbol[NumberSymbol[\"PercentSign\"] = 3] = \"PercentSign\";\n /**\n * Sign for positive numbers.\n * Example: +23\n */\n NumberSymbol[NumberSymbol[\"PlusSign\"] = 4] = \"PlusSign\";\n /**\n * Sign for negative numbers.\n * Example: -23\n */\n NumberSymbol[NumberSymbol[\"MinusSign\"] = 5] = \"MinusSign\";\n /**\n * Computer notation for exponential value (n times a power of 10).\n * Example: 1.2E3\n */\n NumberSymbol[NumberSymbol[\"Exponential\"] = 6] = \"Exponential\";\n /**\n * Human-readable format of exponential.\n * Example: 1.2x103\n */\n NumberSymbol[NumberSymbol[\"SuperscriptingExponent\"] = 7] = \"SuperscriptingExponent\";\n /**\n * Sign for permille (out of 1000).\n * Example: 23.4‰\n */\n NumberSymbol[NumberSymbol[\"PerMille\"] = 8] = \"PerMille\";\n /**\n * Infinity, can be used with plus and minus.\n * Example: ∞, +∞, -∞\n */\n NumberSymbol[NumberSymbol[\"Infinity\"] = 9] = \"Infinity\";\n /**\n * Not a number.\n * Example: NaN\n */\n NumberSymbol[NumberSymbol[\"NaN\"] = 10] = \"NaN\";\n /**\n * Symbol used between time units.\n * Example: 10:52\n */\n NumberSymbol[NumberSymbol[\"TimeSeparator\"] = 11] = \"TimeSeparator\";\n /**\n * Decimal separator for currency values (fallback to `Decimal`).\n * Example: $2,345.67\n */\n NumberSymbol[NumberSymbol[\"CurrencyDecimal\"] = 12] = \"CurrencyDecimal\";\n /**\n * Group separator for currency values (fallback to `Group`).\n * Example: $2,345.67\n */\n NumberSymbol[NumberSymbol[\"CurrencyGroup\"] = 13] = \"CurrencyGroup\";\n})(NumberSymbol || (NumberSymbol = {}));\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nvar WeekDay;\n(function (WeekDay) {\n WeekDay[WeekDay[\"Sunday\"] = 0] = \"Sunday\";\n WeekDay[WeekDay[\"Monday\"] = 1] = \"Monday\";\n WeekDay[WeekDay[\"Tuesday\"] = 2] = \"Tuesday\";\n WeekDay[WeekDay[\"Wednesday\"] = 3] = \"Wednesday\";\n WeekDay[WeekDay[\"Thursday\"] = 4] = \"Thursday\";\n WeekDay[WeekDay[\"Friday\"] = 5] = \"Friday\";\n WeekDay[WeekDay[\"Saturday\"] = 6] = \"Saturday\";\n})(WeekDay || (WeekDay = {}));\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleId(locale) {\n return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n const amPmData = [\n data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]\n ];\n const amPm = getLastDefinedValue(amPmData, formStyle);\n return getLastDefinedValue(amPm, width);\n}\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n const daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];\n const days = getLastDefinedValue(daysData, formStyle);\n return getLastDefinedValue(days, width);\n}\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example, `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n const monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];\n const months = getLastDefinedValue(monthsData, formStyle);\n return getLastDefinedValue(months, width);\n}\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleEraNames(locale, width) {\n const data = ɵfindLocaleData(locale);\n const erasData = data[ɵLocaleDataIndex.Eras];\n return getLastDefinedValue(erasData, width);\n}\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleWeekEndRange(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.WeekendRange];\n}\n/**\n * Retrieves a localized date-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDateFormat(locale, width) {\n const data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n\n * @publicApi\n */\nfunction getLocaleTimeFormat(locale, width) {\n const data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n const data = ɵfindLocaleData(locale);\n const dateTimeFormatData = data[ɵLocaleDataIndex.DateTimeFormat];\n return getLastDefinedValue(dateTimeFormatData, width);\n}\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n const data = ɵfindLocaleData(locale);\n const res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n if (typeof res === 'undefined') {\n if (symbol === NumberSymbol.CurrencyDecimal) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n }\n else if (symbol === NumberSymbol.CurrencyGroup) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n }\n }\n return res;\n}\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * Important: The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleNumberFormat(locale, type) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleCurrencySymbol(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleCurrencyName(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n */\nfunction getLocaleCurrencyCode(locale) {\n return ɵgetLocaleCurrencyCode(locale);\n}\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocaleCurrencies(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Currencies];\n}\n/**\n * @alias core/ɵgetLocalePluralCase\n * @publicApi\n */\nconst getLocalePluralCase = ɵgetLocalePluralCase;\nfunction checkFullData(data) {\n if (!data[ɵLocaleDataIndex.ExtraData]) {\n throw new Error(`Missing extra locale data for the locale \"${data[ɵLocaleDataIndex\n .LocaleId]}\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`);\n }\n}\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n-common-format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const rules = data[ɵLocaleDataIndex.ExtraData][2 /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */] || [];\n return rules.map((rule) => {\n if (typeof rule === 'string') {\n return extractTime(rule);\n }\n return [extractTime(rule[0]), extractTime(rule[1])];\n });\n}\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n-common-format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const dayPeriodsData = [\n data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],\n data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]\n ];\n const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n return getLastDefinedValue(dayPeriods, width) || [];\n}\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nfunction getLocaleDirection(locale) {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Directionality];\n}\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getLastDefinedValue(data, index) {\n for (let i = index; i > -1; i--) {\n if (typeof data[i] !== 'undefined') {\n return data[i];\n }\n }\n throw new Error('Locale data API: locale data undefined');\n}\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time) {\n const [h, m] = time.split(':');\n return { hours: +h, minutes: +m };\n}\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getCurrencySymbol(code, format, locale = 'en') {\n const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n const symbolNarrow = currency[1 /* ɵCurrencyIndex.SymbolNarrow */];\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n return symbolNarrow;\n }\n return currency[0 /* ɵCurrencyIndex.Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction getNumberOfCurrencyDigits(code) {\n let digits;\n const currency = CURRENCIES_EN[code];\n if (currency) {\n digits = currency[2 /* ɵCurrencyIndex.NbOfDigits */];\n }\n return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n\nconst ISO8601_DATE_REGEX = /^(\\d{4,})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n// 1 2 3 4 5 6 7 8 9 10 11\nconst NAMED_FORMATS = {};\nconst DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?: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}|c{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]*)/;\nvar ZoneWidth;\n(function (ZoneWidth) {\n ZoneWidth[ZoneWidth[\"Short\"] = 0] = \"Short\";\n ZoneWidth[ZoneWidth[\"ShortGMT\"] = 1] = \"ShortGMT\";\n ZoneWidth[ZoneWidth[\"Long\"] = 2] = \"Long\";\n ZoneWidth[ZoneWidth[\"Extended\"] = 3] = \"Extended\";\n})(ZoneWidth || (ZoneWidth = {}));\nvar DateType;\n(function (DateType) {\n DateType[DateType[\"FullYear\"] = 0] = \"FullYear\";\n DateType[DateType[\"Month\"] = 1] = \"Month\";\n DateType[DateType[\"Date\"] = 2] = \"Date\";\n DateType[DateType[\"Hours\"] = 3] = \"Hours\";\n DateType[DateType[\"Minutes\"] = 4] = \"Minutes\";\n DateType[DateType[\"Seconds\"] = 5] = \"Seconds\";\n DateType[DateType[\"FractionalSeconds\"] = 6] = \"FractionalSeconds\";\n DateType[DateType[\"Day\"] = 7] = \"Day\";\n})(DateType || (DateType = {}));\nvar TranslationType;\n(function (TranslationType) {\n TranslationType[TranslationType[\"DayPeriods\"] = 0] = \"DayPeriods\";\n TranslationType[TranslationType[\"Days\"] = 1] = \"Days\";\n TranslationType[TranslationType[\"Months\"] = 2] = \"Months\";\n TranslationType[TranslationType[\"Eras\"] = 3] = \"Eras\";\n})(TranslationType || (TranslationType = {}));\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatDate(value, format, locale, timezone) {\n let date = toDate(value);\n const namedFormat = getNamedFormat(locale, format);\n format = namedFormat || format;\n let parts = [];\n let match;\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = parts.concat(match.slice(1));\n const part = parts.pop();\n if (!part) {\n break;\n }\n format = part;\n }\n else {\n parts.push(format);\n break;\n }\n }\n let dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n let text = '';\n parts.forEach(value => {\n const dateFormatter = getDateFormatter(value);\n text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) :\n value === '\\'\\'' ? '\\'' :\n value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n });\n return text;\n}\n/**\n * Create a new Date object with the given date value, and the time set to midnight.\n *\n * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.\n * See: https://github.com/angular/angular/issues/40377\n *\n * Note that this function returns a Date object whose time is midnight in the current locale's\n * timezone. In the future we might want to change this to be midnight in UTC, but this would be a\n * considerable breaking change.\n */\nfunction createDate(year, month, date) {\n // The `newDate` is set to midnight (UTC) on January 1st 1970.\n // - In PST this will be December 31st 1969 at 4pm.\n // - In GMT this will be January 1st 1970 at 1am.\n // Note that they even have different years, dates and months!\n const newDate = new Date(0);\n // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n // change the internal time of the date.\n // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n // - In PST this will now be September 20, 2019 at 4pm\n // - In GMT this will now be September 20, 2019 at 1am\n newDate.setFullYear(year, month, date);\n // We want the final date to be at local midnight, so we reset the time.\n // - In PST this will now be September 20, 2019 at 12am\n // - In GMT this will now be September 20, 2019 at 12am\n newDate.setHours(0, 0, 0);\n return newDate;\n}\nfunction getNamedFormat(locale, format) {\n const localeId = getLocaleId(locale);\n NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n if (NAMED_FORMATS[localeId][format]) {\n return NAMED_FORMATS[localeId][format];\n }\n let formatValue = '';\n switch (format) {\n case 'shortDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n break;\n case 'mediumDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n break;\n case 'longDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n break;\n case 'fullDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n break;\n case 'shortTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n break;\n case 'mediumTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n break;\n case 'longTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n break;\n case 'fullTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n break;\n case 'short':\n const shortTime = getNamedFormat(locale, 'shortTime');\n const shortDate = getNamedFormat(locale, 'shortDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n break;\n case 'medium':\n const mediumTime = getNamedFormat(locale, 'mediumTime');\n const mediumDate = getNamedFormat(locale, 'mediumDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n break;\n case 'long':\n const longTime = getNamedFormat(locale, 'longTime');\n const longDate = getNamedFormat(locale, 'longDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n break;\n case 'full':\n const fullTime = getNamedFormat(locale, 'fullTime');\n const fullDate = getNamedFormat(locale, 'fullDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n break;\n }\n if (formatValue) {\n NAMED_FORMATS[localeId][format] = formatValue;\n }\n return formatValue;\n}\nfunction formatDateTime(str, opt_values) {\n if (opt_values) {\n str = str.replace(/\\{([^}]+)}/g, function (match, key) {\n return (opt_values != null && key in opt_values) ? opt_values[key] : match;\n });\n }\n return str;\n}\nfunction padNumber(num, digits, minusSign = '-', trim, negWrap) {\n let neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n }\n else {\n num = -num;\n neg = minusSign;\n }\n }\n let strNum = String(num);\n while (strNum.length < digits) {\n strNum = '0' + strNum;\n }\n if (trim) {\n strNum = strNum.slice(strNum.length - digits);\n }\n return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n const strMs = padNumber(milliseconds, 3);\n return strMs.substring(0, digits);\n}\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset = 0, trim = false, negWrap = false) {\n return function (date, locale) {\n let part = getDatePart(name, date);\n if (offset > 0 || part > -offset) {\n part += offset;\n }\n if (name === DateType.Hours) {\n if (part === 0 && offset === -12) {\n part = 12;\n }\n }\n else if (name === DateType.FractionalSeconds) {\n return formatFractionalSeconds(part, size);\n }\n const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n return padNumber(part, size, localeMinus, trim, negWrap);\n };\n}\nfunction getDatePart(part, date) {\n switch (part) {\n case DateType.FullYear:\n return date.getFullYear();\n case DateType.Month:\n return date.getMonth();\n case DateType.Date:\n return date.getDate();\n case DateType.Hours:\n return date.getHours();\n case DateType.Minutes:\n return date.getMinutes();\n case DateType.Seconds:\n return date.getSeconds();\n case DateType.FractionalSeconds:\n return date.getMilliseconds();\n case DateType.Day:\n return date.getDay();\n default:\n throw new Error(`Unknown DateType value \"${part}\".`);\n }\n}\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(name, width, form = FormStyle.Format, extended = false) {\n return function (date, locale) {\n return getDateTranslation(date, locale, name, width, form, extended);\n };\n}\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(date, locale, name, width, form, extended) {\n switch (name) {\n case TranslationType.Months:\n return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n case TranslationType.Days:\n return getLocaleDayNames(locale, form, width)[date.getDay()];\n case TranslationType.DayPeriods:\n const currentHours = date.getHours();\n const currentMinutes = date.getMinutes();\n if (extended) {\n const rules = getLocaleExtraDayPeriodRules(locale);\n const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n const index = rules.findIndex(rule => {\n if (Array.isArray(rule)) {\n // morning, afternoon, evening, night\n const [from, to] = rule;\n const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n const beforeTo = (currentHours < to.hours ||\n (currentHours === to.hours && currentMinutes < to.minutes));\n // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n // 10pm - 5am) where `from` is greater (later!) than `to`.\n //\n // In the first case the current time must be BOTH after `from` AND before `to`\n // (e.g. 8am is after 6am AND before 10am).\n //\n // In the second case the current time must be EITHER after `from` OR before `to`\n // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n // after 10pm).\n if (from.hours < to.hours) {\n if (afterFrom && beforeTo) {\n return true;\n }\n }\n else if (afterFrom || beforeTo) {\n return true;\n }\n }\n else { // noon or midnight\n if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n return true;\n }\n }\n return false;\n });\n if (index !== -1) {\n return dayPeriods[index];\n }\n }\n // if no rules for the day periods, we use am/pm by default\n return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];\n case TranslationType.Eras:\n return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];\n default:\n // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n // However Closure Compiler does not understand that and reports an error in typed mode.\n // The `throw new Error` below works around the problem, and the unexpected: never variable\n // makes sure tsc still checks this code is unreachable.\n const unexpected = name;\n throw new Error(`unexpected translation type ${unexpected}`);\n }\n}\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width) {\n return function (date, locale, offset) {\n const zone = -1 * offset;\n const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n switch (width) {\n case ZoneWidth.Short:\n return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n case ZoneWidth.ShortGMT:\n return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);\n case ZoneWidth.Long:\n return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n case ZoneWidth.Extended:\n if (offset === 0) {\n return 'Z';\n }\n else {\n return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n }\n default:\n throw new Error(`Unknown zone width \"${width}\"`);\n }\n };\n}\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n const firstDayOfYear = createDate(year, JANUARY, 1).getDay();\n return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\nfunction getThursdayThisWeek(datetime) {\n return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\nfunction weekGetter(size, monthBased = false) {\n return function (date, locale) {\n let result;\n if (monthBased) {\n const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n const today = date.getDate();\n result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n }\n else {\n const thisThurs = getThursdayThisWeek(date);\n // Some days of a year are part of next year according to ISO 8601.\n // Compute the firstThurs from the year of this week's Thursday\n const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n const diff = thisThurs.getTime() - firstThurs.getTime();\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n }\n return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n };\n}\n/**\n * Returns a date formatter that provides the week-numbering year for the input date.\n */\nfunction weekNumberingYearGetter(size, trim = false) {\n return function (date, locale) {\n const thisThurs = getThursdayThisWeek(date);\n const weekNumberingYear = thisThurs.getFullYear();\n return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);\n };\n}\nconst DATE_FORMATS = {};\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format) {\n if (DATE_FORMATS[format]) {\n return DATE_FORMATS[format];\n }\n let formatter;\n switch (format) {\n // Era name (AD/BC)\n case 'G':\n case 'GG':\n case 'GGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n break;\n case 'GGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n break;\n case 'GGGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n break;\n // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'y':\n formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n break;\n // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yy':\n formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n break;\n // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yyy':\n formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n break;\n // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'yyyy':\n formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n break;\n // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'Y':\n formatter = weekNumberingYearGetter(1);\n break;\n // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD\n // 2010 => 10)\n case 'YY':\n formatter = weekNumberingYearGetter(2, true);\n break;\n // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD\n // 2010 => 2010)\n case 'YYY':\n formatter = weekNumberingYearGetter(3);\n break;\n // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'YYYY':\n formatter = weekNumberingYearGetter(4);\n break;\n // Month of the year (1-12), numeric\n case 'M':\n case 'L':\n formatter = dateGetter(DateType.Month, 1, 1);\n break;\n case 'MM':\n case 'LL':\n formatter = dateGetter(DateType.Month, 2, 1);\n break;\n // Month of the year (January, ...), string, format\n case 'MMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n break;\n case 'MMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n break;\n case 'MMMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n break;\n // Month of the year (January, ...), string, standalone\n case 'LLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n break;\n case 'LLLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n break;\n case 'LLLLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n break;\n // Week of the year (1, ... 52)\n case 'w':\n formatter = weekGetter(1);\n break;\n case 'ww':\n formatter = weekGetter(2);\n break;\n // Week of the month (1, ...)\n case 'W':\n formatter = weekGetter(1, true);\n break;\n // Day of the month (1-31)\n case 'd':\n formatter = dateGetter(DateType.Date, 1);\n break;\n case 'dd':\n formatter = dateGetter(DateType.Date, 2);\n break;\n // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)\n case 'c':\n case 'cc':\n formatter = dateGetter(DateType.Day, 1);\n break;\n case 'ccc':\n formatter =\n dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);\n break;\n case 'cccc':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);\n break;\n case 'ccccc':\n formatter =\n dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);\n break;\n case 'cccccc':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);\n break;\n // Day of the Week\n case 'E':\n case 'EE':\n case 'EEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n break;\n case 'EEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n break;\n case 'EEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n break;\n case 'EEEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n break;\n // Generic period of the day (am-pm)\n case 'a':\n case 'aa':\n case 'aaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n break;\n case 'aaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n break;\n case 'aaaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n break;\n // Extended period of the day (midnight, at night, ...), standalone\n case 'b':\n case 'bb':\n case 'bbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n break;\n case 'bbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n break;\n case 'bbbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n break;\n // Extended period of the day (midnight, night, ...), standalone\n case 'B':\n case 'BB':\n case 'BBB':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n break;\n case 'BBBB':\n formatter =\n dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n break;\n case 'BBBBB':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n break;\n // Hour in AM/PM, (1-12)\n case 'h':\n formatter = dateGetter(DateType.Hours, 1, -12);\n break;\n case 'hh':\n formatter = dateGetter(DateType.Hours, 2, -12);\n break;\n // Hour of the day (0-23)\n case 'H':\n formatter = dateGetter(DateType.Hours, 1);\n break;\n // Hour in day, padded (00-23)\n case 'HH':\n formatter = dateGetter(DateType.Hours, 2);\n break;\n // Minute of the hour (0-59)\n case 'm':\n formatter = dateGetter(DateType.Minutes, 1);\n break;\n case 'mm':\n formatter = dateGetter(DateType.Minutes, 2);\n break;\n // Second of the minute (0-59)\n case 's':\n formatter = dateGetter(DateType.Seconds, 1);\n break;\n case 'ss':\n formatter = dateGetter(DateType.Seconds, 2);\n break;\n // Fractional second\n case 'S':\n formatter = dateGetter(DateType.FractionalSeconds, 1);\n break;\n case 'SS':\n formatter = dateGetter(DateType.FractionalSeconds, 2);\n break;\n case 'SSS':\n formatter = dateGetter(DateType.FractionalSeconds, 3);\n break;\n // Timezone ISO8601 short format (-0430)\n case 'Z':\n case 'ZZ':\n case 'ZZZ':\n formatter = timeZoneGetter(ZoneWidth.Short);\n break;\n // Timezone ISO8601 extended format (-04:30)\n case 'ZZZZZ':\n formatter = timeZoneGetter(ZoneWidth.Extended);\n break;\n // Timezone GMT short format (GMT+4)\n case 'O':\n case 'OO':\n case 'OOO':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'z':\n case 'zz':\n case 'zzz':\n formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n break;\n // Timezone GMT long format (GMT+0430)\n case 'OOOO':\n case 'ZZZZ':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'zzzz':\n formatter = timeZoneGetter(ZoneWidth.Long);\n break;\n default:\n return null;\n }\n DATE_FORMATS[format] = formatter;\n return formatter;\n}\nfunction timezoneToOffset(timezone, fallback) {\n // Support: IE 11 only, Edge 13-15+\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(/:/g, '');\n const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\nfunction addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n const reverseValue = reverse ? -1 : 1;\n const dateTimezoneOffset = date.getTimezoneOffset();\n const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n * Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nfunction toDate(value) {\n if (isDate(value)) {\n return value;\n }\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n if (typeof value === 'string') {\n value = value.trim();\n if (/^(\\d{4}(-\\d{1,2}(-\\d{1,2})?)?)$/.test(value)) {\n /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */\n const [y, m = 1, d = 1] = value.split('-').map((val) => +val);\n return createDate(y, m - 1, d);\n }\n const parsedNb = parseFloat(value);\n // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n if (!isNaN(value - parsedNb)) {\n return new Date(parsedNb);\n }\n let match;\n if (match = value.match(ISO8601_DATE_REGEX)) {\n return isoStringToDate(match);\n }\n }\n const date = new Date(value);\n if (!isDate(date)) {\n throw new Error(`Unable to convert \"${value}\" into a date`);\n }\n return date;\n}\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nfunction isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}\nfunction isDate(value) {\n return value instanceof Date && !isNaN(value.valueOf());\n}\n\nconst NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst PERCENT_CHAR = '%';\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) {\n let formattedText = '';\n let isZero = false;\n if (!isFinite(value)) {\n formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n }\n else {\n let parsedNumber = parseNumber(value);\n if (isPercent) {\n parsedNumber = toPercent(parsedNumber);\n }\n let minInt = pattern.minInt;\n let minFraction = pattern.minFrac;\n let maxFraction = pattern.maxFrac;\n if (digitsInfo) {\n const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n if (parts === null) {\n throw new Error(`${digitsInfo} is not a valid digit info`);\n }\n const minIntPart = parts[1];\n const minFractionPart = parts[3];\n const maxFractionPart = parts[5];\n if (minIntPart != null) {\n minInt = parseIntAutoRadix(minIntPart);\n }\n if (minFractionPart != null) {\n minFraction = parseIntAutoRadix(minFractionPart);\n }\n if (maxFractionPart != null) {\n maxFraction = parseIntAutoRadix(maxFractionPart);\n }\n else if (minFractionPart != null && minFraction > maxFraction) {\n maxFraction = minFraction;\n }\n }\n roundNumber(parsedNumber, minFraction, maxFraction);\n let digits = parsedNumber.digits;\n let integerLen = parsedNumber.integerLen;\n const exponent = parsedNumber.exponent;\n let decimals = [];\n isZero = digits.every(d => !d);\n // pad zeros for small numbers\n for (; integerLen < minInt; integerLen++) {\n digits.unshift(0);\n }\n // pad zeros for small numbers\n for (; integerLen < 0; integerLen++) {\n digits.unshift(0);\n }\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n }\n else {\n decimals = digits;\n digits = [0];\n }\n // format the integer digits with grouping separators\n const groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n // append the decimal digits\n if (decimals.length) {\n formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n }\n if (exponent) {\n formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n }\n }\n if (value < 0 && !isZero) {\n formattedText = pattern.negPre + formattedText + pattern.negSuf;\n }\n else {\n formattedText = pattern.posPre + formattedText + pattern.posSuf;\n }\n return formattedText;\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);\n pattern.maxFrac = pattern.minFrac;\n const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n return res\n .replace(CURRENCY_CHAR, currency)\n // if we have 2 time the currency character, the second one is ignored\n .replace(CURRENCY_CHAR, '')\n // If there is a spacing between currency character and the value and\n // the currency character is suppressed by passing an empty string, the\n // spacing character would remain as part of the string. Then we\n // should remove it.\n .trim();\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n * @publicApi\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n *\n * @publicApi\n */\nfunction formatNumber(value, locale, digitsInfo) {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign = '-') {\n const p = {\n minInt: 1,\n minFrac: 0,\n maxFrac: 0,\n posPre: '',\n posSuf: '',\n negPre: '',\n negSuf: '',\n gSize: 0,\n lgSize: 0\n };\n const patternParts = format.split(PATTERN_SEP);\n const positive = patternParts[0];\n const negative = patternParts[1];\n const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?\n positive.split(DECIMAL_SEP) :\n [\n positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)\n ], integer = positiveParts[0], fraction = positiveParts[1] || '';\n p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));\n for (let i = 0; i < fraction.length; i++) {\n const ch = fraction.charAt(i);\n if (ch === ZERO_CHAR) {\n p.minFrac = p.maxFrac = i + 1;\n }\n else if (ch === DIGIT_CHAR) {\n p.maxFrac = i + 1;\n }\n else {\n p.posSuf += ch;\n }\n }\n const groups = integer.split(GROUP_SEP);\n p.gSize = groups[1] ? groups[1].length : 0;\n p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;\n if (negative) {\n const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);\n p.negPre = negative.substring(0, pos).replace(/'/g, '');\n p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, '');\n }\n else {\n p.negPre = minusSign + p.posPre;\n p.negSuf = p.posSuf;\n }\n return p;\n}\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber) {\n // if the number is 0, don't do anything\n if (parsedNumber.digits[0] === 0) {\n return parsedNumber;\n }\n // Getting the current number of decimals\n const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n if (parsedNumber.exponent) {\n parsedNumber.exponent += 2;\n }\n else {\n if (fractionLen === 0) {\n parsedNumber.digits.push(0, 0);\n }\n else if (fractionLen === 1) {\n parsedNumber.digits.push(0);\n }\n parsedNumber.integerLen += 2;\n }\n return parsedNumber;\n}\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num) {\n let numStr = Math.abs(num) + '';\n let exponent = 0, digits, integerLen;\n let i, j, zeros;\n // Decimal point?\n if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (integerLen < 0)\n integerLen = i;\n integerLen += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n }\n else if (integerLen < 0) {\n // There was no decimal point or exponent so it is an integer.\n integerLen = numStr.length;\n }\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */\n }\n if (i === (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n integerLen = 1;\n }\n else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR)\n zeros--;\n // Trailing zeros are insignificant so ignore them\n integerLen -= i;\n digits = [];\n // Convert string to array of digits without leading/trailing zeros.\n for (j = 0; i <= zeros; i++, j++) {\n digits[j] = Number(numStr.charAt(i));\n }\n }\n // If the number overflows the maximum allowed digits then use an exponent.\n if (integerLen > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = integerLen - 1;\n integerLen = 1;\n }\n return { digits, exponent, integerLen };\n}\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, minFrac, maxFrac) {\n if (minFrac > maxFrac) {\n throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);\n }\n let digits = parsedNumber.digits;\n let fractionLen = digits.length - parsedNumber.integerLen;\n const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n // The index of the digit to where rounding is to occur\n let roundAt = fractionSize + parsedNumber.integerLen;\n let digit = digits[roundAt];\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n // Set non-fractional digits beyond `roundAt` to 0\n for (let j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\n }\n else {\n // We rounded to zero so reset the parsedNumber\n fractionLen = Math.max(0, fractionLen);\n parsedNumber.integerLen = 1;\n digits.length = Math.max(1, roundAt = fractionSize + 1);\n digits[0] = 0;\n for (let i = 1; i < roundAt; i++)\n digits[i] = 0;\n }\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (let k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.integerLen++;\n }\n digits.unshift(1);\n parsedNumber.integerLen++;\n }\n else {\n digits[roundAt - 1]++;\n }\n }\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++)\n digits.push(0);\n let dropTrailingZeros = fractionSize !== 0;\n // Minimal length = nb of decimals required + current nb of integers\n // Any number besides that is optional and can be removed if it's a trailing 0\n const minLen = minFrac + parsedNumber.integerLen;\n // Do any carrying, e.g. a digit was rounded up to 10\n const carry = digits.reduceRight(function (carry, d, i, digits) {\n d = d + carry;\n digits[i] = d < 10 ? d : d - 10; // d % 10\n if (dropTrailingZeros) {\n // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n if (digits[i] === 0 && i >= minLen) {\n digits.pop();\n }\n else {\n dropTrailingZeros = false;\n }\n }\n return d >= 10 ? 1 : 0; // Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.integerLen++;\n }\n}\nfunction parseIntAutoRadix(text) {\n const result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n\n/**\n * @publicApi\n */\nclass NgLocalization {\n}\nNgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocalization, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: (locale) => new NgLocaleLocalization(locale),\n deps: [LOCALE_ID],\n }]\n }] });\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nfunction getPluralCategory(value, cases, ngLocalization, locale) {\n let key = `=${value}`;\n if (cases.indexOf(key) > -1) {\n return key;\n }\n key = ngLocalization.getPluralCategory(value, locale);\n if (cases.indexOf(key) > -1) {\n return key;\n }\n if (cases.indexOf('other') > -1) {\n return 'other';\n }\n throw new Error(`No plural message found for value \"${value}\"`);\n}\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\nclass NgLocaleLocalization extends NgLocalization {\n constructor(locale) {\n super();\n this.locale = locale;\n }\n getPluralCategory(value, locale) {\n const plural = getLocalePluralCase(locale || this.locale)(value);\n switch (plural) {\n case Plural.Zero:\n return 'zero';\n case Plural.One:\n return 'one';\n case Plural.Two:\n return 'two';\n case Plural.Few:\n return 'few';\n case Plural.Many:\n return 'many';\n default:\n return 'other';\n }\n }\n}\nNgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocaleLocalization });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgLocaleLocalization, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\n *\n * @publicApi\n */\nfunction registerLocaleData(data, localeId, extraData) {\n return ɵregisterLocaleData(data, localeId, extraData);\n}\n\nfunction parseCookieValue(cookieStr, name) {\n name = encodeURIComponent(name);\n for (const cookie of cookieStr.split(';')) {\n const eqIndex = cookie.indexOf('=');\n const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n if (cookieName.trim() === name) {\n return decodeURIComponent(cookieValue);\n }\n }\n return null;\n}\n\nconst WS_REGEXP = /\\s+/;\nconst EMPTY_ARRAY = [];\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * ...\n *\n * ...\n *\n * ...\n *\n * ...\n *\n * ...\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n * evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\nclass NgClass {\n constructor(\n // leaving references to differs in place since flex layout is extending NgClass...\n _iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n this._iterableDiffers = _iterableDiffers;\n this._keyValueDiffers = _keyValueDiffers;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n this.initialClasses = EMPTY_ARRAY;\n this.stateMap = new Map();\n }\n set klass(value) {\n this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY;\n }\n set ngClass(value) {\n this.rawClass = typeof value === 'string' ? value.trim().split(WS_REGEXP) : value;\n }\n /*\n The NgClass directive uses the custom change detection algorithm for its inputs. The custom\n algorithm is necessary since inputs are represented as complex object or arrays that need to be\n deeply-compared.\n \n This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance\n might negatively impact runtime performance of the entire change detection cycle. The design of\n this algorithm is making sure that:\n - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when\n needed), even if references to bound objects change;\n - there is no memory allocation if nothing changes (even relatively modest memory allocation\n during the change detection cycle can result in GC pauses for some of the CD cycles).\n \n The algorithm works by iterating over the set of bound classes, staring with [class] binding and\n then going over [ngClass] binding. For each CSS class name:\n - check if it was seen before (this information is tracked in the state map) and if its value\n changed;\n - mark it as \"touched\" - names that are not marked are not present in the latest set of binding\n and we can remove such class name from the internal data structures;\n \n After iteration over all the CSS class names we've got data structure with all the information\n necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush\n changes to the DOM and reset internal data structures so those are ready for the next change\n detection cycle.\n */\n ngDoCheck() {\n // classes from the [class] binding\n for (const klass of this.initialClasses) {\n this._updateState(klass, true);\n }\n // classes from the [ngClass] binding\n const rawClass = this.rawClass;\n if (Array.isArray(rawClass) || rawClass instanceof Set) {\n for (const klass of rawClass) {\n this._updateState(klass, true);\n }\n }\n else if (rawClass != null) {\n for (const klass of Object.keys(rawClass)) {\n this._updateState(klass, Boolean(rawClass[klass]));\n }\n }\n this._applyStateDiff();\n }\n _updateState(klass, nextEnabled) {\n const state = this.stateMap.get(klass);\n if (state !== undefined) {\n if (state.enabled !== nextEnabled) {\n state.changed = true;\n state.enabled = nextEnabled;\n }\n state.touched = true;\n }\n else {\n this.stateMap.set(klass, { enabled: nextEnabled, changed: true, touched: true });\n }\n }\n _applyStateDiff() {\n for (const stateEntry of this.stateMap) {\n const klass = stateEntry[0];\n const state = stateEntry[1];\n if (state.changed) {\n this._toggleClass(klass, state.enabled);\n state.changed = false;\n }\n else if (!state.touched) {\n // A class that was previously active got removed from the new collection of classes -\n // remove from the DOM as well.\n if (state.enabled) {\n this._toggleClass(klass, false);\n }\n this.stateMap.delete(klass);\n }\n state.touched = false;\n }\n }\n _toggleClass(klass, enabled) {\n if (ngDevMode) {\n if (typeof klass !== 'string') {\n throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(klass)}`);\n }\n }\n klass = klass.trim();\n if (klass.length > 0) {\n klass.split(WS_REGEXP).forEach(klass => {\n if (enabled) {\n this._renderer.addClass(this._ngEl.nativeElement, klass);\n }\n else {\n this._renderer.removeClass(this._ngEl.nativeElement, klass);\n }\n });\n }\n }\n}\nNgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgClass, isStandalone: true, selector: \"[ngClass]\", inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgClass, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngClass]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.KeyValueDiffers }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { klass: [{\n type: Input,\n args: ['class']\n }], ngClass: [{\n type: Input,\n args: ['ngClass']\n }] } });\n\n/**\n * Instantiates a {@link Component} type and inserts its Host View into the current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will be destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if it exists.\n *\n * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another\n * module dynamically, then loading a component from that module.\n *\n * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional\n * NgModule factory to allow loading another module dynamically, then loading a component from that\n * module. Use `ngComponentOutletNgModule` instead.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * \n * ```\n *\n * Customized injector/content\n * ```\n * \n * \n * ```\n *\n * Customized NgModule reference\n * ```\n * \n * \n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\nclass NgComponentOutlet {\n constructor(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this.ngComponentOutlet = null;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n const { _viewContainerRef: viewContainerRef, ngComponentOutletNgModule: ngModule, ngComponentOutletNgModuleFactory: ngModuleFactory, } = this;\n viewContainerRef.clear();\n this._componentRef = undefined;\n if (this.ngComponentOutlet) {\n const injector = this.ngComponentOutletInjector || viewContainerRef.parentInjector;\n if (changes['ngComponentOutletNgModule'] || changes['ngComponentOutletNgModuleFactory']) {\n if (this._moduleRef)\n this._moduleRef.destroy();\n if (ngModule) {\n this._moduleRef = createNgModule(ngModule, getParentInjector(injector));\n }\n else if (ngModuleFactory) {\n this._moduleRef = ngModuleFactory.create(getParentInjector(injector));\n }\n else {\n this._moduleRef = undefined;\n }\n }\n this._componentRef = viewContainerRef.createComponent(this.ngComponentOutlet, {\n index: viewContainerRef.length,\n injector,\n ngModuleRef: this._moduleRef,\n projectableNodes: this.ngComponentOutletContent,\n });\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._moduleRef)\n this._moduleRef.destroy();\n }\n}\nNgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgComponentOutlet, isStandalone: true, selector: \"[ngComponentOutlet]\", inputs: { ngComponentOutlet: \"ngComponentOutlet\", ngComponentOutletInjector: \"ngComponentOutletInjector\", ngComponentOutletContent: \"ngComponentOutletContent\", ngComponentOutletNgModule: \"ngComponentOutletNgModule\", ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgComponentOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngComponentOutlet]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngComponentOutlet: [{\n type: Input\n }], ngComponentOutletInjector: [{\n type: Input\n }], ngComponentOutletContent: [{\n type: Input\n }], ngComponentOutletNgModule: [{\n type: Input\n }], ngComponentOutletNgModuleFactory: [{\n type: Input\n }] } });\n// Helper function that returns an Injector instance of a parent NgModule.\nfunction getParentInjector(injector) {\n const parentNgModule = injector.get(NgModuleRef);\n return parentNgModule.injector;\n}\n\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * @publicApi\n */\nclass NgForOfContext {\n constructor($implicit, ngForOf, index, count) {\n this.$implicit = $implicit;\n this.ngForOf = ngForOf;\n this.index = index;\n this.count = count;\n }\n get first() {\n return this.index === 0;\n }\n get last() {\n return this.index === this.count - 1;\n }\n get even() {\n return this.index % 2 === 0;\n }\n get odd() {\n return !this.even;\n }\n}\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#asterisk) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `
  • ` element.\n *\n * ```\n *
  • ...
  • \n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `` element.\n * The content of the `` element is the `
  • ` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * \n *
  • ...
  • \n *
    \n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/structural-directives#one-per-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For further discussion, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n * ```\n *
  • \n * {{i}}/{{users.length}}. {{user}} default\n *
  • \n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgForOf {\n /**\n * The value of the iterable expression, which can be used as a\n * [template input variable](guide/structural-directives#shorthand).\n */\n set ngForOf(ngForOf) {\n this._ngForOf = ngForOf;\n this._ngForOfDirty = true;\n }\n /**\n * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.\n *\n * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object\n * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n * as the key.\n *\n * `NgForOf` uses the computed key to associate items in an iterable with DOM elements\n * it produces for these items.\n *\n * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an\n * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a\n * primary key), and this iterable could be updated with new object instances that still\n * represent the same underlying entity (for example, when data is re-fetched from the server,\n * and the iterable is recreated and re-rendered, but most of the data is still the same).\n *\n * @see `TrackByFunction`\n */\n set ngForTrackBy(fn) {\n if (NG_DEV_MODE && fn != null && typeof fn !== 'function') {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n }\n this._trackByFn = fn;\n }\n get ngForTrackBy() {\n return this._trackByFn;\n }\n constructor(_viewContainer, _template, _differs) {\n this._viewContainer = _viewContainer;\n this._template = _template;\n this._differs = _differs;\n this._ngForOf = null;\n this._ngForOfDirty = true;\n this._differ = null;\n }\n /**\n * A reference to the template that is stamped out for each item in the iterable.\n * @see [template reference variable](guide/template-reference-variables)\n */\n set ngForTemplate(value) {\n // TODO(TS2.1): make TemplateRef>> once we move to TS v2.1\n // The current type is too restrictive; a template that just uses index, for example,\n // should be acceptable.\n if (value) {\n this._template = value;\n }\n }\n /**\n * Applies the changes when needed.\n * @nodoc\n */\n ngDoCheck() {\n if (this._ngForOfDirty) {\n this._ngForOfDirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._ngForOf;\n if (!this._differ && value) {\n if (NG_DEV_MODE) {\n try {\n // CAUTION: this logic is duplicated for production mode below, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n catch {\n let errorMessage = `Cannot find a differ supporting object '${value}' of type '` +\n `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;\n if (typeof value === 'object') {\n errorMessage += ' Did you mean to use the keyvalue pipe?';\n }\n throw new ɵRuntimeError(-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage);\n }\n }\n else {\n // CAUTION: this logic is duplicated for development mode above, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._ngForOf);\n if (changes)\n this._applyChanges(changes);\n }\n }\n _applyChanges(changes) {\n const viewContainer = this._viewContainer;\n changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n if (item.previousIndex == null) {\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n }\n else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n }\n else if (adjustedPreviousIndex !== null) {\n const view = viewContainer.get(adjustedPreviousIndex);\n viewContainer.move(view, currentIndex);\n applyViewChange(view, item);\n }\n });\n for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n const viewRef = viewContainer.get(i);\n const context = viewRef.context;\n context.index = i;\n context.count = ilen;\n context.ngForOf = this._ngForOf;\n }\n changes.forEachIdentityChange((record) => {\n const viewRef = viewContainer.get(record.currentIndex);\n applyViewChange(viewRef, record);\n });\n }\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(dir, ctx) {\n return true;\n }\n}\nNgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nNgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgForOf, isStandalone: true, selector: \"[ngFor][ngForOf]\", inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgForOf, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngFor][ngForOf]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }]; }, propDecorators: { ngForOf: [{\n type: Input\n }], ngForTrackBy: [{\n type: Input\n }], ngForTemplate: [{\n type: Input\n }] } });\nfunction applyViewChange(view, record) {\n view.context.$implicit = record.item;\n}\nfunction getTypeName(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#asterisk) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n *
    Content to render when condition is true.
    \n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n *
    Content to render when condition is\n * true.
    \n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n *
    Content to render when condition is true.
    \n * Content to render when condition is false.\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n *
    \n * Content to render when condition is true.\n * Content to render when condition is false.\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n *
    {{value}}
    \n * Content to render when value is null.\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `` element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * safe-navigation-operator (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n *
    \n * ...\n *
    \n *\n * \n *
    Loading...
    \n *
    \n * ```\n *\n * You can see that the \"else\" clause references the ``\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `` tag.\n *\n * ```\n * \n *
    \n * ...\n *
    \n *
    \n *\n * \n *
    Loading...
    \n *
    \n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgIf {\n constructor(_viewContainer, templateRef) {\n this._viewContainer = _viewContainer;\n this._context = new NgIfContext();\n this._thenTemplateRef = null;\n this._elseTemplateRef = null;\n this._thenViewRef = null;\n this._elseViewRef = null;\n this._thenTemplateRef = templateRef;\n }\n /**\n * The Boolean expression to evaluate as the condition for showing a template.\n */\n set ngIf(condition) {\n this._context.$implicit = this._context.ngIf = condition;\n this._updateView();\n }\n /**\n * A template to show if the condition expression evaluates to true.\n */\n set ngIfThen(templateRef) {\n assertTemplate('ngIfThen', templateRef);\n this._thenTemplateRef = templateRef;\n this._thenViewRef = null; // clear previous view if any.\n this._updateView();\n }\n /**\n * A template to show if the condition expression evaluates to false.\n */\n set ngIfElse(templateRef) {\n assertTemplate('ngIfElse', templateRef);\n this._elseTemplateRef = templateRef;\n this._elseViewRef = null; // clear previous view if any.\n this._updateView();\n }\n _updateView() {\n if (this._context.$implicit) {\n if (!this._thenViewRef) {\n this._viewContainer.clear();\n this._elseViewRef = null;\n if (this._thenTemplateRef) {\n this._thenViewRef =\n this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n }\n }\n }\n else {\n if (!this._elseViewRef) {\n this._viewContainer.clear();\n this._thenViewRef = null;\n if (this._elseTemplateRef) {\n this._elseViewRef =\n this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n }\n }\n }\n }\n /**\n * Asserts the correct type of the context for the template that `NgIf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgIf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(dir, ctx) {\n return true;\n }\n}\nNgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgIf, isStandalone: true, selector: \"[ngIf]\", inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgIf, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngIf]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { ngIf: [{\n type: Input\n }], ngIfThen: [{\n type: Input\n }], ngIfElse: [{\n type: Input\n }] } });\n/**\n * @publicApi\n */\nclass NgIfContext {\n constructor() {\n this.$implicit = null;\n this.ngIf = null;\n }\n}\nfunction assertTemplate(property, templateRef) {\n const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n if (!isTemplateRefOrNull) {\n throw new Error(`${property} must be a TemplateRef, but received '${ɵstringify(templateRef)}'.`);\n }\n}\n\nclass SwitchView {\n constructor(_viewContainerRef, _templateRef) {\n this._viewContainerRef = _viewContainerRef;\n this._templateRef = _templateRef;\n this._created = false;\n }\n create() {\n this._created = true;\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n }\n destroy() {\n this._created = false;\n this._viewContainerRef.clear();\n }\n enforceState(created) {\n if (created && !this._created) {\n this.create();\n }\n else if (!created && this._created) {\n this.destroy();\n }\n }\n}\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * \n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * \n * \n * ...\n * ...\n * ...\n * \n * ...\n * \n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * \n * ...\n * ...\n * ...\n * \n * \n * \n * \n * \n * ...\n * \n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\nclass NgSwitch {\n constructor() {\n this._defaultViews = [];\n this._defaultUsed = false;\n this._caseCount = 0;\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n set ngSwitch(newValue) {\n this._ngSwitch = newValue;\n if (this._caseCount === 0) {\n this._updateDefaultCases(true);\n }\n }\n /** @internal */\n _addCase() {\n return this._caseCount++;\n }\n /** @internal */\n _addDefault(view) {\n this._defaultViews.push(view);\n }\n /** @internal */\n _matchCase(value) {\n const matched = value == this._ngSwitch;\n this._lastCasesMatched = this._lastCasesMatched || matched;\n this._lastCaseCheckIndex++;\n if (this._lastCaseCheckIndex === this._caseCount) {\n this._updateDefaultCases(!this._lastCasesMatched);\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n return matched;\n }\n _updateDefaultCases(useDefault) {\n if (this._defaultViews.length > 0 && useDefault !== this._defaultUsed) {\n this._defaultUsed = useDefault;\n for (const defaultView of this._defaultViews) {\n defaultView.enforceState(useDefault);\n }\n }\n }\n}\nNgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgSwitch, isStandalone: true, selector: \"[ngSwitch]\", inputs: { ngSwitch: \"ngSwitch\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitch, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitch]',\n standalone: true,\n }]\n }], propDecorators: { ngSwitch: [{\n type: Input\n }] } });\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\nclass NgSwitchCase {\n constructor(viewContainer, templateRef, ngSwitch) {\n this.ngSwitch = ngSwitch;\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');\n }\n ngSwitch._addCase();\n this._view = new SwitchView(viewContainer, templateRef);\n }\n /**\n * Performs case matching. For internal use only.\n * @nodoc\n */\n ngDoCheck() {\n this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n }\n}\nNgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgSwitchCase, isStandalone: true, selector: \"[ngSwitchCase]\", inputs: { ngSwitchCase: \"ngSwitchCase\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitchCase, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitchCase]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngSwitchCase: [{\n type: Input\n }] } });\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\nclass NgSwitchDefault {\n constructor(viewContainer, templateRef, ngSwitch) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');\n }\n ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n }\n}\nNgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgSwitchDefault, isStandalone: true, selector: \"[ngSwitchDefault]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSwitchDefault, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitchDefault]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; } });\nfunction throwNgSwitchProviderNotFoundError(attrName, directiveName) {\n throw new ɵRuntimeError(2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `An element with the \"${attrName}\" attribute ` +\n `(matching the \"${directiveName}\" directive) must be located inside an element with the \"ngSwitch\" attribute ` +\n `(matching \"NgSwitch\" directive)`);\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * \n * there is nothing\n * there is one\n * there are a few\n * \n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n * matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n * value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\nclass NgPlural {\n constructor(_localization) {\n this._localization = _localization;\n this._caseViews = {};\n }\n set ngPlural(value) {\n this._updateView(value);\n }\n addCase(value, switchView) {\n this._caseViews[value] = switchView;\n }\n _updateView(switchValue) {\n this._clearViews();\n const cases = Object.keys(this._caseViews);\n const key = getPluralCategory(switchValue, cases, this._localization);\n this._activateView(this._caseViews[key]);\n }\n _clearViews() {\n if (this._activeView)\n this._activeView.destroy();\n }\n _activateView(view) {\n if (view) {\n this._activeView = view;\n this._activeView.create();\n }\n }\n}\nNgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });\nNgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgPlural, isStandalone: true, selector: \"[ngPlural]\", inputs: { ngPlural: \"ngPlural\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgPlural, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngPlural]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: NgLocalization }]; }, propDecorators: { ngPlural: [{\n type: Input\n }] } });\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * \n * ...\n * ...\n * \n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\nclass NgPluralCase {\n constructor(value, template, viewContainer, ngPlural) {\n this.value = value;\n const isANumber = !isNaN(Number(value));\n ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n }\n}\nNgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgPluralCase, isStandalone: true, selector: \"[ngPluralCase]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgPluralCase, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngPluralCase]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['ngPluralCase']\n }] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: NgPlural, decorators: [{\n type: Host\n }] }]; } });\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * ...\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * ...\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * ...\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\nclass NgStyle {\n constructor(_ngEl, _differs, _renderer) {\n this._ngEl = _ngEl;\n this._differs = _differs;\n this._renderer = _renderer;\n this._ngStyle = null;\n this._differ = null;\n }\n set ngStyle(values) {\n this._ngStyle = values;\n if (!this._differ && values) {\n this._differ = this._differs.find(values).create();\n }\n }\n ngDoCheck() {\n if (this._differ) {\n const changes = this._differ.diff(this._ngStyle);\n if (changes) {\n this._applyChanges(changes);\n }\n }\n }\n _setStyle(nameAndUnit, value) {\n const [name, unit] = nameAndUnit.split('.');\n const flags = name.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n if (value != null) {\n this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);\n }\n else {\n this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);\n }\n }\n _applyChanges(changes) {\n changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\n }\n}\nNgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgStyle, isStandalone: true, selector: \"[ngStyle]\", inputs: { ngStyle: \"ngStyle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgStyle, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngStyle]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.KeyValueDiffers }, { type: i0.Renderer2 }]; }, propDecorators: { ngStyle: [{\n type: Input,\n args: ['ngStyle']\n }] } });\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * \n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\nclass NgTemplateOutlet {\n constructor(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this._viewRef = null;\n /**\n * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n * object, the object's keys will be available for binding by the local template `let`\n * declarations.\n * Using the key `$implicit` in the context object will set its value as default.\n */\n this.ngTemplateOutletContext = null;\n /**\n * A string defining the template reference and optionally the context object for the template.\n */\n this.ngTemplateOutlet = null;\n /** Injector to be used within the embedded view. */\n this.ngTemplateOutletInjector = null;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['ngTemplateOutlet'] || changes['ngTemplateOutletInjector']) {\n const viewContainerRef = this._viewContainerRef;\n if (this._viewRef) {\n viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n }\n if (this.ngTemplateOutlet) {\n const { ngTemplateOutlet: template, ngTemplateOutletContext: context, ngTemplateOutletInjector: injector } = this;\n this._viewRef = viewContainerRef.createEmbeddedView(template, context, injector ? { injector } : undefined);\n }\n else {\n this._viewRef = null;\n }\n }\n else if (this._viewRef && changes['ngTemplateOutletContext'] && this.ngTemplateOutletContext) {\n this._viewRef.context = this.ngTemplateOutletContext;\n }\n }\n}\nNgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgTemplateOutlet, isStandalone: true, selector: \"[ngTemplateOutlet]\", inputs: { ngTemplateOutletContext: \"ngTemplateOutletContext\", ngTemplateOutlet: \"ngTemplateOutlet\", ngTemplateOutletInjector: \"ngTemplateOutletInjector\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgTemplateOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngTemplateOutlet]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngTemplateOutletContext: [{\n type: Input\n }], ngTemplateOutlet: [{\n type: Input\n }], ngTemplateOutletInjector: [{\n type: Input\n }] } });\n\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nconst COMMON_DIRECTIVES = [\n NgClass,\n NgComponentOutlet,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n NgStyle,\n NgSwitch,\n NgSwitchCase,\n NgSwitchDefault,\n NgPlural,\n NgPluralCase,\n];\n\nfunction invalidPipeArgumentError(type, value) {\n return new ɵRuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${ɵstringify(type)}'`);\n}\n\nclass SubscribableStrategy {\n createSubscription(async, updateLatestValue) {\n return async.subscribe({\n next: updateLatestValue,\n error: (e) => {\n throw e;\n }\n });\n }\n dispose(subscription) {\n subscription.unsubscribe();\n }\n}\nclass PromiseStrategy {\n createSubscription(async, updateLatestValue) {\n return async.then(updateLatestValue, e => {\n throw e;\n });\n }\n dispose(subscription) { }\n}\nconst _promiseStrategy = new PromiseStrategy();\nconst _subscribableStrategy = new SubscribableStrategy();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks. When the reference of the expression changes, the `async` pipe\n * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\nclass AsyncPipe {\n constructor(ref) {\n this._latestValue = null;\n this._subscription = null;\n this._obj = null;\n this._strategy = null;\n // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor\n // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.\n this._ref = ref;\n }\n ngOnDestroy() {\n if (this._subscription) {\n this._dispose();\n }\n // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate\n // potential memory leaks in Observables that could otherwise cause the view data to\n // be retained.\n // https://github.com/angular/angular/issues/17624\n this._ref = null;\n }\n transform(obj) {\n if (!this._obj) {\n if (obj) {\n this._subscribe(obj);\n }\n return this._latestValue;\n }\n if (obj !== this._obj) {\n this._dispose();\n return this.transform(obj);\n }\n return this._latestValue;\n }\n _subscribe(obj) {\n this._obj = obj;\n this._strategy = this._selectStrategy(obj);\n this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value));\n }\n _selectStrategy(obj) {\n if (ɵisPromise(obj)) {\n return _promiseStrategy;\n }\n if (ɵisSubscribable(obj)) {\n return _subscribableStrategy;\n }\n throw invalidPipeArgumentError(AsyncPipe, obj);\n }\n _dispose() {\n // Note: `dispose` is only called if a subscription has been initialized before, indicating\n // that `this._strategy` is also available.\n this._strategy.dispose(this._subscription);\n this._latestValue = null;\n this._subscription = null;\n this._obj = null;\n }\n _updateLatestValue(async, value) {\n if (async === this._obj) {\n this._latestValue = value;\n // Note: `this._ref` is only cleared in `ngOnDestroy` so is known to be available when a\n // value is being updated.\n this._ref.markForCheck();\n }\n }\n}\nAsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\nAsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: AsyncPipe, isStandalone: true, name: \"async\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AsyncPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'async',\n pure: false,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });\n\n/**\n * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * \n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass LowerCasePipe {\n transform(value) {\n if (value == null)\n return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(LowerCasePipe, value);\n }\n return value.toLowerCase();\n }\n}\nLowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nLowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: \"lowercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LowerCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'lowercase',\n standalone: true,\n }]\n }] });\n//\n// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result\n// can be achieved by using /[0-9\\p{L}]\\S*/gu and also known as Unicode Property Escapes\n// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1\n//\nconst unicodeWordMatch = /(?:[0-9A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06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\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD837[\\uDF00-\\uDF1E]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDE90-\\uDEAD\\uDEC0-\\uDEEB]|\\uD839[\\uDFE0-\\uDFE6\\uDFE8-\\uDFEB\\uDFED\\uDFEE\\uDFF0-\\uDFFE]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF38\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])\\S*/g;\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * \n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass TitleCasePipe {\n transform(value) {\n if (value == null)\n return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(TitleCasePipe, value);\n }\n return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));\n }\n}\nTitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nTitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: \"titlecase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'titlecase',\n standalone: true,\n }]\n }] });\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass UpperCasePipe {\n transform(value) {\n if (value == null)\n return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(UpperCasePipe, value);\n }\n return value.toUpperCase();\n }\n}\nUpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nUpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: \"uppercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UpperCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'uppercase',\n standalone: true,\n }]\n }] });\n\n/**\n * The default date format of Angular date pipe, which corresponds to the following format:\n * `'MMM d,y'` (e.g. `Jun 15, 2015`)\n */\nconst DEFAULT_DATE_FORMAT = 'mediumDate';\n\n/**\n * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).\n * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.\n *\n * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe\n */\nconst DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');\n/**\n * DI token that allows to provide default configuration for the `DatePipe` instances in an\n * application. The value is an object which can include the following fields:\n * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`\n * will use the 'mediumDate' as a value.\n * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will\n * use the end-user's local system timezone.\n *\n * @see `DatePipeConfig`\n *\n * @usageNotes\n *\n * Various date pipe default values can be overwritten by providing this token with\n * the value that has this interface.\n *\n * For example:\n *\n * Override the default date format by providing a value using the token:\n * ```typescript\n * providers: [\n * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}\n * ]\n * ```\n *\n * Override the default timezone by providing a value using the token:\n * ```typescript\n * providers: [\n * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}\n * ]\n * ```\n */\nconst DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');\n// clang-format off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * `DatePipe` is executed only when it detects a pure change to the input value.\n * A pure change is either a change to a primitive input value\n * (such as `String`, `Number`, `Boolean`, or `Symbol`),\n * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).\n *\n * Note that mutating a `Date` object does not cause the pipe to be rendered again.\n * To ensure that the pipe is executed, you must create a new `Date` object.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n-common-format-data-locale) for more information.\n *\n * The time zone of the formatted value can be specified either by passing it in as the second\n * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_OPTIONS`\n * injection token. The value that is passed in as the second parameter takes precedence over\n * the one defined using the injection token.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * | Option | Equivalent to | Examples (given in `en-US` locale) |\n * |---------------|-------------------------------------|-------------------------------------------------|\n * | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` |\n * | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` |\n * | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` |\n * | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |\n * | `'shortDate'` | `'M/d/yy'` | `6/15/15` |\n * | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` |\n * | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` |\n * | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` |\n * | `'shortTime'` | `'h:mm a'` | `9:03 AM` |\n * | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` |\n * | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` |\n * | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` |\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n * | Field type | Format | Description | Example Value |\n * |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|\n * | Era | G, GG & GGG | Abbreviated | AD |\n * | | GGGG | Wide | Anno Domini |\n * | | GGGGG | Narrow | A |\n * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |\n * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |\n * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |\n * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |\n * | Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |\n * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |\n * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |\n * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |\n * | Month | M | Numeric: 1 digit | 9, 12 |\n * | | MM | Numeric: 2 digits + zero padded | 09, 12 |\n * | | MMM | Abbreviated | Sep |\n * | | MMMM | Wide | September |\n * | | MMMMM | Narrow | S |\n * | Month standalone | L | Numeric: 1 digit | 9, 12 |\n * | | LL | Numeric: 2 digits + zero padded | 09, 12 |\n * | | LLL | Abbreviated | Sep |\n * | | LLLL | Wide | September |\n * | | LLLLL | Narrow | S |\n * | Week of year | w | Numeric: minimum digits | 1... 53 |\n * | | ww | Numeric: 2 digits + zero padded | 01... 53 |\n * | Week of month | W | Numeric: 1 digit | 1... 5 |\n * | Day of month | d | Numeric: minimum digits | 1 |\n * | | dd | Numeric: 2 digits + zero padded | 01 |\n * | Week day | E, EE & EEE | Abbreviated | Tue |\n * | | EEEE | Wide | Tuesday |\n * | | EEEEE | Narrow | T |\n * | | EEEEEE | Short | Tu |\n * | Week day standalone | c, cc | Numeric: 1 digit | 2 |\n * | | ccc | Abbreviated | Tue |\n * | | cccc | Wide | Tuesday |\n * | | ccccc | Narrow | T |\n * | | cccccc | Short | Tu |\n * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |\n * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |\n * | | aaaaa | Narrow | a/p |\n * | Period* | B, BB & BBB | Abbreviated | mid. |\n * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | BBBBB | Narrow | md |\n * | Period standalone* | b, bb & bbb | Abbreviated | mid. |\n * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | bbbbb | Narrow | md |\n * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |\n * | | hh | Numeric: 2 digits + zero padded | 01, 12 |\n * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |\n * | | HH | Numeric: 2 digits + zero padded | 00, 23 |\n * | Minute | m | Numeric: minimum digits | 8, 59 |\n * | | mm | Numeric: 2 digits + zero padded | 08, 59 |\n * | Second | s | Numeric: minimum digits | 0... 59 |\n * | | ss | Numeric: 2 digits + zero padded | 00... 59 |\n * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |\n * | | SS | Numeric: 2 digits + zero padded | 00... 99 |\n * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |\n * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |\n * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |\n * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |\n * | | ZZZZ | Long localized GMT format | GMT-8:00 |\n * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |\n * | | O, OO & OOO | Short localized GMT format | GMT-8 |\n * | | OOOO | Long localized GMT format | GMT-08:00 |\n *\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }} // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }} // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }} // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n * selector: 'date-pipe',\n * template: `
    \n *

    Today is {{today | date}}

    \n *

    Or if you prefer, {{today | date:'fullDate'}}

    \n *

    The time is {{today | date:'h:mm a z'}}

    \n *
    `\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n * today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\nclass DatePipe {\n constructor(locale, defaultTimezone, defaultOptions) {\n this.locale = locale;\n this.defaultTimezone = defaultTimezone;\n this.defaultOptions = defaultOptions;\n }\n transform(value, format, timezone, locale) {\n if (value == null || value === '' || value !== value)\n return null;\n try {\n const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT;\n const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined;\n return formatDate(value, _format, locale || this.locale, _timezone);\n }\n catch (error) {\n throw invalidPipeArgumentError(DatePipe, error.message);\n }\n }\n}\nDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });\nDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: DatePipe, isStandalone: true, name: \"date\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DatePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'date',\n pure: true,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DATE_PIPE_DEFAULT_TIMEZONE]\n }, {\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DATE_PIPE_DEFAULT_OPTIONS]\n }, {\n type: Optional\n }] }]; } });\n\nconst _INTERPOLATION_REGEXP = /#/g;\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\nclass I18nPluralPipe {\n constructor(_localization) {\n this._localization = _localization;\n }\n /**\n * @param value the number to be formatted\n * @param pluralMap an object that mimics the ICU format, see\n * https://unicode-org.github.io/icu/userguide/format_parse/messages/.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n transform(value, pluralMap, locale) {\n if (value == null)\n return '';\n if (typeof pluralMap !== 'object' || pluralMap === null) {\n throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n }\n const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n }\n}\nI18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });\nI18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: \"i18nPlural\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nPluralPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nPlural',\n pure: true,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: NgLocalization }]; } });\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\nclass I18nSelectPipe {\n /**\n * @param value a string to be internationalized.\n * @param mapping an object that indicates the text that should be displayed\n * for different values of the provided `value`.\n */\n transform(value, mapping) {\n if (value == null)\n return '';\n if (typeof mapping !== 'object' || typeof value !== 'string') {\n throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n }\n if (mapping.hasOwnProperty(value)) {\n return mapping[value];\n }\n if (mapping.hasOwnProperty('other')) {\n return mapping['other'];\n }\n return '';\n }\n}\nI18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nI18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: \"i18nSelect\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: I18nSelectPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nSelect',\n pure: true,\n standalone: true,\n }]\n }] });\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation. Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\nclass JsonPipe {\n /**\n * @param value A value of any type to convert into a JSON-format string.\n */\n transform(value) {\n return JSON.stringify(value, null, 2);\n }\n}\nJsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nJsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonPipe, isStandalone: true, name: \"json\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'json',\n pure: false,\n standalone: true,\n }]\n }] });\n\nfunction makeKeyValuePair(key, value) {\n return { key: key, value: value };\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\nclass KeyValuePipe {\n constructor(differs) {\n this.differs = differs;\n this.keyValues = [];\n this.compareFn = defaultComparator;\n }\n transform(input, compareFn = defaultComparator) {\n if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n return null;\n }\n if (!this.differ) {\n // make a differ for whatever type we've been passed in\n this.differ = this.differs.find(input).create();\n }\n const differChanges = this.differ.diff(input);\n const compareFnChanged = compareFn !== this.compareFn;\n if (differChanges) {\n this.keyValues = [];\n differChanges.forEachItem((r) => {\n this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n });\n }\n if (differChanges || compareFnChanged) {\n this.keyValues.sort(compareFn);\n this.compareFn = compareFn;\n }\n return this.keyValues;\n }\n}\nKeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });\nKeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: \"keyvalue\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyValuePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'keyvalue',\n pure: false,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }]; } });\nfunction defaultComparator(keyValueA, keyValueB) {\n const a = keyValueA.key;\n const b = keyValueB.key;\n // if same exit with 0;\n if (a === b)\n return 0;\n // make sure that undefined are at the end of the sort.\n if (a === undefined)\n return 1;\n if (b === undefined)\n return -1;\n // make sure that nulls are at the end of the sort.\n if (a === null)\n return 1;\n if (b === null)\n return -1;\n if (typeof a == 'string' && typeof b == 'string') {\n return a < b ? -1 : 1;\n }\n if (typeof a == 'number' && typeof b == 'number') {\n return a - b;\n }\n if (typeof a == 'boolean' && typeof b == 'boolean') {\n return a < b ? -1 : 1;\n }\n // `a` and `b` are of different types. Compare their string values.\n const aString = String(a);\n const bString = String(b);\n return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a value according to digit options and locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n *\n * ### digitsInfo\n *\n * The value's decimal representation is specified by the `digitsInfo`\n * parameter, written in the following format:
    \n *\n * ```\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}\n * ```\n *\n * - `minIntegerDigits`:\n * The minimum number of integer digits before the decimal point.\n * Default is 1.\n *\n * - `minFractionDigits`:\n * The minimum number of digits after the decimal point.\n * Default is 0.\n *\n * - `maxFractionDigits`:\n * The maximum number of digits after the decimal point.\n * Default is 3.\n *\n * If the formatted value is truncated it will be rounded using the \"to-nearest\" method:\n *\n * ```\n * {{3.6 | number: '1.0-0'}}\n * \n *\n * {{-3.6 | number:'1.0-0'}}\n * \n * ```\n *\n * ### locale\n *\n * `locale` will format a value according to locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n *\n * See [Setting your app locale](guide/i18n-common-locale-id).\n *\n * ### Example\n *\n * The following code shows how the pipe transforms values\n * according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * \n *\n * @publicApi\n */\nclass DecimalPipe {\n constructor(_locale) {\n this._locale = _locale;\n }\n /**\n * @param value The value to be formatted.\n * @param digitsInfo Sets digit and decimal representation.\n * [See more](#digitsinfo).\n * @param locale Specifies what locale format rules to use.\n * [See more](#locale).\n */\n transform(value, digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n try {\n const num = strToNumber(value);\n return formatNumber(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(DecimalPipe, error.message);\n }\n }\n}\nDecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: DecimalPipe, isStandalone: true, name: \"number\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DecimalPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'number',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * \n *\n * @publicApi\n */\nclass PercentPipe {\n constructor(_locale) {\n this._locale = _locale;\n }\n /**\n *\n * @param value The number to be formatted as a percentage.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:
    \n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `0`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n try {\n const num = strToNumber(value);\n return formatPercent(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(PercentPipe, error.message);\n }\n }\n}\nPercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: PercentPipe, isStandalone: true, name: \"percent\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PercentPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'percent',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * \n *\n * @publicApi\n */\nclass CurrencyPipe {\n constructor(_locale, _defaultCurrencyCode = 'USD') {\n this._locale = _locale;\n this._defaultCurrencyCode = _defaultCurrencyCode;\n }\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:
    \n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n if (!isValue(value))\n return null;\n locale = locale || this._locale;\n if (typeof display === 'boolean') {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n 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\".`);\n }\n display = display ? 'symbol' : 'code';\n }\n let currency = currencyCode || this._defaultCurrencyCode;\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n }\n else {\n currency = display;\n }\n }\n try {\n const num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe, error.message);\n }\n }\n}\nCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });\nCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: \"currency\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CurrencyPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'currency',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DEFAULT_CURRENCY_CODE]\n }] }]; } });\nfunction isValue(value) {\n return !(value == null || value === '' || value !== value);\n}\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value) {\n // Convert strings to numbers\n if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n return Number(value);\n }\n if (typeof value !== 'number') {\n throw new Error(`${value} is not a number`);\n }\n return value;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n *
  • b
  • \n *
  • c
  • \n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\nclass SlicePipe {\n transform(value, start, end) {\n if (value == null)\n return null;\n if (!this.supports(value)) {\n throw invalidPipeArgumentError(SlicePipe, value);\n }\n return value.slice(start, end);\n }\n supports(obj) {\n return typeof obj === 'string' || Array.isArray(obj);\n }\n}\nSlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nSlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: SlicePipe, isStandalone: true, name: \"slice\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SlicePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'slice',\n pure: false,\n standalone: true,\n }]\n }] });\n\n/**\n * @module\n * @description\n * This module provides a set of common Pipes.\n */\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nconst COMMON_PIPES = [\n AsyncPipe,\n UpperCasePipe,\n LowerCasePipe,\n JsonPipe,\n SlicePipe,\n DecimalPipe,\n PercentPipe,\n TitleCasePipe,\n CurrencyPipe,\n DatePipe,\n I18nPluralPipe,\n I18nSelectPipe,\n KeyValuePipe,\n];\n\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\nclass CommonModule {\n}\nCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });\nCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CommonModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CommonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n }]\n }] });\n\nconst PLATFORM_BROWSER_ID = 'browser';\nconst PLATFORM_SERVER_ID = 'server';\nconst PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nconst PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nfunction isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nfunction isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nfunction isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nfunction isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_ID;\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\n\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nclass ViewportScroller {\n}\n// De-sugared tree-shakable injection\n// See #23917\n/** @nocollapse */\nViewportScroller.ɵprov = ɵɵdefineInjectable({\n token: ViewportScroller,\n providedIn: 'root',\n factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window)\n});\n/**\n * Manages the scroll position for a browser window.\n */\nclass BrowserViewportScroller {\n constructor(document, window) {\n this.document = document;\n this.window = window;\n this.offset = () => [0, 0];\n }\n /**\n * Configures the top offset used when scrolling to an anchor.\n * @param offset A position in screen coordinates (a tuple with x and y values)\n * or a function that returns the top offset position.\n *\n */\n setOffset(offset) {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n }\n else {\n this.offset = offset;\n }\n }\n /**\n * Retrieves the current scroll position.\n * @returns The position in screen coordinates.\n */\n getScrollPosition() {\n if (this.supportsScrolling()) {\n return [this.window.pageXOffset, this.window.pageYOffset];\n }\n else {\n return [0, 0];\n }\n }\n /**\n * Sets the scroll position.\n * @param position The new position in screen coordinates.\n */\n scrollToPosition(position) {\n if (this.supportsScrolling()) {\n this.window.scrollTo(position[0], position[1]);\n }\n }\n /**\n * Scrolls to an element and attempts to focus the element.\n *\n * Note that the function name here is misleading in that the target string may be an ID for a\n * non-anchor element.\n *\n * @param target The ID of an element or name of the anchor.\n *\n * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document\n * @see https://html.spec.whatwg.org/#scroll-to-fragid\n */\n scrollToAnchor(target) {\n if (!this.supportsScrolling()) {\n return;\n }\n const elSelected = findAnchorFromDocument(this.document, target);\n if (elSelected) {\n this.scrollToElement(elSelected);\n // After scrolling to the element, the spec dictates that we follow the focus steps for the\n // target. Rather than following the robust steps, simply attempt focus.\n //\n // @see https://html.spec.whatwg.org/#get-the-focusable-area\n // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus\n // @see https://html.spec.whatwg.org/#focusable-area\n elSelected.focus();\n }\n }\n /**\n * Disables automatic scroll restoration provided by the browser.\n */\n setHistoryScrollRestoration(scrollRestoration) {\n if (this.supportScrollRestoration()) {\n const history = this.window.history;\n if (history && history.scrollRestoration) {\n history.scrollRestoration = scrollRestoration;\n }\n }\n }\n /**\n * Scrolls to an element using the native offset and the specified offset set on this scroller.\n *\n * The offset can be used when we know that there is a floating header and scrolling naively to an\n * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.\n */\n scrollToElement(el) {\n const rect = el.getBoundingClientRect();\n const left = rect.left + this.window.pageXOffset;\n const top = rect.top + this.window.pageYOffset;\n const offset = this.offset();\n this.window.scrollTo(left - offset[0], top - offset[1]);\n }\n /**\n * We only support scroll restoration when we can get a hold of window.\n * This means that we do not support this behavior when running in a web worker.\n *\n * Lifting this restriction right now would require more changes in the dom adapter.\n * Since webworkers aren't widely used, we will lift it once RouterScroller is\n * battle-tested.\n */\n supportScrollRestoration() {\n try {\n if (!this.supportsScrolling()) {\n return false;\n }\n // The `scrollRestoration` property could be on the `history` instance or its prototype.\n const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) ||\n getScrollRestorationProperty(Object.getPrototypeOf(this.window.history));\n // We can write to the `scrollRestoration` property if it is a writable data field or it has a\n // setter function.\n return !!scrollRestorationDescriptor &&\n !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);\n }\n catch {\n return false;\n }\n }\n supportsScrolling() {\n try {\n return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;\n }\n catch {\n return false;\n }\n }\n}\nfunction getScrollRestorationProperty(obj) {\n return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');\n}\nfunction findAnchorFromDocument(document, target) {\n const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];\n if (documentResult) {\n return documentResult;\n }\n // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we\n // have to traverse the DOM manually and do the lookup through the shadow roots.\n if (typeof document.createTreeWalker === 'function' && document.body &&\n (document.body.createShadowRoot || document.body.attachShadow)) {\n const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);\n let currentNode = treeWalker.currentNode;\n while (currentNode) {\n const shadowRoot = currentNode.shadowRoot;\n if (shadowRoot) {\n // Note that `ShadowRoot` doesn't support `getElementsByName`\n // so we have to fall back to `querySelector`.\n const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name=\"${target}\"]`);\n if (result) {\n return result;\n }\n }\n currentNode = treeWalker.nextNode();\n }\n }\n return null;\n}\n/**\n * Provides an empty implementation of the viewport scroller.\n */\nclass NullViewportScroller {\n /**\n * Empty implementation\n */\n setOffset(offset) { }\n /**\n * Empty implementation\n */\n getScrollPosition() {\n return [0, 0];\n }\n /**\n * Empty implementation\n */\n scrollToPosition(position) { }\n /**\n * Empty implementation\n */\n scrollToAnchor(anchor) { }\n /**\n * Empty implementation\n */\n setHistoryScrollRestoration(scrollRestoration) { }\n}\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nclass XhrFactory {\n}\n\n// Converts a string that represents a URL into a URL class instance.\nfunction getUrl(src, win) {\n // Don't use a base URL is the URL is absolute.\n return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);\n}\n// Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).\nfunction isAbsoluteUrl(src) {\n return /^https?:\\/\\//.test(src);\n}\n// Given a URL, extract the hostname part.\n// If a URL is a relative one - the URL is returned as is.\nfunction extractHostname(url) {\n return isAbsoluteUrl(url) ? (new URL(url)).hostname : url;\n}\nfunction isValidPath(path) {\n const isString = typeof path === 'string';\n if (!isString || path.trim() === '') {\n return false;\n }\n // Calling new URL() will throw if the path string is malformed\n try {\n const url = new URL(path);\n return true;\n }\n catch {\n return false;\n }\n}\nfunction normalizePath(path) {\n return path.endsWith('/') ? path.slice(0, -1) : path;\n}\nfunction normalizeSrc(src) {\n return src.startsWith('/') ? src.slice(1) : src;\n}\n\n/**\n * Noop image loader that does no transformation to the original src and just returns it as is.\n * This loader is used as a default one if more specific logic is not provided in an app config.\n *\n * @see `ImageLoader`\n * @see `NgOptimizedImage`\n */\nconst noopImageLoader = (config) => config.src;\n/**\n * Injection token that configures the image loader function.\n *\n * @see `ImageLoader`\n * @see `NgOptimizedImage`\n * @publicApi\n */\nconst IMAGE_LOADER = new InjectionToken('ImageLoader', {\n providedIn: 'root',\n factory: () => noopImageLoader,\n});\n/**\n * Internal helper function that makes it easier to introduce custom image loaders for the\n * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI\n * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI\n * tokens managing preconnect check functionality.\n * @param buildUrlFn a function returning a full URL based on loader's configuration\n * @param exampleUrls example of full URLs for a given loader (used in error messages)\n * @returns a set of DI providers corresponding to the configured image loader\n */\nfunction createImageLoader(buildUrlFn, exampleUrls) {\n return function provideImageLoader(path) {\n if (!isValidPath(path)) {\n throwInvalidPathError(path, exampleUrls || []);\n }\n // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in\n // the individual loader functions.\n path = normalizePath(path);\n const loaderFn = (config) => {\n if (isAbsoluteUrl(config.src)) {\n // Image loader functions expect an image file name (e.g. `my-image.png`)\n // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,\n // so the final absolute URL can be constructed.\n // When an absolute URL is provided instead - the loader can not\n // build a final URL, thus the error is thrown to indicate that.\n throwUnexpectedAbsoluteUrlError(path, config.src);\n }\n return buildUrlFn(path, { ...config, src: normalizeSrc(config.src) });\n };\n const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];\n return providers;\n };\n}\nfunction throwInvalidPathError(path, exampleUrls) {\n throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n `Image loader has detected an invalid path (\\`${path}\\`). ` +\n `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);\n}\nfunction throwUnexpectedAbsoluteUrlError(path, url) {\n throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n `Image loader has detected a \\`\\` tag with an invalid \\`ngSrc\\` attribute: ${url}. ` +\n `This image loader expects \\`ngSrc\\` to be a relative URL - ` +\n `however the provided value is an absolute URL. ` +\n `To fix this, provide \\`ngSrc\\` as a path relative to the base URL ` +\n `configured for this loader (\\`${path}\\`).`);\n}\n\n/**\n * Function that generates an ImageLoader for [Cloudflare Image\n * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular\n * provider. Note: Cloudflare has multiple image products - this provider is specifically for\n * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.\n *\n * @param path Your domain name, e.g. https://mysite.com\n * @returns Provider that provides an ImageLoader function\n *\n * @publicApi\n */\nconst provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https:///cdn-cgi/image//'] : undefined);\nfunction createCloudflareUrl(path, config) {\n let params = `format=auto`;\n if (config.width) {\n params += `,width=${config.width}`;\n }\n // Cloudflare image URLs format:\n // https://developers.cloudflare.com/images/image-resizing/url-format/\n return `${path}/cdn-cgi/image/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for Cloudinary.\n */\nconst cloudinaryLoaderInfo = {\n name: 'Cloudinary',\n testUrl: isCloudinaryUrl\n};\nconst CLOUDINARY_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.cloudinary\\.com\\/.+/;\n/**\n * Tests whether a URL is from Cloudinary CDN.\n */\nfunction isCloudinaryUrl(url) {\n return CLOUDINARY_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.\n *\n * @param path Base URL of your Cloudinary images\n * This URL should match one of the following formats:\n * https://res.cloudinary.com/mysite\n * https://mysite.cloudinary.com\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the Cloudinary loader.\n *\n * @publicApi\n */\nconst provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?\n [\n 'https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com',\n 'https://subdomain.mysite.com'\n ] :\n undefined);\nfunction createCloudinaryUrl(path, config) {\n // Cloudinary image URLformat:\n // https://cloudinary.com/documentation/image_transformations#transformation_url_structure\n // Example of a Cloudinary image URL:\n // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png\n let params = `f_auto,q_auto`; // sets image format and quality to \"auto\"\n if (config.width) {\n params += `,w_${config.width}`;\n }\n return `${path}/image/upload/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for ImageKit.\n */\nconst imageKitLoaderInfo = {\n name: 'ImageKit',\n testUrl: isImageKitUrl,\n};\nconst IMAGE_KIT_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imagekit\\.io\\/.+/;\n/**\n * Tests whether a URL is from ImageKit CDN.\n */\nfunction isImageKitUrl(url) {\n return IMAGE_KIT_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.\n *\n * @param path Base URL of your ImageKit images\n * This URL should match one of the following formats:\n * https://ik.imagekit.io/myaccount\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the ImageKit loader.\n *\n * @publicApi\n */\nconst provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);\nfunction createImagekitUrl(path, config) {\n // Example of an ImageKit image URL:\n // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg\n const { src, width } = config;\n let urlSegments;\n if (width) {\n const params = `tr:w-${width}`;\n urlSegments = [path, params, src];\n }\n else {\n urlSegments = [path, src];\n }\n return urlSegments.join('/');\n}\n\n/**\n * Name and URL tester for Imgix.\n */\nconst imgixLoaderInfo = {\n name: 'Imgix',\n testUrl: isImgixUrl\n};\nconst IMGIX_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imgix\\.net\\/.+/;\n/**\n * Tests whether a URL is from Imgix CDN.\n */\nfunction isImgixUrl(url) {\n return IMGIX_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.\n *\n * @param path path to the desired Imgix origin,\n * e.g. https://somepath.imgix.net or https://images.mysite.com\n * @returns Set of providers to configure the Imgix loader.\n *\n * @publicApi\n */\nconst provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);\nfunction createImgixUrl(path, config) {\n const url = new URL(`${path}/${config.src}`);\n // This setting ensures the smallest allowable format is set.\n url.searchParams.set('auto', 'format');\n if (config.width) {\n url.searchParams.set('w', config.width.toString());\n }\n return url.href;\n}\n\n// Assembles directive details string, useful for error messages.\nfunction imgDirectiveDetails(ngSrc, includeNgSrc = true) {\n const ngSrcInfo = includeNgSrc ? `(activated on an element with the \\`ngSrc=\"${ngSrc}\"\\`) ` : '';\n return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;\n}\n\n/**\n * Asserts that the application is in development mode. Throws an error if the application is in\n * production mode. This assert can be used to make sure that there is no dev-mode code invoked in\n * the prod mode accidentally.\n */\nfunction assertDevMode(checkName) {\n if (!ngDevMode) {\n throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +\n `Please make sure that the prod mode is enabled for production builds.`);\n }\n}\n\n/**\n * Observer that detects whether an image with `NgOptimizedImage`\n * is treated as a Largest Contentful Paint (LCP) element. If so,\n * asserts that the image has the `priority` attribute.\n *\n * Note: this is a dev-mode only class and it does not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n *\n * Based on https://web.dev/lcp/#measure-lcp-in-javascript.\n */\nclass LCPImageObserver {\n constructor() {\n // Map of full image URLs -> original `ngSrc` values.\n this.images = new Map();\n // Keep track of images for which `console.warn` was produced.\n this.alreadyWarned = new Set();\n this.window = null;\n this.observer = null;\n assertDevMode('LCP checker');\n const win = inject(DOCUMENT).defaultView;\n if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') {\n this.window = win;\n this.observer = this.initPerformanceObserver();\n }\n }\n /**\n * Inits PerformanceObserver and subscribes to LCP events.\n * Based on https://web.dev/lcp/#measure-lcp-in-javascript\n */\n initPerformanceObserver() {\n const observer = new PerformanceObserver((entryList) => {\n const entries = entryList.getEntries();\n if (entries.length === 0)\n return;\n // We use the latest entry produced by the `PerformanceObserver` as the best\n // signal on which element is actually an LCP one. As an example, the first image to load on\n // a page, by virtue of being the only thing on the page so far, is often a LCP candidate\n // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.\n const lcpElement = entries[entries.length - 1];\n // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.\n // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\n const imgSrc = lcpElement.element?.src ?? '';\n // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.\n if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))\n return;\n const imgNgSrc = this.images.get(imgSrc);\n if (imgNgSrc && !this.alreadyWarned.has(imgSrc)) {\n this.alreadyWarned.add(imgSrc);\n logMissingPriorityWarning(imgSrc);\n }\n });\n observer.observe({ type: 'largest-contentful-paint', buffered: true });\n return observer;\n }\n registerImage(rewrittenSrc, originalNgSrc) {\n if (!this.observer)\n return;\n this.images.set(getUrl(rewrittenSrc, this.window).href, originalNgSrc);\n }\n unregisterImage(rewrittenSrc) {\n if (!this.observer)\n return;\n this.images.delete(getUrl(rewrittenSrc, this.window).href);\n }\n ngOnDestroy() {\n if (!this.observer)\n return;\n this.observer.disconnect();\n this.images.clear();\n this.alreadyWarned.clear();\n }\n}\nLCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LCPImageObserver, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction logMissingPriorityWarning(ngSrc) {\n const directiveDetails = imgDirectiveDetails(ngSrc);\n console.warn(ɵformatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +\n `element but was not marked \"priority\". This image should be marked ` +\n `\"priority\" in order to prioritize its loading. ` +\n `To fix this, add the \"priority\" attribute.`));\n}\n\n// Set of origins that are always excluded from the preconnect checks.\nconst INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);\n/**\n * Injection token to configure which origins should be excluded\n * from the preconnect checks. It can either be a single string or an array of strings\n * to represent a group of origins, for example:\n *\n * ```typescript\n * {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}\n * ```\n *\n * or:\n *\n * ```typescript\n * {provide: PRECONNECT_CHECK_BLOCKLIST,\n * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}\n * ```\n *\n * @publicApi\n */\nconst PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');\n/**\n * Contains the logic to detect whether an image, marked with the \"priority\" attribute\n * has a corresponding `` tag in the `document.head`.\n *\n * Note: this is a dev-mode only class, which should not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n */\nclass PreconnectLinkChecker {\n constructor() {\n this.document = inject(DOCUMENT);\n /**\n * Set of tags found on this page.\n * The `null` value indicates that there was no DOM query operation performed.\n */\n this.preconnectLinks = null;\n /*\n * Keep track of all already seen origin URLs to avoid repeating the same check.\n */\n this.alreadySeen = new Set();\n this.window = null;\n this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);\n assertDevMode('preconnect link checker');\n const win = this.document.defaultView;\n if (typeof win !== 'undefined') {\n this.window = win;\n }\n const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, { optional: true });\n if (blocklist) {\n this.populateBlocklist(blocklist);\n }\n }\n populateBlocklist(origins) {\n if (Array.isArray(origins)) {\n deepForEach(origins, origin => {\n this.blocklist.add(extractHostname(origin));\n });\n }\n else {\n this.blocklist.add(extractHostname(origins));\n }\n }\n /**\n * Checks that a preconnect resource hint exists in the head for the\n * given src.\n *\n * @param rewrittenSrc src formatted with loader\n * @param originalNgSrc ngSrc value\n */\n assertPreconnect(rewrittenSrc, originalNgSrc) {\n if (!this.window)\n return;\n const imgUrl = getUrl(rewrittenSrc, this.window);\n if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))\n return;\n // Register this origin as seen, so we don't check it again later.\n this.alreadySeen.add(imgUrl.origin);\n if (!this.preconnectLinks) {\n // Note: we query for preconnect links only *once* and cache the results\n // for the entire lifespan of an application, since it's unlikely that the\n // list would change frequently. This allows to make sure there are no\n // performance implications of making extra DOM lookups for each image.\n this.preconnectLinks = this.queryPreconnectLinks();\n }\n if (!this.preconnectLinks.has(imgUrl.origin)) {\n console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +\n `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +\n `images are delivered as soon as possible. To fix this, please add the following ` +\n `element into the of the document:\\n` +\n ` `));\n }\n }\n queryPreconnectLinks() {\n const preconnectUrls = new Set();\n const selector = 'link[rel=preconnect]';\n const links = Array.from(this.document.querySelectorAll(selector));\n for (let link of links) {\n const url = getUrl(link.href, this.window);\n preconnectUrls.add(url.origin);\n }\n return preconnectUrls;\n }\n ngOnDestroy() {\n this.preconnectLinks?.clear();\n this.alreadySeen.clear();\n }\n}\nPreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreconnectLinkChecker, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\n/**\n * Invokes a callback for each element in the array. Also invokes a callback\n * recursively for each nested array.\n */\nfunction deepForEach(input, fn) {\n for (let value of input) {\n Array.isArray(value) ? deepForEach(value, fn) : fn(value);\n }\n}\n\n/**\n * In SSR scenarios, a preload `` element is generated for priority images.\n * Having a large number of preload tags may negatively affect the performance,\n * so we warn developers (by throwing an error) if the number of preloaded images\n * is above a certain threshold. This const specifies this threshold.\n */\nconst DEFAULT_PRELOADED_IMAGES_LIMIT = 5;\n/**\n * Helps to keep track of priority images that already have a corresponding\n * preload tag (to avoid generating multiple preload tags with the same URL).\n *\n * This Set tracks the original src passed into the `ngSrc` input not the src after it has been\n * run through the specified `IMAGE_LOADER`.\n */\nconst PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });\n\n/**\n * @description Contains the logic needed to track and add preload link tags to the `` tag. It\n * will also track what images have already had preload link tags added so as to not duplicate link\n * tags.\n *\n * In dev mode this service will validate that the number of preloaded images does not exceed the\n * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.\n */\nclass PreloadLinkCreator {\n constructor() {\n this.preloadedImages = inject(PRELOADED_IMAGES);\n this.document = inject(DOCUMENT);\n }\n /**\n * @description Add a preload `` to the `` of the `index.html` that is served from the\n * server while using Angular Universal and SSR to kick off image loads for high priority images.\n *\n * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)\n * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`\n * respectively, on the preload `` tag so that the correctly sized image is preloaded from\n * the CDN.\n *\n * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}\n *\n * @param renderer The `Renderer2` passed in from the directive\n * @param src The original src of the image that is set on the `ngSrc` input.\n * @param srcset The parsed and formatted srcset created from the `ngSrcset` input\n * @param sizes The value of the `sizes` attribute passed in to the `` tag\n */\n createPreloadLinkTag(renderer, src, srcset, sizes) {\n if (ngDevMode) {\n if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {\n throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&\n `The \\`NgOptimizedImage\\` directive has detected that more than ` +\n `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +\n `This might negatively affect an overall performance of the page. ` +\n `To fix this, remove the \"priority\" attribute from images with less priority.`);\n }\n }\n if (this.preloadedImages.has(src)) {\n return;\n }\n this.preloadedImages.add(src);\n const preload = renderer.createElement('link');\n renderer.setAttribute(preload, 'as', 'image');\n renderer.setAttribute(preload, 'href', src);\n renderer.setAttribute(preload, 'rel', 'preload');\n renderer.setAttribute(preload, 'fetchpriority', 'high');\n if (sizes) {\n renderer.setAttribute(preload, 'imageSizes', sizes);\n }\n if (srcset) {\n renderer.setAttribute(preload, 'imageSrcset', srcset);\n }\n renderer.appendChild(this.document.head, preload);\n }\n}\nPreloadLinkCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadLinkCreator, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,\n * an error is thrown. The image content (as a string) might be very long, thus making\n * it hard to read an error message if the entire string is included. This const defines\n * the number of characters that should be included into the error message. The rest\n * of the content is truncated.\n */\nconst BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;\n/**\n * RegExpr to determine whether a src in a srcset is using width descriptors.\n * Should match something like: \"100w, 200w\".\n */\nconst VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\\s*\\d+w\\s*(,|$)){1,})$/;\n/**\n * RegExpr to determine whether a src in a srcset is using density descriptors.\n * Should match something like: \"1x, 2x, 50x\". Also supports decimals like \"1.5x, 1.50x\".\n */\nconst VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\\s*\\d+(\\.\\d+)?x\\s*(,|$)){1,})$/;\n/**\n * Srcset values with a density descriptor higher than this value will actively\n * throw an error. Such densities are not permitted as they cause image sizes\n * to be unreasonably large and slow down LCP.\n */\nconst ABSOLUTE_SRCSET_DENSITY_CAP = 3;\n/**\n * Used only in error message text to communicate best practices, as we will\n * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.\n */\nconst RECOMMENDED_SRCSET_DENSITY_CAP = 2;\n/**\n * Used in generating automatic density-based srcsets\n */\nconst DENSITY_SRCSET_MULTIPLIERS = [1, 2];\n/**\n * Used to determine which breakpoints to use on full-width images\n */\nconst VIEWPORT_BREAKPOINT_CUTOFF = 640;\n/**\n * Used to determine whether two aspect ratios are similar in value.\n */\nconst ASPECT_RATIO_TOLERANCE = .1;\n/**\n * Used to determine whether the image has been requested at an overly\n * large size compared to the actual rendered image size (after taking\n * into account a typical device pixel ratio). In pixels.\n */\nconst OVERSIZED_IMAGE_TOLERANCE = 1000;\n/**\n * Used to limit automatic srcset generation of very large sources for\n * fixed-size images. In pixels.\n */\nconst FIXED_SRCSET_WIDTH_LIMIT = 1920;\nconst FIXED_SRCSET_HEIGHT_LIMIT = 1080;\n/** Info about built-in loaders we can test for. */\nconst BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];\nconst defaultConfig = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n};\n/**\n * Injection token that configures the image optimized image functionality.\n *\n * @see `NgOptimizedImage`\n * @publicApi\n * @developerPreview\n */\nconst IMAGE_CONFIG = new InjectionToken('ImageConfig', { providedIn: 'root', factory: () => defaultConfig });\n/**\n * Directive that improves image loading performance by enforcing best practices.\n *\n * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is\n * prioritized by:\n * - Automatically setting the `fetchpriority` attribute on the `` tag\n * - Lazy loading non-priority images by default\n * - Asserting that there is a corresponding preconnect link tag in the document head\n *\n * In addition, the directive:\n * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided\n * - Automatically generates a srcset\n * - Requires that `width` and `height` are set\n * - Warns if `width` or `height` have been set incorrectly\n * - Warns if the image will be visually distorted when rendered\n *\n * @usageNotes\n * The `NgOptimizedImage` directive is marked as [standalone](guide/standalone-components) and can\n * be imported directly.\n *\n * Follow the steps below to enable and use the directive:\n * 1. Import it into the necessary NgModule or a standalone Component.\n * 2. Optionally provide an `ImageLoader` if you use an image hosting service.\n * 3. Update the necessary `` tags in templates and replace `src` attributes with `ngSrc`.\n * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image\n * download.\n *\n * Step 1: import the `NgOptimizedImage` directive.\n *\n * ```typescript\n * import { NgOptimizedImage } from '@angular/common';\n *\n * // Include it into the necessary NgModule\n * @NgModule({\n * imports: [NgOptimizedImage],\n * })\n * class AppModule {}\n *\n * // ... or a standalone Component\n * @Component({\n * standalone: true\n * imports: [NgOptimizedImage],\n * })\n * class MyStandaloneComponent {}\n * ```\n *\n * Step 2: configure a loader.\n *\n * To use the **default loader**: no additional code changes are necessary. The URL returned by the\n * generic loader will always match the value of \"src\". In other words, this loader applies no\n * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.\n *\n * To use an existing loader for a **third-party image service**: add the provider factory for your\n * chosen service to the `providers` array. In the example below, the Imgix loader is used:\n *\n * ```typescript\n * import {provideImgixLoader} from '@angular/common';\n *\n * // Call the function and add the result to the `providers` array:\n * providers: [\n * provideImgixLoader(\"https://my.base.url/\"),\n * ],\n * ```\n *\n * The `NgOptimizedImage` directive provides the following functions:\n * - `provideCloudflareLoader`\n * - `provideCloudinaryLoader`\n * - `provideImageKitLoader`\n * - `provideImgixLoader`\n *\n * If you use a different image provider, you can create a custom loader function as described\n * below.\n *\n * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI\n * token.\n *\n * ```typescript\n * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';\n *\n * // Configure the loader using the `IMAGE_LOADER` token.\n * providers: [\n * {\n * provide: IMAGE_LOADER,\n * useValue: (config: ImageLoaderConfig) => {\n * return `https://example.com/${config.src}-${config.width}.jpg}`;\n * }\n * },\n * ],\n * ```\n *\n * Step 3: update `` tags in templates to use `ngSrc` instead of `src`.\n *\n * ```\n * \n * ```\n *\n * @publicApi\n */\nclass NgOptimizedImage {\n constructor() {\n this.imageLoader = inject(IMAGE_LOADER);\n this.config = processConfig(inject(IMAGE_CONFIG));\n this.renderer = inject(Renderer2);\n this.imgElement = inject(ElementRef).nativeElement;\n this.injector = inject(Injector);\n this.isServer = isPlatformServer(inject(PLATFORM_ID));\n this.preloadLinkChecker = inject(PreloadLinkCreator);\n // a LCP image observer - should be injected only in the dev mode\n this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;\n /**\n * Calculate the rewritten `src` once and store it.\n * This is needed to avoid repetitive calculations and make sure the directive cleanup in the\n * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other\n * instance that might be already destroyed).\n */\n this._renderedSrc = null;\n this._priority = false;\n this._disableOptimizedSrcset = false;\n this._fill = false;\n }\n /**\n * For responsive images: the intrinsic width of the image in pixels.\n * For fixed size images: the desired rendered width of the image in pixels.\n */\n set width(value) {\n ngDevMode && assertGreaterThanZero(this, value, 'width');\n this._width = inputToInteger(value);\n }\n get width() {\n return this._width;\n }\n /**\n * For responsive images: the intrinsic height of the image in pixels.\n * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic\n * height of the image in pixels.\n */\n set height(value) {\n ngDevMode && assertGreaterThanZero(this, value, 'height');\n this._height = inputToInteger(value);\n }\n get height() {\n return this._height;\n }\n /**\n * Indicates whether this image should have a high priority.\n */\n set priority(value) {\n this._priority = inputToBoolean(value);\n }\n get priority() {\n return this._priority;\n }\n /**\n * Disables automatic srcset generation for this image.\n */\n set disableOptimizedSrcset(value) {\n this._disableOptimizedSrcset = inputToBoolean(value);\n }\n get disableOptimizedSrcset() {\n return this._disableOptimizedSrcset;\n }\n /**\n * Sets the image to \"fill mode\", which eliminates the height/width requirement and adds\n * styles such that the image fills its containing element.\n *\n * @developerPreview\n */\n set fill(value) {\n this._fill = inputToBoolean(value);\n }\n get fill() {\n return this._fill;\n }\n /** @nodoc */\n ngOnInit() {\n if (ngDevMode) {\n assertNonEmptyInput(this, 'ngSrc', this.ngSrc);\n assertValidNgSrcset(this, this.ngSrcset);\n assertNoConflictingSrc(this);\n if (this.ngSrcset) {\n assertNoConflictingSrcset(this);\n }\n assertNotBase64Image(this);\n assertNotBlobUrl(this);\n if (this.fill) {\n assertEmptyWidthAndHeight(this);\n assertNonZeroRenderedHeight(this, this.imgElement, this.renderer);\n }\n else {\n assertNonEmptyWidthAndHeight(this);\n // Only check for distorted images when not in fill mode, where\n // images may be intentionally stretched, cropped or letterboxed.\n assertNoImageDistortion(this, this.imgElement, this.renderer);\n }\n assertValidLoadingInput(this);\n if (!this.ngSrcset) {\n assertNoComplexSizes(this);\n }\n assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);\n assertNoNgSrcsetWithoutLoader(this, this.imageLoader);\n assertNoLoaderParamsWithoutLoader(this, this.imageLoader);\n if (this.priority) {\n const checker = this.injector.get(PreconnectLinkChecker);\n checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);\n }\n else {\n // Monitor whether an image is an LCP element only in case\n // the `priority` attribute is missing. Otherwise, an image\n // has the necessary settings and no extra checks are required.\n if (this.lcpObserver !== null) {\n const ngZone = this.injector.get(NgZone);\n ngZone.runOutsideAngular(() => {\n this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc);\n });\n }\n }\n }\n this.setHostAttributes();\n }\n setHostAttributes() {\n // Must set width/height explicitly in case they are bound (in which case they will\n // only be reflected and not found by the browser)\n if (this.fill) {\n if (!this.sizes) {\n this.sizes = '100vw';\n }\n }\n else {\n this.setHostAttribute('width', this.width.toString());\n this.setHostAttribute('height', this.height.toString());\n }\n this.setHostAttribute('loading', this.getLoadingBehavior());\n this.setHostAttribute('fetchpriority', this.getFetchPriority());\n // The `data-ng-img` attribute flags an image as using the directive, to allow\n // for analysis of the directive's performance.\n this.setHostAttribute('ng-img', 'true');\n // The `src` and `srcset` attributes should be set last since other attributes\n // could affect the image's loading behavior.\n const rewrittenSrc = this.getRewrittenSrc();\n this.setHostAttribute('src', rewrittenSrc);\n let rewrittenSrcset = undefined;\n if (this.sizes) {\n this.setHostAttribute('sizes', this.sizes);\n }\n if (this.ngSrcset) {\n rewrittenSrcset = this.getRewrittenSrcset();\n }\n else if (this.shouldGenerateAutomaticSrcset()) {\n rewrittenSrcset = this.getAutomaticSrcset();\n }\n if (rewrittenSrcset) {\n this.setHostAttribute('srcset', rewrittenSrcset);\n }\n if (this.isServer && this.priority) {\n this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);\n }\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (ngDevMode) {\n assertNoPostInitInputChange(this, changes, [\n 'ngSrc',\n 'ngSrcset',\n 'width',\n 'height',\n 'priority',\n 'fill',\n 'loading',\n 'sizes',\n 'loaderParams',\n 'disableOptimizedSrcset',\n ]);\n }\n }\n callImageLoader(configWithoutCustomParams) {\n let augmentedConfig = configWithoutCustomParams;\n if (this.loaderParams) {\n augmentedConfig.loaderParams = this.loaderParams;\n }\n return this.imageLoader(augmentedConfig);\n }\n getLoadingBehavior() {\n if (!this.priority && this.loading !== undefined) {\n return this.loading;\n }\n return this.priority ? 'eager' : 'lazy';\n }\n getFetchPriority() {\n return this.priority ? 'high' : 'auto';\n }\n getRewrittenSrc() {\n // ImageLoaderConfig supports setting a width property. However, we're not setting width here\n // because if the developer uses rendered width instead of intrinsic width in the HTML width\n // attribute, the image requested may be too small for 2x+ screens.\n if (!this._renderedSrc) {\n const imgConfig = { src: this.ngSrc };\n // Cache calculated image src to reuse it later in the code.\n this._renderedSrc = this.callImageLoader(imgConfig);\n }\n return this._renderedSrc;\n }\n getRewrittenSrcset() {\n const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);\n const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {\n srcStr = srcStr.trim();\n const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;\n return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;\n });\n return finalSrcs.join(', ');\n }\n getAutomaticSrcset() {\n if (this.sizes) {\n return this.getResponsiveSrcset();\n }\n else {\n return this.getFixedSrcset();\n }\n }\n getResponsiveSrcset() {\n const { breakpoints } = this.config;\n let filteredBreakpoints = breakpoints;\n if (this.sizes?.trim() === '100vw') {\n // Since this is a full-screen-width image, our srcset only needs to include\n // breakpoints with full viewport widths.\n filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);\n }\n const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);\n return finalSrcs.join(', ');\n }\n getFixedSrcset() {\n const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({\n src: this.ngSrc,\n width: this.width * multiplier\n })} ${multiplier}x`);\n return finalSrcs.join(', ');\n }\n shouldGenerateAutomaticSrcset() {\n return !this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&\n !(this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (ngDevMode) {\n if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {\n this.lcpObserver.unregisterImage(this._renderedSrc);\n }\n }\n }\n setHostAttribute(name, value) {\n this.renderer.setAttribute(this.imgElement, name, value);\n }\n}\nNgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgOptimizedImage, isStandalone: true, selector: \"img[ngSrc]\", inputs: { ngSrc: \"ngSrc\", ngSrcset: \"ngSrcset\", sizes: \"sizes\", width: \"width\", height: \"height\", loading: \"loading\", priority: \"priority\", loaderParams: \"loaderParams\", disableOptimizedSrcset: \"disableOptimizedSrcset\", fill: \"fill\", src: \"src\", srcset: \"srcset\" }, host: { properties: { \"style.position\": \"fill ? \\\"absolute\\\" : null\", \"style.width\": \"fill ? \\\"100%\\\" : null\", \"style.height\": \"fill ? \\\"100%\\\" : null\", \"style.inset\": \"fill ? \\\"0px\\\" : null\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgOptimizedImage, decorators: [{\n type: Directive,\n args: [{\n standalone: true,\n selector: 'img[ngSrc]',\n host: {\n '[style.position]': 'fill ? \"absolute\" : null',\n '[style.width]': 'fill ? \"100%\" : null',\n '[style.height]': 'fill ? \"100%\" : null',\n '[style.inset]': 'fill ? \"0px\" : null'\n }\n }]\n }], propDecorators: { ngSrc: [{\n type: Input\n }], ngSrcset: [{\n type: Input\n }], sizes: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], loading: [{\n type: Input\n }], priority: [{\n type: Input\n }], loaderParams: [{\n type: Input\n }], disableOptimizedSrcset: [{\n type: Input\n }], fill: [{\n type: Input\n }], src: [{\n type: Input\n }], srcset: [{\n type: Input\n }] } });\n/***** Helpers *****/\n/**\n * Convert input value to integer.\n */\nfunction inputToInteger(value) {\n return typeof value === 'string' ? parseInt(value, 10) : value;\n}\n/**\n * Convert input value to boolean.\n */\nfunction inputToBoolean(value) {\n return value != null && `${value}` !== 'false';\n}\n/**\n * Sorts provided config breakpoints and uses defaults.\n */\nfunction processConfig(config) {\n let sortedBreakpoints = {};\n if (config.breakpoints) {\n sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);\n }\n return Object.assign({}, defaultConfig, config, sortedBreakpoints);\n}\n/***** Assert functions *****/\n/**\n * Verifies that there is no `src` set on a host element.\n */\nfunction assertNoConflictingSrc(dir) {\n if (dir.src) {\n throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`src\\` and \\`ngSrc\\` have been set. ` +\n `Supplying both of these attributes breaks lazy loading. ` +\n `The NgOptimizedImage directive sets \\`src\\` itself based on the value of \\`ngSrc\\`. ` +\n `To fix this, please remove the \\`src\\` attribute.`);\n }\n}\n/**\n * Verifies that there is no `srcset` set on a host element.\n */\nfunction assertNoConflictingSrcset(dir) {\n if (dir.srcset) {\n throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`srcset\\` and \\`ngSrcset\\` have been set. ` +\n `Supplying both of these attributes breaks lazy loading. ` +\n `The NgOptimizedImage directive sets \\`srcset\\` itself based on the value of ` +\n `\\`ngSrcset\\`. To fix this, please remove the \\`srcset\\` attribute.`);\n }\n}\n/**\n * Verifies that the `ngSrc` is not a Base64-encoded image.\n */\nfunction assertNotBase64Image(dir) {\n let ngSrc = dir.ngSrc.trim();\n if (ngSrc.startsWith('data:')) {\n if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {\n ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';\n }\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`ngSrc\\` is a Base64-encoded string ` +\n `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +\n `To fix this, disable the NgOptimizedImage directive for this element ` +\n `by removing \\`ngSrc\\` and using a standard \\`src\\` attribute instead.`);\n }\n}\n/**\n * Verifies that the 'sizes' only includes responsive values.\n */\nfunction assertNoComplexSizes(dir) {\n let sizes = dir.sizes;\n if (sizes?.match(/((\\)|,)\\s|^)\\d+px/)) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`sizes\\` was set to a string including ` +\n `pixel values. For automatic \\`srcset\\` generation, \\`sizes\\` must only include responsive ` +\n `values, such as \\`sizes=\"50vw\"\\` or \\`sizes=\"(min-width: 768px) 50vw, 100vw\"\\`. ` +\n `To fix this, modify the \\`sizes\\` attribute, or provide your own \\`ngSrcset\\` value directly.`);\n }\n}\n/**\n * Verifies that the `ngSrc` is not a Blob URL.\n */\nfunction assertNotBlobUrl(dir) {\n const ngSrc = dir.ngSrc.trim();\n if (ngSrc.startsWith('blob:')) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrc\\` was set to a blob URL (${ngSrc}). ` +\n `Blob URLs are not supported by the NgOptimizedImage directive. ` +\n `To fix this, disable the NgOptimizedImage directive for this element ` +\n `by removing \\`ngSrc\\` and using a regular \\`src\\` attribute instead.`);\n }\n}\n/**\n * Verifies that the input is set to a non-empty string.\n */\nfunction assertNonEmptyInput(dir, name, value) {\n const isString = typeof value === 'string';\n const isEmptyString = isString && value.trim() === '';\n if (!isString || isEmptyString) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${name}\\` has an invalid value ` +\n `(\\`${value}\\`). To fix this, change the value to a non-empty string.`);\n }\n}\n/**\n * Verifies that the `ngSrcset` is in a valid format, e.g. \"100w, 200w\" or \"1x, 2x\".\n */\nfunction assertValidNgSrcset(dir, value) {\n if (value == null)\n return;\n assertNonEmptyInput(dir, 'ngSrcset', value);\n const stringVal = value;\n const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);\n const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);\n if (isValidDensityDescriptor) {\n assertUnderDensityCap(dir, stringVal);\n }\n const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;\n if (!isValidSrcset) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrcset\\` has an invalid value (\\`${value}\\`). ` +\n `To fix this, supply \\`ngSrcset\\` using a comma-separated list of one or more width ` +\n `descriptors (e.g. \"100w, 200w\") or density descriptors (e.g. \"1x, 2x\").`);\n }\n}\nfunction assertUnderDensityCap(dir, value) {\n const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);\n if (!underDensityCap) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` contains an unsupported image density:` +\n `\\`${value}\\`. NgOptimizedImage generally recommends a max image density of ` +\n `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +\n `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +\n `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +\n `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +\n `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);\n }\n}\n/**\n * Creates a `RuntimeError` instance to represent a situation when an input is set after\n * the directive has initialized.\n */\nfunction postInitInputChangeError(dir, inputName) {\n let reason;\n if (inputName === 'width' || inputName === 'height') {\n reason = `Changing \\`${inputName}\\` may result in different attribute value ` +\n `applied to the underlying image element and cause layout shifts on a page.`;\n }\n else {\n reason = `Changing the \\`${inputName}\\` would have no effect on the underlying ` +\n `image element, because the resource loading has already occurred.`;\n }\n return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` was updated after initialization. ` +\n `The NgOptimizedImage directive will not react to this input change. ${reason} ` +\n `To fix this, either switch \\`${inputName}\\` to a static value ` +\n `or wrap the image element in an *ngIf that is gated on the necessary value.`);\n}\n/**\n * Verify that none of the listed inputs has changed.\n */\nfunction assertNoPostInitInputChange(dir, changes, inputs) {\n inputs.forEach(input => {\n const isUpdated = changes.hasOwnProperty(input);\n if (isUpdated && !changes[input].isFirstChange()) {\n if (input === 'ngSrc') {\n // When the `ngSrc` input changes, we detect that only in the\n // `ngOnChanges` hook, thus the `ngSrc` is already set. We use\n // `ngSrc` in the error message, so we use a previous value, but\n // not the updated one in it.\n dir = { ngSrc: changes[input].previousValue };\n }\n throw postInitInputChangeError(dir, input);\n }\n });\n}\n/**\n * Verifies that a specified input is a number greater than 0.\n */\nfunction assertGreaterThanZero(dir, inputValue, inputName) {\n const validNumber = typeof inputValue === 'number' && inputValue > 0;\n const validString = typeof inputValue === 'string' && /^\\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;\n if (!validNumber && !validString) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` has an invalid value ` +\n `(\\`${inputValue}\\`). To fix this, provide \\`${inputName}\\` ` +\n `as a number greater than 0.`);\n }\n}\n/**\n * Verifies that the rendered image is not visually distorted. Effectively this is checking:\n * - Whether the \"width\" and \"height\" attributes reflect the actual dimensions of the image.\n * - Whether image styling is \"correct\" (see below for a longer explanation).\n */\nfunction assertNoImageDistortion(dir, img, renderer) {\n const removeListenerFn = renderer.listen(img, 'load', () => {\n removeListenerFn();\n const computedStyle = window.getComputedStyle(img);\n let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));\n let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));\n const boxSizing = computedStyle.getPropertyValue('box-sizing');\n if (boxSizing === 'border-box') {\n const paddingTop = computedStyle.getPropertyValue('padding-top');\n const paddingRight = computedStyle.getPropertyValue('padding-right');\n const paddingBottom = computedStyle.getPropertyValue('padding-bottom');\n const paddingLeft = computedStyle.getPropertyValue('padding-left');\n renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);\n renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);\n }\n const renderedAspectRatio = renderedWidth / renderedHeight;\n const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;\n const intrinsicWidth = img.naturalWidth;\n const intrinsicHeight = img.naturalHeight;\n const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;\n const suppliedWidth = dir.width;\n const suppliedHeight = dir.height;\n const suppliedAspectRatio = suppliedWidth / suppliedHeight;\n // Tolerance is used to account for the impact of subpixel rendering.\n // Due to subpixel rendering, the rendered, intrinsic, and supplied\n // aspect ratios of a correctly configured image may not exactly match.\n // For example, a `width=4030 height=3020` image might have a rendered\n // size of \"1062w, 796.48h\". (An aspect ratio of 1.334... vs. 1.333...)\n const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;\n const stylingDistortion = nonZeroRenderedDimensions &&\n Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;\n if (inaccurateDimensions) {\n console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +\n `the aspect ratio indicated by the width and height attributes. ` +\n `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +\n `(aspect-ratio: ${intrinsicAspectRatio}). \\nSupplied width and height attributes: ` +\n `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` +\n `\\nTo fix this, update the width and height attributes.`));\n }\n else if (stylingDistortion) {\n console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +\n `does not match the image's intrinsic aspect ratio. ` +\n `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +\n `(aspect-ratio: ${intrinsicAspectRatio}). \\nRendered image size: ` +\n `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +\n `${renderedAspectRatio}). \\nThis issue can occur if \"width\" and \"height\" ` +\n `attributes are added to an image without updating the corresponding ` +\n `image styling. To fix this, adjust image styling. In most cases, ` +\n `adding \"height: auto\" or \"width: auto\" to the image styling will fix ` +\n `this issue.`));\n }\n else if (!dir.ngSrcset && nonZeroRenderedDimensions) {\n // If `ngSrcset` hasn't been set, sanity check the intrinsic size.\n const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;\n const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;\n const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;\n const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;\n if (oversizedWidth || oversizedHeight) {\n console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +\n `larger than necessary. ` +\n `\\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +\n `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +\n `\\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +\n `\\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +\n `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +\n `or consider using the \"ngSrcset\" and \"sizes\" attributes.`));\n }\n }\n });\n}\n/**\n * Verifies that a specified input is set.\n */\nfunction assertNonEmptyWidthAndHeight(dir) {\n let missingAttributes = [];\n if (dir.width === undefined)\n missingAttributes.push('width');\n if (dir.height === undefined)\n missingAttributes.push('height');\n if (missingAttributes.length > 0) {\n throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +\n `are missing: ${missingAttributes.map(attr => `\"${attr}\"`).join(', ')}. ` +\n `Including \"width\" and \"height\" attributes will prevent image-related layout shifts. ` +\n `To fix this, include \"width\" and \"height\" attributes on the image tag or turn on ` +\n `\"fill\" mode with the \\`fill\\` attribute.`);\n }\n}\n/**\n * Verifies that width and height are not set. Used in fill mode, where those attributes don't make\n * sense.\n */\nfunction assertEmptyWidthAndHeight(dir) {\n if (dir.width || dir.height) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \\`height\\` and/or \\`width\\` are present ` +\n `along with the \\`fill\\` attribute. Because \\`fill\\` mode causes an image to fill its containing ` +\n `element, the size attributes have no effect and should be removed.`);\n }\n}\n/**\n * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides\n * guidance that this can be caused by the containing element's CSS position property.\n */\nfunction assertNonZeroRenderedHeight(dir, img, renderer) {\n const removeListenerFn = renderer.listen(img, 'load', () => {\n removeListenerFn();\n const renderedHeight = img.clientHeight;\n if (dir.fill && renderedHeight === 0) {\n console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +\n `This is likely because the containing element does not have the CSS 'position' ` +\n `property set to one of the following: \"relative\", \"fixed\", or \"absolute\". ` +\n `To fix this problem, make sure the container element has the CSS 'position' ` +\n `property defined and the height of the element is not zero.`));\n }\n });\n}\n/**\n * Verifies that the `loading` attribute is set to a valid input &\n * is not used on priority images.\n */\nfunction assertValidLoadingInput(dir) {\n if (dir.loading && dir.priority) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` +\n `was used on an image that was marked \"priority\". ` +\n `Setting \\`loading\\` on priority images is not allowed ` +\n `because these images will always be eagerly loaded. ` +\n `To fix this, remove the “loading” attribute from the priority image.`);\n }\n const validInputs = ['auto', 'eager', 'lazy'];\n if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {\n throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` +\n `has an invalid value (\\`${dir.loading}\\`). ` +\n `To fix this, provide a valid value (\"lazy\", \"eager\", or \"auto\").`);\n }\n}\n/**\n * Warns if NOT using a loader (falling back to the generic loader) and\n * the image appears to be hosted on one of the image CDNs for which\n * we do have a built-in image loader. Suggests switching to the\n * built-in loader.\n *\n * @param ngSrc Value of the ngSrc attribute\n * @param imageLoader ImageLoader provided\n */\nfunction assertNotMissingBuiltInLoader(ngSrc, imageLoader) {\n if (imageLoader === noopImageLoader) {\n let builtInLoaderName = '';\n for (const loader of BUILT_IN_LOADERS) {\n if (loader.testUrl(ngSrc)) {\n builtInLoaderName = loader.name;\n break;\n }\n }\n if (builtInLoaderName) {\n console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +\n `${builtInLoaderName} CDN, but your app is not using Angular's ` +\n `built-in loader for that CDN. We recommend switching to use ` +\n `the built-in by calling \\`provide${builtInLoaderName}Loader()\\` ` +\n `in your \\`providers\\` and passing it your instance's base URL. ` +\n `If you don't want to use the built-in loader, define a custom ` +\n `loader function using IMAGE_LOADER to silence this warning.`));\n }\n }\n}\n/**\n * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used).\n */\nfunction assertNoNgSrcsetWithoutLoader(dir, imageLoader) {\n if (dir.ngSrcset && imageLoader === noopImageLoader) {\n console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` attribute is present but ` +\n `no image loader is configured (i.e. the default one is being used), ` +\n `which would result in the same image being used for all configured sizes. ` +\n `To fix this, provide a loader or remove the \\`ngSrcset\\` attribute from the image.`));\n }\n}\n/**\n * Warns if loaderParams is present and no loader is configured (i.e. the default one is being\n * used).\n */\nfunction assertNoLoaderParamsWithoutLoader(dir, imageLoader) {\n if (dir.loaderParams && imageLoader === noopImageLoader) {\n console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loaderParams\\` attribute is present but ` +\n `no image loader is configured (i.e. the default one is being used), ` +\n `which means that the loaderParams data will not be consumed and will not affect the URL. ` +\n `To fix this, provide a custom loader or remove the \\`loaderParams\\` attribute from the image.`));\n }\n}\n\n// These exports represent the set of symbols exposed as a public API.\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_CONFIG, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nexport { ɵgetDOM } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, inject, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, Version } from '@angular/core';\n\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass GenericBrowserDomAdapter extends ɵDomAdapter {\n constructor() {\n super(...arguments);\n this.supportsDOMEvents = true;\n }\n}\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nclass BrowserDomAdapter extends GenericBrowserDomAdapter {\n static makeCurrent() {\n ɵsetRootDomAdapter(new BrowserDomAdapter());\n }\n onAndCancel(el, evt, listener) {\n el.addEventListener(evt, listener, false);\n // Needed to follow Dart's subscription semantic, until fix of\n // https://code.google.com/p/dart/issues/detail?id=17406\n return () => {\n el.removeEventListener(evt, listener, false);\n };\n }\n dispatchEvent(el, evt) {\n el.dispatchEvent(evt);\n }\n remove(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n createElement(tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n }\n createHtmlDocument() {\n return document.implementation.createHTMLDocument('fakeTitle');\n }\n getDefaultDocument() {\n return document;\n }\n isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE;\n }\n isShadowRoot(node) {\n return node instanceof DocumentFragment;\n }\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n getGlobalEventTarget(doc, target) {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n getBaseHref(doc) {\n const href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n }\n resetBaseElement() {\n baseElement = null;\n }\n getUserAgent() {\n return window.navigator.userAgent;\n }\n getCookie(name) {\n return ɵparseCookieValue(document.cookie, name);\n }\n}\nlet baseElement = null;\nfunction getBaseElementHref() {\n baseElement = baseElement || document.querySelector('base');\n return baseElement ? baseElement.getAttribute('href') : null;\n}\n// based on urlUtils.js in AngularJS 1\nlet urlParsingNode;\nfunction relativePath(url) {\n urlParsingNode = urlParsingNode || document.createElement('a');\n urlParsingNode.setAttribute('href', url);\n const pathName = urlParsingNode.pathname;\n return pathName.charAt(0) === '/' ? pathName : `/${pathName}`;\n}\n\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nconst TRANSITION_ID = new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n return () => {\n // Wait for all application initializers to be completed before removing the styles set by\n // the server.\n injector.get(ApplicationInitStatus).donePromise.then(() => {\n const dom = ɵgetDOM();\n const styles = document.querySelectorAll(`style[ng-transition=\"${transitionId}\"]`);\n for (let i = 0; i < styles.length; i++) {\n dom.remove(styles[i]);\n }\n });\n };\n}\nconst SERVER_TRANSITION_PROVIDERS = [\n {\n provide: APP_INITIALIZER,\n useFactory: appInitializerFactory,\n deps: [TRANSITION_ID, DOCUMENT, Injector],\n multi: true\n },\n];\n\nclass BrowserGetTestability {\n addToWindow(registry) {\n ɵglobal['getAngularTestability'] = (elem, findInAncestors = true) => {\n const testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new Error('Could not find testability for element.');\n }\n return testability;\n };\n ɵglobal['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n ɵglobal['getAllAngularRootElements'] = () => registry.getAllRootElements();\n const whenAllStable = (callback /** TODO #9100 */) => {\n const testabilities = ɵglobal['getAllAngularTestabilities']();\n let count = testabilities.length;\n let didWork = false;\n const decrement = function (didWork_ /** TODO #9100 */) {\n didWork = didWork || didWork_;\n count--;\n if (count == 0) {\n callback(didWork);\n }\n };\n testabilities.forEach(function (testability /** TODO #9100 */) {\n testability.whenStable(decrement);\n });\n };\n if (!ɵglobal['frameworkStabilizers']) {\n ɵglobal['frameworkStabilizers'] = [];\n }\n ɵglobal['frameworkStabilizers'].push(whenAllStable);\n }\n findTestabilityInTree(registry, elem, findInAncestors) {\n if (elem == null) {\n return null;\n }\n const t = registry.getTestability(elem);\n if (t != null) {\n return t;\n }\n else if (!findInAncestors) {\n return null;\n }\n if (ɵgetDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, elem.host, true);\n }\n return this.findTestabilityInTree(registry, elem.parentElement, true);\n }\n}\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\nclass BrowserXhr {\n build() {\n return new XMLHttpRequest();\n }\n}\nBrowserXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserXhr });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserXhr, decorators: [{\n type: Injectable\n }] });\n\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nconst EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nclass EventManager {\n /**\n * Initializes an instance of the event-manager service.\n */\n constructor(plugins, _zone) {\n this._zone = _zone;\n this._eventNameToPlugin = new Map();\n plugins.forEach((plugin) => {\n plugin.manager = this;\n });\n this._plugins = plugins.slice().reverse();\n }\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n addEventListener(element, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n }\n /**\n * Registers a global handler for an event in a target view.\n *\n * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n * @deprecated No longer being used in Ivy code. To be removed in version 14.\n */\n addGlobalEventListener(target, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n }\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n getZone() {\n return this._zone;\n }\n /** @internal */\n _findPluginFor(eventName) {\n const plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n const plugins = this._plugins;\n for (let i = 0; i < plugins.length; i++) {\n const plugin = plugins[i];\n if (plugin.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin);\n return plugin;\n }\n }\n throw new Error(`No event manager plugin found for event ${eventName}`);\n }\n}\nEventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nEventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: EventManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: EventManager, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [EVENT_MANAGER_PLUGINS]\n }] }, { type: i0.NgZone }]; } });\nclass EventManagerPlugin {\n constructor(_doc) {\n this._doc = _doc;\n }\n addGlobalEventListener(element, eventName, handler) {\n const target = ɵgetDOM().getGlobalEventTarget(this._doc, element);\n if (!target) {\n throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n }\n return this.addEventListener(target, eventName, handler);\n }\n}\n\nclass SharedStylesHost {\n constructor() {\n this.usageCount = new Map();\n }\n addStyles(styles) {\n for (const style of styles) {\n const usageCount = this.changeUsageCount(style, 1);\n if (usageCount === 1) {\n this.onStyleAdded(style);\n }\n }\n }\n removeStyles(styles) {\n for (const style of styles) {\n const usageCount = this.changeUsageCount(style, -1);\n if (usageCount === 0) {\n this.onStyleRemoved(style);\n }\n }\n }\n onStyleRemoved(style) { }\n onStyleAdded(style) { }\n getAllStyles() {\n return this.usageCount.keys();\n }\n changeUsageCount(style, delta) {\n const map = this.usageCount;\n let usage = map.get(style) ?? 0;\n usage += delta;\n if (usage > 0) {\n map.set(style, usage);\n }\n else {\n map.delete(style);\n }\n return usage;\n }\n ngOnDestroy() {\n for (const style of this.getAllStyles()) {\n this.onStyleRemoved(style);\n }\n this.usageCount.clear();\n }\n}\nSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SharedStylesHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SharedStylesHost, decorators: [{\n type: Injectable\n }] });\nclass DomSharedStylesHost extends SharedStylesHost {\n constructor(doc) {\n super();\n this.doc = doc;\n // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n this.styleRef = new Map();\n this.hostNodes = new Set();\n this.resetHostNodes();\n }\n onStyleAdded(style) {\n for (const host of this.hostNodes) {\n this.addStyleToHost(host, style);\n }\n }\n onStyleRemoved(style) {\n const styleRef = this.styleRef;\n const styleElements = styleRef.get(style);\n styleElements?.forEach(e => e.remove());\n styleRef.delete(style);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this.styleRef.clear();\n this.resetHostNodes();\n }\n addHost(hostNode) {\n this.hostNodes.add(hostNode);\n for (const style of this.getAllStyles()) {\n this.addStyleToHost(hostNode, style);\n }\n }\n removeHost(hostNode) {\n this.hostNodes.delete(hostNode);\n }\n addStyleToHost(host, style) {\n const styleEl = this.doc.createElement('style');\n styleEl.textContent = style;\n host.appendChild(styleEl);\n const styleElRef = this.styleRef.get(style);\n if (styleElRef) {\n styleElRef.push(styleEl);\n }\n else {\n this.styleRef.set(style, [styleEl]);\n }\n }\n resetHostNodes() {\n const hostNodes = this.hostNodes;\n hostNodes.clear();\n // Re-add the head element back since this is the default host.\n hostNodes.add(this.doc.head);\n }\n}\nDomSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSharedStylesHost, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSharedStylesHost, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\nconst NAMESPACE_URIS = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n 'math': 'http://www.w3.org/1998/MathML/',\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = false;\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `false`. This will be changed in the next major version.\n * @publicApi\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken('RemoveStylesOnCompDestory', {\n providedIn: 'root',\n factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,\n});\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles) {\n // Cannot use `Infinity` as depth as `infinity` is not a number literal in TypeScript.\n // See: https://github.com/microsoft/TypeScript/issues/32277\n return styles.flat(100).map(s => s.replace(COMPONENT_REGEX, compId));\n}\nfunction decoratePreventDefault(eventHandler) {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n // the listener (see below).\n return (event) => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n // can inspect the listener toString contents for the existence of this special token. Because\n // the token is a string literal, it is ensured to not be modified by compiled code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n const allowDefaultBehavior = eventHandler(event);\n if (allowDefaultBehavior === false) {\n // TODO(tbosch): move preventDefault into event plugins...\n event.preventDefault();\n event.returnValue = false;\n }\n return undefined;\n };\n}\nclass DomRendererFactory2 {\n constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestory) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.appId = appId;\n this.removeStylesOnCompDestory = removeStylesOnCompDestory;\n this.rendererByCompId = new Map();\n this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n }\n createRenderer(element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n const renderer = this.getOrCreateRenderer(element, type);\n // Renderers have different logic due to different encapsulation behaviours.\n // Ex: for emulated, an attribute is added to the element.\n if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n renderer.applyToHost(element);\n }\n else if (renderer instanceof NoneEncapsulationDomRenderer) {\n renderer.applyStyles();\n }\n return renderer;\n }\n getOrCreateRenderer(element, type) {\n const rendererByCompId = this.rendererByCompId;\n let renderer = rendererByCompId.get(type.id);\n if (!renderer) {\n const eventManager = this.eventManager;\n const sharedStylesHost = this.sharedStylesHost;\n const removeStylesOnCompDestory = this.removeStylesOnCompDestory;\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated:\n renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestory);\n break;\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type);\n default:\n renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestory);\n break;\n }\n renderer.onDestroy = () => rendererByCompId.delete(type.id);\n rendererByCompId.set(type.id, renderer);\n }\n return renderer;\n }\n ngOnDestroy() {\n this.rendererByCompId.clear();\n }\n begin() { }\n end() { }\n}\nDomRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: DomSharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }], target: i0.ɵɵFactoryTarget.Injectable });\nDomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomRendererFactory2 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomRendererFactory2, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: undefined, decorators: [{\n type: Inject,\n args: [APP_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [REMOVE_STYLES_ON_COMPONENT_DESTROY]\n }] }]; } });\nclass DefaultDomRenderer2 {\n constructor(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n this.destroyNode = null;\n }\n destroy() { }\n createElement(name, namespace) {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\n return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n return document.createElement(name);\n }\n createComment(value) {\n return document.createComment(value);\n }\n createText(value) {\n return document.createTextNode(value);\n }\n appendChild(parent, newChild) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n insertBefore(parent, newChild, refChild) {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.insertBefore(newChild, refChild);\n }\n }\n removeChild(parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n }\n selectRootElement(selectorOrNode, preserveContent) {\n let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n selectorOrNode;\n if (!el) {\n throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n }\n parentNode(node) {\n return node.parentNode;\n }\n nextSibling(node) {\n return node.nextSibling;\n }\n setAttribute(el, name, value, namespace) {\n if (namespace) {\n name = namespace + ':' + name;\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n }\n else {\n el.setAttribute(name, value);\n }\n }\n else {\n el.setAttribute(name, value);\n }\n }\n removeAttribute(el, name, namespace) {\n if (namespace) {\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\n el.removeAttribute(`${namespace}:${name}`);\n }\n }\n else {\n el.removeAttribute(name);\n }\n }\n addClass(el, name) {\n el.classList.add(name);\n }\n removeClass(el, name) {\n el.classList.remove(name);\n }\n setStyle(el, style, value, flags) {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n }\n else {\n el.style[style] = value;\n }\n }\n removeStyle(el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n // removeProperty has no effect when used on camelCased properties.\n el.style.removeProperty(style);\n }\n else {\n el.style[style] = '';\n }\n }\n setProperty(el, name, value) {\n NG_DEV_MODE$1 && checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n setValue(node, value) {\n node.nodeValue = value;\n }\n listen(target, event, callback) {\n NG_DEV_MODE$1 && checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n }\n}\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(`Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n }\n}\nfunction isTemplateNode(node) {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, hostEl, component) {\n super(eventManager);\n this.sharedStylesHost = sharedStylesHost;\n this.hostEl = hostEl;\n this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n this.sharedStylesHost.addHost(this.shadowRoot);\n const styles = flattenStyles(component.id, component.styles);\n for (const style of styles) {\n const styleEl = document.createElement('style');\n styleEl.textContent = style;\n this.shadowRoot.appendChild(styleEl);\n }\n }\n nodeOrShadowRoot(node) {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n appendChild(parent, newChild) {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n insertBefore(parent, newChild, refChild) {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n removeChild(parent, oldChild) {\n return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n }\n parentNode(node) {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n destroy() {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n}\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestory, compId = component.id) {\n super(eventManager);\n this.sharedStylesHost = sharedStylesHost;\n this.removeStylesOnCompDestory = removeStylesOnCompDestory;\n this.rendererUsageCount = 0;\n this.styles = flattenStyles(compId, component.styles);\n }\n applyStyles() {\n this.sharedStylesHost.addStyles(this.styles);\n this.rendererUsageCount++;\n }\n destroy() {\n if (!this.removeStylesOnCompDestory) {\n return;\n }\n this.sharedStylesHost.removeStyles(this.styles);\n this.rendererUsageCount--;\n if (this.rendererUsageCount === 0) {\n this.onDestroy?.();\n }\n }\n}\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestory) {\n const compId = appId + '-' + component.id;\n super(eventManager, sharedStylesHost, component, removeStylesOnCompDestory, compId);\n this.contentAttr = shimContentAttribute(compId);\n this.hostAttr = shimHostAttribute(compId);\n }\n applyToHost(element) {\n this.applyStyles();\n this.setAttribute(element, this.hostAttr, '');\n }\n createElement(parent, name) {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\n }\n}\n\nclass DomEventsPlugin extends EventManagerPlugin {\n constructor(doc) {\n super(doc);\n }\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n supports(eventName) {\n return true;\n }\n addEventListener(element, eventName, handler) {\n element.addEventListener(eventName, handler, false);\n return () => this.removeEventListener(element, eventName, handler);\n }\n removeEventListener(target, eventName, callback) {\n return target.removeEventListener(eventName, callback);\n }\n}\nDomEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap = {\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS'\n};\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS = {\n 'alt': (event) => event.altKey,\n 'control': (event) => event.ctrlKey,\n 'meta': (event) => event.metaKey,\n 'shift': (event) => event.shiftKey\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nclass KeyEventsPlugin extends EventManagerPlugin {\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n constructor(doc) {\n super(doc);\n }\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n supports(eventName) {\n return KeyEventsPlugin.parseEventName(eventName) != null;\n }\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n addEventListener(element, eventName, handler) {\n const parsedEvent = KeyEventsPlugin.parseEventName(eventName);\n const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n return this.manager.getZone().runOutsideAngular(() => {\n return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n }\n /**\n * Parses the user provided full keyboard event definition and normalizes it for\n * later internal use. It ensures the string is all lowercase, converts special\n * characters to a standard spelling, and orders all the values consistently.\n *\n * @param eventName The name of the key event to listen for.\n * @returns an object with the full, normalized string, and the dom event name\n * or null in the case when the event doesn't match a keyboard event.\n */\n static parseEventName(eventName) {\n const parts = eventName.toLowerCase().split('.');\n const domEventName = parts.shift();\n if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n const key = KeyEventsPlugin._normalizeKey(parts.pop());\n let fullKey = '';\n let codeIX = parts.indexOf('code');\n if (codeIX > -1) {\n parts.splice(codeIX, 1);\n fullKey = 'code.';\n }\n MODIFIER_KEYS.forEach(modifierName => {\n const index = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n // The code must remain in the `result['domEventName']` form.\n // return {domEventName, fullKey};\n const result = {};\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n }\n /**\n * Determines whether the actual keys pressed match the configured key code string.\n * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n * event is attached to the DOM during the `addEventListener` call. This is unseen\n * by the end user and is normalized for internal consistency and parsing.\n *\n * @param event The keyboard event.\n * @param fullKeyCode The normalized user defined expected key event string\n * @returns boolean.\n */\n static matchEventFullKeyCode(event, fullKeyCode) {\n let keycode = _keyMap[event.key] || event.key;\n let key = '';\n if (fullKeyCode.indexOf('code.') > -1) {\n keycode = event.code;\n key = 'code.';\n }\n // the keycode could be unidentified so we have to check here\n if (keycode == null || !keycode)\n return false;\n keycode = keycode.toLowerCase();\n if (keycode === ' ') {\n keycode = 'space'; // for readability\n }\n else if (keycode === '.') {\n keycode = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach(modifierName => {\n if (modifierName !== keycode) {\n const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n key += modifierName + '.';\n }\n }\n });\n key += keycode;\n return key === fullKeyCode;\n }\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n static eventCallback(fullKey, handler, zone) {\n return (event) => {\n if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n zone.runGuarded(() => handler(event));\n }\n };\n }\n /** @internal */\n static _normalizeKey(keyName) {\n // TODO: switch to a Map if the mapping grows too much\n switch (keyName) {\n case 'esc':\n return 'escape';\n default:\n return keyName;\n }\n }\n}\nKeyEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nKeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: KeyEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n * ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(SomeNgModule)\n * ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction bootstrapApplication(rootComponent, options) {\n return ɵinternalCreateApplication({ rootComponent, ...createProvidersConfig(options) });\n}\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction createApplication(options) {\n return ɵinternalCreateApplication(createProvidersConfig(options));\n}\nfunction createProvidersConfig(options) {\n return {\n appProviders: [\n ...BROWSER_MODULE_PROVIDERS,\n ...(options?.providers ?? []),\n ],\n platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS\n };\n}\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n * available for testing using Protractor.\n *\n * @publicApi\n */\nfunction provideProtractorTestingSupport() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideProtractorTestingSupport` call results in app code.\n return [...TESTABILITY_PROVIDERS];\n}\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n}\nfunction errorHandler() {\n return new ErrorHandler();\n}\nfunction _document() {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n { provide: PLATFORM_ID, useValue: ɵPLATFORM_BROWSER_ID },\n { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nconst platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(NG_DEV_MODE ? 'BrowserModule Providers Marker' : '');\nconst TESTABILITY_PROVIDERS = [\n {\n provide: ɵTESTABILITY_GETTER,\n useClass: BrowserGetTestability,\n deps: [],\n },\n {\n provide: ɵTESTABILITY,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n },\n {\n provide: Testability,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n }\n];\nconst BROWSER_MODULE_PROVIDERS = [\n { provide: ɵINJECTOR_SCOPE, useValue: 'root' },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] }, {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n deps: [DOCUMENT, NgZone, PLATFORM_ID]\n },\n { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT] }, {\n provide: DomRendererFactory2,\n useClass: DomRendererFactory2,\n deps: [EventManager, DomSharedStylesHost, APP_ID, REMOVE_STYLES_ON_COMPONENT_DESTROY]\n },\n { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT] },\n { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n { provide: XhrFactory, useClass: BrowserXhr, deps: [] },\n NG_DEV_MODE ? { provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true } : []\n];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\nclass BrowserModule {\n constructor(providersAlreadyPresent) {\n if (NG_DEV_MODE && providersAlreadyPresent) {\n throw new Error(`Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`);\n }\n }\n /**\n * Configures a browser-based app to transition from a server-rendered app, if\n * one is present on the page.\n *\n * @param params An object containing an identifier for the app to transition.\n * The ID must match between the client and server versions of the app.\n * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n */\n static withServerTransition(params) {\n return {\n ngModule: BrowserModule,\n providers: [\n { provide: APP_ID, useValue: params.appId },\n { provide: TRANSITION_ID, useExisting: APP_ID },\n SERVER_TRANSITION_PROVIDERS,\n ],\n };\n }\n}\nBrowserModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });\nBrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserModule, providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ], imports: [CommonModule, ApplicationModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ],\n exports: [CommonModule, ApplicationModule],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [BROWSER_MODULE_PROVIDERS_MARKER]\n }] }]; } });\n\n/**\n * Factory to create a `Meta` service instance for the current DOM document.\n */\nfunction createMeta() {\n return new Meta(ɵɵinject(DOCUMENT));\n}\n/**\n * A service for managing HTML `` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\nclass Meta {\n constructor(_doc) {\n this._doc = _doc;\n this._dom = ɵgetDOM();\n }\n /**\n * Retrieves or creates a specific `` tag element in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * If an existing element is found, it is returned and is not modified in any way.\n * @param tag The definition of a `` element to match or create.\n * @param forceCreation True to create a new element without checking whether one already exists.\n * @returns The existing element with the same attributes and values if found,\n * the new element if no match is found, or `null` if the tag parameter is not defined.\n */\n addTag(tag, forceCreation = false) {\n if (!tag)\n return null;\n return this._getOrCreateElement(tag, forceCreation);\n }\n /**\n * Retrieves or creates a set of `` tag elements in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * @param tags An array of tag definitions to match or create.\n * @param forceCreation True to create new elements without checking whether they already exist.\n * @returns The matching elements if found, or the new elements.\n */\n addTags(tags, forceCreation = false) {\n if (!tags)\n return [];\n return tags.reduce((result, tag) => {\n if (tag) {\n result.push(this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n }\n /**\n * Retrieves a `` tag element in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching element, if any.\n */\n getTag(attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }\n /**\n * Retrieves a set of `` tag elements in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching elements, if any.\n */\n getTags(attrSelector) {\n if (!attrSelector)\n return [];\n const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n return list ? [].slice.call(list) : [];\n }\n /**\n * Modifies an existing `` tag element in the current HTML document.\n * @param tag The tag description with which to replace the existing tag content.\n * @param selector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n * replacement tag.\n * @return The modified element.\n */\n updateTag(tag, selector) {\n if (!tag)\n return null;\n selector = selector || this._parseSelector(tag);\n const meta = this.getTag(selector);\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n }\n /**\n * Removes an existing `` tag element from the current HTML document.\n * @param attrSelector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n */\n removeTag(attrSelector) {\n this.removeTagElement(this.getTag(attrSelector));\n }\n /**\n * Removes an existing `` tag element from the current HTML document.\n * @param meta The tag definition to match against to identify an existing tag.\n */\n removeTagElement(meta) {\n if (meta) {\n this._dom.remove(meta);\n }\n }\n _getOrCreateElement(meta, forceCreation = false) {\n if (!forceCreation) {\n const selector = this._parseSelector(meta);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n const elem = this.getTags(selector).filter(elem => this._containsAttributes(meta, elem))[0];\n if (elem !== undefined)\n return elem;\n }\n const element = this._dom.createElement('meta');\n this._setMetaElementAttributes(meta, element);\n const head = this._doc.getElementsByTagName('head')[0];\n head.appendChild(element);\n return element;\n }\n _setMetaElementAttributes(tag, el) {\n Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));\n return el;\n }\n _parseSelector(tag) {\n const attr = tag.name ? 'name' : 'property';\n return `${attr}=\"${tag[attr]}\"`;\n }\n _containsAttributes(tag, elem) {\n return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);\n }\n _getMetaKeyMap(prop) {\n return META_KEYS_MAP[prop] || prop;\n }\n}\nMeta.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nMeta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Meta, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP = {\n httpEquiv: 'http-equiv'\n};\n\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n return new Title(ɵɵinject(DOCUMENT));\n}\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nclass Title {\n constructor(_doc) {\n this._doc = _doc;\n }\n /**\n * Get the title of the current HTML document.\n */\n getTitle() {\n return this._doc.title;\n }\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n setTitle(newTitle) {\n this._doc.title = newTitle || '';\n }\n}\nTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nTitle.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Title, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n const ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n ng[name] = value;\n }\n}\n\nconst win = typeof window !== 'undefined' && window || {};\n\nclass ChangeDetectionPerfRecord {\n constructor(msPerTick, numTicks) {\n this.msPerTick = msPerTick;\n this.numTicks = numTicks;\n }\n}\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nclass AngularProfiler {\n constructor(ref) {\n this.appRef = ref.injector.get(ApplicationRef);\n }\n // tslint:disable:no-console\n /**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n *\n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n *\n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n *\n * ```\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n */\n timeChangeDetection(config) {\n const record = config && config['record'];\n const profileName = 'Change Detection';\n // Profiler is not available in Android browsers without dev tools opened\n const isProfilerAvailable = win.console.profile != null;\n if (record && isProfilerAvailable) {\n win.console.profile(profileName);\n }\n const start = performanceNow();\n let numTicks = 0;\n while (numTicks < 5 || (performanceNow() - start) < 500) {\n this.appRef.tick();\n numTicks++;\n }\n const end = performanceNow();\n if (record && isProfilerAvailable) {\n win.console.profileEnd(profileName);\n }\n const msPerTick = (end - start) / numTicks;\n win.console.log(`ran ${numTicks} change detection cycles`);\n win.console.log(`${msPerTick.toFixed(2)} ms per check`);\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n }\n}\nfunction performanceNow() {\n return win.performance && win.performance.now ? win.performance.now() :\n new Date().getTime();\n}\n\nconst PROFILER_GLOBAL_NAME = 'profiler';\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n * then hit Enter.\n *\n * @publicApi\n */\nfunction enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nfunction disableDebugTools() {\n exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n\nfunction escapeHtml(text) {\n const escapedText = {\n '&': '&a;',\n '\"': '&q;',\n '\\'': '&s;',\n '<': '&l;',\n '>': '&g;',\n };\n return text.replace(/[&\"'<>]/g, s => escapedText[s]);\n}\nfunction unescapeHtml(text) {\n const unescapedText = {\n '&a;': '&',\n '&q;': '\"',\n '&s;': '\\'',\n '&l;': '<',\n '&g;': '>',\n };\n return text.replace(/&[^;]+;/g, s => unescapedText[s]);\n}\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nfunction makeStateKey(key) {\n return key;\n}\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * The `TransferState` is available as an injectable token.\n * On the client, just inject this token using DI and use it, it will be lazily initialized.\n * On the server it's already included if `renderApplication` function is used. Otherwise, import\n * the `ServerTransferStateModule` module to make the `TransferState` available.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nclass TransferState {\n constructor() {\n this.store = {};\n this.onSerializeCallbacks = {};\n this.store = retrieveTransferredState(inject(DOCUMENT), inject(APP_ID));\n }\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n get(key, defaultValue) {\n return this.store[key] !== undefined ? this.store[key] : defaultValue;\n }\n /**\n * Set the value corresponding to a key.\n */\n set(key, value) {\n this.store[key] = value;\n }\n /**\n * Remove a key from the store.\n */\n remove(key) {\n delete this.store[key];\n }\n /**\n * Test whether a key exists in the store.\n */\n hasKey(key) {\n return this.store.hasOwnProperty(key);\n }\n /**\n * Indicates whether the state is empty.\n */\n get isEmpty() {\n return Object.keys(this.store).length === 0;\n }\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n onSerialize(key, callback) {\n this.onSerializeCallbacks[key] = callback;\n }\n /**\n * Serialize the current state of the store to JSON.\n */\n toJson() {\n // Call the onSerialize callbacks and put those values into the store.\n for (const key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n }\n catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n return JSON.stringify(this.store);\n }\n}\nTransferState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TransferState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TransferState, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TransferState, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction retrieveTransferredState(doc, appId) {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n const script = doc.getElementById(appId + '-state');\n let initialState = {};\n if (script && script.textContent) {\n try {\n // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n initialState = JSON.parse(unescapeHtml(script.textContent));\n }\n catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n return initialState;\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n * @deprecated no longer needed, you can inject the `TransferState` in an app without providing\n * this module.\n */\nclass BrowserTransferStateModule {\n}\nBrowserTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserTransferStateModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nclass By {\n /**\n * Match all nodes.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n static all() {\n return () => true;\n }\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n static css(selector) {\n return (debugElement) => {\n return debugElement.nativeElement != null ?\n elementMatches(debugElement.nativeElement, selector) :\n false;\n };\n }\n /**\n * Match nodes that have the given directive present.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n static directive(type) {\n return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1;\n }\n}\nfunction elementMatches(n, selector) {\n if (ɵgetDOM().isElementNode(n)) {\n return n.matches && n.matches(selector) ||\n n.msMatchesSelector && n.msMatchesSelector(selector) ||\n n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n }\n return false;\n}\n\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n // pan\n 'pan': true,\n 'panstart': true,\n 'panmove': true,\n 'panend': true,\n 'pancancel': true,\n 'panleft': true,\n 'panright': true,\n 'panup': true,\n 'pandown': true,\n // pinch\n 'pinch': true,\n 'pinchstart': true,\n 'pinchmove': true,\n 'pinchend': true,\n 'pinchcancel': true,\n 'pinchin': true,\n 'pinchout': true,\n // press\n 'press': true,\n 'pressup': true,\n // rotate\n 'rotate': true,\n 'rotatestart': true,\n 'rotatemove': true,\n 'rotateend': true,\n 'rotatecancel': true,\n // swipe\n 'swipe': true,\n 'swipeleft': true,\n 'swiperight': true,\n 'swipeup': true,\n 'swipedown': true,\n // tap\n 'tap': true,\n 'doubletap': true\n};\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @ngModule HammerModule\n * @publicApi\n */\nconst HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nconst HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nclass HammerGestureConfig {\n constructor() {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](https://hammerjs.github.io/).\n */\n this.events = [];\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](https://hammerjs.github.io/).\n *\n */\n this.overrides = {};\n }\n /**\n * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n buildHammer(element) {\n const mc = new Hammer(element, this.options);\n mc.get('pinch').set({ enable: true });\n mc.get('rotate').set({ enable: true });\n for (const eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n return mc;\n }\n}\nHammerGestureConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGestureConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGestureConfig, decorators: [{\n type: Injectable\n }] });\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\nclass HammerGesturesPlugin extends EventManagerPlugin {\n constructor(doc, _config, console, loader) {\n super(doc);\n this._config = _config;\n this.console = console;\n this.loader = loader;\n this._loaderPromise = null;\n }\n supports(eventName) {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n if (!window.Hammer && !this.loader) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this.console.warn(`The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n `loaded and no custom loader has been specified.`);\n }\n return false;\n }\n return true;\n }\n addEventListener(element, eventName, handler) {\n const zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!window.Hammer && this.loader) {\n this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader());\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n let cancelRegistration = false;\n let deregister = () => {\n cancelRegistration = true;\n };\n zone.runOutsideAngular(() => this._loaderPromise\n .then(() => {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!window.Hammer) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n }\n deregister = () => { };\n return;\n }\n if (!cancelRegistration) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to\n // removal.\n deregister = this.addEventListener(element, eventName, handler);\n }\n })\n .catch(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this.console.warn(`The \"${eventName}\" event cannot be bound because the custom ` +\n `Hammer.JS loader failed.`);\n }\n deregister = () => { };\n }));\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return () => {\n deregister();\n };\n }\n return zone.runOutsideAngular(() => {\n // Creating the manager bind events, must be done outside of angular\n const mc = this._config.buildHammer(element);\n const callback = function (eventObj) {\n zone.runGuarded(function () {\n handler(eventObj);\n });\n };\n mc.on(eventName, callback);\n return () => {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n }\n isCustomEvent(eventName) {\n return this._config.events.indexOf(eventName) > -1;\n }\n}\nHammerGesturesPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGesturesPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGesturesPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerGesturesPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: HammerGestureConfig, decorators: [{\n type: Inject,\n args: [HAMMER_GESTURE_CONFIG]\n }] }, { type: i0.ɵConsole }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [HAMMER_LOADER]\n }] }]; } });\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's EventManager.\n *\n * @publicApi\n */\nclass HammerModule {\n}\nHammerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerModule });\nHammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerModule, providers: [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HammerModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n ]\n }]\n }] });\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\nclass DomSanitizer {\n}\nDomSanitizer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]\n }] });\nfunction domSanitizerImplFactory(injector) {\n return new DomSanitizerImpl(injector.get(DOCUMENT));\n}\nclass DomSanitizerImpl extends DomSanitizer {\n constructor(_doc) {\n super();\n this._doc = _doc;\n }\n sanitize(ctx, value) {\n if (value == null)\n return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value;\n case SecurityContext.HTML:\n if (ɵallowSanitizationBypassAndThrow(value, \"HTML\" /* BypassType.Html */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeHtml(this._doc, String(value)).toString();\n case SecurityContext.STYLE:\n if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* BypassType.Style */)) {\n return ɵunwrapSafeValue(value);\n }\n return value;\n case SecurityContext.SCRIPT:\n if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* BypassType.Script */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error('unsafe value used in a script context');\n case SecurityContext.URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* BypassType.Url */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error(`unsafe value used in a resource URL context (see ${ɵXSS_SECURITY_URL})`);\n default:\n throw new Error(`Unexpected SecurityContext ${ctx} (see ${ɵXSS_SECURITY_URL})`);\n }\n }\n bypassSecurityTrustHtml(value) {\n return ɵbypassSanitizationTrustHtml(value);\n }\n bypassSecurityTrustStyle(value) {\n return ɵbypassSanitizationTrustStyle(value);\n }\n bypassSecurityTrustScript(value) {\n return ɵbypassSanitizationTrustScript(value);\n }\n bypassSecurityTrustUrl(value) {\n return ɵbypassSanitizationTrustUrl(value);\n }\n bypassSecurityTrustResourceUrl(value) {\n return ɵbypassSanitizationTrustResourceUrl(value);\n }\n}\nDomSanitizerImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DomSanitizerImpl, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, TransferState, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, provideProtractorTestingSupport, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, NAMESPACE_URIS as ɵNAMESPACE_URIS, SharedStylesHost as ɵSharedStylesHost, TRANSITION_ID as ɵTRANSITION_ID, escapeHtml as ɵescapeHtml, flattenStyles as ɵflattenStyles, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute };\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n","import { BehaviorSubject, Subject, Observable, pipe, asapScheduler } from 'rxjs';\nimport { filter, take, map, distinctUntilChanged, debounceTime } from 'rxjs/operators';\n\nfunction createState(...propsFactories) {\n const result = {\n config: {},\n state: {}\n };\n\n for (const {\n config,\n props\n } of propsFactories) {\n Object.assign(result.config, config);\n Object.assign(result.state, props);\n }\n\n return result;\n}\n\nconst batchInProgress = new BehaviorSubject(false);\nconst batchDone$ = batchInProgress.asObservable().pipe(filter(inProgress => !inProgress), take(1));\nfunction emitOnce(cb) {\n batchInProgress.next(true);\n const value = cb();\n batchInProgress.next(false);\n return value;\n}\n\n// this is internal object that's not exported to public API\nconst elfHooksRegistry = {};\n\nclass ElfHooks {\n registerPreStoreUpdate(fn) {\n elfHooksRegistry.preStoreUpdate = fn;\n }\n\n}\n\nconst elfHooks = new ElfHooks();\n\nconst registry = new Map();\nconst registryActions = new Subject();\nconst registry$ = registryActions.asObservable(); // @internal\n\nfunction addStore(store) {\n registry.set(store.name, store);\n registryActions.next({\n type: 'add',\n store\n });\n} // @internal\n\nfunction removeStore(store) {\n registry.delete(store.name);\n registryActions.next({\n type: 'remove',\n store\n });\n}\nfunction getStore(name) {\n return registry.get(name);\n}\nfunction getRegistry() {\n return registry;\n}\nfunction getStoresSnapshot() {\n const stores = {};\n registry.forEach((store, key) => {\n stores[key] = store.getValue();\n });\n return stores;\n}\n\nclass Store extends BehaviorSubject {\n constructor(storeDef) {\n super(storeDef.state);\n this.storeDef = storeDef;\n this.batchInProgress = false;\n this.context = {\n config: this.getConfig()\n };\n this.state = storeDef.state;\n this.initialState = this.getValue();\n addStore(this);\n }\n\n get name() {\n return this.storeDef.name;\n }\n\n getConfig() {\n return this.storeDef.config;\n }\n\n query(selector) {\n return selector(this.getValue());\n }\n\n update(...reducers) {\n const currentState = this.getValue();\n let nextState = reducers.reduce((value, reducer) => {\n value = reducer(value, this.context);\n return value;\n }, currentState);\n\n if (elfHooksRegistry.preStoreUpdate) {\n nextState = elfHooksRegistry.preStoreUpdate(currentState, nextState, this.name);\n }\n\n if (nextState !== currentState) {\n this.state = nextState;\n\n if (batchInProgress.getValue()) {\n if (!this.batchInProgress) {\n this.batchInProgress = true;\n batchDone$.subscribe(() => {\n super.next(this.state);\n this.batchInProgress = false;\n });\n }\n } else {\n super.next(this.state);\n }\n }\n }\n\n getValue() {\n return this.state;\n }\n\n reset() {\n this.update(() => this.initialState);\n }\n\n combine(observables) {\n let hasChange = true;\n const buffer = {};\n return new Observable(observer => {\n for (const [key, query] of Object.entries(observables)) {\n observer.add(query.subscribe(value => {\n buffer[key] = value;\n hasChange = true;\n }));\n }\n\n return this.subscribe({\n next() {\n if (hasChange) {\n observer.next(buffer);\n hasChange = false;\n }\n },\n\n error(e) {\n observer.error(e);\n },\n\n complete() {\n observer.complete();\n }\n\n });\n });\n }\n\n destroy() {\n removeStore(this);\n }\n\n next(value) {\n this.update(() => value);\n } // eslint-disable-next-line @typescript-eslint/no-empty-function\n\n\n error() {} // eslint-disable-next-line @typescript-eslint/no-empty-function\n\n\n complete() {}\n\n}\n\nfunction createStore(storeConfig, ...propsFactories) {\n const {\n state,\n config\n } = createState(...propsFactories);\n const {\n name\n } = storeConfig;\n return new Store({\n name,\n state,\n config\n });\n}\n\nfunction coerceArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isUndefined(value) {\n return value === undefined;\n}\nfunction isString(value) {\n return typeof value === 'string';\n}\nfunction capitalize(key) {\n return key.charAt(0).toUpperCase() + key.slice(1);\n}\nfunction isObject(item) {\n return typeof item === 'object' && !Array.isArray(item) && item !== null;\n}\nfunction deepFreeze(o) {\n Object.freeze(o);\n const oIsFunction = typeof o === 'function';\n const hasOwnProp = Object.prototype.hasOwnProperty;\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (hasOwnProp.call(o, prop) && (oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true) && o[prop] !== null && (typeof o[prop] === 'object' || typeof o[prop] === 'function') && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n return o;\n}\n\n/**\r\n *\r\n * Update a root property of the state\r\n *\r\n * @example\r\n *\r\n * store.update(setProp('foo', 'bar'))\r\n *\r\n * @example\r\n *\r\n * store.update(setProp('count', count => count + 1))\r\n *\r\n */\n\nfunction setProp(key, value) {\n return function (state) {\n return Object.assign({}, state, {\n [key]: isFunction(value) ? value(state[key]) : value\n });\n };\n}\n/**\r\n *\r\n * Update a root property of the state\r\n *\r\n * @example\r\n *\r\n * store.update(setProps({ count: 1, bar: 'baz'}))\r\n *\r\n * @example\r\n *\r\n * store.update(setProps(state => ({\r\n * count: 1,\r\n * nested: {\r\n * ...state.nested,\r\n * foo: 'bar'\r\n * }\r\n * })))\r\n *\r\n */\n\nfunction setProps(props) {\n return function (state) {\n return Object.assign({}, state, isFunction(props) ? props(state) : props);\n };\n}\n\nfunction select(mapFn) {\n return pipe(map(mapFn), distinctUntilChanged());\n}\nfunction head() {\n return map(arr => arr[0]);\n}\nfunction distinctUntilArrayItemChanged() {\n return distinctUntilChanged((prevCollection, currentCollection) => {\n if (prevCollection === currentCollection) {\n return true;\n }\n\n if (prevCollection.length !== currentCollection.length) {\n return false;\n }\n\n const isOneOfItemReferenceChanged = currentCollection.some((item, i) => {\n return prevCollection[i] !== item;\n }); // return false means there is a change and we want to call next()\n\n return !isOneOfItemReferenceChanged;\n });\n}\nconst asap = () => debounceTime(0, asapScheduler);\nfunction filterNil() {\n return filter(value => value !== null && value !== undefined);\n}\n\nfunction propsFactory(key, {\n initialValue,\n config\n}) {\n const normalizedKey = capitalize(key);\n return {\n [`with${normalizedKey}`](value = initialValue) {\n return {\n props: {\n [key]: value\n },\n config\n };\n },\n\n [`set${normalizedKey}`](value) {\n return function (state) {\n const newVal = isFunction(value) ? value(state) : value;\n\n if (newVal === state[key]) {\n return state;\n }\n\n return Object.assign({}, state, {\n [key]: newVal\n });\n };\n },\n\n [`update${normalizedKey}`](value) {\n return function (state) {\n const newVal = isFunction(value) ? value(state) : value;\n\n if (newVal === state[key]) {\n return state;\n }\n\n return Object.assign({}, state, {\n [key]: isObject(newVal) ? Object.assign({}, state[key], newVal) : newVal\n });\n };\n },\n\n [`reset${normalizedKey}`]() {\n return function (state) {\n return Object.assign({}, state, {\n [key]: initialValue\n });\n };\n },\n\n [`select${normalizedKey}`]() {\n return select(state => state[key]);\n },\n\n [`get${normalizedKey}`](state) {\n return state[key];\n }\n\n };\n}\n\nfunction propsArrayFactory(key, options) {\n const normalizedKey = capitalize(key);\n const base = propsFactory(key, options);\n return Object.assign({}, base, {\n [`add${normalizedKey}`](items) {\n return function (state) {\n return Object.assign({}, state, {\n [key]: arrayAdd(state[key], items)\n });\n };\n },\n\n [`remove${normalizedKey}`](items) {\n return function (state) {\n return Object.assign({}, state, {\n [key]: arrayRemove(state[key], items)\n });\n };\n },\n\n [`toggle${normalizedKey}`](items) {\n return function (state) {\n return Object.assign({}, state, {\n [key]: arrayToggle(state[key], items)\n });\n };\n },\n\n [`update${normalizedKey}`](predicateOrIds, obj) {\n return function (state) {\n return Object.assign({}, state, {\n [key]: arrayUpdate(state[key], predicateOrIds, obj)\n });\n };\n },\n\n [`in${normalizedKey}`](item) {\n return state => inArray(state[key], item);\n }\n\n });\n}\nfunction arrayAdd(arr, items) {\n return [...arr, ...coerceArray(items)];\n}\nfunction arrayRemove(arr, items) {\n const toArray = coerceArray(items);\n return arr.filter(current => !toArray.includes(current));\n}\nfunction arrayToggle(arr, items) {\n const toArray = coerceArray(items);\n const result = [...arr];\n toArray.forEach(item => {\n const i = result.indexOf(item);\n i > -1 ? result.splice(i, 1) : result.push(item);\n });\n return result;\n}\nfunction inArray(arr, item) {\n return arr.includes(item);\n}\nfunction arrayUpdate(arr, item, newItem) {\n return arr.map(current => {\n return current === item ? newItem : current;\n });\n}\n\nfunction withProps(props) {\n return {\n props,\n config: undefined\n };\n}\n\nlet __DEV__ = true;\nfunction enableElfProdMode() {\n __DEV__ = false;\n} // @internal\n\nfunction isDev() {\n return __DEV__;\n}\n\nexport { Store, asap, capitalize, coerceArray, createState, createStore, deepFreeze, distinctUntilArrayItemChanged, elfHooks, emitOnce, enableElfProdMode, filterNil, getRegistry, getStore, getStoresSnapshot, head, isDev, isFunction, isObject, isString, isUndefined, propsArrayFactory, propsFactory, registry$, select, setProp, setProps, withProps };\n","import { filter } from './filter';\nexport function skip(count) {\n return filter((_, index) => count <= index);\n}\n","import { getRegistry, registry$, capitalize, getStoresSnapshot, getStore } from '@ngneat/elf';\nimport { Subject } from 'rxjs';\nimport { skip } from 'rxjs/operators';\n\nconst externalEvents$ = new Subject();\nfunction send(action) {\n externalEvents$.next(action);\n}\nfunction devTools(options = {}) {\n if (!window.__REDUX_DEVTOOLS_EXTENSION__) return;\n let lock = false;\n\n const instance = window.__REDUX_DEVTOOLS_EXTENSION__.connect(options);\n\n const subscriptions = new Map();\n\n const send = action => {\n instance.send(action, getStoresSnapshot());\n };\n\n subscriptions.set('externalSend', externalEvents$.subscribe(send));\n\n const addStore = store => {\n const name = store.name;\n const displayName = capitalize(name);\n send({\n type: `[${displayName}] - @Init`\n });\n const update = store.pipe(skip(1)).subscribe(() => {\n if (lock) {\n lock = false;\n return;\n }\n\n options.preAction == null ? void 0 : options.preAction();\n send({\n type: `[${displayName}] - Update`\n });\n });\n subscriptions.set(name, update);\n }; // There should be support for stores that were created before we initialized the `devTools`\n\n\n getRegistry().forEach(addStore);\n\n if (options.actionsDispatcher) {\n subscriptions.set('actionsDispatcher', options.actionsDispatcher.subscribe(action => {\n send(action);\n }));\n }\n\n const subscription = registry$.subscribe(({\n store,\n type\n }) => {\n const name = store.name;\n const displayName = capitalize(name);\n\n if (type === 'add') {\n addStore(store);\n }\n\n if (type === 'remove') {\n var _subscriptions$get;\n\n (_subscriptions$get = subscriptions.get(name)) == null ? void 0 : _subscriptions$get.unsubscribe();\n subscriptions.delete(name);\n send({\n type: `Remove ${displayName}`\n });\n }\n });\n const devtoolsDispose = instance.subscribe(message => {\n if (message.type === 'DISPATCH') {\n const payloadType = message.payload.type;\n\n if (payloadType === 'COMMIT') {\n instance.init(getStoresSnapshot());\n return;\n }\n\n if (payloadType === 'JUMP_TO_STATE' || payloadType === 'JUMP_TO_ACTION') {\n const state = JSON.parse(message.state);\n\n for (const [name, value] of Object.entries(state)) {\n var _getStore;\n\n lock = true;\n (_getStore = getStore(name)) == null ? void 0 : _getStore.update(() => value);\n }\n\n options.postTimelineUpdate == null ? void 0 : options.postTimelineUpdate();\n }\n }\n });\n return {\n unsubscribe() {\n subscription.unsubscribe();\n instance.unsubscribe();\n subscriptions.forEach(sub => sub.unsubscribe());\n devtoolsDispose();\n }\n\n };\n}\n\nexport { devTools, send };\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n const scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i1 from '@angular/common';\nimport { DOCUMENT, ɵparseCookieValue, XhrFactory as XhrFactory$1 } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, inject, Inject, PLATFORM_ID, makeEnvironmentProviders, NgModule } from '@angular/core';\nimport { of, Observable } from 'rxjs';\nimport { concatMap, filter, map } from 'rxjs/operators';\n\n/**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\nclass HttpHandler {\n}\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\nclass HttpBackend {\n}\n\n/**\n * Represents the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\nclass HttpHeaders {\n /** Constructs a new HTTP header object with the given values.*/\n constructor(headers) {\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n this.normalizedNames = new Map();\n /**\n * Queued updates to be materialized the next initialization.\n */\n this.lazyUpdate = null;\n if (!headers) {\n this.headers = new Map();\n }\n else if (typeof headers === 'string') {\n this.lazyInit = () => {\n this.headers = new Map();\n headers.split('\\n').forEach(line => {\n const index = line.indexOf(':');\n if (index > 0) {\n const name = line.slice(0, index);\n const key = name.toLowerCase();\n const value = line.slice(index + 1).trim();\n this.maybeSetNormalizedName(name, key);\n if (this.headers.has(key)) {\n this.headers.get(key).push(value);\n }\n else {\n this.headers.set(key, [value]);\n }\n }\n });\n };\n }\n else {\n this.lazyInit = () => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertValidHeaders(headers);\n }\n this.headers = new Map();\n Object.entries(headers).forEach(([name, values]) => {\n let headerValues;\n if (typeof values === 'string') {\n headerValues = [values];\n }\n else if (typeof values === 'number') {\n headerValues = [values.toString()];\n }\n else {\n headerValues = values.map((value) => value.toString());\n }\n if (headerValues.length > 0) {\n const key = name.toLowerCase();\n this.headers.set(key, headerValues);\n this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of a given header.\n *\n * @param name The header name to check for existence.\n *\n * @returns True if the header exists, false otherwise.\n */\n has(name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n }\n /**\n * Retrieves the first value of a given header.\n *\n * @param name The header name.\n *\n * @returns The value string if the header exists, null otherwise\n */\n get(name) {\n this.init();\n const values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n }\n /**\n * Retrieves the names of the headers.\n *\n * @returns A list of header names.\n */\n keys() {\n this.init();\n return Array.from(this.normalizedNames.values());\n }\n /**\n * Retrieves a list of values for a given header.\n *\n * @param name The header name from which to retrieve values.\n *\n * @returns A string of values if the header exists, null otherwise.\n */\n getAll(name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n }\n /**\n * Appends a new value to the existing set of values for a header\n * and returns them in a clone of the original instance.\n *\n * @param name The header name for which to append the values.\n * @param value The value to append.\n *\n * @returns A clone of the HTTP headers object with the value appended to the given header.\n */\n append(name, value) {\n return this.clone({ name, value, op: 'a' });\n }\n /**\n * Sets or modifies a value for a given header in a clone of the original instance.\n * If the header already exists, its value is replaced with the given value\n * in the returned object.\n *\n * @param name The header name.\n * @param value The value or values to set or override for the given header.\n *\n * @returns A clone of the HTTP headers object with the newly set header value.\n */\n set(name, value) {\n return this.clone({ name, value, op: 's' });\n }\n /**\n * Deletes values for a given header in a clone of the original instance.\n *\n * @param name The header name.\n * @param value The value or values to delete for the given header.\n *\n * @returns A clone of the HTTP headers object with the given value deleted.\n */\n delete(name, value) {\n return this.clone({ name, value, op: 'd' });\n }\n maybeSetNormalizedName(name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n }\n init() {\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(update => this.applyUpdate(update));\n this.lazyUpdate = null;\n }\n }\n }\n copyFrom(other) {\n other.init();\n Array.from(other.headers.keys()).forEach(key => {\n this.headers.set(key, other.headers.get(key));\n this.normalizedNames.set(key, other.normalizedNames.get(key));\n });\n }\n clone(update) {\n const clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n }\n applyUpdate(update) {\n const key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n let value = update.value;\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push(...value);\n this.headers.set(key, base);\n break;\n case 'd':\n const toDelete = update.value;\n if (!toDelete) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n let existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(value => toDelete.indexOf(value) === -1);\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n }\n /**\n * @internal\n */\n forEach(fn) {\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));\n }\n}\n/**\n * Verifies that the headers object has the right shape: the values\n * must be either strings, numbers or arrays. Throws an error if an invalid\n * header value is present.\n */\nfunction assertValidHeaders(headers) {\n for (const [key, value] of Object.entries(headers)) {\n if (!(typeof value === 'string' || typeof value === 'number') && !Array.isArray(value)) {\n throw new Error(`Unexpected value of the \\`${key}\\` header provided. ` +\n `Expecting either a string, a number or an array, but got: \\`${value}\\`.`);\n }\n }\n}\n\n/**\n * Provides encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\nclass HttpUrlEncodingCodec {\n /**\n * Encodes a key name for a URL parameter or query-string.\n * @param key The key name.\n * @returns The encoded key name.\n */\n encodeKey(key) {\n return standardEncoding(key);\n }\n /**\n * Encodes the value of a URL parameter or query-string.\n * @param value The value.\n * @returns The encoded value.\n */\n encodeValue(value) {\n return standardEncoding(value);\n }\n /**\n * Decodes an encoded URL parameter or query-string key.\n * @param key The encoded key name.\n * @returns The decoded key name.\n */\n decodeKey(key) {\n return decodeURIComponent(key);\n }\n /**\n * Decodes an encoded URL parameter or query-string value.\n * @param value The encoded value.\n * @returns The decoded value.\n */\n decodeValue(value) {\n return decodeURIComponent(value);\n }\n}\nfunction paramParser(rawParams, codec) {\n const map = new Map();\n if (rawParams.length > 0) {\n // The `window.location.search` can be used while creating an instance of the `HttpParams` class\n // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`\n // may start with the `?` char, so we strip it if it's present.\n const params = rawParams.replace(/^\\?/, '').split('&');\n params.forEach((param) => {\n const eqIdx = param.indexOf('=');\n const [key, val] = eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n const list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * Encode input string with standard encodeURIComponent and then un-encode specific characters.\n */\nconst STANDARD_ENCODING_REGEX = /%(\\d[a-f0-9])/gi;\nconst STANDARD_ENCODING_REPLACEMENTS = {\n '40': '@',\n '3A': ':',\n '24': '$',\n '2C': ',',\n '3B': ';',\n '3D': '=',\n '3F': '?',\n '2F': '/',\n};\nfunction standardEncoding(v) {\n return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? s);\n}\nfunction valueToString(value) {\n return `${value}`;\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\nclass HttpParams {\n constructor(options = {}) {\n this.updates = null;\n this.cloneFrom = null;\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(`Cannot specify both fromString and fromObject.`);\n }\n this.map = paramParser(options.fromString, this.encoder);\n }\n else if (!!options.fromObject) {\n this.map = new Map();\n Object.keys(options.fromObject).forEach(key => {\n const value = options.fromObject[key];\n // convert the values to strings\n const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];\n this.map.set(key, values);\n });\n }\n else {\n this.map = null;\n }\n }\n /**\n * Reports whether the body includes one or more values for a given parameter.\n * @param param The parameter name.\n * @returns True if the parameter has one or more values,\n * false if it has no value or is not present.\n */\n has(param) {\n this.init();\n return this.map.has(param);\n }\n /**\n * Retrieves the first value for a parameter.\n * @param param The parameter name.\n * @returns The first value of the given parameter,\n * or `null` if the parameter is not present.\n */\n get(param) {\n this.init();\n const res = this.map.get(param);\n return !!res ? res[0] : null;\n }\n /**\n * Retrieves all values for a parameter.\n * @param param The parameter name.\n * @returns All values in a string array,\n * or `null` if the parameter not present.\n */\n getAll(param) {\n this.init();\n return this.map.get(param) || null;\n }\n /**\n * Retrieves all the parameters for this body.\n * @returns The parameter names in a string array.\n */\n keys() {\n this.init();\n return Array.from(this.map.keys());\n }\n /**\n * Appends a new value to existing values for a parameter.\n * @param param The parameter name.\n * @param value The new value to add.\n * @return A new body with the appended value.\n */\n append(param, value) {\n return this.clone({ param, value, op: 'a' });\n }\n /**\n * Constructs a new body with appended values for the given parameter name.\n * @param params parameters and values\n * @return A new body with the new value.\n */\n appendAll(params) {\n const updates = [];\n Object.keys(params).forEach(param => {\n const value = params[param];\n if (Array.isArray(value)) {\n value.forEach(_value => {\n updates.push({ param, value: _value, op: 'a' });\n });\n }\n else {\n updates.push({ param, value: value, op: 'a' });\n }\n });\n return this.clone(updates);\n }\n /**\n * Replaces the value for a parameter.\n * @param param The parameter name.\n * @param value The new value.\n * @return A new body with the new value.\n */\n set(param, value) {\n return this.clone({ param, value, op: 's' });\n }\n /**\n * Removes a given value or all values from a parameter.\n * @param param The parameter name.\n * @param value The value to remove, if provided.\n * @return A new body with the given value removed, or with all values\n * removed if no value is specified.\n */\n delete(param, value) {\n return this.clone({ param, value, op: 'd' });\n }\n /**\n * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n toString() {\n this.init();\n return this.keys()\n .map(key => {\n const eKey = this.encoder.encodeKey(key);\n // `a: ['1']` produces `'a=1'`\n // `b: []` produces `''`\n // `c: ['1', '2']` produces `'c=1&c=2'`\n return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value))\n .join('&');\n })\n // filter out empty values because `b: []` produces `''`\n // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't\n .filter(param => param !== '')\n .join('&');\n }\n clone(update) {\n const clone = new HttpParams({ encoder: this.encoder });\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat(update);\n return clone;\n }\n init() {\n if (this.map === null) {\n this.map = new Map();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key)));\n this.updates.forEach(update => {\n switch (update.op) {\n case 'a':\n case 's':\n const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || [];\n base.push(valueToString(update.value));\n this.map.set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n let base = this.map.get(update.param) || [];\n const idx = base.indexOf(valueToString(update.value));\n if (idx !== -1) {\n base.splice(idx, 1);\n }\n if (base.length > 0) {\n this.map.set(update.param, base);\n }\n else {\n this.map.delete(update.param);\n }\n }\n else {\n this.map.delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = this.updates = null;\n }\n }\n}\n\n/**\n * A token used to manipulate and access values stored in `HttpContext`.\n *\n * @publicApi\n */\nclass HttpContextToken {\n constructor(defaultValue) {\n this.defaultValue = defaultValue;\n }\n}\n/**\n * Http context stores arbitrary user defined values and ensures type safety without\n * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.\n *\n * This context is mutable and is shared between cloned requests unless explicitly specified.\n *\n * @usageNotes\n *\n * ### Usage Example\n *\n * ```typescript\n * // inside cache.interceptors.ts\n * export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);\n *\n * export class CacheInterceptor implements HttpInterceptor {\n *\n * intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {\n * if (req.context.get(IS_CACHE_ENABLED) === true) {\n * return ...;\n * }\n * return delegate.handle(req);\n * }\n * }\n *\n * // inside a service\n *\n * this.httpClient.get('/api/weather', {\n * context: new HttpContext().set(IS_CACHE_ENABLED, true)\n * }).subscribe(...);\n * ```\n *\n * @publicApi\n */\nclass HttpContext {\n constructor() {\n this.map = new Map();\n }\n /**\n * Store a value in the context. If a value is already present it will be overwritten.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n * @param value The value to store.\n *\n * @returns A reference to itself for easy chaining.\n */\n set(token, value) {\n this.map.set(token, value);\n return this;\n }\n /**\n * Retrieve the value associated with the given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns The stored value or default if one is defined.\n */\n get(token) {\n if (!this.map.has(token)) {\n this.map.set(token, token.defaultValue());\n }\n return this.map.get(token);\n }\n /**\n * Delete the value associated with the given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns A reference to itself for easy chaining.\n */\n delete(token) {\n this.map.delete(token);\n return this;\n }\n /**\n * Checks for existence of a given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns True if the token exists, false otherwise.\n */\n has(token) {\n return this.map.has(token);\n }\n /**\n * @returns a list of tokens currently stored in the context.\n */\n keys() {\n return this.map.keys();\n }\n}\n\n/**\n * Determine whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method) {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * Safely assert whether the given value is a URLSearchParams instance.\n *\n * In some execution environments URLSearchParams is not defined.\n */\nfunction isUrlSearchParams(value) {\n return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\nclass HttpRequest {\n constructor(method, url, third, fourth) {\n this.url = url;\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n this.body = null;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\n this.reportProgress = false;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n this.withCredentials = false;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n this.responseType = 'json';\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n let options;\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = (third !== undefined) ? third : null;\n options = fourth;\n }\n else {\n // No body required, options are the third argument. The body stays null.\n options = third;\n }\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n if (!!options.context) {\n this.context = options.context;\n }\n if (!!options.params) {\n this.params = options.params;\n }\n }\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n // If no context have been passed in, construct a new HttpContext instance.\n if (!this.context) {\n this.context = new HttpContext();\n }\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n }\n else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n const params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n }\n else {\n // Does the URL already have query parameters? Look for '?'.\n const qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n const sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n isUrlSearchParams(this.body) || typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n detectContentTypeHeader() {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, boolean and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n typeof this.body === 'boolean') {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n }\n clone(update = {}) {\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n const method = update.method || this.method;\n const url = update.url || this.url;\n const responseType = update.responseType || this.responseType;\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n const body = (update.body !== undefined) ? update.body : this.body;\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n const withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n const reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n let headers = update.headers || this.headers;\n let params = update.params || this.params;\n // Pass on context if needed\n const context = update.context ?? this.context;\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers);\n }\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce((params, param) => params.set(param, update.setParams[param]), params);\n }\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params,\n headers,\n context,\n reportProgress,\n responseType,\n withCredentials,\n });\n }\n}\n\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n * @publicApi\n */\nvar HttpEventType;\n(function (HttpEventType) {\n /**\n * The request was sent out over the wire.\n */\n HttpEventType[HttpEventType[\"Sent\"] = 0] = \"Sent\";\n /**\n * An upload progress event was received.\n */\n HttpEventType[HttpEventType[\"UploadProgress\"] = 1] = \"UploadProgress\";\n /**\n * The response status code and headers were received.\n */\n HttpEventType[HttpEventType[\"ResponseHeader\"] = 2] = \"ResponseHeader\";\n /**\n * A download progress event was received.\n */\n HttpEventType[HttpEventType[\"DownloadProgress\"] = 3] = \"DownloadProgress\";\n /**\n * The full response including the body was received.\n */\n HttpEventType[HttpEventType[\"Response\"] = 4] = \"Response\";\n /**\n * A custom event from an interceptor or a backend.\n */\n HttpEventType[HttpEventType[\"User\"] = 5] = \"User\";\n})(HttpEventType || (HttpEventType = {}));\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\nclass HttpResponseBase {\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n */\n constructor(init, defaultStatus = 200 /* HttpStatusCode.Ok */, defaultStatusText = 'OK') {\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n}\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\nclass HttpHeaderResponse extends HttpResponseBase {\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n */\n constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n clone(update = {}) {\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\nclass HttpResponse extends HttpResponseBase {\n /**\n * Construct a new `HttpResponse`.\n */\n constructor(init = {}) {\n super(init);\n this.type = HttpEventType.Response;\n this.body = init.body !== undefined ? init.body : null;\n }\n clone(update = {}) {\n return new HttpResponse({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\nclass HttpErrorResponse extends HttpResponseBase {\n constructor(init) {\n // Initialize with a default status of 0 / Unknown Error.\n super(init, 0, 'Unknown Error');\n this.name = 'HttpErrorResponse';\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n this.ok = false;\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (this.status >= 200 && this.status < 300) {\n this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n }\n else {\n this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;\n }\n this.error = init.error || null;\n }\n}\n\n/**\n * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\nfunction addBody(options, body) {\n return {\n body,\n headers: options.headers,\n context: options.context,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n}\n/**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n *\n * @usageNotes\n * Sample HTTP requests for the [Tour of Heroes](/tutorial/tour-of-heroes/toh-pt0) application.\n *\n * ### HTTP Request Example\n *\n * ```\n * // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n * const params = new HttpParams({fromString: 'name=term'});\n * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n *\n * Alternatively, the parameter string can be used without invoking HttpParams\n * by directly joining to the URL.\n * ```\n * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});\n * ```\n *\n *\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n * return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42\n * return this.httpClient.patch(url, {name: heroName}, httpOptions)\n * .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n * @see [HTTP Request](api/common/http/HttpRequest)\n *\n * @publicApi\n */\nclass HttpClient {\n constructor(handler) {\n this.handler = handler;\n }\n /**\n * Constructs an observable for a generic HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * You can pass an `HttpRequest` directly as the only parameter. In this case,\n * the call returns an observable of the raw `HttpEvent` stream.\n *\n * Alternatively you can pass an HTTP method as the first parameter,\n * a URL string as the second, and an options hash containing the request body as the third.\n * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n * type of returned observable.\n * * The `responseType` value determines how a successful response body is parsed.\n * * If `responseType` is the default `json`, you can pass a type interface for the resulting\n * object as a type parameter to the call.\n *\n * The `observe` value determines the return type, according to what you are interested in\n * observing.\n * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n * progress events by default.\n * * An `observe` value of response returns an observable of `HttpResponse<T>`,\n * where the `T` parameter depends on the `responseType` and any optionally provided type\n * parameter.\n * * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n *\n */\n request(first, url, options = {}) {\n let req;\n // First, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = first;\n }\n else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming `GET` unless a method is\n // provided.\n // Figure out the headers.\n let headers = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n }\n else {\n headers = new HttpHeaders(options.headers);\n }\n // Sort out parameters.\n let params = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n }\n else {\n params = new HttpParams({ fromObject: options.params });\n }\n }\n // Construct the request.\n req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), {\n headers,\n context: options.context,\n params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n const events$ = of(req).pipe(concatMap((req) => this.handler.handle(req)));\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n const res$ = events$.pipe(filter((event) => event instanceof HttpResponse));\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return res$.pipe(map((res) => {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n }));\n case 'blob':\n return res$.pipe(map((res) => {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n }));\n case 'text':\n return res$.pipe(map((res) => {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n }));\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return res$.pipe(map((res) => res.body));\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n }\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `DELETE` request to execute on the server. See the individual overloads for\n * details on the return type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n */\n delete(url, options = {}) {\n return this.request('DELETE', url, options);\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `GET` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n get(url, options = {}) {\n return this.request('GET', url, options);\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `HEAD` request to execute on the server. The `HEAD` method returns\n * meta information about the resource without transferring the\n * resource itself. See the individual overloads for\n * details on the return type.\n */\n head(url, options = {}) {\n return this.request('HEAD', url, options);\n }\n /**\n * Constructs an `Observable` that, when subscribed, causes a request with the special method\n * `JSONP` to be dispatched via the interceptor pipeline.\n * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n * API endpoints that don't support newer,\n * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n * application making the request.\n * The endpoint API must support JSONP callback for JSONP requests to work.\n * The resource API returns the JSON response wrapped in a callback function.\n * You can pass the callback function name as one of the query parameters.\n * Note that JSONP requests can only be used with `GET` requests.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n */\n jsonp(url, callbackParam) {\n return this.request('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n }\n /**\n * Constructs an `Observable` that, when subscribed, causes the configured\n * `OPTIONS` request to execute on the server. This method allows the client\n * to determine the supported HTTP methods and other capabilities of an endpoint,\n * without implying a resource action. See the individual overloads for\n * details on the return type.\n */\n options(url, options = {}) {\n return this.request('OPTIONS', url, options);\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PATCH` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n patch(url, body, options = {}) {\n return this.request('PATCH', url, addBody(options, body));\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `POST` request to execute on the server. The server responds with the location of\n * the replaced resource. See the individual overloads for\n * details on the return type.\n */\n post(url, body, options = {}) {\n return this.request('POST', url, addBody(options, body));\n }\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n * with a new set of values.\n * See the individual overloads for details on the return type.\n */\n put(url, body, options = {}) {\n return this.request('PUT', url, addBody(options, body));\n }\n}\nHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClient });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClient, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpHandler }]; } });\n\nfunction interceptorChainEndFn(req, finalHandlerFn) {\n return finalHandlerFn(req);\n}\n/**\n * Constructs a `ChainedInterceptorFn` which adapts a legacy `HttpInterceptor` to the\n * `ChainedInterceptorFn` interface.\n */\nfunction adaptLegacyInterceptorToChain(chainTailFn, interceptor) {\n return (initialRequest, finalHandlerFn) => interceptor.intercept(initialRequest, {\n handle: (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn),\n });\n}\n/**\n * Constructs a `ChainedInterceptorFn` which wraps and invokes a functional interceptor in the given\n * injector.\n */\nfunction chainedInterceptorFn(chainTailFn, interceptorFn, injector) {\n // clang-format off\n return (initialRequest, finalHandlerFn) => injector.runInContext(() => interceptorFn(initialRequest, downstreamRequest => chainTailFn(downstreamRequest, finalHandlerFn)));\n // clang-format on\n}\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nconst HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');\n/**\n * A multi-provided token of `HttpInterceptorFn`s.\n */\nconst HTTP_INTERCEPTOR_FNS = new InjectionToken('HTTP_INTERCEPTOR_FNS');\n/**\n * Creates an `HttpInterceptorFn` which lazily initializes an interceptor chain from the legacy\n * class-based interceptors and runs the request through it.\n */\nfunction legacyInterceptorFnFactory() {\n let chain = null;\n return (req, handler) => {\n if (chain === null) {\n const interceptors = inject(HTTP_INTERCEPTORS, { optional: true }) ?? [];\n // Note: interceptors are wrapped right-to-left so that final execution order is\n // left-to-right. That is, if `interceptors` is the array `[a, b, c]`, we want to\n // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n // out.\n chain = interceptors.reduceRight(adaptLegacyInterceptorToChain, interceptorChainEndFn);\n }\n return chain(req, handler);\n };\n}\nclass HttpInterceptorHandler extends HttpHandler {\n constructor(backend, injector) {\n super();\n this.backend = backend;\n this.injector = injector;\n this.chain = null;\n }\n handle(initialRequest) {\n if (this.chain === null) {\n const dedupedInterceptorFns = Array.from(new Set(this.injector.get(HTTP_INTERCEPTOR_FNS)));\n // Note: interceptors are wrapped right-to-left so that final execution order is\n // left-to-right. That is, if `dedupedInterceptorFns` is the array `[a, b, c]`, we want to\n // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n // out.\n this.chain = dedupedInterceptorFns.reduceRight((nextSequencedFn, interceptorFn) => chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector), interceptorChainEndFn);\n }\n return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest));\n }\n}\nHttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpInterceptorHandler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpInterceptorHandler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });\n\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nlet nextRequestId = 0;\n/**\n * When a pending <script> is unsubscribed we'll move it to this document, so it won't be\n * executed.\n */\nlet foreignDocument;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nconst JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nconst JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nconst JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n// Error text given when a request is passed to the JsonpClientBackend that has\n// headers set\nconst JSONP_ERR_HEADERS_NOT_SUPPORTED = 'JSONP requests do not support headers.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\nclass JsonpCallbackContext {\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\nfunction jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}\n/**\n * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see {@link HttpHandler}\n * @see {@link HttpXhrBackend}\n *\n * @publicApi\n */\nclass JsonpClientBackend {\n constructor(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n /**\n * A resolved promise that can be used to schedule microtasks in the event handlers.\n */\n this.resolvedPromise = Promise.resolve();\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n nextCallback() {\n return `ng_jsonp_callback_${nextRequestId++}`;\n }\n /**\n * Processes a JSONP request and returns an event stream of the results.\n * @param req The request object.\n * @returns An observable of the response events.\n *\n */\n handle(req) {\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Check the request headers. JSONP doesn't support headers and\n // cannot set any that were supplied.\n if (req.headers.keys().length > 0) {\n throw new Error(JSONP_ERR_HEADERS_NOT_SUPPORTED);\n }\n // Everything else happens inside the Observable boundary.\n return new Observable((observer) => {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n const callback = this.nextCallback();\n const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n // Construct the <script> tag and point it at the URL.\n const node = this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n let body = null;\n // Whether the response callback has been called.\n let finished = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n this.callbackMap[callback] = (data) => {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete this.callbackMap[callback];\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n const cleanup = () => {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n const onLoad = (event) => {\n // We wrap it in an extra Promise, to ensure the microtask\n // is scheduled after the loaded endpoint has executed any potential microtask itself,\n // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496\n this.resolvedPromise.then(() => {\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body,\n status: 200 /* HttpStatusCode.Ok */,\n statusText: 'OK',\n url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\n });\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n const onError = (error) => {\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error,\n status: 0,\n statusText: 'JSONP Error',\n url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: HttpEventType.Sent });\n // Cancellation handler.\n return () => {\n if (!finished) {\n this.removeListeners(node);\n }\n // And finally, clean up the page.\n cleanup();\n };\n });\n }\n removeListeners(script) {\n // Issue #34818\n // Changing <script>'s ownerDocument will prevent it from execution.\n // https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block\n if (!foreignDocument) {\n foreignDocument = this.document.implementation.createHTMLDocument();\n }\n foreignDocument.adoptNode(script);\n }\n}\nJsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpClientBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpClientBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/**\n * Identifies requests with the method JSONP and shifts them to the `JsonpClientBackend`.\n */\nfunction jsonpInterceptorFn(req, next) {\n if (req.method === 'JSONP') {\n return inject(JsonpClientBackend).handle(req);\n }\n // Fall through for normal HTTP requests.\n return next(req);\n}\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see {@link HttpInterceptor}\n *\n * @publicApi\n */\nclass JsonpInterceptor {\n constructor(injector) {\n this.injector = injector;\n }\n /**\n * Identifies and handles a given JSONP request.\n * @param initialRequest The outgoing request object to handle.\n * @param next The next interceptor in the chain, or the backend\n * if no interceptors remain in the chain.\n * @returns An observable of the event stream.\n */\n intercept(initialRequest, next) {\n return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));\n }\n}\nJsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: JsonpInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });\n\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr) {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see {@link HttpHandler}\n * @see {@link JsonpClientBackend}\n *\n * @publicApi\n */\nclass HttpXhrBackend {\n constructor(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Processes a request and returns a stream of response events.\n * @param req The request object.\n * @returns An observable of the response events.\n */\n handle(req) {\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the HttpClientJsonpModule\n if (req.method === 'JSONP') {\n throw new Error(`Attempted to construct Jsonp request without HttpClientJsonpModule installed.`);\n }\n // Everything happens on Observable subscription.\n return new Observable((observer) => {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n const xhr = this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n const responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n const reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n let headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n const partialFromXhr = () => {\n if (headerResponse !== null) {\n return headerResponse;\n }\n const statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n const url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers, status: xhr.status, statusText, url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n const onLoad = () => {\n // Read response state from the memoized partial data.\n let { headers, status, statusText, url } = partialFromXhr();\n // The body will be read out if present.\n let body = null;\n if (status !== 204 /* HttpStatusCode.NoContent */) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 /* HttpStatusCode.Ok */ : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n let ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n const originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = { error, text: body };\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n const onError = (error) => {\n const { url } = partialFromXhr();\n const res = new HttpErrorResponse({\n error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n url: url || undefined,\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progress event.\n let sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n const onDownProgress = (event) => {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n let progressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n const onUpProgress = (event) => {\n // Upload progress events are simpler. Begin building the progress\n // event.\n let progress = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n xhr.addEventListener('timeout', onError);\n xhr.addEventListener('abort', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return () => {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('abort', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onError);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n if (xhr.readyState !== xhr.DONE) {\n xhr.abort();\n }\n };\n });\n }\n}\nHttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXhrBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXhrBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });\n\nconst XSRF_ENABLED = new InjectionToken('XSRF_ENABLED');\nconst XSRF_DEFAULT_COOKIE_NAME = 'XSRF-TOKEN';\nconst XSRF_COOKIE_NAME = new InjectionToken('XSRF_COOKIE_NAME', {\n providedIn: 'root',\n factory: () => XSRF_DEFAULT_COOKIE_NAME,\n});\nconst XSRF_DEFAULT_HEADER_NAME = 'X-XSRF-TOKEN';\nconst XSRF_HEADER_NAME = new InjectionToken('XSRF_HEADER_NAME', {\n providedIn: 'root',\n factory: () => XSRF_DEFAULT_HEADER_NAME,\n});\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nclass HttpXsrfTokenExtractor {\n}\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nclass HttpXsrfCookieExtractor {\n constructor(doc, platform, cookieName) {\n this.doc = doc;\n this.platform = platform;\n this.cookieName = cookieName;\n this.lastCookieString = '';\n this.lastToken = null;\n /**\n * @internal for testing\n */\n this.parseCount = 0;\n }\n getToken() {\n if (this.platform === 'server') {\n return null;\n }\n const cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = ɵparseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n }\n}\nHttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfCookieExtractor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [XSRF_COOKIE_NAME]\n }] }]; } });\nfunction xsrfInterceptorFn(req, next) {\n const lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (!inject(XSRF_ENABLED) || req.method === 'GET' || req.method === 'HEAD' ||\n lcUrl.startsWith('http://') || lcUrl.startsWith('https://')) {\n return next(req);\n }\n const token = inject(HttpXsrfTokenExtractor).getToken();\n const headerName = inject(XSRF_HEADER_NAME);\n // Be careful not to overwrite an existing header of the same name.\n if (token != null && !req.headers.has(headerName)) {\n req = req.clone({ headers: req.headers.set(headerName, token) });\n }\n return next(req);\n}\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nclass HttpXsrfInterceptor {\n constructor(injector) {\n this.injector = injector;\n }\n intercept(initialRequest, next) {\n return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));\n }\n}\nHttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });\n\n/**\n * Identifies a particular kind of `HttpFeature`.\n *\n * @publicApi\n */\nvar HttpFeatureKind;\n(function (HttpFeatureKind) {\n HttpFeatureKind[HttpFeatureKind[\"Interceptors\"] = 0] = \"Interceptors\";\n HttpFeatureKind[HttpFeatureKind[\"LegacyInterceptors\"] = 1] = \"LegacyInterceptors\";\n HttpFeatureKind[HttpFeatureKind[\"CustomXsrfConfiguration\"] = 2] = \"CustomXsrfConfiguration\";\n HttpFeatureKind[HttpFeatureKind[\"NoXsrfProtection\"] = 3] = \"NoXsrfProtection\";\n HttpFeatureKind[HttpFeatureKind[\"JsonpSupport\"] = 4] = \"JsonpSupport\";\n HttpFeatureKind[HttpFeatureKind[\"RequestsMadeViaParent\"] = 5] = \"RequestsMadeViaParent\";\n})(HttpFeatureKind || (HttpFeatureKind = {}));\nfunction makeHttpFeature(kind, providers) {\n return {\n ɵkind: kind,\n ɵproviders: providers,\n };\n}\n/**\n * Configures Angular's `HttpClient` service to be available for injection.\n *\n * By default, `HttpClient` will be configured for injection with its default options for XSRF\n * protection of outgoing requests. Additional configuration options can be provided by passing\n * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the\n * `withInterceptors(...)` feature.\n *\n * @see {@link withInterceptors}\n * @see {@link withInterceptorsFromDi}\n * @see {@link withXsrfConfiguration}\n * @see {@link withNoXsrfProtection}\n * @see {@link withJsonpSupport}\n * @see {@link withRequestsMadeViaParent}\n */\nfunction provideHttpClient(...features) {\n if (ngDevMode) {\n const featureKinds = new Set(features.map(f => f.ɵkind));\n if (featureKinds.has(HttpFeatureKind.NoXsrfProtection) &&\n featureKinds.has(HttpFeatureKind.CustomXsrfConfiguration)) {\n throw new Error(ngDevMode ?\n `Configuration error: found both withXsrfConfiguration() and withNoXsrfProtection() in the same call to provideHttpClient(), which is a contradiction.` :\n '');\n }\n }\n const providers = [\n HttpClient,\n HttpXhrBackend,\n HttpInterceptorHandler,\n { provide: HttpHandler, useExisting: HttpInterceptorHandler },\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: xsrfInterceptorFn,\n multi: true,\n },\n { provide: XSRF_ENABLED, useValue: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n ];\n for (const feature of features) {\n providers.push(...feature.ɵproviders);\n }\n return makeEnvironmentProviders(providers);\n}\n/**\n * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`\n * instance.\n *\n * @see {@link HttpInterceptorFn}\n * @see {@link provideHttpClient}\n * @publicApi\n */\nfunction withInterceptors(interceptorFns) {\n return makeHttpFeature(HttpFeatureKind.Interceptors, interceptorFns.map(interceptorFn => {\n return {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: interceptorFn,\n multi: true,\n };\n }));\n}\nconst LEGACY_INTERCEPTOR_FN = new InjectionToken('LEGACY_INTERCEPTOR_FN');\n/**\n * Includes class-based interceptors configured using a multi-provider in the current injector into\n * the configured `HttpClient` instance.\n *\n * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided\n * interceptors may be phased out in a later release.\n *\n * @see {@link HttpInterceptor}\n * @see {@link HTTP_INTERCEPTORS}\n * @see {@link provideHttpClient}\n */\nfunction withInterceptorsFromDi() {\n // Note: the legacy interceptor function is provided here via an intermediate token\n // (`LEGACY_INTERCEPTOR_FN`), using a pattern which guarantees that if these providers are\n // included multiple times, all of the multi-provider entries will have the same instance of the\n // interceptor function. That way, the `HttpINterceptorHandler` will dedup them and legacy\n // interceptors will not run multiple times.\n return makeHttpFeature(HttpFeatureKind.LegacyInterceptors, [\n {\n provide: LEGACY_INTERCEPTOR_FN,\n useFactory: legacyInterceptorFnFactory,\n },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useExisting: LEGACY_INTERCEPTOR_FN,\n multi: true,\n }\n ]);\n}\n/**\n * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withNoXsrfProtection` feature.\n *\n * @see {@link provideHttpClient}\n */\nfunction withXsrfConfiguration({ cookieName, headerName }) {\n const providers = [];\n if (cookieName !== undefined) {\n providers.push({ provide: XSRF_COOKIE_NAME, useValue: cookieName });\n }\n if (headerName !== undefined) {\n providers.push({ provide: XSRF_HEADER_NAME, useValue: headerName });\n }\n return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);\n}\n/**\n * Disables XSRF protection in the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withXsrfConfiguration` feature.\n *\n * @see {@link provideHttpClient}\n */\nfunction withNoXsrfProtection() {\n return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [\n {\n provide: XSRF_ENABLED,\n useValue: false,\n },\n ]);\n}\n/**\n * Add JSONP support to the configuration of the current `HttpClient` instance.\n *\n * @see {@link provideHttpClient}\n */\nfunction withJsonpSupport() {\n return makeHttpFeature(HttpFeatureKind.JsonpSupport, [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true },\n ]);\n}\n/**\n * Configures the current `HttpClient` instance to make requests via the parent injector's\n * `HttpClient` instead of directly.\n *\n * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent\n * instance. For example, even if `HttpClient` is configured in the parent injector with\n * one or more interceptors, they will not intercept requests made via this instance.\n *\n * With this option enabled, once the request has passed through the current injector's\n * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of\n * dispatched directly, and interceptors in the parent configuration will be applied to the request.\n *\n * If there are several `HttpClient` instances in the injector hierarchy, it's possible for\n * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to\n * \"bubble up\" until either reaching the root level or an `HttpClient` which was not configured with\n * this option.\n *\n * @see {@link provideHttpClient}\n * @developerPreview\n */\nfunction withRequestsMadeViaParent() {\n return makeHttpFeature(HttpFeatureKind.RequestsMadeViaParent, [\n {\n provide: HttpBackend,\n useFactory: () => {\n const handlerFromParent = inject(HttpHandler, { skipSelf: true, optional: true });\n if (ngDevMode && handlerFromParent === null) {\n throw new Error('withRequestsMadeViaParent() can only be used when the parent injector also configures HttpClient');\n }\n return handlerFromParent;\n },\n },\n ]);\n}\n\n/**\n * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n * @publicApi\n */\nclass HttpClientXsrfModule {\n /**\n * Disable the default XSRF protection.\n */\n static disable() {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n withNoXsrfProtection().ɵproviders,\n ],\n };\n }\n /**\n * Configure XSRF protection.\n * @param options An object that can specify either or both\n * cookie name or header name.\n * - Cookie name default is `XSRF-TOKEN`.\n * - Header name default is `X-XSRF-TOKEN`.\n *\n */\n static withOptions(options = {}) {\n return {\n ngModule: HttpClientXsrfModule,\n providers: withXsrfConfiguration(options).ɵproviders,\n };\n }\n}\nHttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientXsrfModule, providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n }).ɵproviders,\n { provide: XSRF_ENABLED, useValue: true },\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientXsrfModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n withXsrfConfiguration({\n cookieName: XSRF_DEFAULT_COOKIE_NAME,\n headerName: XSRF_DEFAULT_HEADER_NAME,\n }).ɵproviders,\n { provide: XSRF_ENABLED, useValue: true },\n ],\n }]\n }] });\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\nclass HttpClientModule {\n}\nHttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientModule });\nHttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientModule, providers: [\n provideHttpClient(withInterceptorsFromDi()),\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientModule, decorators: [{\n type: NgModule,\n args: [{\n /**\n * Configures the [dependency injector](guide/glossary#injector) where it is imported\n * with supporting services for HTTP communications.\n */\n providers: [\n provideHttpClient(withInterceptorsFromDi()),\n ],\n }]\n }] });\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * @publicApi\n */\nclass HttpClientJsonpModule {\n}\nHttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule, providers: [\n withJsonpSupport().ɵproviders,\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: HttpClientJsonpModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n withJsonpSupport().ɵproviders,\n ],\n }]\n }] });\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n * @see `XhrFactory`\n * @deprecated\n * `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.\n */\nconst XhrFactory = XhrFactory$1;\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, provideHttpClient, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler };\n","import { InjectionToken, Injectable, Inject, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { mergeMap } from 'rxjs/operators';\nimport { from } from 'rxjs';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport * as ɵngcc0 from '@angular/core';\nconst JWT_OPTIONS = new InjectionToken('JWT_OPTIONS');\n\n// tslint:disable:no-bitwise\nclass JwtHelperService {\n constructor(config = null) {\n this.tokenGetter = (config && config.tokenGetter) || function () { };\n }\n urlBase64Decode(str) {\n let output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0: {\n break;\n }\n case 2: {\n output += \"==\";\n break;\n }\n case 3: {\n output += \"=\";\n break;\n }\n default: {\n throw new Error(\"Illegal base64url string!\");\n }\n }\n return this.b64DecodeUnicode(output);\n }\n // credits for decoder goes to https://github.com/atk\n b64decode(str) {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let output = \"\";\n str = String(str).replace(/=+$/, \"\");\n if (str.length % 4 === 1) {\n throw new Error(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n }\n for (\n // initialize result and counters\n let bc = 0, bs, buffer, idx = 0; \n // get next character\n (buffer = str.charAt(idx++)); \n // character found in table? initialize bit storage and add its ascii value;\n ~buffer &&\n ((bs = bc % 4 ? bs * 64 + buffer : buffer),\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n }\n b64DecodeUnicode(str) {\n return decodeURIComponent(Array.prototype.map\n .call(this.b64decode(str), (c) => {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\"));\n }\n decodeToken(token = this.tokenGetter()) {\n if (!token || token === \"\") {\n return null;\n }\n const parts = token.split(\".\");\n if (parts.length !== 3) {\n throw new Error(\"The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.\");\n }\n const decoded = this.urlBase64Decode(parts[1]);\n if (!decoded) {\n throw new Error(\"Cannot decode the token.\");\n }\n return JSON.parse(decoded);\n }\n getTokenExpirationDate(token = this.tokenGetter()) {\n let decoded;\n decoded = this.decodeToken(token);\n if (!decoded || !decoded.hasOwnProperty(\"exp\")) {\n return null;\n }\n const date = new Date(0);\n date.setUTCSeconds(decoded.exp);\n return date;\n }\n isTokenExpired(token = this.tokenGetter(), offsetSeconds) {\n if (!token || token === \"\") {\n return true;\n }\n const date = this.getTokenExpirationDate(token);\n offsetSeconds = offsetSeconds || 0;\n if (date === null) {\n return false;\n }\n return !(date.valueOf() > new Date().valueOf() + offsetSeconds * 1000);\n }\n getAuthScheme(authScheme, request) {\n if (typeof authScheme === \"function\") {\n return authScheme(request);\n }\n return authScheme;\n }\n}\nJwtHelperService.ɵfac = function JwtHelperService_Factory(t) { return new (t || JwtHelperService)(ɵngcc0.ɵɵinject(JWT_OPTIONS)); };\nJwtHelperService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: JwtHelperService, factory: JwtHelperService.ɵfac });\nJwtHelperService.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [JWT_OPTIONS,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(JwtHelperService, [{\n type: Injectable\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [JWT_OPTIONS]\n }] }]; }, null); })();\n\nclass JwtInterceptor {\n constructor(config, jwtHelper, document) {\n this.jwtHelper = jwtHelper;\n this.document = document;\n this.standardPorts = [\"80\", \"443\"];\n this.tokenGetter = config.tokenGetter;\n this.headerName = config.headerName || \"Authorization\";\n this.authScheme =\n config.authScheme || config.authScheme === \"\"\n ? config.authScheme\n : \"Bearer \";\n this.allowedDomains = config.allowedDomains || [];\n this.disallowedRoutes = config.disallowedRoutes || [];\n this.throwNoTokenError = config.throwNoTokenError || false;\n this.skipWhenExpired = config.skipWhenExpired;\n }\n isAllowedDomain(request) {\n const requestUrl = new URL(request.url, this.document.location.origin);\n // If the host equals the current window origin,\n // the domain is allowed by default\n if (requestUrl.host === this.document.location.host) {\n return true;\n }\n // If not the current domain, check the allowed list\n const hostName = `${requestUrl.hostname}${requestUrl.port && !this.standardPorts.includes(requestUrl.port)\n ? \":\" + requestUrl.port\n : \"\"}`;\n return (this.allowedDomains.findIndex((domain) => typeof domain === \"string\"\n ? domain === hostName\n : domain instanceof RegExp\n ? domain.test(hostName)\n : false) > -1);\n }\n isDisallowedRoute(request) {\n const requestedUrl = new URL(request.url, this.document.location.origin);\n return (this.disallowedRoutes.findIndex((route) => {\n if (typeof route === \"string\") {\n const parsedRoute = new URL(route, this.document.location.origin);\n return (parsedRoute.hostname === requestedUrl.hostname &&\n parsedRoute.pathname === requestedUrl.pathname);\n }\n if (route instanceof RegExp) {\n return route.test(request.url);\n }\n return false;\n }) > -1);\n }\n handleInterception(token, request, next) {\n const authScheme = this.jwtHelper.getAuthScheme(this.authScheme, request);\n let tokenIsExpired = false;\n if (!token && this.throwNoTokenError) {\n throw new Error(\"Could not get token from tokenGetter function.\");\n }\n if (this.skipWhenExpired) {\n tokenIsExpired = token ? this.jwtHelper.isTokenExpired(token) : true;\n }\n if (token && tokenIsExpired && this.skipWhenExpired) {\n request = request.clone();\n }\n else if (token) {\n request = request.clone({\n setHeaders: {\n [this.headerName]: `${authScheme}${token}`,\n },\n });\n }\n return next.handle(request);\n }\n intercept(request, next) {\n if (!this.isAllowedDomain(request) || this.isDisallowedRoute(request)) {\n return next.handle(request);\n }\n const token = this.tokenGetter(request);\n if (token instanceof Promise) {\n return from(token).pipe(mergeMap((asyncToken) => {\n return this.handleInterception(asyncToken, request, next);\n }));\n }\n else {\n return this.handleInterception(token, request, next);\n }\n }\n}\nJwtInterceptor.ɵfac = function JwtInterceptor_Factory(t) { return new (t || JwtInterceptor)(ɵngcc0.ɵɵinject(JWT_OPTIONS), ɵngcc0.ɵɵinject(JwtHelperService), ɵngcc0.ɵɵinject(DOCUMENT)); };\nJwtInterceptor.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: JwtInterceptor, factory: JwtInterceptor.ɵfac });\nJwtInterceptor.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [JWT_OPTIONS,] }] },\n { type: JwtHelperService },\n { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(JwtInterceptor, [{\n type: Injectable\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [JWT_OPTIONS]\n }] }, { type: JwtHelperService }, { type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n\nclass JwtModule {\n constructor(parentModule) {\n if (parentModule) {\n throw new Error(\"JwtModule is already loaded. It should only be imported in your application's main module.\");\n }\n }\n static forRoot(options) {\n return {\n ngModule: JwtModule,\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: JwtInterceptor,\n multi: true,\n },\n options.jwtOptionsProvider || {\n provide: JWT_OPTIONS,\n useValue: options.config,\n },\n JwtHelperService,\n ],\n };\n }\n}\nJwtModule.ɵfac = function JwtModule_Factory(t) { return new (t || JwtModule)(ɵngcc0.ɵɵinject(JwtModule, 12)); };\nJwtModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: JwtModule });\nJwtModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\nJwtModule.ctorParameters = () => [\n { type: JwtModule, decorators: [{ type: Optional }, { type: SkipSelf }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(JwtModule, [{\n type: NgModule\n }], function () { return [{ type: JwtModule, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }]; }, null); })();\n\n/*\n * Public API Surface of angular-jwt\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { JWT_OPTIONS, JwtHelperService, JwtInterceptor, JwtModule };\n\n","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const { _infiniteTimeWindow, _buffer } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n","import { of, ReplaySubject, from, pipe } from 'rxjs';\nimport { skip, switchMap, map } from 'rxjs/operators';\n\nfunction persistState(store, options) {\n var _options$key;\n\n const defaultOptions = {\n source: store => store,\n preStoreInit: value => value,\n key: (_options$key = options.key) != null ? _options$key : `${store.name}@store`,\n\n runGuard() {\n return typeof window !== 'undefined';\n }\n\n };\n const merged = Object.assign({}, defaultOptions, options);\n\n if (!(merged.runGuard != null && merged.runGuard())) {\n return {\n initialized$: of(false),\n\n unsubscribe() {//\n }\n\n };\n }\n\n const {\n setItem,\n getItem\n } = options.storage;\n const initialized = new ReplaySubject(1);\n const loadFromStorageSubscription = from(getItem(merged.key)).subscribe(value => {\n if (value) {\n store.update(state => {\n return merged.preStoreInit(Object.assign({}, state, value));\n });\n }\n\n initialized.next(true);\n initialized.complete();\n });\n const saveToStorageSubscription = merged.source(store).pipe(skip(1), switchMap(value => setItem(merged.key, value))).subscribe();\n return {\n initialized$: initialized.asObservable(),\n\n unsubscribe() {\n saveToStorageSubscription.unsubscribe();\n loadFromStorageSubscription.unsubscribe();\n }\n\n };\n}\n\nfunction createStorage(storage) {\n if (!storage) {\n return;\n }\n\n return {\n getItem(key) {\n const v = storage.getItem(key);\n return of(v ? JSON.parse(v) : v);\n },\n\n setItem(key, value) {\n storage.setItem(key, JSON.stringify(value));\n return of(true);\n },\n\n removeItem(key) {\n storage.removeItem(key);\n return of(true);\n }\n\n };\n}\n\nconst localStorageStrategy = createStorage(typeof localStorage !== 'undefined' ? localStorage : undefined);\nconst sessionStorageStrategy = createStorage(typeof sessionStorage !== 'undefined' ? sessionStorage : undefined);\n\nfunction excludeKeys(keys) {\n return pipe(map(state => {\n return Object.keys(state).reduce((toSave, key) => {\n if (!keys.includes(key)) {\n toSave[key] = state[key];\n }\n\n return toSave;\n }, {});\n }));\n}\n\nexport { excludeKeys, localStorageStrategy, persistState, sessionStorageStrategy };\n","import { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]);\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable((subscriber) => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n","import { select, coerceArray } from '@ngneat/elf';\nimport { distinctUntilKeyChanged, pipe, EMPTY, defer } from 'rxjs';\nimport { distinctUntilKeyChanged as distinctUntilKeyChanged$1, tap, map, distinctUntilChanged } from 'rxjs/operators';\n\nfunction withRequestsCache(initialValue) {\n return {\n props: {\n requestsCache: initialValue != null ? initialValue : {}\n },\n config: undefined\n };\n}\ndistinctUntilKeyChanged('');\nfunction selectRequestCache(key) {\n return pipe(distinctUntilKeyChanged('requestsCache'), select(state => getRequestCache(key)(state)));\n}\nfunction updateRequestsCache(requestsOrKeys, value) {\n let normalized = requestsOrKeys;\n\n if (value) {\n normalized = requestsOrKeys.reduce((acc, key) => {\n acc[key] = {\n value\n };\n return acc;\n }, {});\n }\n\n return function (state) {\n return Object.assign({}, state, {\n requestsCache: Object.assign({}, state.requestsCache, normalized)\n });\n };\n}\nfunction updateRequestCache(key, {\n ttl,\n value: v\n} = {}) {\n const data = {\n value: v != null ? v : 'full'\n };\n\n if (ttl) {\n data.timestamp = Date.now() + ttl;\n }\n\n return function (state) {\n return Object.assign({}, state, {\n requestsCache: Object.assign({}, state.requestsCache, {\n [key]: data\n })\n });\n };\n}\nfunction getRequestCache(key) {\n return function (state) {\n var _state$requestsCache$;\n\n const cacheValue = (_state$requestsCache$ = state.requestsCache[key]) != null ? _state$requestsCache$ : {\n value: 'none'\n };\n\n if (cacheValue.timestamp && cacheValue.timestamp < Date.now()) {\n return {\n value: 'none'\n };\n }\n\n return cacheValue;\n };\n}\nfunction selectIsRequestCached(key, options) {\n return pipe(distinctUntilKeyChanged('requestsCache'), select(state => isRequestCached(key, options)(state)));\n}\nfunction isRequestCached(key, options) {\n return function (state) {\n var _options$value;\n\n const type = (_options$value = options == null ? void 0 : options.value) != null ? _options$value : 'full';\n return coerceArray(key).some(k => getRequestCache(k)(state).value === type);\n };\n}\nfunction skipWhileCached(store, key, options) {\n return function (source) {\n if (store.query(isRequestCached(key, {\n value: options == null ? void 0 : options.value\n }))) {\n var _options$returnSource;\n\n return (_options$returnSource = options == null ? void 0 : options.returnSource) != null ? _options$returnSource : EMPTY;\n }\n\n return source;\n };\n}\nfunction createRequestsCacheOperator(store) {\n return function (key, options) {\n return skipWhileCached(store, key, options);\n };\n}\nfunction clearRequestsCache() {\n return function (state) {\n return Object.assign({}, state, {\n requestsCache: {}\n });\n };\n}\n\nfunction withRequestsStatus(initialValue) {\n return {\n props: {\n requestsStatus: initialValue != null ? initialValue : {}\n },\n config: undefined\n };\n}\nfunction updateRequestsStatus(requestsOrKeys, value, error) {\n let normalized = requestsOrKeys;\n\n if (value) {\n normalized = requestsOrKeys.reduce((acc, key) => {\n acc[key] = resolveStatus(value, error);\n return acc;\n }, {});\n }\n\n return function (state) {\n return Object.assign({}, state, {\n requestsStatus: Object.assign({}, state.requestsStatus, normalized)\n });\n };\n}\n\nfunction resolveStatus(value, error) {\n const newStatus = {\n value\n };\n\n if (value === 'error') {\n newStatus.error = error;\n }\n\n return newStatus;\n}\n\nfunction updateRequestStatus(key, value, error) {\n return function (state) {\n return Object.assign({}, state, {\n requestsStatus: Object.assign({}, state.requestsStatus, {\n [key]: resolveStatus(value, error)\n })\n });\n };\n}\nfunction getRequestStatus(key) {\n return function (state) {\n var _state$requestsStatus;\n\n return (_state$requestsStatus = state.requestsStatus[key]) != null ? _state$requestsStatus : {\n value: 'idle'\n };\n };\n}\nfunction selectRequestStatus(key, options) {\n return pipe(distinctUntilKeyChanged$1('requestsStatus'), select(state => {\n const base = getRequestStatus(key)(state);\n\n if (options != null && options.groupKey) {\n const parent = getRequestStatus(options.groupKey)(state);\n return parent.value === 'success' ? parent : base;\n }\n\n return base;\n }));\n}\nfunction selectIsRequestPending(key) {\n return pipe(distinctUntilKeyChanged$1('requestsStatus'), select(state => getRequestStatus(key)(state).value === 'pending'));\n}\nfunction trackRequestStatus(store, key, options) {\n return function (source) {\n return defer(() => {\n if (store.query(getRequestStatus(key)).value !== 'pending') {\n store.update(updateRequestStatus(key, 'pending'));\n }\n\n return source.pipe(tap({\n error(error) {\n store.update(updateRequestStatus(key, 'error', options != null && options.mapError ? options == null ? void 0 : options.mapError(error) : error));\n }\n\n }));\n });\n };\n}\nfunction createRequestsStatusOperator(store) {\n return function (key, options) {\n return trackRequestStatus(store, key, options);\n };\n}\nfunction initializeAsPending(keys) {\n return coerceArray(keys).reduce((acc, key) => {\n acc[key] = {\n value: 'pending'\n };\n return acc;\n }, {});\n}\nfunction clearRequestsStatus() {\n return function (state) {\n return Object.assign({}, state, {\n requestsStatus: {}\n });\n };\n}\n\nfunction createRequestDataSource(params) {\n const {\n data$,\n store,\n dataKey,\n requestStatusOptions,\n requestKey,\n idleAsPending = false\n } = Reflect.has(params, 'requestKey') ? params : Object.assign({}, params, {\n requestKey: undefined\n });\n return {\n trackRequestStatus: options => trackRequestStatus(store, requestKey != null ? requestKey : options == null ? void 0 : options.key, options),\n skipWhileCached: options => skipWhileCached(store, requestKey != null ? requestKey : options == null ? void 0 : options.key, options),\n\n setSuccess(options) {\n return updateRequestStatus(requestKey != null ? requestKey : options == null ? void 0 : options.key, 'success');\n },\n\n setCached(options) {\n return updateRequestCache(requestKey != null ? requestKey : options == null ? void 0 : options.key, options);\n },\n\n data$: options => store.combine({\n data: data$(requestKey != null ? requestKey : options == null ? void 0 : options.key),\n status: store.pipe(selectRequestStatus(requestKey != null ? requestKey : options == null ? void 0 : options.key, requestStatusOptions || {}))\n }).pipe(map(({\n data,\n status\n }) => {\n return {\n [dataKey]: data,\n loading: idleAsPending ? status.value === 'pending' || status.value === 'idle' : status.value === 'pending',\n error: status.value === 'error' ? status.error : undefined\n };\n }), distinctUntilChanged((a, b) => {\n // if the status is the same, for example, `pending` and `pending`, and the `data` is the same\n // don't emit a redundant value\n return a[dataKey] === b[dataKey] && a.loading === b.loading && a.error === b.error;\n }))\n };\n}\n\nexport { clearRequestsCache, clearRequestsStatus, createRequestDataSource, createRequestsCacheOperator, createRequestsStatusOperator, getRequestCache, getRequestStatus, initializeAsPending, isRequestCached, selectIsRequestCached, selectIsRequestPending, selectRequestCache, selectRequestStatus, updateRequestCache, updateRequestStatus, updateRequestsCache, updateRequestsStatus, withRequestsCache, withRequestsStatus };\n","const { isArray } = Array;\nconst { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return { args: first, keys: null };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map((key) => first[key]),\n keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n","export function createObject(keys, values) {\n return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {});\n}\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n const { args: observables, keys } = argsArgArrayOrObject(args);\n if (observables.length === 0) {\n return from([], scheduler);\n }\n const result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n (values) => createObject(keys, values)\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n return (subscriber) => {\n maybeSchedule(scheduler, () => {\n const { length } = observables;\n const values = new Array(length);\n let active = length;\n let remainingFirstValues = length;\n for (let i = 0; i < length; i++) {\n maybeSchedule(scheduler, () => {\n const source = from(observables[i], scheduler);\n let hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, () => {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n","export const intervalProvider = {\n setInterval(...args) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) || setInterval)(...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n intervalProvider.clearInterval(id);\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n this._scheduled = undefined;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom(...inputs) {\n const project = popResultSelector(inputs);\n return operate((source, subscriber) => {\n const len = inputs.length;\n const otherValues = new Array(len);\n let hasValue = inputs.map(() => false);\n let ready = false;\n for (let i = 0; i < len; i++) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (ready) {\n const values = [value, ...otherValues];\n subscriber.next(project ? project(...values) : values);\n }\n }));\n });\n}\n","export class EnvState {\r\n name = \"AppName\";\r\n apiUrl = \"\";\r\n features = {\r\n news: false,\r\n truck: false,\r\n offlineChanges: false\r\n };\r\n locale = 'en-gb';\r\n}","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpResponse,\r\n} from '@angular/common/http';\r\nimport { map, Observable } from 'rxjs';\r\nimport { EnvState } from '../../shared/helpers/env-state';\r\n\r\n@Injectable()\r\nexport class ImageInterceptor implements HttpInterceptor {\r\n static readonly resourcesRegex = /^\\/?resources.*/i;\r\n\r\n constructor(private env: EnvState) {}\r\n\r\n intercept(\r\n request: HttpRequest<unknown>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<unknown>> {\r\n return next.handle(request).pipe(\r\n map((event: HttpEvent<any>) => {\r\n if (this.env.apiUrl && event instanceof HttpResponse) {\r\n this.appendBaseUrl(event.body);\r\n }\r\n return event;\r\n })\r\n );\r\n }\r\n\r\n public static buildUrl(url: string, baseUrl: string) {\r\n return `${baseUrl}${url.startsWith('/') ? '' : '/'}${url}`;\r\n }\r\n\r\n appendBaseUrl(object: any) {\r\n if (!object || !(object instanceof Object)) {\r\n return;\r\n }\r\n\r\n if (object instanceof Array) {\r\n for (const item of object) {\r\n this.appendBaseUrl(item);\r\n }\r\n }\r\n\r\n for (const key of Object.keys(object)) {\r\n const value = object[key];\r\n\r\n if (value instanceof Array) {\r\n for (const item of value) {\r\n this.appendBaseUrl(item);\r\n }\r\n }\r\n\r\n if (value instanceof Object) {\r\n this.appendBaseUrl(value);\r\n }\r\n\r\n if (\r\n typeof value === 'string' &&\r\n (key === 'imagePath' || key === 'url' || key === 'filePath') &&\r\n ImageInterceptor.resourcesRegex.test(value)\r\n ) {\r\n object[key] = ImageInterceptor.buildUrl(value, this.env.apiUrl);\r\n }\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { JwtHelperService } from '@auth0/angular-jwt';\r\nimport { Store, createState, withProps, select } from '@ngneat/elf';\r\nimport { localStorageStrategy, persistState } from '@ngneat/elf-persist-state';\r\nimport { createRequestsStatusOperator, selectRequestStatus, updateRequestsStatus, withRequestsStatus } from '@ngneat/elf-requests';\r\nimport { combineLatest, timer } from 'rxjs';\r\nimport { distinctUntilChanged, filter, map, withLatestFrom } from 'rxjs/operators';\r\nimport { ImageInterceptor } from 'src/app/modules/core/interceptors/image.interceptor';\r\nimport { EnvState } from '../modules/shared/helpers/env-state';\r\nimport { TenantFeatures } from './feature.repository';\r\n\r\nconst EXPIRES_SOON_MS = 10000;\r\nconst EXPIRES_CHECK_MS = EXPIRES_SOON_MS / 2;\r\n\r\nexport interface UserSettings {\r\n defaultPause: number;\r\n vehicleId?: string;\r\n trailerId?: string;\r\n vehicleName?: string;\r\n trailerName?: string;\r\n}\r\n\r\nexport interface PasswordChangeRequest {\r\n currentPassword: string;\r\n password: string;\r\n}\r\n\r\nexport interface AuthProps {\r\n token: string | null;\r\n settings: UserSettings | null;\r\n}\r\n\r\nconst { state, config } = createState(\r\n withProps<AuthProps>({ token: null, settings: null }),\r\n withRequestsStatus()\r\n);\r\nexport const store = new Store({ name: 'auth', state, config });\r\npersistState(store, { \r\n storage: localStorageStrategy,\r\n source: store => store.pipe(\r\n select(state => ({ token: state.token }))\r\n )\r\n});\r\n\r\nexport const trackAuthRequestsStatus = createRequestsStatusOperator(store);\r\n\r\nexport function getStoredToken() {\r\n return store.getValue().token;\r\n}\r\n\r\nenum ClaimTypes {\r\n Sub = 'sub',\r\n Name = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name',\r\n Email = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',\r\n Image = 'img',\r\n Role = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role',\r\n ImpersonatorId = 'imp',\r\n NotBefore = 'nbf',\r\n Expires = 'exp',\r\n Issuer = 'iss',\r\n Audience = 'aud',\r\n TenantFeatures = 'ftr'\r\n}\r\n\r\nexport enum UserRoles {\r\n Superamin = \"Superadmin\",\r\n TenantAdmin = \"Administrator\",\r\n Driver = \"Driver\"\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AuthRepository {\r\n name = store.name;\r\n\r\n constructor(\r\n private jwtHelper: JwtHelperService,\r\n private env: EnvState\r\n ) { }\r\n\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(this.name),\r\n map(x => x.value === 'pending')\r\n );\r\n token$ = store.pipe(select(state => state.token));\r\n isAuthenticated$ = this.token$.pipe(map(token => this.isTokenAuthenticated(token)));\r\n claims$ = this.token$.pipe(map(token => this.decodeToken(token)));\r\n name$ = this.claims$.pipe(map(claims => claims[ClaimTypes.Name] as string || null));\r\n email$ = this.claims$.pipe(map(claims => claims[ClaimTypes.Email] as string || null));\r\n displayName$ = combineLatest([this.name$, this.email$]).pipe(\r\n map(([name, email]) => name || email)\r\n );\r\n image$ = this.claims$.pipe(\r\n map(claims => {\r\n let image = claims[ClaimTypes.Image] as string || null;\r\n if (image && ImageInterceptor.resourcesRegex.test(image)) {\r\n image = ImageInterceptor.buildUrl(image, this.env.apiUrl);\r\n }\r\n return image;\r\n })\r\n );\r\n id$ = this.claims$.pipe(map(claims => claims[ClaimTypes.Sub] as string || null));\r\n expires$ = this.claims$.pipe(map(claims => claims[ClaimTypes.Expires] as number || null));\r\n roles$ = combineLatest([ this.claims$, this.isAuthenticated$ ]).pipe(\r\n map(([claims, isAuth]): UserRoles[] => {\r\n const roleClaim = claims && claims[ClaimTypes.Role];\r\n if (!roleClaim || !isAuth) {\r\n return [ ];\r\n }\r\n return Array.isArray(roleClaim) ? roleClaim : [roleClaim];\r\n })\r\n );\r\n features$ = this.claims$.pipe(\r\n map((claims): string[] => {\r\n const featureClaim = claims && claims[ClaimTypes.TenantFeatures];\r\n if (!featureClaim) {\r\n return [ ];\r\n }\r\n return Array.isArray(featureClaim) ? featureClaim : [featureClaim];\r\n })\r\n );\r\n hasFeature$ = (feature: TenantFeatures) => this.features$.pipe(\r\n map(features => features.includes(feature))\r\n );\r\n isImpersonating$ = this.claims$.pipe(map(claims => !!claims[ClaimTypes.ImpersonatorId]));\r\n isSuperAdmin$ = this.roles$.pipe(\r\n map(roles => roles.indexOf(UserRoles.Superamin) >= 0)\r\n );\r\n isTenantAdmin$ = this.roles$.pipe(\r\n map(roles => roles.indexOf(UserRoles.TenantAdmin) >= 0)\r\n );\r\n isAnyAdmin$ = combineLatest([this.isSuperAdmin$, this.isTenantAdmin$]).pipe(\r\n map(([isSuper, isTenant]) => isSuper || isTenant)\r\n );\r\n isDriver$ = this.roles$.pipe(\r\n map(roles => roles.indexOf(UserRoles.Driver) >= 0)\r\n );\r\n\r\n private expiryClock$ = timer(0, EXPIRES_CHECK_MS).pipe(\r\n withLatestFrom(this.expires$),\r\n map(([_, expires]) => expires && (expires * 1000))\r\n );\r\n isExpiresSoon$ = this.expiryClock$.pipe(\r\n map(expires => !expires\r\n || (expires - Date.now()) < EXPIRES_SOON_MS),\r\n distinctUntilChanged(),\r\n filter(x => !!x)\r\n );\r\n isExpired$ = this.expiryClock$.pipe(\r\n filter(expires => !!expires && expires < Date.now()),\r\n );\r\n\r\n settings$ = store.pipe(select(state => state.settings));\r\n isSettingsLoading$ = store.pipe(\r\n selectRequestStatus(`${this.name}_settings`),\r\n map(x => x.value === 'pending')\r\n );\r\n\r\n getActiveSettings() {\r\n return store.getValue().settings;\r\n }\r\n\r\n getId() {\r\n const token = store.getValue().token;\r\n const claims = this.decodeToken(token);\r\n return claims[ClaimTypes.Sub] as string || null;\r\n }\r\n\r\n setToken(token: AuthProps['token']) {\r\n store.update((state) => ({\r\n ...state,\r\n token\r\n }));\r\n store.update(\r\n updateRequestsStatus([this.name], 'success')\r\n );\r\n }\r\n\r\n setSettings(settings: UserSettings) {\r\n store.update((state) => ({\r\n ...state,\r\n settings\r\n }));\r\n store.update(\r\n updateRequestsStatus([`${this.name}_settings`], 'success')\r\n );\r\n }\r\n\r\n isAuthenticated() {\r\n const token = store.getValue().token;\r\n return this.isTokenAuthenticated(token);\r\n }\r\n\r\n isInRole(role: string) {\r\n const token = store.getValue().token;\r\n const claims = this.decodeToken(token);\r\n const roleClaim = claims[ClaimTypes.Role];\r\n return !!roleClaim && (roleClaim === role\r\n || Array.isArray(roleClaim) && roleClaim.indexOf(role) >= 0);\r\n }\r\n\r\n private isTokenAuthenticated(token: string | null) {\r\n return !!token && !this.jwtHelper.isTokenExpired(token);\r\n }\r\n\r\n private decodeToken(token: string | null) {\r\n return token && this.jwtHelper.decodeToken<{ [claim: string]: any }>(token) || {};\r\n }\r\n}\r\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = (subscriber) => subscriber.error(errorFactory());\n return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate((source, subscriber) => {\n let connection = null;\n source._refCount++;\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n const sharedConnection = source._connection;\n const conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._subject = null;\n this._refCount = 0;\n this._connection = null;\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n _subscribe(subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n getSubject() {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n }\n _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n }\n connect() {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n this._teardown();\n subject.complete();\n }, (err) => {\n this._teardown();\n subject.error(err);\n }, () => this._teardown())));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n refCount() {\n return higherOrderRefCount()(this);\n }\n}\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? () => EMPTY\n : operate((source, subscriber) => {\n let buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, () => {\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n }, undefined, () => {\n buffer = null;\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate((source, subscriber) => {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, Compiler, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitleKey = Symbol('RouteTitle');\nclass ParamsAsMap {\n constructor(params) {\n this.params = params || {};\n }\n has(name) {\n return Object.prototype.hasOwnProperty.call(this.params, name);\n }\n get(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n }\n getAll(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n }\n get keys() {\n return Object.keys(this.params);\n }\n}\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n return new ParamsAsMap(params);\n}\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see UrlMatchResult\n * @see Route\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n const parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n const posParams = {};\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n }\n else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return { consumed: segments.slice(0, parts.length), posParams };\n}\n\nfunction shallowEqualArrays(a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i]))\n return false;\n }\n return true;\n}\nfunction shallowEqual(a, b) {\n // While `undefined` should never be possible, it would sometimes be the case in IE 11\n // and pre-chromium Edge. The check below accounts for this edge case.\n const k1 = a ? Object.keys(a) : undefined;\n const k2 = b ? Object.keys(b) : undefined;\n if (!k1 || !k2 || k1.length != k2.length) {\n return false;\n }\n let key;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (!equalArraysOrString(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length)\n return false;\n const aSorted = [...a].sort();\n const bSorted = [...b].sort();\n return aSorted.every((val, index) => bSorted[index] === val);\n }\n else {\n return a === b;\n }\n}\n/**\n * Flattens single-level nested arrays.\n */\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n/**\n * Verifys all booleans in an array are `true`.\n */\nfunction and(bools) {\n return !bools.some(v => !v);\n}\nfunction forEach(map, callback) {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\nfunction wrapIntoObservable(value) {\n if (ɵisObservable(value)) {\n return value;\n }\n if (ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n return of(value);\n}\n\nconst NG_DEV_MODE$b = typeof ngDevMode === 'undefined' || ngDevMode;\nconst pathCompareMap = {\n 'exact': equalSegmentGroups,\n 'subset': containsSegmentGroup,\n};\nconst paramCompareMap = {\n 'exact': equalParams,\n 'subset': containsParams,\n 'ignored': () => true,\n};\nfunction containsTree(container, containee, options) {\n return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\nfunction equalParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n if (!equalPath(container.segments, containee.segments))\n return false;\n if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren)\n return false;\n for (const c in containee.children) {\n if (!container.children[c])\n return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n return false;\n }\n return true;\n}\nfunction containsParams(container, containee) {\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths))\n return false;\n if (containee.hasChildren())\n return false;\n if (!matrixParamsMatch(current, containeePaths, matrixParams))\n return false;\n return true;\n }\n else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths))\n return false;\n if (!matrixParamsMatch(container.segments, containeePaths, matrixParams))\n return false;\n for (const c in containee.children) {\n if (!container.children[c])\n return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n return false;\n }\n }\n return true;\n }\n else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current))\n return false;\n if (!matrixParamsMatch(container.segments, current, matrixParams))\n return false;\n if (!container.children[PRIMARY_OUTLET])\n return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n return containeePaths.every((containeeSegment, i) => {\n return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n });\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlTree {\n constructor(\n /** The root segment group of the URL tree */\n root = new UrlSegmentGroup([], {}), \n /** The query params of the URL */\n queryParams = {}, \n /** The fragment of the URL */\n fragment = null) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n if (NG_DEV_MODE$b) {\n if (root.segments.length > 0) {\n throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' +\n 'Instead, these segments belong in the `children` so they can be associated with a named outlet.');\n }\n }\n }\n get queryParamMap() {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n /** @docsNotRequired */\n toString() {\n return DEFAULT_SERIALIZER.serialize(this);\n }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n segments, \n /** The list of children of this group */\n children) {\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n forEach(children, (v, k) => v.parent = this);\n }\n /** Whether the segment has child segments */\n hasChildren() {\n return this.numberOfChildren > 0;\n }\n /** Number of child segments */\n get numberOfChildren() {\n return Object.keys(this.children).length;\n }\n /** @docsNotRequired */\n toString() {\n return serializePaths(this);\n }\n}\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlSegment {\n constructor(\n /** The path part of a URL segment */\n path, \n /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n /** @docsNotRequired */\n toString() {\n return serializePath(this);\n }\n}\nfunction equalSegments(as, bs) {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n if (as.length !== bs.length)\n return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n let res = [];\n forEach(segment.children, (child, childOutlet) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child, childOutlet) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nclass UrlSerializer {\n}\nUrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlSerializer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]\n }] });\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nclass DefaultUrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n /** Converts a `UrlTree` into a url */\n serialize(tree) {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n return `${segment}${query}${fragment}`;\n }\n}\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children = [];\n forEach(segment.children, (v, k) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n }\n else {\n const children = mapChildrenIntoArray(segment, (v, k) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [`${k}:${serializeSegment(v, false)}`];\n });\n // use no parenthesis if the only child is a primary outlet route\n if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n return `${serializePaths(segment)}/${children[0]}`;\n }\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\nfunction serializeMatrixParams(params) {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\nfunction serializeQueryParams(params) {\n const strParams = Object.keys(params)\n .map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n })\n .filter(s => !!s);\n return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str) {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_VALUE_RE = /^[^&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\nclass UrlParser {\n constructor(url) {\n this.url = url;\n this.remaining = url;\n }\n parseRootSegment() {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n parseQueryParams() {\n const params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n parseFragment() {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n parseChildren() {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n const segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n let children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n let res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n }\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n parseSegment() {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$b && `Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n parseMatrixParams() {\n const params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n parseParam(params) {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n }\n // Parse a single query parameter `name[=value]`\n parseQueryParam(params) {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n }\n else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n // parse `(a/b//outlet_name:c/d)`\n parseParens(allowPrimary) {\n const segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n const next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$b && `Cannot parse url '${this.url}'`);\n }\n let outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.slice(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n }\n else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n }\n peekStartsWith(str) {\n return this.remaining.startsWith(str);\n }\n // Consumes the prefix when it is present and returns whether it has been consumed\n consumeOptional(str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n capture(str) {\n if (!this.consumeOptional(str)) {\n throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$b && `Expected \"${str}\".`);\n }\n }\n}\nfunction createRoot(rootCandidate) {\n return rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate }) :\n rootCandidate;\n}\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup) {\n const newChildren = {};\n for (const childOutlet of Object.keys(segmentGroup.children)) {\n const child = segmentGroup.children[childOutlet];\n const childCandidate = squashSegmentGroup(child);\n // don't add empty children\n if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n newChildren[childOutlet] = childCandidate;\n }\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n return mergeTrivialChildren(s);\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n}\nfunction isUrlTree(v) {\n return v instanceof UrlTree;\n}\n\nconst NG_DEV_MODE$a = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n * any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n let targetGroup;\n function createSegmentGroupFromRouteRecursive(currentRoute) {\n const childOutlets = {};\n for (const childSnapshot of currentRoute.children) {\n const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n childOutlets[childSnapshot.outlet] = root;\n }\n const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n if (currentRoute === route) {\n targetGroup = segmentGroup;\n }\n return segmentGroup;\n }\n const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n const rootSegmentGroup = createRoot(rootCandidate);\n return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n let root = relativeTo;\n while (root.parent) {\n root = root.parent;\n }\n // There are no commands so the `UrlTree` goes to the same path as the one created from the\n // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n // applying any other logic.\n if (commands.length === 0) {\n return tree(root, root, root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n const newSegmentGroup = position.processChildren ?\n updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands) :\n updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree.root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, urlTree.root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n function createTreeUsingPathIndex(lastPathIndex) {\n const startingPosition = findStartingPosition(nav, urlTree, route.snapshot?._urlSegment, lastPathIndex);\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(urlTree.root, startingPosition.segmentGroup, segmentGroup, queryParams, fragment);\n }\n // Note: The types should disallow `snapshot` from being `undefined` but due to test mocks, this\n // may be the case. Since we try to access it at an earlier point before the refactor to add the\n // warning for `relativeLinkResolution: 'legacy'`, this may cause failures in tests where it\n // didn't before.\n const result = createTreeUsingPathIndex(route.snapshot?._lastPathIndex);\n return result;\n}\nfunction isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {\n let qp = {};\n if (queryParams) {\n forEach(queryParams, (value, name) => {\n qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;\n });\n }\n let rootCandidate;\n if (oldRoot === oldSegmentGroup) {\n rootCandidate = newSegmentGroup;\n }\n else {\n rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n }\n const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(current, oldSegment, newSegment) {\n const children = {};\n forEach(current.children, (c, outletName) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n }\n else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\nclass Navigation {\n constructor(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$a && 'Root segment cannot have matrix parameters');\n }\n const cmdWithOutlet = commands.find(isCommandWithOutlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$a && '{outlets:{}} has to be the last command');\n }\n }\n toRoot() {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n const res = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets = {};\n forEach(cmd.outlets, (commands, name) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, { outlets }];\n }\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n }\n else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n }\n else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return [...res, cmd];\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n constructor(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n}\nfunction findStartingPositionForTargetGroup(nav, root, target) {\n if (nav.isAbsolute) {\n return new Position(root, true, 0);\n }\n if (!target) {\n // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n return new Position(root, false, NaN);\n }\n if (target.parent === null) {\n return new Position(target, true, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = target.segments.length - 1 + modifier;\n return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction findStartingPosition(nav, tree, segmentGroup, lastPathIndex) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (lastPathIndex === -1) {\n // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n // see issue #26224, #13011, #35687\n // However, if the ActivatedRoute is the root we should process children like above.\n const processChildren = segmentGroup === tree.root;\n return new Position(segmentGroup, processChildren, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(segmentGroup, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$a && 'Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n if (isCommandWithOutlets(commands[0])) {\n return commands[0].outlets;\n }\n return { [PRIMARY_OUTLET]: commands };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n }\n else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n }\n else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else {\n const outlets = getOutlets(commands);\n const children = {};\n // If the set of commands does not apply anything to the primary outlet and the child segment is\n // an empty path primary segment on its own, we want to apply the commands to the empty child\n // path rather than here. The outcome is that the empty primary child is effectively removed\n // from the final output UrlTree. Imagine the following config:\n //\n // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n //\n // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n // navigation with commands\n // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n // root segment because that would result in\n // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n // the `ActivatedRoute` rather than updating the existing one.\n //\n // Because empty paths do not appear in the URL segments and the fact that the segments used in\n // the output `UrlTree` are squashed to eliminate these empty paths where possible\n // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n // it can be hard to determine what is the right thing to do when applying commands to a\n // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n // the same level of the tree.\n if (!outlets[PRIMARY_OUTLET] && segmentGroup.children[PRIMARY_OUTLET] &&\n segmentGroup.numberOfChildren === 1 &&\n segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {\n const childrenOfEmptyChild = updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);\n return new UrlSegmentGroup(segmentGroup.segments, childrenOfEmptyChild.children);\n }\n forEach(outlets, (commands, outlet) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n forEach(segmentGroup.children, (child, childOutlet) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n const noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length)\n return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const command = commands[currentCommandIndex];\n // Do not try to consume command as part of the prefixing if it has outlets because it can\n // contain outlets other than the one being processed. Consuming the outlets command would\n // result in other outlets being ignored.\n if (isCommandWithOutlets(command)) {\n break;\n }\n const curr = `${command}`;\n const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined)\n break;\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path))\n return noMatch;\n currentCommandIndex += 2;\n }\n else {\n if (!compare(curr, {}, path))\n return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n const paths = segmentGroup.segments.slice(0, startIndex);\n let i = 0;\n while (i < commands.length) {\n const command = commands[i];\n if (isCommandWithOutlets(command)) {\n const children = createNewSegmentChildren(command.outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, stringify(commands[0])));\n i++;\n continue;\n }\n const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n }\n else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n const children = {};\n forEach(outlets, (commands, outlet) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\nfunction stringify(params) {\n const res = {};\n forEach(params, (v, k) => res[k] = `${v}`);\n return res;\n}\nfunction compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n\nconst IMPERATIVE_NAVIGATION = 'imperative';\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n * constructor(public router: Router) {\n * router.events.pipe(\n * filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * // Do something\n * });\n * }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nclass RouterEvent {\n constructor(\n /** A unique ID that the router assigns to every router navigation. */\n id, \n /** The URL that is the destination for this navigation. */\n url) {\n this.id = id;\n this.url = url;\n }\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n navigationTrigger = 'imperative', \n /** @docsNotRequired */\n restoredState = null) {\n super(id, url);\n this.type = 0 /* EventType.NavigationStart */;\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.type = 1 /* EventType.NavigationEnd */;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /**\n * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n * instead for a stable cancellation reason that can be used in production.\n */\n reason, \n /**\n * A code to indicate why the navigation was canceled. This cancellation code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = 2 /* EventType.NavigationCancel */;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nclass NavigationSkipped extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /**\n * A description of why the navigation was skipped. For debug purposes only. Use `code`\n * instead for a stable skipped reason that can be used in production.\n */\n reason, \n /**\n * A code to indicate why the navigation was skipped. This code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = 16 /* EventType.NavigationSkipped */;\n }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n error, \n /**\n * The target of the navigation when the error occurred.\n *\n * Note that this can be `undefined` because an error could have occurred before the\n * `RouterStateSnapshot` was created for the navigation.\n */\n target) {\n super(id, url);\n this.error = error;\n this.target = target;\n this.type = 3 /* EventType.NavigationError */;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 4 /* EventType.RoutesRecognized */;\n }\n /** @docsNotRequired */\n toString() {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 7 /* EventType.GuardsCheckStart */;\n }\n toString() {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state, \n /** @docsNotRequired */\n shouldActivate) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.shouldActivate = shouldActivate;\n this.type = 8 /* EventType.GuardsCheckEnd */;\n }\n toString() {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 5 /* EventType.ResolveStart */;\n }\n toString() {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = 6 /* EventType.ResolveEnd */;\n }\n toString() {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = 9 /* EventType.RouteConfigLoadStart */;\n }\n toString() {\n return `RouteConfigLoadStart(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = 10 /* EventType.RouteConfigLoadEnd */;\n }\n toString() {\n return `RouteConfigLoadEnd(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 11 /* EventType.ChildActivationStart */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nclass ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 12 /* EventType.ChildActivationEnd */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationStart {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 13 /* EventType.ActivationStart */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationEnd {\n constructor(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = 14 /* EventType.ActivationEnd */;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n constructor(\n /** @docsNotRequired */\n routerEvent, \n /** @docsNotRequired */\n position, \n /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n this.type = 15 /* EventType.Scroll */;\n }\n toString() {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\nfunction stringifyEvent(routerEvent) {\n if (!('type' in routerEvent)) {\n return `Unknown Router Event: ${routerEvent.constructor.name}`;\n }\n switch (routerEvent.type) {\n case 14 /* EventType.ActivationEnd */:\n return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 13 /* EventType.ActivationStart */:\n return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 12 /* EventType.ChildActivationEnd */:\n return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 11 /* EventType.ChildActivationStart */:\n return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 8 /* EventType.GuardsCheckEnd */:\n return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n case 7 /* EventType.GuardsCheckStart */:\n return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 2 /* EventType.NavigationCancel */:\n return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 16 /* EventType.NavigationSkipped */:\n return `NavigationSkipped(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 1 /* EventType.NavigationEnd */:\n return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n case 3 /* EventType.NavigationError */:\n return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n case 0 /* EventType.NavigationStart */:\n return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 6 /* EventType.ResolveEnd */:\n return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 5 /* EventType.ResolveStart */:\n return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 10 /* EventType.RouteConfigLoadEnd */:\n return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n case 9 /* EventType.RouteConfigLoadStart */:\n return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n case 4 /* EventType.RoutesRecognized */:\n return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 15 /* EventType.Scroll */:\n const pos = routerEvent.position ? `${routerEvent.position[0]}, ${routerEvent.position[1]}` : null;\n return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\n }\n}\n\nconst NG_DEV_MODE$9 = typeof ngDevMode === 'undefined' || ngDevMode;\nclass LegacyCreateUrlTree {\n createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n const a = relativeTo || currentState.root;\n const tree = createUrlTree(a, currentUrlTree, commands, queryParams, fragment);\n if (NG_DEV_MODE$9) {\n const treeFromSnapshotStrategy = new CreateUrlTreeUsingSnapshot().createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment);\n if (treeFromSnapshotStrategy.toString() !== tree.toString()) {\n let warningString = `The navigation to ${tree.toString()} will instead go to ${treeFromSnapshotStrategy.toString()} in an upcoming version of Angular.`;\n if (!!relativeTo) {\n warningString += ' `relativeTo` might need to be removed from the `UrlCreationOptions`.';\n }\n tree._warnIfUsedForNavigation = warningString;\n }\n }\n return tree;\n }\n}\nLegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeUsingSnapshot {\n createUrlTree(relativeTo, currentState, currentUrlTree, commands, queryParams, fragment) {\n let relativeToUrlSegmentGroup;\n try {\n const relativeToSnapshot = relativeTo ? relativeTo.snapshot : currentState.snapshot.root;\n relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n }\n catch (e) {\n // This is strictly for backwards compatibility with tests that create\n // invalid `ActivatedRoute` mocks.\n // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n // the moment.\n if (typeof commands[0] !== 'string' || !commands[0].startsWith('/')) {\n // Navigations that were absolute in the old way of creating UrlTrees\n // would still work because they wouldn't attempt to match the\n // segments in the `ActivatedRoute` to the `currentUrlTree` but\n // instead just replace the root segment with the navigation result.\n // Non-absolute navigations would fail to apply the commands because\n // the logic could not find the segment to replace (so they'd act like there were no\n // commands).\n commands = [];\n }\n relativeToUrlSegmentGroup = currentUrlTree.root;\n }\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n }\n}\nCreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeUsingSnapshot });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{\n type: Injectable\n }] });\nclass CreateUrlTreeStrategy {\n}\nCreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nCreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: LegacyCreateUrlTree });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useClass: LegacyCreateUrlTree }]\n }] });\n\nclass Tree {\n constructor(root) {\n this._root = root;\n }\n get root() {\n return this._root.value;\n }\n /**\n * @internal\n */\n parent(t) {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n /**\n * @internal\n */\n children(t) {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n /**\n * @internal\n */\n firstChild(t) {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n /**\n * @internal\n */\n siblings(t) {\n const p = findPath(t, this._root);\n if (p.length < 2)\n return [];\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n /**\n * @internal\n */\n pathFromRoot(t) {\n return findPath(t, this._root).map(s => s.value);\n }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n if (value === node.value)\n return [node];\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n return [];\n}\nclass TreeNode {\n constructor(value, children) {\n this.value = value;\n this.children = children;\n }\n toString() {\n return `TreeNode(${this.value})`;\n }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n const map = {};\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n return map;\n}\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n /** @internal */\n constructor(root, \n /** The current snapshot of the router state */\n snapshot) {\n super(root);\n this.snapshot = snapshot;\n setRouterState(this, root);\n }\n toString() {\n return this.snapshot.toString();\n }\n}\nfunction createEmptyState(urlTree, rootComponent) {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(urlTree, rootComponent) {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n * header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route. */\n url, \n /** An observable of the matrix parameters scoped to this route. */\n params, \n /** An observable of the query parameters shared by all the routes. */\n queryParams, \n /** An observable of the URL fragment shared by all the routes. */\n fragment, \n /** An observable of the static and resolved data of this route. */\n data, \n /** The outlet name of the route, a constant. */\n outlet, \n /** The component of the route, a constant. */\n component, futureSnapshot) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n /** An Observable of the resolved route title */\n this.title = this.data?.pipe(map((d) => d[RouteTitleKey])) ?? of(undefined);\n this._futureSnapshot = futureSnapshot;\n }\n /** The configuration used to match this route. */\n get routeConfig() {\n return this._futureSnapshot.routeConfig;\n }\n /** The root of the router state. */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree. */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree. */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree. */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route. */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n /**\n * An Observable that contains a map of the required and optional parameters\n * specific to the route.\n * The map supports retrieving single and multiple values from the same parameter.\n */\n get paramMap() {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p) => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n /**\n * An Observable that contains a map of the query parameters available to all routes.\n * The map supports retrieving single and multiple values from the query parameter.\n */\n get queryParamMap() {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p) => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n toString() {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nfunction inheritedParamsDataResolve(route, paramsInheritanceStrategy = 'emptyOnly') {\n const pathFromRoot = route.pathFromRoot;\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n // parent is componentless => current route should inherit its params and data\n }\n else if (!parent.component) {\n inheritingStartingFrom--;\n }\n else {\n break;\n }\n }\n }\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n/** @internal */\nfunction flattenInherited(pathFromRoot) {\n return pathFromRoot.reduce((res, curr) => {\n const params = { ...res.params, ...curr.params };\n const data = { ...res.data, ...curr.data };\n const resolve = { ...curr.data, ...res.resolve, ...curr.routeConfig?.data, ...curr._resolvedData };\n return { params, data, resolve };\n }, { params: {}, data: {}, resolve: {} });\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass ActivatedRouteSnapshot {\n /** The resolved route title */\n get title() {\n // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n // available at the time of class instantiation.\n return this.data?.[RouteTitleKey];\n }\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n url, \n /**\n * The matrix parameters scoped to this route.\n *\n * You can compute all params (or data) in the router state or to get params outside\n * of an activated component by traversing the `RouterState` tree as in the following\n * example:\n * ```\n * collectRouteParams(router: Router) {\n * let params = {};\n * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n * while (stack.length > 0) {\n * const route = stack.pop()!;\n * params = {...params, ...route.params};\n * stack.push(...route.children);\n * }\n * return params;\n * }\n * ```\n */\n params, \n /** The query parameters shared by all the routes */\n queryParams, \n /** The URL fragment shared by all the routes */\n fragment, \n /** The static and resolved data of this route */\n data, \n /** The outlet name of the route */\n outlet, \n /** The component of the route */\n component, routeConfig, urlSegment, lastPathIndex, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n /** The root of the router state */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n get paramMap() {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n get queryParamMap() {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n toString() {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n url, root) {\n super(root);\n this.url = url;\n setRouterState(this, root);\n }\n toString() {\n return serializeNode(this._root);\n }\n}\nfunction setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParams.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragment.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.params.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.url.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.data.next(nextSnapshot.data);\n }\n }\n else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.data.next(route._futureSnapshot.data);\n }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n}\n\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n }\n else {\n if (routeReuseStrategy.shouldAttach(curr.value)) {\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle !== null) {\n const tree = detachedRouteHandle.route;\n tree.value._futureSnapshot = curr.value;\n tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return tree;\n }\n }\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode(value, children);\n }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\nfunction createActivatedRoute(c) {\n return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n const { redirectTo, navigationBehaviorOptions } = isUrlTree(redirect) ? { redirectTo: redirect, navigationBehaviorOptions: undefined } : redirect;\n const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, 0 /* NavigationCancellationCode.Redirect */, redirect);\n error.url = redirectTo;\n error.navigationBehaviorOptions = navigationBehaviorOptions;\n return error;\n}\nfunction navigationCancelingError(message, code, redirectUrl) {\n const error = new Error('NavigationCancelingError: ' + (message || ''));\n error[NAVIGATION_CANCELING_ERROR] = true;\n error.cancellationCode = code;\n if (redirectUrl) {\n error.url = redirectUrl;\n }\n return error;\n}\nfunction isRedirectingNavigationCancelingError$1(error) {\n return isNavigationCancelingError$1(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError$1(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n}\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n constructor() {\n this.outlet = null;\n this.route = null;\n /**\n * @deprecated Passing a resolver to retrieve a component factory is not required and is\n * deprecated since v14.\n */\n this.resolver = null;\n this.injector = null;\n this.children = new ChildrenOutletContexts();\n this.attachRef = null;\n }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nclass ChildrenOutletContexts {\n constructor() {\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName, outlet) {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName) {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n context.attachRef = null;\n }\n }\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated() {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n onOutletReAttached(contexts) {\n this.contexts = contexts;\n }\n getOrCreateContext(childName) {\n let context = this.getContext(childName);\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n return context;\n }\n getContext(childName) {\n return this.contexts.get(childName) || null;\n }\n}\nChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ChildrenOutletContexts, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nconst NG_DEV_MODE$8 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'\n * (attach)='onAttach($event)'\n * (detach)='onDetach($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterOutlet {\n constructor() {\n this.activated = null;\n this._activatedRoute = null;\n /**\n * The name of the outlet\n *\n * @see [named outlets](guide/router-tutorial-toh#displaying-multiple-routes-in-named-outlets)\n */\n this.name = PRIMARY_OUTLET;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n this.attachEvents = new EventEmitter();\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n this.detachEvents = new EventEmitter();\n this.parentContexts = inject(ChildrenOutletContexts);\n this.location = inject(ViewContainerRef);\n this.changeDetector = inject(ChangeDetectorRef);\n this.environmentInjector = inject(EnvironmentInjector);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['name']) {\n const { firstChange, previousValue } = changes['name'];\n if (firstChange) {\n // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n // input is set at all, we need to centrally handle the first change there.\n return;\n }\n // unregister with the old name\n if (this.isTrackedInParentContexts(previousValue)) {\n this.deactivate();\n this.parentContexts.onChildOutletDestroyed(previousValue);\n }\n // register the new name\n this.initializeOutletWithName();\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n // Ensure that the registered outlet is this one before removing it on the context.\n if (this.isTrackedInParentContexts(this.name)) {\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n }\n isTrackedInParentContexts(outletName) {\n return this.parentContexts.getContext(outletName)?.outlet === this;\n }\n /** @nodoc */\n ngOnInit() {\n this.initializeOutletWithName();\n }\n initializeOutletWithName() {\n this.parentContexts.onChildOutletCreated(this.name, this);\n if (this.activated) {\n return;\n }\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n }\n else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.injector);\n }\n }\n }\n get isActivated() {\n return !!this.activated;\n }\n /**\n * @returns The currently activated component instance.\n * @throws An error if the outlet is not activated.\n */\n get component() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n return this.activated.instance;\n }\n get activatedRoute() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n return this._activatedRoute;\n }\n get activatedRouteData() {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$8 && 'Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(cmp.instance);\n return cmp;\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n this.attachEvents.emit(ref.instance);\n }\n deactivate() {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n activateWith(activatedRoute, resolverOrInjector) {\n if (this.isActivated) {\n throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$8 && 'Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const location = this.location;\n const snapshot = activatedRoute.snapshot;\n const component = snapshot.component;\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n if (resolverOrInjector && isComponentFactoryResolver(resolverOrInjector)) {\n const factory = resolverOrInjector.resolveComponentFactory(component);\n this.activated = location.createComponent(factory, location.length, injector);\n }\n else {\n const environmentInjector = resolverOrInjector ?? this.environmentInjector;\n this.activated = location.createComponent(component, { index: location.length, injector, environmentInjector });\n }\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\nRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: RouterOutlet, isStandalone: true, selector: \"router-outlet\", inputs: { name: \"name\" }, outputs: { activateEvents: \"activate\", deactivateEvents: \"deactivate\", attachEvents: \"attach\", detachEvents: \"detach\" }, exportAs: [\"outlet\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: 'router-outlet',\n exportAs: 'outlet',\n standalone: true,\n }]\n }], propDecorators: { name: [{\n type: Input\n }], activateEvents: [{\n type: Output,\n args: ['activate']\n }], deactivateEvents: [{\n type: Output,\n args: ['deactivate']\n }], attachEvents: [{\n type: Output,\n args: ['attach']\n }], detachEvents: [{\n type: Output,\n args: ['detach']\n }] } });\nclass OutletInjector {\n constructor(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n get(token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n }\n}\nfunction isComponentFactoryResolver(item) {\n return !!item.resolveComponentFactory;\n}\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nclass ɵEmptyOutletComponent {\n}\nɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.9\", type: ɵEmptyOutletComponent, isStandalone: true, selector: \"ng-component\", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: \"directive\", type: RouterOutlet, selector: \"router-outlet\", inputs: [\"name\"], outputs: [\"activate\", \"deactivate\", \"attach\", \"detach\"], exportAs: [\"outlet\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{\n type: Component,\n args: [{\n template: `<router-outlet></router-outlet>`,\n imports: [RouterOutlet],\n standalone: true,\n }]\n }] });\n\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n }\n return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes(route) {\n return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route = config[i];\n const fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath, requireStandaloneComponents);\n }\n}\nfunction assertStandalone(fullPath, component) {\n if (component && ɵisNgModule(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +\n `but it must be used with standalone components. Use 'loadChildren' instead.`);\n }\n else if (component && !isStandalone(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!route) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.redirectTo && !route.component && !route.loadComponent && !route.children &&\n !route.loadChildren && (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && (route.component || route.loadComponent)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n }\n if (route.component && route.loadComponent) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n }\n if (route.redirectTo && route.canActivate) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n `so canActivate will never be executed.`);\n }\n if (route.path && route.matcher) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.loadComponent &&\n !route.children && !route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (requireStandaloneComponents) {\n assertStandalone(fullPath, route.component);\n }\n }\n if (route.children) {\n validateConfig(route.children, fullPath, requireStandaloneComponents);\n }\n}\nfunction getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n }\n else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n }\n else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n }\n else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? { ...r, children } : { ...r };\n if ((!c.component && !c.loadComponent) && (children || c.loadChildren) &&\n (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = ɵEmptyOutletComponent;\n }\n return c;\n}\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n return sortedConfig;\n}\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n if (!snapshot)\n return null;\n // If the current route has its own injector, which is created from the static providers on the\n // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n // include the lazy loaded injector from this route.\n if (snapshot.routeConfig?._injector) {\n return snapshot.routeConfig._injector;\n }\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n // Note that the order here is important. `_loadedInjector` stored on the route with\n // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n // is created from the static providers on that parent route, so it applies to the children as\n // well, but only if there is no lazy loaded NgModuleRef injector.\n if (route?._loadedInjector)\n return route._loadedInjector;\n if (route?._injector)\n return route._injector;\n }\n return null;\n}\n\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent) => map(t => {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n});\nclass ActivateRoutes {\n constructor(routeReuseStrategy, futureState, currState, forwardEvent) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n }\n activate(parentContexts) {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n // De-activate the child route that are not re-used for the future state\n deactivateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n forEach(children, (v, childName) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n deactivateRoutes(futureNode, currNode, parentContext) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n }\n else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n deactivateRouteAndItsChildren(route, parentContexts) {\n // If there is no component, the Route is never attached to an outlet (because there is no\n // component to attach).\n if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n }\n else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n detachAndStoreRouteSubtree(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const childOutlet of Object.keys(children)) {\n this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n }\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, { componentRef, route, contexts });\n }\n }\n deactivateRouteAndOutlet(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n // The context could be `null` if we are on a componentless route but there may still be\n // children that need deactivating.\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const childOutlet of Object.keys(children)) {\n this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n }\n if (context) {\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet. Clear even if outlet was not yet activated to avoid activating later with old\n // info\n context.attachRef = null;\n context.resolver = null;\n context.route = null;\n }\n }\n activateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n activateRoutes(futureNode, currNode, parentContexts) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n }\n else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n }\n else {\n const injector = getClosestRouteInjector(future.snapshot);\n const cmpFactoryResolver = injector?.get(ComponentFactoryResolver) ?? null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n context.injector = injector;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, context.injector);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nclass CanActivate {\n constructor(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n}\nclass CanDeactivate {\n constructor(component, route) {\n this.component = component;\n this.route = route;\n }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0)\n return null;\n return { node: p, guards: canActivateChild };\n}\nfunction getTokenOrFunctionIdentity(tokenOrFunction, injector) {\n const NOT_FOUND = Symbol();\n const result = injector.get(tokenOrFunction, NOT_FOUND);\n if (result === NOT_FOUND) {\n if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {\n // We think the token is just a function so return it as-is\n return tokenOrFunction;\n }\n else {\n // This will throw the not found error\n return injector.get(tokenOrFunction);\n }\n }\n return result;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n forEach(prevChildren, (v, k) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n }\n else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n }\n }\n else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n forEach(children, (node, childName) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n }\n else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n }\n else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n }\n else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n return typeof v === 'function';\n}\nfunction isBoolean(v) {\n return typeof v === 'boolean';\n}\nfunction isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\n}\nfunction isCanMatch(guard) {\n return guard && isFunction(guard.canMatch);\n}\nfunction isRedirectingNavigationCancelingError(error) {\n return isNavigationCancelingError(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n}\nfunction isEmptyError(e) {\n return e instanceof EmptyError || e?.name === 'EmptyError';\n}\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n return switchMap(obs => {\n return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE))))\n .pipe(map((results) => {\n for (const result of results) {\n if (result === true) {\n // If result is true, check the next one\n continue;\n }\n else if (result === INITIAL_VALUE) {\n // If guard has not finished, we need to stop processing.\n return INITIAL_VALUE;\n }\n else if (result === false || result instanceof UrlTree) {\n // Result finished and was not true. Return the result.\n // Note that we only allow false/UrlTree. Other values are considered invalid and\n // ignored.\n return result;\n }\n }\n // Everything resolved to true. Return true.\n return true;\n }), filter((item) => item !== INITIAL_VALUE), take(1));\n });\n}\n\nfunction checkGuards(injector, forwardEvent) {\n return mergeMap(t => {\n const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks } } = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of({ ...t, guardsResult: true });\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector)\n .pipe(mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent) :\n of(canDeactivate);\n }), map(guardsResult => ({ ...t, guardsResult })));\n });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {\n return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first(result => {\n return result !== true;\n }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {\n return from(checks).pipe(concatMap((check) => {\n return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));\n }), first(result => {\n return result !== true;\n }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, injector) {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0)\n return of(true);\n const canActivateObservables = canActivate.map((canActivate) => {\n return defer(() => {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);\n const guardVal = isCanActivate(guard) ?\n guard.canActivate(futureARS, futureRSS) :\n closestInjector.runInContext(() => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n });\n return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, injector) {\n const futureARS = path[path.length - 1];\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => {\n return defer(() => {\n const guardsMapped = d.guards.map((canActivateChild) => {\n const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);\n const guardVal = isCanActivateChild(guard) ?\n guard.canActivateChild(futureARS, futureRSS) :\n closestInjector.runInContext(() => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0)\n return of(true);\n const canDeactivateObservables = canDeactivate.map((c) => {\n const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(c, closestInjector);\n const guardVal = isCanDeactivate(guard) ?\n guard.canDeactivate(component, currARS, currRSS, futureRSS) :\n closestInjector.runInContext(() => guard(component, currARS, currRSS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n const canLoad = route.canLoad;\n if (canLoad === undefined || canLoad.length === 0) {\n return of(true);\n }\n const canLoadObservables = canLoad.map((injectionToken) => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanLoad(guard) ?\n guard.canLoad(route, segments) :\n injector.runInContext(() => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canLoadObservables)\n .pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n return pipe(tap((result) => {\n if (!isUrlTree(result))\n return;\n throw redirectingNavigationError(urlSerializer, result);\n }), map(result => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n const canMatch = route.canMatch;\n if (!canMatch || canMatch.length === 0)\n return of(true);\n const canMatchObservables = canMatch.map(injectionToken => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanMatch(guard) ?\n guard.canMatch(route, segments) :\n injector.runInContext(() => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canMatchObservables)\n .pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\n\nconst noMatch$1 = {\n matched: false,\n consumedSegments: [],\n remainingSegments: [],\n parameters: {},\n positionalParamSegments: {}\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n const result = match(segmentGroup, route, segments);\n if (!result.matched) {\n return of(result);\n }\n // Only create the Route's `EnvironmentInjector` if it matches the attempted\n // navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n return runCanMatchGuards(injector, route, segments, urlSerializer)\n .pipe(map((v) => v === true ? result : { ...noMatch$1 }));\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { ...noMatch$1 };\n }\n return {\n matched: true,\n consumedSegments: [],\n remainingSegments: segments,\n parameters: {},\n positionalParamSegments: {}\n };\n }\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res)\n return { ...noMatch$1 };\n const posParams = {};\n forEach(res.posParams, (v, k) => {\n posParams[k] = v.path;\n });\n const parameters = res.consumed.length > 0 ?\n { ...posParams, ...res.consumed[res.consumed.length - 1].parameters } :\n posParams;\n return {\n matched: true,\n consumedSegments: res.consumed,\n remainingSegments: segments.slice(res.consumed.length),\n // TODO(atscott): investigate combining parameters and positionalParamSegments\n parameters,\n positionalParamSegments: res.posParams ?? {}\n };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments };\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children) {\n const res = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return { ...children, ...res };\n}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n const res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '';\n}\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nfunction isImmediateMatch(route, rawSegment, segments, outlet) {\n // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n // a config like\n // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n // or even\n // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n //\n // The exception here is when the segment outlet is for the primary outlet. This would\n // result in a match inside the named outlet because all children there are written as primary\n // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n // This should only match if the url is `/(x:b)`.\n if (getOutlet(route) !== outlet &&\n (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n return false;\n }\n if (route.path === '**') {\n return true;\n }\n return match(rawSegment, route, segments).matched;\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n}\n\nconst NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;\nclass NoMatch$1 {\n constructor(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n}\nclass AbsoluteRedirect {\n constructor(urlTree) {\n this.urlTree = urlTree;\n }\n}\nfunction noMatch(segmentGroup) {\n return throwError(new NoMatch$1(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$7 &&\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n return throwError(navigationCancelingError(NG_DEV_MODE$7 &&\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, 3 /* NavigationCancellationCode.GuardRejected */));\n}\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nfunction applyRedirects$1(injector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(injector, configLoader, urlSerializer, urlTree, config).apply();\n}\nclass ApplyRedirects {\n constructor(injector, configLoader, urlSerializer, urlTree, config) {\n this.injector = injector;\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\n }\n apply() {\n const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n // properties. Before the implementations were merged, the `applyRedirects` would not assign\n // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n // investigation into the failures first.\n const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n const expanded$ = this.expandSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(map((rootSegmentGroup) => {\n return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n }));\n return urlTrees$.pipe(catchError((e) => {\n if (e instanceof AbsoluteRedirect) {\n // After an absolute redirect we do not apply any more redirects!\n // If this implementation changes, update the documentation note in `redirectTo`.\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n if (e instanceof NoMatch$1) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n match(tree) {\n const expanded$ = this.expandSegmentGroup(this.injector, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(map((rootSegmentGroup) => {\n return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n }));\n return mapped$.pipe(catchError((e) => {\n if (e instanceof NoMatch$1) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n noMatchError(e) {\n return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$7 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n createUrlTree(rootCandidate, queryParams, fragment) {\n const root = createRoot(rootCandidate);\n return new UrlTree(root, queryParams, fragment);\n }\n expandSegmentGroup(injector, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(injector, routes, segmentGroup)\n .pipe(map((children) => new UrlSegmentGroup([], children)));\n }\n return this.expandSegment(injector, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n // Recursively expand segment groups for all the child outlets\n expandChildren(injector, routes, segmentGroup) {\n // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n // because an absolute redirect from the primary outlet takes precedence.\n const childOutlets = [];\n for (const child of Object.keys(segmentGroup.children)) {\n if (child === 'primary') {\n childOutlets.unshift(child);\n }\n else {\n childOutlets.push(child);\n }\n }\n return from(childOutlets)\n .pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the routes so routes with outlets that match the segment appear\n // first, followed by routes for other outlets, which might match if they have an\n // empty path.\n const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n return this.expandSegmentGroup(injector, sortedRoutes, child, childOutlet)\n .pipe(map(s => ({ segment: s, outlet: childOutlet })));\n }), scan((children, expandedChild) => {\n children[expandedChild.outlet] = expandedChild.segment;\n return children;\n }, {}), last$1());\n }\n expandSegment(injector, segmentGroup, routes, segments, outlet, allowRedirects) {\n return from(routes).pipe(concatMap(r => {\n const expanded$ = this.expandSegmentAgainstRoute(injector, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e) => {\n if (e instanceof NoMatch$1) {\n return of(null);\n }\n throw e;\n }));\n }), first((s) => !!s), catchError((e, _) => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of(new UrlSegmentGroup([], {}));\n }\n return noMatch(segmentGroup);\n }\n throw e;\n }));\n }\n expandSegmentAgainstRoute(injector, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(injector, segmentGroup, route, paths, outlet);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n }\n expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet);\n }\n expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet) {\n const newTree = this.applyRedirectCommands([], route.redirectTo, {});\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(injector, group, routes, newSegments, outlet, false);\n }));\n }\n expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n const { matched, consumedSegments, remainingSegments, positionalParamSegments } = match(segmentGroup, route, segments);\n if (!matched)\n return noMatch(segmentGroup);\n const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n return this.expandSegment(injector, segmentGroup, routes, newSegments.concat(remainingSegments), outlet, false);\n }));\n }\n matchSegmentAgainstRoute(injector, rawSegmentGroup, route, segments, outlet) {\n if (route.path === '**') {\n // Only create the Route's `EnvironmentInjector` if it matches the attempted navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n if (route.loadChildren) {\n const loaded$ = route._loadedRoutes ?\n of({ routes: route._loadedRoutes, injector: route._loadedInjector }) :\n this.configLoader.loadChildren(injector, route);\n return loaded$.pipe(map((cfg) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return of(new UrlSegmentGroup(segments, {}));\n }\n return matchWithChecks(rawSegmentGroup, route, segments, injector, this.urlSerializer)\n .pipe(switchMap(({ matched, consumedSegments, remainingSegments }) => {\n if (!matched)\n return noMatch(rawSegmentGroup);\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n const childConfig$ = this.getChildConfig(injector, route, segments);\n return childConfig$.pipe(mergeMap((routerConfig) => {\n const childInjector = routerConfig.injector ?? injector;\n const childConfig = routerConfig.routes;\n const { segmentGroup: splitSegmentGroup, slicedSegments } = split(rawSegmentGroup, consumedSegments, remainingSegments, childConfig);\n // See comment on the other call to `split` about why this is necessary.\n const segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childInjector, childConfig, segmentGroup);\n return expanded$.pipe(map((children) => new UrlSegmentGroup(consumedSegments, children)));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new UrlSegmentGroup(consumedSegments, {}));\n }\n const matchedOnOutlet = getOutlet(route) === outlet;\n const expanded$ = this.expandSegment(childInjector, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n return expanded$.pipe(map((cs) => new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }));\n }\n getChildConfig(injector, route, segments) {\n if (route.children) {\n // The children belong to the same module\n return of({ routes: route.children, injector });\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedRoutes !== undefined) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n return runCanLoadGuards(injector, route, segments, this.urlSerializer)\n .pipe(mergeMap((shouldLoadResult) => {\n if (shouldLoadResult) {\n return this.configLoader.loadChildren(injector, route)\n .pipe(tap((cfg) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of({ routes: [], injector });\n }\n lineralizeSegments(route, urlTree) {\n let res = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n }\n applyRedirectCommands(segments, redirectTo, posParams) {\n return this.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n applyRedirectCreateUrlTree(redirectTo, urlTree, segments, posParams) {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n }\n createQueryParams(redirectToParams, actualParams) {\n const res = {};\n forEach(redirectToParams, (v, k) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n }\n else {\n res[k] = v;\n }\n });\n return res;\n }\n createSegmentGroup(redirectTo, group, segments, posParams) {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n let children = {};\n forEach(group.children, (child, name) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n }\n createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n return redirectToSegments.map(s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$7 &&\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n findOrReturn(redirectToUrlSegment, actualSegments) {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction applyRedirects(environmentInjector, configLoader, urlSerializer, config) {\n return switchMap(t => applyRedirects$1(environmentInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({ ...t, urlAfterRedirects }))));\n}\n\nconst NG_DEV_MODE$6 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NoMatch {\n}\nfunction newObservableError(e) {\n // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n return new Observable((obs) => obs.error(e));\n}\nfunction recognize$1(injector, rootComponentType, config, urlTree, url, urlSerializer, paramsInheritanceStrategy = 'emptyOnly') {\n return new Recognizer(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, urlSerializer)\n .recognize()\n .pipe(switchMap(result => {\n if (result === null) {\n return newObservableError(new NoMatch());\n }\n else {\n return of(result);\n }\n }));\n}\nclass Recognizer {\n constructor(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, urlSerializer) {\n this.injector = injector;\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.urlSerializer = urlSerializer;\n }\n recognize() {\n const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined))\n .segmentGroup;\n return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET)\n .pipe(map(children => {\n if (children === null) {\n return null;\n }\n // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n // navigation, resulting in the router being out of sync with the browser.\n const root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n const rootNode = new TreeNode(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return routeState;\n }));\n }\n inheritParamsAndData(routeNode) {\n const route = routeNode.value;\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n processSegmentGroup(injector, config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(injector, config, segmentGroup);\n }\n return this.processSegment(injector, config, segmentGroup, segmentGroup.segments, outlet);\n }\n /**\n * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n * we cannot find a match for _any_ of the children.\n *\n * @param config - The `Routes` to match against\n * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n * config.\n */\n processChildren(injector, config, segmentGroup) {\n return from(Object.keys(segmentGroup.children))\n .pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the config so that routes with outlets that match the one being activated\n // appear first, followed by routes for other outlets, which might match if they have\n // an empty path.\n const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n return this.processSegmentGroup(injector, sortedConfig, child, childOutlet);\n }), scan((children, outletChildren) => {\n if (!children || !outletChildren)\n return null;\n children.push(...outletChildren);\n return children;\n }), takeWhile(children => children !== null), defaultIfEmpty(null), last$1(), map(children => {\n if (children === null)\n return null;\n // Because we may have matched two outlets to the same empty path segment, we can have\n // multiple activated results for the same outlet. We should merge the children of\n // these results so the final return value is only one `TreeNode` per outlet.\n const mergedChildren = mergeEmptyPathMatches(children);\n if (NG_DEV_MODE$6) {\n // This should really never happen - we are only taking the first match for each\n // outlet and merge the empty path matches.\n checkOutletNameUniqueness(mergedChildren);\n }\n sortActivatedRouteSnapshots(mergedChildren);\n return mergedChildren;\n }));\n }\n processSegment(injector, routes, segmentGroup, segments, outlet) {\n return from(routes).pipe(concatMap(r => {\n return this.processSegmentAgainstRoute(r._injector ?? injector, r, segmentGroup, segments, outlet);\n }), first((x) => !!x), catchError(e => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of([]);\n }\n return of(null);\n }\n throw e;\n }));\n }\n processSegmentAgainstRoute(injector, route, rawSegment, segments, outlet) {\n if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet))\n return of(null);\n let matchResult;\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments).parameters : {};\n const pathIndexShift = getPathIndexShift(rawSegment) + segments.length;\n const snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route));\n matchResult = of({\n snapshot,\n consumedSegments: [],\n remainingSegments: [],\n });\n }\n else {\n matchResult =\n matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer)\n .pipe(map(({ matched, consumedSegments, remainingSegments, parameters }) => {\n if (!matched) {\n return null;\n }\n const pathIndexShift = getPathIndexShift(rawSegment) + consumedSegments.length;\n const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route));\n return { snapshot, consumedSegments, remainingSegments };\n }));\n }\n return matchResult.pipe(switchMap((result) => {\n if (result === null) {\n return of(null);\n }\n const { snapshot, consumedSegments, remainingSegments } = result;\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n const childInjector = route._loadedInjector ?? injector;\n const childConfig = getChildConfig(route);\n const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, remainingSegments, \n // Filter out routes with redirectTo because we are trying to create activated route\n // snapshots and don't handle redirects here. That should have been done in\n // `applyRedirects`.\n childConfig.filter(c => c.redirectTo === undefined));\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(childInjector, childConfig, segmentGroup).pipe(map(children => {\n if (children === null) {\n return null;\n }\n return [new TreeNode(snapshot, children)];\n }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of([new TreeNode(snapshot, [])]);\n }\n const matchedOnOutlet = getOutlet(route) === outlet;\n // If we matched a config due to empty path match on a different outlet, we need to\n // continue passing the current outlet for the segment rather than switch to PRIMARY.\n // Note that we switch to primary when we have a match because outlet configs look like\n // this: {path: 'a', outlet: 'a', children: [\n // {path: 'b', component: B},\n // {path: 'c', component: C},\n // ]}\n // Notice that the children of the named outlet are configured with the primary outlet\n return this\n .processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet)\n .pipe(map(children => {\n if (children === null) {\n return null;\n }\n return [new TreeNode(snapshot, children)];\n }));\n }));\n }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET)\n return -1;\n if (b.value.outlet === PRIMARY_OUTLET)\n return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\nfunction getChildConfig(route) {\n if (route.children) {\n return route.children;\n }\n if (route.loadChildren) {\n return route._loadedRoutes;\n }\n return [];\n}\nfunction hasEmptyPathConfig(node) {\n const config = node.value.routeConfig;\n return config && config.path === '' && config.redirectTo === undefined;\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n }\n else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs\n // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n // if any of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n const names = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$6 && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\nfunction getSourceSegmentGroup(segmentGroup) {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\nfunction getPathIndexShift(segmentGroup) {\n let s = segmentGroup;\n let res = s._segmentIndexShift ?? 0;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += s._segmentIndexShift ?? 0;\n }\n return res - 1;\n}\nfunction getCorrectedPathIndexShift(segmentGroup) {\n let s = segmentGroup;\n let res = s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n }\n return res - 1;\n}\nfunction getData(route) {\n return route.data || {};\n}\nfunction getResolve(route) {\n return route.resolve || {};\n}\n\nfunction recognize(injector, rootComponentType, config, serializer, paramsInheritanceStrategy) {\n return mergeMap(t => recognize$1(injector, rootComponentType, config, t.urlAfterRedirects, serializer.serialize(t.urlAfterRedirects), serializer, paramsInheritanceStrategy)\n .pipe(map(targetSnapshot => ({ ...t, targetSnapshot }))));\n}\n\nfunction resolveData(paramsInheritanceStrategy, injector) {\n return mergeMap(t => {\n const { targetSnapshot, guards: { canActivateChecks } } = t;\n if (!canActivateChecks.length) {\n return of(t);\n }\n let canActivateChecksResolved = 0;\n return from(canActivateChecks)\n .pipe(concatMap(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, injector)), tap(() => canActivateChecksResolved++), takeLast(1), mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY));\n });\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {\n const config = futureARS.routeConfig;\n const resolve = futureARS._resolve;\n if (config?.title !== undefined && !hasStaticTitle(config)) {\n resolve[RouteTitleKey] = config.title;\n }\n return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map((resolvedData) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve;\n if (config && hasStaticTitle(config)) {\n futureARS.data[RouteTitleKey] = config.title;\n }\n return null;\n }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, injector) {\n const keys = getDataKeys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n const data = {};\n return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, injector)\n .pipe(first(), tap((value) => {\n data[key] = value;\n }))), takeLast(1), mapTo(data), catchError((e) => isEmptyError(e) ? EMPTY : throwError(e)));\n}\nfunction getDataKeys(obj) {\n return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, injector) {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n const resolverValue = resolver.resolve ?\n resolver.resolve(futureARS, futureRSS) :\n closestInjector.runInContext(() => resolver(futureARS, futureRSS));\n return wrapIntoObservable(resolverValue);\n}\nfunction hasStaticTitle(config) {\n return typeof config.title === 'string' || config.title === null;\n}\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n return switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return of(v);\n });\n}\n\nconst NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = new InjectionToken('ROUTES');\nclass RouterConfigLoader {\n constructor() {\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n this.compiler = inject(Compiler);\n }\n loadComponent(route) {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route);\n }\n else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent())\n .pipe(map(maybeUnwrapDefaultExport), tap(component => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n NG_DEV_MODE$5 && assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }), finalize(() => {\n this.componentLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.componentLoaders.set(route, loader);\n return loader;\n }\n loadChildren(parentInjector, route) {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route);\n }\n else if (route._loadedRoutes) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);\n const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no\n // injector associated with lazy loading a `Route` array.\n let injector;\n let rawRoutes;\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n }\n else {\n injector = factoryOrRoutes.create(parentInjector).injector;\n // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n // will get stuck in an infinite loop. The child module's Injector will look to\n // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n // for it's parent module instead.\n rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));\n }\n const routes = rawRoutes.map(standardizeConfig);\n NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);\n return { routes, injector };\n }), finalize(() => {\n this.childrenLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject())\n .pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n loadModuleFactoryOrRoutes(loadChildren) {\n return wrapIntoObservable(loadChildren())\n .pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n }\n else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n}\nRouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterConfigLoader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\nfunction isWrappedDefaultExport(value) {\n // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n // `default` will be a renamed property.\n return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n // subject to property renaming, so we reference it with bracket access.\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\nconst NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NavigationTransitions {\n get hasRequestedNavigation() {\n return this.navigationId !== 0;\n }\n constructor() {\n this.currentNavigation = null;\n this.lastSuccessfulNavigation = null;\n this.events = new Subject();\n this.configLoader = inject(RouterConfigLoader);\n this.environmentInjector = inject(EnvironmentInjector);\n this.urlSerializer = inject(UrlSerializer);\n this.rootContexts = inject(ChildrenOutletContexts);\n this.navigationId = 0;\n /**\n * Hook that enables you to pause navigation after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n this.afterPreactivation = () => of(void 0);\n /** @internal */\n this.rootComponentType = null;\n const onLoadStart = (r) => this.events.next(new RouteConfigLoadStart(r));\n const onLoadEnd = (r) => this.events.next(new RouteConfigLoadEnd(r));\n this.configLoader.onLoadEndListener = onLoadEnd;\n this.configLoader.onLoadStartListener = onLoadStart;\n }\n complete() {\n this.transitions?.complete();\n }\n handleNavigationRequest(request) {\n const id = ++this.navigationId;\n this.transitions?.next({ ...this.transitions.value, ...request, id });\n }\n setupNavigations(router) {\n this.transitions = new BehaviorSubject({\n id: 0,\n targetPageId: 0,\n currentUrlTree: router.currentUrlTree,\n currentRawUrl: router.currentUrlTree,\n extractedUrl: router.urlHandlingStrategy.extract(router.currentUrlTree),\n urlAfterRedirects: router.urlHandlingStrategy.extract(router.currentUrlTree),\n rawUrl: router.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: IMPERATIVE_NAVIGATION,\n restoredState: null,\n currentSnapshot: router.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: router.routerState,\n targetRouterState: null,\n guards: { canActivateChecks: [], canDeactivateChecks: [] },\n guardsResult: null,\n });\n return this.transitions.pipe(filter(t => t.id !== 0), \n // Extract URL\n map(t => ({ ...t, extractedUrl: router.urlHandlingStrategy.extract(t.rawUrl) })), \n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(overallTransitionState => {\n let completed = false;\n let errored = false;\n return of(overallTransitionState)\n .pipe(\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.rawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: !this.lastSuccessfulNavigation ? null : {\n ...this.lastSuccessfulNavigation,\n previousNavigation: null,\n },\n };\n }), switchMap(t => {\n const browserUrlTree = router.browserUrlTree.toString();\n const urlTransition = !router.navigated ||\n t.extractedUrl.toString() !== browserUrlTree ||\n // Navigations which succeed or ones which fail and are cleaned up\n // correctly should result in `browserUrlTree` and `currentUrlTree`\n // matching. If this is not the case, assume something went wrong and\n // try processing the URL again.\n browserUrlTree !== router.currentUrlTree.toString();\n const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n if (!urlTransition && onSameUrlNavigation !== 'reload') {\n const reason = NG_DEV_MODE$4 ?\n `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.` :\n '';\n this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.rawUrl), reason, 0 /* NavigationSkippedCode.IgnoredSameUrlNavigation */));\n router.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n if (router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\n // If the source of the navigation is from a browser event, the URL is\n // already updated. We already need to sync the internal state.\n if (isBrowserTriggeredNavigation(t.source)) {\n router.browserUrlTree = t.extractedUrl;\n }\n return of(t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions?.getValue();\n this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions?.getValue()) {\n return EMPTY;\n }\n // This delay is required to match old behavior that forced\n // navigation to always be async\n return Promise.resolve(t);\n }), \n // ApplyRedirects\n applyRedirects(this.environmentInjector, this.configLoader, this.urlSerializer, router.config), \n // Update the currentNavigation\n // `urlAfterRedirects` is guaranteed to be set after this point\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation,\n finalUrl: t.urlAfterRedirects\n };\n overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n }), \n // Recognize\n recognize(this.environmentInjector, this.rootComponentType, router.config, this.urlSerializer, router.paramsInheritanceStrategy), \n // Update URL if in `eager` update mode\n tap(t => {\n overallTransitionState.targetSnapshot = t.targetSnapshot;\n if (router.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n const rawUrl = router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n router.setBrowserUrl(rawUrl, t);\n }\n router.browserUrlTree = t.urlAfterRedirects;\n }\n // Fire RoutesRecognized\n const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(routesRecognized);\n }));\n }\n else if (urlTransition &&\n router.urlHandlingStrategy.shouldProcessUrl(router.rawUrlTree)) {\n /* When the current URL shouldn't be processed, but the previous one\n * was, we handle this \"error condition\" by navigating to the\n * previously successful URL, but leaving the URL intact.*/\n const { id, extractedUrl, source, restoredState, extras } = t;\n const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);\n this.events.next(navStart);\n const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n overallTransitionState = {\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: { ...extras, skipLocationChange: false, replaceUrl: false },\n };\n return of(overallTransitionState);\n }\n else {\n /* When neither the current or previous URL can be processed, do\n * nothing other than update router's internal reference to the\n * current \"settled\" URL. This way the next navigation will be coming\n * from the current URL in the browser.\n */\n const reason = NG_DEV_MODE$4 ?\n `Navigation was ignored because the UrlHandlingStrategy` +\n ` indicated neither the current URL ${router.rawUrlTree} nor target URL ${t.rawUrl} should be processed.` :\n '';\n this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.extractedUrl), reason, 1 /* NavigationSkippedCode.IgnoredByUrlHandlingStrategy */));\n router.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }), \n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(guardsStart);\n }), map(t => {\n overallTransitionState = {\n ...t,\n guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)\n };\n return overallTransitionState;\n }), checkGuards(this.environmentInjector, (evt) => this.events.next(evt)), tap(t => {\n overallTransitionState.guardsResult = t.guardsResult;\n if (isUrlTree(t.guardsResult)) {\n throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n }\n const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n this.events.next(guardsEnd);\n }), filter(t => {\n if (!t.guardsResult) {\n router.restoreHistory(t);\n this.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */);\n return false;\n }\n return true;\n }), \n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(tap(t => {\n const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveStart);\n }), switchMap(t => {\n let dataResolved = false;\n return of(t).pipe(resolveData(router.paramsInheritanceStrategy, this.environmentInjector), tap({\n next: () => dataResolved = true,\n complete: () => {\n if (!dataResolved) {\n router.restoreHistory(t);\n this.cancelNavigationTransition(t, NG_DEV_MODE$4 ?\n `At least one route resolver didn't emit any value.` :\n '', 2 /* NavigationCancellationCode.NoDataFromResolver */);\n }\n }\n }));\n }), tap(t => {\n const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveEnd);\n }));\n }\n return undefined;\n }), \n // --- LOAD COMPONENTS ---\n switchTap((t) => {\n const loadComponents = (route) => {\n const loaders = [];\n if (route.routeConfig?.loadComponent &&\n !route.routeConfig._loadedComponent) {\n loaders.push(this.configLoader.loadComponent(route.routeConfig)\n .pipe(tap(loadedComponent => {\n route.component = loadedComponent;\n }), map(() => void 0)));\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot.root))\n .pipe(defaultIfEmpty(), take(1));\n }), switchTap(() => this.afterPreactivation()), map((t) => {\n const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n overallTransitionState = { ...t, targetRouterState };\n return (overallTransitionState);\n }), \n /* Once here, we are about to activate synchronously. The assumption is\n this will succeed, and user code may read from the Router service.\n Therefore before activation, we need to update router properties storing\n the current URL and the RouterState, as well as updated the browser URL.\n All this should happen *before* activating. */\n tap((t) => {\n router.currentUrlTree = t.urlAfterRedirects;\n router.rawUrlTree =\n router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n router.routerState =\n t.targetRouterState;\n if (router.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n router.setBrowserUrl(router.rawUrlTree, t);\n }\n router.browserUrlTree = t.urlAfterRedirects;\n }\n }), activateRoutes(this.rootContexts, router.routeReuseStrategy, (evt) => this.events.next(evt)), \n // Ensure that if some observable used to drive the transition doesn't\n // complete, the navigation still finalizes This should never happen, but\n // this is done as a safety measure to avoid surfacing this error (#49567).\n take(1), tap({\n next: (t) => {\n completed = true;\n this.lastSuccessfulNavigation = this.currentNavigation;\n router.navigated = true;\n this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(router.currentUrlTree)));\n router.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n t.resolve(true);\n },\n complete: () => {\n completed = true;\n }\n }), finalize(() => {\n /* When the navigation stream finishes either through error or success,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason = NG_DEV_MODE$4 ?\n `Navigation ID ${overallTransitionState\n .id} is not equal to the current navigation id ${this.navigationId}` :\n '';\n this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentNavigation?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n }\n }), catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError$1(e)) {\n if (!isRedirectingNavigationCancelingError$1(e)) {\n // Set property only if we're not redirecting. If we landed on a page\n // and redirect to `/` route, the new navigation is going to see the\n // `/` isn't a change from the default currentUrlTree and won't\n // navigate. This is only applicable with initial navigation, so\n // setting `navigated` only when not redirecting resolves this\n // scenario.\n router.navigated = true;\n router.restoreHistory(overallTransitionState, true);\n }\n const navCancel = new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode);\n this.events.next(navCancel);\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!isRedirectingNavigationCancelingError$1(e)) {\n overallTransitionState.resolve(false);\n }\n else {\n const mergedTree = router.urlHandlingStrategy.merge(e.url, router.rawUrlTree);\n const extras = {\n skipLocationChange: overallTransitionState.extras.skipLocationChange,\n // The URL is already updated at this point if we have 'eager' URL\n // updates or if the navigation was triggered by the browser (back\n // button, URL bar, etc). We want to replace that item in history\n // if the navigation is rejected.\n replaceUrl: router.urlUpdateStrategy === 'eager' ||\n isBrowserTriggeredNavigation(overallTransitionState.source)\n };\n router.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras, {\n resolve: overallTransitionState.resolve,\n reject: overallTransitionState.reject,\n promise: overallTransitionState.promise\n });\n }\n /* All other errors should reset to the router's internal URL reference\n * to the pre-error state. */\n }\n else {\n router.restoreHistory(overallTransitionState, true);\n const navError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n this.events.next(navError);\n try {\n overallTransitionState.resolve(router.errorHandler(e));\n }\n catch (ee) {\n overallTransitionState.reject(ee);\n }\n }\n return EMPTY;\n }));\n // casting because `pipe` returns observable({}) when called with 8+ arguments\n }));\n }\n cancelNavigationTransition(t, reason, code) {\n const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n this.events.next(navCancel);\n t.resolve(false);\n }\n}\nNavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NavigationTransitions, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction isBrowserTriggeredNavigation(source) {\n return source !== IMPERATIVE_NAVIGATION;\n}\n\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n * {path: 'base', title: 'base', children: [\n * {path: 'child', title: 'child'},\n * ],\n * {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/router#setting-the-page-title)\n */\nclass TitleStrategy {\n /**\n * @returns The `title` of the deepest primary route.\n */\n buildTitle(snapshot) {\n let pageTitle;\n let route = snapshot.root;\n while (route !== undefined) {\n pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n route = route.children.find(child => child.outlet === PRIMARY_OUTLET);\n }\n return pageTitle;\n }\n /**\n * Given an `ActivatedRouteSnapshot`, returns the final value of the\n * `Route.title` property, which can either be a static string or a resolved value.\n */\n getResolvedTitleForRoute(snapshot) {\n return snapshot.data[RouteTitleKey];\n }\n}\nTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: TitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]\n }] });\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nclass DefaultTitleStrategy extends TitleStrategy {\n constructor(title) {\n super();\n this.title = title;\n }\n /**\n * Sets the title of the browser to the given value.\n *\n * @param title The `pageTitle` from the deepest primary route.\n */\n updateTitle(snapshot) {\n const title = this.buildTitle(snapshot);\n if (title !== undefined) {\n this.title.setTitle(title);\n }\n }\n}\nDefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultTitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Title }]; } });\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nclass RouteReuseStrategy {\n}\nRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouteReuseStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]\n }] });\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n /**\n * Whether the given route should detach for later reuse.\n * Always returns false for `BaseRouteReuseStrategy`.\n * */\n shouldDetach(route) {\n return false;\n }\n /**\n * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n */\n store(route, detachedTree) { }\n /** Returns `false`, meaning the route (and its subtree) is never reattached */\n shouldAttach(route) {\n return false;\n }\n /** Returns `null` because this strategy does not store routes for later re-use. */\n retrieve(route) {\n return null;\n }\n /**\n * Determines if a route should be reused.\n * This strategy returns `true` when the future route config and current route config are\n * identical.\n */\n shouldReuseRoute(future, curr) {\n return future.routeConfig === curr.routeConfig;\n }\n}\nclass DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {\n}\nDefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nDefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nconst NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config' : '', {\n providedIn: 'root',\n factory: () => ({}),\n});\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nclass UrlHandlingStrategy {\n}\nUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UrlHandlingStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]\n }] });\n/**\n * @publicApi\n */\nclass DefaultUrlHandlingStrategy {\n shouldProcessUrl(url) {\n return true;\n }\n extract(url) {\n return url;\n }\n merge(newUrlPart, wholeUrl) {\n return newUrlPart;\n }\n}\nDefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nconst NG_DEV_MODE$2 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction defaultErrorHandler(error) {\n throw error;\n}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\n}\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n paths: 'exact',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'exact'\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n paths: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'subset'\n};\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass Router {\n // TODO(b/260747083): This should not exist and navigationId should be private in\n // `NavigationTransitions`\n get navigationId() {\n return this.navigationTransitions.navigationId;\n }\n /**\n * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n * important for computing the target page id for new navigations because we need to ensure each\n * page id in the browser history is 1 more than the previous entry.\n */\n get browserPageId() {\n if (this.canceledNavigationResolution !== 'computed') {\n return undefined;\n }\n return this.location.getState()?.ɵrouterPageId;\n }\n /**\n * An event stream for routing events.\n */\n get events() {\n // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't\n // allowed/supported but we still have to fix these or file bugs against the teams before making\n // the change.\n return this.navigationTransitions.events;\n }\n constructor() {\n this.disposed = false;\n /**\n * The id of the currently active page in the router.\n * Updated to the transition's target id on a successful navigation.\n *\n * This is used to track what page the router last activated. When an attempted navigation fails,\n * the router can then use this to compute how to restore the state back to the previously active\n * page.\n */\n this.currentPageId = 0;\n this.console = inject(ɵConsole);\n this.isNgZoneEnabled = false;\n this.options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};\n /**\n * A handler for navigation errors in this NgModule.\n *\n * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.\n * @see `withNavigationErrorHandler`\n */\n this.errorHandler = this.options.errorHandler || defaultErrorHandler;\n /**\n * A handler for errors thrown by `Router.parseUrl(url)`\n * when `url` contains an invalid character.\n * The most common case is a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n *\n * @deprecated URI parsing errors should be handled in the `UrlSerializer`.\n *\n * @see `RouterModule`\n */\n this.malformedUriErrorHandler = this.options.malformedUriErrorHandler || defaultMalformedUriErrorHandler;\n /**\n * True if at least one navigation event has occurred,\n * false otherwise.\n */\n this.navigated = false;\n this.lastSuccessfulId = -1;\n /**\n * A strategy for extracting and merging URLs.\n * Used for AngularJS to Angular migrations.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: UrlHandlingStrategy, useClass: MyStrategy}`.\n */\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n /**\n * A strategy for re-using routes.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\n */\n this.routeReuseStrategy = inject(RouteReuseStrategy);\n /** Strategy used to create a UrlTree. */\n this.urlCreationStrategy = inject(CreateUrlTreeStrategy);\n /**\n * A strategy for setting the title based on the `routerState`.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: TitleStrategy, useClass: MyStrategy}`.\n */\n this.titleStrategy = inject(TitleStrategy);\n /**\n * How to handle a navigation request to the current URL.\n *\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\n */\n this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n /**\n * How to merge parameters, data, resolved data, and title from parent to child\n * routes. One of:\n *\n * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n * for path-less or component-less routes.\n * - `'always'` : Inherit parent parameters, data, and resolved data\n * for all child routes.\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\n */\n this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';\n /**\n * Determines when the router updates the browser URL.\n * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n * Set to `'eager'` to update the browser URL at the beginning of navigation.\n * You can choose to update early so that, if navigation fails,\n * you can show an error message with the URL that failed.\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\n */\n this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n /**\n * Configures how the Router attempts to restore state when a navigation is cancelled.\n *\n * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n * router before the navigation started. This means that if the URL of the browser is updated\n * _before_ the navigation is canceled, the Router will simply replace the item in history rather\n * than trying to restore to the previous location in the session history. This happens most\n * frequently with `urlUpdateStrategy: 'eager'` and navigations with the browser back/forward\n * buttons.\n *\n * 'computed' - Will attempt to return to the same index in the session history that corresponds\n * to the Angular route when the navigation gets cancelled. For example, if the browser back\n * button is clicked and the navigation is cancelled, the Router will trigger a forward navigation\n * and vice versa.\n *\n * Note: the 'computed' option is incompatible with any `UrlHandlingStrategy` which only\n * handles a portion of the URL because the history restoration navigates to the previous place in\n * the browser history rather than simply resetting a portion of the URL.\n *\n * The default value is `replace`.\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see `withRouterConfig`\n * @see `provideRouter`\n * @see `RouterModule`\n */\n this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';\n this.config = flatten(inject(ROUTES, { optional: true }) ?? []);\n this.navigationTransitions = inject(NavigationTransitions);\n this.urlSerializer = inject(UrlSerializer);\n this.location = inject(Location);\n this.isNgZoneEnabled = inject(NgZone) instanceof NgZone && NgZone.isInAngularZone();\n this.resetConfig(this.config);\n this.currentUrlTree = new UrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n this.routerState = createEmptyState(this.currentUrlTree, null);\n this.navigationTransitions.setupNavigations(this).subscribe(t => {\n this.lastSuccessfulId = t.id;\n this.currentPageId = this.browserPageId ?? 0;\n }, e => {\n this.console.warn(`Unhandled Navigation Error: ${e}`);\n });\n }\n /** @internal */\n resetRootComponentType(rootComponentType) {\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = rootComponentType;\n this.navigationTransitions.rootComponentType = rootComponentType;\n }\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation() {\n this.setUpLocationChangeListener();\n if (!this.navigationTransitions.hasRequestedNavigation) {\n const state = this.location.getState();\n this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, state);\n }\n }\n /**\n * Sets up the location change listener. This listener detects navigations triggered from outside\n * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n * navigation so that the correct events, guards, etc. are triggered.\n */\n setUpLocationChangeListener() {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = this.location.subscribe(event => {\n const source = event['type'] === 'popstate' ? 'popstate' : 'hashchange';\n if (source === 'popstate') {\n // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n // hybrid apps.\n setTimeout(() => {\n this.navigateToSyncWithBrowser(event['url'], source, event.state);\n }, 0);\n }\n });\n }\n }\n /**\n * Schedules a router navigation to synchronize Router state with the browser state.\n *\n * This is done as a response to a popstate event and the initial navigation. These\n * two scenarios represent times when the browser URL/state has been updated and\n * the Router needs to respond to ensure its internal state matches.\n */\n navigateToSyncWithBrowser(url, source, state) {\n const extras = { replaceUrl: true };\n // TODO: restoredState should always include the entire state, regardless\n // of navigationId. This requires a breaking change to update the type on\n // NavigationStart’s restoredState, which currently requires navigationId\n // to always be present. The Router used to only restore history state if\n // a navigationId was present.\n // The stored navigationId is used by the RouterScroller to retrieve the scroll\n // position for the page.\n const restoredState = state?.navigationId ? state : null;\n // Separate to NavigationStart.restoredState, we must also restore the state to\n // history.state and generate a new navigationId, since it will be overwritten\n if (state) {\n const stateCopy = { ...state };\n delete stateCopy.navigationId;\n delete stateCopy.ɵrouterPageId;\n if (Object.keys(stateCopy).length !== 0) {\n extras.state = stateCopy;\n }\n }\n const urlTree = this.parseUrl(url);\n this.scheduleNavigation(urlTree, source, restoredState, extras);\n }\n /** The current URL. */\n get url() {\n return this.serializeUrl(this.currentUrlTree);\n }\n /**\n * Returns the current `Navigation` object when the router is navigating,\n * and `null` when idle.\n */\n getCurrentNavigation() {\n return this.navigationTransitions.currentNavigation;\n }\n /**\n * Resets the route configuration used for navigation and generating links.\n *\n * @param config The route array for the new configuration.\n *\n * @usageNotes\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config) {\n NG_DEV_MODE$2 && validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.dispose();\n }\n /** Disposes of the router. */\n dispose() {\n this.navigationTransitions.complete();\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = undefined;\n }\n this.disposed = true;\n }\n /**\n * Appends URL segments to the current URL tree to create a new URL tree.\n *\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL tree or the one provided in the `relativeTo`\n * property of the options object, if supplied.\n * @param navigationExtras Options that control the navigation strategy.\n * @returns The new URL tree.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n *\n * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n * tree should be created relative to the root.\n * ```\n */\n createUrlTree(commands, navigationExtras = {}) {\n const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q = null;\n switch (queryParamsHandling) {\n case 'merge':\n q = { ...this.currentUrlTree.queryParams, ...queryParams };\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return this.urlCreationStrategy.createUrlTree(relativeTo, this.routerState, this.currentUrlTree, commands, q, f ?? null);\n }\n /**\n * Navigates to a view using an absolute route path.\n *\n * @param url An absolute path for a defined route. The function does not apply any delta to the\n * current URL.\n * @param extras An object containing properties that modify the navigation strategy.\n *\n * @returns A Promise that resolves to 'true' when navigation succeeds,\n * to 'false' when navigation fails, or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to an absolute path.\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * @see [Routing and Navigation guide](guide/router)\n *\n */\n navigateByUrl(url, extras = {\n skipLocationChange: false\n }) {\n if (NG_DEV_MODE$2) {\n if (this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n if (url instanceof UrlTree && url._warnIfUsedForNavigation) {\n this.console.warn(url._warnIfUsedForNavigation);\n }\n }\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras);\n }\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * @param commands An array of URL fragments with which to construct the target URL.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL or the one provided in the `relativeTo` property\n * of the options object, if supplied.\n * @param extras An options object that determines how the URL should be constructed or\n * interpreted.\n *\n * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n * fails,\n * or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to a dynamic route path relative to the current URL.\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL, overriding the default behavior\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * @see [Routing and Navigation guide](guide/router)\n *\n */\n navigate(commands, extras = { skipLocationChange: false }) {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url) {\n return this.urlSerializer.serialize(url);\n }\n /** Parses a string into a `UrlTree` */\n parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n isActive(url, matchOptions) {\n let options;\n if (matchOptions === true) {\n options = { ...exactMatchOptions };\n }\n else if (matchOptions === false) {\n options = { ...subsetMatchOptions };\n }\n else {\n options = matchOptions;\n }\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, options);\n }\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, options);\n }\n removeEmptyProps(params) {\n return Object.keys(params).reduce((result, key) => {\n const value = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n /** @internal */\n scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n if (this.disposed) {\n return Promise.resolve(false);\n }\n let resolve;\n let reject;\n let promise;\n if (priorPromise) {\n resolve = priorPromise.resolve;\n reject = priorPromise.reject;\n promise = priorPromise.promise;\n }\n else {\n promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n }\n let targetPageId;\n if (this.canceledNavigationResolution === 'computed') {\n // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n // target id to the previously set value for that page.\n if (restoredState && restoredState.ɵrouterPageId) {\n targetPageId = restoredState.ɵrouterPageId;\n }\n else {\n // Otherwise, targetPageId should be the next number in the event of a `pushState`\n // navigation.\n targetPageId = (this.browserPageId ?? 0) + 1;\n }\n }\n else {\n // This is unused when `canceledNavigationResolution` is not computed.\n targetPageId = 0;\n }\n this.navigationTransitions.handleNavigationRequest({\n targetPageId,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n rawUrl,\n extras,\n resolve,\n reject,\n promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e) => {\n return Promise.reject(e);\n });\n }\n /** @internal */\n setBrowserUrl(url, transition) {\n const path = this.urlSerializer.serialize(url);\n if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n // replacements do not update the target page\n const currentBrowserPageId = this.browserPageId;\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, currentBrowserPageId)\n };\n this.location.replaceState(path, '', state);\n }\n else {\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, transition.targetPageId)\n };\n this.location.go(path, '', state);\n }\n }\n /**\n * Performs the necessary rollback action to restore the browser URL to the\n * state before the transition.\n * @internal\n */\n restoreHistory(transition, restoringFromCaughtError = false) {\n if (this.canceledNavigationResolution === 'computed') {\n const currentBrowserPageId = this.browserPageId ?? this.currentPageId;\n const targetPagePosition = this.currentPageId - currentBrowserPageId;\n if (targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n }\n else if (this.currentUrlTree === this.getCurrentNavigation()?.finalUrl &&\n targetPagePosition === 0) {\n // We got to the activation stage (where currentUrlTree is set to the navigation's\n // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n // We still need to reset the router state back to what it was when the navigation started.\n this.resetState(transition);\n // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n // Investigate if this can be done by running TGP.\n this.browserUrlTree = transition.currentUrlTree;\n this.resetUrlToCurrentUrlTree();\n }\n else {\n // The browser URL and router state was not updated before the navigation cancelled so\n // there's no restoration needed.\n }\n }\n else if (this.canceledNavigationResolution === 'replace') {\n // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n // for `deferred` navigations that haven't change the internal state yet because guards\n // reject. For 'eager' navigations, it seems like we also really should reset the state\n // because the navigation was cancelled. Investigate if this can be done by running TGP.\n if (restoringFromCaughtError) {\n this.resetState(transition);\n }\n this.resetUrlToCurrentUrlTree();\n }\n }\n resetState(t) {\n this.routerState = t.currentRouterState;\n this.currentUrlTree = t.currentUrlTree;\n // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n }\n resetUrlToCurrentUrlTree() {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n }\n generateNgRouterState(navigationId, routerPageId) {\n if (this.canceledNavigationResolution === 'computed') {\n return { navigationId, ɵrouterPageId: routerPageId };\n }\n return { navigationId };\n }\n}\nRouter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRouter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Router, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: Router, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return []; } });\nfunction validateCommands(commands) {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, NG_DEV_MODE$2 && `The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n * looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n * - `'merge'`: Merge the given `queryParams` into the current query params.\n * - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLink {\n constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {\n this.router = router;\n this.route = route;\n this.tabIndexAttribute = tabIndexAttribute;\n this.renderer = renderer;\n this.el = el;\n this.locationStrategy = locationStrategy;\n this._preserveFragment = false;\n this._skipLocationChange = false;\n this._replaceUrl = false;\n /**\n * Represents an `href` attribute value applied to a host element,\n * when a host element is `<a>`. For other tags, the value is `null`.\n */\n this.href = null;\n this.commands = null;\n /** @internal */\n this.onChanges = new Subject();\n const tagName = el.nativeElement.tagName?.toLowerCase();\n this.isAnchorElement = tagName === 'a' || tagName === 'area';\n if (this.isAnchorElement) {\n this.subscription = router.events.subscribe((s) => {\n if (s instanceof NavigationEnd) {\n this.updateHref();\n }\n });\n }\n else {\n this.setTabIndexIfNotOnNativeEl('0');\n }\n }\n /**\n * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n * @see {@link Router#createUrlTree Router#createUrlTree}\n */\n set preserveFragment(preserveFragment) {\n this._preserveFragment = ɵcoerceToBoolean(preserveFragment);\n }\n get preserveFragment() {\n return this._preserveFragment;\n }\n /**\n * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n * @see {@link Router#navigateByUrl Router#navigateByUrl}\n */\n set skipLocationChange(skipLocationChange) {\n this._skipLocationChange = ɵcoerceToBoolean(skipLocationChange);\n }\n get skipLocationChange() {\n return this._skipLocationChange;\n }\n /**\n * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n * @see {@link Router#navigateByUrl Router#navigateByUrl}\n */\n set replaceUrl(replaceUrl) {\n this._replaceUrl = ɵcoerceToBoolean(replaceUrl);\n }\n get replaceUrl() {\n return this._replaceUrl;\n }\n /**\n * Modifies the tab index if there was not a tabindex attribute on the element during\n * instantiation.\n */\n setTabIndexIfNotOnNativeEl(newTabIndex) {\n if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n return;\n }\n this.applyAttributeValue('tabindex', newTabIndex);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this.isAnchorElement) {\n this.updateHref();\n }\n // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n // to the RouterLinks it's tracking.\n this.onChanges.next(this);\n }\n /**\n * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **null|undefined**: effectively disables the `routerLink`\n * @see {@link Router#createUrlTree Router#createUrlTree}\n */\n set routerLink(commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n this.setTabIndexIfNotOnNativeEl('0');\n }\n else {\n this.commands = null;\n this.setTabIndexIfNotOnNativeEl(null);\n }\n }\n /** @nodoc */\n onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n if (this.urlTree === null) {\n return true;\n }\n if (this.isAnchorElement) {\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n }\n const extras = {\n skipLocationChange: this.skipLocationChange,\n replaceUrl: this.replaceUrl,\n state: this.state,\n };\n this.router.navigateByUrl(this.urlTree, extras);\n // Return `false` for `<a>` elements to prevent default action\n // and cancel the native behavior, since the navigation is handled\n // by the Router.\n return !this.isAnchorElement;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n updateHref() {\n this.href = this.urlTree !== null && this.locationStrategy ?\n this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)) :\n null;\n const sanitizedValue = this.href === null ?\n null :\n // This class represents a directive that can be added to both `<a>` elements,\n // as well as other elements. As a result, we can't define security context at\n // compile time. So the security context is deferred to runtime.\n // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n // based on the tag and property names. The logic mimics the one from\n // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n //\n // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n // instead of applying a value via a renderer, after a final merge of the\n // `RouterLinkWithHref` directive.\n ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');\n this.applyAttributeValue('href', sanitizedValue);\n }\n applyAttributeValue(attrName, attrValue) {\n const renderer = this.renderer;\n const nativeElement = this.el.nativeElement;\n if (attrValue !== null) {\n renderer.setAttribute(nativeElement, attrName, attrValue);\n }\n else {\n renderer.removeAttribute(nativeElement, attrName);\n }\n }\n get urlTree() {\n if (this.commands === null) {\n return null;\n }\n return this.router.createUrlTree(this.commands, {\n // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n // Otherwise, we should use the value provided by the user in the input.\n relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: this.preserveFragment,\n });\n }\n}\nRouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: RouterLink, isStandalone: true, selector: \"[routerLink]\", inputs: { target: \"target\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", state: \"state\", relativeTo: \"relativeTo\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", routerLink: \"routerLink\" }, host: { listeners: { \"click\": \"onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)\" }, properties: { \"attr.target\": \"this.target\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterLink, decorators: [{\n type: Directive,\n args: [{\n selector: '[routerLink]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{\n type: HostBinding,\n args: ['attr.target']\n }, {\n type: Input\n }], queryParams: [{\n type: Input\n }], fragment: [{\n type: Input\n }], queryParamsHandling: [{\n type: Input\n }], state: [{\n type: Input\n }], relativeTo: [{\n type: Input\n }], preserveFragment: [{\n type: Input\n }], skipLocationChange: [{\n type: Input\n }], replaceUrl: [{\n type: Input\n }], routerLink: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click',\n ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]\n }] } });\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>` parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLinkActive {\n get isActive() {\n return this._isActive;\n }\n constructor(router, element, renderer, cdr, link) {\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.link = link;\n this.classes = [];\n this._isActive = false;\n /**\n * Options to configure how to determine if the router link is active.\n *\n * These options are passed to the `Router.isActive()` function.\n *\n * @see Router.isActive\n */\n this.routerLinkActiveOptions = { exact: false };\n /**\n *\n * You can use the output `isActiveChange` to get notified each time the link becomes\n * active or inactive.\n *\n * Emits:\n * true -> Route is active\n * false -> Route is inactive\n *\n * ```\n * <a\n * routerLink=\"/user/bob\"\n * routerLinkActive=\"active-link\"\n * (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n * ```\n */\n this.isActiveChange = new EventEmitter();\n this.routerEventsSubscription = router.events.subscribe((s) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n /** @nodoc */\n ngAfterContentInit() {\n // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n of(this.links.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n this.update();\n this.subscribeToEachLinkOnChanges();\n });\n }\n subscribeToEachLinkOnChanges() {\n this.linkInputChangesSubscription?.unsubscribe();\n const allLinkChanges = [...this.links.toArray(), this.link]\n .filter((link) => !!link)\n .map(link => link.onChanges);\n this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n if (this._isActive !== this.isLinkActive(this.router)(link)) {\n this.update();\n }\n });\n }\n set routerLinkActive(data) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this.update();\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription.unsubscribe();\n this.linkInputChangesSubscription?.unsubscribe();\n }\n update() {\n if (!this.links || !this.router.navigated)\n return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this._isActive !== hasActiveLinks) {\n this._isActive = hasActiveLinks;\n this.cdr.markForCheck();\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n }\n else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n }\n else {\n this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n }\n // Emit on isActiveChange after classes are updated\n this.isActiveChange.emit(hasActiveLinks);\n }\n });\n }\n isLinkActive(router) {\n const options = isActiveMatchOptions(this.routerLinkActiveOptions) ?\n this.routerLinkActiveOptions :\n // While the types should disallow `undefined` here, it's possible without strict inputs\n (this.routerLinkActiveOptions.exact || false);\n return (link) => link.urlTree ? router.isActive(link.urlTree, options) : false;\n }\n hasActiveLinks() {\n const isActiveCheckFn = this.isLinkActive(this.router);\n return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);\n }\n}\nRouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: RouterLinkActive, isStandalone: true, selector: \"[routerLinkActive]\", inputs: { routerLinkActiveOptions: \"routerLinkActiveOptions\", ariaCurrentWhenActive: \"ariaCurrentWhenActive\", routerLinkActive: \"routerLinkActive\" }, outputs: { isActiveChange: \"isActiveChange\" }, queries: [{ propertyName: \"links\", predicate: RouterLink, descendants: true }], exportAs: [\"routerLinkActive\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterLinkActive, decorators: [{\n type: Directive,\n args: [{\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: Router }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: RouterLink, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { links: [{\n type: ContentChildren,\n args: [RouterLink, { descendants: true }]\n }], routerLinkActiveOptions: [{\n type: Input\n }], ariaCurrentWhenActive: [{\n type: Input\n }], isActiveChange: [{\n type: Output\n }], routerLinkActive: [{\n type: Input\n }] } });\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n return !!options.paths;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {\n}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nclass PreloadAllModules {\n preload(route, fn) {\n return fn().pipe(catchError(() => of(null)));\n }\n}\nPreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PreloadAllModules, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nclass NoPreloading {\n preload(route, fn) {\n return of(null);\n }\n}\nNoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoPreloading, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoPreloading, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nclass RouterPreloader {\n constructor(router, compiler, injector, preloadingStrategy, loader) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n this.loader = loader;\n }\n setUpPreloading() {\n this.subscription =\n this.router.events\n .pipe(filter((e) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => { });\n }\n preload() {\n return this.processRoutes(this.injector, this.router.config);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n processRoutes(injector, routes) {\n const res = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n }\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n // happens as a consequence of needing to descend into children for route matching immediately\n // while component loading is deferred until route activation. Because `canLoad` guards can\n // have side effects, we cannot execute them here so we instead skip preloading altogether\n // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n // at all. Code splitting and lazy loading is separate from client-side authorization checks\n // and should not be used as a security measure to prevent loading of code.\n if ((route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||\n (route.loadComponent && !route._loadedComponent)) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)));\n }\n }\n return from(res).pipe(mergeAll());\n }\n preloadConfig(injector, route) {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n }\n else {\n loadedChildren$ = of(null);\n }\n const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap((config) => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }));\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n }\n else {\n return recursiveLoadChildren$;\n }\n });\n }\n}\nRouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });\nRouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterPreloader, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterPreloader, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });\n\nconst ROUTER_SCROLLER = new InjectionToken('');\nclass RouterScroller {\n /** @nodoc */\n constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {\n this.urlSerializer = urlSerializer;\n this.transitions = transitions;\n this.viewportScroller = viewportScroller;\n this.zone = zone;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n init() {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n createScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n }\n else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n }\n });\n }\n consumeScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (!(e instanceof Scroll))\n return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n }\n else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n }\n else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n scheduleScrollEvent(routerEvent, anchor) {\n this.zone.runOutsideAngular(() => {\n // The scroll event needs to be delayed until after change detection. Otherwise, we may\n // attempt to restore the scroll position before the router outlet has fully rendered the\n // component by executing its update block of the template function.\n setTimeout(() => {\n this.zone.run(() => {\n this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n });\n }, 0);\n });\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription?.unsubscribe();\n this.scrollEventsSubscription?.unsubscribe();\n }\n}\nRouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterScroller, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nRouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterScroller });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterScroller, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });\n\nvar NavigationResult;\n(function (NavigationResult) {\n NavigationResult[NavigationResult[\"COMPLETE\"] = 0] = \"COMPLETE\";\n NavigationResult[NavigationResult[\"FAILED\"] = 1] = \"FAILED\";\n NavigationResult[NavigationResult[\"REDIRECTING\"] = 2] = \"REDIRECTING\";\n})(NavigationResult || (NavigationResult = {}));\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nfunction afterNextNavigation(router, action) {\n router.events\n .pipe(filter((e) => e instanceof NavigationEnd || e instanceof NavigationCancel ||\n e instanceof NavigationError || e instanceof NavigationSkipped), map(e => {\n if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n return NavigationResult.COMPLETE;\n }\n const redirecting = e instanceof NavigationCancel ?\n (e.code === 0 /* NavigationCancellationCode.Redirect */ ||\n e.code === 1 /* NavigationCancellationCode.SupersededByNewNavigation */) :\n false;\n return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n }), filter((result) => result !== NavigationResult.REDIRECTING), take(1))\n .subscribe(() => {\n action();\n });\n}\n\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n * providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes,\n * withDebugTracing(),\n * withRouterConfig({paramsInheritanceStrategy: 'always'}))\n * ]\n * }\n * );\n * ```\n *\n * @see `RouterFeatures`\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n return makeEnvironmentProviders([\n { provide: ROUTES, multi: true, useValue: routes },\n NG_DEV_MODE$1 ? { provide: ROUTER_IS_PROVIDED, useValue: true } : [],\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },\n features.map(feature => feature.ɵproviders),\n ]);\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n return { ɵkind: kind, ɵproviders: providers };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = new InjectionToken('', { providedIn: 'root', factory: () => false });\nconst routerIsProvidedDevModeCheck = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => {\n if (!inject(ROUTER_IS_PROVIDED)) {\n console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' +\n 'This is likely a mistake.');\n }\n };\n }\n};\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see `ROUTES`\n * @publicApi\n */\nfunction provideRoutes(routes) {\n return [\n { provide: ROUTES, multi: true, useValue: routes },\n NG_DEV_MODE$1 ? routerIsProvidedDevModeCheck : [],\n ];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withInMemoryScrolling())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `ViewportScroller`\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n * `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n const providers = [{\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n },\n }];\n return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n const injector = inject(Injector);\n return (bootstrappedComponentRef) => {\n const ref = injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n router.initialNavigation();\n }\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n if (!bootstrapDone.closed) {\n bootstrapDone.next();\n bootstrapDone.complete();\n bootstrapDone.unsubscribe();\n }\n };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken(NG_DEV_MODE$1 ? 'bootstrap done indicator' : '', {\n factory: () => {\n return new Subject();\n }\n});\nconst INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE$1 ? 'initial navigation' : '', { providedIn: 'root', factory: () => 1 /* InitialNavigation.EnabledNonBlocking */ });\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This value is required for\n * [server-side rendering](guide/universal) to work.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n const providers = [\n { provide: INITIAL_NAVIGATION, useValue: 0 /* InitialNavigation.EnabledBlocking */ },\n {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: (injector) => {\n const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n return () => {\n return locationInitialized.then(() => {\n return new Promise(resolve => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(router, () => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n injector.get(NavigationTransitions).afterPreactivation = () => {\n // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n // assume activation will complete successfully (even though this is not\n // guaranteed).\n resolve(true);\n return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n };\n router.initialNavigation();\n });\n });\n };\n }\n },\n ];\n return routerFeature(2 /* RouterFeatureKind.EnabledBlockingInitialNavigationFeature */, providers);\n}\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDisabledInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDisabledInitialNavigation() {\n const providers = [\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => {\n router.setUpLocationChangeListener();\n };\n }\n },\n { provide: INITIAL_NAVIGATION, useValue: 2 /* InitialNavigation.Disabled */ }\n ];\n return routerFeature(3 /* RouterFeatureKind.DisabledInitialNavigationFeature */, providers);\n}\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDebugTracing())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDebugTracing() {\n let providers = [];\n if (NG_DEV_MODE$1) {\n providers = [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => router.events.subscribe((e) => {\n // tslint:disable:no-console\n console.group?.(`Router Event: ${e.constructor.name}`);\n console.log(stringifyEvent(e));\n console.log(e);\n console.groupEnd?.();\n // tslint:enable:no-console\n });\n }\n }];\n }\n else {\n providers = [];\n }\n return routerFeature(1 /* RouterFeatureKind.DebugTracingFeature */, providers);\n}\nconst ROUTER_PRELOADER = new InjectionToken(NG_DEV_MODE$1 ? 'router preloader' : '');\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withPreloading(PreloadAllModules))\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n * should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withPreloading(preloadingStrategy) {\n const providers = [\n { provide: ROUTER_PRELOADER, useExisting: RouterPreloader },\n { provide: PreloadingStrategy, useExisting: preloadingStrategy },\n ];\n return routerFeature(0 /* RouterFeatureKind.PreloadingFeature */, providers);\n}\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withRouterConfig({\n * onSameUrlNavigation: 'reload'\n * }))\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n * additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withRouterConfig(options) {\n const providers = [\n { provide: ROUTER_CONFIGURATION, useValue: options },\n ];\n return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withHashLocation())\n * ]\n * }\n * );\n * ```\n *\n * @see `provideRouter`\n * @see `HashLocationStrategy`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withHashLocation() {\n const providers = [\n { provide: LocationStrategy, useClass: HashLocationStrategy },\n ];\n return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Subscribes to the Router's navigation events and calls the given function when a\n * `NavigationError` happens.\n *\n * This function is run inside application's injection context so you can use the `inject` function.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n * ]\n * }\n * );\n * ```\n *\n * @see `NavigationError`\n * @see `inject`\n * @see `EnvironmentInjector#runInContext`\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withNavigationErrorHandler(fn) {\n const providers = [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n const injector = inject(EnvironmentInjector);\n inject(Router).events.subscribe((e) => {\n if (e instanceof NavigationError) {\n injector.runInContext(() => fn(e));\n }\n });\n }\n }];\n return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);\n}\n\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nconst ROUTER_PROVIDERS = [\n Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n Router,\n ChildrenOutletContexts,\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n RouterConfigLoader,\n // Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n // be removed when `provideRoutes` is removed.\n NG_DEV_MODE ? { provide: ROUTER_IS_PROVIDED, useValue: true } : [],\n];\nfunction routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nclass RouterModule {\n constructor(guard) { }\n /**\n * Creates and configures a module with all the router providers and directives.\n * Optionally sets up an application listener to perform an initial navigation.\n *\n * When registering the NgModule at the root, import as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the application.\n * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n * @return The new `NgModule`.\n *\n */\n static forRoot(routes, config) {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n NG_DEV_MODE ? (config?.enableTracing ? withDebugTracing().ɵproviders : []) : [],\n { provide: ROUTES, multi: true, useValue: routes },\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(),\n provideRouterScroller(),\n config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [],\n { provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n config?.initialNavigation ? provideInitialNavigation(config) : [],\n provideRouterInitializer(),\n ],\n };\n }\n /**\n * Creates a module with all the router directives and a provider registering routes,\n * without creating a new Router service.\n * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n * @return The new NgModule.\n *\n */\n static forChild(routes) {\n return {\n ngModule: RouterModule,\n providers: [{ provide: ROUTES, multi: true, useValue: routes }],\n };\n }\n}\nRouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\nRouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });\nRouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RouterModule, decorators: [{\n type: NgModule,\n args: [{\n imports: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ROUTER_FORROOT_GUARD]\n }] }]; } });\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nfunction provideRouterScroller() {\n return {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const config = inject(ROUTER_CONFIGURATION);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n },\n };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy() {\n return { provide: LocationStrategy, useClass: HashLocationStrategy };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy() {\n return { provide: LocationStrategy, useClass: PathLocationStrategy };\n}\nfunction provideForRootGuard(router) {\n if (NG_DEV_MODE && router) {\n throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +\n ` Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config) {\n return [\n config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [],\n config.initialNavigation === 'enabledBlocking' ?\n withEnabledBlockingInitialNavigation().ɵproviders :\n [],\n ];\n}\n// TODO(atscott): This should not be in the public API\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = new InjectionToken(NG_DEV_MODE ? 'Router Initializer' : '');\nfunction provideRouterInitializer() {\n return [\n // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n ];\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, flatten as ɵflatten, withPreloading as ɵwithPreloading };\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n","import { Injectable } from '@angular/core';\r\nimport { select } from '@ngneat/elf';\r\nimport { withProps } from '@ngneat/elf';\r\nimport { Store, createState } from '@ngneat/elf';\r\nimport { localStorageStrategy, persistState } from '@ngneat/elf-persist-state';\r\n\r\nexport interface UIProps {\r\n darkMode: boolean;\r\n isMenuOpened: boolean;\r\n isSessionOver: boolean;\r\n isMenuExpanded: boolean;\r\n isInstallPromptDismissed: boolean;\r\n}\r\n\r\nconst { state, config } = createState(withProps<UIProps>({ \r\n darkMode: false, \r\n isSessionOver: false,\r\n isMenuOpened: false,\r\n isMenuExpanded: true,\r\n isInstallPromptDismissed: false\r\n}));\r\nconst store = new Store({ name: 'ui', state, config });\r\npersistState(store, { \r\n storage: localStorageStrategy,\r\n source: store => store.pipe(\r\n select(state => ({ ...state, isSessionOver: false, isMenuOpened: false }))\r\n )\r\n});\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UiRepository {\r\n isDarkMode$ = store.pipe(select(state => state.darkMode));\r\n isSessionOver$ = store.pipe(select(state => state.isSessionOver));\r\n isMenuOpened$ = store.pipe(select(state => state.isMenuOpened));\r\n isMenuExpanded$ = store.pipe(select(state => state.isMenuExpanded));\r\n isInstallPromptDismissed$ = store.pipe(select(state => state.isInstallPromptDismissed));\r\n\r\n dismissInstallPrompt() {\r\n store.update(state => ({\r\n ...state,\r\n isInstallPromptDismissed: true\r\n }));\r\n }\r\n\r\n toggleDarkMode() {\r\n store.update(state => ({\r\n ...state,\r\n darkMode: !state.darkMode\r\n }));\r\n }\r\n\r\n setSessionOver() {\r\n store.update((state) => ({\r\n ...state,\r\n isSessionOver: true\r\n }));\r\n }\r\n\r\n toggleMenuOpened(isOpen?: boolean) {\r\n store.update(state => ({\r\n ...state,\r\n isMenuOpened: isOpen !== undefined \r\n ? isOpen : !state.isMenuOpened \r\n }));\r\n }\r\n\r\n toggleMenuExpanded(isOpen?: boolean) {\r\n store.update(state => ({\r\n ...state,\r\n isMenuExpanded: isOpen !== undefined \r\n ? isOpen : !state.isMenuExpanded \r\n }));\r\n }\r\n}\r\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","import { Injectable } from '@angular/core';\r\nimport { fromEvent, mapTo, merge, Observable, of } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConnectionService {\r\n isOnline$: Observable<boolean>;\r\n\r\n constructor() { \r\n this.isOnline$ = merge(\r\n of(navigator.onLine),\r\n fromEvent(window, 'online').pipe(mapTo(true)),\r\n fromEvent(window, 'offline').pipe(mapTo(false))\r\n );\r\n }\r\n\r\n isOnline() {\r\n return navigator.onLine;\r\n }\r\n}\r\n","import { isFunction, capitalize, coerceArray, isDev, select, isUndefined, distinctUntilArrayItemChanged, propsFactory, propsArrayFactory } from '@ngneat/elf';\nimport { pipe } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap } from 'rxjs/operators';\n\nfunction buildEntities(entities, idKey) {\n const asObject = {};\n const ids = [];\n\n for (const entity of entities) {\n const id = entity[idKey];\n ids.push(id);\n asObject[id] = entity;\n }\n\n return {\n ids,\n asObject\n };\n}\nfunction findIdsByPredicate(state, ref, predicate) {\n const {\n idsKey,\n entitiesKey\n } = ref;\n const entities = state[entitiesKey];\n return state[idsKey].filter(id => predicate(entities[id]));\n}\nfunction findEntityByPredicate(state, ref, predicate) {\n const {\n idsKey,\n entitiesKey\n } = ref;\n const entities = state[entitiesKey];\n const id = state[idsKey].find(id => {\n return predicate(entities[id]);\n });\n return entities[id];\n}\nfunction checkPluck(entity, pluck) {\n if (entity && pluck) {\n return isFunction(pluck) ? pluck(entity) : entity[pluck];\n } else {\n return entity;\n }\n}\n\nfunction getIdKey(context, ref) {\n return context.config[ref.idKeyRef];\n}\nclass EntitiesRef {\n constructor(config) {\n this.idKeyRef = 'idKey';\n this.entitiesKey = config.entitiesKey;\n this.idsKey = config.idsKey;\n this.idKeyRef = config.idKeyRef;\n }\n\n}\nfunction entitiesPropsFactory(feature) {\n const idKeyRef = feature ? `idKey${capitalize(feature)}` : 'idKey';\n const ref = new EntitiesRef({\n entitiesKey: feature ? `${feature}Entities` : 'entities',\n idsKey: feature ? `${feature}Ids` : 'ids',\n idKeyRef: idKeyRef\n });\n\n function propsFactory(config) {\n let entities = {};\n let ids = [];\n const idKey = (config == null ? void 0 : config.idKey) || 'id';\n\n if (config != null && config.initialValue) {\n ({\n ids,\n asObject: entities\n } = buildEntities(config.initialValue, idKey));\n }\n\n return {\n props: {\n [ref.entitiesKey]: entities,\n [ref.idsKey]: ids\n },\n config: {\n [idKeyRef]: idKey\n }\n };\n }\n\n return {\n [`${feature}EntitiesRef`]: ref,\n [`with${capitalize(feature)}Entities`]: propsFactory\n };\n}\nconst {\n withEntities,\n EntitiesRef: defaultEntitiesRef\n} = entitiesPropsFactory('');\nconst {\n UIEntitiesRef,\n withUIEntities\n} = entitiesPropsFactory('UI');\n\n/**\r\n *\r\n * Remove entities\r\n *\r\n * @example\r\n *\r\n * store.update(deleteEntities(1))\r\n *\r\n * store.update(deleteEntities([1, 2, 3])\r\n *\r\n */\n\nfunction deleteEntities(ids, options = {}) {\n return function (state) {\n const {\n ref: {\n idsKey,\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n const idsToRemove = coerceArray(ids);\n const newEntities = Object.assign({}, state[entitiesKey]);\n const newIds = state[idsKey].filter(id => !idsToRemove.includes(id));\n\n for (const id of idsToRemove) {\n Reflect.deleteProperty(newEntities, id);\n }\n\n return Object.assign({}, state, {\n [entitiesKey]: newEntities,\n [idsKey]: newIds\n });\n };\n}\n/**\r\n *\r\n * Remove entities by predicate\r\n *\r\n * @example\r\n *\r\n * store.update(deleteEntitiesByPredicate(entity => entity.count === 0))\r\n *\r\n */\n\nfunction deleteEntitiesByPredicate(predicate, options = {}) {\n return function reducer(state, context) {\n const ids = findIdsByPredicate(state, options.ref || defaultEntitiesRef, predicate);\n\n if (ids.length) {\n return deleteEntities(ids, options)(state, context);\n }\n\n return state;\n };\n}\n/**\r\n *\r\n * Remove all entities\r\n *\r\n * @example\r\n *\r\n * store.update(deleteAllEntities())\r\n *\r\n */\n\nfunction deleteAllEntities(options = {}) {\n return function reducer(state) {\n const {\n ref: {\n idsKey,\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n return Object.assign({}, state, {\n [entitiesKey]: {},\n [idsKey]: []\n });\n };\n}\n\n/**\r\n *\r\n * Add entities\r\n *\r\n * @example\r\n *\r\n * store.update(addEntities(entity))\r\n *\r\n * store.update(addEntities([entity, entity]))\r\n *\r\n * store.update(addEntities([entity, entity]), { prepend: true })\r\n *\r\n */\n\nfunction addEntities(entities, options = {}) {\n return function (state, context) {\n const {\n prepend = false,\n ref = defaultEntitiesRef\n } = options;\n const {\n entitiesKey,\n idsKey\n } = ref;\n const idKey = getIdKey(context, ref);\n const asArray = coerceArray(entities);\n if (!asArray.length) return state;\n\n if (isDev()) {\n throwIfEntityExists(asArray, idKey, state, entitiesKey);\n throwIfDuplicateIdKey(asArray, idKey);\n }\n\n const {\n ids,\n asObject\n } = buildEntities(asArray, idKey);\n return Object.assign({}, state, {\n [entitiesKey]: Object.assign({}, state[entitiesKey], asObject),\n [idsKey]: prepend ? [...ids, ...state[idsKey]] : [...state[idsKey], ...ids]\n });\n };\n}\n/**\r\n *\r\n * Add entities using fifo\r\n *\r\n * @example\r\n *\r\n *\r\n * store.update(addEntitiesFifo([entity, entity]), { limit: 3 })\r\n *\r\n */\n\nfunction addEntitiesFifo(entities, options) {\n return function (state, context) {\n const {\n ref = defaultEntitiesRef,\n limit\n } = options;\n const {\n entitiesKey,\n idsKey\n } = ref;\n const currentIds = state[idsKey];\n let normalizedEntities = coerceArray(entities);\n let newState = state;\n\n if (normalizedEntities.length > limit) {\n // Remove new entities that pass the limit\n normalizedEntities = normalizedEntities.slice(normalizedEntities.length - limit);\n }\n\n const total = currentIds.length + normalizedEntities.length; // Remove exiting entities that passes the limit\n\n if (total > limit) {\n const idsRemove = currentIds.slice(0, total - limit);\n newState = deleteEntities(idsRemove)(state, context);\n }\n\n const {\n ids,\n asObject\n } = buildEntities(normalizedEntities, getIdKey(context, ref));\n return Object.assign({}, state, {\n [entitiesKey]: Object.assign({}, newState[entitiesKey], asObject),\n [idsKey]: [...newState[idsKey], ...ids]\n });\n };\n}\n\nfunction throwIfEntityExists(entities, idKey, state, entitiesKey) {\n entities.forEach(entity => {\n const id = entity[idKey];\n\n if (state[entitiesKey][id]) {\n throw Error(`Entity already exists. ${idKey} ${id}`);\n }\n });\n}\n\nfunction throwIfDuplicateIdKey(entities, idKey) {\n const check = new Set();\n entities.forEach(entity => {\n const id = entity[idKey];\n\n if (check.has(id)) {\n throw Error(`Duplicate entity id provided. ${idKey} ${id}`);\n }\n\n check.add(id);\n });\n}\n\n/**\r\n *\r\n * Set entities\r\n *\r\n * @example\r\n *\r\n * store.update(setEntities([entity, entity]))\r\n *\r\n */\n\nfunction setEntities(entities, options = {}) {\n return function (state, context) {\n const {\n ref = defaultEntitiesRef\n } = options;\n const {\n entitiesKey,\n idsKey\n } = ref;\n const {\n ids,\n asObject\n } = buildEntities(entities, getIdKey(context, ref));\n return Object.assign({}, state, {\n [entitiesKey]: asObject,\n [idsKey]: ids\n });\n };\n}\nfunction setEntitiesMap(entities, options = {}) {\n return setEntities(Object.values(entities), options);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n/**\r\n *\r\n * Get the entities collection\r\n *\r\n * @example\r\n *\r\n * store.query(getAllEntities())\r\n *\r\n */\n\nfunction getAllEntities(options = {}) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef\n } = options;\n return function (state) {\n return state[idsKey].map(id => state[entitiesKey][id]);\n };\n}\n/**\r\n *\r\n * Get the entities and apply filter/map\r\n *\r\n * @example\r\n *\r\n * store.query(getAllEntitiesApply())\r\n *\r\n */\n\nfunction getAllEntitiesApply(options) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef,\n filterEntity = () => true,\n mapEntity = e => e\n } = options;\n return function (state) {\n const result = [];\n\n for (const id of state[idsKey]) {\n const entity = state[entitiesKey][id];\n\n if (filterEntity(entity)) {\n result.push(mapEntity(entity));\n }\n }\n\n return result;\n };\n}\n/**\r\n *\r\n * Get an entity\r\n *\r\n * @example\r\n *\r\n * store.query(getEntity(1))\r\n *\r\n */\n\nfunction getEntity$1(id, options = {}) {\n return function (state) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n return state[entitiesKey][id];\n };\n}\n/**\r\n *\r\n * Check whether the entity exist\r\n *\r\n * @example\r\n *\r\n * store.query(hasEntity(1))\r\n *\r\n */\n\nfunction hasEntity(id, options = {}) {\n return function (state) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n return Reflect.has(state[entitiesKey], id);\n };\n}\n\nconst _excluded = [\"updater\", \"creator\"];\n\nfunction toModel(updater, entity) {\n if (isFunction(updater)) {\n return updater(entity);\n }\n\n return Object.assign({}, entity, updater);\n}\n/**\r\n *\r\n * Update entities\r\n *\r\n * @example\r\n *\r\n * store.update(updateEntities(id, { name }))\r\n * store.update(updateEntities(id, entity => ({ ...entity, name })))\r\n * store.update(updateEntities([id, id, id], { open: true }))\r\n *\r\n */\n\n\nfunction updateEntities(ids, updater, options = {}) {\n return function (state) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n const updatedEntities = {};\n\n for (const id of coerceArray(ids)) {\n updatedEntities[id] = toModel(updater, state[entitiesKey][id]);\n }\n\n return Object.assign({}, state, {\n [entitiesKey]: Object.assign({}, state[entitiesKey], updatedEntities)\n });\n };\n}\n/**\r\n *\r\n * Update entities by predicate\r\n *\r\n * @example\r\n *\r\n * store.update(updateEntitiesByPredicate(entity => entity.count === 0))\r\n *\r\n */\n\nfunction updateEntitiesByPredicate(predicate, updater, options = {}) {\n return function (state, context) {\n const ids = findIdsByPredicate(state, options.ref || defaultEntitiesRef, predicate);\n\n if (ids.length) {\n return updateEntities(ids, updater, options)(state, context);\n }\n\n return state;\n };\n}\n/**\r\n *\r\n * Update all entities\r\n *\r\n * @example\r\n *\r\n * store.update(updateAllEntities({ name }))\r\n * store.update(updateAllEntities(entity => ({ ...entity, name })))\r\n *\r\n */\n\nfunction updateAllEntities(updater, options = {}) {\n return function (state, context) {\n const {\n ref: {\n idsKey\n } = defaultEntitiesRef\n } = options;\n return updateEntities(state[idsKey], updater, options)(state, context);\n };\n}\n/**\r\n *\r\n * Update entities that exists, add those who don't\r\n *\r\n * @example\r\n *\r\n */\n\nfunction upsertEntitiesById(ids, _ref) {\n let {\n updater,\n creator\n } = _ref,\n options = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return function (state, context) {\n const updatedEntitiesIds = [];\n const newEntities = [];\n const asArray = coerceArray(ids);\n if (!asArray.length) return state;\n\n for (const id of asArray) {\n if (hasEntity(id, options)(state)) {\n updatedEntitiesIds.push(id);\n } else {\n let newEntity = creator(id);\n\n if (options.mergeUpdaterWithCreator) {\n newEntity = toModel(updater, newEntity);\n }\n\n newEntities.push(newEntity);\n }\n }\n\n const newState = updateEntities(updatedEntitiesIds, updater, options)(state, context);\n return addEntities(newEntities, options)(newState, context);\n };\n}\n/**\r\n *\r\n * Merge entities that exists, add those who don't\r\n * Make sure all entities have an id\r\n *\r\n * @example\r\n *\r\n * // single entity\r\n * store.update(upsertEntities({ id: 1, completed: true }))\r\n *\r\n * // or multiple entities\r\n * store.update(upsertEntities([{ id: 1, completed: true }, { id: 2, completed: true }]))\r\n *\r\n * // or using a custom ref\r\n * store.update(upsertEntities([{ id: 1, open: true }], { ref: UIEntitiesRef }))\r\n *\r\n */\n\nfunction upsertEntities(entities, options = {}) {\n return function (state, context) {\n const {\n prepend = false,\n ref = defaultEntitiesRef\n } = options;\n const {\n entitiesKey,\n idsKey\n } = ref;\n const idKey = getIdKey(context, ref);\n const asObject = {};\n const ids = [];\n const entitiesArray = coerceArray(entities);\n\n if (!entitiesArray.length) {\n return state;\n }\n\n for (const entity of entitiesArray) {\n const id = entity[idKey]; // if entity exists, merge update, else add\n\n if (hasEntity(id, options)(state)) {\n asObject[id] = Object.assign({}, state[entitiesKey][id], entity);\n } else {\n ids.push(id);\n asObject[id] = entity;\n }\n }\n\n const updatedIds = !ids.length ? {} : {\n [idsKey]: prepend ? [...ids, ...state[idsKey]] : [...state[idsKey], ...ids]\n };\n return Object.assign({}, state, updatedIds, {\n [entitiesKey]: Object.assign({}, state[entitiesKey], asObject)\n });\n };\n}\n/**\r\n * Update entities ids\r\n *\r\n * @example\r\n *\r\n * // Update a single entity id\r\n * store.update(updateEntitiesIds(1, 2));\r\n *\r\n * // Update multiple entities ids\r\n * store.update(updateEntitiesIds([1, 2], [10, 20]));\r\n *\r\n * // Update entity id using a custom ref\r\n * store.update(updateEntitiesIds(1, 2, { ref: UIEntitiesRef }));\r\n *\r\n */\n\nfunction updateEntitiesIds(oldId, newId, options = {}) {\n return function (state, context) {\n const oldIds = coerceArray(oldId);\n const newIds = coerceArray(newId);\n\n if (oldIds.length !== newIds.length) {\n throw new Error('The number of old and new ids must be equal');\n }\n\n const {\n ref = defaultEntitiesRef\n } = options;\n const idProp = getIdKey(context, ref);\n const updatedEntities = Object.assign({}, state[ref.entitiesKey]);\n\n for (let i = 0; i < oldIds.length; i++) {\n const oldVal = oldIds[i];\n const newVal = newIds[i];\n\n if (state[ref.entitiesKey][newVal]) {\n throw new Error(`Updating id \"${oldVal}\". The new id \"${newVal}\" already exists`);\n }\n\n const oldEntity = state[ref.entitiesKey][oldVal];\n const updated = Object.assign({}, oldEntity, {\n [idProp]: newVal\n });\n updatedEntities[newVal] = updated;\n Reflect.deleteProperty(updatedEntities, oldVal);\n }\n\n const updatedStateIds = state[ref.idsKey].slice();\n let processedIds = 0;\n\n for (let i = 0; i < updatedStateIds.length; i++) {\n const currentId = updatedStateIds[i];\n\n for (let j = 0; j < oldIds.length; j++) {\n const oldVal = oldIds[j];\n const newVal = newIds[j];\n\n if (currentId === oldVal) {\n updatedStateIds[i] = newVal;\n processedIds++;\n break;\n }\n }\n\n if (processedIds === oldIds.length) {\n break;\n }\n }\n\n return Object.assign({}, state, {\n [ref.entitiesKey]: updatedEntities,\n [ref.idsKey]: updatedStateIds\n });\n };\n}\n\nfunction untilEntitiesChanges(key) {\n return distinctUntilChanged((prev, current) => {\n return prev[key] === current[key];\n });\n}\n/**\r\n *\r\n * Observe entities\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectAllEntities())\r\n *\r\n * store.pipe(selectAllEntities({ ref: UIEntitiesRef }))\r\n *\r\n */\n\nfunction selectAllEntities(options = {}) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef\n } = options;\n return pipe(untilEntitiesChanges(entitiesKey), map(state => state[idsKey].map(id => state[entitiesKey][id])));\n}\n/**\r\n *\r\n * Observe entities object\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectEntities())\r\n *\r\n * store.pipe(selectEntities({ ref: UIEntitiesRef }))\r\n *\r\n */\n\nfunction selectEntities(options = {}) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n return select(state => state[entitiesKey]);\n}\n/**\r\n *\r\n * Observe entities and apply filter/map\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectAllEntitiesApply({\r\n * map: (entity) => new Todo(entity),\r\n * filter: entity => entity.completed\r\n * }))\r\n *\r\n *\r\n */\n\nfunction selectAllEntitiesApply(options) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef,\n filterEntity = () => true,\n mapEntity = e => e\n } = options;\n return pipe(untilEntitiesChanges(entitiesKey), map(state => {\n const result = [];\n\n for (const id of state[idsKey]) {\n const entity = state[entitiesKey][id];\n\n if (filterEntity(entity)) {\n result.push(mapEntity(entity));\n }\n }\n\n return result;\n }));\n}\n\nfunction selectEntity(id, options = {}) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef,\n pluck\n } = options;\n return pipe(untilEntitiesChanges(entitiesKey), select(state => getEntity(state[entitiesKey], id, pluck)));\n}\nfunction getEntity(entities, id, pluck) {\n const entity = entities[id];\n\n if (isUndefined(entity)) {\n return undefined;\n }\n\n if (!pluck) {\n return entity;\n }\n\n return checkPluck(entity, pluck);\n}\nfunction selectEntityByPredicate(predicate, options) {\n const {\n ref = defaultEntitiesRef,\n pluck,\n idKey = 'id'\n } = options || {};\n const {\n entitiesKey\n } = ref;\n let id;\n return pipe(select(state => {\n if (isUndefined(id)) {\n const entity = findEntityByPredicate(state, ref, predicate);\n id = entity && entity[idKey];\n }\n\n return state[entitiesKey][id];\n }), map(entity => entity ? checkPluck(entity, pluck) : undefined), distinctUntilChanged());\n}\n\n/**\r\n *\r\n * Observe the first entity\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectFirst())\r\n *\r\n */\n\nfunction selectFirst(options = {}) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef\n } = options;\n return select(state => state[entitiesKey][state[idsKey][0]]);\n}\n\n/**\r\n *\r\n * Observe the last entity\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectLast())\r\n *\r\n */\n\nfunction selectLast(options = {}) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef\n } = options;\n return select(state => state[entitiesKey][state[idsKey][state[idsKey].length - 1]]);\n}\n\nfunction selectMany(ids, options = {}) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef,\n pluck\n } = options;\n return pipe(select(state => state[entitiesKey]), map(entities => {\n if (!ids.length) return [];\n const filtered = [];\n\n for (const id of ids) {\n const entity = getEntity(entities, id, pluck);\n if (!isUndefined(entity)) filtered.push(entity);\n }\n\n return filtered;\n }), distinctUntilArrayItemChanged());\n}\nfunction selectManyByPredicate(predicate, options) {\n const {\n ref: {\n entitiesKey,\n idsKey\n } = defaultEntitiesRef,\n pluck\n } = options || {};\n return pipe(untilEntitiesChanges(entitiesKey), select(state => {\n const filteredEntities = [];\n state[idsKey].forEach((id, index) => {\n const entity = state[entitiesKey][id];\n\n if (predicate(entity, index)) {\n filteredEntities.push(checkPluck(entity, pluck));\n }\n });\n return filteredEntities;\n }), distinctUntilArrayItemChanged());\n}\n\n/**\r\n *\r\n * Observe the entities collection size\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectEntitiesCount())\r\n *\r\n */\n\nfunction selectEntitiesCount(options = {}) {\n const {\n ref: {\n idsKey\n } = defaultEntitiesRef\n } = options;\n return select(state => state[idsKey].length);\n}\n/**\r\n *\r\n * Observe the entities collection size that pass the predicate\r\n *\r\n * @example\r\n *\r\n * store.pipe(selectEntitiesCountByPredicate(entity => entity.completed))\r\n *\r\n */\n\nfunction selectEntitiesCountByPredicate(predicate, options = {}) {\n const ref = options.ref || defaultEntitiesRef;\n return pipe(untilEntitiesChanges(ref.entitiesKey), map(state => findIdsByPredicate(state, ref, predicate).length), distinctUntilChanged());\n}\n/**\r\n *\r\n * Return the entities collection size\r\n *\r\n * @example\r\n *\r\n * store.query(getEntitiesCount())\r\n *\r\n */\n\nfunction getEntitiesCount(options = {}) {\n return function (state) {\n const {\n ref: {\n idsKey\n } = defaultEntitiesRef\n } = options;\n return state[idsKey].length;\n };\n}\n/**\r\n *\r\n * Return the entities collection size that pass the predicate\r\n *\r\n * @example\r\n *\r\n * store.query(getEntitiesCountByPredicate(entity => entity.completed))\r\n *\r\n */\n\nfunction getEntitiesCountByPredicate(predicate, options = {}) {\n return function (state) {\n const ref = options.ref || defaultEntitiesRef;\n return findIdsByPredicate(state, ref, predicate).length;\n };\n}\n\nfunction unionEntities(idKey = 'id') {\n return map(state => {\n return state.entities.map(entity => {\n return Object.assign({}, entity, state.UIEntities[entity[idKey]]);\n });\n });\n}\n\nfunction unionEntitiesAsMap(idKey = 'id') {\n return map(state => {\n return Object.fromEntries(state.entities.map(entity => {\n return [entity[idKey], Object.assign({}, entity, state.UIEntities[entity[idKey]])];\n }));\n });\n}\n\nconst {\n selectActiveId,\n setActiveId,\n withActiveId,\n resetActiveId,\n getActiveId\n} = propsFactory('activeId', {\n initialValue: undefined\n});\nfunction selectActiveEntity(options = {}) {\n const {\n ref = defaultEntitiesRef\n } = options;\n return function (source) {\n return source.pipe(selectActiveId()).pipe(switchMap(id => source.pipe(selectEntity(id, {\n ref\n }))));\n };\n}\nfunction getActiveEntity(options = {}) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n return function (state) {\n return state[entitiesKey][getActiveId(state)];\n };\n}\nconst {\n setActiveIds,\n resetActiveIds,\n withActiveIds,\n selectActiveIds,\n toggleActiveIds,\n removeActiveIds,\n addActiveIds,\n getActiveIds\n} = propsArrayFactory('activeIds', {\n initialValue: []\n});\nfunction selectActiveEntities(options = {}) {\n const {\n ref = defaultEntitiesRef\n } = options;\n return function (source) {\n return source.pipe(selectActiveIds()).pipe(switchMap(ids => source.pipe(selectMany(ids, {\n ref\n }))));\n };\n}\nfunction getActiveEntities(options = {}) {\n const {\n ref: {\n entitiesKey\n } = defaultEntitiesRef\n } = options;\n return function (state) {\n const result = [];\n\n for (const id of getActiveIds(state)) {\n const entity = state[entitiesKey][id];\n\n if (entity) {\n result.push(entity);\n }\n }\n\n return result;\n };\n}\n\nexport { EntitiesRef, UIEntitiesRef, addActiveIds, addEntities, addEntitiesFifo, deleteAllEntities, deleteEntities, deleteEntitiesByPredicate, entitiesPropsFactory, getActiveEntities, getActiveEntity, getActiveId, getActiveIds, getAllEntities, getAllEntitiesApply, getEntitiesCount, getEntitiesCountByPredicate, getEntity$1 as getEntity, hasEntity, removeActiveIds, resetActiveId, resetActiveIds, selectActiveEntities, selectActiveEntity, selectActiveId, selectActiveIds, selectAllEntities, selectAllEntitiesApply, selectEntities, selectEntitiesCount, selectEntitiesCountByPredicate, selectEntity, selectEntityByPredicate, selectFirst, selectLast, selectMany, selectManyByPredicate, setActiveId, setActiveIds, setEntities, setEntitiesMap, toggleActiveIds, unionEntities, unionEntitiesAsMap, updateAllEntities, updateEntities, updateEntitiesByPredicate, updateEntitiesIds, upsertEntities, upsertEntitiesById, withActiveId, withActiveIds, withEntities, withUIEntities };\n","import { Injectable } from '@angular/core';\r\nimport { createStore } from '@ngneat/elf';\r\nimport { withEntities, selectAllEntities, addEntities, selectEntitiesCount, getAllEntities, updateAllEntities, deleteEntities, getEntity, deleteAllEntities, updateEntities } from '@ngneat/elf-entities';\r\nimport { localStorageStrategy, persistState } from '@ngneat/elf-persist-state';\r\nimport { createRequestsStatusOperator, selectRequestStatus, updateRequestStatus, withRequestsStatus } from '@ngneat/elf-requests';\r\nimport { map, MonoTypeOperatorFunction } from 'rxjs';\r\n\r\nexport interface Request {\r\n id: number;\r\n body: any;\r\n url: string;\r\n method: string;\r\n userId: string | null;\r\n createdAt: Date;\r\n responseIdPath?: string;\r\n}\r\n\r\nconst ID_PROMISE = 'id-promise';\r\nconst ID_PROMISE_REGEX = new RegExp(`${ID_PROMISE}~\\d+~`);\r\nexport function hasIdPromise(url: string) {\r\n return ID_PROMISE_REGEX.test(url);\r\n}\r\nexport function buildIdPromise(id: number) {\r\n return `${ID_PROMISE}~${id}~`;\r\n}\r\n\r\nexport function buildUrlPromise(url: string) {\r\n return url;\r\n}\r\n\r\nconst store = createStore(\r\n { name: 'requests' },\r\n withEntities<Request>(),\r\n withRequestsStatus()\r\n);\r\npersistState(store, { storage: localStorageStrategy });\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class RequestsRepository {\r\n name = store.name;\r\n\r\n all$ = store.pipe(selectAllEntities());\r\n count$ = store.pipe(selectEntitiesCount());\r\n\r\n private trackOperator = createRequestsStatusOperator(store);\r\n track(id?: number): MonoTypeOperatorFunction<any> {\r\n return this.trackOperator(id?.toString() || this.name);\r\n }\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(this.name),\r\n map(x => x.value === 'pending')\r\n );\r\n statusOne = (id: number) => store.pipe(\r\n selectRequestStatus(id.toString())\r\n );\r\n isLoadingOne = (id: number) => this.statusOne(id).pipe(\r\n map(x => x.value === 'pending')\r\n );\r\n\r\n add(request: Omit<Request, 'id'>): Request {\r\n const ids = store.getValue().ids;\r\n const maxId = ids.length ? Math.max(...ids) : 0;\r\n const entity = {\r\n ...request,\r\n id: maxId + 1\r\n }; \r\n store.update(\r\n addEntities([entity])\r\n ); \r\n return entity;\r\n }\r\n\r\n update(id: number, data: Partial<Request>) { \r\n store.update(\r\n updateEntities(id, data)\r\n );\r\n }\r\n\r\n getAllForUser(userId: string): Request[] {\r\n return store\r\n .query(getAllEntities())\r\n .filter(x => x.userId === userId);\r\n }\r\n\r\n getByUrl(url: string): Request | undefined {\r\n return store\r\n .query(getAllEntities())\r\n .filter(x => x.url === url)[0];\r\n }\r\n\r\n getNextForUser(userId: string): Request | undefined {\r\n return this.getAllForUser(userId)[0];\r\n }\r\n\r\n getOne(id: number): Request | undefined {\r\n return store.query(getEntity(id));\r\n }\r\n\r\n resolveId(requestId: number, realId: string) {\r\n store.update(\r\n updateAllEntities((entity) => ({\r\n ...entity,\r\n url: entity.url.replace(buildIdPromise(requestId), realId)\r\n }))\r\n );\r\n }\r\n\r\n remove(id: number) {\r\n store.update(\r\n deleteEntities(id),\r\n updateRequestStatus(id.toString(), 'success'),\r\n updateRequestStatus(this.name, 'success')\r\n );\r\n }\r\n\r\n clear() {\r\n store.update(\r\n deleteAllEntities()\r\n );\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpErrorResponse\r\n} from '@angular/common/http';\r\nimport { catchError, Observable } from 'rxjs';\r\nimport { ConnectionService } from '../../shared/services/connection.service';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { Request, RequestsRepository } from 'src/app/state/requests.repository';\r\nimport { EnvState } from '../../shared/helpers/env-state';\r\n\r\nconst RETRY_METHODS = [ 'POST', 'PATCH' ];\r\n\r\nexport class ScheduledForRetryError implements Error {\r\n name: string;\r\n message: string;\r\n stack?: string | undefined;\r\n\r\n constructor(public request: Request, public inner: Error) {\r\n this.name = 'ScheduledForRetryError';\r\n this.message = 'A request has failed in offline mode and will be syncronized once online.';\r\n }\r\n}\r\n\r\nconst DO_NOT_INTERCEPT = [\r\n '/api/auth'\r\n];\r\n\r\nexport const RETRY_HEADER = \"IsRetriedRequest\";\r\n\r\n@Injectable()\r\nexport class RetryInterceptor implements HttpInterceptor {\r\n constructor(\r\n private connection: ConnectionService,\r\n private auth: AuthRepository,\r\n private repo: RequestsRepository,\r\n private env: EnvState\r\n ) {\r\n this.reqId = 0;\r\n }\r\n\r\nreqId:number = 0;\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n this.repo.count$.subscribe(x=>this.reqId = x+1);\r\n return next.handle(request).pipe(\r\n catchError((error: Error) => {\r\n if (this.shouldRetry(request, error)) {\r\n // Handle offline request\r\n let url = request.urlWithParams;\r\n if (url.startsWith(this.env.apiUrl)) {\r\n url = url.substring(this.env.apiUrl.length);\r\n } \r\n var entity = {\r\n id: this.reqId,\r\n body: request.body,\r\n url,\r\n method: request.method.toUpperCase(),\r\n userId: this.auth.getId(),\r\n createdAt: new Date()} as Request;\r\n \r\n if(request.body && request.body.type) {\r\n if(!(url.includes('orders') && url.endsWith('events')) &&\r\n !(request.body.type === 'TripEnd' || request.body.type === 'Load' || request.body.type === 'Unload' || request.body.type === 'Weighing')) {\r\n this.repo.add(entity);\r\n }\r\n } \r\n if(request.body && !request.body.type && url.includes('orders') && request.method.toUpperCase() === 'PATCH') {\r\n this.repo.add(entity); \r\n }\r\n \r\n if(url.includes('workdays') && !url.includes('events')) {\r\n this.repo.add(entity); \r\n }\r\n \r\n if(request.body && url.includes('trips')) { \r\n this.repo.add(entity);\r\n }\r\n throw new ScheduledForRetryError(entity, error); \r\n }\r\n // return the error back to the caller\r\n throw error;\r\n })\r\n );\r\n }\r\n\r\n private shouldRetry(request: HttpRequest<any>, error: any) {\r\n let requestUrl = request.url; \r\n if (this.env.apiUrl && requestUrl.startsWith(this.env.apiUrl)) {\r\n requestUrl = requestUrl.substring(this.env.apiUrl.length); \r\n }\r\n return !this.connection.isOnline()\r\n && !request.headers.has(RETRY_HEADER)\r\n && error instanceof HttpErrorResponse\r\n && RETRY_METHODS.includes(request.method.toUpperCase())\r\n && !DO_NOT_INTERCEPT.includes(requestUrl);\r\n }\r\n}\r\n","import { EMPTY } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\nimport { selectMany } from '@ngneat/elf-entities';\nimport { select } from '@ngneat/elf';\n\nfunction withPagination(options) {\n var _options$initialPage;\n\n return {\n props: {\n pagination: {\n currentPage: (_options$initialPage = options == null ? void 0 : options.initialPage) != null ? _options$initialPage : 1,\n pages: {},\n perPage: 0,\n lastPage: 0,\n total: 0\n }\n },\n config: undefined\n };\n}\nfunction setPage(key, ids) {\n return function (state) {\n return Object.assign({}, state, {\n pagination: Object.assign({}, state.pagination, {\n pages: Object.assign({}, state.pagination.pages, {\n [key]: ids\n })\n })\n });\n };\n}\nfunction selectPaginationData() {\n return select(getPaginationData());\n}\nfunction getPaginationData() {\n return function (state) {\n return state.pagination;\n };\n}\nfunction updatePaginationData(data) {\n return function (state) {\n return Object.assign({}, state, {\n pagination: Object.assign({}, state.pagination, data)\n });\n };\n}\nfunction deletePage(id) {\n return function (state) {\n const pages = Object.assign({}, state.pagination.pages);\n Reflect.deleteProperty(pages, id);\n return Object.assign({}, state, {\n pagination: Object.assign({}, state.pagination, {\n pages\n })\n });\n };\n}\nfunction deleteAllPages() {\n return function (state) {\n return Object.assign({}, state, {\n pagination: Object.assign({}, state.pagination, {\n pages: {}\n })\n });\n };\n}\nfunction setCurrentPage(id) {\n return function (state) {\n return Object.assign({}, state, {\n pagination: Object.assign({}, state.pagination, {\n currentPage: id\n })\n });\n };\n}\nfunction selectCurrentPage() {\n return select(state => state.pagination.currentPage);\n}\nfunction selectHasPage(id) {\n return select(hasPage(id));\n}\nfunction hasPage(id) {\n return function (state) {\n return Reflect.has(state.pagination.pages, id);\n };\n}\nfunction selectCurrentPageEntities() {\n return function (source) {\n return source.pipe(selectCurrentPage()).pipe(switchMap(page => {\n return source.pipe(select(state => state.pagination.pages[page])).pipe(switchMap(ids => source.pipe(selectMany(ids != null ? ids : []))));\n }));\n };\n}\nfunction skipWhilePageExists(store, page, options) {\n return function (source) {\n if (store.query(hasPage(page))) {\n var _options$returnSource;\n\n return (_options$returnSource = options == null ? void 0 : options.returnSource) != null ? _options$returnSource : EMPTY;\n }\n\n return source;\n };\n}\n\nexport { deleteAllPages, deletePage, getPaginationData, hasPage, selectCurrentPage, selectCurrentPageEntities, selectHasPage, selectPaginationData, setCurrentPage, setPage, skipWhilePageExists, updatePaginationData, withPagination };\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\nexport interface SortState {\r\n parameter: SortOption;\r\n direction: 'asc' | 'desc';\r\n}\r\n\r\nexport interface SortOption {\r\n property: string;\r\n label?: string;\r\n}\r\n\r\nfunction compareStrings(a: string, b: string) {\r\n return a.localeCompare(b, undefined, {sensitivity: 'base'});\r\n}\r\n\r\nfunction compareDefault(a: any, b: any) {\r\n if (a === b) {\r\n return 0;\r\n }\r\n return a < b ? -1 : 1;\r\n}\r\n\r\nexport function sortBy<T>(value: T[], sort: SortState): T[] {\r\n let multiplier = 1;\r\n if (sort.direction === 'desc') {\r\n multiplier = -1;\r\n }\r\n const sorted = [ ...value ].sort((a: any, b: any) => {\r\n let aProp = a[sort.parameter.property];\r\n let bProp = b[sort.parameter.property];\r\n if (typeof(aProp) === 'string' && typeof(bProp) === 'string') {\r\n return multiplier * compareStrings(aProp, bProp);\r\n }\r\n return multiplier * compareDefault(aProp, bProp);\r\n });\r\n return sorted;\r\n}\r\n\r\n@Pipe({ name: 'sort' })\r\nexport class SortPipe implements PipeTransform {\r\n\r\n transform(value: any[] | null, sort: SortState): any[] | null {\r\n if(!sort || !value){\r\n return value;\r\n }\r\n return sortBy(value, sort);\r\n }\r\n}\r\n","import { createStore, select, withProps } from '@ngneat/elf';\r\nimport {\r\n deleteAllEntities,\r\n deleteEntities,\r\n getEntity,\r\n selectAllEntities,\r\n selectEntity,\r\n upsertEntities,\r\n withEntities,\r\n} from '@ngneat/elf-entities';\r\nimport {\r\n deleteAllPages,\r\n getPaginationData,\r\n hasPage,\r\n PaginationData,\r\n selectCurrentPage,\r\n selectCurrentPageEntities,\r\n selectPaginationData,\r\n setCurrentPage,\r\n setPage,\r\n skipWhilePageExists,\r\n updatePaginationData,\r\n withPagination,\r\n} from '@ngneat/elf-pagination';\r\nimport {\r\n createRequestsCacheOperator,\r\n createRequestsStatusOperator,\r\n selectRequestStatus,\r\n updateRequestCache,\r\n updateRequestsStatus,\r\n withRequestsCache,\r\n withRequestsStatus,\r\n} from '@ngneat/elf-requests';\r\nimport { combineLatest, map, MonoTypeOperatorFunction } from 'rxjs';\r\nimport {\r\n sortBy,\r\n SortOption,\r\n SortState,\r\n} from 'src/app/modules/shared/pipes/sort.pipe';\r\n\r\nexport interface SortProps {\r\n sortBy: SortState;\r\n}\r\n\r\nfunction buildBasicStore<T extends { id: string }>(\r\n name: string,\r\n defaultSort: SortState\r\n) {\r\n return createStore(\r\n { name },\r\n withEntities<T>(),\r\n withProps<SortProps>({\r\n sortBy: defaultSort,\r\n }),\r\n withRequestsCache(),\r\n withRequestsStatus(),\r\n withPagination()\r\n );\r\n}\r\n\r\nexport class BaseRepository<T extends { id: string }> {\r\n constructor(\r\n public name: string,\r\n public sortOptions: SortOption[],\r\n private defaultSort?: SortState\r\n ) {}\r\n\r\n protected store = buildBasicStore<T>(\r\n this.name,\r\n this.defaultSort || { parameter: this.sortOptions[0], direction: 'asc' }\r\n );\r\n\r\n protected storeDeleted = buildBasicStore<T>(\r\n this.name + 'Deleted',\r\n this.defaultSort || { parameter: this.sortOptions[0], direction: 'asc' }\r\n );\r\n\r\n allDeleted$ = this.storeDeleted.pipe(selectAllEntities());\r\n\r\n private trackOperator = createRequestsStatusOperator(this.store);\r\n private trackOperatorDeleted = createRequestsStatusOperator(\r\n this.storeDeleted\r\n );\r\n private skipOperator = createRequestsCacheOperator(this.store);\r\n\r\n private skipOperatorDeleted = createRequestsCacheOperator(this.storeDeleted);\r\n\r\n sort$ = this.store.pipe(select((state) => state.sortBy));\r\n isLoading$ = this.store.pipe(\r\n selectRequestStatus(this.store.name),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n isLoadingDel$ = this.store.pipe(selectRequestStatus(this.store.name));\r\n isAdding$ = this.store.pipe(\r\n selectRequestStatus(`${this.store.name}_add`),\r\n map((x) => x.value === 'pending')\r\n );\r\n statusOne = (id: string) =>\r\n this.store.pipe(selectRequestStatus(id, { groupKey: this.store.name }));\r\n isLoadingOne = (id: string) =>\r\n this.statusOne(id).pipe(map((x) => x.value === 'pending'));\r\n\r\n all$ = this.store.pipe(selectAllEntities());\r\n allSorted$ = combineLatest([this.all$, this.sort$]).pipe(\r\n map(([list, sort]) => sortBy(list, sort))\r\n );\r\n one = (id: string) => this.store.pipe(selectEntity(id));\r\n\r\n page$ = this.store.pipe(selectCurrentPageEntities());\r\n pageNumber$ = this.store.pipe(selectCurrentPage());\r\n paginationData$ = this.store.pipe(selectPaginationData());\r\n canLoadMore$ = this.paginationData$.pipe(\r\n map((data) => data.currentPage < data.lastPage)\r\n );\r\n isLastPage$ = this.paginationData$.pipe(\r\n map((data) => data.currentPage === data.lastPage)\r\n );\r\n hasPage = (page: number) => this.store.query(hasPage(page));\r\n setPage = (page: number) => this.store.update(setCurrentPage(page));\r\n getPaginationData = () => this.store.query(getPaginationData());\r\n clearPages = () => this.store.update(deleteAllPages());\r\n\r\n setSort(sortBy: SortState): void {\r\n this.store.update((state) => ({\r\n ...state,\r\n sortBy,\r\n }));\r\n }\r\n\r\n getSort = () => this.store.getValue().sortBy;\r\n\r\n set(models: T[]): void {\r\n this.store.update(\r\n updateRequestCache(this.store.name),\r\n upsertEntities(models),\r\n updateRequestsStatus([this.store.name], 'success')\r\n );\r\n }\r\n\r\n setDeleted(models: T[]): void {\r\n this.storeDeleted.update(\r\n updateRequestCache(this.storeDeleted.name),\r\n upsertEntities(models),\r\n updateRequestsStatus([this.storeDeleted.name], 'success')\r\n );\r\n }\r\n\r\n getOne(id: string): T | undefined {\r\n return this.store.query(getEntity(id));\r\n }\r\n\r\n addPage(response: PaginationData & { data: T[] }) {\r\n const { data, ...paginationData } = response;\r\n\r\n this.store.update(\r\n upsertEntities(data),\r\n updatePaginationData(paginationData),\r\n setPage(\r\n // this is supposed to be a page number, but TS asks for T['id']\r\n // type which is probably a bug in the library,\r\n // so we're ignoring it with 'as any' statement\r\n paginationData.currentPage as any,\r\n data.map((c) => c.id)\r\n ),\r\n updateRequestsStatus([this.store.name], 'success')\r\n );\r\n }\r\n\r\n upsert(model: T): void {\r\n this.store.update(\r\n updateRequestCache(model.id),\r\n upsertEntities([model]),\r\n updateRequestsStatus([model.id], 'success')\r\n );\r\n }\r\n\r\n remove(id: string): void {\r\n this.store.update(\r\n updateRequestCache(id),\r\n deleteEntities(id),\r\n updateRequestsStatus([id], 'success')\r\n );\r\n }\r\n\r\n clear(): void {\r\n this.store.update(deleteAllEntities());\r\n }\r\n\r\n track(operation = ''): MonoTypeOperatorFunction<any> {\r\n let key = this.store.name;\r\n if (operation) {\r\n key += `_${operation}`;\r\n }\r\n return this.trackOperator(key);\r\n }\r\n\r\n trackDeleted(operation = ''): MonoTypeOperatorFunction<any> {\r\n let key = this.storeDeleted.name;\r\n if (operation) {\r\n key += `_${operation}`;\r\n }\r\n return this.trackOperatorDeleted(key);\r\n }\r\n\r\n trackOne(id: string): MonoTypeOperatorFunction<any> {\r\n return this.trackOperator(id);\r\n }\r\n\r\n skipWhileCached(id?: string): MonoTypeOperatorFunction<any> {\r\n return this.skipOperator(id || this.store.name);\r\n }\r\n\r\n skipWhileCachedDeleted(id?: string): MonoTypeOperatorFunction<any> {\r\n return this.skipOperatorDeleted(id || this.storeDeleted.name);\r\n }\r\n\r\n skipWhilePageCached(page: number): MonoTypeOperatorFunction<any> {\r\n return skipWhilePageExists(this.store, page);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { clearRequestsCache } from '@ngneat/elf-requests';\r\nimport { SortOption } from '../modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\n\r\nexport interface Vehicle {\r\n id: string;\r\n name: string;\r\n numberplate: string;\r\n isBeingUsed: boolean;\r\n createdAt: Date;\r\n}\r\n\r\nexport const vehiclesSortOptions: SortOption[] = [\r\n { label: $localize `:Sort label Name:Name`, property: 'name' },\r\n { label: $localize `:Sort label Number plate:Number plate`, property: 'numberplate' },\r\n { label: $localize `:Sort label Date:Date`, property: 'createdAt' }\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class VehiclesRepository extends BaseRepository<Vehicle> {\r\n\r\n constructor() {\r\n super('vehicles', vehiclesSortOptions);\r\n }\r\n\r\n clearCache() {\r\n this.store.update(\r\n clearRequestsCache()\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { clearRequestsCache } from '@ngneat/elf-requests';\r\nimport { SortOption } from '../modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\n\r\nexport interface Trailer {\r\n id: string;\r\n name: string;\r\n numberplate: string;\r\n isBeingUsed: boolean;\r\n createdAt: Date;\r\n}\r\n\r\nexport const trailersSortOptions: SortOption[] = [\r\n { label: $localize `:Sort label Name:Name`, property: 'name' },\r\n { label: $localize `:Sort label Number plate:Number plate`, property: 'numberplate' },\r\n { label: $localize `:Sort label Date:Date`, property: 'createdAt' }\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TrailersRepository extends BaseRepository<Trailer> {\r\n\r\n constructor() {\r\n super('trailers', trailersSortOptions);\r\n }\r\n\r\n clearCache() {\r\n this.store.update(\r\n clearRequestsCache()\r\n );\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AuthRepository, UserSettings } from 'src/app/state/auth.repository';\r\nimport { Request } from 'src/app/state/requests.repository';\r\nimport { TrailersRepository } from 'src/app/state/trailers.repository';\r\nimport { VehiclesRepository } from 'src/app/state/vehicles.repository';\r\nimport { RequestsResolver } from '../../shared/services/requests-resolver';\r\n\r\nconst API = '/api/auth/settings';\r\nconst NAME_LOADING_ERROR = $localize `:Could not load vehicle/trailer info while offline:Name unavailable offline`;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SettingsRequestsResolverService implements RequestsResolver {\r\n\r\n constructor(\r\n private vehicles: VehiclesRepository,\r\n private trailers: TrailersRepository,\r\n private auth: AuthRepository\r\n ) { }\r\n\r\n canResolve(request: Request): boolean {\r\n return request.url === API;\r\n }\r\n\r\n modifyLocalState(request: Request): void {\r\n const settings = this.buildSettings(request);\r\n this.auth.setSettings(settings);\r\n }\r\n\r\n buildSettings(request: Request): UserSettings {\r\n const settings = request.body;\r\n if (settings.vehicleId) {\r\n const vehicle = this.vehicles.getOne(settings.vehicleId);\r\n settings.vehicleName = vehicle\r\n ? `[${vehicle.numberplate}] ${vehicle.name}`\r\n : `[${NAME_LOADING_ERROR}]`;\r\n }\r\n if (settings.trailerId) {\r\n const trailer = this.trailers.getOne(settings.trailerId);\r\n settings.trailerName = trailer\r\n ? `[${trailer.numberplate}] ${trailer.name}`\r\n : `[${NAME_LOADING_ERROR}]`;\r\n }\r\n return settings;\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { getRegistry } from '@ngneat/elf';\r\nimport { of, OperatorFunction } from 'rxjs';\r\nimport { catchError, switchMap, tap } from 'rxjs/operators';\r\nimport { ScheduledForRetryError } from '../modules/core/interceptors/retry.interceptor';\r\nimport { SettingsRequestsResolverService } from '../modules/truck/services/settings-requests-resolver.service';\r\nimport {\r\n AuthProps,\r\n AuthRepository,\r\n PasswordChangeRequest,\r\n trackAuthRequestsStatus,\r\n UserSettings,\r\n} from './auth.repository';\r\n\r\nconst API = '/api/auth';\r\n\r\nconst USER_INDEPENDENT_STORES = ['ui', 'requests'];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AuthService {\r\n constructor(\r\n private http: HttpClient,\r\n private repo: AuthRepository,\r\n private offlineResolver: SettingsRequestsResolverService,\r\n private route: ActivatedRoute\r\n ) {}\r\n\r\n login(email: string, password: string, isRemembered = false) {\r\n return this.http\r\n .post<AuthProps>(API, {\r\n email: email,\r\n password: password,\r\n rememberme: isRemembered,\r\n })\r\n .pipe(\r\n tap((resp) => this.repo.setToken(resp?.token)),\r\n trackAuthRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n forgot(email: string) {\r\n return this.http.post<AuthProps>(`${API}/forgot`, { email });\r\n }\r\n\r\n reset(password: string, id: string, token: string) {\r\n return this.http.post<AuthProps>(`${API}/reset`, { password, id, token });\r\n }\r\n\r\n changePassword(dto: PasswordChangeRequest) {\r\n return this.http.post<void>(`${API}/password`, dto);\r\n }\r\n\r\n logout() {\r\n localStorage.setItem('specialToken', '');\r\n return this.http.delete(API).pipe(tap(() => this.clearStores()));\r\n }\r\n\r\n impersonate(id: string) {\r\n return this.http.post<AuthProps>(`${API}/impersonate`, { id }).pipe(\r\n tap(() => this.clearStores()),\r\n tap((resp) => this.repo.setToken(resp?.token)),\r\n trackAuthRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n unimpersonate() {\r\n return this.http.delete<AuthProps>(`${API}/impersonate`).pipe(\r\n tap(() => this.clearStores()),\r\n tap((resp) => this.repo.setToken(resp?.token)),\r\n trackAuthRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n refresh(token?: string) {\r\n let tokenOut;\r\n if (token && token.length >= 1) {\r\n tokenOut = token;\r\n } else {\r\n tokenOut = 'empty';\r\n }\r\n return this.http\r\n .post<AuthProps>(`${API}/refresh?token=${tokenOut}`, token)\r\n .pipe(\r\n tap((resp) => this.repo.setToken(resp?.token)),\r\n trackAuthRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n autoRefresh() {\r\n let token = localStorage.getItem('specialToken');\r\n return this.repo.isExpiresSoon$.pipe(switchMap(() => this.refresh(token!)));\r\n }\r\n\r\n loadSettings() {\r\n return this.http.get<UserSettings>(`${API}/settings`).pipe(\r\n tap((settings) => this.repo.setSettings(settings)),\r\n trackAuthRequestsStatus(`${this.repo.name}_settings`)\r\n );\r\n }\r\n\r\n updateSettings(settings: UserSettings) {\r\n return this.http.patch<UserSettings>(`${API}/settings`, settings).pipe(\r\n this.processOfflineSubmit(),\r\n tap((settings) => this.repo.setSettings(settings))\r\n );\r\n }\r\n\r\n private clearStores(): void {\r\n getRegistry().forEach((store, key) => {\r\n if (!USER_INDEPENDENT_STORES.includes(key)) {\r\n store.reset();\r\n }\r\n });\r\n }\r\n\r\n private processOfflineSubmit(): OperatorFunction<UserSettings, UserSettings> {\r\n return catchError((err) => {\r\n if (\r\n err instanceof ScheduledForRetryError &&\r\n this.offlineResolver.canResolve(err.request)\r\n ) {\r\n const settings = this.offlineResolver.buildSettings(err.request);\r\n return of(settings);\r\n }\r\n throw err;\r\n });\r\n }\r\n}\r\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n const resultSelector = popResultSelector(args);\n const { args: sources, keys } = argsArgArrayOrObject(args);\n const result = new Observable((subscriber) => {\n const { length } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, () => remainingCompletions--, undefined, () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","import { HttpClient } from '@angular/common/http';\r\nimport { PaginationData } from '@ngneat/elf-pagination';\r\nimport { combineLatest, from, map, Observable, of, switchMap, tap } from 'rxjs';\r\nimport { SortState } from 'src/app/modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './base.repository';\r\n\r\nexport const DEFAULT_ENTITIES_PER_PAGE = 10;\r\n\r\nexport class BaseService<T extends { id: string }> {\r\n constructor(\r\n private api: string,\r\n protected http: HttpClient,\r\n protected repo: BaseRepository<T>\r\n ) {}\r\n\r\n loadWithoutPagination(): Observable<T[]> {\r\n return this.http\r\n .get<Observable<T[]>>(this.api)\r\n .pipe(this.repo.track(), this.repo.skipWhileCached());\r\n }\r\n\r\n load(): Observable<PaginationData & { data: T[] }> {\r\n return this.http.get<PaginationData & { data: T[] }>(this.api).pipe(\r\n tap((res) => this.repo.set(res.data)),\r\n this.repo.track(),\r\n this.repo.skipWhileCached()\r\n );\r\n }\r\n\r\n loadDeleted(): Observable<PaginationData & { data: T[] }> {\r\n return this.http\r\n .get<PaginationData & { data: T[] }>(this.api + '/deleted')\r\n .pipe(\r\n tap((res) => this.repo.setDeleted(res.data)),\r\n this.repo.trackDeleted()\r\n //this.repo.skipWhileCachedDeleted()\r\n );\r\n }\r\n\r\n loadAsListwithRepo() {\r\n return this.http.get<T[]>(this.api + '/allaslist').pipe(\r\n tap((res) => this.repo.set(res)),\r\n this.repo.track(),\r\n this.repo.skipWhileCached()\r\n );\r\n }\r\n\r\n loadDeletedAsListwithRepo() {\r\n return this.http.get<T[]>(this.api + '/allaslist/deleted').pipe(\r\n tap((res) => this.repo.setDeleted(res)),\r\n this.repo.trackDeleted(),\r\n this.repo.skipWhileCachedDeleted()\r\n );\r\n }\r\n\r\n loadAllAsList() {\r\n return this.http.get<T[]>(this.api + '/allaslist');\r\n }\r\n\r\n loadAllDeletedasList() {\r\n return this.http.get<T[]>(this.api + '/allaslist/deleted');\r\n }\r\n\r\n loadPage(\r\n page: number,\r\n take: number = DEFAULT_ENTITIES_PER_PAGE\r\n ): Observable<PaginationData & { data: T[] }> {\r\n const sortOrder = this.repo.getSort();\r\n const query = [\r\n `page=${page}`,\r\n `take=${take}`,\r\n `sort=${sortOrder.parameter.property}`,\r\n `direction=${sortOrder.direction}`,\r\n ];\r\n this.repo.setPage(page);\r\n return this.http\r\n .get<PaginationData & { data: T[] }>(`${this.api}?${query.join('&')}`)\r\n .pipe(\r\n tap((res) => this.repo.addPage(res)),\r\n this.repo.track(),\r\n this.repo.skipWhilePageCached(page)\r\n );\r\n }\r\n\r\n sort(sortBy: SortState) {\r\n this.repo.setSort(sortBy);\r\n return this.reloadPage();\r\n }\r\n\r\n reloadPage(\r\n defaultTake: number = DEFAULT_ENTITIES_PER_PAGE\r\n ): Observable<(PaginationData & { data: T[] }) | null> {\r\n const data = this.repo.getPaginationData();\r\n if (data && Object.keys(data.pages).length) {\r\n this.repo.clearPages();\r\n return this.loadPage(data.currentPage, data.perPage);\r\n }\r\n return this.loadPage(1, defaultTake);\r\n }\r\n\r\n protected tapReloadPage<R>() {\r\n return switchMap((sourceResponse: R) =>\r\n combineLatest([of(sourceResponse), this.reloadPage()]).pipe(\r\n map(([res, _]) => res)\r\n )\r\n );\r\n }\r\n\r\n loadOneWithoutTrack(id: string): Observable<T> {\r\n return this.http\r\n .get<T>(`${this.api}/${id}`)\r\n .pipe(tap((res) => this.repo.upsert(res)));\r\n }\r\n\r\n loadOne(id: string): Observable<T> {\r\n return this.http.get<T>(`${this.api}/${id}`).pipe(\r\n tap((res) => this.repo.upsert(res)),\r\n this.repo.trackOne(id),\r\n this.repo.skipWhileCached(id)\r\n );\r\n }\r\n\r\n loadOneWithoutCache(id: string): Observable<T> {\r\n return this.http.get<T>(`${this.api}/${id}`).pipe(\r\n tap((res) => this.repo.upsert(res)),\r\n this.tapReloadPage()\r\n );\r\n }\r\n\r\n add(model: Partial<T>): Observable<T> {\r\n return this.http.post<T>(this.api, model).pipe(\r\n tap((res) => this.repo.upsert(res)),\r\n this.tapReloadPage(),\r\n this.repo.track('add')\r\n );\r\n }\r\n\r\n update(id: string, model: Partial<T>): Observable<T> {\r\n return this.http.patch<T>(`${this.api}/${id}`, model).pipe(\r\n tap((res) => this.repo.upsert(res)),\r\n this.repo.trackOne(id)\r\n );\r\n }\r\n\r\n delete(id: string): Observable<void> {\r\n return this.http.delete<void>(`${this.api}/${id}`).pipe(\r\n tap(() => this.repo.remove(id)),\r\n this.tapReloadPage(),\r\n this.repo.trackOne(id)\r\n );\r\n }\r\n\r\n export(): Observable<string> {\r\n return this.http\r\n .get<Blob>(`${this.api}/csv`, { responseType: 'blob' as any })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n import(file: File): Observable<void> {\r\n const formData: FormData = new FormData();\r\n formData.append('file', file);\r\n return this.http\r\n .post<any>(`${this.api}/csv`, formData)\r\n .pipe(this.tapReloadPage());\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SortOption } from '../modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\n\r\nexport interface Accessory {\r\n id: string;\r\n name: string;\r\n description?: string;\r\n isBeingUsed: boolean;\r\n createdAt: Date;\r\n deletedAt?: string;\r\n}\r\n\r\nexport const accessorysSortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Name:Name`, property: 'name' },\r\n {\r\n label: $localize`:Sort label Description:Description`,\r\n property: 'description',\r\n },\r\n { label: $localize`:Sort label Date:Date`, property: 'createdAt' },\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AccessoriesRepository extends BaseRepository<Accessory> {\r\n constructor() {\r\n super('accessories', accessorysSortOptions);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { BaseService } from './abstract/base.service';\r\nimport { AccessoriesRepository, Accessory } from \"./accessories.repository\";\r\n\r\nconst API = '/api/accessories';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AccessoriesService extends BaseService<Accessory> {\r\n\r\n constructor(\r\n http: HttpClient,\r\n repo: AccessoriesRepository\r\n ) {\r\n super(API, http, repo);\r\n }\r\n\r\n}","import { Injectable } from '@angular/core';\r\nimport { SortOption } from '../modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\n\r\nexport interface Cleaning {\r\n id: string;\r\n name: string;\r\n createdAt: Date;\r\n isBeingUsed: boolean;\r\n description?: string;\r\n deletedAt?: string;\r\n}\r\n\r\nexport const cleaningsSortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Name:Name`, property: 'name' },\r\n { label: $localize`:Sort label Date:Date`, property: 'createdAt' },\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class CleaningsRepository extends BaseRepository<Cleaning> {\r\n constructor() {\r\n super('cleanings', cleaningsSortOptions);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { BaseService } from './abstract/base.service';\r\nimport { Cleaning, CleaningsRepository } from './cleaning.repository';\r\n\r\nconst API = '/api/cleanings';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CleaningsService extends BaseService<Cleaning> {\r\n\r\n constructor(\r\n http: HttpClient,\r\n repo: CleaningsRepository\r\n ) {\r\n super(API, http, repo);\r\n }\r\n\r\n}","import { Injectable } from '@angular/core';\r\nimport { SortOption } from 'src/app/modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\nimport { Template } from './templates.repository';\r\n\r\nexport interface Company {\r\n id: string;\r\n name: string;\r\n idNumber: string;\r\n email?: string;\r\n phoneNumber?: string;\r\n address?: string;\r\n zipCode?: number;\r\n city?: string;\r\n createdAt: Date;\r\n canBeVendor: boolean;\r\n canBeClient: boolean;\r\n isBeingUsedAsClient: boolean;\r\n isBeingUsedAsVendor: boolean;\r\n isFromEconomic: boolean;\r\n isDeleted: boolean;\r\n roles: string[];\r\n templateId: string;\r\n template: Template;\r\n deletedAt?: string;\r\n isActive: boolean;\r\n}\r\n\r\nexport const companySortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Name:Name`, property: 'name' },\r\n { label: $localize`:Sort label Zip:Zip`, property: 'zipCode' },\r\n { label: $localize`:Sort label Address:Address`, property: 'address' },\r\n { label: $localize`:Sort label City:City`, property: 'city' },\r\n { label: $localize`:Sort label Date:Date`, property: 'createdAt' },\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class CompaniesRepository extends BaseRepository<Company> {\r\n constructor() {\r\n super('companies', companySortOptions);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { map, Observable, tap } from 'rxjs';\r\nimport {\r\n BaseService,\r\n DEFAULT_ENTITIES_PER_PAGE,\r\n} from './abstract/base.service';\r\nimport { CompaniesRepository, Company } from './companies.repository';\r\nimport { PaginationData } from '@ngneat/elf-pagination';\r\nimport { SortState } from '../modules/shared/pipes/sort.pipe';\r\nimport { DataSelectDto } from './models/dataSelectModels/dataSelectDto';\r\n\r\nconst API = '/api/companies';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CompaniesService extends BaseService<Company> {\r\n constructor(http: HttpClient, repo: CompaniesRepository) {\r\n super(API, http, repo);\r\n }\r\n\r\n loadCompaniesForSelect() {\r\n return this.http.get<DataSelectDto[]>(`${API}/allforselect`);\r\n }\r\n\r\n loadCompaniesForEconomic() {\r\n return this.http.get<DataSelectDto[]>(`${API}/allforselecteconomic`);\r\n }\r\n\r\n loadAllForGoPage() {\r\n return this.http.get<Company[]>(`${API}/allaslistforgopage`).pipe(\r\n tap((res) => this.repo.set(res)),\r\n this.repo.track(),\r\n this.repo.skipWhileCached()\r\n );\r\n }\r\n\r\n loadCompanies(): Observable<Company[]> {\r\n return this.http.get<Observable<Company[]>>(API).pipe(this.repo.track());\r\n }\r\n\r\n sortT(sortBy: SortState, take = 10, isVendor = false) {\r\n this.repo.setSort(sortBy);\r\n return this.reloadPageT(take, isVendor);\r\n }\r\n\r\n reloadPageT(\r\n defaultTake: number = DEFAULT_ENTITIES_PER_PAGE,\r\n isVendor: boolean = false,\r\n search = ''\r\n ): Observable<(PaginationData & { data: Company[] }) | null> {\r\n return this.loadPageT(1, defaultTake, isVendor, search);\r\n }\r\n\r\n updateTemplates(id: string, companyIds: string[]) {\r\n return this.http\r\n .patch<Company[]>(`${API}/template`, { id: id, companyIds: companyIds })\r\n .pipe(\r\n tap((t) => this.repo.set(t)),\r\n this.repo.track()\r\n );\r\n }\r\n\r\n loadPageT(\r\n page: number,\r\n take: number = DEFAULT_ENTITIES_PER_PAGE,\r\n isVendor: boolean = false,\r\n search = ''\r\n ): Observable<PaginationData & { data: Company[] }> {\r\n const sortOrder = this.repo.getSort();\r\n const query = [\r\n `page=${page}`,\r\n `take=${take}`,\r\n `sort=${sortOrder.parameter.property}`,\r\n `search=${search}`,\r\n `direction=${sortOrder.direction}`,\r\n `isVendor=${isVendor}`,\r\n ];\r\n this.repo.setPage(page);\r\n return this.http\r\n .get<PaginationData & { data: Company[] }>(\r\n `/api/companies/canbevendor?${query.join('&')}`\r\n )\r\n .pipe(\r\n tap((res) => this.repo.addPage(res)),\r\n this.repo.track()\r\n //this.repo.skipWhilePageCached(page)\r\n );\r\n }\r\n\r\n exportByCompany(\r\n canBeClient: boolean,\r\n canBeVendor: boolean\r\n ): Observable<string> {\r\n return this.http\r\n .get<Blob>(`${API}/csv/${canBeClient}/${canBeVendor}`, {\r\n responseType: 'blob' as any,\r\n })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SortOption } from '../modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\nimport { PriceType } from './pricetypes.repository';\r\n\r\nexport interface Product {\r\n id: string;\r\n name: string;\r\n description?: string;\r\n isBeingUsed: boolean;\r\n productNumber: string;\r\n createdAt: Date;\r\n priceTypeId: string;\r\n priceType: PriceType;\r\n barCode: number;\r\n priceTypeName: string;\r\n deletedAt?: string;\r\n}\r\n\r\nexport const productsSortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Name:Name`, property: 'name' },\r\n {\r\n label: $localize`:Sort label Description:Description`,\r\n property: 'description',\r\n },\r\n { label: $localize`:Sort label Date:Date`, property: 'createdAt' },\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ProductsRepository extends BaseRepository<Product> {\r\n constructor() {\r\n super('products', productsSortOptions);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport {\r\n BaseService,\r\n DEFAULT_ENTITIES_PER_PAGE,\r\n} from './abstract/base.service';\r\nimport { Product, ProductsRepository } from './products.repository';\r\nimport { Observable, tap } from 'rxjs';\r\nimport { PaginationData } from '@ngneat/elf-pagination';\r\nimport { SortState } from '../modules/shared/pipes/sort.pipe';\r\nimport { DataSelectDto } from './models/dataSelectModels/dataSelectDto';\r\n\r\nconst API = '/api/products';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ProductsService extends BaseService<Product> {\r\n constructor(http: HttpClient, repo: ProductsRepository) {\r\n super(API, http, repo);\r\n }\r\n\r\n loadProductsForSelect() {\r\n return this.http.get<DataSelectDto[]>(`${API}/allforselect`);\r\n }\r\n\r\n loadEconomicProductsForSelect() {\r\n return this.http.get<DataSelectDto[]>(`${API}/allforselecteconomic`);\r\n }\r\n\r\n reloadPage(\r\n defaultTake: number = DEFAULT_ENTITIES_PER_PAGE,\r\n search = ''\r\n ): Observable<(PaginationData & { data: Product[] }) | null> {\r\n const data = this.repo.getPaginationData();\r\n if (data && Object.keys(data.pages).length) {\r\n this.repo.clearPages();\r\n return this.loadPage(data.currentPage, data.perPage, search);\r\n }\r\n return this.loadPage(1, defaultTake, search);\r\n }\r\n\r\n loadPage(\r\n page: number,\r\n take: number = DEFAULT_ENTITIES_PER_PAGE,\r\n search = ''\r\n ): Observable<PaginationData & { data: Product[] }> {\r\n const sortOrder = this.repo.getSort();\r\n const query = [\r\n `page=${page}`,\r\n `take=${take}`,\r\n `search=${search}`,\r\n `sort=${sortOrder.parameter.property}`,\r\n `direction=${sortOrder.direction}`,\r\n ];\r\n this.repo.setPage(page);\r\n return this.http\r\n .get<PaginationData & { data: Product[] }>(\r\n `${API + '/all'}?${query.join('&')}`\r\n )\r\n .pipe(\r\n tap((res) => this.repo.addPage(res)),\r\n\r\n this.repo.track(),\r\n this.repo.skipWhilePageCached(page)\r\n );\r\n }\r\n\r\n sort(sortBy: SortState) {\r\n this.repo.setSort(sortBy);\r\n return this.reloadPage();\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { BaseService } from './abstract/base.service';\r\nimport { Trailer, TrailersRepository } from './trailers.repository';\r\n\r\nconst API = '/api/trailers';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TrailersService extends BaseService<Trailer> {\r\n\r\n constructor(\r\n http: HttpClient,\r\n repo: TrailersRepository\r\n ) {\r\n super(API, http, repo);\r\n }\r\n\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { BaseService } from './abstract/base.service';\r\nimport { Vehicle, VehiclesRepository } from './vehicles.repository';\r\n\r\nconst API = '/api/vehicles';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class VehiclesService extends BaseService<Vehicle> {\r\n\r\n constructor(\r\n http: HttpClient,\r\n repo: VehiclesRepository\r\n ) {\r\n super(API, http, repo);\r\n }\r\n\r\n}\r\n","import { Injectable, Input } from '@angular/core';\r\nimport { createStore } from '@ngneat/elf';\r\nimport {\r\n withEntities,\r\n selectAllEntities,\r\n withActiveId,\r\n selectActiveEntity,\r\n setActiveId,\r\n upsertEntities,\r\n selectEntity,\r\n getEntity,\r\n getActiveEntity,\r\n getAllEntities,\r\n setEntitiesMap,\r\n setEntities,\r\n addEntities,\r\n deleteAllEntities,\r\n} from '@ngneat/elf-entities';\r\nimport {\r\n withRequestsCache,\r\n withRequestsStatus,\r\n createRequestsStatusOperator,\r\n createRequestsCacheOperator,\r\n updateRequestCache,\r\n updateRequestsStatus,\r\n selectRequestStatus,\r\n} from '@ngneat/elf-requests';\r\nimport { from, of } from 'rxjs';\r\nimport { filter, map, tap } from 'rxjs/operators';\r\nimport { sortBy } from '../modules/shared/pipes/sort.pipe';\r\nimport {\r\n SortColumn,\r\n SortDirection,\r\n} from '../modules/truck/components/sortable.directive';\r\nimport { Accessory } from './accessories.repository';\r\nimport { Cleaning } from './cleaning.repository';\r\nimport { Company } from './companies.repository';\r\nimport { Product } from './products.repository';\r\nimport { Trailer } from './trailers.repository';\r\nimport { Vehicle } from './vehicles.repository';\r\nimport { DayjsService } from '../modules/shared/services/dayjs.service';\r\nimport { CommentPhotoDto } from './orders.repository';\r\n\r\nexport type TripEventType =\r\n | 'TripStart'\r\n | 'TripEnd'\r\n | 'Unload'\r\n | 'Load'\r\n | 'Weighing'\r\n | 'Total';\r\n\r\nexport interface Trip {\r\n id: string;\r\n vehicle?: Vehicle | null;\r\n trailer?: Trailer | null;\r\n createdAt: Date;\r\n isApproved?: boolean;\r\n tripEvents: TripEvent[];\r\n userId?: string;\r\n userName?: string;\r\n exportedAt?: Date;\r\n failedSyncAt?: Date;\r\n isOrder?: boolean;\r\n isRejected?: boolean;\r\n parentId?: string | null;\r\n pickUpAddress?: string;\r\n deliveryAddress?: string;\r\n plannedToStartAt?: Date;\r\n plannedToEndAt?: Date;\r\n startedAt?: Date;\r\n rejectedAt?: Date;\r\n contactPerson?: string;\r\n reference?: string;\r\n note?: string;\r\n tenantNote?: string;\r\n clientId?: string;\r\n vendorId?: string;\r\n accessoryId?: string;\r\n cleaningId?: string;\r\n client?: Company;\r\n vendor?: Company;\r\n accessory?: Accessory;\r\n cleaning?: Cleaning;\r\n productIds?: string[];\r\n products?: Product[];\r\n weight?: number;\r\n casualUpdate?: boolean;\r\n familyNumber?: number;\r\n rejectedById?: string;\r\n rejectedByName?: string;\r\n officeNote?: string;\r\n type?: string;\r\n curTime?: Date;\r\n parkedAt?: Date;\r\n resumedAt?: Date;\r\n deletedAt?: Date;\r\n parkDuration?: number;\r\n totalDuration?: number;\r\n commentPhotos?: CommentPhotoDto[];\r\n}\r\n\r\nexport class TripDto {\r\n tripId?: string;\r\n exportedAt?: string;\r\n clientNameStart?: string;\r\n clientNameEnd?: string;\r\n clientIdStart?: string;\r\n clientIdEnd?: string;\r\n clientIdNumberStart?: string;\r\n clientIdNumberEnd?: string;\r\n isClientFromEconomic?: boolean;\r\n isClientDeleted?: boolean;\r\n carNumber?: string;\r\n trailerNumber?: string;\r\n pickUpAddress?: string;\r\n deliveryAddress?: string;\r\n tripEventIdStart?: string;\r\n tripEventIdEnd?: string;\r\n startEventTime?: string;\r\n startEventTimeForFilter?: Date;\r\n startEventPhotos?: TripPhoto[];\r\n startPhotoUrls?: string[];\r\n weighingPhotoUrls?: string[];\r\n weighingPhotos?: TripPhoto[];\r\n endPhotoUrls?: string[];\r\n endEventPhotos?: TripPhoto[];\r\n kmStart?: number;\r\n officeNote?: string;\r\n endEventTime?: string;\r\n kmEnd?: number;\r\n tripTime?: string;\r\n tripKm?: number;\r\n weightStart?: number;\r\n weightEnd?: number;\r\n cleaningStart?: string;\r\n cleaningEnd?: string;\r\n startPosition?: string;\r\n endPosition?: string;\r\n productNameStart?: string;\r\n productNameEnd?: string;\r\n productIdStart?: string;\r\n productIdEnd?: string;\r\n noteStart?: string;\r\n noteEnd?: string;\r\n referenceStart?: string;\r\n referenceEnd?: string;\r\n commentStart?: string;\r\n commentEnd?: string;\r\n vendorIdNumberStart?: string;\r\n vendorIdNumberEnd?: string;\r\n vendorNameStart?: string;\r\n vendorNameEnd?: string;\r\n accessoryNameStart?: string;\r\n accessoryNameEnd?: string;\r\n tripEvents?: TripEventDto[];\r\n tripAllNotes?: string;\r\n isApproved?: boolean;\r\n driverName?: string;\r\n driverId?: string;\r\n tenantNote?: string;\r\n failedSyncAt?: string;\r\n isOrder?: boolean;\r\n parkDuration?: string;\r\n mainParentId?: string;\r\n}\r\n\r\nexport class TripColumnDto {\r\n columnName?: string;\r\n columnExpression?: string;\r\n}\r\n\r\nexport interface BulkEProduct {\r\n tripIds: string[];\r\n productIds: string[];\r\n}\r\n\r\nexport interface EconomicDto {\r\n tripEventId: string;\r\n productId: string;\r\n product?: Product;\r\n isFixedPrice: boolean;\r\n fixedPriceValue: number;\r\n onlyTakeValueFromTotal: boolean;\r\n}\r\n\r\nexport interface ClientEventDto {\r\n id: string;\r\n clientEventInfoDtos?: ClientEventInfoDto[];\r\n}\r\n\r\nexport interface ClientEventInfoDto {\r\n tripEventId: string;\r\n clientId: string;\r\n}\r\n\r\nexport interface EconomicInfoExtended {\r\n infos?: EconomicInfo[];\r\n photos?: TripPhoto[];\r\n}\r\n\r\nexport interface EconomicInfo {\r\n tripEventId: string;\r\n productId: string;\r\n priceTypeId: string;\r\n fixedPrice?: number;\r\n onlyTakeValueFromTotal: boolean;\r\n}\r\n\r\nexport class TripUnloadDto {\r\n tripEventIdUnload?: string;\r\n position?: string;\r\n eventTime?: string;\r\n km?: number;\r\n weight?: number;\r\n productName?: string;\r\n clientName?: string;\r\n clientId?: string;\r\n clientIdNumber?: string;\r\n cleaning?: string;\r\n note?: string;\r\n reference?: string;\r\n vendorIdNumber?: string;\r\n vendorName?: string;\r\n unloadPhotos?: TripPhoto[];\r\n photoUrls?: string[];\r\n accessoriesName?: string;\r\n}\r\nexport class TripEventDto {\r\n tripEventId?: string;\r\n exportedAt?: string;\r\n position?: string;\r\n eventTime?: string;\r\n km?: number;\r\n weight?: number;\r\n productId?: string;\r\n productName?: string;\r\n clientName?: string;\r\n clientId?: string;\r\n clientIdNumber?: string;\r\n isClientFromEconomic?: boolean;\r\n cleaning?: string;\r\n note?: string;\r\n reference?: string;\r\n comment?: string;\r\n vendorIdNumber?: string;\r\n vendorName?: string;\r\n photos?: TripPhoto[];\r\n photoUrls?: string[];\r\n accessoriesName?: string;\r\n type?: string;\r\n duration?: string;\r\n diffKm?: string;\r\n diffKg?: string;\r\n tenantNote?: string;\r\n isApproved?: boolean;\r\n carNumber?: string;\r\n trailerNumber?: string;\r\n driverName?: string;\r\n tripKm?: number;\r\n tripTime?: string;\r\n economics?: EconomicDto[];\r\n isClientDeleted?: boolean;\r\n totalKm?: number;\r\n totalMinutes?: number;\r\n totalKg?: number;\r\n pickUpAddress?: string;\r\n deliveryAddress?: string;\r\n}\r\n\r\nexport class TripLoadDto {\r\n tripEventIdLoad?: string;\r\n position?: string;\r\n eventTime?: string;\r\n km?: number;\r\n weight?: number;\r\n productName?: string;\r\n clientName?: string;\r\n clientId?: string;\r\n clientIdNumber?: string;\r\n cleaning?: string;\r\n note?: string;\r\n reference?: string;\r\n vendorIdNumber?: string;\r\n vendorName?: string;\r\n loadPhotos?: TripPhoto[];\r\n photoUrls?: string[];\r\n accessoriesName?: string;\r\n}\r\n\r\nexport interface SearchResult {\r\n countries: TripDto[];\r\n total: number;\r\n}\r\n\r\nexport interface SearchState {\r\n page: number;\r\n pageSize: number;\r\n searchTerm: string;\r\n sortColumn: SortColumn;\r\n sortDirection: SortDirection;\r\n unloadPosition: string;\r\n}\r\n\r\nexport interface TripPhoto {\r\n id: string;\r\n createdAt: Date;\r\n url: string;\r\n isActive?: boolean;\r\n}\r\n\r\nexport class PhotoEventDto {\r\n url?: string;\r\n trips?: TripDto[];\r\n}\r\nexport class PhotoModalEventDto {\r\n url?: string;\r\n events?: TripEventDto[];\r\n}\r\n\r\nexport interface TripEvent {\r\n id: string;\r\n tripId?: string;\r\n createdAt?: Date;\r\n eventTime: Date;\r\n type: TripEventType;\r\n longitude: number;\r\n latitude: number;\r\n km: number;\r\n weight: number;\r\n accessoryId: string | null;\r\n accessory?: Accessory | null;\r\n cleaningId: string | null;\r\n cleaning?: Cleaning | null;\r\n clientId: string | null;\r\n client?: Company | null;\r\n vendorId: string | null;\r\n vendor?: Company | null;\r\n contactPerson?: string;\r\n reference?: string;\r\n comment?: string;\r\n note?: string;\r\n tenantNote?: string;\r\n productIds?: string[];\r\n products?: Product[];\r\n tripPhotos?: TripPhoto[];\r\n tripFiles?: File[];\r\n carNumber?: string;\r\n economics?: EconomicDto[];\r\n exportedAt?: Date;\r\n totalKm: number;\r\n totalMinutes: number;\r\n totalKg: number;\r\n pickUpAddress?: string;\r\n deliveryAddress?: string;\r\n}\r\n\r\nexport class TenantNoteEvent {\r\n tripEventId?: string;\r\n tenantNote?: string;\r\n}\r\n\r\nexport interface StringContainer {\r\n text?: string;\r\n}\r\n\r\nexport interface PushedInvoiceResponse {\r\n tripId: string;\r\n tripEventIds: string[];\r\n responseCode: number;\r\n errorMessage: string;\r\n}\r\n\r\nexport interface TripEventFile {\r\n id?: string;\r\n files: File[];\r\n}\r\n\r\nconst store = createStore(\r\n { name: 'trips' },\r\n withEntities<Trip>(),\r\n withActiveId(),\r\n withRequestsCache(),\r\n withRequestsStatus()\r\n);\r\nexport const trackTripsRequestsStatus = createRequestsStatusOperator(store);\r\nexport const skipWhileTripsCached = createRequestsCacheOperator(store);\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TripsRepository {\r\n name = store.name;\r\n\r\n activeTrip$ = store.pipe(selectActiveEntity()).pipe(\r\n map((active) => {\r\n if (\r\n active &&\r\n !active.isOrder &&\r\n (!active?.parkedAt ||\r\n (active.parkedAt &&\r\n active.resumedAt &&\r\n active.parkedAt < active.resumedAt))\r\n ) {\r\n return active;\r\n }\r\n return;\r\n })\r\n );\r\n lastActiveEvent$ = this.activeTrip$.pipe(\r\n map(\r\n (trip) =>\r\n trip &&\r\n sortBy(\r\n trip.tripEvents.filter((x) => x.type !== 'Weighing'),\r\n {\r\n parameter: { property: 'eventTime' },\r\n direction: 'asc',\r\n }\r\n ).pop()\r\n )\r\n );\r\n trips$ = store.pipe(selectAllEntities());\r\n parkedTrips$ = (id: string) =>\r\n store\r\n .pipe(selectAllEntities())\r\n .pipe(\r\n map((x) =>\r\n x.filter(\r\n (a) =>\r\n a.userId === id &&\r\n ((a.parkedAt && !a.resumedAt) ||\r\n (a.parkedAt && a.resumedAt && a.parkedAt > a.resumedAt))\r\n )\r\n )\r\n );\r\n\r\n one = (id: string) => store.pipe(selectEntity(id));\r\n events$ = this.trips$.pipe(\r\n map((trips) =>\r\n sortBy(\r\n trips.reduce(\r\n (events, trip) => events.concat(trip.tripEvents),\r\n [] as TripEvent[]\r\n ),\r\n { parameter: { property: 'eventTime' }, direction: 'desc' }\r\n )\r\n )\r\n );\r\n\r\n clear(): void {\r\n store.update(deleteAllEntities());\r\n }\r\n\r\n tripsByUser$ = (id: string) =>\r\n this.trips$.pipe(map((x) => x.filter((a) => a.userId == id)));\r\n\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(this.name),\r\n map((x) => x.value === 'pending')\r\n );\r\n isLoadingCurrent$ = store.pipe(\r\n selectRequestStatus(`${this.name}_current`),\r\n map((x) => x.value === 'pending')\r\n );\r\n isAdding$ = store.pipe(\r\n selectRequestStatus(`${this.name}_add`),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n isLoadingOne$ = (id: Trip['id']) =>\r\n store.pipe(\r\n selectRequestStatus(id),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n setActiveId(id: Trip['id'] | null) {\r\n store.update(setActiveId(id));\r\n }\r\n\r\n getResumedTrips() {\r\n return store\r\n .query(getAllEntities())\r\n .filter((a) => a.parkedAt && a.resumedAt && a.parkedAt < a.resumedAt);\r\n }\r\n\r\n getOne(id: string) {\r\n return store.query(getEntity(id));\r\n }\r\n\r\n // getParkedTrips () {\r\n // return store.query(getAllEntities()).filter(x => x.parkedAt && !x.resumedAt || x.parkedAt && x.resumedAt && x.parkedAt > x.resumedAt);\r\n // }\r\n\r\n setTrips(trips: Trip[]) {\r\n store.update(\r\n updateRequestCache(store.name),\r\n upsertEntities(trips),\r\n updateRequestsStatus([store.name], 'success')\r\n );\r\n }\r\n\r\n upsertTrip(trip: Trip, customStatus?: string) {\r\n if (!trip.isOrder) {\r\n store.update(\r\n updateRequestCache(trip.id),\r\n upsertEntities([trip]),\r\n updateRequestsStatus([customStatus ?? trip.id], 'success')\r\n );\r\n }\r\n }\r\n\r\n getTrip(id: string) {\r\n return store.query(getEntity(id));\r\n }\r\n\r\n getActiveTrip() {\r\n let active = store.query(getActiveEntity());\r\n if (\r\n active &&\r\n (!active?.parkedAt ||\r\n (active.parkedAt &&\r\n active.resumedAt &&\r\n active.parkedAt < active.resumedAt))\r\n ) {\r\n return active;\r\n }\r\n return;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SortOption, sortBy } from '../modules/shared/pipes/sort.pipe';\r\nimport { BaseRepository } from './abstract/base.repository';\r\nimport { Accessory } from './accessories.repository';\r\nimport { Cleaning } from './cleaning.repository';\r\nimport { Company } from './companies.repository';\r\nimport { Product } from './products.repository';\r\nimport { TripEvent } from './trips.repository';\r\nimport { Vehicle } from './vehicles.repository';\r\nimport { Trailer } from './trailers.repository';\r\nimport {\r\n withEntities,\r\n selectAllEntities,\r\n withActiveId,\r\n selectActiveEntity,\r\n setActiveId,\r\n upsertEntities,\r\n selectEntity,\r\n getEntity,\r\n getActiveEntity,\r\n deleteAllEntities,\r\n deleteEntities,\r\n getAllEntities,\r\n} from '@ngneat/elf-entities';\r\nimport {\r\n withRequestsCache,\r\n withRequestsStatus,\r\n createRequestsStatusOperator,\r\n createRequestsCacheOperator,\r\n updateRequestCache,\r\n updateRequestsStatus,\r\n selectRequestStatus,\r\n} from '@ngneat/elf-requests';\r\nimport { createStore } from '@ngneat/elf';\r\nimport { map } from 'rxjs/operators';\r\n\r\nexport interface Order {\r\n id: string;\r\n vehicleId?: string | null;\r\n trailerId?: string | null;\r\n vehicle?: Vehicle | null;\r\n trailer?: Trailer | null;\r\n createdAt?: Date;\r\n isApproved?: boolean;\r\n isExported?: boolean;\r\n tripEvents: TripEvent[];\r\n userId?: string | null;\r\n driverIds?: string[] | null;\r\n userName?: string;\r\n isOrder?: boolean;\r\n isRejected?: boolean;\r\n parentId?: string | null;\r\n pickUpAddress?: string;\r\n deliveryAddress?: string;\r\n plannedToStartAt?: Date;\r\n plannedToEndAt?: Date;\r\n startedAt?: Date;\r\n rejectedAt?: Date;\r\n contactPerson?: string;\r\n reference?: string;\r\n comment?: string;\r\n note?: string;\r\n tenantNote?: string;\r\n clientId?: string;\r\n vendorId?: string;\r\n accessoryId?: string;\r\n cleaningId?: string;\r\n client?: Company;\r\n vendor?: Company;\r\n accessory?: Accessory;\r\n cleaning?: Cleaning;\r\n productIds?: string[];\r\n products?: Product[];\r\n weight?: number;\r\n casualUpdate?: boolean;\r\n familyNumber?: number;\r\n rejectedById?: string;\r\n rejectedByName?: string;\r\n type?: string;\r\n curTime?: Date;\r\n parkedAt?: Date;\r\n resumedAt?: Date | null;\r\n parkDuration?: number;\r\n isReccurence?: boolean;\r\n reccurence?: any;\r\n commentPhotos?: CommentPhotoDto[];\r\n}\r\n\r\nexport interface CommentPhotoDto {\r\n id?: string;\r\n tripId?: string;\r\n imagePath: string;\r\n}\r\n\r\nexport interface OrderFamily {\r\n parentId: string;\r\n children: Order[];\r\n}\r\n\r\nexport interface OrderFilter {\r\n date_from: Date;\r\n date_to: Date;\r\n search: string;\r\n driverIds: string[];\r\n}\r\n\r\nexport const ordersSortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Date:Date`, property: 'plannedToStartAt' },\r\n {\r\n label: $localize`:Sort label Description:Description`,\r\n property: 'description',\r\n },\r\n];\r\n\r\nconst store = createStore(\r\n { name: 'orders' },\r\n withEntities<Order>(),\r\n withActiveId(),\r\n withRequestsCache(),\r\n withRequestsStatus()\r\n);\r\n\r\nexport const trackOrdersRequestsStatus = createRequestsStatusOperator(store);\r\nexport const skipWhileOrdersCached = createRequestsCacheOperator(store);\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class OrdersRepository {\r\n name = store.name;\r\n\r\n activeOrder$ = store.pipe(selectActiveEntity()).pipe(\r\n map((active) => {\r\n return active;\r\n })\r\n );\r\n\r\n lastActiveEvent$ = this.activeOrder$.pipe(\r\n map(\r\n (order) =>\r\n order &&\r\n sortBy(order.tripEvents, {\r\n parameter: { property: 'eventTime' },\r\n direction: 'asc',\r\n }).pop()\r\n )\r\n );\r\n orders$ = store.pipe(selectAllEntities());\r\n\r\n parkedOrders$ = (id: string) =>\r\n store\r\n .pipe(selectAllEntities())\r\n .pipe(\r\n map((x) =>\r\n this.uniqueList(\r\n x.filter(\r\n (a) =>\r\n a.userId === id &&\r\n ((a.parkedAt && !a.resumedAt) ||\r\n (a.parkedAt && a.resumedAt && a.parkedAt > a.resumedAt))\r\n )\r\n )\r\n )\r\n );\r\n\r\n uniqueList(list: Order[]): Order[] {\r\n return Array.from(new Set(list.map((item) => item.id)))\r\n .map((id) => list.find((item) => item.id === id))\r\n .filter((item) => item !== undefined) as Order[];\r\n }\r\n\r\n getAllOrders() {\r\n return store.query(getAllEntities());\r\n }\r\n getParkedOrders() {\r\n return store\r\n .query(getAllEntities())\r\n .filter(\r\n (x) =>\r\n (x.parkedAt && !x.resumedAt) ||\r\n (x.parkedAt && x.resumedAt && x.parkedAt > x.resumedAt)\r\n );\r\n }\r\n events$ = this.orders$.pipe(\r\n map((orders) =>\r\n sortBy(\r\n orders.reduce(\r\n (events, order) => events.concat(order.tripEvents),\r\n [] as TripEvent[]\r\n ),\r\n { parameter: { property: 'eventTime' }, direction: 'desc' }\r\n )\r\n )\r\n );\r\n\r\n clear(): void {\r\n store.update(deleteAllEntities());\r\n }\r\n\r\n one = (id: string) => store.pipe(selectEntity(id));\r\n ordersByUser$ = (id: string) =>\r\n this.orders$.pipe(\r\n map((x) =>\r\n x.filter(\r\n (a) =>\r\n (a.driverIds?.find((d) => d === id) || a.userId === id) &&\r\n !a.isRejected &&\r\n !a.tripEvents.find((y) => y.type === 'TripEnd')\r\n )\r\n )\r\n );\r\n getOrdersForNow = (id: string) =>\r\n this.getAllOrders().filter(\r\n (a) =>\r\n (a.driverIds?.includes(id) || a.userId === id) &&\r\n !a.isRejected &&\r\n !a.tripEvents.find((y) => y.type === 'TripEnd')\r\n );\r\n\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(this.name),\r\n map((x) => x.value === 'pending')\r\n );\r\n isLoadingCurrent$ = store.pipe(\r\n selectRequestStatus(`${this.name}_current`),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n isLoadingCurrentDriver$ = store.pipe(\r\n selectRequestStatus(`${store.name}_current_driver`),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n isAdding$ = store.pipe(\r\n selectRequestStatus(`${this.name}_add`),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n isLoadingOne$ = (id: Order['id']) =>\r\n store.pipe(\r\n selectRequestStatus(id),\r\n map((x) => x.value === 'pending')\r\n );\r\n\r\n setActiveId(id: Order['id'] | null) {\r\n store.update(setActiveId(id));\r\n }\r\n\r\n setOrders(orders: Order[]) {\r\n store.update(\r\n updateRequestCache(store.name),\r\n upsertEntities(orders),\r\n updateRequestsStatus([store.name], 'success')\r\n );\r\n }\r\n\r\n setOrdersForDriver(orders: Order[]) {\r\n store.update(\r\n updateRequestCache(`${store.name}_current_driver`),\r\n upsertEntities(orders),\r\n updateRequestsStatus([`${store.name}_current_driver`], 'success')\r\n );\r\n }\r\n\r\n upsertOrder(order: Order, customStatus?: string) {\r\n store.update(\r\n updateRequestCache(order.id),\r\n upsertEntities([order]),\r\n updateRequestsStatus([customStatus ?? order.id], 'success')\r\n );\r\n }\r\n\r\n getOrder(id: string) {\r\n return store.query(getEntity(id));\r\n }\r\n\r\n getActiveOrder() {\r\n return store.query(getActiveEntity());\r\n }\r\n\r\n remove(id: string): void {\r\n store.update(\r\n updateRequestCache(id),\r\n deleteEntities(id),\r\n updateRequestsStatus([id], 'success')\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BaseRepository } from './abstract/base.repository';\r\nimport { TripEvent } from './trips.repository';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TripEventsRepository extends BaseRepository<TripEvent> {\r\n\r\n constructor() {\r\n super(\r\n 'tripevents', \r\n [ { label: 'Date', property: 'eventTime' } ],\r\n { parameter: { property: 'eventTime' }, direction: 'desc' }\r\n );\r\n }\r\n\r\n}","import { Injectable } from '@angular/core';\r\nimport * as dayjs from 'dayjs';\r\nimport * as localeData from \"dayjs/plugin/localeData\";\r\nimport * as utc from \"dayjs/plugin/utc\";\r\nimport * as calendar from 'dayjs/plugin/calendar';\r\nimport * as fromNow from 'dayjs/plugin/relativeTime'\r\nimport * as duration from 'dayjs/plugin/duration';\r\nimport * as enGb from 'dayjs/locale/en-gb';\r\nimport * as da from 'dayjs/locale/da';\r\nimport { EnvState } from '../helpers/env-state';\r\n\r\nconst SUPPORTED = [ 'en-gb', 'da' ];\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DayjsService {\r\n\r\n constructor(env: EnvState) {\r\n const locale = env.locale;\r\n if (!SUPPORTED.includes(locale)) {\r\n throw `Locale <${locale}> is not included in dayjs.service.ts`;\r\n }\r\n dayjs.extend(duration);\r\n dayjs.extend(fromNow);\r\n dayjs.extend(calendar);\r\n dayjs.extend(utc);\r\n dayjs.extend(localeData);\r\n switch (locale) {\r\n case 'en-gb': dayjs.locale(enGb, undefined, true); break;\r\n case 'da': dayjs.locale(da, undefined, true); break;\r\n }\r\n dayjs.locale(locale);\r\n }\r\n\r\n dayjs = dayjs;\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, of, OperatorFunction } from 'rxjs';\r\nimport { catchError, filter, map, switchMap, tap } from 'rxjs/operators';\r\nimport { ScheduledForRetryError } from '../modules/core/interceptors/retry.interceptor';\r\nimport { DayjsService } from '../modules/shared/services/dayjs.service';\r\nimport { sortBy } from '../modules/shared/pipes/sort.pipe';\r\nimport {\r\n buildIdPromise,\r\n buildUrlPromise,\r\n RequestsRepository,\r\n} from './requests.repository';\r\nimport { TrailersRepository } from './trailers.repository';\r\nimport { TripEventsRepository } from './tripevents.repository';\r\nimport {\r\n BulkEProduct,\r\n PushedInvoiceResponse,\r\n skipWhileTripsCached,\r\n StringContainer,\r\n trackTripsRequestsStatus,\r\n Trip,\r\n TripDto,\r\n TripEvent,\r\n TripEventFile,\r\n TripEventType,\r\n TripsRepository,\r\n} from './trips.repository';\r\nimport { VehiclesRepository } from './vehicles.repository';\r\nimport { FilterOptions } from './workdays.repository';\r\nimport { DeletedTripsRepository } from './deletedtrips.repository';\r\nimport {\r\n Order,\r\n OrdersRepository,\r\n trackOrdersRequestsStatus,\r\n} from './orders.repository';\r\nimport { TripLogDto } from './models/trip/TripLogDto';\r\nimport { TripLogFilterDto } from './models/shared/TripLogFilterDto';\r\nimport { TenantNoteChangeDto } from './models/shared/TenantNoteChangeDto';\r\nimport { TripPhotoUrlDto } from './models/trip/TripPhotoUrlDto';\r\nimport { TripEventClientDto } from './models/trip/TripEventClientDto';\r\n\r\nconst API = '/api/trips';\r\nconst EVENTS_API = '/api/tripevents';\r\nconst SUMMARY_API = '/api/usersSummary';\r\nconst OFFLINE_ERROR = $localize`:Could not load info while offline:Not available offline`;\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TripsService {\r\n constructor(\r\n private http: HttpClient,\r\n private repo: TripsRepository,\r\n private ordersRepo: OrdersRepository,\r\n private tripEventsRepo: TripEventsRepository,\r\n private requestsRepo: RequestsRepository,\r\n private vehicles: VehiclesRepository,\r\n private trailers: TrailersRepository,\r\n public ngDay: DayjsService\r\n ) {}\r\n\r\n loadTripLogsOverview(\r\n filterOptions: FilterOptions,\r\n isEconomic: boolean = false\r\n ) {\r\n let filter: TripLogFilterDto = {\r\n dateTo: filterOptions.dateTo ?? '',\r\n dateFrom: filterOptions.dateFrom ?? '',\r\n clientId: filterOptions.clientSelected\r\n ? filterOptions.clientSelected\r\n : undefined,\r\n driverId: filterOptions.driverSelected\r\n ? filterOptions.driverSelected\r\n : undefined,\r\n productIds: filterOptions.productSelected\r\n ? filterOptions.productSelected\r\n : undefined,\r\n isApproved: filterOptions.isApproved ?? false,\r\n isParkedOverview: filterOptions.isParkedOverview,\r\n isEconomic: isEconomic,\r\n };\r\n return this.http.put<TripLogDto[]>(\r\n `${SUMMARY_API}/triplogsoverview`,\r\n filter\r\n );\r\n }\r\n\r\n updateApproveStatus(id: string) {\r\n return this.http.patch<Trip>(`${API}/${id}/changeApproveStatus`, {});\r\n }\r\n\r\n updateTenantNote(request: TenantNoteChangeDto) {\r\n const query = [`tenantNote=${request.tenantNote}`];\r\n return this.http.patch(\r\n `${API}/tenantNote/${request.id}?${query.join('&')}`,\r\n {}\r\n );\r\n }\r\n\r\n getEventClients(id: string) {\r\n return this.http.get<TripEventClientDto[]>(`${API}/getEventsClients/${id}`);\r\n }\r\n\r\n addTripEventPhoto(tripId: string, tripEventId?: string, files?: File[]) {\r\n if (!files || !files.length) {\r\n return of({ tripId });\r\n }\r\n const formData = new FormData();\r\n if (files && files.length > 0) {\r\n for (let f of files) {\r\n formData.append('files', f);\r\n }\r\n }\r\n const query = [`tripEventId=${tripEventId ?? ''}`];\r\n\r\n return this.http.post(\r\n `${API}/addphoto/${tripId}?${query.join('&')}`,\r\n formData\r\n );\r\n }\r\n\r\n getPhotos(id: string, type: TripEventType) {\r\n const query = [`type=${type}`];\r\n return this.http.get<TripPhotoUrlDto[]>(\r\n `${API}/getphotos/${id}?${query.join('&')}`\r\n );\r\n }\r\n\r\n movePhotoEvent(event: TripPhotoUrlDto) {\r\n return this.http.patch(`${API}/movephoto/${event.id}`, {});\r\n }\r\n\r\n //Not refactored//\r\n\r\n loadOneTemp(id: string) {\r\n return this.http.get<Trip>(`${API}/temp/${id}`);\r\n }\r\n\r\n load() {\r\n return this.http.get<Trip[]>(API).pipe(\r\n tap((res) => this.repo.setTrips(res)),\r\n trackTripsRequestsStatus(this.repo.name),\r\n skipWhileTripsCached(this.repo.name)\r\n );\r\n }\r\n\r\n loadOverview() {\r\n return this.http.get<Trip[]>(`${SUMMARY_API}/tripsoverview`).pipe(\r\n tap((res) => this.repo.setTrips(res)),\r\n trackTripsRequestsStatus(this.repo.name)\r\n //skipWhileTripsCached(this.repo.name)\r\n );\r\n }\r\n\r\n loadForGoPage() {\r\n return this.http.get<Trip[]>(`${SUMMARY_API}/gopage`).pipe(\r\n tap((res) => this.repo.setTrips(res)),\r\n trackTripsRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n loadCurrent() {\r\n return this.http.get<Trip>(`${API}/current`).pipe(\r\n tap((trip) => {\r\n if (trip) {\r\n this.repo.upsertTrip(trip, `${this.repo.name}_current`);\r\n this.repo.setActiveId(trip.id);\r\n }\r\n }),\r\n trackTripsRequestsStatus(`${this.repo.name}_current`)\r\n );\r\n }\r\n\r\n bulkUpdate(dto: BulkEProduct) {\r\n return this.http.patch(`${API}/bulkeconomicupdate`, dto);\r\n }\r\n\r\n unexport(id: string) {\r\n return this.http.get<Trip>(`${API}/unexport/${id}`);\r\n }\r\n\r\n updateOfficeNote(id: string, note?: string) {\r\n return this.http.patch<Trip>(`${API}/${id}/officenote`, { url: note });\r\n }\r\n\r\n updateOfficeAddress(\r\n id: string,\r\n pickUpAddress?: string,\r\n deliveryAddress?: string\r\n ) {\r\n return this.http.patch<Trip>(`${API}/${id}/officeaddress`, {\r\n pickUpAddress: pickUpAddress,\r\n deliveryAddress: deliveryAddress,\r\n });\r\n }\r\n\r\n parkTrip(id: string, park: string) {\r\n return this.http\r\n .patch<Trip>(`${API}/${id}/parktrip/${park}`, { park: park })\r\n .pipe(\r\n tap((trip) => {\r\n if (trip && !trip.isOrder) {\r\n this.repo.upsertTrip(trip);\r\n this.repo.setActiveId(null);\r\n }\r\n }),\r\n trackTripsRequestsStatus(id)\r\n );\r\n }\r\n\r\n resumeTrip(id: string, resume: string) {\r\n return this.http\r\n .patch<Trip>(`${API}/${id}/resumetrip/${resume}`, { resume: resume })\r\n .pipe(\r\n tap((trip) => {\r\n if (trip && !trip.isOrder) {\r\n this.repo.setActiveId(trip.id);\r\n this.repo.upsertTrip(trip);\r\n }\r\n }),\r\n trackTripsRequestsStatus(id)\r\n );\r\n }\r\n\r\n eexport(ids: string[], union: boolean = false) {\r\n return this.http.patch<PushedInvoiceResponse[]>(\r\n `/api/sync/eexport/${union}`,\r\n ids\r\n );\r\n }\r\n\r\n loadOne(id: string) {\r\n return this.http.get<Trip>(`${API}/${id}`).pipe(\r\n tap((trip) => {\r\n if (trip) {\r\n this.repo.upsertTrip(trip);\r\n }\r\n }),\r\n trackTripsRequestsStatus(id)\r\n );\r\n }\r\n\r\n addPhoto(id?: string, files?: File[] | null) {\r\n if (!files || !files.length) {\r\n // No photos included - skip upload\r\n return of({ id });\r\n }\r\n const formData = new FormData();\r\n if (files && files.length > 1) {\r\n for (let f of files) {\r\n formData.append('files', f);\r\n }\r\n } else if (files && files.length === 1) {\r\n formData.append('files', files[0]);\r\n }\r\n return this.http.post<Trip>(`${API}/${id}/addphoto`, formData).pipe(\r\n tap((trip) => this.repo.upsertTrip(trip)),\r\n tap((trip) => trackTripsRequestsStatus(trip.id))\r\n );\r\n }\r\n\r\n updateApprove(entity: TripDto) {\r\n return this.http\r\n .patch<Trip>(`${API}/${entity.tripId}/isApproved/${entity.isApproved}`, {\r\n isApproved: entity.isApproved,\r\n })\r\n .pipe(tap(), trackTripsRequestsStatus(entity.tripId!));\r\n }\r\n\r\n start(\r\n event: Partial<TripEvent>,\r\n vehicleId: string,\r\n trailerId?: string,\r\n userId?: string,\r\n files?: File[] | null\r\n ) {\r\n const startEvent = {\r\n ...event,\r\n type: 'TripStart' as TripEventType,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n createdAt: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n const pickUpAddress = localStorage.getItem('pickupaddress') || '';\r\n const deliveryAddress = localStorage.getItem('deliveryaddress') || '';\r\n return this.http\r\n .post<Trip>(API, {\r\n vehicleId,\r\n trailerId,\r\n pickUpAddress,\r\n deliveryAddress,\r\n type: 'Start',\r\n comment: event.comment,\r\n reference: event.reference,\r\n plannedToStartAt: event.eventTime,\r\n clientId: event.clientId,\r\n weight: event.weight,\r\n products: event.products,\r\n })\r\n .pipe(\r\n switchMap((trip) =>\r\n this.http.post<Trip>(`${API}/${trip.id}/events`, startEvent)\r\n ),\r\n this.processOfflineSubmit(startEvent, vehicleId, trailerId),\r\n switchMap((trip) => {\r\n if (!files || !files.length) {\r\n // No photos included - skip upload\r\n return of(trip);\r\n }\r\n const lastCreatedEvent = sortBy(\r\n trip.tripEvents.filter((x) => x.type !== 'Total'),\r\n {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n }\r\n )[0];\r\n const formData = new FormData();\r\n files.forEach((x) => formData.append('files', x));\r\n return this.http.post<Trip>(\r\n `${EVENTS_API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n }),\r\n tap((trip) => {\r\n if (!trip.userId && userId) {\r\n trip.userId = userId;\r\n }\r\n this.repo.upsertTrip(trip);\r\n this.repo.setActiveId(trip.id);\r\n trackTripsRequestsStatus(trip.id);\r\n this.tripEventsRepo.clearPages();\r\n })\r\n );\r\n }\r\n\r\n takephoto(tripEvent: string, files?: File[] | null) {\r\n if (!files || !files.length) {\r\n // No photos included - skip upload\r\n return of(tripEvent);\r\n }\r\n const formData = new FormData();\r\n if (files && files.length > 1) {\r\n for (let f of files) {\r\n formData.append('files', f);\r\n }\r\n } else if (files && files.length === 1) {\r\n formData.append('files', files[0]);\r\n }\r\n\r\n return this.http.patch<Trip>(`${EVENTS_API}/${tripEvent}`, formData);\r\n }\r\n\r\n tripAction(\r\n eventType: string,\r\n trip: Trip,\r\n event: Partial<TripEvent>,\r\n files?: File[] | null\r\n ) {\r\n const tripEvent = {\r\n ...event,\r\n type: eventType as TripEventType,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n createdAt: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n return this.http.post<Trip>(`${API}/${trip.id}/events`, tripEvent).pipe(\r\n this.processOfflineSubmit(tripEvent),\r\n switchMap((trip) => {\r\n if (!files || !files.length) {\r\n return of(trip);\r\n }\r\n const lastCreatedEvent = sortBy(\r\n trip.tripEvents.filter((x) => x.type !== 'Total'),\r\n {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n }\r\n )[0];\r\n const formData = new FormData();\r\n files.forEach((x) => formData.append('files', x));\r\n return this.http.post<Trip>(\r\n `${EVENTS_API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n }),\r\n tap((trip) => {\r\n this.repo.upsertTrip(trip);\r\n if (eventType == 'TripEnd') {\r\n this.repo.setActiveId(null);\r\n }\r\n this.tripEventsRepo.clearPages();\r\n }),\r\n trackTripsRequestsStatus(trip.id)\r\n );\r\n }\r\n\r\n weighing(trip: Trip, event?: Partial<TripEvent>, files?: File[] | null) {\r\n const weighing = {\r\n ...event,\r\n type: 'Weighing' as TripEventType,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n return this.http.post<Trip>(`${API}/${trip?.id}/events`, weighing).pipe(\r\n this.processOfflineSubmit(weighing),\r\n switchMap((trip) => {\r\n if (!files || !files.length) {\r\n return of(trip);\r\n }\r\n const lastCreatedEvent = sortBy(\r\n trip.tripEvents.filter((x) => x.type !== 'Total'),\r\n {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n }\r\n )[0];\r\n const formData = new FormData();\r\n if (files && files.length > 1) {\r\n for (let f of files) {\r\n formData.append('files', f);\r\n }\r\n } else if (files && files.length === 1) {\r\n formData.append('files', files[0]);\r\n }\r\n return this.http.post<TripEvent>(\r\n `${API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n })\r\n );\r\n }\r\n\r\n addNote(tripEventId: string, note: string): any {\r\n var text: StringContainer = { text: note };\r\n let tevent = this.tripEventsRepo.getOne(tripEventId);\r\n if (tevent) {\r\n tevent.note = note;\r\n }\r\n return this.http.patch<Trip>(`${API}/${tripEventId}/addnote`, text).pipe(\r\n tap((x) => {\r\n if (tevent && !x.isOrder) {\r\n x.tripEvents.push(tevent);\r\n this.repo.upsertTrip(x);\r\n }\r\n }),\r\n tap((x) => {\r\n if (tevent && !x.isOrder) {\r\n this.tripEventsRepo.upsert(tevent);\r\n }\r\n }),\r\n tap((x) => {\r\n let o = x as Order;\r\n if (o && o.isOrder) {\r\n o.note = note;\r\n if (tevent) {\r\n o.tripEvents.push(tevent);\r\n }\r\n this.ordersRepo.upsertOrder(o);\r\n }\r\n }),\r\n\r\n this.processOfflineNoteSubmit(tripEventId, note)\r\n );\r\n }\r\n\r\n private processOfflineNoteSubmit(tripEventId: string, note: string) {\r\n this.requestsRepo.all$.subscribe((x) => {\r\n if (x) {\r\n x.forEach((x) => {\r\n if (x.url.includes(tripEventId)) {\r\n x.body.note = note;\r\n }\r\n });\r\n }\r\n });\r\n return catchError((err) => {\r\n if (err instanceof ScheduledForRetryError) {\r\n if (err.request.url.includes(API)) {\r\n return of<TripEvent>();\r\n }\r\n }\r\n return err;\r\n });\r\n }\r\n\r\n changePhotoEvent(url: string) {\r\n return this.http\r\n .patch<Trip>(`${API}/photos`, { url: url })\r\n .pipe(tap((trip) => this.repo.upsertTrip(trip)));\r\n }\r\n\r\n export(): Observable<string> {\r\n return this.http\r\n .get<Blob>(`${API}/csv`, { responseType: 'blob' as any })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n private processOfflineSubmit(\r\n event: Partial<TripEvent>,\r\n vehicleId: string = '',\r\n trailerId?: string\r\n ): OperatorFunction<Trip, Trip> {\r\n return catchError((err) => {\r\n if (err instanceof ScheduledForRetryError) {\r\n if (err.request.url.endsWith(API)) {\r\n // trip POST request failed\r\n // create additional request for the event\r\n const tripEventRequest = this.requestsRepo.add({\r\n body: { ...event, eventTime: this.ngDay.dayjs.utc().toDate() },\r\n url: `${API}/${buildIdPromise(err.request.id)}/events`,\r\n method: 'POST',\r\n userId: err.request.userId,\r\n createdAt: new Date(),\r\n responseIdPath: 'tripEvents.0.id',\r\n });\r\n const vehiclePlaceholder = {\r\n id: '',\r\n name: '',\r\n numberplate: OFFLINE_ERROR,\r\n createdAt: err.request.createdAt,\r\n isBeingUsed: false,\r\n };\r\n return of<Trip>({\r\n id: buildIdPromise(err.request.id),\r\n vehicle: this.vehicles.getOne(vehicleId) || vehiclePlaceholder,\r\n trailer: trailerId\r\n ? this.trailers.getOne(trailerId) || vehiclePlaceholder\r\n : null,\r\n createdAt: err.request.createdAt,\r\n isApproved: err.request.body,\r\n tripEvents: [\r\n {\r\n ...tripEventRequest.body,\r\n id: buildIdPromise(tripEventRequest.id),\r\n },\r\n ],\r\n });\r\n }\r\n // trip was created, but event has failed\r\n // pull trip id from the failed request's URL\r\n const tripIdFromUrl = err.request.url.split('/').slice(-2)[0];\r\n const tripState = this.repo.getTrip(tripIdFromUrl);\r\n if (tripState) {\r\n this.requestsRepo.update(err.request.id, {\r\n responseIdPath: `tripEvents.${tripState.tripEvents.length}.id`,\r\n });\r\n tripState.tripEvents.push({\r\n ...err.request.body,\r\n id: buildIdPromise(err.request.id),\r\n });\r\n return of(tripState);\r\n }\r\n }\r\n throw err;\r\n });\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, OperatorFunction, combineLatest, of } from 'rxjs';\r\nimport { catchError, map, switchMap, tap } from 'rxjs/operators';\r\nimport { BaseService } from './abstract/base.service';\r\nimport {\r\n CommentPhotoDto,\r\n Order,\r\n OrdersRepository,\r\n skipWhileOrdersCached,\r\n trackOrdersRequestsStatus,\r\n} from './orders.repository';\r\nimport { TripEventsRepository } from './tripevents.repository';\r\nimport {\r\n buildIdPromise,\r\n buildUrlPromise,\r\n RequestsRepository,\r\n} from './requests.repository';\r\nimport { VehiclesRepository } from './vehicles.repository';\r\nimport { TrailersRepository } from './trailers.repository';\r\nimport { DayjsService } from '../modules/shared/services/dayjs.service';\r\nimport {\r\n Trip,\r\n TripEvent,\r\n TripEventType,\r\n TripsRepository,\r\n trackTripsRequestsStatus,\r\n} from './trips.repository';\r\nimport { sortBy } from '../modules/shared/pipes/sort.pipe';\r\nimport { ScheduledForRetryError } from '../modules/core/interceptors/retry.interceptor';\r\nimport { FilterOptions } from './workdays.repository';\r\nconst OFFLINE_ERROR = $localize`:Could not load info while offline:Not available offline`;\r\nconst API = '/api/orders';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class OrdersService {\r\n constructor(\r\n public http: HttpClient,\r\n public repo: OrdersRepository,\r\n private tripRepo: TripsRepository,\r\n private tripEventsRepo: TripEventsRepository,\r\n private requestsRepo: RequestsRepository,\r\n private vehicles: VehiclesRepository,\r\n private trailers: TrailersRepository,\r\n public ngDay: DayjsService\r\n ) {}\r\n\r\n loadOrders(\r\n from?: Date | string,\r\n to?: Date | string,\r\n search?: string\r\n ): Observable<Order[]> {\r\n const query = [\r\n `from=${from || ''}`,\r\n `to=${to || ''}`,\r\n `search=${search || ''}`,\r\n ];\r\n return this.http.get<Order[]>(`${API}/allorders?${query.join('&')}`).pipe(\r\n tap((res) => {\r\n this.repo.clear(), this.repo.setOrders(res);\r\n //skipWhileOrdersCached(this.repo.name);\r\n })\r\n );\r\n }\r\n\r\n add(model: Partial<Order>): Observable<Order> {\r\n const timeOffset = new Date().getTimezoneOffset();\r\n return this.http\r\n .post<Order>(`${API}/createOrder?timeOffset=${timeOffset}`, model)\r\n .pipe(\r\n tap((res) => {\r\n if (!model.isReccurence) {\r\n this.repo.upsertOrder(res);\r\n }\r\n }),\r\n trackOrdersRequestsStatus('add')\r\n );\r\n }\r\n update(id: string, model: Partial<Order>): Observable<Order> {\r\n model.type = 'Update';\r\n return this.http.patch<Order>(`${API}/${id}`, model).pipe(\r\n tap((res) => {\r\n this.repo.upsertOrder(res), trackOrdersRequestsStatus(res.id);\r\n })\r\n );\r\n }\r\n\r\n updateParkedDriver(id: string, driverId: string) {\r\n return this.http\r\n .patch<Order>(`${API}/${id}/updateparkeddriver/${driverId}`, {\r\n driverId: driverId,\r\n })\r\n .pipe(\r\n tap((trip) => {\r\n this.repo.upsertOrder(trip);\r\n }),\r\n trackOrdersRequestsStatus(id)\r\n );\r\n }\r\n\r\n updateParkedDriverWidthChilds(id: string, driverId: string) {\r\n return this.http.get<Order>(\r\n `${API}/${id}/updateparkeddriverwudthchilds/${driverId}`\r\n );\r\n }\r\n\r\n parkOrder(id: string, park: string) {\r\n return this.http\r\n .patch<Order>(`${API}/${id}/parktrip/${park}`, { park: park })\r\n .pipe(\r\n tap((trip) => {\r\n if (trip && trip.isOrder) {\r\n this.repo.upsertOrder(trip);\r\n this.repo.setActiveId(null);\r\n }\r\n }),\r\n trackOrdersRequestsStatus(id)\r\n );\r\n }\r\n\r\n resumeOrder(id: string, resume: string) {\r\n return this.http\r\n .patch<Order>(`${API}/${id}/resumetrip/${resume}`, { resume: resume })\r\n .pipe(\r\n tap((order) => {\r\n if (order && order.isOrder) {\r\n this.repo.setActiveId(order.id);\r\n this.repo.upsertOrder(order);\r\n }\r\n }),\r\n trackOrdersRequestsStatus(id)\r\n );\r\n }\r\n\r\n updateAll(id: string, model: Partial<Order>): Observable<Order[]> {\r\n return this.http.patch<Order[]>(`${API}/trips/${id}`, model).pipe(\r\n tap((res) => {\r\n res.forEach((element) => {\r\n this.repo.upsertOrder(element), trackOrdersRequestsStatus(element.id);\r\n });\r\n })\r\n );\r\n }\r\n updateParentId(id: string, parentId: string): Observable<Order> {\r\n return this.http\r\n .get<Order>(`${API}/parentchange/${id}?&parentId=${parentId}`)\r\n .pipe(\r\n tap((res) => {\r\n this.repo.upsertOrder(res), trackOrdersRequestsStatus(res.id);\r\n })\r\n );\r\n }\r\n\r\n moveImageToStart(commentPhoto: CommentPhotoDto) {\r\n return this.http.put<Order>(`${API}/movetostart`, commentPhoto).pipe(\r\n tap((res) => {\r\n this.repo.upsertOrder(res), trackOrdersRequestsStatus(res.id);\r\n })\r\n );\r\n }\r\n\r\n moveImageToWeight(commentPhoto: CommentPhotoDto, clientId?: string) {\r\n const query = [`clientId=${clientId}`];\r\n return this.http\r\n .put<Order>(`${API}/movetoweight?${query.join('&')}`, commentPhoto)\r\n .pipe(\r\n tap((res) => {\r\n this.repo.upsertOrder(res), trackOrdersRequestsStatus(res.id);\r\n })\r\n );\r\n }\r\n\r\n delete(\r\n id: string,\r\n driverId?: string | null,\r\n deleteOnlyOne: boolean = false,\r\n forOneDriver: boolean = false\r\n ): Observable<Order> {\r\n return this.http\r\n .get<Order>(\r\n `${API}/remove/${id}?&driverId=${\r\n driverId ?? ''\r\n }&onlyone=${deleteOnlyOne}&forOneDriver=${forOneDriver}`\r\n )\r\n .pipe(\r\n tap((res) => {\r\n if (res) {\r\n this.repo.upsertOrder(res), trackOrdersRequestsStatus(res.id);\r\n } else if (forOneDriver) {\r\n let currentOrder = this.repo.getOrder(id);\r\n const indefOfDriverToRemove = currentOrder?.driverIds?.indexOf(\r\n driverId!\r\n );\r\n if (indefOfDriverToRemove != -1) {\r\n currentOrder?.driverIds?.splice(indefOfDriverToRemove!, 1);\r\n this.repo.upsertOrder(currentOrder!);\r\n }\r\n } else {\r\n this.repo.remove(id);\r\n }\r\n })\r\n //tap(() => this.repo.remove(id))\r\n );\r\n }\r\n\r\n updateOrderAddress(id: string, model: Partial<Order>): Observable<Order> {\r\n return this.http.patch<Order>(`${API}/${id}/address`, model).pipe(\r\n tap((res) => {\r\n this.repo.clear(), this.repo.upsertOrder(res);\r\n trackOrdersRequestsStatus(res.id);\r\n })\r\n );\r\n }\r\n\r\n updateDriver(id: string, model: Partial<Order>): Observable<Order> {\r\n return this.http.patch<Order>(`${API}/${id}/driver`, model).pipe(\r\n tap((res) => {\r\n //this.repo.clear(),\r\n this.repo.upsertOrder(res);\r\n trackOrdersRequestsStatus(res.id);\r\n })\r\n );\r\n }\r\n\r\n loadParkedForCurrentDriver() {\r\n return this.http.get<Order[]>(`${API}/getparkedcurrent`).pipe(\r\n tap((res) => {\r\n this.repo.clear();\r\n this.tripRepo.clear();\r\n res.forEach((x) => {\r\n if (x.isOrder) {\r\n this.repo.upsertOrder(x);\r\n } else {\r\n this.tripRepo.upsertTrip(x as Trip);\r\n }\r\n });\r\n this.repo.setOrders(res);\r\n }),\r\n trackOrdersRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n loadForCurrentDriver() {\r\n return this.http.get<Order[]>(`${API}/getForCurrentDriver`).pipe(\r\n tap((res) => {\r\n this.repo.clear();\r\n this.repo.setOrdersForDriver(res);\r\n }),\r\n trackOrdersRequestsStatus(this.repo.name)\r\n );\r\n }\r\n\r\n /// Look when work on go page\r\n loadCurrent() {\r\n return this.http.get<Order>(`${API}/currentOrder`).pipe(\r\n tap((order) => {\r\n if (order) {\r\n this.repo.upsertOrder(order, `${this.repo.name}_current`);\r\n this.repo.setActiveId(order.id);\r\n }\r\n }),\r\n trackOrdersRequestsStatus(`${this.repo.name}_current`)\r\n );\r\n }\r\n\r\n loadOne(id: string) {\r\n return this.http.get<Order>(`${API}/${id}`).pipe(\r\n tap((order) => this.repo.upsertOrder(order)),\r\n trackOrdersRequestsStatus(id)\r\n );\r\n }\r\n\r\n start(\r\n order: Partial<Order>,\r\n event: Partial<TripEvent>,\r\n files?: File[] | null\r\n ) {\r\n const startEvent = {\r\n ...event,\r\n type: 'TripStart' as TripEventType,\r\n tripId: order.id,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n createdAt: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n return this.http.patch<Order>(`${API}/${order.id}`, order).pipe(\r\n switchMap((ordered) =>\r\n this.http.post<Order>(`${API}/${ordered.id}/events`, startEvent)\r\n ),\r\n this.processOfflineSubmit(startEvent, order?.vehicleId, order?.trailerId),\r\n switchMap((ordered) => {\r\n if (!files || !files.length) {\r\n // No photos included - skip upload\r\n return of(ordered);\r\n }\r\n const lastCreatedEvent = sortBy(ordered.tripEvents, {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n })[0];\r\n const formData = new FormData();\r\n files.forEach((x) => formData.append('files', x));\r\n return this.http.post<Order>(\r\n `${API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n }),\r\n tap((ordered) => {\r\n this.repo.upsertOrder(ordered);\r\n this.repo.setActiveId(ordered.id);\r\n trackOrdersRequestsStatus(ordered.id);\r\n this.tripEventsRepo.clearPages();\r\n })\r\n );\r\n }\r\n\r\n orderAction(\r\n order: Partial<Order>,\r\n event: Partial<TripEvent>,\r\n eventType: string,\r\n files?: File[] | null\r\n ) {\r\n const orderEvent = {\r\n ...event,\r\n type: eventType as TripEventType,\r\n tripId: order.id,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n createdAt: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n return this.http.post<Trip>(`${API}/${order.id}/events`, orderEvent).pipe(\r\n this.processOfflineSubmit(orderEvent),\r\n switchMap((ordered) => {\r\n if (!files || !files.length) {\r\n return of(ordered);\r\n }\r\n const lastCreatedEvent = sortBy(\r\n ordered.tripEvents.filter((x) => x.type !== 'Total'),\r\n {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n }\r\n )[0];\r\n const formData = new FormData();\r\n files.forEach((x) => formData.append('files', x));\r\n return this.http.post<Trip>(\r\n `${API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n }),\r\n tap((ordered) => {\r\n this.repo.upsertOrder(ordered);\r\n this.tripEventsRepo.clearPages();\r\n trackTripsRequestsStatus(ordered.id);\r\n })\r\n );\r\n }\r\n\r\n stop(\r\n order: Partial<Order>,\r\n event: Partial<TripEvent>,\r\n files?: File[] | null\r\n ) {\r\n const stopEvent = {\r\n ...event,\r\n type: 'TripEnd' as TripEventType,\r\n tripId: order.id,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n order.type = 'Stop';\r\n order.curTime = stopEvent.eventTime;\r\n order.productIds = order.products?.map((x) => x.id);\r\n order.isApproved = false;\r\n order.tripEvents = [];\r\n return this.http.patch<Order>(`${API}/${order.id}`, order).pipe(\r\n switchMap((ordered) =>\r\n this.http.post<Order>(`${API}/${ordered.id}/events`, stopEvent)\r\n ),\r\n this.processOfflineSubmit(stopEvent, order?.vehicleId, order?.trailerId),\r\n switchMap((ordered) => {\r\n if (\r\n (!files || !files.length) &&\r\n (!order.commentPhotos || !order.commentPhotos?.length)\r\n ) {\r\n // No photos included - skip upload\r\n return of(ordered);\r\n }\r\n const lastCreatedEvent = sortBy(\r\n ordered.tripEvents.filter((x) => x.type !== 'Total'),\r\n {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n }\r\n )[0];\r\n const formData = new FormData();\r\n if (files) {\r\n files.forEach((x) => formData.append('files', x));\r\n }\r\n return this.http.post<Order>(\r\n `${API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n }),\r\n tap((ordered) => {\r\n this.repo.upsertOrder(ordered);\r\n this.repo.setActiveId(null);\r\n this.repo.remove(ordered.id);\r\n this.tripEventsRepo.clearPages();\r\n })\r\n );\r\n }\r\n\r\n takephoto(tripEvent: string, files?: File[] | null) {\r\n if (!files || !files.length) {\r\n // No photos included - skip upload\r\n return of(tripEvent);\r\n }\r\n const formData = new FormData();\r\n if (files && files.length > 1) {\r\n for (let f of files) {\r\n formData.append('files', f);\r\n }\r\n } else if (files && files.length === 1) {\r\n formData.append('files', files[0]);\r\n }\r\n\r\n return this.http.patch<Order>(`${API}/${tripEvent}`, formData);\r\n }\r\n\r\n weighing(trip: Order, event?: Partial<TripEvent>, files?: File[] | null) {\r\n const weighing = {\r\n ...event,\r\n type: 'Weighing' as TripEventType,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n return this.http.post<Order>(`${API}/${trip?.id}/events`, weighing).pipe(\r\n this.processOfflineSubmit(weighing),\r\n switchMap((trip) => {\r\n if (!files || !files.length) {\r\n return of(trip);\r\n }\r\n const lastCreatedEvent = sortBy(trip.tripEvents, {\r\n parameter: { property: 'createdAt' },\r\n direction: 'desc',\r\n })[0];\r\n const formData = new FormData();\r\n if (files && files.length > 1) {\r\n for (let f of files) {\r\n formData.append('files', f);\r\n }\r\n } else if (files && files.length === 1) {\r\n formData.append('files', files[0]);\r\n }\r\n return this.http.post<Order>(\r\n `${API}/${lastCreatedEvent.id}/photos`,\r\n formData\r\n );\r\n })\r\n );\r\n }\r\n\r\n changePhotoEvent(url: string) {\r\n return this.http\r\n .patch<Order>(`${API}/photos`, { url: url })\r\n .pipe(tap((order) => this.repo.upsertOrder(order)));\r\n }\r\n\r\n export(): Observable<string> {\r\n return this.http\r\n .get<Blob>(`${API}/csv`, { responseType: 'blob' as any })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n featuredExport(options?: FilterOptions): Observable<string> {\r\n return this.http\r\n .post<Blob>(`${API}/csv/options`, options, {\r\n responseType: 'blob' as any,\r\n })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n featuredPhotosExport(options?: FilterOptions): Observable<string> {\r\n return this.http\r\n .post<Blob>(`${API}/zip/options`, options, {\r\n responseType: 'blob' as any,\r\n })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: 'application/zip' });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n private processOfflineSubmit(\r\n event: Partial<TripEvent>,\r\n vehicleId?: string | null,\r\n trailerId?: string | null\r\n ): OperatorFunction<Order, Order> {\r\n return catchError((err) => {\r\n if (err instanceof ScheduledForRetryError) {\r\n const orderIdFromUrl = err.request.url\r\n .replace(`${API}/`, '')\r\n .replace('/events', '');\r\n if (\r\n err.request.url.includes(API) &&\r\n !err.request.url.includes('events')\r\n ) {\r\n // trip POST request failed\r\n // create additional request for the event\r\n const tripEventRequest = this.requestsRepo.add({\r\n body: { ...event, eventTime: this.ngDay.dayjs.utc().toDate() },\r\n url: `${API}/${orderIdFromUrl}/events`,\r\n method: 'POST',\r\n userId: err.request.userId,\r\n createdAt: new Date(),\r\n responseIdPath: 'tripEvents.0.id',\r\n });\r\n const vehiclePlaceholder = {\r\n id: '',\r\n name: '',\r\n numberplate: OFFLINE_ERROR,\r\n createdAt: err.request.createdAt,\r\n isBeingUsed: false,\r\n };\r\n\r\n return of<Order>({\r\n id: err.request.url.replace(`${API}/`, '').replace('/events', ''),\r\n vehicle: vehicleId\r\n ? this.vehicles.getOne(vehicleId)\r\n : vehiclePlaceholder,\r\n trailer: trailerId\r\n ? this.trailers.getOne(trailerId) || vehiclePlaceholder\r\n : null,\r\n createdAt: err.request.createdAt,\r\n isApproved: err.request.body,\r\n tripEvents: [\r\n {\r\n ...tripEventRequest.body,\r\n id: buildIdPromise(tripEventRequest.id),\r\n },\r\n ],\r\n });\r\n }\r\n // trip was created, but event has failed\r\n // pull trip id from the failed request's URL\r\n\r\n const tripState = this.repo.getOrder(orderIdFromUrl);\r\n if (tripState) {\r\n this.requestsRepo.add({\r\n body: { ...event, eventTime: this.ngDay.dayjs.utc().toDate() },\r\n url: `${API}/${orderIdFromUrl}/events`,\r\n method: 'POST',\r\n userId: err.request.userId,\r\n createdAt: new Date(),\r\n responseIdPath: 'tripEvents.0.id',\r\n });\r\n tripState.tripEvents.push({\r\n ...err.request.body,\r\n id: buildIdPromise(err.request.id),\r\n });\r\n return of(tripState);\r\n }\r\n }\r\n throw err;\r\n });\r\n }\r\n\r\n updateRejected(id: string, driverId: string | null) {\r\n return this.http\r\n .patch<Order>(`${API}/${id}/reject?&driverId=${driverId}`, {})\r\n .pipe(\r\n this.processOfflineReject(),\r\n tap((res) => {\r\n res.tripEvents = [];\r\n const active = this.repo.getActiveOrder();\r\n if (active && active.id === id) {\r\n this.repo.setActiveId(null);\r\n }\r\n this.repo.remove(id);\r\n this.tripEventsRepo.clearPages();\r\n }),\r\n trackOrdersRequestsStatus(id)\r\n );\r\n }\r\n\r\n private processOfflineReject(): OperatorFunction<Order, Order> {\r\n return catchError((err) => {\r\n if (err instanceof ScheduledForRetryError) {\r\n if (err.request.url.endsWith('/reject')) {\r\n const url = err.request.url.split('api/orders/')[1];\r\n const id = url.split('/reject')[0];\r\n this.requestsRepo.add({\r\n body: {},\r\n url: `${API}/${url}`,\r\n method: 'PATCH',\r\n userId: err.request.userId,\r\n createdAt: new Date(),\r\n responseIdPath: id,\r\n });\r\n const active = this.repo.getActiveOrder();\r\n const order = this.repo.getOrder(id);\r\n if (order) {\r\n order.tripEvents = new Array<TripEvent>();\r\n this.repo.upsertOrder(order);\r\n }\r\n if (active && active.id === id) {\r\n this.repo.setActiveId(null);\r\n }\r\n this.repo.remove(id);\r\n this.tripEventsRepo.clearPages();\r\n }\r\n }\r\n throw err;\r\n });\r\n }\r\n}\r\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import { Injectable } from '@angular/core';\r\nimport { createStore } from '@ngneat/elf';\r\nimport {\r\n withEntities,\r\n selectAllEntities,\r\n withActiveId,\r\n selectActiveEntity,\r\n setActiveId,\r\n upsertEntities,\r\n getEntity,\r\n getAllEntities,\r\n getActiveEntity,\r\n} from '@ngneat/elf-entities';\r\nimport {\r\n withRequestsCache,\r\n withRequestsStatus,\r\n createRequestsStatusOperator,\r\n createRequestsCacheOperator,\r\n updateRequestCache,\r\n updateRequestsStatus,\r\n selectRequestStatus,\r\n} from '@ngneat/elf-requests';\r\nimport { combineLatest, timer } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\nimport { sortBy } from '../modules/shared/pipes/sort.pipe';\r\nimport { DayjsService } from '../modules/shared/services/dayjs.service';\r\n\r\nexport type WorkdayEventType = 'DayStart' | 'DayEnd' | 'Pause';\r\n\r\nexport interface Workday {\r\n id: string;\r\n createdAt: Date;\r\n workdayEvents: WorkdayEvent[];\r\n userName?: string;\r\n userId?: string;\r\n deletedAt?: string;\r\n isApproved?: boolean;\r\n}\r\n\r\nexport class FilterOptions {\r\n isApproved?: boolean;\r\n searchWord?: string;\r\n dateFrom?: string;\r\n dateTo?: string;\r\n driverSelected?: string;\r\n clientSelected?: string;\r\n productSelected?: string[];\r\n isTripPage?: boolean;\r\n order?: string;\r\n orderColumn?: string;\r\n resultIds?: string[];\r\n isParkedOverview?: boolean;\r\n}\r\n\r\nexport interface WorkdayEvent {\r\n id: string;\r\n createdAt: Date;\r\n eventTime: Date;\r\n type: WorkdayEventType;\r\n duration?: number | null;\r\n workDayId: string;\r\n tripId?: string;\r\n eventLocation?: string;\r\n}\r\n\r\nexport class WorkdaysDto {\r\n workdayId?: string;\r\n userName?: string;\r\n date?: Date;\r\n dateForShown?: string;\r\n startTime?: string;\r\n stopTime?: string;\r\n pause?: number;\r\n workTime?: string;\r\n workTimeShow?: string;\r\n isApprove?: boolean;\r\n userId?: string;\r\n userDeleted?: string;\r\n eventSrartId?: string;\r\n eventEndId?: string;\r\n eventPauseId?: string;\r\n stopDate?: string;\r\n}\r\n\r\nconst store = createStore(\r\n { name: 'workdays' },\r\n withEntities<Workday>(),\r\n withActiveId(),\r\n withRequestsCache(),\r\n withRequestsStatus()\r\n);\r\nexport const trackWorkdaysRequestsStatus = createRequestsStatusOperator(store);\r\nexport const skipWhileWorkdaysCached = createRequestsCacheOperator(store);\r\n\r\nfunction comparePausesEndTime(a: WorkdayEvent, b: WorkdayEvent): number {\r\n return (\r\n a.eventTime.getTime() -\r\n b.eventTime.getTime() +\r\n 60 * 1000 * ((a.duration || 0) - (b.duration || 0))\r\n );\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class WorkdaysRepository {\r\n constructor(public ngDay: DayjsService) {}\r\n\r\n name = store.name;\r\n\r\n activeWorkday$ = store.pipe(selectActiveEntity());\r\n workdays$ = store.pipe(selectAllEntities());\r\n events$ = this.workdays$.pipe(\r\n map((days) =>\r\n sortBy(\r\n days.reduce(\r\n (events, day) => events.concat(day.workdayEvents),\r\n [] as WorkdayEvent[]\r\n ),\r\n { parameter: { property: 'eventTime' }, direction: 'desc' }\r\n )\r\n )\r\n );\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(this.name),\r\n map((x) => x.value === 'pending')\r\n );\r\n isAdding$ = store.pipe(\r\n selectRequestStatus(`${this.name}_add`),\r\n map((x) => x.value === 'pending')\r\n );\r\n isLoadingCurrent$ = store.pipe(\r\n selectRequestStatus(`${this.name}_current`),\r\n map((x) => x.value === 'pending')\r\n );\r\n isLoadingOne$ = (id: Workday['id']) =>\r\n store.pipe(\r\n selectRequestStatus(id),\r\n map((x) => x.value === 'pending')\r\n );\r\n activePause$ = combineLatest([this.activeWorkday$, timer(0, 1000)]).pipe(\r\n map(([day, _]) => {\r\n if (!day) {\r\n return null;\r\n }\r\n return day.workdayEvents\r\n .filter(\r\n (x) =>\r\n x.type === 'Pause' &&\r\n this.ngDay\r\n .dayjs(x.eventTime)\r\n .add(x.duration || 0, 'minutes')\r\n .isAfter(this.ngDay.dayjs())\r\n )\r\n .sort(comparePausesEndTime)\r\n .pop();\r\n })\r\n );\r\n\r\n getActiveWorkday() {\r\n return store.query(getActiveEntity());\r\n }\r\n\r\n getWorkday(id: string) {\r\n return store.query(getEntity(id));\r\n }\r\n\r\n getWorkdayByEvent(id: string) {\r\n return store\r\n .query(getAllEntities())\r\n .find((x) => !!x.workdayEvents.find((e) => e.id === id));\r\n }\r\n\r\n setActiveId(id: Workday['id'] | null) {\r\n store.update(setActiveId(id));\r\n }\r\n\r\n setWorkdays(days: Workday[]) {\r\n store.update(\r\n updateRequestCache(store.name),\r\n upsertEntities(days),\r\n updateRequestsStatus([store.name], 'success')\r\n );\r\n }\r\n\r\n upsertWorkday(day: Workday, customStatus?: string) {\r\n store.update(\r\n updateRequestCache(day.id),\r\n upsertEntities([day]),\r\n updateRequestsStatus([customStatus ?? day.id], 'success')\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BaseRepository } from './abstract/base.repository';\r\nimport { WorkdayEvent } from './workdays.repository';\r\n\r\nexport interface WorkDayEventInfo {\r\n driverId: string;\r\n tripId?: string\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class WorkdayEventsRepository extends BaseRepository<WorkdayEvent> {\r\n\r\n \r\n constructor() {\r\n super(\r\n 'workdayevents', \r\n [ { label: 'Date', property: 'eventTime' } ],\r\n { parameter: { property: 'eventTime' }, direction: 'desc' }\r\n );\r\n }\r\n\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { PaginationData } from '@ngneat/elf-pagination';\r\nimport { map, Observable, tap } from 'rxjs';\r\nimport { BaseService, DEFAULT_ENTITIES_PER_PAGE } from './abstract/base.service';\r\nimport { WorkdayEventsRepository } from './workdayevents.repository';\r\nimport { WorkdayEvent } from './workdays.repository';\r\n\r\nconst API = '/api/workdayevents';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class WorkDayEventsService extends BaseService<WorkdayEvent> {\r\n\r\n constructor(\r\n http: HttpClient,\r\n repo: WorkdayEventsRepository\r\n ) {\r\n super(API, http, repo);\r\n }\r\n\r\n loadForTrip(id: string) { \r\n return this.http.get<WorkdayEvent[]>(`${API}/trip/${id}`);\r\n }\r\n \r\n loadPageByUser(id: string, page: number, take: number = DEFAULT_ENTITIES_PER_PAGE): Observable<PaginationData & { data: WorkdayEvent[] }> {\r\n const query = [\r\n `page=${page}`,\r\n `take=${take}`\r\n ];\r\n this.repo.setPage(page);\r\n return this.http\r\n .get<PaginationData & { data: WorkdayEvent[] }>(`${API}/user/${id}?${query.join('&')}`)\r\n .pipe(\r\n tap(res => this.repo.addPage(res)),\r\n this.repo.track(),\r\n this.repo.skipWhilePageCached(page)\r\n );\r\n }\r\n\r\n exportByUser(id: string): Observable<string> {\r\n return this.http\r\n .get<Blob>(`${API}/csv/${id}`, { responseType: 'blob' as any })\r\n .pipe(\r\n map(resp => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nexport interface Coordinates {\r\n longitude: number;\r\n latitude: number;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class LocationService {\r\n\r\n constructor() { } \r\n\r\n async getPosition(): Promise<Coordinates> {\r\n return new Promise<Coordinates>((resolve, reject) => { \r\n navigator.geolocation.getCurrentPosition(position => resolve({\r\n latitude: position.coords.latitude, \r\n longitude: position.coords.longitude\r\n }), reject);\r\n });\r\n } \r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, of, OperatorFunction } from 'rxjs';\r\nimport { catchError, map, switchMap, tap } from 'rxjs/operators';\r\nimport { ScheduledForRetryError } from '../modules/core/interceptors/retry.interceptor';\r\nimport { DayjsService } from '../modules/shared/services/dayjs.service';\r\nimport { buildIdPromise, RequestsRepository } from './requests.repository';\r\nimport { WorkdayEventsRepository } from './workdayevents.repository';\r\nimport { WorkDayEventsService } from './workdayevents.service';\r\nimport {\r\n FilterOptions,\r\n skipWhileWorkdaysCached,\r\n trackWorkdaysRequestsStatus,\r\n Workday,\r\n WorkdayEvent,\r\n WorkdaysDto,\r\n WorkdaysRepository,\r\n} from './workdays.repository';\r\nimport {\r\n Coordinates,\r\n LocationService,\r\n} from '../modules/shared/services/location.service';\r\n\r\nconst API = '/api/workdays';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class WorkdaysService {\r\n constructor(\r\n private http: HttpClient,\r\n private repo: WorkdaysRepository,\r\n private eventRepo: WorkdayEventsRepository,\r\n private eventService: WorkDayEventsService,\r\n private requestsRepo: RequestsRepository,\r\n private locationService: LocationService,\r\n public ngDay: DayjsService\r\n ) {}\r\n\r\n loadOverview() {\r\n return this.http.get<Workday[]>(`/api/usersSummary/workdaysoverview`).pipe(\r\n tap((res) => this.repo.setWorkdays(res)),\r\n trackWorkdaysRequestsStatus(this.repo.name)\r\n //skipWhileWorkdaysCached(this.repo.name)\r\n );\r\n }\r\n\r\n load() {\r\n return this.http.get<Workday[]>(API).pipe(\r\n tap((res) => this.repo.setWorkdays(res)),\r\n trackWorkdaysRequestsStatus(this.repo.name),\r\n skipWhileWorkdaysCached(this.repo.name)\r\n );\r\n }\r\n\r\n loadCurrent() {\r\n return this.http.get<Workday>(`${API}/current`).pipe(\r\n tap((day) => {\r\n if (day) {\r\n this.repo.upsertWorkday(day, `${this.repo.name}_current`);\r\n this.repo.setActiveId(day.id);\r\n }\r\n }),\r\n trackWorkdaysRequestsStatus(`${this.repo.name}_current`),\r\n skipWhileWorkdaysCached(`${this.repo.name}_current`)\r\n );\r\n }\r\n loadOneById(id: string) {\r\n return this.http.get<Workday>(`${API}/${id}`).pipe(\r\n tap((trip) => {\r\n if (trip) {\r\n this.repo.upsertWorkday(trip);\r\n }\r\n }),\r\n trackWorkdaysRequestsStatus(id)\r\n );\r\n }\r\n\r\n loadOne() {\r\n return this.http.get<Workday>(API).pipe(\r\n tap((day) => {\r\n if (day) {\r\n this.repo.upsertWorkday(day, this.repo.name);\r\n this.repo.setActiveId(day.id);\r\n }\r\n }),\r\n trackWorkdaysRequestsStatus(this.repo.name),\r\n skipWhileWorkdaysCached(this.repo.name)\r\n );\r\n }\r\n\r\n async start() {\r\n let eventLocation: string | undefined;\r\n const getLocationAsync = await this.locationService\r\n .getPosition()\r\n .catch((err) => (eventLocation = err.message));\r\n if (getLocationAsync.latitude) {\r\n eventLocation = `${getLocationAsync.latitude}, ${getLocationAsync.longitude}`;\r\n }\r\n const event: Partial<WorkdayEvent> = {\r\n type: 'DayStart',\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n eventLocation,\r\n };\r\n return this.http.post<Workday>(API, {}).pipe(\r\n switchMap((day) =>\r\n this.http.post<Workday>(`${API}/${day.id}/events`, event)\r\n ),\r\n this.processOfflineSubmit(event),\r\n tap((day) => {\r\n this.repo.upsertWorkday(day, `${this.repo.name}_add`);\r\n this.repo.setActiveId(day.id);\r\n this.eventRepo.clearPages();\r\n }),\r\n trackWorkdaysRequestsStatus(`${this.repo.name}_add`)\r\n );\r\n }\r\n\r\n stop(day: Workday) {\r\n const event: Partial<WorkdayEvent> = {\r\n type: 'DayEnd',\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n };\r\n return this.http.post<Workday>(`${API}/${day.id}/events`, event).pipe(\r\n this.processOfflineSubmit(event),\r\n tap((day) => {\r\n this.repo.upsertWorkday(day);\r\n this.repo.setActiveId(null);\r\n this.eventRepo.clearPages();\r\n }),\r\n trackWorkdaysRequestsStatus(day.id)\r\n );\r\n }\r\n\r\n pause(day: Workday, duration: WorkdayEvent['duration'], tripId?: string) {\r\n const event: Partial<WorkdayEvent> = {\r\n type: 'Pause',\r\n duration,\r\n eventTime: this.ngDay.dayjs.utc().toDate(),\r\n tripId: tripId,\r\n };\r\n return this.http.post<Workday>(`${API}/${day.id}/events`, event).pipe(\r\n this.processOfflineSubmit(event),\r\n tap((day) => {\r\n this.repo.upsertWorkday(day);\r\n this.eventRepo.clearPages();\r\n }),\r\n trackWorkdaysRequestsStatus(day.id)\r\n );\r\n }\r\n\r\n addPause(event: Partial<WorkdayEvent>) {\r\n return this.http\r\n .put<Workday>(`${API}/${event.workDayId}/events`, event)\r\n .pipe(\r\n this.processOfflineSubmit(event),\r\n tap((day) => {\r\n this.repo.upsertWorkday(day);\r\n this.eventRepo.clearPages();\r\n })\r\n );\r\n }\r\n\r\n updatePause(day: Workday, pause: WorkdayEvent) {\r\n return this.eventService.update(pause.id, pause).pipe(\r\n map((res) => {\r\n const index = day.workdayEvents.findIndex((x) => x.id === res.id);\r\n if (index >= 0) {\r\n day.workdayEvents[index] = res;\r\n }\r\n return day;\r\n }),\r\n this.processOfflineSubmit(pause),\r\n tap((day) => {\r\n this.repo.upsertWorkday(day);\r\n this.eventRepo.clearPages();\r\n }),\r\n trackWorkdaysRequestsStatus(day.id)\r\n );\r\n }\r\n\r\n updateApprove(entity: WorkdaysDto) {\r\n return this.http\r\n .patch<Workday>(\r\n `${API}/${entity.workdayId}/isApproved/${entity.isApprove}`,\r\n { isApproved: entity.isApprove }\r\n )\r\n .pipe(\r\n tap((trip) => this.repo.upsertWorkday(trip)),\r\n trackWorkdaysRequestsStatus(entity.workdayId!)\r\n );\r\n }\r\n\r\n export(): Observable<string> {\r\n return this.http\r\n .get<Blob>(`${API}/csv`, { responseType: 'blob' as any })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n featuredExport(options?: FilterOptions): Observable<string> {\r\n return this.http\r\n .post<Blob>(`${API}/csv/options`, options, {\r\n responseType: 'blob' as any,\r\n })\r\n .pipe(\r\n map((resp) => {\r\n const blob = new Blob([resp], { type: resp.type });\r\n return window.URL.createObjectURL(blob);\r\n })\r\n );\r\n }\r\n\r\n private processOfflineSubmit(\r\n event: Partial<WorkdayEvent>\r\n ): OperatorFunction<Workday, Workday> {\r\n return catchError((err) => {\r\n if (err instanceof ScheduledForRetryError) {\r\n if (\r\n err.request.method === 'PATCH' &&\r\n err.request.body.type === 'Pause'\r\n ) {\r\n const eventIdFromUrl = err.request.url.split('/').pop();\r\n\r\n if (eventIdFromUrl) {\r\n const day = this.repo.getWorkdayByEvent(eventIdFromUrl);\r\n if (day) {\r\n const index = day.workdayEvents.findIndex(\r\n (x) => x.id === eventIdFromUrl\r\n );\r\n if (index >= 0) {\r\n day.workdayEvents[index] = {\r\n ...day.workdayEvents[index],\r\n ...event,\r\n };\r\n }\r\n return of(day);\r\n }\r\n }\r\n throw err;\r\n }\r\n if (err.request.url.endsWith(API)) {\r\n // day POST request failed\r\n // create additional request for the event\r\n const eventRequest = this.requestsRepo.add({\r\n body: { ...event, eventTime: this.ngDay.dayjs.utc().toDate() },\r\n url: `${API}/${buildIdPromise(err.request.id)}/events`,\r\n method: 'POST',\r\n userId: err.request.userId,\r\n createdAt: new Date(),\r\n responseIdPath: 'workdayEvents.0.id',\r\n });\r\n return of<Workday>({\r\n id: buildIdPromise(err.request.id),\r\n createdAt: err.request.createdAt,\r\n workdayEvents: [\r\n {\r\n ...eventRequest.body,\r\n id: buildIdPromise(eventRequest.id),\r\n },\r\n ],\r\n });\r\n }\r\n // day was created, but event has failed\r\n // pull day id from the failed request's URL\r\n const dayIdFromUrl = err.request.url.split('/').slice(-2)[0];\r\n const dayState = this.repo.getWorkday(dayIdFromUrl);\r\n if (dayState) {\r\n this.requestsRepo.update(err.request.id, {\r\n responseIdPath: `workdayEvents.${dayState.workdayEvents.length}.id`,\r\n });\r\n dayState.workdayEvents.push({\r\n ...err.request.body,\r\n id: buildIdPromise(err.request.id),\r\n });\r\n return of(dayState);\r\n }\r\n }\r\n throw err;\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { forkJoin } from 'rxjs';\r\nimport { AccessoriesService } from 'src/app/state/accessory.service';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\nimport { CleaningsService } from 'src/app/state/cleaning.service';\r\nimport { CompaniesService } from 'src/app/state/companies.service';\r\nimport { OrdersService } from 'src/app/state/orders.service';\r\nimport { ProductsService } from 'src/app/state/products.service';\r\nimport { TrailersService } from 'src/app/state/trailers.service';\r\nimport { TripsService } from 'src/app/state/trips.service';\r\nimport { VehiclesService } from 'src/app/state/vehicles.service';\r\nimport { WorkdaysService } from 'src/app/state/workdays.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DriverDataPreloaderService {\r\n constructor(\r\n private accessories: AccessoriesService,\r\n private auth: AuthService,\r\n private cleaning: CleaningsService,\r\n private companies: CompaniesService,\r\n private products: ProductsService,\r\n private trailers: TrailersService,\r\n private vehicles: VehiclesService,\r\n private trips: TripsService,\r\n private orders: OrdersService,\r\n private workdays: WorkdaysService\r\n ) {}\r\n\r\n preloadDrivingModels() {\r\n const models$ = [\r\n this.accessories.loadAsListwithRepo(),\r\n this.cleaning.loadAsListwithRepo(),\r\n this.companies.loadAsListwithRepo(),\r\n this.products.loadAsListwithRepo(),\r\n this.trailers.loadAsListwithRepo(),\r\n this.vehicles.loadAsListwithRepo(),\r\n this.auth.loadSettings(),\r\n this.trips.loadCurrent(),\r\n this.orders.loadCurrent(),\r\n this.workdays.loadCurrent(),\r\n ];\r\n forkJoin(models$).subscribe();\r\n }\r\n}\r\n","<div class=\"card shadow-sm\">\r\n <figure *ngIf=\"image\" class=\"card-img-top overflow-hidden mb-0 coverimg h-190\"\r\n [ngStyle]=\"{ 'background-image': 'url(' + image + ')' }\">\r\n <img src=\"{{ image }}\" alt=\"project images\" i18n-alt=\"@@projectImages\">\r\n </figure>\r\n <div class=\"card-body\">\r\n <h6>{{ title }}</h6>\r\n <div class=\"text-muted small mb-3\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div>\r\n <a *ngFor=\"let action of actions\"\r\n class=\"btn-sm btn-link btn-light me-2\"\r\n [routerLink]=\"action.routerLink\"\r\n (click)=\"ctaClick.emit($event)\">\r\n <i *ngIf=\"action.icon\" [ngClass]=\"['bi', 'me-2', action.icon]\"></i>\r\n <span>{{ action.text }}</span>\r\n </a>\r\n </div>\r\n </div>\r\n</div>\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\nexport interface SimpleCardAction {\r\n routerLink: string | any[];\r\n text: string;\r\n icon?: string;\r\n}\r\n\r\n@Component({\r\n selector: 'app-simple-card',\r\n templateUrl: './simple-card.component.html',\r\n styleUrls: ['./simple-card.component.scss']\r\n})\r\nexport class SimpleCardComponent implements OnInit {\r\n @Input() image: string | undefined;\r\n @Input() title: string | undefined;\r\n @Input() actions: SimpleCardAction[] = [];\r\n @Output() ctaClick = new EventEmitter<Event>();\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { SimpleCardAction } from '../../../shared/components/simple-card/simple-card.component';\r\n\r\n@Component({\r\n selector: 'app-session-over-state',\r\n templateUrl: './session-over-state.component.html',\r\n styleUrls: ['./session-over-state.component.scss']\r\n})\r\nexport class SessionOverStateComponent implements OnInit {\r\n actions: SimpleCardAction[] = [\r\n {\r\n text: $localize `:Refresh page button:Refresh`,\r\n routerLink: ['/signin']\r\n }\r\n ];\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n refresh($event: Event) {\r\n $event.preventDefault();\r\n window.location.reload();\r\n }\r\n\r\n}\r\n","<div id=\"session-over\" class=\"row\">\r\n <app-simple-card class=\"col-12 col-md-6 col-xl-4 m-auto\"\r\n title=\"Session is over\" i18n-title=\"Title for ending session\"\r\n (ctaClick)=\"refresh($event)\"\r\n [actions]=\"actions\">\r\n <ng-container i18n=\"Message for expired session\">Your session has expired. Please refresh the page to continue.</ng-container> \r\n </app-simple-card>\r\n</div>\r\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass AnimationBuilder {\n}\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\n\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n * <div [@.disabled]=\"isDisabled\">\n * <div [@childAnimation]=\"exp\"></div>\n * </div>\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* AnimationMetadataType.Trigger */, name, definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" }),\n * style({ background: \"red\" })\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles = null) {\n return { type: 4 /* AnimationMetadataType.Animate */, styles, timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options = null) {\n return { type: 3 /* AnimationMetadataType.Group */, steps, options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options = null) {\n return { type: 2 /* AnimationMetadataType.Sequence */, steps, options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow an element to animate from\n * a height of 0 up to its full height:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: 6 /* AnimationMetadataType.Style */, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: 0 /* AnimationMetadataType.State */, name, styles, options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: 5 /* AnimationMetadataType.Keyframes */, steps };\n}\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n * - a string with a specific syntax\n * - or a function that compares the previous and current state (value of the expression bound to\n * the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n * - `fromState => toState`, which indicates that the transition's animations should occur then the\n * expression bound to the trigger's element goes from `fromState` to `toState`\n *\n * _Example:_\n * ```typescript\n * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n * ```\n *\n * - `fromState <=> toState`, which indicates that the transition's animations should occur then\n * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n * _Example:_\n * ```typescript\n * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n * ```\n *\n * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n * element enters or exists the DOM\n *\n * _Example:_\n * ```typescript\n * transition(':enter', [\n * style({ opacity: 0 }),\n * animate('500ms', style({ opacity: 1 }))\n * ])\n * ```\n *\n * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n * the numerical expression bound to the trigger's element has increased in value or decreased\n *\n * _Example:_\n * ```typescript\n * transition(':increment', query('@counter', animateChild()))\n * ```\n *\n * - a sequence of any of the above divided by commas, which indicates that transition's animations\n * should occur whenever one of the state change expressions matches\n *\n * _Example:_\n * ```typescript\n * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n * style({ transform: 'scale(1)', offset: 0}),\n * style({ transform: 'scale(1.1)', offset: 0.7}),\n * style({ transform: 'scale(1)', offset: 1})\n * ]))),\n * ```\n *\n * Also note that in such context:\n * - `void` can be used to indicate the absence of the element\n * - asterisks can be used as wildcards that match any state\n * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n * equivalent to `:leave`)\n * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n * _truthy_ and _falsy_ values)\n *\n * <div class=\"alert is-helpful\">\n *\n * Be careful about entering end leaving elements as their transitions present a common\n * pitfall for developers.\n *\n * Note that when an element with a trigger enters the DOM its `:enter` transition always\n * gets executed, but its `:leave` transition will not be executed if the element is removed\n * alongside its parent (as it will be removed \"without warning\" before its transition has\n * a chance to be executed, the only way that such transition can occur is if the element\n * is exiting the DOM on its own).\n *\n *\n * </div>\n *\n * ### Animating to a Final State\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no `style` data, that step is automatically considered the final animation arc,\n * for the element to reach the final state, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n * - Transition animations applied based on\n * the trigger's expression value\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"myStatusExp\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\"on => off, open => closed\", animate(500)),\n * transition(\"* <=> error\", query('.indicator', animateChild()))\n * ])\n * ```\n *\n * - Transition animations applied based on custom logic dependent\n * on the trigger's expression value and provided parameters\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"{\n * value: stepName,\n * params: { target: currentTarget }\n * }\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\n * (fromState, toState, _element, params) =>\n * ['firststep', 'laststep'].includes(fromState.toLowerCase())\n * && toState === params?.['target'],\n * animate('1s')\n * )\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options = null) {\n return { type: 1 /* AnimationMetadataType.Transition */, expr: stateChangeExpr, animation: steps, options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options = null) {\n return { type: 8 /* AnimationMetadataType.Reference */, animation: steps, options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options = null) {\n return { type: 9 /* AnimationMetadataType.AnimateChild */, options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options = null) {\n return { type: 10 /* AnimationMetadataType.AnimateRef */, animation, options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements (not\n * all elements can be queried via these tokens, see\n * [Entering and Leaving Elements](#entering-and-leaving-elements))\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n * - Those inserted dynamically (via `ViewContainerRef`)\n * - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n * <div class=\"alert is-helpful\">\n *\n * Note that elements will be successfully queried via `:enter`/`:leave` even if their\n * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n * directive (e.g. they enter/exit alongside their parent).\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * There is an exception to what previously mentioned, besides elements entering/leaving based on\n * their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n * </div>\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n * <div [@queryAnimation]=\"exp\">\n * <h1>Title</h1>\n * <div class=\"content\">\n * Blah blah blah\n * </div>\n * </div>\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options = null) {\n return { type: 11 /* AnimationMetadataType.Query */, selector, animation, options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n * <div *ngFor=\"let item of items\">\n * {{ item }}\n * </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* AnimationMetadataType.Stagger */, timings, animation };\n}\n\nfunction scheduleMicroTask(cb) {\n Promise.resolve().then(cb);\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n constructor(duration = 0, delay = 0) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this._position = 0;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n init() { }\n play() {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n /** @internal */\n triggerMicrotask() {\n scheduleMicroTask(() => this._onFinish());\n }\n _onStart() {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n pause() { }\n restart() { }\n finish() {\n this._onFinish();\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position) {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition() {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nclass AnimationGroupPlayer {\n constructor(_players) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n if (total == 0) {\n scheduleMicroTask(() => this._onFinish());\n }\n else {\n this.players.forEach(player => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this.players.forEach(player => player.init());\n }\n onStart(fn) {\n this._onStartFns.push(fn);\n }\n _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n }\n onDone(fn) {\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(player => player.play());\n }\n pause() {\n this.players.forEach(player => player.pause());\n }\n restart() {\n this.players.forEach(player => player.restart());\n }\n finish() {\n this._onFinish();\n this.players.forEach(player => player.finish());\n }\n destroy() {\n this._onDestroy();\n }\n _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(player => player.destroy());\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this.players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n setPosition(p) {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach(player => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n getPosition() {\n const longestPlayer = this.players.reduce((longestSoFar, player) => {\n const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n }, null);\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n beforeDestroy() {\n this.players.forEach(player => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\nconst ɵPRE_STYLE = '!';\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, ɵPRE_STYLE };\n","import { animate, style, transition, trigger } from \"@angular/animations\";\r\n\r\nconst ANIMATION_SPPED = '200ms';\r\nconst ENTER_FROM_TOP_HIDDEN_STATE = {transform: 'translate(-50%, -100%)'};\r\nconst ENTER_FROM_TOP_VISIBLE_STATE = {transform: 'translate(-50%, 0)'};\r\nconst ENTER_FROM_BOTTOM_HIDDEN_STATE = {transform: 'translate(-50%, 100%)'};\r\nconst ENTER_FROM_BOTTOM_VISIBLE_STATE = {transform: 'translate(-50%, 0)'};\r\n\r\nexport const enterFromTopAnimation = trigger(\r\n 'enterFromTop', [\r\n transition(':enter', [\r\n style(ENTER_FROM_TOP_HIDDEN_STATE),\r\n animate(ANIMATION_SPPED, style(ENTER_FROM_TOP_VISIBLE_STATE))\r\n ]),\r\n transition(':leave', [\r\n style(ENTER_FROM_TOP_VISIBLE_STATE),\r\n animate(ANIMATION_SPPED, style(ENTER_FROM_TOP_HIDDEN_STATE))\r\n ])\r\n ]\r\n);\r\n\r\nexport const enterFromBottomAnimation = trigger(\r\n 'enterFromBottom', [\r\n transition(':enter', [\r\n style(ENTER_FROM_BOTTOM_HIDDEN_STATE),\r\n animate(ANIMATION_SPPED, style(ENTER_FROM_BOTTOM_VISIBLE_STATE))\r\n ]),\r\n transition(':leave', [\r\n style(ENTER_FROM_BOTTOM_VISIBLE_STATE),\r\n animate(ANIMATION_SPPED, style(ENTER_FROM_BOTTOM_HIDDEN_STATE))\r\n ])\r\n ]\r\n);","<div *ngIf=\"!(connection.isOnline$ | async)\" [@enterFromTop]\r\n class=\"bg-danger text-white text-center offline-label shadow-sm pb-1\">\r\n <small>\r\n <i class=\"bi bi-wifi-off me-2\"></i>\r\n <span i18n=\"Label that user offline\">You are offline</span>\r\n </small>\r\n <p *ngIf=\"features.offlineChanges && (repo.count$ | async) as count\">\r\n <small>(<ng-container i18n=\"Offline changes counter\">{count, plural, =1 {1 unsynced change} other {{{count}} unsynced changes}}</ng-container>)</small>\r\n </p>\r\n</div>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { enterFromTopAnimation } from 'src/app/modules/shared/helpers/animaions';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\nimport { ConnectionService } from 'src/app/modules/shared/services/connection.service';\r\nimport { RequestsRepository } from 'src/app/state/requests.repository';\r\n\r\n@Component({\r\n selector: 'app-offline-label',\r\n templateUrl: './offline-label.component.html',\r\n styleUrls: ['./offline-label.component.scss'],\r\n animations: [ enterFromTopAnimation ]\r\n})\r\nexport class OfflineLabelComponent implements OnInit {\r\n\r\n features = this.env.features;\r\n\r\n constructor(\r\n public connection: ConnectionService,\r\n public repo: RequestsRepository,\r\n public env: EnvState\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<div *ngIf=\"installPrompt && !(ui.isInstallPromptDismissed$ | async)\" \r\n [@enterFromBottom]\r\n class=\"bg-primary text-white text-start pwa-install-label p-3 shadow-sm\">\r\n <div class=\"row\">\r\n <div class=\"col-auto\" role=\"button\" (click)=\"install()\">\r\n <i class=\"bi bi-bookmark-plus-fill h2\"></i>\r\n </div>\r\n <div class=\"col\" role=\"button\" (click)=\"install()\">\r\n <p class=\"m-0\" i18n=\"Label to install app\">Install application</p>\r\n <small i18n=\"Button allow offline using\">Click to use offline</small>\r\n </div>\r\n <div class=\"col-auto p-0\">\r\n <div class=\"vr h-100\"></div>\r\n </div>\r\n <div class=\"col-auto text-center\" role=\"button\" \r\n (click)=\"ui.dismissInstallPrompt()\">\r\n <p class=\"m-0\">\r\n <i class=\"bi bi-x-lg\"></i>\r\n </p>\r\n <small i18n=\"Button to dismiss installation\">Dismiss</small>\r\n </div>\r\n </div>\r\n</div>\r\n","import { ChangeDetectorRef, Component, OnInit } from '@angular/core';\r\nimport { enterFromBottomAnimation } from 'src/app/modules/shared/helpers/animaions';\r\nimport { UiRepository } from 'src/app/state/ui.repository';\r\n\r\ninterface BeforeInstallPromptEvent extends Event {\r\n readonly platforms: Array<string>;\r\n readonly userChoice: Promise<{\r\n outcome: 'accepted' | 'dismissed';\r\n platform: string;\r\n }>;\r\n prompt(): Promise<void>;\r\n}\r\n\r\n@Component({\r\n selector: 'app-pwa-install-button',\r\n templateUrl: './pwa-install-button.component.html',\r\n styleUrls: ['./pwa-install-button.component.scss'],\r\n animations: [enterFromBottomAnimation],\r\n})\r\nexport class PwaInstallButtonComponent implements OnInit {\r\n installPrompt?: BeforeInstallPromptEvent;\r\n hasEventTriggered = false;\r\n\r\n constructor(public ui: UiRepository, private cdr: ChangeDetectorRef) {}\r\n\r\n ngOnInit(): void {\r\n window.addEventListener('beforeinstallprompt', (event) => {\r\n this.hasEventTriggered = true;\r\n event.preventDefault();\r\n this.installPrompt = event as BeforeInstallPromptEvent;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n async install() {\r\n if (!this.installPrompt) {\r\n return;\r\n }\r\n this.installPrompt.prompt();\r\n const result = await this.installPrompt.userChoice;\r\n if (result.outcome === 'accepted') {\r\n // console.log('installed');\r\n }\r\n delete this.installPrompt;\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { filterNil } from \"@ngneat/elf\";\r\nimport { concat, map, Observable, of, switchMap, tap } from \"rxjs\";\r\nimport { RETRY_HEADER } from \"../modules/core/interceptors/retry.interceptor\";\r\nimport { RequestsRepository } from \"./requests.repository\";\r\n\r\ntype HttpCallFunction = (\r\n url: string,\r\n body: any,\r\n options?: { headers?: { [name: string]: string | string[] } }\r\n) => Observable<any>;\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class RequestsService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private repo: RequestsRepository\r\n ) { }\r\n\r\n syncNext(userId: string): Observable<any> | null {\r\n const next = this.repo.getNextForUser(userId);\r\n if (!next) {\r\n return null;\r\n }\r\n return this.sync(\r\n next.id,\r\n next.method,\r\n this.getIdPathResolver(next.responseIdPath)\r\n );\r\n }\r\n\r\n syncAll(userId: string): Observable<any> { \r\n const all = this.repo.getAllForUser(userId)\r\n .map(x => this.sync(\r\n x.id,\r\n x.method,\r\n this.getIdPathResolver(x.responseIdPath)\r\n ))\r\n .filter(x => !!x) as Observable<any>[];\r\n return concat(...all);\r\n }\r\n\r\n private getIdPathResolver(responseIdPath?: string): ((response: any) => string) | undefined {\r\n if (!responseIdPath) {\r\n return;\r\n }\r\n const path = responseIdPath.split('.');\r\n return (response: any) => {\r\n while(true) {\r\n const elem = path.shift();\r\n if (!elem) {\r\n return response;\r\n }\r\n response = response[elem]\r\n }\r\n };\r\n }\r\n\r\n private sync(id: number, method: string, idPath?: (response: any) => string): Observable<any> | null {\r\n let httpCall: HttpCallFunction;\r\n switch (method) {\r\n case 'POST': httpCall = this.http.post; break;\r\n case 'PATCH': httpCall = this.http.patch; break; \r\n default: return null;\r\n }\r\n return of(id).pipe(\r\n switchMap(id => of(this.repo.getOne(id))),\r\n filterNil(),\r\n map(request => {\r\n // A placeholder might have been user in an id field while offline.\r\n // We can just ignore it to avoid Guid parsing errors.\r\n if(request.body && request.body.id) {\r\n delete request.body.id;\r\n }\r\n return request\r\n }),\r\n switchMap(request => httpCall.call(\r\n this.http,\r\n request.url,\r\n request.body || '',\r\n { headers: { [RETRY_HEADER]: 'yes' } }\r\n )),\r\n tap((resp) => {\r\n const respId = resp && (idPath ? idPath(resp) : resp.id);\r\n if (respId) {\r\n this.repo.resolveId(id, respId);\r\n }\r\n this.repo.remove(id);\r\n }),\r\n this.repo.track(id),\r\n this.repo.track()\r\n );\r\n }\r\n}\r\n","import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\r\n\r\n// Template variables helper\r\n// Usage: \r\n// <div *ngVar=\"{ testValue: 45 } as customVar\">\r\n// <span>{{ customVar | json }}</span>\r\n// </div>\r\n// From:\r\n// https://stackoverflow.com/questions/38582293/how-to-declare-a-variable-in-a-template-in-angular\r\n@Directive({\r\n selector: '[ngVar]'\r\n})\r\nexport class NgVarDirective {\r\n @Input() set ngVar(context: unknown) {\r\n this.context.$implicit = this.context.ngVar = context;\r\n\r\n if (!this.hasView) {\r\n this.vcRef.createEmbeddedView(this.templateRef, this.context);\r\n this.hasView = true;\r\n }\r\n }\r\n\r\n private context: {\r\n $implicit: unknown;\r\n ngVar: unknown;\r\n } = {\r\n $implicit: null,\r\n ngVar: null,\r\n };\r\n\r\n private hasView: boolean = false;\r\n\r\n constructor(\r\n private templateRef: TemplateRef<any>,\r\n private vcRef: ViewContainerRef\r\n ) {}\r\n\r\n}\r\n","<div class=\"d-inline-block\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"spinner-grow\" role=\"status\"></div>\r\n <div *ngIf=\"showWithText\" i18n=\"Loading spinner\">Loading...</div>\r\n </div>\r\n</div>\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-spinner',\r\n templateUrl: './spinner.component.html',\r\n styleUrls: ['./spinner.component.scss'],\r\n})\r\nexport class SpinnerComponent implements OnInit {\r\n @Input() showWithText: boolean = false;\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { Duration } from 'dayjs/plugin/duration';\r\nimport { DayjsService } from '../services/dayjs.service';\r\n\r\n\r\n@Pipe({\r\n name: 'timing'\r\n})\r\nexport class TimingPipe implements PipeTransform {\r\n\r\n constructor(public ngDay: DayjsService) { }\r\n\r\n transform(value: Date | Duration | number | null): string {\r\n if (typeof value === 'number') {\r\n value = this.ngDay.dayjs.duration(value, 'minutes');\r\n }\r\n if (!value) {\r\n return '';\r\n }\r\n if (this.ngDay.dayjs.isDuration(value)) {\r\n let increasedValue = this.ngDay.dayjs.duration(value.minutes() + 1, 'minutes');\r\n return increasedValue.format('m[m]')\r\n }\r\n return this.ngDay.dayjs.utc(value).fromNow();\r\n }\r\n\r\n}\r\n","<div *ngIf=\"isDisplayed$ | async\" [@enterFromBottom]\r\n role=\"button\" data-bs-toggle=\"modal\" data-bs-target=\"#syncmodal\"\r\n class=\"bg-warning text-white text-start unsynced-label p-3 shadow-sm\">\r\n <div class=\"row\">\r\n <div class=\"col-auto\">\r\n <i *ngIf=\"!(repo.isLoading$ | async)\" class=\"bi bi-exclamation-diamond h2\"></i>\r\n <span *ngIf=\"repo.isLoading$ | async\" class=\"h2\">\r\n <app-spinner></app-spinner>\r\n </span>\r\n </div>\r\n <div class=\"col\" role=\"button\">\r\n <p class=\"m-0\" *ngVar=\"(repo.count$ | async) as count\" i18n=\"Changes counter label\">{count, plural, =1 {1 unsynced change} other {{{count}} unsynced changes}}</p>\r\n <small i18n=\"Details view button\">Click to view details</small>\r\n </div>\r\n </div>\r\n</div>\r\n<!-- Modal -->\r\n<div *ngIf=\"isDisplayed$ | async\" class=\"modal fade\" id=\"syncmodal\" tabindex=\"-1\" aria-labelledby=\"syncmodal\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-dialog-centered\">\r\n <div class=\"modal-content bg-lights border-0\">\r\n <div class=\"modal-header\">\r\n <h6 class=\"modal-title\" id=\"syncmodalLabel\" i18n=\"Title unsynced changes\">Unsynced changes</h6>\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" i18n-aria-label=\"@@close\"></button>\r\n </div>\r\n <div class=\"modal-body p-0\">\r\n <ul class=\"list-group list-group-flush bg-none\">\r\n <li *ngFor=\"let request of requests$ | async\"\r\n class=\"list-group-item px-3\">\r\n <p class=\"mb-1\">\r\n <i *ngIf=\"!(repo.isLoadingOne(request.id) | async)\"\r\n [ngClass]=\"[ 'bi me-1', request.icon ]\"></i>\r\n <app-spinner *ngIf=\"repo.isLoadingOne(request.id) | async\"></app-spinner>\r\n {{ request.title }}\r\n </p>\r\n <p class=\"small text-secondary mb-0\">\r\n {{ request.date | timing }}\r\n <span *ngIf=\"request.hasDependency\"\r\n class=\"text-primary ms-1\">\r\n <i class=\"bi bi-link-45deg\"></i>\r\n <ng-container i18n=\"Linked to update label\">Linked to another update</ng-container>\r\n </span>\r\n </p>\r\n <p *ngIf=\"!(auth.isAuthenticated$ | async)\"\r\n class=\"small text-danger mt-1 mb-0\">\r\n <i class=\"bi bi-exclamation-triangle\"></i>\r\n <ng-container i18n=\"Sign in to sync label\">Sign in to synchronize</ng-container>\r\n </p>\r\n <p *ngIf=\"(auth.isAuthenticated$ | async) && !request.isCurrentUser\"\r\n class=\"small text-danger mt-1 mb-0\">\r\n <i class=\"bi bi-exclamation-triangle\"></i>\r\n <ng-container i18n=\"Another user changed that message\">This change has been made on this device by another user</ng-container>\r\n </p>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"modal-footer d-flex\">\r\n <button [disabled]=\"repo.isLoading$ | async\"\r\n (click)=\"dismissAll()\"\r\n class=\"btn btn-sm btn-danger w-100\">\r\n <i class=\"bi bi-trash me-1\"></i>\r\n <ng-container i18n=\"Dismiss all button\">Dismiss all</ng-container>\r\n </button>\r\n <button [disabled]=\"repo.isLoading$ | async\"\r\n (click)=\"sync()\"\r\n class=\"btn btn-sm btn-success w-100\">\r\n <i *ngIf=\"!(repo.isLoading$ | async)\"\r\n class=\"bi bi-arrow-repeat me-1\"></i>\r\n <app-spinner *ngIf=\"repo.isLoading$ | async\"\r\n class=\"me-1\"></app-spinner>\r\n Sync\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Modal end -->\r\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { combineLatest, map, Subscription } from 'rxjs';\r\nimport { enterFromBottomAnimation } from 'src/app/modules/shared/helpers/animaions';\r\nimport { ConnectionService } from 'src/app/modules/shared/services/connection.service';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { hasIdPromise, RequestsRepository } from 'src/app/state/requests.repository';\r\nimport { RequestsService } from 'src/app/state/requests.service';\r\n\r\n@Component({\r\n selector: 'app-unsynced-changes',\r\n templateUrl: './unsynced-changes.component.html',\r\n styleUrls: ['./unsynced-changes.component.scss'],\r\n animations: [ enterFromBottomAnimation ]\r\n})\r\nexport class UnsyncedChangesComponent implements OnInit, OnDestroy {\r\n @Input() titleResolver: \r\n (relativeUrl: string, body: any, method: string) => string = (url) => url;\r\n\r\n isDisplayed$ = combineLatest([\r\n this.connection.isOnline$,\r\n this.repo.count$\r\n ]).pipe(\r\n map(([online, count]) => online && count > 0)\r\n );\r\n\r\n requests$ = combineLatest([\r\n this.repo.all$,\r\n this.auth.id$,\r\n this.auth.isAuthenticated$\r\n ]).pipe(\r\n map(([all, id, auth]) => all.map(r => ({\r\n id: r.id,\r\n title: this.titleResolver(\r\n r.url.substring('/api/'.length),\r\n r.body,\r\n r.method\r\n ),\r\n date: r.createdAt,\r\n icon: r.method === 'POST' \r\n ? 'bi-plus-lg text-success'\r\n : 'bi-pencil text-primary',\r\n isCurrentUser: auth && r.userId === id,\r\n hasDependency: hasIdPromise(r.url)\r\n })))\r\n );\r\n\r\n onlineSubscription?: Subscription;\r\n isSynchronizing = false;\r\n\r\n constructor(\r\n public connection: ConnectionService,\r\n public repo: RequestsRepository,\r\n private service: RequestsService,\r\n public auth: AuthRepository,\r\n ) { }\r\n\r\n ngOnDestroy(): void {\r\n this.onlineSubscription?.unsubscribe();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.onlineSubscription = this.isDisplayed$\r\n .subscribe(isReady => {\r\n if (isReady && !this.isSynchronizing) {\r\n this.sync();\r\n }\r\n });\r\n }\r\n\r\n sync() {\r\n this.isSynchronizing = true;\r\n const userId = this.auth.getId();\r\n if (userId) {\r\n this.service.syncAll(userId)\r\n .subscribe({\r\n complete: () => window.location.reload()\r\n });\r\n }\r\n }\r\n\r\n dismissAll() {\r\n this.repo.clear();\r\n window.location.reload();\r\n }\r\n\r\n}\r\n","<router-outlet></router-outlet>\r\n<app-offline-label></app-offline-label>\r\n<app-pwa-install-button></app-pwa-install-button>\r\n<!-- <app-current-trip></app-current-trip> -->\r\n<app-unsynced-changes\r\n *ngIf=\"features.offlineChanges\"\r\n [titleResolver]=\"resolveActionTitle\"\r\n></app-unsynced-changes>\r\n<app-session-over-state\r\n *ngIf=\"isSessionRefreshModalDisplayed$ | async\"\r\n></app-session-over-state>\r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { NavigationEnd, NavigationStart, Router } from '@angular/router';\r\nimport { combineLatest, map } from 'rxjs';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\nimport { UiRepository } from 'src/app/state/ui.repository';\r\nimport { EnvState } from './modules/shared/helpers/env-state';\r\nimport { ConnectionService } from './modules/shared/services/connection.service';\r\nimport { DriverDataPreloaderService } from './modules/truck/services/driver-data-preloader.service';\r\nimport { Location, PopStateEvent } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n})\r\nexport class AppComponent implements OnDestroy, OnInit {\r\n darkModeSubscription = this.ui.isDarkMode$.subscribe((val) =>\r\n this.switchClass('html', 'dark-mode', val)\r\n );\r\n sessionRefreshSubscription = this.auth\r\n .autoRefresh()\r\n .subscribe(() => console.info('Session refreshed'));\r\n sessionExpiredSubscription = this.authRepo.isExpired$.subscribe(() => {\r\n if (!this.router.url.startsWith('/signin')) {\r\n this.ui.setSessionOver();\r\n }\r\n });\r\n menuOpenedSubscription = this.ui.isMenuOpened$.subscribe((val) =>\r\n this.switchClass('body', 'menu-open', val)\r\n );\r\n menuExpandedSubscription = this.ui.isMenuExpanded$.subscribe((val) =>\r\n this.switchClass('body', 'menu-expanded', val)\r\n );\r\n userRoleSubscription = this.authRepo.roles$.subscribe((roles) => {\r\n let body = document.getElementsByTagName('body')[0];\r\n body.classList.forEach((element) => {\r\n if (element.startsWith('user-role-')) {\r\n body.classList.remove(element);\r\n }\r\n });\r\n roles.forEach((role) =>\r\n body.classList.add(`user-role-${role.toLocaleLowerCase()}`)\r\n );\r\n\r\n if (roles.indexOf(UserRoles.Driver) >= 0) {\r\n this.preloader.preloadDrivingModels();\r\n }\r\n });\r\n\r\n isSessionRefreshModalDisplayed$ = combineLatest([\r\n this.ui.isSessionOver$,\r\n this.connection.isOnline$,\r\n ]).pipe(map(([sesionOver, online]) => sesionOver && online));\r\n\r\n features = this.env.features;\r\n\r\n constructor(\r\n private ui: UiRepository,\r\n private auth: AuthService,\r\n private authRepo: AuthRepository,\r\n private router: Router,\r\n private preloader: DriverDataPreloaderService,\r\n public env: EnvState,\r\n private connection: ConnectionService,\r\n private location: Location\r\n ) {}\r\n\r\n ngOnDestroy(): void {\r\n this.darkModeSubscription.unsubscribe();\r\n this.sessionRefreshSubscription.unsubscribe();\r\n this.sessionExpiredSubscription.unsubscribe();\r\n this.menuOpenedSubscription.unsubscribe();\r\n this.menuExpandedSubscription.unsubscribe();\r\n this.userRoleSubscription.unsubscribe();\r\n }\r\n\r\n private lastPoppedUrl?: string;\r\n private yScrollStack: number[] = [];\r\n ngOnInit() {\r\n this.location.subscribe((ev: PopStateEvent) => {\r\n this.lastPoppedUrl = ev.url;\r\n });\r\n this.router.events.subscribe((ev: any) => {\r\n if (ev instanceof NavigationStart) {\r\n if (ev.url != this.lastPoppedUrl)\r\n this.yScrollStack.push(window.scrollY);\r\n } else if (ev instanceof NavigationEnd) {\r\n if (ev.url == this.lastPoppedUrl) {\r\n this.lastPoppedUrl = undefined;\r\n\r\n window.scrollTo(0, this.yScrollStack.pop()!);\r\n } else {\r\n document.getElementById('scrol_anchor')?.scrollIntoView();\r\n }\r\n }\r\n });\r\n }\r\n\r\n switchClass(element: string, className: string, enabled: boolean) {\r\n let elem = document.getElementsByTagName(element)[0];\r\n if (enabled) {\r\n elem.classList.add(className);\r\n } else {\r\n elem.classList.remove(className);\r\n }\r\n }\r\n\r\n resolveActionTitle(relativeUrl: string, body: any, method: string) {\r\n const urlSegments = relativeUrl.split('/');\r\n const urlSegmentsCount = urlSegments.length;\r\n const lastSegment = urlSegments[urlSegmentsCount - 1];\r\n if (lastSegment === 'events') {\r\n switch (body.type) {\r\n case 'DayStart':\r\n return $localize`:Offline event - Day started:Day started`;\r\n case 'DayEnd':\r\n return $localize`:Offline event - Day ended:Day ended`;\r\n case 'Pause':\r\n return $localize`:Offline event - Pause added:Pause added`;\r\n case 'TripStart':\r\n return $localize`:Offline event - Trip started:Trip started`;\r\n case 'TripEnd':\r\n return $localize`:Offline event - Trip ended:Trip ended`;\r\n case 'Unload':\r\n return $localize`:Offline event - Cargo unloaded:Cargo unloaded`;\r\n }\r\n }\r\n if (lastSegment === 'settings') {\r\n return $localize`:Offline event - Personal settings updated:Personal settings updated`;\r\n }\r\n const firstSegment = urlSegments[0];\r\n if (urlSegmentsCount === 1 && firstSegment === 'trips') {\r\n return $localize`:Offline event - Trip initialized:Trip initialized`;\r\n } else if (urlSegmentsCount === 1 && firstSegment === 'workdays') {\r\n return $localize`:Offline event - Day initialized:Day initialized`;\r\n }\r\n let actionNameTitleCase =\r\n firstSegment.charAt(0).toUpperCase() + firstSegment.substring(1);\r\n if (firstSegment === 'workdayevents') {\r\n actionNameTitleCase = $localize`:Offline event - Workday event added or edited:Workday event`;\r\n } else if (firstSegment === 'tripevents') {\r\n actionNameTitleCase = $localize`:Offline event - Trip event added or edited:Trip event`;\r\n }\r\n return `${actionNameTitleCase}: ${method === 'POST' ? 'add' : 'edit'}`;\r\n }\r\n}\r\n","export const environment = {\r\n production: true,\r\n name: \"TurMaster\",\r\n apiUrl: \"/core\",\r\n features: {\r\n news: false,\r\n truck: true,\r\n offlineChanges: true\r\n },\r\n locale: 'da'\r\n};\r\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Directive, InjectionToken, forwardRef, Optional, Inject, ɵisPromise, ɵisObservable, ɵRuntimeError, Self, EventEmitter, Input, Host, SkipSelf, ɵcoerceToBoolean, ChangeDetectorRef, Output, NgModule, Injectable, inject, Version } from '@angular/core';\nimport { ɵgetDOM } from '@angular/common';\nimport { from, forkJoin } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * Base class for all ControlValueAccessor classes defined in Forms package.\n * Contains common logic and utility functions.\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BaseControlValueAccessor {\n constructor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /**\n * The registered callback function called when a change or input event occurs on the input\n * element.\n * @nodoc\n */\n this.onChange = (_) => { };\n /**\n * The registered callback function called when a blur event occurs on the input element.\n * @nodoc\n */\n this.onTouched = () => { };\n }\n /**\n * Helper method that sets a property on a target element using the current Renderer\n * implementation.\n * @nodoc\n */\n setProperty(key, value) {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }\n /**\n * Registers a function called when the control is touched.\n * @nodoc\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = fn;\n }\n /**\n * Sets the \"disabled\" property on the range input element.\n * @nodoc\n */\n setDisabledState(isDisabled) {\n this.setProperty('disabled', isDisabled);\n }\n}\nBaseControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nBaseControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: BaseControlValueAccessor, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BaseControlValueAccessor, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });\n/**\n * Base class for all built-in ControlValueAccessor classes (except DefaultValueAccessor, which is\n * used in case no other CVAs can be found). We use this class to distinguish between default CVA,\n * built-in CVAs and custom CVAs, so that Forms logic can recognize built-in CVAs and treat custom\n * ones with higher priority (when both built-in and custom CVAs are present).\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BuiltInControlValueAccessor extends BaseControlValueAccessor {\n}\nBuiltInControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nBuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{\n type: Directive\n }] });\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nconst NG_VALUE_ACCESSOR = new InjectionToken('NgValueAccessor');\n\nconst CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxControlValueAccessor),\n multi: true,\n};\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass CheckboxControlValueAccessor extends BuiltInControlValueAccessor {\n /**\n * Sets the \"checked\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n this.setProperty('checked', value);\n }\n}\nCheckboxControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: CheckboxControlValueAccessor, selector: \"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.checked)\", \"blur\": \"onTouched()\" } }, providers: [CHECKBOX_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' },\n providers: [CHECKBOX_VALUE_ACCESSOR]\n }]\n }] });\n\nconst DEFAULT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DefaultValueAccessor),\n multi: true\n};\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid() {\n const userAgent = ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';\n return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nconst COMPOSITION_BUFFER_MODE = new InjectionToken('CompositionEventMode');\n/**\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * {@searchKeywords ngDefaultControl}\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * This value accessor is used by default for `<input type=\"text\">` and `<textarea>` elements, but\n * you could also use it for custom components that have similar behavior and do not require special\n * processing. In order to attach the default value accessor to a custom element, add the\n * `ngDefaultControl` attribute as shown below.\n *\n * ```\n * <custom-input-component ngDefaultControl [(ngModel)]=\"value\"></custom-input-component>\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass DefaultValueAccessor extends BaseControlValueAccessor {\n constructor(renderer, elementRef, _compositionMode) {\n super(renderer, elementRef);\n this._compositionMode = _compositionMode;\n /** Whether the user is creating a composition string (IME events). */\n this._composing = false;\n if (this._compositionMode == null) {\n this._compositionMode = !_isAndroid();\n }\n }\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }\n /** @internal */\n _handleInput(value) {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n }\n /** @internal */\n _compositionStart() {\n this._composing = true;\n }\n /** @internal */\n _compositionEnd(value) {\n this._composing = false;\n this._compositionMode && this.onChange(value);\n }\n}\nDefaultValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: COMPOSITION_BUFFER_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nDefaultValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\", host: { listeners: { \"input\": \"$any(this)._handleInput($event.target.value)\", \"blur\": \"onTouched()\", \"compositionstart\": \"$any(this)._compositionStart()\", \"compositionend\": \"$any(this)._compositionEnd($event.target.value)\" } }, providers: [DEFAULT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: DefaultValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n // TODO: vsavkin replace the above selector with the one below it once\n // https://github.com/angular/angular/issues/3011 is implemented\n // selector: '[ngModel],[formControl],[formControlName]',\n host: {\n '(input)': '$any(this)._handleInput($event.target.value)',\n '(blur)': 'onTouched()',\n '(compositionstart)': '$any(this)._compositionStart()',\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n },\n providers: [DEFAULT_VALUE_ACCESSOR]\n }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [COMPOSITION_BUFFER_MODE]\n }] }]; } });\n\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction isEmptyInputValue(value) {\n /**\n * Check if the object is a string or array before evaluating the length attribute.\n * This avoids falsely rejecting objects that contain a custom length attribute.\n * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.\n */\n return value == null ||\n ((typeof value === 'string' || Array.isArray(value)) && value.length === 0);\n}\nfunction hasValidLength(value) {\n // non-strict comparison is intentional, to check for both `null` and `undefined` values\n return value != null && typeof value.length === 'number';\n}\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors | null {\n * return { 'custom': true };\n * }\n * }\n * ```\n *\n * @publicApi\n */\nconst NG_VALIDATORS = new InjectionToken('NgValidators');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n * selector: '[customAsyncValidator]',\n * providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n * validate(control: AbstractControl): Promise<ValidationErrors|null> {\n * return Promise.resolve({'custom': true});\n * }\n * }\n * ```\n *\n * @publicApi\n */\nconst NG_ASYNC_VALIDATORS = new InjectionToken('NgAsyncValidators');\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP = /^(?=.{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])?)*$/;\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nclass Validators {\n /**\n * @description\n * Validator that requires the control's value to be greater than or equal to the provided number.\n *\n * @usageNotes\n *\n * ### Validate against a minimum of 3\n *\n * ```typescript\n * const control = new FormControl(2, Validators.min(3));\n *\n * console.log(control.errors); // {min: {min: 3, actual: 2}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `min` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static min(min) {\n return minValidator(min);\n }\n /**\n * @description\n * Validator that requires the control's value to be less than or equal to the provided number.\n *\n * @usageNotes\n *\n * ### Validate against a maximum of 15\n *\n * ```typescript\n * const control = new FormControl(16, Validators.max(15));\n *\n * console.log(control.errors); // {max: {max: 15, actual: 16}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `max` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static max(max) {\n return maxValidator(max);\n }\n /**\n * @description\n * Validator that requires the control have a non-empty value.\n *\n * @usageNotes\n *\n * ### Validate that the field is non-empty\n *\n * ```typescript\n * const control = new FormControl('', Validators.required);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map with the `required` property\n * if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static required(control) {\n return requiredValidator(control);\n }\n /**\n * @description\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n *\n * @usageNotes\n *\n * ### Validate that the field value is true\n *\n * ```typescript\n * const control = new FormControl('some value', Validators.requiredTrue);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map that contains the `required` property\n * set to `true` if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static requiredTrue(control) {\n return requiredTrueValidator(control);\n }\n /**\n * @description\n * Validator that requires the control's value pass an email validation test.\n *\n * Tests the value using a [regular\n * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n * pattern suitable for common use cases. The pattern is based on the definition of a valid email\n * address in the [WHATWG HTML\n * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address).\n *\n * The differences from the WHATWG version include:\n * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n * - Disallow `local-part` to be longer than 64 characters.\n * - Disallow the whole address to be longer than 254 characters.\n *\n * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n * validate the value against a different pattern.\n *\n * @usageNotes\n *\n * ### Validate that the field matches a valid email pattern\n *\n * ```typescript\n * const control = new FormControl('bad@', Validators.email);\n *\n * console.log(control.errors); // {email: true}\n * ```\n *\n * @returns An error map with the `email` property\n * if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static email(control) {\n return emailValidator(control);\n }\n /**\n * @description\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. This validator is also provided by default if you use the\n * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays. The\n * `minLength` validator logic is also not invoked for values when their `length` property is 0\n * (for example in case of an empty string or an empty array), to support optional controls. You\n * can use the standard `required` validator if empty values should not be considered valid.\n *\n * @usageNotes\n *\n * ### Validate that the field has a minimum of 3 characters\n *\n * ```typescript\n * const control = new FormControl('ng', Validators.minLength(3));\n *\n * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n * ```\n *\n * ```html\n * <input minlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `minlength` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static minLength(minLength) {\n return minLengthValidator(minLength);\n }\n /**\n * @description\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. This validator is also provided by default if you use the\n * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays.\n *\n * @usageNotes\n *\n * ### Validate that the field has maximum of 5 characters\n *\n * ```typescript\n * const control = new FormControl('Angular', Validators.maxLength(5));\n *\n * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n * ```\n *\n * ```html\n * <input maxlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxlength` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static maxLength(maxLength) {\n return maxLengthValidator(maxLength);\n }\n /**\n * @description\n * Validator that requires the control's value to match a regex pattern. This validator is also\n * provided by default if you use the HTML5 `pattern` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field only contains letters or spaces\n *\n * ```typescript\n * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n *\n * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n * ```\n *\n * ```html\n * <input pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * ### Pattern matching with the global or sticky flag\n *\n * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`\n * can produce different results on the same input when validations are run consecutively. This is\n * due to how the behavior of `RegExp.prototype.test` is\n * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)\n * (`RegExp` preserves the index of the last match when the global or sticky flag is used).\n * Due to this behavior, it is recommended that when using\n * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky\n * flag enabled.\n *\n * ```typescript\n * // Not recommended (since the `g` flag is used)\n * const controlOne = new FormControl('1', Validators.pattern(/foo/g));\n *\n * // Good\n * const controlTwo = new FormControl('1', Validators.pattern(/foo/));\n * ```\n *\n * @param pattern A regular expression to be used as is to test the values, or a string.\n * If a string is passed, the `^` character is prepended and the `$` character is\n * appended to the provided string (if not already present), and the resulting regular\n * expression is used to test the values.\n *\n * @returns A validator function that returns an error map with the\n * `pattern` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static pattern(pattern) {\n return patternValidator(pattern);\n }\n /**\n * @description\n * Validator that performs no operation.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static nullValidator(control) {\n return nullValidator(control);\n }\n static compose(validators) {\n return compose(validators);\n }\n /**\n * @description\n * Compose multiple async validators into a single function that returns the union\n * of the individual error objects for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error objects of the async validators if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n static composeAsync(validators) {\n return composeAsync(validators);\n }\n}\n/**\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * See `Validators.min` for additional information.\n */\nfunction minValidator(min) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n return !isNaN(value) && value < min ? { 'min': { 'min': min, 'actual': control.value } } : null;\n };\n}\n/**\n * Validator that requires the control's value to be less than or equal to the provided number.\n * See `Validators.max` for additional information.\n */\nfunction maxValidator(max) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n };\n}\n/**\n * Validator that requires the control have a non-empty value.\n * See `Validators.required` for additional information.\n */\nfunction requiredValidator(control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}\n/**\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n * See `Validators.requiredTrue` for additional information.\n */\nfunction requiredTrueValidator(control) {\n return control.value === true ? null : { 'required': true };\n}\n/**\n * Validator that requires the control's value pass an email validation test.\n * See `Validators.email` for additional information.\n */\nfunction emailValidator(control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}\n/**\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. See `Validators.minLength` for additional information.\n */\nfunction minLengthValidator(minLength) {\n return (control) => {\n if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n // don't validate empty values to allow optional controls\n // don't validate values without `length` property\n return null;\n }\n return control.value.length < minLength ?\n { 'minlength': { 'requiredLength': minLength, 'actualLength': control.value.length } } :\n null;\n };\n}\n/**\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. See `Validators.maxLength` for additional information.\n */\nfunction maxLengthValidator(maxLength) {\n return (control) => {\n return hasValidLength(control.value) && control.value.length > maxLength ?\n { 'maxlength': { 'requiredLength': maxLength, 'actualLength': control.value.length } } :\n null;\n };\n}\n/**\n * Validator that requires the control's value to match a regex pattern.\n * See `Validators.pattern` for additional information.\n */\nfunction patternValidator(pattern) {\n if (!pattern)\n return nullValidator;\n let regex;\n let regexStr;\n if (typeof pattern === 'string') {\n regexStr = '';\n if (pattern.charAt(0) !== '^')\n regexStr += '^';\n regexStr += pattern;\n if (pattern.charAt(pattern.length - 1) !== '$')\n regexStr += '$';\n regex = new RegExp(regexStr);\n }\n else {\n regexStr = pattern.toString();\n regex = pattern;\n }\n return (control) => {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = control.value;\n return regex.test(value) ? null :\n { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };\n };\n}\n/**\n * Function that has `ValidatorFn` shape, but performs no operation.\n */\nfunction nullValidator(control) {\n return null;\n}\nfunction isPresent(o) {\n return o != null;\n}\nfunction toObservable(value) {\n const obs = ɵisPromise(value) ? from(value) : value;\n if (NG_DEV_MODE$1 && !(ɵisObservable(obs))) {\n let errorMessage = `Expected async validator to return Promise or Observable.`;\n // A synchronous validator will return object or null.\n if (typeof value === 'object') {\n errorMessage +=\n ' Are you using a synchronous validator where an async validator is expected?';\n }\n throw new ɵRuntimeError(-1101 /* RuntimeErrorCode.WRONG_VALIDATOR_RETURN_TYPE */, errorMessage);\n }\n return obs;\n}\nfunction mergeErrors(arrayOfErrors) {\n let res = {};\n arrayOfErrors.forEach((errors) => {\n res = errors != null ? { ...res, ...errors } : res;\n });\n return Object.keys(res).length === 0 ? null : res;\n}\nfunction executeValidators(control, validators) {\n return validators.map(validator => validator(control));\n}\nfunction isValidatorFn(validator) {\n return !validator.validate;\n}\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n * as well as represented as a validator class.\n */\nfunction normalizeValidators(validators) {\n return validators.map(validator => {\n return isValidatorFn(validator) ?\n validator :\n ((c) => validator.validate(c));\n });\n}\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\nfunction compose(validators) {\n if (!validators)\n return null;\n const presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n return mergeErrors(executeValidators(control, presentValidators));\n };\n}\n/**\n * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\nfunction composeValidators(validators) {\n return validators != null ? compose(normalizeValidators(validators)) : null;\n}\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\nfunction composeAsync(validators) {\n if (!validators)\n return null;\n const presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n const observables = executeValidators(control, presentValidators).map(toObservable);\n return forkJoin(observables).pipe(map(mergeErrors));\n };\n}\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\nfunction composeAsyncValidators(validators) {\n return validators != null ? composeAsync(normalizeValidators(validators)) :\n null;\n}\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\nfunction mergeValidators(controlValidators, dirValidator) {\n if (controlValidators === null)\n return [dirValidator];\n return Array.isArray(controlValidators) ? [...controlValidators, dirValidator] :\n [controlValidators, dirValidator];\n}\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\nfunction getControlValidators(control) {\n return control._rawValidators;\n}\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\nfunction getControlAsyncValidators(control) {\n return control._rawAsyncValidators;\n}\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\nfunction makeValidatorsArray(validators) {\n if (!validators)\n return [];\n return Array.isArray(validators) ? validators : [validators];\n}\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\nfunction hasValidator(validators, validator) {\n return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of current validators.\n * @returns An array of validators.\n */\nfunction addValidators(validators, currentValidators) {\n const current = makeValidatorsArray(currentValidators);\n const validatorsToAdd = makeValidatorsArray(validators);\n validatorsToAdd.forEach((v) => {\n // Note: if there are duplicate entries in the new validators array,\n // only the first one would be added to the current list of validators.\n // Duplicate ones would be ignored since `hasValidator` would detect\n // the presence of a validator function and we update the current list in place.\n if (!hasValidator(current, v)) {\n current.push(v);\n }\n });\n return current;\n}\nfunction removeValidators(validators, currentValidators) {\n return makeValidatorsArray(currentValidators).filter(v => !hasValidator(validators, v));\n}\n\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nclass AbstractControlDirective {\n constructor() {\n /**\n * Set of synchronous validators as they were provided while calling `setValidators` function.\n * @internal\n */\n this._rawValidators = [];\n /**\n * Set of asynchronous validators as they were provided while calling `setAsyncValidators`\n * function.\n * @internal\n */\n this._rawAsyncValidators = [];\n /*\n * The set of callbacks to be invoked when directive instance is being destroyed.\n */\n this._onDestroyCallbacks = [];\n }\n /**\n * @description\n * Reports the value of the control if it is present, otherwise null.\n */\n get value() {\n return this.control ? this.control.value : null;\n }\n /**\n * @description\n * Reports whether the control is valid. A control is considered valid if no\n * validation errors exist with the current value.\n * If the control is not present, null is returned.\n */\n get valid() {\n return this.control ? this.control.valid : null;\n }\n /**\n * @description\n * Reports whether the control is invalid, meaning that an error exists in the input value.\n * If the control is not present, null is returned.\n */\n get invalid() {\n return this.control ? this.control.invalid : null;\n }\n /**\n * @description\n * Reports whether a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value. If the control is not present, null is\n * returned.\n */\n get pending() {\n return this.control ? this.control.pending : null;\n }\n /**\n * @description\n * Reports whether the control is disabled, meaning that the control is disabled\n * in the UI and is exempt from validation checks and excluded from aggregate\n * values of ancestor controls. If the control is not present, null is returned.\n */\n get disabled() {\n return this.control ? this.control.disabled : null;\n }\n /**\n * @description\n * Reports whether the control is enabled, meaning that the control is included in ancestor\n * calculations of validity or value. If the control is not present, null is returned.\n */\n get enabled() {\n return this.control ? this.control.enabled : null;\n }\n /**\n * @description\n * Reports the control's validation errors. If the control is not present, null is returned.\n */\n get errors() {\n return this.control ? this.control.errors : null;\n }\n /**\n * @description\n * Reports whether the control is pristine, meaning that the user has not yet changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get pristine() {\n return this.control ? this.control.pristine : null;\n }\n /**\n * @description\n * Reports whether the control is dirty, meaning that the user has changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get dirty() {\n return this.control ? this.control.dirty : null;\n }\n /**\n * @description\n * Reports whether the control is touched, meaning that the user has triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get touched() {\n return this.control ? this.control.touched : null;\n }\n /**\n * @description\n * Reports the validation status of the control. Possible values include:\n * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n * If the control is not present, null is returned.\n */\n get status() {\n return this.control ? this.control.status : null;\n }\n /**\n * @description\n * Reports whether the control is untouched, meaning that the user has not yet triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get untouched() {\n return this.control ? this.control.untouched : null;\n }\n /**\n * @description\n * Returns a multicasting observable that emits a validation status whenever it is\n * calculated for the control. If the control is not present, null is returned.\n */\n get statusChanges() {\n return this.control ? this.control.statusChanges : null;\n }\n /**\n * @description\n * Returns a multicasting observable of value changes for the control that emits every time the\n * value of the control changes in the UI or programmatically.\n * If the control is not present, null is returned.\n */\n get valueChanges() {\n return this.control ? this.control.valueChanges : null;\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return null;\n }\n /**\n * Sets synchronous validators for this directive.\n * @internal\n */\n _setValidators(validators) {\n this._rawValidators = validators || [];\n this._composedValidatorFn = composeValidators(this._rawValidators);\n }\n /**\n * Sets asynchronous validators for this directive.\n * @internal\n */\n _setAsyncValidators(validators) {\n this._rawAsyncValidators = validators || [];\n this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);\n }\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators registered with this\n * directive.\n */\n get validator() {\n return this._composedValidatorFn || null;\n }\n /**\n * @description\n * Asynchronous validator function composed of all the asynchronous validators registered with\n * this directive.\n */\n get asyncValidator() {\n return this._composedAsyncValidatorFn || null;\n }\n /**\n * Internal function to register callbacks that should be invoked\n * when directive instance is being destroyed.\n * @internal\n */\n _registerOnDestroy(fn) {\n this._onDestroyCallbacks.push(fn);\n }\n /**\n * Internal function to invoke all registered \"on destroy\" callbacks.\n * Note: calling this function also clears the list of callbacks.\n * @internal\n */\n _invokeOnDestroyCallbacks() {\n this._onDestroyCallbacks.forEach(fn => fn());\n this._onDestroyCallbacks = [];\n }\n /**\n * @description\n * Resets the control with the provided value if the control is present.\n */\n reset(value = undefined) {\n if (this.control)\n this.control.reset(value);\n }\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode, path) {\n return this.control ? this.control.hasError(errorCode, path) : false;\n }\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode, path) {\n return this.control ? this.control.getError(errorCode, path) : null;\n }\n}\n\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nclass ControlContainer extends AbstractControlDirective {\n /**\n * @description\n * The top-level form directive for the control.\n */\n get formDirective() {\n return null;\n }\n /**\n * @description\n * The path to this group.\n */\n get path() {\n return null;\n }\n}\n\n/**\n * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nclass NgControl extends AbstractControlDirective {\n constructor() {\n super(...arguments);\n /**\n * @description\n * The parent form for the control.\n *\n * @internal\n */\n this._parent = null;\n /**\n * @description\n * The name for the control\n */\n this.name = null;\n /**\n * @description\n * The value accessor for the control\n */\n this.valueAccessor = null;\n }\n}\n\n// DO NOT REFACTOR!\n// Each status is represented by a separate function to make sure that\n// advanced Closure Compiler optimizations related to property renaming\n// can work correctly.\nclass AbstractControlStatus {\n constructor(cd) {\n this._cd = cd;\n }\n get isTouched() {\n return !!this._cd?.control?.touched;\n }\n get isUntouched() {\n return !!this._cd?.control?.untouched;\n }\n get isPristine() {\n return !!this._cd?.control?.pristine;\n }\n get isDirty() {\n return !!this._cd?.control?.dirty;\n }\n get isValid() {\n return !!this._cd?.control?.valid;\n }\n get isInvalid() {\n return !!this._cd?.control?.invalid;\n }\n get isPending() {\n return !!this._cd?.control?.pending;\n }\n get isSubmitted() {\n // We check for the `submitted` field from `NgForm` and `FormGroupDirective` classes, but\n // we avoid instanceof checks to prevent non-tree-shakable references to those types.\n return !!this._cd?.submitted;\n }\n}\nconst ngControlStatusHost = {\n '[class.ng-untouched]': 'isUntouched',\n '[class.ng-touched]': 'isTouched',\n '[class.ng-pristine]': 'isPristine',\n '[class.ng-dirty]': 'isDirty',\n '[class.ng-valid]': 'isValid',\n '[class.ng-invalid]': 'isInvalid',\n '[class.ng-pending]': 'isPending',\n};\nconst ngGroupStatusHost = {\n ...ngControlStatusHost,\n '[class.ng-submitted]': 'isSubmitted',\n};\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatus extends AbstractControlStatus {\n constructor(cd) {\n super(cd);\n }\n}\nNgControlStatus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgControlStatus, decorators: [{\n type: Directive,\n args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]\n }], ctorParameters: function () { return [{ type: NgControl, decorators: [{\n type: Self\n }] }]; } });\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc). On groups, this includes the additional\n * class ng-submitted.\n *\n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatusGroup extends AbstractControlStatus {\n constructor(cd) {\n super(cd);\n }\n}\nNgControlStatusGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatusGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\", \"class.ng-submitted\": \"isSubmitted\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgControlStatusGroup, decorators: [{\n type: Directive,\n args: [{\n selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngGroupStatusHost\n }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; } });\n\nconst formControlNameExample = `\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });`;\nconst formGroupNameExample = `\n <div [formGroup]=\"myGroup\">\n <div formGroupName=\"person\">\n <input formControlName=\"firstName\">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });`;\nconst formArrayNameExample = `\n <div [formGroup]=\"myGroup\">\n <div formArrayName=\"cities\">\n <div *ngFor=\"let city of cityArray.controls; index as i\">\n <input [formControlName]=\"i\">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl('SF')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });`;\nconst ngModelGroupExample = `\n <form>\n <div ngModelGroup=\"person\">\n <input [(ngModel)]=\"person.name\" name=\"firstName\">\n </div>\n </form>`;\nconst ngModelWithFormGroupExample = `\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n`;\n\nfunction controlParentException() {\n return new ɵRuntimeError(1050 /* RuntimeErrorCode.FORM_CONTROL_NAME_MISSING_PARENT */, `formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${formControlNameExample}`);\n}\nfunction ngModelGroupException() {\n return new ɵRuntimeError(1051 /* RuntimeErrorCode.FORM_CONTROL_NAME_INSIDE_MODEL_GROUP */, `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${formGroupNameExample}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${ngModelGroupExample}`);\n}\nfunction missingFormException() {\n return new ɵRuntimeError(1052 /* RuntimeErrorCode.FORM_GROUP_MISSING_INSTANCE */, `formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${formControlNameExample}`);\n}\nfunction groupParentException() {\n return new ɵRuntimeError(1053 /* RuntimeErrorCode.FORM_GROUP_NAME_MISSING_PARENT */, `formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${formGroupNameExample}`);\n}\nfunction arrayParentException() {\n return new ɵRuntimeError(1054 /* RuntimeErrorCode.FORM_ARRAY_NAME_MISSING_PARENT */, `formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${formArrayNameExample}`);\n}\nconst disabledAttrWarning = `\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n\n Example:\n // Specify the \\`disabled\\` property at control creation time:\n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n\n // Controls can also be enabled/disabled after creation:\n form.get('first')?.enable();\n form.get('last')?.disable();\n`;\nconst asyncValidatorsDroppedWithOptsWarning = `\n It looks like you're constructing using a FormControl with both an options argument and an\n async validators argument. Mixing these arguments will cause your async validators to be dropped.\n You should either put all your validators in the options object, or in separate validators\n arguments. For example:\n\n // Using validators arguments\n fc = new FormControl(42, Validators.required, myAsyncValidator);\n\n // Using AbstractControlOptions\n fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});\n\n // Do NOT mix them: async validators will be dropped!\n fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);\n`;\nfunction ngModelWarning(directiveName) {\n return `\n It looks like you're using ngModel on the same form field as ${directiveName}.\n Support for using the ngModel input property and ngModelChange event with\n reactive form directives has been deprecated in Angular v6 and will be removed\n in a future version of Angular.\n\n For more information on this, see our API docs here:\n https://angular.io/api/forms/${directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName'}#use-with-ngmodel\n `;\n}\nfunction describeKey(isFormGroup, key) {\n return isFormGroup ? `with name: '${key}'` : `at index: ${key}`;\n}\nfunction noControlsError(isFormGroup) {\n return `\n There are no form controls registered with this ${isFormGroup ? 'group' : 'array'} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `;\n}\nfunction missingControlError(isFormGroup, key) {\n return `Cannot find form control ${describeKey(isFormGroup, key)}`;\n}\nfunction missingControlValueError(isFormGroup, key) {\n return `Must supply a value for form control ${describeKey(isFormGroup, key)}`;\n}\n\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Reports that a control is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nconst VALID = 'VALID';\n/**\n * Reports that a control is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nconst INVALID = 'INVALID';\n/**\n * Reports that a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nconst PENDING = 'PENDING';\n/**\n * Reports that a control is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nconst DISABLED = 'DISABLED';\n/**\n * Gets validators from either an options object or given validators.\n */\nfunction pickValidators(validatorOrOpts) {\n return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n/**\n * Creates validator function by combining provided validators.\n */\nfunction coerceToValidator(validator) {\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n/**\n * Gets async validators from either an options object or given validators.\n */\nfunction pickAsyncValidators(asyncValidator, validatorOrOpts) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (isOptionsObj(validatorOrOpts) && asyncValidator) {\n console.warn(asyncValidatorsDroppedWithOptsWarning);\n }\n }\n return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n/**\n * Creates async validator function by combining provided async validators.\n */\nfunction coerceToAsyncValidator(asyncValidator) {\n return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) :\n asyncValidator || null;\n}\nfunction isOptionsObj(validatorOrOpts) {\n return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n typeof validatorOrOpts === 'object';\n}\nfunction assertControlPresent(parent, isGroup, key) {\n const controls = parent.controls;\n const collection = isGroup ? Object.keys(controls) : controls;\n if (!collection.length) {\n throw new ɵRuntimeError(1000 /* RuntimeErrorCode.NO_CONTROLS */, NG_DEV_MODE ? noControlsError(isGroup) : '');\n }\n if (!controls[key]) {\n throw new ɵRuntimeError(1001 /* RuntimeErrorCode.MISSING_CONTROL */, NG_DEV_MODE ? missingControlError(isGroup, key) : '');\n }\n}\nfunction assertAllValuesPresent(control, isGroup, value) {\n control._forEachChild((_, key) => {\n if (value[key] === undefined) {\n throw new ɵRuntimeError(1002 /* RuntimeErrorCode.MISSING_CONTROL_VALUE */, NG_DEV_MODE ? missingControlValueError(isGroup, key) : '');\n }\n });\n}\n// clang-format on\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * The first type parameter TValue represents the value type of the control (`control.value`).\n * The optional type parameter TRawValue represents the raw value type (`control.getRawValue()`).\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nclass AbstractControl {\n /**\n * Initialize the AbstractControl instance.\n *\n * @param validators The function or array of functions that is used to determine the validity of\n * this control synchronously.\n * @param asyncValidators The function or array of functions that is used to determine validity of\n * this control asynchronously.\n */\n constructor(validators, asyncValidators) {\n /** @internal */\n this._pendingDirty = false;\n /**\n * Indicates that a control has its own pending asynchronous validation in progress.\n *\n * @internal\n */\n this._hasOwnPendingAsyncValidator = false;\n /** @internal */\n this._pendingTouched = false;\n /** @internal */\n this._onCollectionChange = () => { };\n this._parent = null;\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n this.pristine = true;\n /**\n * True if the control is marked as `touched`.\n *\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n this.touched = false;\n /** @internal */\n this._onDisabledChange = [];\n this._assignValidators(validators);\n this._assignAsyncValidators(asyncValidators);\n }\n /**\n * Returns the function that is used to determine the validity of this control synchronously.\n * If multiple validators have been added, this will be a single composed function.\n * See `Validators.compose()` for additional information.\n */\n get validator() {\n return this._composedValidatorFn;\n }\n set validator(validatorFn) {\n this._rawValidators = this._composedValidatorFn = validatorFn;\n }\n /**\n * Returns the function that is used to determine the validity of this control asynchronously.\n * If multiple validators have been added, this will be a single composed function.\n * See `Validators.compose()` for additional information.\n */\n get asyncValidator() {\n return this._composedAsyncValidatorFn;\n }\n set asyncValidator(asyncValidatorFn) {\n this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n }\n /**\n * The parent control.\n */\n get parent() {\n return this._parent;\n }\n /**\n * A control is `valid` when its `status` is `VALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control has passed all of its validation tests,\n * false otherwise.\n */\n get valid() {\n return this.status === VALID;\n }\n /**\n * A control is `invalid` when its `status` is `INVALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control has failed one or more of its validation checks,\n * false otherwise.\n */\n get invalid() {\n return this.status === INVALID;\n }\n /**\n * A control is `pending` when its `status` is `PENDING`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control is in the process of conducting a validation check,\n * false otherwise.\n */\n get pending() {\n return this.status == PENDING;\n }\n /**\n * A control is `disabled` when its `status` is `DISABLED`.\n *\n * Disabled controls are exempt from validation checks and\n * are not included in the aggregate value of their ancestor\n * controls.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control is disabled, false otherwise.\n */\n get disabled() {\n return this.status === DISABLED;\n }\n /**\n * A control is `enabled` as long as its `status` is not `DISABLED`.\n *\n * @returns True if the control has any status other than 'DISABLED',\n * false if the status is 'DISABLED'.\n *\n * @see {@link AbstractControl.status}\n *\n */\n get enabled() {\n return this.status !== DISABLED;\n }\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get dirty() {\n return !this.pristine;\n }\n /**\n * True if the control has not been marked as touched\n *\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get untouched() {\n return !this.touched;\n }\n /**\n * Reports the update strategy of the `AbstractControl` (meaning\n * the event on which the control updates itself).\n * Possible values: `'change'` | `'blur'` | `'submit'`\n * Default value: `'change'`\n */\n get updateOn() {\n return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n }\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this overwrites any existing synchronous validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * If you want to add a new validator without affecting existing ones, consider\n * using `addValidators()` method instead.\n */\n setValidators(validators) {\n this._assignValidators(validators);\n }\n /**\n * Sets the asynchronous validators that are active on this control. Calling this\n * overwrites any existing asynchronous validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * If you want to add a new validator without affecting existing ones, consider\n * using `addAsyncValidators()` method instead.\n */\n setAsyncValidators(validators) {\n this._assignAsyncValidators(validators);\n }\n /**\n * Add a synchronous validator or validators to this control, without affecting other validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * Adding a validator that already exists will have no effect. If duplicate validator functions\n * are present in the `validators` array, only the first instance would be added to a form\n * control.\n *\n * @param validators The new validator function or functions to add to this control.\n */\n addValidators(validators) {\n this.setValidators(addValidators(validators, this._rawValidators));\n }\n /**\n * Add an asynchronous validator or validators to this control, without affecting other\n * validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * Adding a validator that already exists will have no effect.\n *\n * @param validators The new asynchronous validator function or functions to add to this control.\n */\n addAsyncValidators(validators) {\n this.setAsyncValidators(addValidators(validators, this._rawAsyncValidators));\n }\n /**\n * Remove a synchronous validator from this control, without affecting other validators.\n * Validators are compared by function reference; you must pass a reference to the exact same\n * validator function as the one that was originally set. If a provided validator is not found,\n * it is ignored.\n *\n * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<string | null>('', Validators.required);\n * ctrl.removeValidators(Validators.required);\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<string | null>('', minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n *\n * ctrl.removeValidators(minValidator);\n * ```\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * @param validators The validator or validators to remove.\n */\n removeValidators(validators) {\n this.setValidators(removeValidators(validators, this._rawValidators));\n }\n /**\n * Remove an asynchronous validator from this control, without affecting other validators.\n * Validators are compared by function reference; you must pass a reference to the exact same\n * validator function as the one that was originally set. If a provided validator is not found, it\n * is ignored.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * @param validators The asynchronous validator or validators to remove.\n */\n removeAsyncValidators(validators) {\n this.setAsyncValidators(removeValidators(validators, this._rawAsyncValidators));\n }\n /**\n * Check whether a synchronous validator function is present on this control. The provided\n * validator must be a reference to the exact same function that was provided.\n *\n * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<number | null>(0, Validators.required);\n * expect(ctrl.hasValidator(Validators.required)).toEqual(true)\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<number | null>(0, minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n * ```\n *\n * @param validator The validator to check for presence. Compared by function reference.\n * @returns Whether the provided validator was found on this control.\n */\n hasValidator(validator) {\n return hasValidator(this._rawValidators, validator);\n }\n /**\n * Check whether an asynchronous validator function is present on this control. The provided\n * validator must be a reference to the exact same function that was provided.\n *\n * @param validator The asynchronous validator to check for presence. Compared by function\n * reference.\n * @returns Whether the provided asynchronous validator was found on this control.\n */\n hasAsyncValidator(validator) {\n return hasValidator(this._rawAsyncValidators, validator);\n }\n /**\n * Empties out the synchronous validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n clearValidators() {\n this.validator = null;\n }\n /**\n * Empties out the async validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n clearAsyncValidators() {\n this.asyncValidator = null;\n }\n /**\n * Marks the control as `touched`. A control is touched by focus and\n * blur events that do not change the value.\n *\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsTouched(opts = {}) {\n this.touched = true;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched(opts);\n }\n }\n /**\n * Marks the control and all its descendant controls as `touched`.\n * @see `markAsTouched()`\n */\n markAllAsTouched() {\n this.markAsTouched({ onlySelf: true });\n this._forEachChild((control) => control.markAllAsTouched());\n }\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, also marks all children as `untouched`\n * and recalculates the `touched` status of all parent controls.\n *\n * @see `markAsTouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after the marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsUntouched(opts = {}) {\n this.touched = false;\n this._pendingTouched = false;\n this._forEachChild((control) => {\n control.markAsUntouched({ onlySelf: true });\n });\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n /**\n * Marks the control as `dirty`. A control becomes dirty when\n * the control's value is changed through the UI; compare `markAsTouched`.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsDirty(opts = {}) {\n this.pristine = false;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty(opts);\n }\n }\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, marks all children as `pristine`,\n * and recalculates the `pristine` status of all parent\n * controls.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n *\n * @param opts Configuration options that determine how the control emits events after\n * marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n markAsPristine(opts = {}) {\n this.pristine = true;\n this._pendingDirty = false;\n this._forEachChild((control) => {\n control.markAsPristine({ onlySelf: true });\n });\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n /**\n * Marks the control as `pending`.\n *\n * A control is pending while the control performs async validation.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates changes and\n * emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event with the latest status the control is marked pending.\n * When false, no events are emitted.\n *\n */\n markAsPending(opts = {}) {\n this.status = PENDING;\n if (opts.emitEvent !== false) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending(opts);\n }\n }\n /**\n * Disables the control. This means the control is exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n *\n * If the control has children, all children are also disabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control is disabled.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is disabled.\n * When false, no events are emitted.\n */\n disable(opts = {}) {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n this.status = DISABLED;\n this.errors = null;\n this._forEachChild((control) => {\n control.disable({ ...opts, onlySelf: true });\n });\n this._updateValue();\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n this._updateAncestors({ ...opts, skipPristineCheck });\n this._onDisabledChange.forEach((changeFn) => changeFn(true));\n }\n /**\n * Enables the control. This means the control is included in validation checks and\n * the aggregate value of its parent. Its status recalculates based on its value and\n * its validators.\n *\n * By default, if the control has children, all children are enabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configure options that control how the control propagates changes and\n * emits events when marked as untouched\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is enabled.\n * When false, no events are emitted.\n */\n enable(opts = {}) {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n this.status = VALID;\n this._forEachChild((control) => {\n control.enable({ ...opts, onlySelf: true });\n });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n this._updateAncestors({ ...opts, skipPristineCheck });\n this._onDisabledChange.forEach((changeFn) => changeFn(false));\n }\n _updateAncestors(opts) {\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n if (!opts.skipPristineCheck) {\n this._parent._updatePristine();\n }\n this._parent._updateTouched();\n }\n }\n /**\n * Sets the parent of the control\n *\n * @param parent The new parent.\n */\n setParent(parent) {\n this._parent = parent;\n }\n /**\n * The raw value of this control. For most control implementations, the raw value will include\n * disabled children.\n */\n getRawValue() {\n return this.value;\n }\n /**\n * Recalculates the value and validation status of the control.\n *\n * By default, it also updates the value and validity of its ancestors.\n *\n * @param opts Configuration options determine how the control propagates changes and emits events\n * after updates and validity checks are applied.\n * * `onlySelf`: When true, only update this control. When false or not supplied,\n * update all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is updated.\n * When false, no events are emitted.\n */\n updateValueAndValidity(opts = {}) {\n this._setInitialStatus();\n this._updateValue();\n if (this.enabled) {\n this._cancelExistingSubscription();\n this.errors = this._runValidator();\n this.status = this._calculateStatus();\n if (this.status === VALID || this.status === PENDING) {\n this._runAsyncValidator(opts.emitEvent);\n }\n }\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n }\n }\n /** @internal */\n _updateTreeValidity(opts = { emitEvent: true }) {\n this._forEachChild((ctrl) => ctrl._updateTreeValidity(opts));\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n }\n _setInitialStatus() {\n this.status = this._allControlsDisabled() ? DISABLED : VALID;\n }\n _runValidator() {\n return this.validator ? this.validator(this) : null;\n }\n _runAsyncValidator(emitEvent) {\n if (this.asyncValidator) {\n this.status = PENDING;\n this._hasOwnPendingAsyncValidator = true;\n const obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription = obs.subscribe((errors) => {\n this._hasOwnPendingAsyncValidator = false;\n // This will trigger the recalculation of the validation status, which depends on\n // the state of the asynchronous validation (whether it is in progress or not). So, it is\n // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n this.setErrors(errors, { emitEvent });\n });\n }\n }\n _cancelExistingSubscription() {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n this._hasOwnPendingAsyncValidator = false;\n }\n }\n /**\n * Sets errors on a form control when running validations manually, rather than automatically.\n *\n * Calling `setErrors` also updates the validity of the parent control.\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control errors are set.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event after the errors are set.\n *\n * @usageNotes\n *\n * ### Manually set the errors for a control\n *\n * ```\n * const login = new FormControl('someLogin');\n * login.setErrors({\n * notUnique: true\n * });\n *\n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({ notUnique: true });\n *\n * login.setValue('someOtherLogin');\n *\n * expect(login.valid).toEqual(true);\n * ```\n */\n setErrors(errors, opts = {}) {\n this.errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false);\n }\n /**\n * Retrieves a child control given the control's name or path.\n *\n * @param path A dot-delimited string or array of string/number values that define the path to the\n * control. If a string is provided, passing it as a string literal will result in improved type\n * information. Likewise, if an array is provided, passing it `as const` will cause improved type\n * information to be available.\n *\n * @usageNotes\n * ### Retrieve a nested control\n *\n * For example, to get a `name` control nested within a `person` sub-group:\n *\n * * `this.form.get('person.name');`\n *\n * -OR-\n *\n * * `this.form.get(['person', 'name'] as const);` // `as const` gives improved typings\n *\n * ### Retrieve a control in a FormArray\n *\n * When accessing an element inside a FormArray, you can use an element index.\n * For example, to get a `price` control from the first element in an `items` array you can use:\n *\n * * `this.form.get('items.0.price');`\n *\n * -OR-\n *\n * * `this.form.get(['items', 0, 'price']);`\n */\n get(path) {\n let currPath = path;\n if (currPath == null)\n return null;\n if (!Array.isArray(currPath))\n currPath = currPath.split('.');\n if (currPath.length === 0)\n return null;\n return currPath.reduce((control, name) => control && control._find(name), this);\n }\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode, path) {\n const control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n }\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode, path) {\n return !!this.getError(errorCode, path);\n }\n /**\n * Retrieves the top-level ancestor of this control.\n */\n get root() {\n let x = this;\n while (x._parent) {\n x = x._parent;\n }\n return x;\n }\n /** @internal */\n _updateControlsErrors(emitEvent) {\n this.status = this._calculateStatus();\n if (emitEvent) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent);\n }\n }\n /** @internal */\n _initObservables() {\n this.valueChanges = new EventEmitter();\n this.statusChanges = new EventEmitter();\n }\n _calculateStatus() {\n if (this._allControlsDisabled())\n return DISABLED;\n if (this.errors)\n return INVALID;\n if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING))\n return PENDING;\n if (this._anyControlsHaveStatus(INVALID))\n return INVALID;\n return VALID;\n }\n /** @internal */\n _anyControlsHaveStatus(status) {\n return this._anyControls((control) => control.status === status);\n }\n /** @internal */\n _anyControlsDirty() {\n return this._anyControls((control) => control.dirty);\n }\n /** @internal */\n _anyControlsTouched() {\n return this._anyControls((control) => control.touched);\n }\n /** @internal */\n _updatePristine(opts = {}) {\n this.pristine = !this._anyControlsDirty();\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n /** @internal */\n _updateTouched(opts = {}) {\n this.touched = this._anyControlsTouched();\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n /** @internal */\n _registerOnCollectionChange(fn) {\n this._onCollectionChange = fn;\n }\n /** @internal */\n _setUpdateStrategy(opts) {\n if (isOptionsObj(opts) && opts.updateOn != null) {\n this._updateOn = opts.updateOn;\n }\n }\n /**\n * Check to see if parent has been marked artificially dirty.\n *\n * @internal\n */\n _parentMarkedDirty(onlySelf) {\n const parentDirty = this._parent && this._parent.dirty;\n return !onlySelf && !!parentDirty && !this._parent._anyControlsDirty();\n }\n /** @internal */\n _find(name) {\n return null;\n }\n /**\n * Internal implementation of the `setValidators` method. Needs to be separated out into a\n * different method, because it is called in the constructor and it can break cases where\n * a control is extended.\n */\n _assignValidators(validators) {\n this._rawValidators = Array.isArray(validators) ? validators.slice() : validators;\n this._composedValidatorFn = coerceToValidator(this._rawValidators);\n }\n /**\n * Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a\n * different method, because it is called in the constructor and it can break cases where\n * a control is extended.\n */\n _assignAsyncValidators(validators) {\n this._rawAsyncValidators = Array.isArray(validators) ? validators.slice() : validators;\n this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\n }\n}\n\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key. It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormArray`, and `FormRecord`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * `FormGroup` is intended for use cases where the keys are known ahead of time.\n * If you need to dynamically add and remove controls, use {@link FormRecord} instead.\n *\n * `FormGroup` accepts an optional type parameter `TControl`, which is an object type with inner\n * control types as values.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n *\n * ### The type argument, and optional controls\n *\n * `FormGroup` accepts one generic argument, which is an object containing its inner controls.\n * This type will usually be inferred automatically, but you can always specify it explicitly if you\n * wish.\n *\n * If you have controls that are optional (i.e. they can be removed, you can use the `?` in the\n * type):\n *\n * ```\n * const form = new FormGroup<{\n * first: FormControl<string|null>,\n * middle?: FormControl<string|null>, // Middle name is optional.\n * last: FormControl<string|null>,\n * }>({\n * first: new FormControl('Nancy'),\n * last: new FormControl('Drew'),\n * });\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('')\n * passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n * one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * ### Using a FormGroup with optional controls\n *\n * It is possible to have optional controls in a FormGroup. An optional control can be removed later\n * using `removeControl`, and can be omitted when calling `reset`. Optional controls must be\n * declared optional in the group's type.\n *\n * ```ts\n * const c = new FormGroup<{one?: FormControl<string>}>({\n * one: new FormControl('')\n * });\n * ```\n *\n * Notice that `c.value.one` has type `string|null|undefined`. This is because calling `c.reset({})`\n * without providing the optional key `one` will cause it to become `null`.\n *\n * @publicApi\n */\nclass FormGroup extends AbstractControl {\n /**\n * Creates a new `FormGroup` instance.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(controls, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n this.controls = controls;\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,\n // so we set `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n }\n registerControl(name, control) {\n if (this.controls[name])\n return this.controls[name];\n this.controls[name] = control;\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n }\n addControl(name, control, options = {}) {\n this.registerControl(name, control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n /**\n * Remove a control from this group. In a strongly-typed group, required controls cannot be\n * removed.\n *\n * This method also updates the value and validity of the control.\n *\n * @param name The control name to remove from the collection\n * @param options Specifies whether this FormGroup instance should emit events after a\n * control is removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * removed. When false, no events are emitted.\n */\n removeControl(name, options = {}) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(() => { });\n delete (this.controls[name]);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n setControl(name, control, options = {}) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(() => { });\n delete (this.controls[name]);\n if (control)\n this.registerControl(name, control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n contains(controlName) {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n }\n /**\n * Sets the value of the `FormGroup`. It accepts an object that matches\n * the structure of the group, with control names as keys.\n *\n * @usageNotes\n * ### Set the complete value for the form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n *\n * console.log(form.value); // {first: null, last: null}\n *\n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * ```\n *\n * @throws When strict checks fail, such as setting the value of a control\n * that doesn't exist or if you exclude a value of a control that does exist.\n *\n * @param value The new value for the control that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n */\n setValue(value, options = {}) {\n assertAllValuesPresent(this, true, value);\n Object.keys(value).forEach(name => {\n assertControlPresent(this, true, name);\n this.controls[name].setValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and does its best to match the values to the correct controls\n * in the group.\n *\n * It accepts both super-sets and sub-sets of the group without throwing an error.\n *\n * @usageNotes\n * ### Patch the value for a form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n *\n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * ```\n *\n * @param value The object that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes and\n * emits events after the value is patched.\n * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n * true.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control value\n * is updated. When false, no events are emitted. The configuration options are passed to\n * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n */\n patchValue(value, options = {}) {\n // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n // `patchValue` can be called recursively and inner data structures might have these values, so\n // we just ignore such cases when a field containing FormGroup instance receives `null` or\n // `undefined` as a value.\n if (value == null /* both `null` and `undefined` */)\n return;\n Object.keys(value).forEach(name => {\n // The compiler cannot see through the uninstantiated conditional type of `this.controls`, so\n // `as any` is required.\n const control = this.controls[name];\n if (control) {\n control.patchValue(\n /* Guaranteed to be present, due to the outer forEach. */ value[name], { onlySelf: true, emitEvent: options.emitEvent });\n }\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets\n * the value of all descendants to their default values, or null if no defaults were provided.\n *\n * You reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * is a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * @param value Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the group is reset.\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * @usageNotes\n *\n * ### Reset the form group values\n *\n * ```ts\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * console.log(form.value); // {first: 'first name', last: 'last name'}\n *\n * form.reset({ first: 'name', last: 'last name' });\n *\n * console.log(form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * ### Reset the form group values and disabled status\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n *\n * console.log(form.value); // {last: 'last'}\n * console.log(form.get('first').status); // 'DISABLED'\n * ```\n */\n reset(value = {}, options = {}) {\n this._forEachChild((control, name) => {\n control.reset(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n }\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * Retrieves all values regardless of disabled status.\n */\n getRawValue() {\n return this._reduceChildren({}, (acc, control, name) => {\n acc[name] = control.getRawValue();\n return acc;\n });\n }\n /** @internal */\n _syncPendingControls() {\n let subtreeUpdated = this._reduceChildren(false, (updated, child) => {\n return child._syncPendingControls() ? true : updated;\n });\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n }\n /** @internal */\n _forEachChild(cb) {\n Object.keys(this.controls).forEach(key => {\n // The list of controls can change (for ex. controls might be removed) while the loop\n // is running (as a result of invoking Forms API in `valueChanges` subscription), so we\n // have to null check before invoking the callback.\n const control = this.controls[key];\n control && cb(control, key);\n });\n }\n /** @internal */\n _setUpControls() {\n this._forEachChild((control) => {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n });\n }\n /** @internal */\n _updateValue() {\n this.value = this._reduceValue();\n }\n /** @internal */\n _anyControls(condition) {\n for (const [controlName, control] of Object.entries(this.controls)) {\n if (this.contains(controlName) && condition(control)) {\n return true;\n }\n }\n return false;\n }\n /** @internal */\n _reduceValue() {\n let acc = {};\n return this._reduceChildren(acc, (acc, control, name) => {\n if (control.enabled || this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n }\n /** @internal */\n _reduceChildren(initValue, fn) {\n let res = initValue;\n this._forEachChild((control, name) => {\n res = fn(res, control, name);\n });\n return res;\n }\n /** @internal */\n _allControlsDisabled() {\n for (const controlName of Object.keys(this.controls)) {\n if (this.controls[controlName].enabled) {\n return false;\n }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n }\n /** @internal */\n _find(name) {\n return this.controls.hasOwnProperty(name) ?\n this.controls[name] :\n null;\n }\n}\nconst UntypedFormGroup = FormGroup;\n/**\n * @description\n * Asserts that the given control is an instance of `FormGroup`\n *\n * @publicApi\n */\nconst isFormGroup = (control) => control instanceof FormGroup;\n/**\n * Tracks the value and validity state of a collection of `FormControl` instances, each of which has\n * the same value type.\n *\n * `FormRecord` is very similar to {@link FormGroup}, except it can be used with a dynamic keys,\n * with controls added and removed as needed.\n *\n * `FormRecord` accepts one generic argument, which describes the type of the controls it contains.\n *\n * @usageNotes\n *\n * ```\n * let numbers = new FormRecord({bill: new FormControl('415-123-456')});\n * numbers.addControl('bob', new FormControl('415-234-567'));\n * numbers.removeControl('bill');\n * ```\n *\n * @publicApi\n */\nclass FormRecord extends FormGroup {\n}\n/**\n * @description\n * Asserts that the given control is an instance of `FormRecord`\n *\n * @publicApi\n */\nconst isFormRecord = (control) => control instanceof FormRecord;\n\n/**\n * Token to provide to allow SetDisabledState to always be called when a CVA is added, regardless of\n * whether the control is disabled or enabled.\n *\n * @see `FormsModule.withConfig`\n */\nconst CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', { providedIn: 'root', factory: () => setDisabledStateDefault });\n/**\n * Whether to use the fixed setDisabledState behavior by default.\n */\nconst setDisabledStateDefault = 'always';\nfunction controlPath(name, parent) {\n return [...parent.path, name];\n}\n/**\n * Links a Form control and a Form directive by setting up callbacks (such as `onChange`) on both\n * instances. This function is typically invoked when form directive is being initialized.\n *\n * @param control Form control instance that should be linked.\n * @param dir Directive that should be linked with a given control.\n */\nfunction setUpControl(control, dir, callSetDisabledState = setDisabledStateDefault) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!control)\n _throwError(dir, 'Cannot find control with');\n if (!dir.valueAccessor)\n _throwMissingValueAccessorError(dir);\n }\n setUpValidators(control, dir);\n dir.valueAccessor.writeValue(control.value);\n // The legacy behavior only calls the CVA's `setDisabledState` if the control is disabled.\n // If the `callSetDisabledState` option is set to `always`, then this bug is fixed and\n // the method is always called.\n if (control.disabled || callSetDisabledState === 'always') {\n dir.valueAccessor.setDisabledState?.(control.disabled);\n }\n setUpViewChangePipeline(control, dir);\n setUpModelChangePipeline(control, dir);\n setUpBlurPipeline(control, dir);\n setUpDisabledChangeHandler(control, dir);\n}\n/**\n * Reverts configuration performed by the `setUpControl` control function.\n * Effectively disconnects form control with a given form directive.\n * This function is typically invoked when corresponding form directive is being destroyed.\n *\n * @param control Form control which should be cleaned up.\n * @param dir Directive that should be disconnected from a given control.\n * @param validateControlPresenceOnChange Flag that indicates whether onChange handler should\n * contain asserts to verify that it's not called once directive is destroyed. We need this flag\n * to avoid potentially breaking changes caused by better control cleanup introduced in #39235.\n */\nfunction cleanUpControl(control, dir, validateControlPresenceOnChange = true) {\n const noop = () => {\n if (validateControlPresenceOnChange && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n _noControlError(dir);\n }\n };\n // The `valueAccessor` field is typically defined on FromControl and FormControlName directive\n // instances and there is a logic in `selectValueAccessor` function that throws if it's not the\n // case. We still check the presence of `valueAccessor` before invoking its methods to make sure\n // that cleanup works correctly if app code or tests are setup to ignore the error thrown from\n // `selectValueAccessor`. See https://github.com/angular/angular/issues/40521.\n if (dir.valueAccessor) {\n dir.valueAccessor.registerOnChange(noop);\n dir.valueAccessor.registerOnTouched(noop);\n }\n cleanUpValidators(control, dir);\n if (control) {\n dir._invokeOnDestroyCallbacks();\n control._registerOnCollectionChange(() => { });\n }\n}\nfunction registerOnValidatorChange(validators, onChange) {\n validators.forEach((validator) => {\n if (validator.registerOnValidatorChange)\n validator.registerOnValidatorChange(onChange);\n });\n}\n/**\n * Sets up disabled change handler function on a given form control if ControlValueAccessor\n * associated with a given directive instance supports the `setDisabledState` call.\n *\n * @param control Form control where disabled change handler should be setup.\n * @param dir Corresponding directive instance associated with this control.\n */\nfunction setUpDisabledChangeHandler(control, dir) {\n if (dir.valueAccessor.setDisabledState) {\n const onDisabledChange = (isDisabled) => {\n dir.valueAccessor.setDisabledState(isDisabled);\n };\n control.registerOnDisabledChange(onDisabledChange);\n // Register a callback function to cleanup disabled change handler\n // from a control instance when a directive is destroyed.\n dir._registerOnDestroy(() => {\n control._unregisterOnDisabledChange(onDisabledChange);\n });\n }\n}\n/**\n * Sets up sync and async directive validators on provided form control.\n * This function merges validators from the directive into the validators of the control.\n *\n * @param control Form control where directive validators should be setup.\n * @param dir Directive instance that contains validators to be setup.\n */\nfunction setUpValidators(control, dir) {\n const validators = getControlValidators(control);\n if (dir.validator !== null) {\n control.setValidators(mergeValidators(validators, dir.validator));\n }\n else if (typeof validators === 'function') {\n // If sync validators are represented by a single validator function, we force the\n // `Validators.compose` call to happen by executing the `setValidators` function with\n // an array that contains that function. We need this to avoid possible discrepancies in\n // validators behavior, so sync validators are always processed by the `Validators.compose`.\n // Note: we should consider moving this logic inside the `setValidators` function itself, so we\n // have consistent behavior on AbstractControl API level. The same applies to the async\n // validators logic below.\n control.setValidators([validators]);\n }\n const asyncValidators = getControlAsyncValidators(control);\n if (dir.asyncValidator !== null) {\n control.setAsyncValidators(mergeValidators(asyncValidators, dir.asyncValidator));\n }\n else if (typeof asyncValidators === 'function') {\n control.setAsyncValidators([asyncValidators]);\n }\n // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n const onValidatorChange = () => control.updateValueAndValidity();\n registerOnValidatorChange(dir._rawValidators, onValidatorChange);\n registerOnValidatorChange(dir._rawAsyncValidators, onValidatorChange);\n}\n/**\n * Cleans up sync and async directive validators on provided form control.\n * This function reverts the setup performed by the `setUpValidators` function, i.e.\n * removes directive-specific validators from a given control instance.\n *\n * @param control Form control from where directive validators should be removed.\n * @param dir Directive instance that contains validators to be removed.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpValidators(control, dir) {\n let isControlUpdated = false;\n if (control !== null) {\n if (dir.validator !== null) {\n const validators = getControlValidators(control);\n if (Array.isArray(validators) && validators.length > 0) {\n // Filter out directive validator function.\n const updatedValidators = validators.filter((validator) => validator !== dir.validator);\n if (updatedValidators.length !== validators.length) {\n isControlUpdated = true;\n control.setValidators(updatedValidators);\n }\n }\n }\n if (dir.asyncValidator !== null) {\n const asyncValidators = getControlAsyncValidators(control);\n if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {\n // Filter out directive async validator function.\n const updatedAsyncValidators = asyncValidators.filter((asyncValidator) => asyncValidator !== dir.asyncValidator);\n if (updatedAsyncValidators.length !== asyncValidators.length) {\n isControlUpdated = true;\n control.setAsyncValidators(updatedAsyncValidators);\n }\n }\n }\n }\n // Clear onValidatorChange callbacks by providing a noop function.\n const noop = () => { };\n registerOnValidatorChange(dir._rawValidators, noop);\n registerOnValidatorChange(dir._rawAsyncValidators, noop);\n return isControlUpdated;\n}\nfunction setUpViewChangePipeline(control, dir) {\n dir.valueAccessor.registerOnChange((newValue) => {\n control._pendingValue = newValue;\n control._pendingChange = true;\n control._pendingDirty = true;\n if (control.updateOn === 'change')\n updateControl(control, dir);\n });\n}\nfunction setUpBlurPipeline(control, dir) {\n dir.valueAccessor.registerOnTouched(() => {\n control._pendingTouched = true;\n if (control.updateOn === 'blur' && control._pendingChange)\n updateControl(control, dir);\n if (control.updateOn !== 'submit')\n control.markAsTouched();\n });\n}\nfunction updateControl(control, dir) {\n if (control._pendingDirty)\n control.markAsDirty();\n control.setValue(control._pendingValue, { emitModelToViewChange: false });\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n}\nfunction setUpModelChangePipeline(control, dir) {\n const onChange = (newValue, emitModelEvent) => {\n // control -> view\n dir.valueAccessor.writeValue(newValue);\n // control -> ngModel\n if (emitModelEvent)\n dir.viewToModelUpdate(newValue);\n };\n control.registerOnChange(onChange);\n // Register a callback function to cleanup onChange handler\n // from a control instance when a directive is destroyed.\n dir._registerOnDestroy(() => {\n control._unregisterOnChange(onChange);\n });\n}\n/**\n * Links a FormGroup or FormArray instance and corresponding Form directive by setting up validators\n * present in the view.\n *\n * @param control FormGroup or FormArray instance that should be linked.\n * @param dir Directive that provides view validators.\n */\nfunction setUpFormContainer(control, dir) {\n if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'Cannot find control with');\n setUpValidators(control, dir);\n}\n/**\n * Reverts the setup performed by the `setUpFormContainer` function.\n *\n * @param control FormGroup or FormArray instance that should be cleaned up.\n * @param dir Directive that provided view validators.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpFormContainer(control, dir) {\n return cleanUpValidators(control, dir);\n}\nfunction _noControlError(dir) {\n return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\nfunction _throwError(dir, message) {\n const messageEnd = _describeControlLocation(dir);\n throw new Error(`${message} ${messageEnd}`);\n}\nfunction _describeControlLocation(dir) {\n const path = dir.path;\n if (path && path.length > 1)\n return `path: '${path.join(' -> ')}'`;\n if (path?.[0])\n return `name: '${path}'`;\n return 'unspecified name attribute';\n}\nfunction _throwMissingValueAccessorError(dir) {\n const loc = _describeControlLocation(dir);\n throw new ɵRuntimeError(-1203 /* RuntimeErrorCode.NG_MISSING_VALUE_ACCESSOR */, `No value accessor for form control ${loc}.`);\n}\nfunction _throwInvalidValueAccessorError(dir) {\n const loc = _describeControlLocation(dir);\n throw new ɵRuntimeError(1200 /* RuntimeErrorCode.NG_VALUE_ACCESSOR_NOT_PROVIDED */, `Value accessor was not provided as an array for form control with ${loc}. ` +\n `Check that the \\`NG_VALUE_ACCESSOR\\` token is configured as a \\`multi: true\\` provider.`);\n}\nfunction isPropertyUpdated(changes, viewModel) {\n if (!changes.hasOwnProperty('model'))\n return false;\n const change = changes['model'];\n if (change.isFirstChange())\n return true;\n return !Object.is(viewModel, change.currentValue);\n}\nfunction isBuiltInAccessor(valueAccessor) {\n // Check if a given value accessor is an instance of a class that directly extends\n // `BuiltInControlValueAccessor` one.\n return Object.getPrototypeOf(valueAccessor.constructor) === BuiltInControlValueAccessor;\n}\nfunction syncPendingControls(form, directives) {\n form._syncPendingControls();\n directives.forEach((dir) => {\n const control = dir.control;\n if (control.updateOn === 'submit' && control._pendingChange) {\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n }\n });\n}\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nfunction selectValueAccessor(dir, valueAccessors) {\n if (!valueAccessors)\n return null;\n if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwInvalidValueAccessorError(dir);\n let defaultAccessor = undefined;\n let builtinAccessor = undefined;\n let customAccessor = undefined;\n valueAccessors.forEach((v) => {\n if (v.constructor === DefaultValueAccessor) {\n defaultAccessor = v;\n }\n else if (isBuiltInAccessor(v)) {\n if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'More than one built-in value accessor matches form control with');\n builtinAccessor = v;\n }\n else {\n if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'More than one custom value accessor matches form control with');\n customAccessor = v;\n }\n });\n if (customAccessor)\n return customAccessor;\n if (builtinAccessor)\n return builtinAccessor;\n if (defaultAccessor)\n return defaultAccessor;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _throwError(dir, 'No valid value accessor for form control with');\n }\n return null;\n}\nfunction removeListItem$1(list, el) {\n const index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\n// TODO(kara): remove after deprecation period\nfunction _ngModelWarning(name, type, instance, warningConfig) {\n if (warningConfig === 'never')\n return;\n if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n console.warn(ngModelWarning(name));\n type._ngModelWarningSentOnce = true;\n instance._ngModelWarningSent = true;\n }\n}\n\nconst formDirectiveProvider$1 = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgForm)\n};\nconst resolvedPromise$1 = (() => Promise.resolve())();\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags. You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful. Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n * <input name=\"one\" ngModel> <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * ### Native DOM validation UI\n *\n * In order to prevent the native DOM form validation UI from interfering with Angular's form\n * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever\n * `FormModule` or `ReactiveFormModule` are imported into the application.\n * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the\n * `ngNativeValidate` attribute to the `<form>` element:\n *\n * ```html\n * <form ngNativeValidate>\n * ...\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgForm extends ControlContainer {\n constructor(validators, asyncValidators, callSetDisabledState) {\n super();\n this.callSetDisabledState = callSetDisabledState;\n /**\n * @description\n * Returns whether the form submission has been triggered.\n */\n this.submitted = false;\n this._directives = new Set();\n /**\n * @description\n * Event emitter for the \"ngSubmit\" event\n */\n this.ngSubmit = new EventEmitter();\n this.form =\n new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n }\n /** @nodoc */\n ngAfterViewInit() {\n this._setUpdateStrategy();\n }\n /**\n * @description\n * The directive instance.\n */\n get formDirective() {\n return this;\n }\n /**\n * @description\n * The internal `FormGroup` instance.\n */\n get control() {\n return this.form;\n }\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it is always an empty array.\n */\n get path() {\n return [];\n }\n /**\n * @description\n * Returns a map of the controls in this group.\n */\n get controls() {\n return this.form.controls;\n }\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `NgModel` directive instance.\n */\n addControl(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n dir.control =\n container.registerControl(dir.name, dir.control);\n setUpControl(dir.control, dir, this.callSetDisabledState);\n dir.control.updateValueAndValidity({ emitEvent: false });\n this._directives.add(dir);\n });\n }\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n *\n * @param dir The `NgModel` directive instance.\n */\n getControl(dir) {\n return this.form.get(dir.path);\n }\n /**\n * @description\n * Removes the `NgModel` instance from the internal list of directives\n *\n * @param dir The `NgModel` directive instance.\n */\n removeControl(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n this._directives.delete(dir);\n });\n }\n /**\n * @description\n * Adds a new `NgModelGroup` directive instance to the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n addFormGroup(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n const group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({ emitEvent: false });\n });\n }\n /**\n * @description\n * Removes the `NgModelGroup` directive instance from the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n removeFormGroup(dir) {\n resolvedPromise$1.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n }\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n getFormGroup(dir) {\n return this.form.get(dir.path);\n }\n /**\n * Sets the new value for the provided `NgControl` directive.\n *\n * @param dir The `NgControl` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir, value) {\n resolvedPromise$1.then(() => {\n const ctrl = this.form.get(dir.path);\n ctrl.setValue(value);\n });\n }\n /**\n * @description\n * Sets the value for this `FormGroup`.\n *\n * @param value The new value\n */\n setValue(value) {\n this.control.setValue(value);\n }\n /**\n * @description\n * Method called when the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event) {\n this.submitted = true;\n syncPendingControls(this.form, this._directives);\n this.ngSubmit.emit($event);\n // Forms with `method=\"dialog\"` have some special behavior\n // that won't reload the page and that shouldn't be prevented.\n return $event?.target?.method === 'dialog';\n }\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset() {\n this.resetForm();\n }\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value = undefined) {\n this.form.reset(value);\n this.submitted = false;\n }\n _setUpdateStrategy() {\n if (this.options && this.options.updateOn != null) {\n this.form._updateOn = this.options.updateOn;\n }\n }\n _findContainer(path) {\n path.pop();\n return path.length ? this.form.get(path) : this.form;\n }\n}\nNgForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgForm, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgForm, selector: \"form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]\", inputs: { options: [\"ngFormOptions\", \"options\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider$1], exportAs: [\"ngForm\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgForm, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n providers: [formDirectiveProvider$1],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { options: [{\n type: Input,\n args: ['ngFormOptions']\n }] } });\n\nfunction removeListItem(list, el) {\n const index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\n\nfunction isFormControlState(formState) {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n}\nconst FormControl = (class FormControl extends AbstractControl {\n constructor(\n // formState and defaultValue will only be null if T is nullable\n formState = null, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n /** @publicApi */\n this.defaultValue = null;\n /** @internal */\n this._onChange = [];\n /** @internal */\n this._pendingChange = false;\n this._applyFormState(formState);\n this._setUpdateStrategy(validatorOrOpts);\n this._initObservables();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`.\n // The status should be broadcasted via the `statusChanges` observable, so we set\n // `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n if (isOptionsObj(validatorOrOpts) &&\n (validatorOrOpts.nonNullable || validatorOrOpts.initialValueIsDefault)) {\n if (isFormControlState(formState)) {\n this.defaultValue = formState.value;\n }\n else {\n this.defaultValue = formState;\n }\n }\n }\n setValue(value, options = {}) {\n this.value = this._pendingValue = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach((changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n }\n this.updateValueAndValidity(options);\n }\n patchValue(value, options = {}) {\n this.setValue(value, options);\n }\n reset(formState = this.defaultValue, options = {}) {\n this._applyFormState(formState);\n this.markAsPristine(options);\n this.markAsUntouched(options);\n this.setValue(this.value, options);\n this._pendingChange = false;\n }\n /** @internal */\n _updateValue() { }\n /** @internal */\n _anyControls(condition) {\n return false;\n }\n /** @internal */\n _allControlsDisabled() {\n return this.disabled;\n }\n registerOnChange(fn) {\n this._onChange.push(fn);\n }\n /** @internal */\n _unregisterOnChange(fn) {\n removeListItem(this._onChange, fn);\n }\n registerOnDisabledChange(fn) {\n this._onDisabledChange.push(fn);\n }\n /** @internal */\n _unregisterOnDisabledChange(fn) {\n removeListItem(this._onDisabledChange, fn);\n }\n /** @internal */\n _forEachChild(cb) { }\n /** @internal */\n _syncPendingControls() {\n if (this.updateOn === 'submit') {\n if (this._pendingDirty)\n this.markAsDirty();\n if (this._pendingTouched)\n this.markAsTouched();\n if (this._pendingChange) {\n this.setValue(this._pendingValue, { onlySelf: true, emitModelToViewChange: false });\n return true;\n }\n }\n return false;\n }\n _applyFormState(formState) {\n if (isFormControlState(formState)) {\n this.value = this._pendingValue = formState.value;\n formState.disabled ? this.disable({ onlySelf: true, emitEvent: false }) :\n this.enable({ onlySelf: true, emitEvent: false });\n }\n else {\n this.value = this._pendingValue = formState;\n }\n }\n});\nconst UntypedFormControl = FormControl;\n/**\n * @description\n * Asserts that the given control is an instance of `FormControl`\n *\n * @publicApi\n */\nconst isFormControl = (control) => control instanceof FormControl;\n\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nclass AbstractFormGroupDirective extends ControlContainer {\n /** @nodoc */\n ngOnInit() {\n this._checkParentType();\n // Register the group with its parent group.\n this.formDirective.addFormGroup(this);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.formDirective) {\n // Remove the group from its parent group.\n this.formDirective.removeFormGroup(this);\n }\n }\n /**\n * @description\n * The `FormGroup` bound to this directive.\n */\n get control() {\n return this.formDirective.getFormGroup(this);\n }\n /**\n * @description\n * The path to this group from the top-level directive.\n */\n get path() {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n /** @internal */\n _checkParentType() { }\n}\nAbstractFormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nAbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{\n type: Directive\n }] });\n\nfunction modelParentException() {\n return new ɵRuntimeError(1350 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP */, `\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive \"formControlName\" instead. Example:\n\n ${formControlNameExample}\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n ${ngModelWithFormGroupExample}`);\n}\nfunction formGroupNameException() {\n return new ɵRuntimeError(1351 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP_NAME */, `\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${formGroupNameExample}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${ngModelGroupExample}`);\n}\nfunction missingNameException() {\n return new ɵRuntimeError(1352 /* RuntimeErrorCode.NGMODEL_WITHOUT_NAME */, `If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as 'standalone' in ngModelOptions.\n\n Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">`);\n}\nfunction modelGroupParentException() {\n return new ɵRuntimeError(1353 /* RuntimeErrorCode.NGMODELGROUP_IN_FORM_GROUP */, `\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${formGroupNameExample}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${ngModelGroupExample}`);\n}\n\nconst modelGroupProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgModelGroup)\n};\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModelGroup extends AbstractFormGroupDirective {\n constructor(parent, validators, asyncValidators) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /** @internal */\n _checkParentType() {\n if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw modelGroupParentException();\n }\n }\n}\nNgModelGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgModelGroup, deps: [{ token: ControlContainer, host: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgModelGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgModelGroup, selector: \"[ngModelGroup]\", inputs: { name: [\"ngModelGroup\", \"name\"] }, providers: [modelGroupProvider], exportAs: [\"ngModelGroup\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgModelGroup, decorators: [{\n type: Directive,\n args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['ngModelGroup']\n }] } });\n\nconst formControlBinding$1 = {\n provide: NgControl,\n useExisting: forwardRef(() => NgModel)\n};\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have an old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel`s have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve())();\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the domain model's value in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-in-a-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like the validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You can then access the control using the directive's `control` property.\n * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control\n * for direct access. See a full list of properties directly available in\n * `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor`\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,\n * as the parent form syncs the value for you. You access its properties by exporting it into a\n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where\n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n *\n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Using a standalone ngModel within a group\n *\n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n * <input name=\"login\" ngModel placeholder=\"Login\">\n * <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n *\n * ### Setting the ngModel `name` attribute through options\n *\n * The following example shows you an alternate way to set the name attribute. Here,\n * an attribute identified as name is used within a custom form control component. To still be able\n * to specify the NgModel's name, you must specify it using the `ngModelOptions` input instead.\n *\n * ```html\n * <form>\n * <my-custom-form-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n * </my-custom-form-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModel extends NgControl {\n constructor(parent, validators, asyncValidators, valueAccessors, _changeDetectorRef, callSetDisabledState) {\n super();\n this._changeDetectorRef = _changeDetectorRef;\n this.callSetDisabledState = callSetDisabledState;\n this.control = new FormControl();\n /** @internal */\n this._registered = false;\n /**\n * @description\n * Event emitter for producing the `ngModelChange` event after\n * the view model updates.\n */\n this.update = new EventEmitter();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this._checkForErrors();\n if (!this._registered || 'name' in changes) {\n if (this._registered) {\n this._checkName();\n if (this.formDirective) {\n // We can't call `formDirective.removeControl(this)`, because the `name` has already been\n // changed. We also can't reset the name temporarily since the logic in `removeControl`\n // is inside a promise and it won't run immediately. We work around it by giving it an\n // object with the same shape instead.\n const oldName = changes['name'].previousValue;\n this.formDirective.removeControl({ name: oldName, path: this._getPath(oldName) });\n }\n }\n this._setUpControl();\n }\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n this.formDirective && this.formDirective.removeControl(this);\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return this._getPath(this.name);\n }\n /**\n * @description\n * The top-level directive for this control if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value emitted by `ngModelChange`.\n */\n viewToModelUpdate(newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n _setUpControl() {\n this._setUpdateStrategy();\n this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n this._registered = true;\n }\n _setUpdateStrategy() {\n if (this.options && this.options.updateOn != null) {\n this.control._updateOn = this.options.updateOn;\n }\n }\n _isStandalone() {\n return !this._parent || !!(this.options && this.options.standalone);\n }\n _setUpStandalone() {\n setUpControl(this.control, this, this.callSetDisabledState);\n this.control.updateValueAndValidity({ emitEvent: false });\n }\n _checkForErrors() {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n }\n _checkParentType() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective) {\n throw formGroupNameException();\n }\n else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n throw modelParentException();\n }\n }\n }\n _checkName() {\n if (this.options && this.options.name)\n this.name = this.options.name;\n if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw missingNameException();\n }\n }\n _updateValue(value) {\n resolvedPromise.then(() => {\n this.control.setValue(value, { emitViewToModelChange: false });\n this._changeDetectorRef?.markForCheck();\n });\n }\n _updateDisabled(changes) {\n const disabledValue = changes['isDisabled'].currentValue;\n // checking for 0 to avoid breaking change\n const isDisabled = disabledValue !== 0 && ɵcoerceToBoolean(disabledValue);\n resolvedPromise.then(() => {\n if (isDisabled && !this.control.disabled) {\n this.control.disable();\n }\n else if (!isDisabled && this.control.disabled) {\n this.control.enable();\n }\n this._changeDetectorRef?.markForCheck();\n });\n }\n _getPath(controlName) {\n return this._parent ? controlPath(controlName, this._parent) : [controlName];\n }\n}\nNgModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgModel, deps: [{ token: ControlContainer, host: true, optional: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: ChangeDetectorRef, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgModel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: { name: \"name\", isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"], options: [\"ngModelOptions\", \"options\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding$1], exportAs: [\"ngModel\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgModel, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding$1],\n exportAs: 'ngModel'\n }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: i0.ChangeDetectorRef, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ChangeDetectorRef]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { name: [{\n type: Input\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], options: [{\n type: Input,\n args: ['ngModelOptions']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\nclass ɵNgNoValidate {\n}\nɵNgNoValidate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\", host: { attributes: { \"novalidate\": \"\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵNgNoValidate, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' },\n }]\n }] });\n\nconst NUMBER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberValueAccessor),\n multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NumberValueAccessor extends BuiltInControlValueAccessor {\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (value) => {\n fn(value == '' ? null : parseFloat(value));\n };\n }\n}\nNumberValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NumberValueAccessor, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\", host: { listeners: { \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [NUMBER_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NumberValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [NUMBER_VALUE_ACCESSOR]\n }]\n }] });\n\nconst RADIO_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioControlValueAccessor),\n multi: true\n};\nfunction throwNameError() {\n throw new ɵRuntimeError(1202 /* RuntimeErrorCode.NAME_AND_FORM_CONTROL_NAME_MUST_MATCH */, `\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n `);\n}\n/**\n * Internal-only NgModule that works as a host for the `RadioControlRegistry` tree-shakable\n * provider. Note: the `InternalFormsSharedModule` can not be used here directly, since it's\n * declared *after* the `RadioControlRegistry` class and the `providedIn` doesn't support\n * `forwardRef` logic.\n */\nclass RadioControlRegistryModule {\n}\nRadioControlRegistryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistryModule });\nRadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistryModule, decorators: [{\n type: NgModule\n }] });\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\nclass RadioControlRegistry {\n constructor() {\n this._accessors = [];\n }\n /**\n * @description\n * Adds a control to the internal registry. For internal use only.\n */\n add(control, accessor) {\n this._accessors.push([control, accessor]);\n }\n /**\n * @description\n * Removes a control from the internal registry. For internal use only.\n */\n remove(accessor) {\n for (let i = this._accessors.length - 1; i >= 0; --i) {\n if (this._accessors[i][1] === accessor) {\n this._accessors.splice(i, 1);\n return;\n }\n }\n }\n /**\n * @description\n * Selects a radio button. For internal use only.\n */\n select(accessor) {\n this._accessors.forEach((c) => {\n if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n c[1].fireUncheck(accessor.value);\n }\n });\n }\n _isSameGroup(controlPair, accessor) {\n if (!controlPair[0].control)\n return false;\n return controlPair[0]._parent === accessor._control._parent &&\n controlPair[1].name === accessor.name;\n }\n}\nRadioControlRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlRegistry, decorators: [{\n type: Injectable,\n args: [{ providedIn: RadioControlRegistryModule }]\n }] });\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RadioControlValueAccessor extends BuiltInControlValueAccessor {\n constructor(renderer, elementRef, _registry, _injector) {\n super(renderer, elementRef);\n this._registry = _registry;\n this._injector = _injector;\n this.setDisabledStateFired = false;\n /**\n * The registered callback function called when a change event occurs on the input element.\n * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n * to override the `onChange` function (which expects 1 argument) in the parent\n * `BaseControlValueAccessor` class.\n * @nodoc\n */\n this.onChange = () => { };\n this.callSetDisabledState = inject(CALL_SET_DISABLED_STATE, { optional: true }) ?? setDisabledStateDefault;\n }\n /** @nodoc */\n ngOnInit() {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n }\n /** @nodoc */\n ngOnDestroy() {\n this._registry.remove(this);\n }\n /**\n * Sets the \"checked\" property value on the radio input element.\n * @nodoc\n */\n writeValue(value) {\n this._state = value === this.value;\n this.setProperty('checked', this._state);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this._fn = fn;\n this.onChange = () => {\n fn(this.value);\n this._registry.select(this);\n };\n }\n /** @nodoc */\n setDisabledState(isDisabled) {\n /**\n * `setDisabledState` is supposed to be called whenever the disabled state of a control changes,\n * including upon control creation. However, a longstanding bug caused the method to not fire\n * when an *enabled* control was attached. This bug was fixed in v15 in #47576.\n *\n * This had a side effect: previously, it was possible to instantiate a reactive form control\n * with `[attr.disabled]=true`, even though the the corresponding control was enabled in the\n * model. This resulted in a mismatch between the model and the DOM. Now, because\n * `setDisabledState` is always called, the value in the DOM will be immediately overwritten\n * with the \"correct\" enabled value.\n *\n * However, the fix also created an exceptional case: radio buttons. Because Reactive Forms\n * models the entire group of radio buttons as a single `FormControl`, there is no way to\n * control the disabled state for individual radios, so they can no longer be configured as\n * disabled. Thus, we keep the old behavior for radio buttons, so that `[attr.disabled]`\n * continues to work. Specifically, we drop the first call to `setDisabledState` if `disabled`\n * is `false`, and we are not in legacy mode.\n */\n if (this.setDisabledStateFired || isDisabled ||\n this.callSetDisabledState === 'whenDisabledForLegacyCode') {\n this.setProperty('disabled', isDisabled);\n }\n this.setDisabledStateFired = true;\n }\n /**\n * Sets the \"value\" on the radio input element and unchecks it.\n *\n * @param value\n */\n fireUncheck(value) {\n this.writeValue(value);\n }\n _checkName() {\n if (this.name && this.formControlName && this.name !== this.formControlName &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwNameError();\n }\n if (!this.name && this.formControlName)\n this.name = this.formControlName;\n }\n}\nRadioControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });\nRadioControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: RadioControlValueAccessor, selector: \"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]\", inputs: { name: \"name\", formControlName: \"formControlName\", value: \"value\" }, host: { listeners: { \"change\": \"onChange()\", \"blur\": \"onTouched()\" } }, providers: [RADIO_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RadioControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },\n providers: [RADIO_VALUE_ACCESSOR]\n }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: RadioControlRegistry }, { type: i0.Injector }]; }, propDecorators: { name: [{\n type: Input\n }], formControlName: [{\n type: Input\n }], value: [{\n type: Input\n }] } });\n\nconst RANGE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RangeValueAccessor),\n multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RangeValueAccessor extends BuiltInControlValueAccessor {\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value) {\n this.setProperty('value', parseFloat(value));\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (value) => {\n fn(value == '' ? null : parseFloat(value));\n };\n }\n}\nRangeValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: RangeValueAccessor, selector: \"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.value)\", \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [RANGE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RangeValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [RANGE_VALUE_ACCESSOR]\n }]\n }] });\n\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nconst NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken('NgModelWithFormControlWarning');\nconst formControlBinding = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlDirective)\n};\n/**\n * @description\n * Synchronizes a standalone `FormControl` instance to a form control element.\n *\n * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives was deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * The following example shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlDirective extends NgControl {\n /**\n * @description\n * Triggers a warning in dev mode that this input should not be used with reactive forms.\n */\n set isDisabled(isDisabled) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(disabledAttrWarning);\n }\n }\n constructor(validators, asyncValidators, valueAccessors, _ngModelWarningConfig, callSetDisabledState) {\n super();\n this._ngModelWarningConfig = _ngModelWarningConfig;\n this.callSetDisabledState = callSetDisabledState;\n /** @deprecated as of v6 */\n this.update = new EventEmitter();\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n this._ngModelWarningSent = false;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this._isControlChanged(changes)) {\n const previousForm = changes['form'].previousValue;\n if (previousForm) {\n cleanUpControl(previousForm, this, /* validateControlPresenceOnChange */ false);\n }\n setUpControl(this.form, this, this.callSetDisabledState);\n this.form.updateValueAndValidity({ emitEvent: false });\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n }\n this.form.setValue(this.model);\n this.viewModel = this.model;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.form) {\n cleanUpControl(this.form, this, /* validateControlPresenceOnChange */ false);\n }\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return [];\n }\n /**\n * @description\n * The `FormControl` bound to this directive.\n */\n get control() {\n return this.form;\n }\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n viewToModelUpdate(newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n _isControlChanged(changes) {\n return changes.hasOwnProperty('form');\n }\n}\n/**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlDirective. Used to support warning config of \"once\".\n *\n * @internal\n */\nFormControlDirective._ngModelWarningSentOnce = false;\nFormControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormControlDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: FormControlDirective, selector: \"[formControl]\", inputs: { form: [\"formControl\", \"form\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormControlDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { form: [{\n type: Input,\n args: ['formControl']\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\nconst formDirectiveProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupDirective)\n};\n/**\n * @description\n *\n * Binds an existing `FormGroup` or `FormRecord` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`/`FormRecord`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormGroupDirective extends ControlContainer {\n constructor(validators, asyncValidators, callSetDisabledState) {\n super();\n this.callSetDisabledState = callSetDisabledState;\n /**\n * @description\n * Reports whether the form submission has been triggered.\n */\n this.submitted = false;\n /**\n * Callback that should be invoked when controls in FormGroup or FormArray collection change\n * (added or removed). This callback triggers corresponding DOM updates.\n */\n this._onCollectionChange = () => this._updateDomValue();\n /**\n * @description\n * Tracks the list of added `FormControlName` instances\n */\n this.directives = [];\n /**\n * @description\n * Tracks the `FormGroup` bound to this directive.\n */\n this.form = null;\n /**\n * @description\n * Emits an event when the form submission has been triggered.\n */\n this.ngSubmit = new EventEmitter();\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n this._oldForm = this.form;\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.form) {\n cleanUpValidators(this.form, this);\n // Currently the `onCollectionChange` callback is rewritten each time the\n // `_registerOnCollectionChange` function is invoked. The implication is that cleanup should\n // happen *only* when the `onCollectionChange` callback was set by this directive instance.\n // Otherwise it might cause overriding a callback of some other directive instances. We should\n // consider updating this logic later to make it similar to how `onChange` callbacks are\n // handled, see https://github.com/angular/angular/issues/39732 for additional info.\n if (this.form._onCollectionChange === this._onCollectionChange) {\n this.form._registerOnCollectionChange(() => { });\n }\n }\n }\n /**\n * @description\n * Returns this directive's instance.\n */\n get formDirective() {\n return this;\n }\n /**\n * @description\n * Returns the `FormGroup` bound to this directive.\n */\n get control() {\n return this.form;\n }\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it always an empty array.\n */\n get path() {\n return [];\n }\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `FormControlName` directive instance.\n */\n addControl(dir) {\n const ctrl = this.form.get(dir.path);\n setUpControl(ctrl, dir, this.callSetDisabledState);\n ctrl.updateValueAndValidity({ emitEvent: false });\n this.directives.push(dir);\n return ctrl;\n }\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n *\n * @param dir The `FormControlName` directive instance.\n */\n getControl(dir) {\n return this.form.get(dir.path);\n }\n /**\n * @description\n * Removes the `FormControlName` instance from the internal list of directives\n *\n * @param dir The `FormControlName` directive instance.\n */\n removeControl(dir) {\n cleanUpControl(dir.control || null, dir, /* validateControlPresenceOnChange */ false);\n removeListItem$1(this.directives, dir);\n }\n /**\n * Adds a new `FormGroupName` directive instance to the form.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n addFormGroup(dir) {\n this._setUpFormContainer(dir);\n }\n /**\n * Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the\n * view.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n removeFormGroup(dir) {\n this._cleanUpFormContainer(dir);\n }\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n *\n * @param dir The `FormGroupName` directive instance.\n */\n getFormGroup(dir) {\n return this.form.get(dir.path);\n }\n /**\n * Performs the necessary setup when a `FormArrayName` directive instance is added to the view.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n addFormArray(dir) {\n this._setUpFormContainer(dir);\n }\n /**\n * Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the\n * view.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n removeFormArray(dir) {\n this._cleanUpFormContainer(dir);\n }\n /**\n * @description\n * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n getFormArray(dir) {\n return this.form.get(dir.path);\n }\n /**\n * Sets the new value for the provided `FormControlName` directive.\n *\n * @param dir The `FormControlName` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir, value) {\n const ctrl = this.form.get(dir.path);\n ctrl.setValue(value);\n }\n /**\n * @description\n * Method called with the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event) {\n this.submitted = true;\n syncPendingControls(this.form, this.directives);\n this.ngSubmit.emit($event);\n // Forms with `method=\"dialog\"` have some special behavior that won't reload the page and that\n // shouldn't be prevented. Note that we need to null check the `event` and the `target`, because\n // some internal apps call this method directly with the wrong arguments.\n return $event?.target?.method === 'dialog';\n }\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset() {\n this.resetForm();\n }\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value = undefined) {\n this.form.reset(value);\n this.submitted = false;\n }\n /** @internal */\n _updateDomValue() {\n this.directives.forEach(dir => {\n const oldCtrl = dir.control;\n const newCtrl = this.form.get(dir.path);\n if (oldCtrl !== newCtrl) {\n // Note: the value of the `dir.control` may not be defined, for example when it's a first\n // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).\n cleanUpControl(oldCtrl || null, dir);\n // Check whether new control at the same location inside the corresponding `FormGroup` is an\n // instance of `FormControl` and perform control setup only if that's the case.\n // Note: we don't need to clear the list of directives (`this.directives`) here, it would be\n // taken care of in the `removeControl` method invoked when corresponding `formControlName`\n // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).\n if (isFormControl(newCtrl)) {\n setUpControl(newCtrl, dir, this.callSetDisabledState);\n dir.control = newCtrl;\n }\n }\n });\n this.form._updateTreeValidity({ emitEvent: false });\n }\n _setUpFormContainer(dir) {\n const ctrl = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n // NOTE: this operation looks unnecessary in case no new validators were added in\n // `setUpFormContainer` call. Consider updating this code to match the logic in\n // `_cleanUpFormContainer` function.\n ctrl.updateValueAndValidity({ emitEvent: false });\n }\n _cleanUpFormContainer(dir) {\n if (this.form) {\n const ctrl = this.form.get(dir.path);\n if (ctrl) {\n const isControlUpdated = cleanUpFormContainer(ctrl, dir);\n if (isControlUpdated) {\n // Run validity check only in case a control was updated (i.e. view validators were\n // removed) as removing view validators might cause validity to change.\n ctrl.updateValueAndValidity({ emitEvent: false });\n }\n }\n }\n }\n _updateRegistrations() {\n this.form._registerOnCollectionChange(this._onCollectionChange);\n if (this._oldForm) {\n this._oldForm._registerOnCollectionChange(() => { });\n }\n }\n _updateValidators() {\n setUpValidators(this.form, this);\n if (this._oldForm) {\n cleanUpValidators(this._oldForm, this);\n }\n }\n _checkFormPresent() {\n if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw missingFormException();\n }\n }\n}\nFormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormGroupDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: FormGroupDirective, selector: \"[formGroup]\", inputs: { form: [\"formGroup\", \"form\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormGroupDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[formGroup]',\n providers: [formDirectiveProvider],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n exportAs: 'ngForm'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CALL_SET_DISABLED_STATE]\n }] }]; }, propDecorators: { form: [{\n type: Input,\n args: ['formGroup']\n }], ngSubmit: [{\n type: Output\n }] } });\n\nconst formGroupNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupName)\n};\n/**\n * @description\n *\n * Syncs a nested `FormGroup` or `FormRecord` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` or `FormRecord` to link, and\n * looks for a `FormGroup` or `FormRecord` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the `AbstractControl.get` method to access the\n * associated `FormGroup`\n *\n * ```ts\n * this.form.get('name');\n * ```\n *\n * ### Access individual controls in the group\n *\n * The following example uses the `AbstractControl.get` method to access\n * individual controls within the group using dot syntax.\n *\n * ```ts\n * this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n *\n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormGroupName extends AbstractFormGroupDirective {\n constructor(parent, validators, asyncValidators) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /** @internal */\n _checkParentType() {\n if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw groupParentException();\n }\n }\n}\nFormGroupName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormGroupName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormGroupName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: FormGroupName, selector: \"[formGroupName]\", inputs: { name: [\"formGroupName\", \"name\"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormGroupName, decorators: [{\n type: Directive,\n args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formGroupName']\n }] } });\nconst formArrayNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormArrayName)\n};\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormArrayName extends ControlContainer {\n constructor(parent, validators, asyncValidators) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n /**\n * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n * @throws If the directive does not have a valid parent.\n * @nodoc\n */\n ngOnInit() {\n this._checkParentType();\n this.formDirective.addFormArray(this);\n }\n /**\n * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n * @nodoc\n */\n ngOnDestroy() {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n }\n /**\n * @description\n * The `FormArray` bound to this directive.\n */\n get control() {\n return this.formDirective.getFormArray(this);\n }\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n _checkParentType() {\n if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw arrayParentException();\n }\n }\n}\nFormArrayName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormArrayName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormArrayName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: FormArrayName, selector: \"[formArrayName]\", inputs: { name: [\"formArrayName\", \"name\"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormArrayName, decorators: [{\n type: Directive,\n args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formArrayName']\n }] } });\nfunction _hasInvalidParent(parent) {\n return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName);\n}\n\nconst controlNameBinding = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlName)\n};\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel is deprecated\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlName extends NgControl {\n /**\n * @description\n * Triggers a warning in dev mode that this input should not be used with reactive forms.\n */\n set isDisabled(isDisabled) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(disabledAttrWarning);\n }\n }\n constructor(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n super();\n this._ngModelWarningConfig = _ngModelWarningConfig;\n this._added = false;\n /** @deprecated as of v6 */\n this.update = new EventEmitter();\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular FormControlName instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n this._ngModelWarningSent = false;\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (!this._added)\n this._setUpControl();\n if (isPropertyUpdated(changes, this.viewModel)) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n }\n this.viewModel = this.model;\n this.formDirective.updateModel(this, this.model);\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n }\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n viewToModelUpdate(newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path() {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective() {\n return this._parent ? this._parent.formDirective : null;\n }\n _checkParentType() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective) {\n throw ngModelGroupException();\n }\n else if (!(this._parent instanceof FormGroupName) &&\n !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)) {\n throw controlParentException();\n }\n }\n }\n _setUpControl() {\n this._checkParentType();\n this.control = this.formDirective.addControl(this);\n this._added = true;\n }\n}\n/**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlName. Used to support warning config of \"once\".\n *\n * @internal\n */\nFormControlName._ngModelWarningSentOnce = false;\nFormControlName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormControlName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormControlName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: FormControlName, selector: \"[formControlName]\", inputs: { name: [\"formControlName\", \"name\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [controlNameBinding], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormControlName, decorators: [{\n type: Directive,\n args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formControlName']\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\nconst SELECT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectControlValueAccessor),\n multi: true\n};\nfunction _buildValueString$1(id, value) {\n if (id == null)\n return `${value}`;\n if (value && typeof value === 'object')\n value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\nfunction _extractId$1(valueString) {\n return valueString.split(':')[0];\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\" [formControl]=\"selectedCountriesControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{country.name}}\n * </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n * return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in IE, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event#browser_compatibility\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectControlValueAccessor extends BuiltInControlValueAccessor {\n constructor() {\n super(...arguments);\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n this._compareWith = Object.is;\n }\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n set compareWith(fn) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n /**\n * Sets the \"value\" property on the select element.\n * @nodoc\n */\n writeValue(value) {\n this.value = value;\n const id = this._getOptionId(value);\n const valueString = _buildValueString$1(id, value);\n this.setProperty('value', valueString);\n }\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }\n /** @internal */\n _registerOption() {\n return (this._idCounter++).toString();\n }\n /** @internal */\n _getOptionId(value) {\n for (const id of Array.from(this._optionMap.keys())) {\n if (this._compareWith(this._optionMap.get(id), value))\n return id;\n }\n return null;\n }\n /** @internal */\n _getOptionValue(valueString) {\n const id = _extractId$1(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n }\n}\nSelectControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: SelectControlValueAccessor, selector: \"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SelectControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [SELECT_VALUE_ACCESSOR]\n }]\n }], propDecorators: { compareWith: [{\n type: Input\n }] } });\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgSelectOption {\n constructor(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select)\n this.id = this._select._registerOption();\n }\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n set ngValue(value) {\n if (this._select == null)\n return;\n this._select._optionMap.set(this.id, value);\n this._setElementValue(_buildValueString$1(this.id, value));\n this._select.writeValue(this._select.value);\n }\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n set value(value) {\n this._setElementValue(value);\n if (this._select)\n this._select.writeValue(this._select.value);\n }\n /** @internal */\n _setElementValue(value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\nNgSelectOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSelectOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSelectOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: NgSelectOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NgSelectOption, decorators: [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngValue: [{\n type: Input,\n args: ['ngValue']\n }], value: [{\n type: Input,\n args: ['value']\n }] } });\n\nconst SELECT_MULTIPLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n multi: true\n};\nfunction _buildValueString(id, value) {\n if (id == null)\n return `${value}`;\n if (typeof value === 'string')\n value = `'${value}'`;\n if (value && typeof value === 'object')\n value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\nfunction _extractId(valueString) {\n return valueString.split(':')[0];\n}\n/** Mock interface for HTMLCollection */\nclass HTMLCollection {\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select\n * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using a multi-select control\n *\n * The follow example shows you how to use a multi-select control with a reactive form.\n *\n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{ country.name }}\n * </option>\n * </select>\n * ```\n *\n * ### Customizing option selection\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor {\n constructor() {\n super(...arguments);\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n this._compareWith = Object.is;\n }\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n set compareWith(fn) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n /**\n * Sets the \"value\" property on one or of more of the select's options.\n * @nodoc\n */\n writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }\n /**\n * Registers a function called when the control value changes\n * and writes an array of the selected options.\n * @nodoc\n */\n registerOnChange(fn) {\n this.onChange = (element) => {\n const selected = [];\n const selectedOptions = element.selectedOptions;\n if (selectedOptions !== undefined) {\n const options = selectedOptions;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade to use `options` when `selectedOptions` property is not available.\n // Note: the `selectedOptions` is available in all supported browsers, but the Domino lib\n // doesn't have it currently, see https://github.com/fgnass/domino/issues/177.\n else {\n const options = element.options;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n if (opt.selected) {\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n this.value = selected;\n fn(selected);\n };\n }\n /** @internal */\n _registerOption(value) {\n const id = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n }\n /** @internal */\n _getOptionId(value) {\n for (const id of Array.from(this._optionMap.keys())) {\n if (this._compareWith(this._optionMap.get(id)._value, value))\n return id;\n }\n return null;\n }\n /** @internal */\n _getOptionValue(valueString) {\n const id = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n }\n}\nSelectMultipleControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: SelectMultipleControlValueAccessor, selector: \"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{\n type: Directive,\n args: [{\n selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n }]\n }], propDecorators: { compareWith: [{\n type: Input\n }] } });\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass ɵNgSelectMultipleOption {\n constructor(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select) {\n this.id = this._select._registerOption(this);\n }\n }\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n set ngValue(value) {\n if (this._select == null)\n return;\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n set value(value) {\n if (this._select) {\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n else {\n this._setElementValue(value);\n }\n }\n /** @internal */\n _setElementValue(value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n /** @internal */\n _setSelected(selected) {\n this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\nɵNgSelectMultipleOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵNgSelectMultipleOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectMultipleControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nɵNgSelectMultipleOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: ɵNgSelectMultipleOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngValue: [{\n type: Input,\n args: ['ngValue']\n }], value: [{\n type: Input,\n args: ['value']\n }] } });\n\n/**\n * Method that updates string to integer if not already a number\n *\n * @param value The value to convert to integer.\n * @returns value of parameter converted to number or integer.\n */\nfunction toInteger(value) {\n return typeof value === 'number' ? value : parseInt(value, 10);\n}\n/**\n * Method that ensures that provided value is a float (and converts it to float if needed).\n *\n * @param value The value to convert to float.\n * @returns value of parameter converted to number or float.\n */\nfunction toFloat(value) {\n return typeof value === 'number' ? value : parseFloat(value);\n}\n/**\n * A base class for Validator-based Directives. The class contains common logic shared across such\n * Directives.\n *\n * For internal use only, this class is not intended for use outside of the Forms package.\n */\nclass AbstractValidatorDirective {\n constructor() {\n this._validator = nullValidator;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this.inputName in changes) {\n const input = this.normalizeInput(changes[this.inputName].currentValue);\n this._enabled = this.enabled(input);\n this._validator = this._enabled ? this.createValidator(input) : nullValidator;\n if (this._onChange) {\n this._onChange();\n }\n }\n }\n /** @nodoc */\n validate(control) {\n return this._validator(control);\n }\n /** @nodoc */\n registerOnValidatorChange(fn) {\n this._onChange = fn;\n }\n /**\n * @description\n * Determines whether this validator should be active or not based on an input.\n * Base class implementation checks whether an input is defined (if the value is different from\n * `null` and `undefined`). Validator classes that extend this base class can override this\n * function with the logic specific to a particular validator directive.\n */\n enabled(input) {\n return input != null /* both `null` and `undefined` */;\n }\n}\nAbstractValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nAbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AbstractValidatorDirective, decorators: [{\n type: Directive\n }] });\n/**\n * @description\n * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxValidator),\n multi: true\n};\n/**\n * A directive which installs the {@link MaxValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `max` attribute.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a max validator\n *\n * The following example shows how to add a max validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel max=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'max';\n /** @internal */\n this.normalizeInput = (input) => toFloat(input);\n /** @internal */\n this.createValidator = (max) => maxValidator(max);\n }\n}\nMaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: MaxValidator, selector: \"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]\", inputs: { max: \"max\" }, host: { properties: { \"attr.max\": \"_enabled ? max : null\" } }, providers: [MAX_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MaxValidator, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',\n providers: [MAX_VALIDATOR],\n host: { '[attr.max]': '_enabled ? max : null' }\n }]\n }], propDecorators: { max: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `MinValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinValidator),\n multi: true\n};\n/**\n * A directive which installs the {@link MinValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `min` attribute.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a min validator\n *\n * The following example shows how to add a min validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel min=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'min';\n /** @internal */\n this.normalizeInput = (input) => toFloat(input);\n /** @internal */\n this.createValidator = (min) => minValidator(min);\n }\n}\nMinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: MinValidator, selector: \"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]\", inputs: { min: \"min\" }, host: { properties: { \"attr.min\": \"_enabled ? min : null\" } }, providers: [MIN_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MinValidator, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',\n providers: [MIN_VALIDATOR],\n host: { '[attr.min]': '_enabled ? min : null' }\n }]\n }], propDecorators: { min: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredValidator),\n multi: true\n};\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst CHECKBOX_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxRequiredValidator),\n multi: true\n};\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass RequiredValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'required';\n /** @internal */\n this.normalizeInput = ɵcoerceToBoolean;\n /** @internal */\n this.createValidator = (input) => requiredValidator;\n }\n /** @nodoc */\n enabled(input) {\n return input;\n }\n}\nRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: RequiredValidator, selector: \":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]\", inputs: { required: \"required\" }, host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: RequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n providers: [REQUIRED_VALIDATOR],\n host: { '[attr.required]': '_enabled ? \"\" : null' }\n }]\n }], propDecorators: { required: [{\n type: Input\n }] } });\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an\n * ngModel binding.\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass CheckboxRequiredValidator extends RequiredValidator {\n constructor() {\n super(...arguments);\n /** @internal */\n this.createValidator = (input) => requiredTrueValidator;\n }\n}\nCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: CheckboxRequiredValidator, selector: \"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]\", host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n providers: [CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': '_enabled ? \"\" : null' }\n }]\n }] });\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst EMAIL_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EmailValidator),\n multi: true\n};\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * The email validation is based on the WHATWG HTML specification with some enhancements to\n * incorporate more RFC rules. More information can be found on the [Validators.email\n * page](api/forms/Validators#email).\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel\n * binding.\n *\n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass EmailValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'email';\n /** @internal */\n this.normalizeInput = ɵcoerceToBoolean;\n /** @internal */\n this.createValidator = (input) => emailValidator;\n }\n /** @nodoc */\n enabled(input) {\n return input;\n }\n}\nEmailValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nEmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: EmailValidator, selector: \"[email][formControlName],[email][formControl],[email][ngModel]\", inputs: { email: \"email\" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: EmailValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n }]\n }], propDecorators: { email: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinLengthValidator),\n multi: true\n};\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinLengthValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'minlength';\n /** @internal */\n this.normalizeInput = (input) => toInteger(input);\n /** @internal */\n this.createValidator = (minlength) => minLengthValidator(minlength);\n }\n}\nMinLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: MinLengthValidator, selector: \"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]\", inputs: { minlength: \"minlength\" }, host: { properties: { \"attr.minlength\": \"_enabled ? minlength : null\" } }, providers: [MIN_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MinLengthValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: { '[attr.minlength]': '_enabled ? minlength : null' }\n }]\n }], propDecorators: { minlength: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxLengthValidator),\n multi: true\n};\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxLengthValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'maxlength';\n /** @internal */\n this.normalizeInput = (input) => toInteger(input);\n /** @internal */\n this.createValidator = (maxlength) => maxLengthValidator(maxlength);\n }\n}\nMaxLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: MaxLengthValidator, selector: \"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]\", inputs: { maxlength: \"maxlength\" }, host: { properties: { \"attr.maxlength\": \"_enabled ? maxlength : null\" } }, providers: [MAX_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: MaxLengthValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: { '[attr.maxlength]': '_enabled ? maxlength : null' }\n }]\n }], propDecorators: { maxlength: [{\n type: Input\n }] } });\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst PATTERN_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PatternValidator),\n multi: true\n};\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass PatternValidator extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'pattern';\n /** @internal */\n this.normalizeInput = (input) => input;\n /** @internal */\n this.createValidator = (input) => patternValidator(input);\n }\n}\nPatternValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.9\", type: PatternValidator, selector: \"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]\", inputs: { pattern: \"pattern\" }, host: { properties: { \"attr.pattern\": \"_enabled ? pattern : null\" } }, providers: [PATTERN_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: PatternValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: { '[attr.pattern]': '_enabled ? pattern : null' }\n }]\n }], propDecorators: { pattern: [{\n type: Input\n }] } });\n\nconst SHARED_FORM_DIRECTIVES = [\n ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator,\n];\nconst TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nconst REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nclass ɵInternalFormsSharedModule {\n}\nɵInternalFormsSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵInternalFormsSharedModule, declarations: [ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator], imports: [RadioControlRegistryModule], exports: [ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator] });\nɵInternalFormsSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: SHARED_FORM_DIRECTIVES,\n imports: [RadioControlRegistryModule],\n exports: SHARED_FORM_DIRECTIVES,\n }]\n }] });\n\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` accepts one generic argument, which is the type of the controls inside.\n * If you need a heterogenous array, use {@link UntypedFormArray}.\n *\n * `FormArray` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormGroup`, and `FormRecord`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy'),\n * new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nclass FormArray extends AbstractControl {\n /**\n * Creates a new `FormArray` instance.\n *\n * @param controls An array of child controls. Each child control is given an index\n * where it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(controls, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n this.controls = controls;\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`.\n // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n // to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n }\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to retrieve the control. If `index` is negative, it will wrap\n * around from the back, and if index is greatly negative (less than `-length`), the result is\n * undefined. This behavior is the same as `Array.at(index)`.\n */\n at(index) {\n return this.controls[this._adjustIndex(index)];\n }\n /**\n * Insert a new `AbstractControl` at the end of the array.\n *\n * @param control Form control to be inserted\n * @param options Specifies whether this FormArray instance should emit events after a new\n * control is added.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * inserted. When false, no events are emitted.\n */\n push(control, options = {}) {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n /**\n * Insert a new `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to insert the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), prepends to the array.\n * This behavior is the same as `Array.splice(index, 0, control)`.\n * @param control Form control to be inserted\n * @param options Specifies whether this FormArray instance should emit events after a new\n * control is inserted.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * inserted. When false, no events are emitted.\n */\n insert(index, control, options = {}) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n }\n /**\n * Remove the control at the given `index` in the array.\n *\n * @param index Index in the array to remove the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), removes the first\n * element. This behavior is the same as `Array.splice(index, 1)`.\n * @param options Specifies whether this FormArray instance should emit events after a\n * control is removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * removed. When false, no events are emitted.\n */\n removeAt(index, options = {}) {\n // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0)\n adjustedIndex = 0;\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n this.controls.splice(adjustedIndex, 1);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n }\n /**\n * Replace an existing control.\n *\n * @param index Index in the array to replace the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), replaces the first\n * element. This behavior is the same as `Array.splice(index, 1, control)`.\n * @param control The `AbstractControl` control to replace the existing control\n * @param options Specifies whether this FormArray instance should emit events after an\n * existing control is replaced with a new one.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * replaced with a new one. When false, no events are emitted.\n */\n setControl(index, control, options = {}) {\n // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0)\n adjustedIndex = 0;\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n this.controls.splice(adjustedIndex, 1);\n if (control) {\n this.controls.splice(adjustedIndex, 0, control);\n this._registerControl(control);\n }\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n this._onCollectionChange();\n }\n /**\n * Length of the control array.\n */\n get length() {\n return this.controls.length;\n }\n /**\n * Sets the value of the `FormArray`. It accepts an array that matches\n * the structure of the control.\n *\n * This method performs strict checks, and throws an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n *\n * @usageNotes\n * ### Set the values for the controls in the form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n setValue(value, options = {}) {\n assertAllValuesPresent(this, false, value);\n value.forEach((newValue, index) => {\n assertControlPresent(this, false, index);\n this.at(index).setValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and does its best to match the values to the correct\n * controls in the group.\n *\n * It accepts both super-sets and sub-sets of the array without throwing an error.\n *\n * @usageNotes\n * ### Patch the values for controls in a form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n *\n * @param value Array of latest values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control\n * value is updated. When false, no events are emitted. The configuration options are passed to\n * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n */\n patchValue(value, options = {}) {\n // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n // `patchValue` can be called recursively and inner data structures might have these values,\n // so we just ignore such cases when a field containing FormArray instance receives `null` or\n // `undefined` as a value.\n if (value == null /* both `null` and `undefined` */)\n return;\n value.forEach((newValue, index) => {\n if (this.at(index)) {\n this.at(index).patchValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n }\n });\n this.updateValueAndValidity(options);\n }\n /**\n * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n * value of all descendants to null or null maps.\n *\n * You reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state is a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * @usageNotes\n * ### Reset the values in a form array\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * arr.reset(['name', 'last name']);\n *\n * console.log(arr.value); // ['name', 'last name']\n * ```\n *\n * ### Reset the values in a form array and the disabled status for the first control\n *\n * ```\n * arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n *\n * console.log(arr.value); // ['last']\n * console.log(arr.at(0).status); // 'DISABLED'\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n reset(value = [], options = {}) {\n this._forEachChild((control, index) => {\n control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n }\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * Reports all values regardless of disabled status.\n */\n getRawValue() {\n return this.controls.map((control) => control.getRawValue());\n }\n /**\n * Remove all controls in the `FormArray`.\n *\n * @param options Specifies whether this FormArray instance should emit events after all\n * controls are removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when all controls\n * in this FormArray instance are removed. When false, no events are emitted.\n *\n * @usageNotes\n * ### Remove all elements from a FormArray\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.length); // 2\n *\n * arr.clear();\n * console.log(arr.length); // 0\n * ```\n *\n * It's a simpler and more efficient alternative to removing all elements one by one:\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n *\n * while (arr.length) {\n * arr.removeAt(0);\n * }\n * ```\n */\n clear(options = {}) {\n if (this.controls.length < 1)\n return;\n this._forEachChild((control) => control._registerOnCollectionChange(() => { }));\n this.controls.splice(0);\n this.updateValueAndValidity({ emitEvent: options.emitEvent });\n }\n /**\n * Adjusts a negative index by summing it with the length of the array. For very negative\n * indices, the result may remain negative.\n * @internal\n */\n _adjustIndex(index) {\n return index < 0 ? index + this.length : index;\n }\n /** @internal */\n _syncPendingControls() {\n let subtreeUpdated = this.controls.reduce((updated, child) => {\n return child._syncPendingControls() ? true : updated;\n }, false);\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n }\n /** @internal */\n _forEachChild(cb) {\n this.controls.forEach((control, index) => {\n cb(control, index);\n });\n }\n /** @internal */\n _updateValue() {\n this.value =\n this.controls.filter((control) => control.enabled || this.disabled)\n .map((control) => control.value);\n }\n /** @internal */\n _anyControls(condition) {\n return this.controls.some((control) => control.enabled && condition(control));\n }\n /** @internal */\n _setUpControls() {\n this._forEachChild((control) => this._registerControl(control));\n }\n /** @internal */\n _allControlsDisabled() {\n for (const control of this.controls) {\n if (control.enabled)\n return false;\n }\n return this.controls.length > 0 || this.disabled;\n }\n _registerControl(control) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n }\n /** @internal */\n _find(name) {\n return this.at(name) ?? null;\n }\n}\nconst UntypedFormArray = FormArray;\n/**\n * @description\n * Asserts that the given control is an instance of `FormArray`\n *\n * @publicApi\n */\nconst isFormArray = (control) => control instanceof FormArray;\n\nfunction isAbstractControlOptions(options) {\n return !!options &&\n (options.asyncValidators !== undefined ||\n options.validators !== undefined ||\n options.updateOn !== undefined);\n}\n// clang-format on\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a\n * `FormControl`, `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to\n * build complex forms.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nclass FormBuilder {\n constructor() {\n this.useNonNullable = false;\n }\n /**\n * @description\n * Returns a FormBuilder in which automatically constructed `FormControl` elements\n * have `{nonNullable: true}` and are non-nullable.\n *\n * **Constructing non-nullable controls**\n *\n * When constructing a control, it will be non-nullable, and will reset to its initial value.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.control('Alex'); // FormControl<string>\n * name.reset();\n * console.log(name); // 'Alex'\n * ```\n *\n * **Constructing non-nullable groups or arrays**\n *\n * When constructing a group or array, all automatically created inner controls will be\n * non-nullable, and will reset to their initial values.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.group({who: 'Alex'}); // FormGroup<{who: FormControl<string>}>\n * name.reset();\n * console.log(name); // {who: 'Alex'}\n * ```\n * **Constructing *nullable* fields on groups or arrays**\n *\n * It is still possible to have a nullable field. In particular, any `FormControl` which is\n * *already* constructed will not be altered. For example:\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * // FormGroup<{who: FormControl<string|null>}>\n * let name = nnfb.group({who: new FormControl('Alex')});\n * name.reset(); console.log(name); // {who: null}\n * ```\n *\n * Because the inner control is constructed explicitly by the caller, the builder has\n * no control over how it is created, and cannot exclude the `null`.\n */\n get nonNullable() {\n const nnfb = new FormBuilder();\n nnfb.useNonNullable = true;\n return nnfb;\n }\n group(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n let newOptions = {};\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n newOptions = options;\n }\n else if (options !== null) {\n // `options` are legacy form group options\n newOptions.validators = options.validator;\n newOptions.asyncValidators = options.asyncValidator;\n }\n return new FormGroup(reducedControls, newOptions);\n }\n /**\n * @description\n * Constructs a new `FormRecord` instance. Accepts a single generic argument, which is an object\n * containing all the keys and corresponding inner control types.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormRecord`. The object should have the\n * `AbstractControlOptions` type and might contain the following fields:\n * * `validators`: A synchronous validator function, or an array of validator functions.\n * * `asyncValidators`: A single async validator or array of async validator functions.\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur'\n * | submit').\n */\n record(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormRecord(reducedControls, options);\n }\n /**\n * @description\n * Constructs a new `FormControl` with the given state, validators and options. Sets\n * `{nonNullable: true}` in the options to get a non-nullable control. Otherwise, the\n * control will be nullable. Accepts a single generic argument, which is the type of the\n * control's value.\n *\n * @param formState Initializes the control with an initial state value, or\n * with an object that contains both a value and a disabled status.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or a `FormControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n * </code-example>\n */\n control(formState, validatorOrOpts, asyncValidator) {\n let newOptions = {};\n if (!this.useNonNullable) {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n }\n if (isAbstractControlOptions(validatorOrOpts)) {\n // If the second argument is options, then they are copied.\n newOptions = validatorOrOpts;\n }\n else {\n // If the other arguments are validators, they are copied into an options object.\n newOptions.validators = validatorOrOpts;\n newOptions.asyncValidators = asyncValidator;\n }\n return new FormControl(formState, { ...newOptions, nonNullable: true });\n }\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options. Accepts a single generic argument, which is the type of each control\n * inside the array.\n *\n * @param controls An array of child controls or control configs. Each child control is given an\n * index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of such functions, or an\n * `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions.\n */\n array(controls, validatorOrOpts, asyncValidator) {\n const createdControls = controls.map(c => this._createControl(c));\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormArray(createdControls, validatorOrOpts, asyncValidator);\n }\n /** @internal */\n _reduceControls(controls) {\n const createdControls = {};\n Object.keys(controls).forEach(controlName => {\n createdControls[controlName] = this._createControl(controls[controlName]);\n });\n return createdControls;\n }\n /** @internal */\n _createControl(controls) {\n if (controls instanceof FormControl) {\n return controls;\n }\n else if (controls instanceof AbstractControl) { // A control; just return it\n return controls;\n }\n else if (Array.isArray(controls)) { // ControlConfig Tuple\n const value = controls[0];\n const validator = controls.length > 1 ? controls[1] : null;\n const asyncValidator = controls.length > 2 ? controls[2] : null;\n return this.control(value, validator, asyncValidator);\n }\n else { // T or FormControlState<T>\n return this.control(controls);\n }\n }\n}\nFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/**\n * @description\n * `NonNullableFormBuilder` is similar to {@link FormBuilder}, but automatically constructed\n * {@link FormControl} elements have `{nonNullable: true}` and are non-nullable.\n *\n * @publicApi\n */\nclass NonNullableFormBuilder {\n}\nNonNullableFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NonNullableFormBuilder, providedIn: 'root', useFactory: () => inject(FormBuilder).nonNullable });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NonNullableFormBuilder, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: () => inject(FormBuilder).nonNullable,\n }]\n }] });\n/**\n * UntypedFormBuilder is the same as `FormBuilder`, but it provides untyped controls.\n */\nclass UntypedFormBuilder extends FormBuilder {\n group(controlsConfig, options = null) {\n return super.group(controlsConfig, options);\n }\n /**\n * Like `FormBuilder#control`, except the resulting control is untyped.\n */\n control(formState, validatorOrOpts, asyncValidator) {\n return super.control(formState, validatorOrOpts, asyncValidator);\n }\n /**\n * Like `FormBuilder#array`, except the resulting array is untyped.\n */\n array(controlsConfig, validatorOrOpts, asyncValidator) {\n return super.array(controlsConfig, validatorOrOpts, asyncValidator);\n }\n}\nUntypedFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nUntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UntypedFormBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: UntypedFormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the forms package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('15.2.9');\n\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * Providers associated with this module:\n * * `RadioControlRegistry`\n *\n * @see [Forms Overview](/guide/forms-overview)\n * @see [Template-driven Forms Guide](/guide/forms)\n *\n * @publicApi\n */\nclass FormsModule {\n /**\n * @description\n * Provides options for configuring the forms module.\n *\n * @param opts An object of configuration options\n * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n */\n static withConfig(opts) {\n return {\n ngModule: FormsModule,\n providers: [{\n provide: CALL_SET_DISABLED_STATE,\n useValue: opts.callSetDisabledState ?? setDisabledStateDefault\n }]\n };\n }\n}\nFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });\nFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: FormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n }]\n }] });\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n *\n * Providers associated with this module:\n * * `FormBuilder`\n * * `RadioControlRegistry`\n *\n * @see [Forms Overview](guide/forms-overview)\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nclass ReactiveFormsModule {\n /**\n * @description\n * Provides options for configuring the reactive forms module.\n *\n * @param opts An object of configuration options\n * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n * binding is used with reactive form directives.\n * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n */\n static withConfig(opts) {\n return {\n ngModule: ReactiveFormsModule,\n providers: [\n {\n provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n useValue: opts.warnOnNgModelWithFormControl ?? 'always'\n },\n {\n provide: CALL_SET_DISABLED_STATE,\n useValue: opts.callSetDisabledState ?? setDisabledStateDefault\n }\n ]\n };\n }\n}\nReactiveFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] });\nReactiveFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: ReactiveFormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n }]\n }] });\n\n/**\n * @module\n * @description\n * This module is used for handling user input, by defining and building a `FormGroup` that\n * consists of `FormControl` objects, and mapping them onto the DOM. `FormControl`\n * objects can then be used to read information from the form DOM elements.\n *\n * Forms providers are not included in default providers; you must import these providers\n * explicitly.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormRecord, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NonNullableFormBuilder, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, VERSION, Validators, isFormArray, isFormControl, isFormGroup, isFormRecord, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption };\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n","import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n","import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","import { __awaiter } from 'tslib';\nimport { EventEmitter, Component, forwardRef, ElementRef, NgZone, Input, Output, NgModule } from '@angular/core';\nimport EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog';\nimport { first } from 'rxjs/operators';\nimport { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\n/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport * as ɵngcc0 from '@angular/core';\n\nfunction CKEditorComponent_ng_template_0_Template(rf, ctx) { }\nconst ɵ0 = (val, index) => ('0' + (index).toString(16)).slice(-2);\n// A copy of @ckeditor/ckeditor5-utils/src/uid.js\n// A hash table of hex numbers to avoid using toString() in uid() which is costly.\n// [ '00', '01', '02', ..., 'fe', 'ff' ]\nconst HEX_NUMBERS = new Array(256).fill(0)\n .map(ɵ0);\n/**\n * Returns a unique id. The id starts with an \"e\" character and a randomly generated string of\n * 32 alphanumeric characters.\n *\n * **Note**: The characters the unique id is built from correspond to the hex number notation\n * (from \"0\" to \"9\", from \"a\" to \"f\"). In other words, each id corresponds to an \"e\" followed\n * by 16 8-bit numbers next to each other.\n *\n * @returns An unique id string.\n */\nfunction uid() {\n // Let's create some positive random 32bit integers first.\n //\n // 1. Math.random() is a float between 0 and 1.\n // 2. 0x100000000 is 2^32 = 4294967296.\n // 3. >>> 0 enforces integer (in JS all numbers are floating point).\n //\n // For instance:\n //\t\tMath.random() * 0x100000000 = 3366450031.853859\n // but\n //\t\tMath.random() * 0x100000000 >>> 0 = 3366450031.\n const r1 = Math.random() * 0x100000000 >>> 0;\n const r2 = Math.random() * 0x100000000 >>> 0;\n const r3 = Math.random() * 0x100000000 >>> 0;\n const r4 = Math.random() * 0x100000000 >>> 0;\n // Make sure that id does not start with number.\n return 'e' +\n HEX_NUMBERS[r1 >> 0 & 0xFF] +\n HEX_NUMBERS[r1 >> 8 & 0xFF] +\n HEX_NUMBERS[r1 >> 16 & 0xFF] +\n HEX_NUMBERS[r1 >> 24 & 0xFF] +\n HEX_NUMBERS[r2 >> 0 & 0xFF] +\n HEX_NUMBERS[r2 >> 8 & 0xFF] +\n HEX_NUMBERS[r2 >> 16 & 0xFF] +\n HEX_NUMBERS[r2 >> 24 & 0xFF] +\n HEX_NUMBERS[r3 >> 0 & 0xFF] +\n HEX_NUMBERS[r3 >> 8 & 0xFF] +\n HEX_NUMBERS[r3 >> 16 & 0xFF] +\n HEX_NUMBERS[r3 >> 24 & 0xFF] +\n HEX_NUMBERS[r4 >> 0 & 0xFF] +\n HEX_NUMBERS[r4 >> 8 & 0xFF] +\n HEX_NUMBERS[r4 >> 16 & 0xFF] +\n HEX_NUMBERS[r4 >> 24 & 0xFF];\n}\n\n/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nclass CKEditorComponent {\n constructor(elementRef, ngZone) {\n /**\n * The configuration of the editor.\n * See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html\n * to learn more.\n */\n this.config = {};\n /**\n * The initial data of the editor. Useful when not using the ngModel.\n * See https://angular.io/api/forms/NgModel to learn more.\n */\n this.data = '';\n /**\n * Tag name of the editor component.\n *\n * The default tag is 'div'.\n */\n this.tagName = 'div';\n /**\n * Fires when the editor is ready. It corresponds with the `editor#ready`\n * https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html#event-ready\n * event.\n */\n this.ready = new EventEmitter();\n /**\n * Fires when the content of the editor has changed. It corresponds with the `editor.model.document#change`\n * https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_model_document-Document.html#event-change\n * event.\n */\n this.change = new EventEmitter();\n /**\n * Fires when the editing view of the editor is blurred. It corresponds with the `editor.editing.view.document#blur`\n * https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_view_document-Document.html#event-event:blur\n * event.\n */\n this.blur = new EventEmitter();\n /**\n * Fires when the editing view of the editor is focused. It corresponds with the `editor.editing.view.document#focus`\n * https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_view_document-Document.html#event-event:focus\n * event.\n */\n this.focus = new EventEmitter();\n /**\n * Fires when the editor component crashes.\n */\n this.error = new EventEmitter();\n /**\n * If the component is read–only before the editor instance is created, it remembers that state,\n * so the editor can become read–only once it is ready.\n */\n this.initiallyDisabled = false;\n /**\n * A lock flag preventing from calling the `cvaOnChange()` during setting editor data.\n */\n this.isEditorSettingData = false;\n this.id = uid();\n this.ngZone = ngZone;\n this.elementRef = elementRef;\n }\n /**\n * When set `true`, the editor becomes read-only.\n * See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html#member-isReadOnly\n * to learn more.\n */\n set disabled(isDisabled) {\n this.setDisabledState(isDisabled);\n }\n get disabled() {\n if (this.editorInstance) {\n return this.editorInstance.isReadOnly;\n }\n return this.initiallyDisabled;\n }\n /**\n * The instance of the editor created by this component.\n */\n get editorInstance() {\n let editorWatchdog = this.editorWatchdog;\n if (this.watchdog) {\n // Temporarily use the `_watchdogs` internal map as the `getItem()` method throws\n // an error when the item is not registered yet.\n // See https://github.com/ckeditor/ckeditor5-angular/issues/177.\n editorWatchdog = this.watchdog._watchdogs.get(this.id);\n }\n if (editorWatchdog) {\n return editorWatchdog.editor;\n }\n return null;\n }\n // Implementing the AfterViewInit interface.\n ngAfterViewInit() {\n this.attachToWatchdog();\n }\n // Implementing the OnDestroy interface.\n ngOnDestroy() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.watchdog) {\n yield this.watchdog.remove(this.id);\n }\n else if (this.editorWatchdog && this.editorWatchdog.editor) {\n yield this.editorWatchdog.destroy();\n this.editorWatchdog = undefined;\n }\n });\n }\n // Implementing the ControlValueAccessor interface (only when binding to ngModel).\n writeValue(value) {\n // This method is called with the `null` value when the form resets.\n // A component's responsibility is to restore to the initial state.\n if (value === null) {\n value = '';\n }\n // If already initialized.\n if (this.editorInstance) {\n // The lock mechanism prevents from calling `cvaOnChange()` during changing\n // the editor state. See #139\n this.isEditorSettingData = true;\n this.editorInstance.setData(value);\n this.isEditorSettingData = false;\n }\n // If not, wait for it to be ready; store the data.\n else {\n // If the editor element is already available, then update its content.\n this.data = value;\n // If not, then wait until it is ready\n // and change data only for the first `ready` event.\n this.ready\n .pipe(first())\n .subscribe((editor) => {\n editor.setData(this.data);\n });\n }\n }\n // Implementing the ControlValueAccessor interface (only when binding to ngModel).\n registerOnChange(callback) {\n this.cvaOnChange = callback;\n }\n // Implementing the ControlValueAccessor interface (only when binding to ngModel).\n registerOnTouched(callback) {\n this.cvaOnTouched = callback;\n }\n // Implementing the ControlValueAccessor interface (only when binding to ngModel).\n setDisabledState(isDisabled) {\n // If already initialized.\n if (this.editorInstance) {\n this.editorInstance.isReadOnly = isDisabled;\n }\n // Store the state anyway to use it once the editor is created.\n this.initiallyDisabled = isDisabled;\n }\n /**\n * Creates the editor instance, sets initial editor data, then integrates\n * the editor with the Angular component. This method does not use the `editor.setData()`\n * because of the issue in the collaboration mode (#6).\n */\n attachToWatchdog() {\n const creator = (element, config) => __awaiter(this, void 0, void 0, function* () {\n return this.ngZone.runOutsideAngular(() => __awaiter(this, void 0, void 0, function* () {\n this.elementRef.nativeElement.appendChild(element);\n const editor = yield this.editor.create(element, config);\n if (this.initiallyDisabled) {\n editor.isReadOnly = this.initiallyDisabled;\n }\n this.ngZone.run(() => {\n this.ready.emit(editor);\n });\n this.setUpEditorEvents(editor);\n return editor;\n }));\n });\n const destructor = (editor) => __awaiter(this, void 0, void 0, function* () {\n yield editor.destroy();\n this.elementRef.nativeElement.removeChild(this.editorElement);\n });\n const emitError = () => {\n this.ngZone.run(() => {\n this.error.emit();\n });\n };\n const element = document.createElement(this.tagName);\n const config = this.getConfig();\n this.editorElement = element;\n // Based on the presence of the watchdog decide how to initialize the editor.\n if (this.watchdog) {\n // When the context watchdog is passed add the new item to it based on the passed configuration.\n this.watchdog.add({\n id: this.id,\n type: 'editor',\n creator,\n destructor,\n sourceElementOrData: element,\n config\n });\n this.watchdog.on('itemError', (_, { itemId }) => {\n if (itemId === this.id) {\n emitError();\n }\n });\n }\n else {\n // In the other case create the watchdog by hand to keep the editor running.\n const editorWatchdog = new EditorWatchdog(this.editor);\n editorWatchdog.setCreator(creator);\n editorWatchdog.setDestructor(destructor);\n editorWatchdog.on('error', emitError);\n this.editorWatchdog = editorWatchdog;\n this.editorWatchdog.create(element, config);\n }\n }\n getConfig() {\n if (this.data && this.config.initialData) {\n throw new Error('Editor data should be provided either using `config.initialData` or `data` properties.');\n }\n const config = Object.assign({}, this.config);\n // Merge two possible ways of providing data into the `config.initialData` field.\n const initialData = this.config.initialData || this.data;\n if (initialData) {\n // Define the `config.initialData` only when the initial content is specified.\n config.initialData = initialData;\n }\n return config;\n }\n /**\n * Integrates the editor with the component by attaching related event listeners.\n */\n setUpEditorEvents(editor) {\n const modelDocument = editor.model.document;\n const viewDocument = editor.editing.view.document;\n modelDocument.on('change:data', (evt) => {\n this.ngZone.run(() => {\n if (this.cvaOnChange && !this.isEditorSettingData) {\n const data = editor.getData();\n this.cvaOnChange(data);\n }\n this.change.emit({ event: evt, editor });\n });\n });\n viewDocument.on('focus', (evt) => {\n this.ngZone.run(() => {\n this.focus.emit({ event: evt, editor });\n });\n });\n viewDocument.on('blur', (evt) => {\n this.ngZone.run(() => {\n if (this.cvaOnTouched) {\n this.cvaOnTouched();\n }\n this.blur.emit({ event: evt, editor });\n });\n });\n }\n}\nCKEditorComponent.ɵfac = function CKEditorComponent_Factory(t) { return new (t || CKEditorComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nCKEditorComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: CKEditorComponent, selectors: [[\"ckeditor\"]], inputs: { config: \"config\", data: \"data\", tagName: \"tagName\", disabled: \"disabled\", editor: \"editor\", watchdog: \"watchdog\" }, outputs: { ready: \"ready\", change: \"change\", blur: \"blur\", focus: \"focus\", error: \"error\" }, features: [ɵngcc0.ɵɵProvidersFeature([\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n useExisting: forwardRef(() => CKEditorComponent),\n multi: true\n }\n ])], decls: 1, vars: 0, template: function CKEditorComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, CKEditorComponent_ng_template_0_Template, 0, 0, \"ng-template\");\n } }, encapsulation: 2 });\nCKEditorComponent.ctorParameters = () => [\n { type: ElementRef },\n { type: NgZone }\n];\nCKEditorComponent.propDecorators = {\n editor: [{ type: Input }],\n config: [{ type: Input }],\n data: [{ type: Input }],\n tagName: [{ type: Input }],\n watchdog: [{ type: Input }],\n disabled: [{ type: Input }],\n ready: [{ type: Output }],\n change: [{ type: Output }],\n blur: [{ type: Output }],\n focus: [{ type: Output }],\n error: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CKEditorComponent, [{\n type: Component,\n args: [{\n selector: 'ckeditor',\n template: '<ng-template></ng-template>',\n // Integration with @angular/forms.\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n useExisting: forwardRef(() => CKEditorComponent),\n multi: true\n }\n ]\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.NgZone }]; }, { config: [{\n type: Input\n }], data: [{\n type: Input\n }], tagName: [{\n type: Input\n }], ready: [{\n type: Output\n }], change: [{\n type: Output\n }], blur: [{\n type: Output\n }], focus: [{\n type: Output\n }], error: [{\n type: Output\n }], disabled: [{\n type: Input\n }], editor: [{\n type: Input\n }], watchdog: [{\n type: Input\n }] }); })();\n\n/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nclass CKEditorModule {\n}\nCKEditorModule.ɵfac = function CKEditorModule_Factory(t) { return new (t || CKEditorModule)(); };\nCKEditorModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: CKEditorModule });\nCKEditorModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [FormsModule, CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CKEditorModule, [{\n type: NgModule,\n args: [{\n imports: [FormsModule, CommonModule],\n declarations: [CKEditorComponent],\n exports: [CKEditorComponent]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(CKEditorModule, { declarations: function () { return [CKEditorComponent]; }, imports: function () { return [FormsModule, CommonModule]; }, exports: function () { return [CKEditorComponent]; } }); })();\n\n/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CKEditorComponent, CKEditorModule };\n\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE, sequence, style } from '@angular/animations';\nimport * as i0 from '@angular/core';\nimport { ɵRuntimeError, Injectable } from '@angular/core';\n\nconst LINE_START = '\\n - ';\nfunction invalidTimingValue(exp) {\n return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value \"${exp}\" is invalid.`);\n}\nfunction negativeStepValue() {\n return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');\n}\nfunction negativeDelayValue() {\n return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');\n}\nfunction invalidStyleParams(varName) {\n return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode &&\n `Unable to resolve the local animation param ${varName} in the given list of values`);\n}\nfunction invalidParamValue(varName) {\n return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`);\n}\nfunction invalidNodeType(nodeType) {\n return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);\n}\nfunction invalidCssUnitValue(userProvidedProperty, value) {\n return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n}\nfunction invalidTrigger() {\n return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode &&\n 'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n}\nfunction invalidDefinition() {\n return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');\n}\nfunction invalidState(metadataName, missingSubs) {\n return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode &&\n `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);\n}\nfunction invalidStyleValue(value) {\n return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`);\n}\nfunction invalidProperty(prop) {\n return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode &&\n `The provided animation property \"${prop}\" is not a supported CSS property for animations`);\n}\nfunction invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {\n return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode &&\n `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`);\n}\nfunction invalidKeyframes() {\n return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`);\n}\nfunction invalidOffset() {\n return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);\n}\nfunction keyframeOffsetsOutOfOrder() {\n return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`);\n}\nfunction keyframesMissingOffsets() {\n return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);\n}\nfunction invalidStagger() {\n return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`);\n}\nfunction invalidQuery(selector) {\n return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode &&\n `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`);\n}\nfunction invalidExpression(expr) {\n return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression \"${expr}\" is not supported`);\n}\nfunction invalidTransitionAlias(alias) {\n return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value \"${alias}\" is not supported`);\n}\nfunction validationFailed(errors) {\n return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction buildingFailed(errors) {\n return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerBuildFailed(name, errors) {\n return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode &&\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.map(err => err.message).join('\\n - ')}`);\n}\nfunction animationFailed(errors) {\n return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode &&\n `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction registerFailed(errors) {\n return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode &&\n `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingOrDestroyedAnimation() {\n return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && 'The requested animation doesn\\'t exist or has already been destroyed');\n}\nfunction createAnimationFailed(errors) {\n return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode &&\n `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingPlayer(id) {\n return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`);\n}\nfunction missingTrigger(phase, name) {\n return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode &&\n `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n}\nfunction missingEvent(name) {\n return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode &&\n `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`);\n}\nfunction unsupportedTriggerEvent(phase, name) {\n return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode &&\n `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`);\n}\nfunction unregisteredTrigger(name) {\n return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`);\n}\nfunction triggerTransitionsFailed(errors) {\n return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode &&\n `Unable to process animations due to the following failed trigger transitions\\n ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerParsingFailed(name, errors) {\n return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode &&\n `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction transitionFailed(name, errors) {\n return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\\n ${errors.map(err => err.message).join('\\n- ')}`);\n}\n\n/**\n * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nconst ANIMATABLE_PROP_SET = new Set([\n '-moz-outline-radius',\n '-moz-outline-radius-bottomleft',\n '-moz-outline-radius-bottomright',\n '-moz-outline-radius-topleft',\n '-moz-outline-radius-topright',\n '-ms-grid-columns',\n '-ms-grid-rows',\n '-webkit-line-clamp',\n '-webkit-text-fill-color',\n '-webkit-text-stroke',\n '-webkit-text-stroke-color',\n 'accent-color',\n 'all',\n 'backdrop-filter',\n 'background',\n 'background-color',\n 'background-position',\n 'background-size',\n 'block-size',\n 'border',\n 'border-block-end',\n 'border-block-end-color',\n 'border-block-end-width',\n 'border-block-start',\n 'border-block-start-color',\n 'border-block-start-width',\n 'border-bottom',\n 'border-bottom-color',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'border-bottom-width',\n 'border-color',\n 'border-end-end-radius',\n 'border-end-start-radius',\n 'border-image-outset',\n 'border-image-slice',\n 'border-image-width',\n 'border-inline-end',\n 'border-inline-end-color',\n 'border-inline-end-width',\n 'border-inline-start',\n 'border-inline-start-color',\n 'border-inline-start-width',\n 'border-left',\n 'border-left-color',\n 'border-left-width',\n 'border-radius',\n 'border-right',\n 'border-right-color',\n 'border-right-width',\n 'border-start-end-radius',\n 'border-start-start-radius',\n 'border-top',\n 'border-top-color',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-top-width',\n 'border-width',\n 'bottom',\n 'box-shadow',\n 'caret-color',\n 'clip',\n 'clip-path',\n 'color',\n 'column-count',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-width',\n 'column-width',\n 'columns',\n 'filter',\n 'flex',\n 'flex-basis',\n 'flex-grow',\n 'flex-shrink',\n 'font',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-variation-settings',\n 'font-weight',\n 'gap',\n 'grid-column-gap',\n 'grid-gap',\n 'grid-row-gap',\n 'grid-template-columns',\n 'grid-template-rows',\n 'height',\n 'inline-size',\n 'input-security',\n 'inset',\n 'inset-block',\n 'inset-block-end',\n 'inset-block-start',\n 'inset-inline',\n 'inset-inline-end',\n 'inset-inline-start',\n 'left',\n 'letter-spacing',\n 'line-clamp',\n 'line-height',\n 'margin',\n 'margin-block-end',\n 'margin-block-start',\n 'margin-bottom',\n 'margin-inline-end',\n 'margin-inline-start',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'mask',\n 'mask-border',\n 'mask-position',\n 'mask-size',\n 'max-block-size',\n 'max-height',\n 'max-inline-size',\n 'max-lines',\n 'max-width',\n 'min-block-size',\n 'min-height',\n 'min-inline-size',\n 'min-width',\n 'object-position',\n 'offset',\n 'offset-anchor',\n 'offset-distance',\n 'offset-path',\n 'offset-position',\n 'offset-rotate',\n 'opacity',\n 'order',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'outline-width',\n 'padding',\n 'padding-block-end',\n 'padding-block-start',\n 'padding-bottom',\n 'padding-inline-end',\n 'padding-inline-start',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'perspective',\n 'perspective-origin',\n 'right',\n 'rotate',\n 'row-gap',\n 'scale',\n 'scroll-margin',\n 'scroll-margin-block',\n 'scroll-margin-block-end',\n 'scroll-margin-block-start',\n 'scroll-margin-bottom',\n 'scroll-margin-inline',\n 'scroll-margin-inline-end',\n 'scroll-margin-inline-start',\n 'scroll-margin-left',\n 'scroll-margin-right',\n 'scroll-margin-top',\n 'scroll-padding',\n 'scroll-padding-block',\n 'scroll-padding-block-end',\n 'scroll-padding-block-start',\n 'scroll-padding-bottom',\n 'scroll-padding-inline',\n 'scroll-padding-inline-end',\n 'scroll-padding-inline-start',\n 'scroll-padding-left',\n 'scroll-padding-right',\n 'scroll-padding-top',\n 'scroll-snap-coordinate',\n 'scroll-snap-destination',\n 'scrollbar-color',\n 'shape-image-threshold',\n 'shape-margin',\n 'shape-outside',\n 'tab-size',\n 'text-decoration',\n 'text-decoration-color',\n 'text-decoration-thickness',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-indent',\n 'text-shadow',\n 'text-underline-offset',\n 'top',\n 'transform',\n 'transform-origin',\n 'translate',\n 'vertical-align',\n 'visibility',\n 'width',\n 'word-spacing',\n 'z-index',\n 'zoom',\n]);\n\nfunction isBrowser() {\n return (typeof window !== 'undefined' && typeof window.document !== 'undefined');\n}\nfunction isNode() {\n // Checking only for `process` isn't enough to identify whether or not we're in a Node\n // environment, because Webpack by default will polyfill the `process`. While we can discern\n // that Webpack polyfilled it by looking at `process.browser`, it's very Webpack-specific and\n // might not be future-proof. Instead we look at the stringified version of `process` which\n // is `[object process]` in Node and `[object Object]` when polyfilled.\n return typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n}\nfunction optimizeGroupPlayer(players) {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\nfunction normalizeKeyframes$1(driver, normalizer, element, keyframes, preStyles = new Map(), postStyles = new Map()) {\n const errors = [];\n const normalizedKeyframes = [];\n let previousOffset = -1;\n let previousKeyframe = null;\n keyframes.forEach(kf => {\n const offset = kf.get('offset');\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe = (isSameOffset && previousKeyframe) || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case ɵPRE_STYLE:\n normalizedValue = preStyles.get(prop);\n break;\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop);\n break;\n default:\n normalizedValue =\n normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n const totalTime = player.totalTime;\n const disabled = player.disabled ? true : false;\n const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n const data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) {\n return { element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled };\n}\nfunction getOrSetDefaultValue(map, key, defaultValue) {\n let value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\nlet _contains = (elm1, elm2) => false;\nlet _query = (element, selector, multi) => {\n return [];\n};\nlet _documentElement = null;\nfunction getParentElement(element) {\n const parent = element.parentNode || element.host; // consider host to support shadow DOM\n if (parent === _documentElement) {\n return null;\n }\n return parent;\n}\n// Define utility methods for browsers and platform-server(domino) where Element\n// and utility methods exist.\nconst _isNode = isNode();\nif (_isNode || typeof Element !== 'undefined') {\n if (!isBrowser()) {\n _contains = (elm1, elm2) => elm1.contains(elm2);\n }\n else {\n // Read the document element in an IIFE that's been marked pure to avoid a top-level property\n // read that may prevent tree-shaking.\n _documentElement = /* @__PURE__ */ (() => document.documentElement)();\n _contains = (elm1, elm2) => {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n };\n }\n _query = (element, selector, multi) => {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n };\n}\nfunction containsVendorPrefix(prop) {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\nlet _CACHED_BODY = null;\nlet _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? ('WebkitAppearance' in _CACHED_BODY.style) : false;\n }\n let result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction validateWebAnimatableStyleProperty(prop) {\n return ANIMATABLE_PROP_SET.has(prop);\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nconst containsElement = _contains;\nconst invokeQuery = _query;\nfunction hypenatePropsKeys(original) {\n const newMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\n}\n\n/**\n * @publicApi\n */\nclass NoopAnimationDriver {\n validateStyleProperty(prop) {\n return validateStyleProperty(prop);\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return defaultValue || '';\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {\n return new NoopAnimationPlayer(duration, delay);\n }\n}\nNoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationDriver });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationDriver, decorators: [{\n type: Injectable\n }] });\n/**\n * @publicApi\n */\nclass AnimationDriver {\n}\nAnimationDriver.NOOP = ( /* @__PURE__ */new NoopAnimationDriver());\n\nconst ONE_SECOND = 1000;\nconst SUBSTITUTION_EXPR_START = '{{';\nconst SUBSTITUTION_EXPR_END = '}}';\nconst ENTER_CLASSNAME = 'ng-enter';\nconst LEAVE_CLASSNAME = 'ng-leave';\nconst NG_TRIGGER_CLASSNAME = 'ng-trigger';\nconst NG_TRIGGER_SELECTOR = '.ng-trigger';\nconst NG_ANIMATING_CLASSNAME = 'ng-animating';\nconst NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number')\n return value;\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2)\n return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ?\n timings :\n parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration;\n let delay = 0;\n let easing = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return { duration: 0, delay: 0, easing: '' };\n }\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n }\n else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n return { duration, delay, easing };\n}\nfunction copyObj(obj, destination = {}) {\n Object.keys(obj).forEach(prop => {\n destination[prop] = obj[prop];\n });\n return destination;\n}\nfunction convertToMap(obj) {\n const styleMap = new Map();\n Object.keys(obj).forEach(prop => {\n const val = obj[prop];\n styleMap.set(prop, val);\n });\n return styleMap;\n}\nfunction normalizeKeyframes(keyframes) {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes;\n }\n return keyframes.map(kf => convertToMap(kf));\n}\nfunction normalizeStyles(styles) {\n const normalizedStyles = new Map();\n if (Array.isArray(styles)) {\n styles.forEach(data => copyStyles(data, normalizedStyles));\n }\n else {\n copyStyles(styles, normalizedStyles);\n }\n return normalizedStyles;\n}\nfunction copyStyles(styles, destination = new Map(), backfill) {\n if (backfill) {\n for (let [prop, val] of backfill) {\n destination.set(prop, val);\n }\n }\n for (let [prop, val] of styles) {\n destination.set(prop, val);\n }\n return destination;\n}\nfunction getStyleAttributeString(element, key, value) {\n // Return the key-value pair string to be added to the style attribute for the\n // given CSS style key.\n if (value) {\n return key + ':' + value + ';';\n }\n else {\n return '';\n }\n}\nfunction writeStyleAttribute(element) {\n // Read the style property of the element and manually reflect it to the\n // style attribute. This is needed because Domino on platform-server doesn't\n // understand the full set of allowed CSS properties and doesn't reflect some\n // of them automatically.\n let styleAttrValue = '';\n for (let i = 0; i < element.style.length; i++) {\n const key = element.style.item(i);\n styleAttrValue += getStyleAttributeString(element, key, element.style.getPropertyValue(key));\n }\n for (const key in element.style) {\n // Skip internal Domino properties that don't need to be reflected.\n if (!element.style.hasOwnProperty(key) || key.startsWith('_')) {\n continue;\n }\n const dashKey = camelCaseToDashCase(key);\n styleAttrValue += getStyleAttributeString(element, dashKey, element.style[key]);\n }\n element.setAttribute('style', styleAttrValue);\n}\nfunction setStyles(element, styles, formerStyles) {\n if (element['style']) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction eraseStyles(element, styles) {\n if (element['style']) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1)\n return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(varName => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\nconst PARAM_REGEX = new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nfunction extractStyleParams(value) {\n let params = [];\n if (typeof value === 'string') {\n let match;\n while (match = PARAM_REGEX.exec(value)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n const original = value.toString();\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nfunction iteratorToArray(iterator) {\n const arr = [];\n let item = iterator.next();\n while (!item.done) {\n arr.push(item.value);\n item = iterator.next();\n }\n return arr;\n}\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction camelCaseToDashCase(input) {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case 7 /* AnimationMetadataType.Trigger */:\n return visitor.visitTrigger(node, context);\n case 0 /* AnimationMetadataType.State */:\n return visitor.visitState(node, context);\n case 1 /* AnimationMetadataType.Transition */:\n return visitor.visitTransition(node, context);\n case 2 /* AnimationMetadataType.Sequence */:\n return visitor.visitSequence(node, context);\n case 3 /* AnimationMetadataType.Group */:\n return visitor.visitGroup(node, context);\n case 4 /* AnimationMetadataType.Animate */:\n return visitor.visitAnimate(node, context);\n case 5 /* AnimationMetadataType.Keyframes */:\n return visitor.visitKeyframes(node, context);\n case 6 /* AnimationMetadataType.Style */:\n return visitor.visitStyle(node, context);\n case 8 /* AnimationMetadataType.Reference */:\n return visitor.visitReference(node, context);\n case 9 /* AnimationMetadataType.AnimateChild */:\n return visitor.visitAnimateChild(node, context);\n case 10 /* AnimationMetadataType.AnimateRef */:\n return visitor.visitAnimateRef(node, context);\n case 11 /* AnimationMetadataType.Query */:\n return visitor.visitQuery(node, context);\n case 12 /* AnimationMetadataType.Stagger */:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\n}\n\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction createListOfWarnings(warnings) {\n const LINE_START = '\\n - ';\n return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`;\n}\nfunction warnValidation(warnings) {\n NG_DEV_MODE && console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnTriggerBuild(name, warnings) {\n NG_DEV_MODE &&\n console.warn(`The animation trigger \"${name}\" has built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnRegister(warnings) {\n NG_DEV_MODE &&\n console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction triggerParsingWarnings(name, warnings) {\n NG_DEV_MODE &&\n console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction pushUnrecognizedPropertiesWarning(warnings, props) {\n if (props.length) {\n warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);\n }\n}\n\nconst ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n const expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue.split(/\\s*,\\s*/).forEach(str => parseInnerTransitionStr(str, expressions, errors));\n }\n else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n const result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n const match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(invalidExpression(eventStr));\n return expressions;\n }\n const fromState = match[1];\n const separator = match[2];\n const toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return (fromState, toState) => parseFloat(toState) > parseFloat(fromState);\n case ':decrement':\n return (fromState, toState) => parseFloat(toState) < parseFloat(fromState);\n default:\n errors.push(invalidTransitionAlias(alias));\n return '* => *';\n }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = new Set(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return (fromState, toState) => {\n let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let rhsMatch = rhs == ANY_STATE || rhs == toState;\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n return lhsMatch && rhsMatch;\n };\n}\n\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = new RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nfunction buildAnimationAst(driver, metadata, errors, warnings) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);\n}\nconst ROOT_SELECTOR = '';\nclass AnimationAstBuilderVisitor {\n constructor(_driver) {\n this._driver = _driver;\n }\n build(metadata, errors, warnings) {\n const context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (context.unsupportedCSSPropertiesFound.size) {\n pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);\n }\n }\n return ast;\n }\n _resetContextStyleTimingState(context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = new Map();\n context.collectedStyles.set(ROOT_SELECTOR, new Map());\n context.currentTime = 0;\n }\n visitTrigger(metadata, context) {\n let queryCount = context.queryCount = 0;\n let depCount = context.depCount = 0;\n const states = [];\n const transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push(invalidTrigger());\n }\n metadata.definitions.forEach(def => {\n this._resetContextStyleTimingState(context);\n if (def.type == 0 /* AnimationMetadataType.State */) {\n const stateDef = def;\n const name = stateDef.name;\n name.toString().split(/\\s*,\\s*/).forEach(n => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n }\n else if (def.type == 1 /* AnimationMetadataType.Transition */) {\n const transition = this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n }\n else {\n context.errors.push(invalidDefinition());\n }\n });\n return {\n type: 7 /* AnimationMetadataType.Trigger */,\n name: metadata.name,\n states,\n transitions,\n queryCount,\n depCount,\n options: null\n };\n }\n visitState(metadata, context) {\n const styleAst = this.visitStyle(metadata.styles, context);\n const astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n const missingSubs = new Set();\n const params = astParams || {};\n styleAst.styles.forEach(style => {\n if (style instanceof Map) {\n style.forEach(value => {\n extractStyleParams(value).forEach(sub => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n const missingSubsArr = iteratorToArray(missingSubs.values());\n context.errors.push(invalidState(metadata.name, missingSubsArr));\n }\n }\n return {\n type: 0 /* AnimationMetadataType.State */,\n name: metadata.name,\n style: styleAst,\n options: astParams ? { params: astParams } : null\n };\n }\n visitTransition(metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: 1 /* AnimationMetadataType.Transition */,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitSequence(metadata, context) {\n return {\n type: 2 /* AnimationMetadataType.Sequence */,\n steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitGroup(metadata, context) {\n const currentTime = context.currentTime;\n let furthestTime = 0;\n const steps = metadata.steps.map(step => {\n context.currentTime = currentTime;\n const innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: 3 /* AnimationMetadataType.Group */,\n steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimate(metadata, context) {\n const timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n let styleAst;\n let styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == 5 /* AnimationMetadataType.Keyframes */) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n }\n else {\n let styleMetadata = metadata.styles;\n let isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: 4 /* AnimationMetadataType.Animate */,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n }\n visitStyle(metadata, context) {\n const ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n _makeStyleAst(metadata, context) {\n const styles = [];\n const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles];\n for (let styleTuple of metadataStyles) {\n if (typeof styleTuple === 'string') {\n if (styleTuple === AUTO_STYLE) {\n styles.push(styleTuple);\n }\n else {\n context.errors.push(invalidStyleValue(styleTuple));\n }\n }\n else {\n styles.push(convertToMap(styleTuple));\n }\n }\n let containsDynamicStyles = false;\n let collectedEasing = null;\n styles.forEach(styleData => {\n if (styleData instanceof Map) {\n if (styleData.has('easing')) {\n collectedEasing = styleData.get('easing');\n styleData.delete('easing');\n }\n if (!containsDynamicStyles) {\n for (let value of styleData.values()) {\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: 6 /* AnimationMetadataType.Style */,\n styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles,\n options: null\n };\n }\n _validateStyleAst(ast, context) {\n const timings = context.currentAnimateTimings;\n let endTime = context.currentTime;\n let startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(tuple => {\n if (typeof tuple === 'string')\n return;\n tuple.forEach((value, prop) => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._driver.validateStyleProperty(prop)) {\n tuple.delete(prop);\n context.unsupportedCSSPropertiesFound.add(prop);\n return;\n }\n }\n // This is guaranteed to have a defined Map at this querySelector location making it\n // safe to add the assertion here. It is set as a default empty map in prior methods.\n const collectedStyles = context.collectedStyles.get(context.currentQuerySelector);\n const collectedEntry = collectedStyles.get(prop);\n let updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime &&\n endTime <= collectedEntry.endTime) {\n context.errors.push(invalidParallelAnimation(prop, collectedEntry.startTime, collectedEntry.endTime, startTime, endTime));\n updateCollectedStyle = false;\n }\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n if (updateCollectedStyle) {\n collectedStyles.set(prop, { startTime, endTime });\n }\n if (context.options) {\n validateStyleParams(value, context.options, context.errors);\n }\n });\n });\n }\n visitKeyframes(metadata, context) {\n const ast = { type: 5 /* AnimationMetadataType.Keyframes */, styles: [], options: null };\n if (!context.currentAnimateTimings) {\n context.errors.push(invalidKeyframes());\n return ast;\n }\n const MAX_KEYFRAME_OFFSET = 1;\n let totalKeyframesWithOffsets = 0;\n const offsets = [];\n let offsetsOutOfOrder = false;\n let keyframesOutOfRange = false;\n let previousOffset = 0;\n const keyframes = metadata.steps.map(styles => {\n const style = this._makeStyleAst(styles, context);\n let offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles);\n let offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n if (keyframesOutOfRange) {\n context.errors.push(invalidOffset());\n }\n if (offsetsOutOfOrder) {\n context.errors.push(keyframeOffsetsOutOfOrder());\n }\n const length = metadata.steps.length;\n let generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(keyframesMissingOffsets());\n }\n else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n const limit = length - 1;\n const currentTime = context.currentTime;\n const currentAnimateTimings = context.currentAnimateTimings;\n const animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n const durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n }\n visitReference(metadata, context) {\n return {\n type: 8 /* AnimationMetadataType.Reference */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateChild(metadata, context) {\n context.depCount++;\n return {\n type: 9 /* AnimationMetadataType.AnimateChild */,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateRef(metadata, context) {\n return {\n type: 10 /* AnimationMetadataType.AnimateRef */,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitQuery(metadata, context) {\n const parentSelector = context.currentQuerySelector;\n const options = (metadata.options || {});\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector =\n parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map());\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: 11 /* AnimationMetadataType.Query */,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf,\n animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitStagger(metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(invalidStagger());\n }\n const timings = metadata.timings === 'full' ?\n { duration: 0, delay: 0, easing: 'full' } :\n resolveTiming(metadata.timings, context.errors, true);\n return {\n type: 12 /* AnimationMetadataType.Stagger */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings,\n options: null\n };\n }\n}\nfunction normalizeSelector(selector) {\n const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n // Note: the :enter and :leave aren't normalized here since those\n // selectors are filled in at runtime during timeline building\n selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n .replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.slice(1))\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? copyObj(obj) : null;\n}\nclass AnimationAstBuilderContext {\n constructor(errors) {\n this.errors = errors;\n this.queryCount = 0;\n this.depCount = 0;\n this.currentTransition = null;\n this.currentQuery = null;\n this.currentQuerySelector = null;\n this.currentAnimateTimings = null;\n this.currentTime = 0;\n this.collectedStyles = new Map();\n this.options = null;\n this.unsupportedCSSPropertiesFound = new Set();\n }\n}\nfunction consumeOffset(styles) {\n if (typeof styles == 'string')\n return null;\n let offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(styleTuple => {\n if (styleTuple instanceof Map && styleTuple.has('offset')) {\n const obj = styleTuple;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n });\n }\n else if (styles instanceof Map && styles.has('offset')) {\n const obj = styles;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n return offset;\n}\nfunction constructTimingAst(value, errors) {\n if (value.hasOwnProperty('duration')) {\n return value;\n }\n if (typeof value == 'number') {\n const duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n const strValue = value;\n const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n const timings = resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = copyObj(options);\n if (options['params']) {\n options['params'] = normalizeParams(options['params']);\n }\n }\n else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return { duration, delay, easing };\n}\n\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {\n return {\n type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay,\n easing,\n subTimeline\n };\n}\n\nclass ElementInstructionMap {\n constructor() {\n this._map = new Map();\n }\n get(element) {\n return this._map.get(element) || [];\n }\n append(element, instructions) {\n let existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push(...instructions);\n }\n has(element) {\n return this._map.has(element);\n }\n clear() {\n this._map.clear();\n }\n}\n\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergeSort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill map. The `copyStyles` method in util.ts\n * handles propagating that backfill map to the styles object.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles = new Map(), finalStyles = new Map(), options, subInstructions, errors = []) {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nclass AnimationTimelineBuilderVisitor {\n buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors = []) {\n subInstructions = subInstructions || new ElementInstructionMap();\n const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n context.currentTimeline.delayNextStep(delay);\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n // note: we just want to apply the final styles for the rootElement, so we do not\n // just apply the styles to the last timeline but the last timeline which\n // element is the root one (basically `*`-styles are replaced with the actual\n // state style values only for the root element)\n if (timelines.length && finalStyles.size) {\n let lastRootTimeline;\n for (let i = timelines.length - 1; i >= 0; i--) {\n const timeline = timelines[i];\n if (timeline.element === rootElement) {\n lastRootTimeline = timeline;\n break;\n }\n }\n if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {\n lastRootTimeline.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ?\n timelines.map(timeline => timeline.buildKeyframes()) :\n [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];\n }\n visitTrigger(ast, context) {\n // these values are not visited in this AST\n }\n visitState(ast, context) {\n // these values are not visited in this AST\n }\n visitTransition(ast, context) {\n // these values are not visited in this AST\n }\n visitAnimateChild(ast, context) {\n const elementInstructions = context.subInstructions.get(context.element);\n if (elementInstructions) {\n const innerContext = context.createSubContext(ast.options);\n const startTime = context.currentTimeline.currentTime;\n const endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n visitAnimateRef(ast, context) {\n const innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this._applyAnimationRefDelays([ast.options, ast.animation.options], context, innerContext);\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n _applyAnimationRefDelays(animationsRefsOptions, context, innerContext) {\n for (const animationRefOptions of animationsRefsOptions) {\n const animationDelay = animationRefOptions?.delay;\n if (animationDelay) {\n const animationDelayValue = typeof animationDelay === 'number' ?\n animationDelay :\n resolveTimingValue(interpolateParams(animationDelay, animationRefOptions?.params ?? {}, context.errors));\n innerContext.delayNextStep(animationDelayValue);\n }\n }\n }\n _visitSubInstructions(instructions, context, options) {\n const startTime = context.currentTimeline.currentTime;\n let furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(instruction => {\n const instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime =\n Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n }\n visitReference(ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n visitSequence(ast, context) {\n const subContextCount = context.subContextCount;\n let ctx = context;\n const options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == 6 /* AnimationMetadataType.Style */) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n const delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(s => visitDslNode(this, s, ctx));\n // this is here just in case the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n context.previousNode = ast;\n }\n visitGroup(ast, context) {\n const innerTimelines = [];\n let furthestTime = context.currentTimeline.currentTime;\n const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(s => {\n const innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n _visitTiming(ast, context) {\n if (ast.dynamic) {\n const strValue = ast.strValue;\n const timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n }\n else {\n return { duration: ast.duration, delay: ast.delay, easing: ast.easing };\n }\n }\n visitAnimate(ast, context) {\n const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n const timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n const style = ast.style;\n if (style.type == 5 /* AnimationMetadataType.Keyframes */) {\n this.visitKeyframes(style, context);\n }\n else {\n context.incrementTime(timings.duration);\n this.visitStyle(style, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n visitStyle(ast, context) {\n const timeline = context.currentTimeline;\n const timings = context.currentAnimateTimings;\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.hasCurrentStyleProperties()) {\n timeline.forwardFrame();\n }\n const easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n }\n else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n }\n visitKeyframes(ast, context) {\n const currentAnimateTimings = context.currentAnimateTimings;\n const startTime = (context.currentTimeline).duration;\n const duration = currentAnimateTimings.duration;\n const innerContext = context.createSubContext();\n const innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(step => {\n const offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n visitQuery(ast, context) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const startTime = context.currentTimeline.currentTime;\n const options = (ast.options || {});\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay &&\n (context.previousNode.type === 6 /* AnimationMetadataType.Style */ ||\n (startTime == 0 && context.currentTimeline.hasCurrentStyleProperties()))) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n let furthestTime = startTime;\n const elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n let sameElementTimeline = null;\n elms.forEach((element, i) => {\n context.currentQueryIndex = i;\n const innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(this, ast.animation, innerContext);\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n const endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n }\n visitStagger(ast, context) {\n const parentContext = context.parentContext;\n const tl = context.currentTimeline;\n const timings = ast.timings;\n const duration = Math.abs(timings.duration);\n const maxTime = duration * (context.currentQueryTotal - 1);\n let delay = duration * context.currentQueryIndex;\n let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n const timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n const startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime =\n (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\nconst DEFAULT_NOOP_PREVIOUS_NODE = {};\nclass AnimationTimelineContext {\n constructor(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.parentContext = null;\n this.currentAnimateTimings = null;\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.subContextCount = 0;\n this.options = {};\n this.currentQueryIndex = 0;\n this.currentQueryTotal = 0;\n this.currentStaggerTime = 0;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n get params() {\n return this.options.params;\n }\n updateOptions(options, skipIfExists) {\n if (!options)\n return;\n const newOptions = options;\n let optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n const newParams = newOptions.params;\n if (newParams) {\n let paramsToUpdate = optionsToUpdate.params;\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n Object.keys(newParams).forEach(name => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n _copyOptions() {\n const options = {};\n if (this.options) {\n const oldParams = this.options.params;\n if (oldParams) {\n const params = options['params'] = {};\n Object.keys(oldParams).forEach(name => {\n params[name] = oldParams[name];\n });\n }\n }\n return options;\n }\n createSubContext(options = null, element, newTime) {\n const target = element || this.element;\n const context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n transformIntoNewTimeline(newTime) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n appendInstructionToTimeline(instruction, duration, delay) {\n const updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n const builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n }\n incrementTime(time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n delayNextStep(delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) {\n let results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) { // only if :self is used then the selector can be empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n const multi = limit != 1;\n let elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :\n elements.slice(0, limit);\n }\n results.push(...elements);\n }\n if (!optional && results.length == 0) {\n errors.push(invalidQuery(originalSelector));\n }\n return results;\n }\n}\nclass TimelineBuilder {\n constructor(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n this.duration = 0;\n this.easing = null;\n this._previousKeyframe = new Map();\n this._currentKeyframe = new Map();\n this._keyframes = new Map();\n this._styleSummary = new Map();\n this._localTimelineStyles = new Map();\n this._pendingStyles = new Map();\n this._backFill = new Map();\n this._currentEmptyStepKeyframe = null;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n containsAnimation() {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.hasCurrentStyleProperties();\n default:\n return true;\n }\n }\n hasCurrentStyleProperties() {\n return this._currentKeyframe.size > 0;\n }\n get currentTime() {\n return this.startTime + this.duration;\n }\n delayNextStep(delay) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n }\n else {\n this.startTime += delay;\n }\n }\n fork(element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n }\n _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration);\n if (!this._currentKeyframe) {\n this._currentKeyframe = new Map();\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n forwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n forwardTime(time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n _updateStyle(prop, value) {\n this._localTimelineStyles.set(prop, value);\n this._globalTimelineStyles.set(prop, value);\n this._styleSummary.set(prop, { time: this.currentTime, value });\n }\n allowOnlyTimelineStyles() {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n }\n applyEmptyStep(easing) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n for (let [prop, value] of this._globalTimelineStyles) {\n this._backFill.set(prop, value || AUTO_STYLE);\n this._currentKeyframe.set(prop, AUTO_STYLE);\n }\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n setStyles(input, easing, errors, options) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n const params = (options && options.params) || {};\n const styles = flattenStyles(input, this._globalTimelineStyles);\n for (let [prop, value] of styles) {\n const val = interpolateParams(value, params, errors);\n this._pendingStyles.set(prop, val);\n if (!this._localTimelineStyles.has(prop)) {\n this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? AUTO_STYLE);\n }\n this._updateStyle(prop, val);\n }\n }\n applyStylesToKeyframe() {\n if (this._pendingStyles.size == 0)\n return;\n this._pendingStyles.forEach((val, prop) => {\n this._currentKeyframe.set(prop, val);\n });\n this._pendingStyles.clear();\n this._localTimelineStyles.forEach((val, prop) => {\n if (!this._currentKeyframe.has(prop)) {\n this._currentKeyframe.set(prop, val);\n }\n });\n }\n snapshotCurrentStyles() {\n for (let [prop, val] of this._localTimelineStyles) {\n this._pendingStyles.set(prop, val);\n this._updateStyle(prop, val);\n }\n }\n getFinalKeyframe() {\n return this._keyframes.get(this.duration);\n }\n get properties() {\n const properties = [];\n for (let prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n mergeTimelineCollectedStyles(timeline) {\n timeline._styleSummary.forEach((details1, prop) => {\n const details0 = this._styleSummary.get(prop);\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n buildKeyframes() {\n this.applyStylesToKeyframe();\n const preStyleProps = new Set();\n const postStyleProps = new Set();\n const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n let finalKeyframes = [];\n this._keyframes.forEach((keyframe, time) => {\n const finalKeyframe = copyStyles(keyframe, new Map(), this._backFill);\n finalKeyframe.forEach((value, prop) => {\n if (value === ɵPRE_STYLE) {\n preStyleProps.add(prop);\n }\n else if (value === AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe.set('offset', time / this.duration);\n }\n finalKeyframes.push(finalKeyframe);\n });\n const preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n const postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const kf0 = finalKeyframes[0];\n const kf1 = new Map(kf0);\n kf0.set('offset', 0);\n kf1.set('offset', 1);\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n }\n}\nclass SubTimelineBuilder extends TimelineBuilder {\n constructor(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe = false) {\n super(driver, element, timings.delay);\n this.keyframes = keyframes;\n this.preStyleProps = preStyleProps;\n this.postStyleProps = postStyleProps;\n this._stretchStartingKeyframe = _stretchStartingKeyframe;\n this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };\n }\n containsAnimation() {\n return this.keyframes.length > 1;\n }\n buildKeyframes() {\n let keyframes = this.keyframes;\n let { delay, duration, easing } = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const newKeyframes = [];\n const totalTime = duration + delay;\n const startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n const newFirstKeyframe = copyStyles(keyframes[0]);\n newFirstKeyframe.set('offset', 0);\n newKeyframes.push(newFirstKeyframe);\n const oldFirstKeyframe = copyStyles(keyframes[0]);\n oldFirstKeyframe.set('offset', roundOffset(startingGap));\n newKeyframes.push(oldFirstKeyframe);\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still rendered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n \n delay=1000, duration=1000, keyframes = 0 .5 1\n \n turns into\n \n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const limit = keyframes.length - 1;\n for (let i = 1; i <= limit; i++) {\n let kf = copyStyles(keyframes[i]);\n const oldOffset = kf.get('offset');\n const timeAtKeyframe = delay + oldOffset * duration;\n kf.set('offset', roundOffset(timeAtKeyframe / totalTime));\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n }\n}\nfunction roundOffset(offset, decimalPoints = 3) {\n const mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n const styles = new Map();\n let allProperties;\n input.forEach(token => {\n if (token === '*') {\n allProperties = allProperties || allStyles.keys();\n for (let prop of allProperties) {\n styles.set(prop, AUTO_STYLE);\n }\n }\n else {\n copyStyles(token, styles);\n }\n });\n return styles;\n}\n\nclass Animation {\n constructor(_driver, input) {\n this._driver = _driver;\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(_driver, input, errors, warnings);\n if (errors.length) {\n throw validationFailed(errors);\n }\n if (warnings.length) {\n warnValidation(warnings);\n }\n this._animationAst = ast;\n }\n buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) {\n const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n startingStyles;\n const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n destinationStyles;\n const errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n const result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n throw buildingFailed(errors);\n }\n return result;\n }\n}\n\n/**\n * @publicApi\n */\nclass AnimationStyleNormalizer {\n}\n/**\n * @publicApi\n */\nclass NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return propertyName;\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n return value;\n }\n}\n\nconst DIMENSIONAL_PROP_SET = new Set([\n 'width',\n 'height',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'left',\n 'top',\n 'bottom',\n 'right',\n 'fontSize',\n 'outlineWidth',\n 'outlineOffset',\n 'paddingTop',\n 'paddingLeft',\n 'paddingBottom',\n 'paddingRight',\n 'marginTop',\n 'marginLeft',\n 'marginBottom',\n 'marginRight',\n 'borderRadius',\n 'borderWidth',\n 'borderTopWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'textIndent',\n 'perspective'\n]);\nclass WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n let unit = '';\n const strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n }\n else {\n const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(invalidCssUnitValue(userProvidedProperty, value));\n }\n }\n }\n return strVal + unit;\n }\n}\n\nfunction createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n totalTime,\n errors\n };\n}\n\nconst EMPTY_OBJECT = {};\nclass AnimationTransitionFactory {\n constructor(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n match(currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n }\n buildStyles(stateName, params, errors) {\n let styler = this._stateStyles.get('*');\n if (stateName !== undefined) {\n styler = this._stateStyles.get(stateName?.toString()) || styler;\n }\n return styler ? styler.buildStyles(params, errors) : new Map();\n }\n build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {\n const errors = [];\n const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n const queriedElements = new Set();\n const preStyleMap = new Map();\n const postStyleMap = new Map();\n const isRemoval = nextState === 'void';\n const animationOptions = {\n params: applyParamDefaults(nextAnimationParams, transitionAnimationParams),\n delay: this.ast.options?.delay,\n };\n const timelines = skipAstBuild ?\n [] :\n buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n let totalTime = 0;\n timelines.forEach(tl => {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(tl => {\n const elm = tl.element;\n const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set());\n tl.preStyleProps.forEach(prop => preProps.add(prop));\n const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set());\n tl.postStyleProps.forEach(prop => postProps.add(prop));\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n checkNonAnimatableInTimelines(timelines, this._triggerName, driver);\n }\n const queriedElementsList = iteratorToArray(queriedElements.values());\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n }\n}\n/**\n * Checks inside a set of timelines if they try to animate a css property which is not considered\n * animatable, in that case it prints a warning on the console.\n * Besides that the function doesn't have any other effect.\n *\n * Note: this check is done here after the timelines are built instead of doing on a lower level so\n * that we can make sure that the warning appears only once per instruction (we can aggregate here\n * all the issues instead of finding them separately).\n *\n * @param timelines The built timelines for the current instruction.\n * @param triggerName The name of the trigger for the current instruction.\n * @param driver Animation driver used to perform the check.\n *\n */\nfunction checkNonAnimatableInTimelines(timelines, triggerName, driver) {\n if (!driver.validateAnimatableStyleProperty) {\n return;\n }\n const allowedNonAnimatableProps = new Set([\n // 'easing' is a utility/synthetic prop we use to represent\n // easing functions, it represents a property of the animation\n // which is not animatable but different values can be used\n // in different steps\n 'easing'\n ]);\n const invalidNonAnimatableProps = new Set();\n timelines.forEach(({ keyframes }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n const entriesToCheck = Array.from(keyframe.entries()).filter(([prop]) => !allowedNonAnimatableProps.has(prop));\n for (const [prop, value] of entriesToCheck) {\n if (!driver.validateAnimatableStyleProperty(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n }\n else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(`Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` +\n ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\\n' +\n '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)');\n }\n}\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\nfunction applyParamDefaults(userParams, defaults) {\n const result = copyObj(defaults);\n for (const key in userParams) {\n if (userParams.hasOwnProperty(key) && userParams[key] != null) {\n result[key] = userParams[key];\n }\n }\n return result;\n}\nclass AnimationStateStyles {\n constructor(styles, defaultParams, normalizer) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n this.normalizer = normalizer;\n }\n buildStyles(params, errors) {\n const finalStyles = new Map();\n const combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (value !== null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(prop, val);\n });\n }\n });\n return finalStyles;\n }\n}\n\nfunction buildTrigger(name, ast, normalizer) {\n return new AnimationTrigger(name, ast, normalizer);\n}\nclass AnimationTrigger {\n constructor(name, ast, _normalizer) {\n this.name = name;\n this.ast = ast;\n this._normalizer = _normalizer;\n this.transitionFactories = [];\n this.states = new Map();\n ast.states.forEach(ast => {\n const defaultParams = (ast.options && ast.options.params) || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n matchTransition(currentState, nextState, element, params) {\n const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n return entry || null;\n }\n matchStyles(currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\nfunction createFallbackTransition(triggerName, states, normalizer) {\n const matchers = [(fromState, toState) => true];\n const animation = { type: 2 /* AnimationMetadataType.Sequence */, steps: [], options: null };\n const transition = {\n type: 1 /* AnimationMetadataType.Transition */,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(stateMap, key1, key2) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1));\n }\n }\n else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2));\n }\n}\n\nconst EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\nclass TimelineAnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._animations = new Map();\n this._playersById = new Map();\n this.players = [];\n }\n register(id, metadata) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw registerFailed(errors);\n }\n else {\n if (warnings.length) {\n warnRegister(warnings);\n }\n this._animations.set(id, ast);\n }\n }\n _buildPlayer(i, preStyles, postStyles) {\n const element = i.element;\n const keyframes = normalizeKeyframes$1(this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n }\n create(id, element, options = {}) {\n const errors = [];\n const ast = this._animations.get(id);\n let instructions;\n const autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, new Map(), new Map(), options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(inst => {\n const styles = getOrSetDefaultValue(autoStylesMap, inst.element, new Map());\n inst.postStyleProps.forEach(prop => styles.set(prop, null));\n });\n }\n else {\n errors.push(missingOrDestroyedAnimation());\n instructions = [];\n }\n if (errors.length) {\n throw createAnimationFailed(errors);\n }\n autoStylesMap.forEach((styles, element) => {\n styles.forEach((_, prop) => {\n styles.set(prop, this._driver.computeStyle(element, prop, AUTO_STYLE));\n });\n });\n const players = instructions.map(i => {\n const styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, new Map(), styles);\n });\n const player = optimizeGroupPlayer(players);\n this._playersById.set(id, player);\n player.onDestroy(() => this.destroy(id));\n this.players.push(player);\n return player;\n }\n destroy(id) {\n const player = this._getPlayer(id);\n player.destroy();\n this._playersById.delete(id);\n const index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n _getPlayer(id) {\n const player = this._playersById.get(id);\n if (!player) {\n throw missingPlayer(id);\n }\n return player;\n }\n listen(id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n const baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => { };\n }\n command(id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n const options = (args[0] || {});\n this.create(id, element, options);\n return;\n }\n const player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n }\n}\n\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\nconst EMPTY_PLAYER_ARRAY = [];\nconst NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nconst REMOVAL_FLAG = '__ng_removed';\nclass StateValue {\n get params() {\n return this.options.params;\n }\n constructor(input, namespaceId = '') {\n this.namespaceId = namespaceId;\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n const options = copyObj(input);\n delete options['value'];\n this.options = options;\n }\n else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n absorbOptions(options) {\n const newParams = options.params;\n if (newParams) {\n const oldParams = this.options.params;\n Object.keys(newParams).forEach(prop => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\nconst VOID_VALUE = 'void';\nconst DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\nclass AnimationTransitionNamespace {\n constructor(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this.players = [];\n this._triggers = new Map();\n this._queue = [];\n this._elementListeners = new Map();\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n listen(element, name, phase, callback) {\n if (!this._triggers.has(name)) {\n throw missingTrigger(phase, name);\n }\n if (phase == null || phase.length == 0) {\n throw missingEvent(name);\n }\n if (!isTriggerEventValid(phase)) {\n throw unsupportedTriggerEvent(phase, name);\n }\n const listeners = getOrSetDefaultValue(this._elementListeners, element, []);\n const data = { name, phase, callback };\n listeners.push(data);\n const triggersWithStates = getOrSetDefaultValue(this._engine.statesByElement, element, new Map());\n if (!triggersWithStates.has(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates.set(name, DEFAULT_STATE_VALUE);\n }\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!this._triggers.has(name)) {\n triggersWithStates.delete(name);\n }\n });\n };\n }\n register(name, ast) {\n if (this._triggers.has(name)) {\n // throw\n return false;\n }\n else {\n this._triggers.set(name, ast);\n return true;\n }\n }\n _getTrigger(name) {\n const trigger = this._triggers.get(name);\n if (!trigger) {\n throw unregisteredTrigger(name);\n }\n return trigger;\n }\n trigger(element, triggerName, value, defaultToFallback = true) {\n const trigger = this._getTrigger(triggerName);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n let triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = new Map());\n }\n let fromState = triggersWithStates.get(triggerName);\n const toState = new StateValue(value, this.id);\n const isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates.set(triggerName, toState);\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n const isRemoval = toState.value === VOID_VALUE;\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const errors = [];\n const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n }\n else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n const playersOnElement = getOrSetDefaultValue(this._engine.playersByElement, element, []);\n playersOnElement.forEach(player => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new player)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n let transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n let isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback)\n return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({ element, triggerName, transition, fromState, toState, player, isFallbackTransition });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n player.onDone(() => {\n let index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n const players = this._engine.playersByElement.get(element);\n if (players) {\n let index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n }\n deregister(name) {\n this._triggers.delete(name);\n this._engine.statesByElement.forEach(stateMap => stateMap.delete(name));\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(element, listeners.filter(entry => {\n return entry.name != name;\n }));\n });\n }\n clearElementCache(element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(player => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n _signalRemovalForInnerTriggers(rootElement, context) {\n const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach(elm => {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG])\n return;\n const namespaces = this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n }\n else {\n this.clearElementCache(elm);\n }\n });\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(() => elements.forEach(elm => this.clearElementCache(elm)));\n }\n triggerLeaveAnimation(element, context, destroyAfterComplete, defaultToFallback) {\n const triggerStates = this._engine.statesByElement.get(element);\n const previousTriggersValues = new Map();\n if (triggerStates) {\n const players = [];\n triggerStates.forEach((state, triggerName) => {\n previousTriggersValues.set(triggerName, state.value);\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers.has(triggerName)) {\n const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players.push(player);\n }\n }\n });\n if (players.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n }\n return true;\n }\n }\n return false;\n }\n prepareLeaveAnimationListeners(element) {\n const listeners = this._elementListeners.get(element);\n const elementStates = this._engine.statesByElement.get(element);\n // if this statement fails then it means that the element was picked up\n // by an earlier flush (or there are no listeners at all to track the leave).\n if (listeners && elementStates) {\n const visitedTriggers = new Set();\n listeners.forEach(listener => {\n const triggerName = listener.name;\n if (visitedTriggers.has(triggerName))\n return;\n visitedTriggers.add(triggerName);\n const trigger = this._triggers.get(triggerName);\n const transition = trigger.fallbackTransition;\n const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE;\n const toState = new StateValue(VOID_VALUE);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true\n });\n });\n }\n }\n removeNode(element, context) {\n const engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true))\n return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n }\n else {\n let parent = element;\n while (parent = parent.parentNode) {\n const triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n }\n else {\n const removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n }\n insertNode(element, parent) {\n addClass(element, this._hostClassName);\n }\n drainQueuedTransitions(microtaskId) {\n const instructions = [];\n this._queue.forEach(entry => {\n const player = entry.player;\n if (player.destroyed)\n return;\n const element = entry.element;\n const listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach((listener) => {\n if (listener.name == entry.triggerName) {\n const baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n }\n else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const d0 = a.transition.ast.depCount;\n const d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n destroy(context) {\n this.players.forEach(p => p.destroy());\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n }\n elementContainsData(element) {\n let containsData = false;\n if (this._elementListeners.has(element))\n containsData = true;\n containsData =\n (this._queue.find(entry => entry.element === element) ? true : false) || containsData;\n return containsData;\n }\n}\nclass TransitionAnimationEngine {\n /** @internal */\n _onRemovalComplete(element, context) {\n this.onRemovalComplete(element, context);\n }\n constructor(bodyNode, driver, _normalizer) {\n this.bodyNode = bodyNode;\n this.driver = driver;\n this._normalizer = _normalizer;\n this.players = [];\n this.newHostElements = new Map();\n this.playersByElement = new Map();\n this.playersByQueriedElement = new Map();\n this.statesByElement = new Map();\n this.disabledNodes = new Set();\n this.totalAnimations = 0;\n this.totalQueuedPlayers = 0;\n this._namespaceLookup = {};\n this._namespaceList = [];\n this._flushFns = [];\n this._whenQuietFns = [];\n this.namespacesByHostElement = new Map();\n this.collectedEnterElements = [];\n this.collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n }\n get queuedPlayers() {\n const players = [];\n this._namespaceList.forEach(ns => {\n ns.players.forEach(player => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n createNamespace(namespaceId, hostElement) {\n const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) {\n this._balanceNamespaceList(ns, hostElement);\n }\n else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n // given that this host element is a part of the animation code, it\n // may or may not be inserted by a parent node that is of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n }\n _balanceNamespaceList(ns, hostElement) {\n const namespaceList = this._namespaceList;\n const namespacesByHostElement = this.namespacesByHostElement;\n const limit = namespaceList.length - 1;\n if (limit >= 0) {\n let found = false;\n // Find the closest ancestor with an existing namespace so we can then insert `ns` after it,\n // establishing a top-down ordering of namespaces in `this._namespaceList`.\n let ancestor = this.driver.getParentElement(hostElement);\n while (ancestor) {\n const ancestorNs = namespacesByHostElement.get(ancestor);\n if (ancestorNs) {\n // An animation namespace has been registered for this ancestor, so we insert `ns`\n // right after it to establish top-down ordering of animation namespaces.\n const index = namespaceList.indexOf(ancestorNs);\n namespaceList.splice(index + 1, 0, ns);\n found = true;\n break;\n }\n ancestor = this.driver.getParentElement(ancestor);\n }\n if (!found) {\n // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to\n // ensure that any existing descendants are ordered after `ns`, retaining the desired\n // top-down ordering.\n namespaceList.unshift(ns);\n }\n }\n else {\n namespaceList.push(ns);\n }\n namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n register(namespaceId, hostElement) {\n let ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n registerTrigger(namespaceId, name, trigger) {\n let ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n destroy(namespaceId, context) {\n if (!namespaceId)\n return;\n const ns = this._fetchNamespace(namespaceId);\n this.afterFlush(() => {\n this.namespacesByHostElement.delete(ns.hostElement);\n delete this._namespaceLookup[namespaceId];\n const index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n });\n this.afterFlushAnimationsDone(() => ns.destroy(context));\n }\n _fetchNamespace(id) {\n return this._namespaceLookup[id];\n }\n fetchNamespacesByElement(element) {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply deduplicate\n // the namespaces in case (for the reason described above) there are multiple triggers\n const namespaces = new Set();\n const elementStates = this.statesByElement.get(element);\n if (elementStates) {\n for (let stateValue of elementStates.values()) {\n if (stateValue.namespaceId) {\n const ns = this._fetchNamespace(stateValue.namespaceId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n }\n trigger(namespaceId, element, name, value) {\n if (isElementNode(element)) {\n const ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n }\n insertNode(namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element))\n return;\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n const index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n const ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n collectEnterElement(element) {\n this.collectedEnterElements.push(element);\n }\n markElementAsDisabled(element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n }\n else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n removeNode(namespaceId, element, isHostElement, context) {\n if (isElementNode(element)) {\n const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n }\n else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n if (isHostElement) {\n const hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n }\n }\n else {\n this._onRemovalComplete(element, context);\n }\n }\n markElementAsRemoved(namespaceId, element, hasAnimation, context, previousTriggersValues) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context,\n hasAnimation,\n removedBeforeQueried: false,\n previousTriggersValues\n };\n }\n listen(namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => { };\n }\n _buildInstruction(entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n }\n destroyInnerAnimations(containerElement) {\n let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n if (this.playersByQueriedElement.size == 0)\n return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n }\n destroyActiveAnimationsForElement(element) {\n const players = this.playersByElement.get(element);\n if (players) {\n players.forEach(player => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n }\n else {\n player.destroy();\n }\n });\n }\n }\n finishActiveQueriedAnimationOnElement(element) {\n const players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(player => player.finish());\n }\n }\n whenRenderingDone() {\n return new Promise(resolve => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n }\n else {\n resolve();\n }\n });\n }\n processLeaveNode(element) {\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (element.classList?.contains(DISABLED_CLASSNAME)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n this.markElementAsDisabled(node, false);\n });\n }\n flush(microtaskId = -1) {\n let players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (let i = 0; i < this.collectedEnterElements.length; i++) {\n const elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n const cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n }\n finally {\n for (let i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n }\n else {\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(fn => fn());\n this._flushFns = [];\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => {\n quietFns.forEach(fn => fn());\n });\n }\n else {\n quietFns.forEach(fn => fn());\n }\n }\n }\n reportError(errors) {\n throw triggerTransitionsFailed(errors);\n }\n _flushAnimations(cleanupFns, microtaskId) {\n const subTimelines = new ElementInstructionMap();\n const skippedPlayers = [];\n const skippedPlayersMap = new Map();\n const queuedInstructions = [];\n const queriedElements = new Map();\n const allPreStyleElements = new Map();\n const allPostStyleElements = new Map();\n const disabledElementsSet = new Set();\n this.disabledNodes.forEach(node => {\n disabledElementsSet.add(node);\n const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n const bodyNode = this.bodyNode;\n const allTriggerElements = Array.from(this.statesByElement.keys());\n const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n const enterNodeMapIds = new Map();\n let i = 0;\n enterNodeMap.forEach((nodes, root) => {\n const className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n const allLeaveNodes = [];\n const mergedLeaveNodes = new Set();\n const leaveNodesWithoutAnimations = new Set();\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n }\n else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n const leaveNodeMapIds = new Map();\n const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach((nodes, root) => {\n const className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n cleanupFns.push(() => {\n enterNodeMap.forEach((nodes, root) => {\n const className = enterNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n leaveNodeMap.forEach((nodes, root) => {\n const className = leaveNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n allLeaveNodes.forEach(element => {\n this.processLeaveNode(element);\n });\n });\n const allPlayers = [];\n const erroneousTransitions = [];\n for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n const ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n const player = entry.player;\n const element = entry.element;\n allPlayers.push(player);\n if (this.collectedEnterElements.length) {\n const details = element[REMOVAL_FLAG];\n // animations for move operations (elements being removed and reinserted,\n // e.g. when the order of an *ngFor list changes) are currently not supported\n if (details && details.setForMove) {\n if (details.previousTriggersValues &&\n details.previousTriggersValues.has(entry.triggerName)) {\n const previousValue = details.previousTriggersValues.get(entry.triggerName);\n // we need to restore the previous trigger value since the element has\n // only been moved and hasn't actually left the DOM\n const triggersWithStates = this.statesByElement.get(entry.element);\n if (triggersWithStates && triggersWithStates.has(entry.triggerName)) {\n const state = triggersWithStates.get(entry.triggerName);\n state.value = previousValue;\n triggersWithStates.set(entry.triggerName, state);\n }\n }\n player.destroy();\n return;\n }\n }\n const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n const leaveClassName = leaveNodeMapIds.get(element);\n const enterClassName = enterNodeMapIds.get(element);\n const instruction = this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned);\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n // even though the element may not be in the DOM, it may still\n // be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important to still style the element.\n if (nodeIsOrphaned) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // if an unmatched transition is queued and ready to go\n // then it SHOULD NOT render an animation and cancel the\n // previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // this means that if a parent animation uses this animation as a sub-trigger\n // then it will instruct the timeline builder not to add a player delay, but\n // instead stretch the first keyframe gap until the animation starts. This is\n // important in order to prevent extra initialization styles from being\n // required by the user for the animation.\n const timelines = [];\n instruction.timelines.forEach(tl => {\n tl.stretchStartingKeyframe = true;\n if (!this.disabledNodes.has(tl.element)) {\n timelines.push(tl);\n }\n });\n instruction.timelines = timelines;\n subTimelines.append(element, instruction.timelines);\n const tuple = { instruction, player, element };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(element => getOrSetDefaultValue(queriedElements, element, []).push(player));\n instruction.preStyleProps.forEach((stringMap, element) => {\n if (stringMap.size) {\n let setVal = allPreStyleElements.get(element);\n if (!setVal) {\n allPreStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n }\n });\n instruction.postStyleProps.forEach((stringMap, element) => {\n let setVal = allPostStyleElements.get(element);\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n });\n });\n }\n if (erroneousTransitions.length) {\n const errors = [];\n erroneousTransitions.forEach(instruction => {\n errors.push(transitionFailed(instruction.triggerName, instruction.errors));\n });\n allPlayers.forEach(player => player.destroy());\n this.reportError(errors);\n }\n const allPreviousPlayersMap = new Map();\n // this map tells us which element in the DOM tree is contained by\n // which animation. Further down this map will get populated once\n // the players are built and in doing so we can use it to efficiently\n // figure out if a sub player is skipped due to a parent player having priority.\n const animationElementMap = new Map();\n queuedInstructions.forEach(entry => {\n const element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(player => {\n const element = player.element;\n const previousPlayers = this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(prevPlayer => {\n getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n // this is a special case for nodes that will be removed either by\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or \"auto\" since the element\n // passed to getComputedStyle will not be visible (since * === destination)\n const replaceNodes = allLeaveNodes.filter(node => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n const postStylesMap = new Map();\n const allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(node => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n const preStylesMap = new Map();\n enterNodeMap.forEach((nodes, root) => {\n cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(node => {\n const post = postStylesMap.get(node);\n const pre = preStylesMap.get(node);\n postStylesMap.set(node, new Map([...Array.from(post?.entries() ?? []), ...Array.from(pre?.entries() ?? [])]));\n });\n const rootPlayers = [];\n const subPlayers = [];\n const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(entry => {\n const { element, player, instruction } = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n let parentWithAnimation = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n let elm = element;\n const parentsToAdd = [];\n while (elm = elm.parentNode) {\n const detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n }\n const innerPlayer = this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n }\n else {\n const parentPlayers = this.playersByElement.get(parentWithAnimation);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n }\n else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n // find all of the sub players' corresponding inner animation players\n subPlayers.forEach(player => {\n // even if no players are found for a sub animation it\n // will still complete itself after the next tick since it's Noop\n const playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(player => {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n }\n else {\n player.destroy();\n }\n });\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let i = 0; i < allLeaveNodes.length; i++) {\n const element = allLeaveNodes[i];\n const details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation)\n continue;\n let players = [];\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let j = 0; j < queriedInnerElements.length; j++) {\n let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n const activePlayers = players.filter(p => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n }\n else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(player => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n const index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n }\n elementContainsData(namespaceId, element) {\n let containsData = false;\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval)\n containsData = true;\n if (this.playersByElement.has(element))\n containsData = true;\n if (this.playersByQueriedElement.has(element))\n containsData = true;\n if (this.statesByElement.has(element))\n containsData = true;\n return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n }\n afterFlush(callback) {\n this._flushFns.push(callback);\n }\n afterFlushAnimationsDone(callback) {\n this._whenQuietFns.push(callback);\n }\n _getPreviousPlayers(element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n let players = [];\n if (isQueriedElement) {\n const queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n }\n else {\n const elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(player => {\n if (player.queued)\n return;\n if (!isRemovalAnimation && player.triggerName != triggerName)\n return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(player => {\n if (namespaceId && namespaceId != player.namespaceId)\n return false;\n if (triggerName && triggerName != player.triggerName)\n return false;\n return true;\n });\n }\n return players;\n }\n _beforeAnimationBuild(namespaceId, instruction, allPreviousPlayersMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n const targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n for (const timelineInstruction of instruction.timelines) {\n const element = timelineInstruction.element;\n const isQueriedElement = element !== rootElement;\n const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []);\n const previousPlayers = this._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(player => {\n const realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n }\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n _buildAnimation(namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const allQueriedPlayers = [];\n const allConsumedElements = new Set();\n const allSubElements = new Set();\n const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n const element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried)\n return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n const isQueriedElement = element !== rootElement;\n const previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n .map(p => p.getRealPlayer()))\n .filter(p => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const pp = p;\n return pp.element ? pp.element === element : false;\n });\n const preStyles = preStylesMap.get(element);\n const postStyles = postStylesMap.get(element);\n const keyframes = normalizeKeyframes$1(this.driver, this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles);\n const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n if (isQueriedElement) {\n const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(player => {\n getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n const player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(element => {\n getOrSetDefaultValue(skippedPlayersMap, element, []).push(player);\n });\n return player;\n }\n _buildPlayer(instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\n }\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n }\n}\nclass TransitionAnimationPlayer {\n constructor(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n this._player = new NoopAnimationPlayer();\n this._containsRealPlayer = false;\n this._queuedCallbacks = new Map();\n this.destroyed = false;\n this.parentPlayer = null;\n this.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n setRealPlayer(player) {\n if (this._containsRealPlayer)\n return;\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n }\n getRealPlayer() {\n return this._player;\n }\n overrideTotalTime(totalTime) {\n this.totalTime = totalTime;\n }\n syncPlayerEvents(player) {\n const p = this._player;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n _queueEvent(name, callback) {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n onDone(fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n onStart(fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n onDestroy(fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n init() {\n this._player.init();\n }\n hasStarted() {\n return this.queued ? false : this._player.hasStarted();\n }\n play() {\n !this.queued && this._player.play();\n }\n pause() {\n !this.queued && this._player.pause();\n }\n restart() {\n !this.queued && this._player.restart();\n }\n finish() {\n this._player.finish();\n }\n destroy() {\n this.destroyed = true;\n this._player.destroy();\n }\n reset() {\n !this.queued && this._player.reset();\n }\n setPosition(p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n getPosition() {\n return this.queued ? 0 : this._player.getPosition();\n }\n /** @internal */\n triggerCallback(phaseName) {\n const p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\nfunction deleteOrUnsetInMap(map, key, value) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n const cloakVals = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n const failedElements = [];\n elementPropsMap.forEach((props, element) => {\n const styles = new Map();\n props.forEach(prop => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n const rootMap = new Map();\n roots.forEach(root => rootMap.set(root, []));\n if (nodes.length == 0)\n return rootMap;\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map();\n function getRoot(node) {\n if (!node)\n return NULL_NODE;\n let root = localRootMap.get(node);\n if (root)\n return root;\n const parent = node.parentNode;\n if (rootMap.has(parent)) { // ngIf inside @trigger\n root = parent;\n }\n else if (nodeSet.has(parent)) { // ngIf inside ngIf\n root = NULL_NODE;\n }\n else { // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(node => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nfunction addClass(element, className) {\n element.classList?.add(className);\n}\nfunction removeClass(element, className) {\n element.classList?.remove(className);\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\nfunction flattenGroupPlayers(players) {\n const finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n }\n else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length)\n return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])\n return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry)\n return false;\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => preEntry.add(data));\n }\n else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\n\nclass AnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, _normalizer);\n this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context);\n }\n registerTrigger(componentId, namespaceId, hostElement, name, metadata) {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n register(namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n destroy(namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n onInsert(namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n onRemove(namespaceId, element, context, isHostElement) {\n this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n }\n disableAnimations(element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n process(namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value;\n this._timelineEngine.command(id, element, action, args);\n }\n else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n listen(namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n flush(microtaskId = -1) {\n this._transitionEngine.flush(microtaskId);\n }\n get players() {\n return this._transitionEngine.players\n .concat(this._timelineEngine.players);\n }\n whenRenderingDone() {\n return this._transitionEngine.whenRenderingDone();\n }\n}\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n let startStyles = null;\n let endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n }\n else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nclass SpecialCasedStyles {\n constructor(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n this._state = 0 /* SpecialCasedStylesState.Pending */;\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());\n }\n this._initialStyles = initialStyles;\n }\n start() {\n if (this._state < 1 /* SpecialCasedStylesState.Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n finish() {\n this.start();\n if (this._state < 2 /* SpecialCasedStylesState.Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n destroy() {\n this.finish();\n if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* SpecialCasedStylesState.Destroyed */;\n }\n }\n}\nSpecialCasedStyles.initialStylesByElement = ( /* @__PURE__ */new WeakMap());\nfunction filterNonAnimatableStyles(styles) {\n let result = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\n}\n\nclass WebAnimationsPlayer {\n constructor(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = new Map();\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n _buildPlayer() {\n if (this._initialized)\n return;\n this._initialized = true;\n const keyframes = this.keyframes;\n // @ts-expect-error overwriting a readonly property\n this.domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n this.domPlayer.addEventListener('finish', () => this._onFinish());\n }\n _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n }\n else {\n this.domPlayer.pause();\n }\n }\n _convertKeyframesToObject(keyframes) {\n const kfs = [];\n keyframes.forEach(frame => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n /** @internal */\n _triggerWebAnimation(element, keyframes, options) {\n // jscompiler doesn't seem to know animate is a native property because it's not fully\n // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n return element['animate'](this._convertKeyframesToObject(keyframes), options);\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n play() {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n pause() {\n this.init();\n this.domPlayer.pause();\n }\n finish() {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n reset() {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n restart() {\n this.reset();\n this.play();\n }\n hasStarted() {\n return this._started;\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n setPosition(p) {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n getPosition() {\n return this.domPlayer.currentTime / this.time;\n }\n get totalTime() {\n return this._delay + this._duration;\n }\n beforeDestroy() {\n const styles = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n this.currentSnapshot = styles;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\nclass WebAnimationsDriver {\n validateStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n validateAnimatableStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = []) {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions = { duration, delay, fill };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n const previousStyles = new Map();\n const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer);\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(player => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n let _keyframes = normalizeKeyframes(keyframes).map(styles => copyStyles(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\n }\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty };\n","/**\n * @license Angular v15.2.9\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ViewEncapsulation, Injectable, Inject, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE, NgModule } from '@angular/core';\nexport { ANIMATION_MODULE_TYPE } from '@angular/core';\nimport { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';\nimport { AnimationBuilder, sequence, AnimationFactory } from '@angular/animations';\nimport * as i1 from '@angular/animations/browser';\nimport { ɵAnimationEngine, ɵWebAnimationsStyleNormalizer, ɵAnimationStyleNormalizer, AnimationDriver, ɵWebAnimationsDriver, ɵNoopAnimationDriver } from '@angular/animations/browser';\nimport { DOCUMENT } from '@angular/common';\n\nclass BrowserAnimationBuilder extends AnimationBuilder {\n constructor(rootRenderer, doc) {\n super();\n this._nextAnimationId = 0;\n const typeData = { id: '0', encapsulation: ViewEncapsulation.None, styles: [], data: { animation: [] } };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n }\n build(animation) {\n const id = this._nextAnimationId.toString();\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n}\nBrowserAnimationBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserAnimationBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationBuilder });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(_id, _renderer) {\n super();\n this._id = _id;\n this._renderer = _renderer;\n }\n create(element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\nclass RendererAnimationPlayer {\n constructor(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n _listen(eventName, callback) {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n _command(command, ...args) {\n return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n onDone(fn) {\n this._listen('done', fn);\n }\n onStart(fn) {\n this._listen('start', fn);\n }\n onDestroy(fn) {\n this._listen('destroy', fn);\n }\n init() {\n this._command('init');\n }\n hasStarted() {\n return this._started;\n }\n play() {\n this._command('play');\n this._started = true;\n }\n pause() {\n this._command('pause');\n }\n restart() {\n this._command('restart');\n }\n finish() {\n this._command('finish');\n }\n destroy() {\n this._command('destroy');\n }\n reset() {\n this._command('reset');\n this._started = false;\n }\n setPosition(p) {\n this._command('setPosition', p);\n }\n getPosition() {\n return this._renderer.engine.players[+this.id]?.getPosition() ?? 0;\n }\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n return renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\nclass AnimationRendererFactory {\n constructor(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n this._currentId = 0;\n this._microtaskId = 1;\n this._animationCallbacksBuffer = [];\n this._rendererCache = new Map();\n this._cdRecurDepth = 0;\n this.promise = Promise.resolve(0);\n engine.onRemovalComplete = (element, delegate) => {\n // Note: if a component element has a leave animation, and a host leave animation,\n // the view engine will call `removeChild` for the parent\n // component renderer as well as for the child component renderer.\n // Therefore, we need to check if we already removed the element.\n const parentNode = delegate?.parentNode(element);\n if (parentNode) {\n delegate.removeChild(parentNode, element);\n }\n };\n }\n createRenderer(hostElement, type) {\n const EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n const delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type || !type.data || !type.data['animation']) {\n let renderer = this._rendererCache.get(delegate);\n if (!renderer) {\n // Ensure that the renderer is removed from the cache on destroy\n // since it may contain references to detached DOM nodes.\n const onRendererDestroy = () => this._rendererCache.delete(delegate);\n renderer =\n new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine, onRendererDestroy);\n // only cache this result when the base renderer is used\n this._rendererCache.set(delegate, renderer);\n }\n return renderer;\n }\n const componentId = type.id;\n const namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n const registerTrigger = (trigger) => {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n }\n else {\n this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n const animationTriggers = type.data['animation'];\n animationTriggers.forEach(registerTrigger);\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n }\n begin() {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n _scheduleCountTask() {\n // always use promise to schedule microtask instead of use Zone\n this.promise.then(() => {\n this._microtaskId++;\n });\n }\n /** @internal */\n scheduleListenerCallback(count, fn, data) {\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(() => fn(data));\n return;\n }\n if (this._animationCallbacksBuffer.length == 0) {\n Promise.resolve(null).then(() => {\n this._zone.run(() => {\n this._animationCallbacksBuffer.forEach(tuple => {\n const [fn, data] = tuple;\n fn(data);\n });\n this._animationCallbacksBuffer = [];\n });\n });\n }\n this._animationCallbacksBuffer.push([fn, data]);\n }\n end() {\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(() => {\n this._scheduleCountTask();\n this.engine.flush(this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n whenRenderingDone() {\n return this.engine.whenRenderingDone();\n }\n}\nAnimationRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AnimationRendererFactory, deps: [{ token: i0.RendererFactory2 }, { token: i1.ɵAnimationEngine }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nAnimationRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AnimationRendererFactory });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: AnimationRendererFactory, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: i1.ɵAnimationEngine }, { type: i0.NgZone }]; } });\nclass BaseAnimationRenderer {\n constructor(namespaceId, delegate, engine, _onDestroy) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this._onDestroy = _onDestroy;\n this.destroyNode = this.delegate.destroyNode ? (n) => delegate.destroyNode(n) : null;\n }\n get data() {\n return this.delegate.data;\n }\n destroy() {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.delegate.destroy();\n this._onDestroy?.();\n }\n createElement(name, namespace) {\n return this.delegate.createElement(name, namespace);\n }\n createComment(value) {\n return this.delegate.createComment(value);\n }\n createText(value) {\n return this.delegate.createText(value);\n }\n appendChild(parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n }\n insertBefore(parent, newChild, refChild, isMove = true) {\n this.delegate.insertBefore(parent, newChild, refChild);\n // If `isMove` true than we should animate this insert.\n this.engine.onInsert(this.namespaceId, newChild, parent, isMove);\n }\n removeChild(parent, oldChild, isHostElement) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate, isHostElement);\n }\n selectRootElement(selectorOrNode, preserveContent) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n parentNode(node) {\n return this.delegate.parentNode(node);\n }\n nextSibling(node) {\n return this.delegate.nextSibling(node);\n }\n setAttribute(el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n removeAttribute(el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n }\n addClass(el, name) {\n this.delegate.addClass(el, name);\n }\n removeClass(el, name) {\n this.delegate.removeClass(el, name);\n }\n setStyle(el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n }\n removeStyle(el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n }\n setValue(node, value) {\n this.delegate.setValue(node, value);\n }\n listen(target, eventName, callback) {\n return this.delegate.listen(target, eventName, callback);\n }\n disableAnimations(element, value) {\n this.engine.disableAnimations(element, value);\n }\n}\nclass AnimationRenderer extends BaseAnimationRenderer {\n constructor(factory, namespaceId, delegate, engine, onDestroy) {\n super(namespaceId, delegate, engine, onDestroy);\n this.factory = factory;\n this.namespaceId = namespaceId;\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value);\n }\n else {\n this.engine.process(this.namespaceId, el, name.slice(1), value);\n }\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n }\n listen(target, eventName, callback) {\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n const element = resolveElementFromTarget(target);\n let name = eventName.slice(1);\n let phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name.charAt(0) != ANIMATION_PREFIX) {\n [name, phase] = parseTriggerCallbackName(name);\n }\n return this.engine.listen(this.namespaceId, element, name, phase, event => {\n const countId = event['_data'] || -1;\n this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n }\n}\nfunction resolveElementFromTarget(target) {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\nfunction parseTriggerCallbackName(triggerName) {\n const dotIndex = triggerName.indexOf('.');\n const trigger = triggerName.substring(0, dotIndex);\n const phase = triggerName.slice(dotIndex + 1);\n return [trigger, phase];\n}\n\nclass InjectableAnimationEngine extends ɵAnimationEngine {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(doc, driver, normalizer, appRef) {\n super(doc.body, driver, normalizer);\n }\n ngOnDestroy() {\n this.flush();\n }\n}\nInjectableAnimationEngine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });\nInjectableAnimationEngine.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: InjectableAnimationEngine });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: InjectableAnimationEngine, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }, { type: i0.ApplicationRef }]; } });\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\nconst SHARED_ANIMATION_PROVIDERS = [\n { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },\n { provide: ɵAnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },\n { provide: ɵAnimationEngine, useClass: InjectableAnimationEngine }, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]\n }\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nconst BROWSER_ANIMATIONS_PROVIDERS = [\n { provide: AnimationDriver, useFactory: () => new ɵWebAnimationsDriver() },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }, ...SHARED_ANIMATION_PROVIDERS\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nconst BROWSER_NOOP_ANIMATIONS_PROVIDERS = [\n { provide: AnimationDriver, useClass: ɵNoopAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }, ...SHARED_ANIMATION_PROVIDERS\n];\n\n/**\n * Exports `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\nclass BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see `BrowserAnimationsModuleConfig`\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(config) {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS :\n BROWSER_ANIMATIONS_PROVIDERS\n };\n }\n}\nBrowserAnimationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });\nBrowserAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: BrowserAnimationsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n }]\n }] });\n/**\n * Returns the set of [dependency-injection providers](guide/glossary#provider)\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\nclass NoopAnimationsModule {\n}\nNoopAnimationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNoopAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });\nNoopAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.9\", ngImport: i0, type: NoopAnimationsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n }]\n }] });\n/**\n * Returns the set of [dependency-injection providers](guide/glossary#provider)\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideNoopAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, BrowserAnimationFactory as ɵBrowserAnimationFactory, InjectableAnimationEngine as ɵInjectableAnimationEngine };\n","import { isDevMode } from '@angular/core';\n\n/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\nclass Trigger {\n constructor(open, close) {\n this.open = open;\n this.close = close || open;\n }\n isManual() {\n return this.open === 'manual' || this.close === 'manual';\n }\n}\n\nconst DEFAULT_ALIASES = {\n hover: ['mouseover', 'mouseout'],\n focus: ['focusin', 'focusout']\n};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction parseTriggers(triggers, aliases = DEFAULT_ALIASES) {\n const trimmedTriggers = (triggers || '').trim();\n if (trimmedTriggers.length === 0) {\n return [];\n }\n const parsedTriggers = trimmedTriggers\n .split(/\\s+/)\n .map((trigger) => trigger.split(':'))\n .map((triggerPair) => {\n const alias = aliases[triggerPair[0]] || triggerPair;\n return new Trigger(alias[0], alias[1]);\n });\n const manualTriggers = parsedTriggers.filter((triggerPair) => triggerPair.isManual());\n if (manualTriggers.length > 1) {\n throw new Error('Triggers parse error: only one manual trigger is allowed');\n }\n if (manualTriggers.length === 1 && parsedTriggers.length > 1) {\n throw new Error('Triggers parse error: manual trigger can\\'t be mixed with other triggers');\n }\n return parsedTriggers;\n}\nfunction listenToTriggers(renderer, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntarget, triggers, showFn, hideFn, toggleFn) {\n const parsedTriggers = parseTriggers(triggers);\n const listeners = [];\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n return Function.prototype;\n }\n parsedTriggers.forEach((trigger) => {\n if (trigger.open === trigger.close) {\n listeners.push(renderer.listen(target, trigger.open, toggleFn));\n return;\n }\n listeners.push(renderer.listen(target, trigger.open, showFn));\n if (trigger.close) {\n listeners.push(renderer.listen(target, trigger.close, hideFn));\n }\n });\n return () => {\n listeners.forEach((unsubscribeFn) => unsubscribeFn());\n };\n}\nfunction listenToTriggersV2(renderer, options) {\n const parsedTriggers = parseTriggers(options.triggers);\n const target = options.target;\n // do nothing\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n return Function.prototype;\n }\n // all listeners\n const listeners = [];\n // lazy listeners registration\n const _registerHide = [];\n const registerHide = () => {\n // add hide listeners to unregister array\n _registerHide.forEach((fn) => listeners.push(fn()));\n // register hide events only once\n _registerHide.length = 0;\n };\n // register open\\close\\toggle listeners\n parsedTriggers.forEach((trigger) => {\n const useToggle = trigger.open === trigger.close;\n const showFn = useToggle ? options.toggle : options.show;\n if (!useToggle && trigger.close && options.hide) {\n const _hide = renderer.listen(target, trigger.close, options.hide);\n _registerHide.push(() => _hide);\n }\n if (showFn) {\n listeners.push(renderer.listen(target, trigger.open, () => showFn(registerHide)));\n }\n });\n return () => {\n listeners.forEach((unsubscribeFn) => unsubscribeFn());\n };\n}\nfunction registerOutsideClick(renderer, options) {\n if (!options.outsideClick) {\n return Function.prototype;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return renderer.listen('document', 'click', (event) => {\n if (options.target && options.target.contains(event.target)) {\n return;\n }\n if (options.targets &&\n options.targets.some(target => target.contains(event.target))) {\n return;\n }\n if (options.hide) {\n options.hide();\n }\n });\n}\nfunction registerEscClick(renderer, options) {\n if (!options.outsideEsc) {\n return Function.prototype;\n }\n return renderer.listen('document', 'keyup.esc', (event) => {\n if (options.target && options.target.contains(event.target)) {\n return;\n }\n if (options.targets &&\n options.targets.some(target => target.contains(event.target))) {\n return;\n }\n if (options.hide) {\n options.hide();\n }\n });\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * JS version of browser APIs. This library can only run in the browser.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst win = (typeof window !== 'undefined' && window) || {};\nconst document = win.document;\nconst location = win.location;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst gc = win.gc ? () => win.gc() : () => null;\nconst performance = win.performance ? win.performance : null;\nconst Event = win.Event;\nconst MouseEvent = win.MouseEvent;\nconst KeyboardEvent = win.KeyboardEvent;\nconst EventTarget = win.EventTarget;\nconst History = win.History;\nconst Location = win.Location;\nconst EventListener = win.EventListener;\n\nvar BsVerions;\n(function (BsVerions) {\n BsVerions[\"isBs3\"] = \"bs3\";\n BsVerions[\"isBs4\"] = \"bs4\";\n BsVerions[\"isBs5\"] = \"bs5\";\n})(BsVerions || (BsVerions = {}));\nlet guessedVersion;\nfunction _guessBsVersion() {\n if (typeof win.document === 'undefined') {\n return 'bs4';\n }\n const spanEl = win.document.createElement('span');\n spanEl.innerText = 'testing bs version';\n spanEl.classList.add('d-none');\n spanEl.classList.add('visually-hidden');\n win.document.head.appendChild(spanEl);\n const rect = spanEl.getBoundingClientRect();\n const overflowStyle = win.getComputedStyle(spanEl).overflow;\n win.document.head.removeChild(spanEl);\n if (!rect || (rect && rect.top !== 0)) {\n return 'bs3';\n }\n if (overflowStyle && overflowStyle === 'hidden') {\n return 'bs5';\n }\n return 'bs4';\n}\nfunction setTheme(theme) {\n guessedVersion = theme;\n}\n// todo: in ngx-bootstrap, bs4 will became a default one\nfunction isBs3() {\n if (typeof win === 'undefined') {\n return true;\n }\n if (typeof win.__theme === 'undefined') {\n if (guessedVersion) {\n return guessedVersion === 'bs3';\n }\n guessedVersion = _guessBsVersion();\n return guessedVersion === 'bs3';\n }\n return win.__theme === 'bs3';\n}\nfunction isBs4() {\n if (isBs3())\n return false;\n if (guessedVersion)\n return guessedVersion === 'bs4';\n guessedVersion = _guessBsVersion();\n return guessedVersion === 'bs4';\n}\nfunction isBs5() {\n if (isBs3() || isBs4())\n return false;\n if (guessedVersion)\n return guessedVersion === 'bs5';\n guessedVersion = _guessBsVersion();\n return guessedVersion === 'bs5';\n}\nfunction getBsVer() {\n return {\n isBs3: isBs3(),\n isBs4: isBs4(),\n isBs5: isBs5()\n };\n}\nfunction currentBsVersion() {\n const bsVer = getBsVer();\n const resVersion = Object.keys(bsVer).find(key => bsVer[key]);\n return BsVerions[resVersion];\n}\n\nclass LinkedList {\n constructor() {\n this.length = 0;\n this.asArray = [];\n // Array methods overriding END\n }\n get(position) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n return void 0;\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = current === null || current === void 0 ? void 0 : current.next;\n }\n return current === null || current === void 0 ? void 0 : current.value;\n }\n add(value, position = this.length) {\n if (position < 0 || position > this.length) {\n throw new Error('Position is out of the list');\n }\n const node = {\n value,\n next: undefined,\n previous: undefined\n };\n if (this.length === 0) {\n this.head = node;\n this.tail = node;\n this.current = node;\n }\n else {\n if (position === 0 && this.head) {\n // first node\n node.next = this.head;\n this.head.previous = node;\n this.head = node;\n }\n else if (position === this.length && this.tail) {\n // last node\n this.tail.next = node;\n node.previous = this.tail;\n this.tail = node;\n }\n else {\n // node in middle\n const currentPreviousNode = this.getNode(position - 1);\n const currentNextNode = currentPreviousNode === null || currentPreviousNode === void 0 ? void 0 : currentPreviousNode.next;\n if (currentPreviousNode && currentNextNode) {\n currentPreviousNode.next = node;\n currentNextNode.previous = node;\n node.previous = currentPreviousNode;\n node.next = currentNextNode;\n }\n }\n }\n this.length++;\n this.createInternalArrayRepresentation();\n }\n remove(position = 0) {\n var _a;\n if (this.length === 0 || position < 0 || position >= this.length) {\n throw new Error('Position is out of the list');\n }\n if (position === 0 && this.head) {\n // first node\n this.head = this.head.next;\n if (this.head) {\n // there is no second node\n this.head.previous = undefined;\n }\n else {\n // there is no second node\n this.tail = undefined;\n }\n }\n else if (position === this.length - 1 && ((_a = this.tail) === null || _a === void 0 ? void 0 : _a.previous)) {\n // last node\n this.tail = this.tail.previous;\n this.tail.next = undefined;\n }\n else {\n // middle node\n const removedNode = this.getNode(position);\n if ((removedNode === null || removedNode === void 0 ? void 0 : removedNode.next) && removedNode.previous) {\n removedNode.next.previous = removedNode.previous;\n removedNode.previous.next = removedNode.next;\n }\n }\n this.length--;\n this.createInternalArrayRepresentation();\n }\n set(position, value) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n throw new Error('Position is out of the list');\n }\n const node = this.getNode(position);\n if (node) {\n node.value = value;\n this.createInternalArrayRepresentation();\n }\n }\n toArray() {\n return this.asArray;\n }\n findAll(fn) {\n let current = this.head;\n const result = [];\n if (!current) {\n return result;\n }\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return result;\n }\n if (fn(current.value, index)) {\n result.push({ index, value: current.value });\n }\n current = current.next;\n }\n return result;\n }\n // Array methods overriding start\n push(...args) {\n args.forEach((arg) => {\n this.add(arg);\n });\n return this.length;\n }\n pop() {\n if (this.length === 0) {\n return;\n }\n const last = this.tail;\n this.remove(this.length - 1);\n return last === null || last === void 0 ? void 0 : last.value;\n }\n unshift(...args) {\n args.reverse();\n args.forEach((arg) => {\n this.add(arg, 0);\n });\n return this.length;\n }\n shift() {\n var _a;\n if (this.length === 0) {\n return undefined;\n }\n const lastItem = (_a = this.head) === null || _a === void 0 ? void 0 : _a.value;\n this.remove();\n return lastItem;\n }\n forEach(fn) {\n let current = this.head;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return;\n }\n fn(current.value, index);\n current = current.next;\n }\n }\n indexOf(value) {\n let current = this.head;\n let position = -1;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return position;\n }\n if (current.value === value) {\n position = index;\n break;\n }\n current = current.next;\n }\n return position;\n }\n some(fn) {\n let current = this.head;\n let result = false;\n while (current && !result) {\n if (fn(current.value)) {\n result = true;\n break;\n }\n current = current.next;\n }\n return result;\n }\n every(fn) {\n let current = this.head;\n let result = true;\n while (current && result) {\n if (!fn(current.value)) {\n result = false;\n }\n current = current.next;\n }\n return result;\n }\n toString() {\n return '[Linked List]';\n }\n find(fn) {\n let current = this.head;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return;\n }\n if (fn(current.value, index)) {\n return current.value;\n }\n current = current.next;\n }\n }\n findIndex(fn) {\n let current = this.head;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return -1;\n }\n if (fn(current.value, index)) {\n return index;\n }\n current = current.next;\n }\n return -1;\n }\n getNode(position) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n throw new Error('Position is out of the list');\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = current === null || current === void 0 ? void 0 : current.next;\n }\n return current;\n }\n createInternalArrayRepresentation() {\n const outArray = [];\n let current = this.head;\n while (current) {\n outArray.push(current.value);\n current = current.next;\n }\n this.asArray = outArray;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction OnChange() {\n const sufix = 'Change';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function OnChangeHandler(target, propertyKey) {\n const _key = ` __${propertyKey}Value`;\n Object.defineProperty(target, propertyKey, {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get() {\n return this[_key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(value) {\n const prevValue = this[_key];\n this[_key] = value;\n if (prevValue !== value && this[propertyKey + sufix]) {\n this[propertyKey + sufix].emit(value);\n }\n }\n });\n };\n}\n\nclass Utils {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static reflow(element) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((bs) => bs)(element.offsetHeight);\n }\n // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static getStyles(elem) {\n // Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n // IE throws on elements created in popups\n // FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n let view = elem.ownerDocument.defaultView;\n if (!view || !view.opener) {\n view = win;\n }\n return view.getComputedStyle(elem);\n }\n static stackOverflowConfig() {\n const bsVer = currentBsVersion();\n return {\n crossorigin: bsVer !== 'bs3' ? \"anonymous\" : undefined,\n integrity: bsVer === 'bs5' ? 'sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We' : bsVer === 'bs4' ? 'sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2' : undefined,\n cdnLink: bsVer === 'bs5' ? 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css' : bsVer === 'bs4' ? 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css' : 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',\n };\n }\n}\n\nconst _messagesHash = {};\nconst _hideMsg = typeof console === 'undefined' || !('warn' in console);\nfunction warnOnce(msg) {\n if (!isDevMode() || _hideMsg || msg in _messagesHash) {\n return;\n }\n _messagesHash[msg] = true;\n console.warn(msg);\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BsVerions, LinkedList, OnChange, Trigger, Utils, currentBsVersion, document, getBsVer, isBs3, listenToTriggers, listenToTriggersV2, parseTriggers, registerEscClick, registerOutsideClick, setTheme, warnOnce, win as window, isBs4 as ɵa, isBs5 as ɵb };\n\n","import { Subscription } from '../Subscription';\nexport const animationFrameProvider = {\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport const animationFrame = animationFrameScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AnimationFrameScheduler extends AsyncScheduler {\n flush(action) {\n this._active = true;\n const flushId = this._scheduled;\n this._scheduled = undefined;\n const { actions } = this;\n let error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nexport class AnimationFrameAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n if (!scheduler.actions.some((action) => action.id === id)) {\n animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n }\n}\n","import { getBsVer } from 'ngx-bootstrap/utils';\nimport { ɵɵdefineInjectable, ɵɵinject, NgZone, RendererFactory2, PLATFORM_ID, Injectable, Inject, ElementRef } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Subject, merge, fromEvent, of, animationFrameScheduler } from 'rxjs';\n\nimport * as ɵngcc0 from '@angular/core';\nvar MapPlacementInToRL;\n(function (MapPlacementInToRL) {\n MapPlacementInToRL[\"top\"] = \"top\";\n MapPlacementInToRL[\"bottom\"] = \"bottom\";\n MapPlacementInToRL[\"left\"] = \"left\";\n MapPlacementInToRL[\"right\"] = \"right\";\n MapPlacementInToRL[\"auto\"] = \"auto\";\n MapPlacementInToRL[\"end\"] = \"right\";\n MapPlacementInToRL[\"start\"] = \"left\";\n MapPlacementInToRL[\"top left\"] = \"top left\";\n MapPlacementInToRL[\"top right\"] = \"top right\";\n MapPlacementInToRL[\"right top\"] = \"right top\";\n MapPlacementInToRL[\"right bottom\"] = \"right bottom\";\n MapPlacementInToRL[\"bottom right\"] = \"bottom right\";\n MapPlacementInToRL[\"bottom left\"] = \"bottom left\";\n MapPlacementInToRL[\"left bottom\"] = \"left bottom\";\n MapPlacementInToRL[\"left top\"] = \"left top\";\n MapPlacementInToRL[\"top start\"] = \"top left\";\n MapPlacementInToRL[\"top end\"] = \"top right\";\n MapPlacementInToRL[\"end top\"] = \"right top\";\n MapPlacementInToRL[\"end bottom\"] = \"right bottom\";\n MapPlacementInToRL[\"bottom end\"] = \"bottom right\";\n MapPlacementInToRL[\"bottom start\"] = \"bottom left\";\n MapPlacementInToRL[\"start bottom\"] = \"start bottom\";\n MapPlacementInToRL[\"start top\"] = \"left top\";\n})(MapPlacementInToRL || (MapPlacementInToRL = {}));\nvar PlacementForBs5;\n(function (PlacementForBs5) {\n PlacementForBs5[\"top\"] = \"top\";\n PlacementForBs5[\"bottom\"] = \"bottom\";\n PlacementForBs5[\"left\"] = \"start\";\n PlacementForBs5[\"right\"] = \"end\";\n PlacementForBs5[\"auto\"] = \"auto\";\n PlacementForBs5[\"end\"] = \"end\";\n PlacementForBs5[\"start\"] = \"start\";\n PlacementForBs5[\"top left\"] = \"top start\";\n PlacementForBs5[\"top right\"] = \"top end\";\n PlacementForBs5[\"right top\"] = \"end top\";\n PlacementForBs5[\"right bottom\"] = \"end bottom\";\n PlacementForBs5[\"bottom right\"] = \"bottom end\";\n PlacementForBs5[\"bottom left\"] = \"bottom start\";\n PlacementForBs5[\"left bottom\"] = \"start bottom\";\n PlacementForBs5[\"left top\"] = \"start top\";\n PlacementForBs5[\"top start\"] = \"top start\";\n PlacementForBs5[\"top end\"] = \"top end\";\n PlacementForBs5[\"end top\"] = \"end top\";\n PlacementForBs5[\"end bottom\"] = \"end bottom\";\n PlacementForBs5[\"bottom end\"] = \"bottom end\";\n PlacementForBs5[\"bottom start\"] = \"bottom start\";\n PlacementForBs5[\"start bottom\"] = \"start bottom\";\n PlacementForBs5[\"start top\"] = \"start top\";\n})(PlacementForBs5 || (PlacementForBs5 = {}));\n\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window === null || window === void 0 ? void 0 : window.getComputedStyle(element, null);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return property ? css && css[property] : css;\n}\n\nconst isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determines if the browser is Internet Explorer\n */\n// todo: valorkin fix and drop IE support :evil:\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && !!(window.MSInputMethodContext && /MSIE 10/.test(navigator.userAgent));\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n const noOffsetParent = isIE(10) ? document.body : null;\n // NOTE: 1 DOM access here\n let offsetParent = element === null || element === void 0 ? void 0 : element.offsetParent;\n // Skip hidden elements which don't have an offsetParent\n let sibling = void 0;\n while (offsetParent === noOffsetParent\n && element.nextElementSibling\n && sibling !== element.nextElementSibling) {\n // todo: valorkin fix\n sibling = element.nextElementSibling;\n offsetParent = sibling.offsetParent;\n }\n const nodeName = offsetParent && offsetParent.nodeName;\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return sibling ? sibling.ownerDocument.documentElement : document.documentElement;\n }\n // .offsetParent will return the closest TH, TD or TABLE in case\n if (offsetParent &&\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n return offsetParent;\n}\n\n// todo: valorkin fix\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element);\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n // todo: valorkin fix\n const commonAncestorContainer = range.commonAncestorContainer;\n // Both nodes are inside #document\n if ((element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n return getOffsetParent(commonAncestorContainer);\n }\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n }\n else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n */\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while ((el === null || el === void 0 ? void 0 : el.parentElement) && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Helper to detect borders of a given element\n */\nfunction getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n return (parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`]));\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n const _body = body;\n const _html = html;\n const _computedStyle = computedStyle;\n return Math.max(_body[`offset${axis}`], _body[`scroll${axis}`], _html[`client${axis}`], _html[`offset${axis}`], _html[`scroll${axis}`], isIE(10)\n ? (parseInt(_html[`offset${axis}`], 10) +\n parseInt(_computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`], 10) +\n parseInt(_computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`], 10))\n : 0);\n}\nfunction getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) ? getComputedStyle(html) : void 0;\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n */\nfunction getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n return element[upperSide];\n}\n\nfunction getClientRect(offsets) {\n return Object.assign(Object.assign({}, offsets), { right: (offsets.left || 0) + offsets.width, bottom: (offsets.top || 0) + offsets.height });\n}\n\n/**\n * Tells if a given input is a number\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(Number(n));\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isNumber(value) {\n return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';\n}\n\n/**\n * Get bounding client rect of given element\n */\nfunction getBoundingClientRect(element) {\n const rect = element.getBoundingClientRect();\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n if (rect && isNumber(rect.top) && isNumber(rect.left) && isNumber(rect.bottom) && isNumber(rect.right)) {\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n }\n }\n catch (e) {\n return rect;\n }\n if (!(rect && isNumber(rect.top) && isNumber(rect.left) && isNumber(rect.bottom) && isNumber(rect.right))) {\n return rect;\n }\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : undefined;\n const width = (sizes === null || sizes === void 0 ? void 0 : sizes.width) || element.clientWidth\n || isNumber(rect.right) && isNumber(result.left) && rect.right - result.left || 0;\n const height = (sizes === null || sizes === void 0 ? void 0 : sizes.height) || element.clientHeight\n || isNumber(rect.bottom) && isNumber(result.top) && rect.bottom - result.top || 0;\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n return getClientRect(result);\n}\n\n/**\n * Returns the parentNode or the host of the element\n */\n// todo: valorkin fix\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n */\n// todo: valorkin fix\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n default:\n }\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(String(overflow) + String(overflowY) + String(overflowX))) {\n return element;\n }\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Sum or subtract the element scroll values (left and top) from a given rect object\n */\nfunction includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n if (isNumber(rect.top)) {\n rect.top += scrollTop * modifier;\n }\n if (isNumber(rect.bottom)) {\n rect.bottom += scrollTop * modifier;\n }\n if (isNumber(rect.left)) {\n rect.left += scrollLeft * modifier;\n }\n if (isNumber(rect.right)) {\n rect.right += scrollLeft * modifier;\n }\n return rect;\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n var _a, _b, _c, _d, _e, _f;\n const isIE10 = isIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max((_a = parentRect.top) !== null && _a !== void 0 ? _a : 0, 0);\n parentRect.left = Math.max((_b = parentRect.left) !== null && _b !== void 0 ? _b : 0, 0);\n }\n let offsets = getClientRect({\n top: ((_c = childrenRect.top) !== null && _c !== void 0 ? _c : 0) - ((_d = parentRect.top) !== null && _d !== void 0 ? _d : 0) - borderTopWidth,\n left: ((_e = childrenRect.left) !== null && _e !== void 0 ? _e : 0) - ((_f = parentRect.left) !== null && _f !== void 0 ? _f : 0) - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n if (isNumber(offsets.top)) {\n offsets.top -= borderTopWidth - marginTop;\n }\n if (isNumber(offsets.bottom)) {\n offsets.bottom -= borderTopWidth - marginTop;\n }\n if (isNumber(offsets.left)) {\n offsets.left -= borderLeftWidth - marginLeft;\n }\n if (isNumber(offsets.right)) {\n offsets.right -= borderLeftWidth - marginLeft;\n }\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n if (isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n const offset = {\n top: scrollTop - Number(relativeOffset === null || relativeOffset === void 0 ? void 0 : relativeOffset.top) + Number(relativeOffset === null || relativeOffset === void 0 ? void 0 : relativeOffset.marginTop),\n left: scrollLeft - Number(relativeOffset === null || relativeOffset === void 0 ? void 0 : relativeOffset.left) + Number(relativeOffset === null || relativeOffset === void 0 ? void 0 : relativeOffset.marginLeft),\n width,\n height\n };\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n */\nfunction isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n return isFixed(getParentNode(element));\n}\n\nfunction getBoundaries(target, host, padding = 0, boundariesElement, fixedPosition = false) {\n // NOTE: 1 DOM access here\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(target) : findCommonOffsetParent(target, host);\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(host));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = target.ownerDocument.documentElement;\n }\n }\n else if (boundariesElement === 'window') {\n boundariesNode = target.ownerDocument.documentElement;\n }\n else {\n boundariesNode = boundariesElement;\n }\n const offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n // In case of HTML, we need a different computation\n if (offsets && boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(target.ownerDocument);\n if (isNumber(boundaries.top) && isNumber(offsets.top) && isNumber(offsets.marginTop)) {\n boundaries.top += offsets.top - offsets.marginTop;\n }\n if (isNumber(boundaries.top)) {\n boundaries.bottom = Number(height) + Number(offsets.top);\n }\n if (isNumber(boundaries.left) && isNumber(offsets.left) && isNumber(offsets.marginLeft)) {\n boundaries.left += offsets.left - offsets.marginLeft;\n }\n if (isNumber(boundaries.top)) {\n boundaries.right = Number(width) + Number(offsets.left);\n }\n }\n else if (offsets) {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n // Add paddings\n if (isNumber(boundaries.left)) {\n boundaries.left += padding;\n }\n if (isNumber(boundaries.top)) {\n boundaries.top += padding;\n }\n if (isNumber(boundaries.right)) {\n boundaries.right -= padding;\n }\n if (isNumber(boundaries.bottom)) {\n boundaries.bottom -= padding;\n }\n return boundaries;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n */\nfunction getArea({ width, height }) {\n return width * height;\n}\nfunction computeAutoPlacement(placement, refRect, target, host, allowedPositions = ['top', 'bottom', 'right', 'left'], boundariesElement = 'viewport', padding = 0) {\n var _a, _b, _c, _d;\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n const boundaries = getBoundaries(target, host, padding, boundariesElement);\n const rects = {\n top: {\n width: (_a = boundaries.width) !== null && _a !== void 0 ? _a : 0,\n height: refRect.top && boundaries.top ? refRect.top - boundaries.top : 0\n },\n right: {\n width: boundaries.right && refRect.right ? boundaries.right - refRect.right : 0,\n height: (_b = boundaries.height) !== null && _b !== void 0 ? _b : 0\n },\n bottom: {\n width: (_c = boundaries.width) !== null && _c !== void 0 ? _c : 0,\n height: boundaries.bottom && refRect.bottom ? boundaries.bottom - refRect.bottom : 0\n },\n left: {\n width: refRect.left && boundaries.left ? refRect.left - boundaries.left : 0,\n height: (_d = boundaries.height) !== null && _d !== void 0 ? _d : 0\n }\n };\n const sortedAreas = Object.keys(rects)\n .map((key) => (Object.assign(Object.assign({ key }, rects[key]), { area: getArea(rects[key]) })))\n .sort((a, b) => b.area - a.area);\n let filteredAreas = sortedAreas.filter(({ width, height }) => {\n return width >= target.clientWidth\n && height >= target.clientHeight;\n });\n filteredAreas = filteredAreas.filter((position) => {\n return allowedPositions\n .some((allowedPosition) => {\n return allowedPosition === position.key;\n });\n });\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n const variation = placement.split(' ')[1];\n // for tooltip on auto position\n target.className = target.className.replace(/bs-tooltip-auto/g, `bs-tooltip-${getBsVer().isBs5 ? PlacementForBs5[computedPlacement] : computedPlacement}`);\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n\nfunction getOffsets(data) {\n var _a, _b, _c, _d;\n return {\n width: data.offsets.target.width,\n height: data.offsets.target.height,\n left: Math.floor((_a = data.offsets.target.left) !== null && _a !== void 0 ? _a : 0),\n top: Math.round((_b = data.offsets.target.top) !== null && _b !== void 0 ? _b : 0),\n bottom: Math.round((_c = data.offsets.target.bottom) !== null && _c !== void 0 ? _c : 0),\n right: Math.floor((_d = data.offsets.target.right) !== null && _d !== void 0 ? _d : 0)\n };\n}\n\n/**\n * Get the opposite placement of the given one\n */\nfunction getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n\n/**\n * Get the opposite placement variation of the given one\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'right') {\n return 'left';\n }\n else if (variation === 'left') {\n return 'right';\n }\n return variation;\n}\n\nconst parse = (value, def = 0) => value ? parseFloat(value) : def;\nconst ɵ0 = parse;\nfunction getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window === null || window === void 0 ? void 0 : window.getComputedStyle(element);\n const x = parse(styles === null || styles === void 0 ? void 0 : styles.marginTop) + parse(styles === null || styles === void 0 ? void 0 : styles.marginBottom);\n const y = parse(styles === null || styles === void 0 ? void 0 : styles.marginLeft) + parse(styles === null || styles === void 0 ? void 0 : styles.marginRight);\n return {\n width: Number(element.offsetWidth) + y,\n height: Number(element.offsetHeight) + x\n };\n}\n\n/**\n * Get offsets to the reference element\n */\nfunction getReferenceOffsets(target, host, fixedPosition) {\n const commonOffsetParent = fixedPosition\n ? getFixedPositionOffsetParent(target)\n : findCommonOffsetParent(target, host);\n return getOffsetRectRelativeToArbitraryNode(host, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get offsets to the target\n */\nfunction getTargetOffsets(target, hostOffsets, position) {\n var _a, _b, _c;\n const placement = position.split(' ')[0];\n // Get target node sizes\n const targetRect = getOuterSizes(target);\n // Add position, width and height to our offsets object\n const targetOffsets = {\n width: targetRect.width,\n height: targetRect.height\n };\n // depending by the target placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n targetOffsets[mainSide] =\n ((_a = hostOffsets[mainSide]) !== null && _a !== void 0 ? _a : 0) +\n hostOffsets[measurement] / 2 -\n targetRect[measurement] / 2;\n targetOffsets[secondarySide] = placement === secondarySide\n ? ((_b = hostOffsets[secondarySide]) !== null && _b !== void 0 ? _b : 0) - targetRect[secondaryMeasurement]\n : (_c = hostOffsets[getOppositePlacement(secondarySide)]) !== null && _c !== void 0 ? _c : 0;\n return targetOffsets;\n}\n\nfunction isModifierEnabled(options, modifierName) {\n var _a;\n return !!((_a = options.modifiers[modifierName]) === null || _a === void 0 ? void 0 : _a.enabled);\n}\n\nconst availablePositions = {\n top: ['top', 'top start', 'top end'],\n bottom: ['bottom', 'bottom start', 'bottom end'],\n start: ['start', 'start top', 'start bottom'],\n end: ['end', 'end top', 'end bottom']\n};\nfunction checkPopoverMargin(placement, checkPosition) {\n if (!getBsVer().isBs5) {\n return false;\n }\n return availablePositions[checkPosition].includes(placement);\n}\nfunction checkMargins(placement) {\n if (!getBsVer().isBs5) {\n return '';\n }\n if (checkPopoverMargin(placement, 'end')) {\n return 'ms-2';\n }\n if (checkPopoverMargin(placement, 'start')) {\n return 'me-2';\n }\n if (checkPopoverMargin(placement, 'top')) {\n return 'mb-2';\n }\n if (checkPopoverMargin(placement, 'bottom')) {\n return 'mt-2';\n }\n return '';\n}\n\nfunction updateContainerClass(data, renderer) {\n const target = data.instance.target;\n let containerClass = target.className;\n const dataPlacement = getBsVer().isBs5 ? PlacementForBs5[data.placement] : data.placement;\n if (data.placementAuto) {\n containerClass = containerClass.replace(/bs-popover-auto/g, `bs-popover-${dataPlacement}`);\n containerClass = containerClass.replace(/ms-2|me-2|mb-2|mt-2/g, '');\n containerClass = containerClass.replace(/bs-tooltip-auto/g, `bs-tooltip-${dataPlacement}`);\n containerClass = containerClass.replace(/\\sauto/g, ` ${dataPlacement}`);\n if (containerClass.indexOf('popover') !== -1) {\n containerClass = containerClass + ' ' + checkMargins(dataPlacement);\n }\n if (containerClass.indexOf('popover') !== -1 && containerClass.indexOf('popover-auto') === -1) {\n containerClass += ' popover-auto';\n }\n if (containerClass.indexOf('tooltip') !== -1 && containerClass.indexOf('tooltip-auto') === -1) {\n containerClass += ' tooltip-auto';\n }\n }\n containerClass = containerClass.replace(/left|right|top|bottom|end|start/g, `${dataPlacement.split(' ')[0]}`);\n if (renderer) {\n renderer.setAttribute(target, 'class', containerClass);\n return;\n }\n target.className = containerClass;\n}\n\nfunction setStyles(element, styles, renderer) {\n if (!element || !styles) {\n return;\n }\n Object.keys(styles).forEach((prop) => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 &&\n isNumeric(styles[prop])) {\n unit = 'px';\n }\n if (renderer) {\n renderer.setStyle(element, prop, `${String(styles[prop])}${unit}`);\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n element.style[prop] = String(styles[prop]) + unit;\n });\n}\n\nfunction arrow(data) {\n var _a, _b, _c, _d, _e, _f;\n let targetOffsets = data.offsets.target;\n // if arrowElement is a string, suppose it's a CSS selector\n const arrowElement = data.instance.target.querySelector('.arrow');\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n const isVertical = ['left', 'right'].indexOf(data.placement.split(' ')[0]) !== -1;\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n const placementVariation = data.placement.split(' ')[1];\n // top/left side\n if (((_a = data.offsets.host[opSide]) !== null && _a !== void 0 ? _a : 0) - arrowElementSize < ((_b = targetOffsets[side]) !== null && _b !== void 0 ? _b : 0)) {\n (targetOffsets)[side] -=\n ((_c = targetOffsets[side]) !== null && _c !== void 0 ? _c : 0) - (((_d = data.offsets.host[opSide]) !== null && _d !== void 0 ? _d : 0) - arrowElementSize);\n }\n // bottom/right side\n if (Number((data).offsets.host[side]) + Number(arrowElementSize) > ((_e = targetOffsets[opSide]) !== null && _e !== void 0 ? _e : 0)) {\n (targetOffsets)[side] +=\n Number((data).offsets.host[side]) + Number(arrowElementSize) - Number((targetOffsets)[opSide]);\n }\n targetOffsets = getClientRect(targetOffsets);\n // Compute the sideValue using the updated target offsets\n // take target margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.target);\n const targetMarginSide = parseFloat(css[`margin${sideCapitalized}`]) || 0;\n const targetBorderSide = parseFloat(css[`border${sideCapitalized}Width`]) || 0;\n // compute center of the target\n let center;\n if (!placementVariation) {\n center = Number((data).offsets.host[side]) + Number(data.offsets.host[len] / 2 - arrowElementSize / 2);\n }\n else {\n const targetBorderRadius = parseFloat(css.borderRadius) || 0;\n const targetSideArrowOffset = Number(targetMarginSide + targetBorderSide + targetBorderRadius);\n center = side === placementVariation ?\n Number((data).offsets.host[side]) + targetSideArrowOffset :\n Number((data).offsets.host[side]) + Number(data.offsets.host[len] - targetSideArrowOffset);\n }\n let sideValue = center - ((_f = targetOffsets[side]) !== null && _f !== void 0 ? _f : 0) - targetMarginSide - targetBorderSide;\n // prevent arrowElement from being placed not contiguously to its target\n sideValue = Math.max(Math.min(targetOffsets[len] - (arrowElementSize + 5), sideValue), 0);\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '' // make sure to unset any eventual altSide value from the DOM node\n };\n data.instance.arrow = arrowElement;\n return data;\n}\n\nfunction flip(data) {\n data.offsets.target = getClientRect(data.offsets.target);\n if (!isModifierEnabled(data.options, 'flip')) {\n data.offsets.target = Object.assign(Object.assign({}, data.offsets.target), getTargetOffsets(data.instance.target, data.offsets.host, data.placement));\n return data;\n }\n const boundaries = getBoundaries(data.instance.target, data.instance.host, 0, // padding\n 'viewport', false // positionFixed\n );\n let placement = data.placement.split(' ')[0];\n let variation = data.placement.split(' ')[1] || '';\n const offsetsHost = data.offsets.host;\n const target = data.instance.target;\n const host = data.instance.host;\n const adaptivePosition = computeAutoPlacement('auto', offsetsHost, target, host, data.options.allowedPositions);\n const flipOrder = [placement, adaptivePosition];\n flipOrder.forEach((step, index) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\n if (placement !== step || flipOrder.length === index + 1) {\n return;\n }\n placement = data.placement.split(' ')[0];\n // using floor because the host offsets may contain decimals we are not going to consider here\n const overlapsRef = (placement === 'left' &&\n Math.floor((_a = data.offsets.target.right) !== null && _a !== void 0 ? _a : 0) > Math.floor((_b = data.offsets.host.left) !== null && _b !== void 0 ? _b : 0)) ||\n (placement === 'right' &&\n Math.floor((_c = data.offsets.target.left) !== null && _c !== void 0 ? _c : 0) < Math.floor((_d = data.offsets.host.right) !== null && _d !== void 0 ? _d : 0)) ||\n (placement === 'top' &&\n Math.floor((_e = data.offsets.target.bottom) !== null && _e !== void 0 ? _e : 0) > Math.floor((_f = data.offsets.host.top) !== null && _f !== void 0 ? _f : 0)) ||\n (placement === 'bottom' &&\n Math.floor((_g = data.offsets.target.top) !== null && _g !== void 0 ? _g : 0) < Math.floor((_h = data.offsets.host.bottom) !== null && _h !== void 0 ? _h : 0));\n const overflowsLeft = Math.floor((_j = data.offsets.target.left) !== null && _j !== void 0 ? _j : 0) < Math.floor((_k = boundaries.left) !== null && _k !== void 0 ? _k : 0);\n const overflowsRight = Math.floor((_l = data.offsets.target.right) !== null && _l !== void 0 ? _l : 0) > Math.floor((_m = boundaries.right) !== null && _m !== void 0 ? _m : 0);\n const overflowsTop = Math.floor((_o = data.offsets.target.top) !== null && _o !== void 0 ? _o : 0) < Math.floor((_p = boundaries.top) !== null && _p !== void 0 ? _p : 0);\n const overflowsBottom = Math.floor((_q = data.offsets.target.bottom) !== null && _q !== void 0 ? _q : 0) > Math.floor((_r = boundaries.bottom) !== null && _r !== void 0 ? _r : 0);\n const overflowsBoundaries = (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const flippedVariation = ((isVertical && variation === 'left' && overflowsLeft) ||\n (isVertical && variation === 'right' && overflowsRight) ||\n (!isVertical && variation === 'left' && overflowsTop) ||\n (!isVertical && variation === 'right' && overflowsBottom));\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n data.placement = placement + (variation ? ` ${variation}` : '');\n data.offsets.target = Object.assign(Object.assign({}, data.offsets.target), getTargetOffsets(data.instance.target, data.offsets.host, data.placement));\n }\n });\n return data;\n}\n\nfunction initData(targetElement, hostElement, position, options) {\n if (!targetElement || !hostElement) {\n return;\n }\n const hostElPosition = getReferenceOffsets(targetElement, hostElement);\n if (!position.match(/^(auto)*\\s*(left|right|top|bottom|start|end)*$/)\n && !position.match(/^(left|right|top|bottom|start|end)*(?: (left|right|top|bottom|start|end))*$/)) {\n position = 'auto';\n }\n const placementAuto = !!position.match(/auto/g);\n // support old placements 'auto left|right|top|bottom'\n let placement = position.match(/auto\\s(left|right|top|bottom|start|end)/)\n ? position.split(' ')[1] || 'auto'\n : position;\n // Normalize placements that have identical main placement and variation (\"right right\" => \"right\").\n const matches = placement.match(/^(left|right|top|bottom|start|end)* ?(?!\\1)(left|right|top|bottom|start|end)?/);\n if (matches) {\n placement = matches[1] + (matches[2] ? ` ${matches[2]}` : '');\n }\n // \"left right\", \"top bottom\" etc. placements also considered incorrect.\n if (['left right', 'right left', 'top bottom', 'bottom top'].indexOf(placement) !== -1) {\n placement = 'auto';\n }\n placement = computeAutoPlacement(placement, hostElPosition, targetElement, hostElement, options ? options.allowedPositions : undefined);\n const targetOffset = getTargetOffsets(targetElement, hostElPosition, placement);\n return {\n options: options || { modifiers: {} },\n instance: {\n target: targetElement,\n host: hostElement,\n arrow: void 0\n },\n offsets: {\n target: targetOffset,\n host: hostElPosition,\n arrow: void 0\n },\n positionFixed: false,\n placement,\n placementAuto\n };\n}\n\nfunction preventOverflow(data) {\n var _a;\n if (!isModifierEnabled(data.options, 'preventOverflow')) {\n return data;\n }\n // NOTE: DOM access here\n // resets the target Offsets's position so that the document size can be calculated excluding\n // the size of the targetOffsets element itself\n const transformProp = 'transform';\n const targetStyles = data.instance.target.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = targetStyles;\n targetStyles.top = '';\n targetStyles.left = '';\n targetStyles[transformProp] = '';\n const boundaries = getBoundaries(data.instance.target, data.instance.host, 0, // padding\n ((_a = data.options.modifiers.preventOverflow) === null || _a === void 0 ? void 0 : _a.boundariesElement) || 'scrollParent', false // positionFixed\n );\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n targetStyles.top = top;\n targetStyles.left = left;\n targetStyles[transformProp] = transform;\n const order = ['left', 'right', 'top', 'bottom'];\n const check = {\n primary(placement) {\n var _a, _b, _c, _d;\n let value = data.offsets.target[placement];\n // options.escapeWithReference\n if (((_a = data.offsets.target[placement]) !== null && _a !== void 0 ? _a : 0) < ((_b = boundaries[placement]) !== null && _b !== void 0 ? _b : 0)) {\n value = Math.max((_c = data.offsets.target[placement]) !== null && _c !== void 0 ? _c : 0, (_d = boundaries[placement]) !== null && _d !== void 0 ? _d : 0);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = data.offsets.target[mainSide];\n // escapeWithReference\n if (((_a = data.offsets.target[placement]) !== null && _a !== void 0 ? _a : 0) < ((_b = boundaries[placement]) !== null && _b !== void 0 ? _b : 0) && placement !== 'right') {\n value = Math.min((_c = data.offsets.target[mainSide]) !== null && _c !== void 0 ? _c : 0, ((_d = boundaries[placement]) !== null && _d !== void 0 ? _d : 0) - data.offsets.target.height);\n }\n if (((_e = data.offsets.target[placement]) !== null && _e !== void 0 ? _e : 0) > ((_f = boundaries[placement]) !== null && _f !== void 0 ? _f : 0) && placement === 'right') {\n value = Math.min((_g = data.offsets.target[mainSide]) !== null && _g !== void 0 ? _g : 0, ((_h = boundaries[placement]) !== null && _h !== void 0 ? _h : 0) - data.offsets.target.width);\n }\n return { [mainSide]: value };\n }\n };\n order.forEach((placement) => {\n const side = ['left', 'top', 'start'].indexOf(placement) !== -1 ? check['primary'] : check['secondary'];\n data.offsets.target = Object.assign(Object.assign({}, data.offsets.target), side(placement));\n });\n return data;\n}\n\nfunction shift(data) {\n var _a;\n const placement = data.placement;\n const basePlacement = placement.split(' ')[0];\n const shiftVariation = placement.split(' ')[1];\n if (shiftVariation) {\n const { host, target } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n const shiftOffsets = {\n start: { [side]: host[side] },\n end: {\n [side]: ((_a = host[side]) !== null && _a !== void 0 ? _a : 0) + host[measurement] - target[measurement]\n }\n };\n data.offsets.target = Object.assign(Object.assign({}, target), {\n [side]: (side === shiftVariation ? shiftOffsets.start[side] : shiftOffsets.end[side])\n });\n }\n return data;\n}\n\nclass Positioning {\n position(hostElement, targetElement /*, round = true*/) {\n return this.offset(hostElement, targetElement /*, false*/);\n }\n offset(hostElement, targetElement /*, round = true*/) {\n return getReferenceOffsets(targetElement, hostElement);\n }\n positionElements(hostElement, targetElement, position, appendToBody, options) {\n const chainOfModifiers = [flip, shift, preventOverflow, arrow];\n const _position = MapPlacementInToRL[position];\n const data = initData(targetElement, hostElement, _position, options);\n if (!data) {\n return;\n }\n return chainOfModifiers.reduce((modifiedData, modifier) => modifier(modifiedData), data);\n }\n}\nconst positionService = new Positioning();\nfunction positionElements(hostElement, targetElement, placement, appendToBody, options, renderer) {\n const data = positionService.positionElements(hostElement, targetElement, placement, appendToBody, options);\n if (!data) {\n return;\n }\n const offsets = getOffsets(data);\n setStyles(targetElement, {\n 'will-change': 'transform',\n top: '0px',\n left: '0px',\n transform: `translate3d(${offsets.left}px, ${offsets.top}px, 0px)`\n }, renderer);\n if (data.instance.arrow) {\n setStyles(data.instance.arrow, data.offsets.arrow, renderer);\n }\n updateContainerClass(data, renderer);\n}\n\nclass PositioningService {\n constructor(ngZone, rendererFactory, platformId) {\n this.update$$ = new Subject();\n this.positionElements = new Map();\n this.isDisabled = false;\n if (isPlatformBrowser(platformId)) {\n ngZone.runOutsideAngular(() => {\n this.triggerEvent$ = merge(fromEvent(window, 'scroll', { passive: true }), fromEvent(window, 'resize', { passive: true }), of(0, animationFrameScheduler), this.update$$);\n this.triggerEvent$.subscribe(() => {\n if (this.isDisabled) {\n return;\n }\n this.positionElements\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .forEach((positionElement) => {\n positionElements(_getHtmlElement(positionElement.target), _getHtmlElement(positionElement.element), positionElement.attachment, positionElement.appendToBody, this.options, rendererFactory.createRenderer(null, null));\n });\n });\n });\n }\n }\n position(options) {\n this.addPositionElement(options);\n }\n get event$() {\n return this.triggerEvent$;\n }\n disable() {\n this.isDisabled = true;\n }\n enable() {\n this.isDisabled = false;\n }\n addPositionElement(options) {\n this.positionElements.set(_getHtmlElement(options.element), options);\n }\n calcPosition() {\n this.update$$.next();\n }\n deletePositionElement(elRef) {\n this.positionElements.delete(_getHtmlElement(elRef));\n }\n setOptions(options) {\n this.options = options;\n }\n}\nPositioningService.ɵfac = function PositioningService_Factory(t) { return new (t || PositioningService)(ɵngcc0.ɵɵinject(ɵngcc0.NgZone), ɵngcc0.ɵɵinject(ɵngcc0.RendererFactory2), ɵngcc0.ɵɵinject(PLATFORM_ID)); };\nPositioningService.ɵprov = ɵɵdefineInjectable({ factory: function PositioningService_Factory() { return new PositioningService(ɵɵinject(NgZone), ɵɵinject(RendererFactory2), ɵɵinject(PLATFORM_ID)); }, token: PositioningService, providedIn: \"root\" });\nPositioningService.ctorParameters = () => [\n { type: NgZone },\n { type: RendererFactory2 },\n { type: Number, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PositioningService, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: ɵngcc0.NgZone }, { type: ɵngcc0.RendererFactory2 }, { type: Number, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, null); })();\nfunction _getHtmlElement(element) {\n // it means that we got a selector\n if (typeof element === 'string') {\n return document.querySelector(element);\n }\n if (element instanceof ElementRef) {\n return element.nativeElement;\n }\n return element !== null && element !== void 0 ? element : null;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { PlacementForBs5, Positioning, PositioningService, checkMargins, positionElements };\n\n","import { EventEmitter, Injector, ElementRef, TemplateRef, ɵɵdefineInjectable, ɵɵinject, ComponentFactoryResolver, NgZone, INJECTOR, ApplicationRef, Injectable } from '@angular/core';\nimport { listenToTriggersV2, registerOutsideClick, registerEscClick } from 'ngx-bootstrap/utils';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from 'ngx-bootstrap/positioning';\nclass BsComponentRef {\n}\n\n/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\nclass ContentRef {\n constructor(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nodes, viewRef, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n componentRef) {\n this.nodes = nodes;\n this.viewRef = viewRef;\n this.componentRef = componentRef;\n }\n}\n\n// todo: add delay support\nclass ComponentLoader {\n /**\n * Do not use this directly, it should be instanced via\n * `ComponentLoadFactory.attach`\n * @internal\n */\n constructor(_viewContainerRef, _renderer, _elementRef, _injector, _componentFactoryResolver, _ngZone, _applicationRef, _posService) {\n this._viewContainerRef = _viewContainerRef;\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this._injector = _injector;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._ngZone = _ngZone;\n this._applicationRef = _applicationRef;\n this._posService = _posService;\n this.onBeforeShow = new EventEmitter();\n this.onShown = new EventEmitter();\n this.onBeforeHide = new EventEmitter();\n this.onHidden = new EventEmitter();\n this._providers = [];\n this._isHiding = false;\n /**\n * A selector used if container element was not found\n */\n this.containerDefaultSelector = 'body';\n this._listenOpts = {};\n this._globalListener = Function.prototype;\n }\n get isShown() {\n if (this._isHiding) {\n return false;\n }\n return !!this._componentRef;\n }\n attach(compType) {\n this._componentFactory = this._componentFactoryResolver\n .resolveComponentFactory(compType);\n return this;\n }\n // todo: add behaviour: to target element, `body`, custom element\n to(container) {\n this.container = container || this.container;\n return this;\n }\n position(opts) {\n if (!opts) {\n return this;\n }\n this.attachment = opts.attachment || this.attachment;\n this._elementRef = opts.target || this._elementRef;\n return this;\n }\n provide(provider) {\n this._providers.push(provider);\n return this;\n }\n // todo: appendChild to element or document.querySelector(this.container)\n show(opts = {}) {\n this._subscribePositioning();\n this._innerComponent = void 0;\n if (!this._componentRef) {\n this.onBeforeShow.emit();\n this._contentRef = this._getContentRef(opts.content, opts.context, opts.initialState);\n const injector = Injector.create({\n providers: this._providers,\n parent: this._injector\n });\n if (!this._componentFactory) {\n return;\n }\n this._componentRef = this._componentFactory.create(injector, this._contentRef.nodes);\n this._applicationRef.attachView(this._componentRef.hostView);\n // this._componentRef = this._viewContainerRef\n // .createComponent(this._componentFactory, 0, injector, this._contentRef.nodes);\n this.instance = this._componentRef.instance;\n Object.assign(this._componentRef.instance, opts);\n if (this.container instanceof ElementRef) {\n this.container.nativeElement.appendChild(this._componentRef.location.nativeElement);\n }\n if (typeof this.container === 'string' && typeof document !== 'undefined') {\n const selectedElement = document.querySelector(this.container) ||\n document.querySelector(this.containerDefaultSelector);\n if (!selectedElement) {\n return;\n }\n selectedElement.appendChild(this._componentRef.location.nativeElement);\n }\n if (!this.container &&\n this._elementRef &&\n this._elementRef.nativeElement.parentElement) {\n this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement);\n }\n // we need to manually invoke change detection since events registered\n // via\n // Renderer::listen() are not picked up by change detection with the\n // OnPush strategy\n if (this._contentRef.componentRef) {\n this._innerComponent = this._contentRef.componentRef.instance;\n this._contentRef.componentRef.changeDetectorRef.markForCheck();\n this._contentRef.componentRef.changeDetectorRef.detectChanges();\n }\n this._componentRef.changeDetectorRef.markForCheck();\n this._componentRef.changeDetectorRef.detectChanges();\n this.onShown.emit(opts.id ? { id: opts.id } : this._componentRef.instance);\n }\n this._registerOutsideClick();\n return this._componentRef;\n }\n hide(id) {\n var _a, _b, _c;\n if (!this._componentRef) {\n return this;\n }\n this._posService.deletePositionElement(this._componentRef.location);\n this.onBeforeHide.emit(this._componentRef.instance);\n const componentEl = this._componentRef.location.nativeElement;\n componentEl.parentNode.removeChild(componentEl);\n if ((_a = this._contentRef) === null || _a === void 0 ? void 0 : _a.componentRef) {\n this._contentRef.componentRef.destroy();\n }\n if (this._viewContainerRef && ((_b = this._contentRef) === null || _b === void 0 ? void 0 : _b.viewRef)) {\n this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef));\n }\n if ((_c = this._contentRef) === null || _c === void 0 ? void 0 : _c.viewRef) {\n this._contentRef.viewRef.destroy();\n }\n this._contentRef = void 0;\n this._componentRef = void 0;\n this._removeGlobalListener();\n this.onHidden.emit(id ? { id } : null);\n return this;\n }\n toggle() {\n if (this.isShown) {\n this.hide();\n return;\n }\n this.show();\n }\n dispose() {\n if (this.isShown) {\n this.hide();\n }\n this._unsubscribePositioning();\n if (this._unregisterListenersFn) {\n this._unregisterListenersFn();\n }\n }\n listen(listenOpts) {\n var _a;\n this.triggers = listenOpts.triggers || this.triggers;\n this._listenOpts.outsideClick = listenOpts.outsideClick;\n this._listenOpts.outsideEsc = listenOpts.outsideEsc;\n listenOpts.target = listenOpts.target || ((_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement);\n const hide = (this._listenOpts.hide = () => listenOpts.hide ? listenOpts.hide() : void this.hide());\n const show = (this._listenOpts.show = (registerHide) => {\n listenOpts.show ? listenOpts.show(registerHide) : this.show(registerHide);\n registerHide();\n });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const toggle = (registerHide) => {\n this.isShown ? hide() : show(registerHide);\n };\n if (this._renderer) {\n this._unregisterListenersFn = listenToTriggersV2(this._renderer, {\n target: listenOpts.target,\n triggers: listenOpts.triggers,\n show,\n hide,\n toggle\n });\n }\n return this;\n }\n _removeGlobalListener() {\n if (this._globalListener) {\n this._globalListener();\n this._globalListener = Function.prototype;\n }\n }\n attachInline(vRef, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n template) {\n if (vRef && template) {\n this._inlineViewRef = vRef.createEmbeddedView(template);\n }\n return this;\n }\n _registerOutsideClick() {\n if (!this._componentRef || !this._componentRef.location) {\n return;\n }\n // why: should run after first event bubble\n if (this._listenOpts.outsideClick) {\n const target = this._componentRef.location.nativeElement;\n setTimeout(() => {\n if (this._renderer && this._elementRef) {\n this._globalListener = registerOutsideClick(this._renderer, {\n targets: [target, this._elementRef.nativeElement],\n outsideClick: this._listenOpts.outsideClick,\n hide: () => this._listenOpts.hide && this._listenOpts.hide()\n });\n }\n });\n }\n if (this._listenOpts.outsideEsc && this._renderer && this._elementRef) {\n const target = this._componentRef.location.nativeElement;\n this._globalListener = registerEscClick(this._renderer, {\n targets: [target, this._elementRef.nativeElement],\n outsideEsc: this._listenOpts.outsideEsc,\n hide: () => this._listenOpts.hide && this._listenOpts.hide()\n });\n }\n }\n getInnerComponent() {\n return this._innerComponent;\n }\n _subscribePositioning() {\n if (this._zoneSubscription || !this.attachment) {\n return;\n }\n this.onShown.subscribe(() => {\n var _a;\n this._posService.position({\n element: (_a = this._componentRef) === null || _a === void 0 ? void 0 : _a.location,\n target: this._elementRef,\n attachment: this.attachment,\n appendToBody: this.container === 'body'\n });\n });\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => {\n if (!this._componentRef) {\n return;\n }\n this._posService.calcPosition();\n });\n }\n _unsubscribePositioning() {\n if (!this._zoneSubscription) {\n return;\n }\n this._zoneSubscription.unsubscribe();\n this._zoneSubscription = void 0;\n }\n _getContentRef(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n content, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n context, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n initialState) {\n if (!content) {\n return new ContentRef([]);\n }\n if (content instanceof TemplateRef) {\n if (this._viewContainerRef) {\n const _viewRef = this._viewContainerRef\n .createEmbeddedView(content, context);\n _viewRef.markForCheck();\n return new ContentRef([_viewRef.rootNodes], _viewRef);\n }\n const viewRef = content.createEmbeddedView({});\n this._applicationRef.attachView(viewRef);\n return new ContentRef([viewRef.rootNodes], viewRef);\n }\n if (typeof content === 'function') {\n const contentCmptFactory = this._componentFactoryResolver.resolveComponentFactory(content);\n const modalContentInjector = Injector.create({\n providers: this._providers,\n parent: this._injector\n });\n const componentRef = contentCmptFactory.create(modalContentInjector);\n Object.assign(componentRef.instance, initialState);\n this._applicationRef.attachView(componentRef.hostView);\n return new ContentRef([[componentRef.location.nativeElement]], componentRef.hostView, componentRef);\n }\n const nodes = this._renderer\n ? [this._renderer.createText(`${content}`)]\n : [];\n return new ContentRef([nodes]);\n }\n}\n\nclass ComponentLoaderFactory {\n constructor(_componentFactoryResolver, _ngZone, _injector, _posService, _applicationRef) {\n this._componentFactoryResolver = _componentFactoryResolver;\n this._ngZone = _ngZone;\n this._injector = _injector;\n this._posService = _posService;\n this._applicationRef = _applicationRef;\n }\n /**\n *\n * @param _elementRef\n * @param _viewContainerRef\n * @param _renderer\n */\n createLoader(_elementRef, _viewContainerRef, _renderer) {\n return new ComponentLoader(_viewContainerRef, _renderer, _elementRef, this._injector, this._componentFactoryResolver, this._ngZone, this._applicationRef, this._posService);\n }\n}\nComponentLoaderFactory.ɵfac = function ComponentLoaderFactory_Factory(t) { return new (t || ComponentLoaderFactory)(ɵngcc0.ɵɵinject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵinject(ɵngcc0.NgZone), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(ɵngcc1.PositioningService), ɵngcc0.ɵɵinject(ɵngcc0.ApplicationRef)); };\nComponentLoaderFactory.ɵprov = ɵɵdefineInjectable({ factory: function ComponentLoaderFactory_Factory() { return new ComponentLoaderFactory(ɵɵinject(ComponentFactoryResolver), ɵɵinject(NgZone), ɵɵinject(INJECTOR), ɵɵinject(PositioningService), ɵɵinject(ApplicationRef)); }, token: ComponentLoaderFactory, providedIn: \"root\" });\nComponentLoaderFactory.ctorParameters = () => [\n { type: ComponentFactoryResolver },\n { type: NgZone },\n { type: Injector },\n { type: PositioningService },\n { type: ApplicationRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ComponentLoaderFactory, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.Injector }, { type: ɵngcc1.PositioningService }, { type: ɵngcc0.ApplicationRef }]; }, null); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BsComponentRef, ComponentLoader, ComponentLoaderFactory, ContentRef };\n\n","import { ɵɵdefineInjectable, Injectable, ɵɵinject, PLATFORM_ID, Inject, NgZone, Directive, ElementRef, Input, NgModule } from '@angular/core';\nimport { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';\nimport { take } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injectable that ensures only the most recently enabled FocusTrap is active. */\nimport * as ɵngcc0 from '@angular/core';\nclass FocusTrapManager {\n constructor() {\n // A stack of the FocusTraps on the page. Only the FocusTrap at the\n // top of the stack is active.\n this._focusTrapStack = [];\n }\n /**\n * Disables the FocusTrap at the top of the stack, and then pushes\n * the new FocusTrap onto the stack.\n */\n register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter((ft) => ft !== focusTrap);\n let stack = this._focusTrapStack;\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n stack.push(focusTrap);\n focusTrap._enable();\n }\n /**\n * Removes the FocusTrap from the stack, and activates the\n * FocusTrap that is the new top of the stack.\n */\n deregister(focusTrap) {\n focusTrap._disable();\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }\n}\nFocusTrapManager.ɵfac = function FocusTrapManager_Factory(t) { return new (t || FocusTrapManager)(); };\nFocusTrapManager.ɵprov = ɵɵdefineInjectable({ factory: function FocusTrapManager_Factory() { return new FocusTrapManager(); }, token: FocusTrapManager, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FocusTrapManager, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return []; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator;\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && Intl.v8BreakIterator);\n}\ncatch (_a) {\n hasV8BreakIterator = false;\n}\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\nclass Platform {\n constructor(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser && (!!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n}\nPlatform.ɵfac = function Platform_Factory(t) { return new (t || Platform)(ɵngcc0.ɵɵinject(PLATFORM_ID)); };\nPlatform.ɵprov = ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(ɵɵinject(PLATFORM_ID)); }, token: Platform, providedIn: \"root\" });\nPlatform.ctorParameters = () => [\n { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Platform, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Configuration for the isFocusable method.\n */\nclass IsFocusableConfig {\n constructor() {\n /**\n * Whether to count an element as focusable even if it is not currently visible.\n */\n this.ignoreVisibility = false;\n }\n}\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n/**\n * Utility for checking the interactivity of an element, such as whether is is focusable or\n * tabbable.\n */\nclass InteractivityChecker {\n constructor(_platform) {\n this._platform = _platform;\n }\n /**\n * Gets whether an element is disabled.\n *\n * @param element Element to be checked.\n * @returns Whether the element is disabled.\n */\n isDisabled(element) {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n }\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @returns Whether the element is visible.\n */\n isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n *\n * @param element Element to be checked.\n * @returns Whether the element is tabbable.\n */\n isTabbable(element) {\n // Nothing is tabbable on the server 😎\n if (!this._platform.isBrowser) {\n return false;\n }\n const frameElement = getFrameElement(getWindow(element));\n if (frameElement) {\n // Frame elements inherit their tabindex onto all child elements.\n if (getTabIndexValue(frameElement) === -1) {\n return false;\n }\n // Browsers disable tabbing to an element inside of an invisible frame.\n if (!this.isVisible(frameElement)) {\n return false;\n }\n }\n let nodeName = element.nodeName.toLowerCase();\n let tabIndexValue = getTabIndexValue(element);\n if (element.hasAttribute('contenteditable')) {\n return tabIndexValue !== -1;\n }\n if (nodeName === 'iframe' || nodeName === 'object') {\n // The frame or object's content may be tabbable depending on the content, but it's\n // not possibly to reliably detect the content of the frames. We always consider such\n // elements as non-tabbable.\n return false;\n }\n // In iOS, the browser only considers some specific elements as tabbable.\n if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {\n return false;\n }\n if (nodeName === 'audio') {\n // Audio elements without controls enabled are never tabbable, regardless\n // of the tabindex attribute explicitly being set.\n if (!element.hasAttribute('controls')) {\n return false;\n }\n // Audio elements with controls are by default tabbable unless the\n // tabindex attribute is set to `-1` explicitly.\n return tabIndexValue !== -1;\n }\n if (nodeName === 'video') {\n // For all video elements, if the tabindex attribute is set to `-1`, the video\n // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n // tabindex attribute is the source of truth here.\n if (tabIndexValue === -1) {\n return false;\n }\n // If the tabindex is explicitly set, and not `-1` (as per check before), the\n // video element is always tabbable (regardless of whether it has controls or not).\n if (tabIndexValue !== null) {\n return true;\n }\n // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n // has controls enabled. Firefox is special as videos are always tabbable regardless\n // of whether there are controls or not.\n return this._platform.FIREFOX || element.hasAttribute('controls');\n }\n return element.tabIndex >= 0;\n }\n /**\n * Gets whether an element can be focused by the user.\n *\n * @param element Element to be checked.\n * @param config The config object with options to customize this method's behavior\n * @returns Whether the element is focusable.\n */\n isFocusable(element, config) {\n // Perform checks in order of left to most expensive.\n // Again, naive approach that does not capture many edge cases and browser quirks.\n return isPotentiallyFocusable(element) && !this.isDisabled(element) &&\n ((config === null || config === void 0 ? void 0 : config.ignoreVisibility) || this.isVisible(element));\n }\n}\nInteractivityChecker.ɵfac = function InteractivityChecker_Factory(t) { return new (t || InteractivityChecker)(ɵngcc0.ɵɵinject(Platform)); };\nInteractivityChecker.ɵprov = ɵɵdefineInjectable({ factory: function InteractivityChecker_Factory() { return new InteractivityChecker(ɵɵinject(Platform)); }, token: InteractivityChecker, providedIn: \"root\" });\nInteractivityChecker.ctorParameters = () => [\n { type: Platform }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(InteractivityChecker, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: Platform }]; }, null); })();\n/**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n */\nfunction getFrameElement(window) {\n try {\n return window.frameElement;\n }\n catch (_a) {\n return null;\n }\n}\n/** Checks whether the specified element has any geometry / rectangles. */\nfunction hasGeometry(element) {\n // Use logic from jQuery to check for an invisible element.\n // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12\n return !!(element.offsetWidth || element.offsetHeight ||\n (typeof element.getClientRects === 'function' && element.getClientRects().length));\n}\n/** Gets whether an element's */\nfunction isNativeFormElement(element) {\n let nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' ||\n nodeName === 'select' ||\n nodeName === 'button' ||\n nodeName === 'textarea';\n}\n/** Gets whether an element is an `<input type=\"hidden\">`. */\nfunction isHiddenInput(element) {\n return isInputElement(element) && element.type == 'hidden';\n}\n/** Gets whether an element is an anchor that has an href attribute. */\nfunction isAnchorWithHref(element) {\n return isAnchorElement(element) && element.hasAttribute('href');\n}\n/** Gets whether an element is an input element. */\nfunction isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}\n/** Gets whether an element is an anchor element. */\nfunction isAnchorElement(element) {\n return element.nodeName.toLowerCase() == 'a';\n}\n/** Gets whether an element has a valid tabindex. */\nfunction hasValidTabIndex(element) {\n if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n return false;\n }\n let tabIndex = element.getAttribute('tabindex');\n // IE11 parses tabindex=\"\" as the value \"-32768\"\n if (tabIndex == '-32768') {\n return false;\n }\n return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n}\n/**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n */\nfunction getTabIndexValue(element) {\n if (!hasValidTabIndex(element)) {\n return null;\n }\n // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n return isNaN(tabIndex) ? -1 : tabIndex;\n}\n/** Checks whether the specified element is potentially tabbable on iOS */\nfunction isPotentiallyTabbableIOS(element) {\n let nodeName = element.nodeName.toLowerCase();\n let inputType = nodeName === 'input' && element.type;\n return inputType === 'text'\n || inputType === 'password'\n || nodeName === 'select'\n || nodeName === 'textarea';\n}\n/**\n * Gets whether an element is potentially focusable without taking current visible/disabled state\n * into account.\n */\nfunction isPotentiallyFocusable(element) {\n // Inputs are potentially focusable *unless* they're type=\"hidden\".\n if (isHiddenInput(element)) {\n return false;\n }\n return isNativeFormElement(element) ||\n isAnchorWithHref(element) ||\n element.hasAttribute('contenteditable') ||\n hasValidTabIndex(element);\n}\n/** Gets the parent window of a DOM node with regards of being inside of an iframe. */\nfunction getWindow(node) {\n // ownerDocument is null if `node` itself *is* a document.\n return node.ownerDocument && node.ownerDocument.defaultView || window;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Coerces a data-bound value (typically a string) to a boolean. */\nfunction coerceBooleanProperty(value) {\n return value != null && `${value}` !== 'false';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class currently uses a relatively simple approach to focus trapping.\n * It assumes that the tab order is the same as DOM order, which is not necessarily true.\n * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to misalign.\n *\n * @deprecated Use `ConfigurableFocusTrap` instead.\n * @breaking-change for 11.0.0 Remove this class.\n */\nclass FocusTrap {\n constructor(_element, _checker, _ngZone, _document, deferAnchors = false) {\n this._element = _element;\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._document = _document;\n this._hasAttached = false;\n // Event listeners for the anchors. Need to be regular functions so that we can unbind them later.\n this.startAnchorListener = () => this.focusLastTabbableElement();\n this.endAnchorListener = () => this.focusFirstTabbableElement();\n this._enabled = true;\n if (!deferAnchors) {\n this.attachAnchors();\n }\n }\n /** Whether the focus trap is active. */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(value, this._startAnchor);\n this._toggleAnchorTabIndex(value, this._endAnchor);\n }\n }\n /** Destroys the focus trap by cleaning up the anchors. */\n destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n if (startAnchor.parentNode) {\n startAnchor.parentNode.removeChild(startAnchor);\n }\n }\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n if (endAnchor.parentNode) {\n endAnchor.parentNode.removeChild(endAnchor);\n }\n }\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }\n /**\n * Inserts the anchors into the DOM. This is usually done automatically\n * in the constructor, but can be deferred for cases like directives with `*ngIf`.\n * @returns Whether the focus trap managed to attach successfuly. This may not be the case\n * if the target element isn't currently in the DOM.\n */\n attachAnchors() {\n // If we're not on the browser, there can be no focus to trap.\n if (this._hasAttached) {\n return true;\n }\n this._ngZone.runOutsideAngular(() => {\n if (!this._startAnchor) {\n this._startAnchor = this._createAnchor();\n this._startAnchor.addEventListener('focus', this.startAnchorListener);\n }\n if (!this._endAnchor) {\n this._endAnchor = this._createAnchor();\n this._endAnchor.addEventListener('focus', this.endAnchorListener);\n }\n });\n if (this._element.parentNode) {\n this._element.parentNode.insertBefore(this._startAnchor, this._element);\n this._element.parentNode.insertBefore(this._endAnchor, this._element.nextSibling);\n this._hasAttached = true;\n }\n return this._hasAttached;\n }\n /**\n * Waits for the zone to stabilize, then either focuses the first element that the\n * user specified, or the first tabbable element.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusInitialElementWhenReady() {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement()));\n });\n }\n /**\n * Waits for the zone to stabilize, then focuses\n * the first tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusFirstTabbableElementWhenReady() {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusFirstTabbableElement()));\n });\n }\n /**\n * Waits for the zone to stabilize, then focuses\n * the last tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusLastTabbableElementWhenReady() {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusLastTabbableElement()));\n });\n }\n /**\n * Get the specified boundary element of the trapped region.\n * @param bound The boundary to get (start or end of trapped region).\n * @returns The boundary element.\n */\n _getRegionBoundary(bound) {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n let markers = this._element.querySelectorAll(`[cdk-focus-region-${bound}], ` +\n `[cdkFocusRegion${bound}], ` +\n `[cdk-focus-${bound}]`);\n for (let i = 0; i < markers.length; i++) {\n // @breaking-change 8.0.0\n if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated ` +\n `attribute will be removed in 8.0.0.`, markers[i]);\n }\n else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-region-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` +\n `will be removed in 8.0.0.`, markers[i]);\n }\n }\n if (bound == 'start') {\n return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);\n }\n return markers.length ?\n markers[markers.length - 1] : this._getLastTabbableElement(this._element);\n }\n /**\n * Focuses the element that should be focused when the focus trap is initialized.\n * @returns Whether focus was moved successfully.\n */\n focusInitialElement() {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const redirectToElement = this._element.querySelector(`[cdk-focus-initial], ` +\n `[cdkFocusInitial]`);\n if (redirectToElement) {\n // @breaking-change 8.0.0\n if (redirectToElement.hasAttribute(`cdk-focus-initial`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-initial', ` +\n `use 'cdkFocusInitial' instead. The deprecated attribute ` +\n `will be removed in 8.0.0`, redirectToElement);\n }\n // Warn the consumer if the element they've pointed to\n // isn't focusable, when not in production mode.\n if (!this._checker.isFocusable(redirectToElement)) {\n const focusableChild = this._getFirstTabbableElement(redirectToElement);\n focusableChild === null || focusableChild === void 0 ? void 0 : focusableChild.focus();\n return !!focusableChild;\n }\n redirectToElement.focus();\n return true;\n }\n return this.focusFirstTabbableElement();\n }\n /**\n * Focuses the first tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusFirstTabbableElement() {\n const redirectToElement = this._getRegionBoundary('start');\n if (redirectToElement) {\n redirectToElement.focus();\n }\n return !!redirectToElement;\n }\n /**\n * Focuses the last tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusLastTabbableElement() {\n const redirectToElement = this._getRegionBoundary('end');\n if (redirectToElement) {\n redirectToElement.focus();\n }\n return !!redirectToElement;\n }\n /**\n * Checks whether the focus trap has successfully been attached.\n */\n hasAttached() {\n return this._hasAttached;\n }\n /** Get the first tabbable element from a DOM subtree (inclusive). */\n _getFirstTabbableElement(root) {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n // Iterate in DOM order. Note that IE doesn't have `children` for SVG so we fall\n // back to `childNodes` which includes text nodes, comments etc.\n let children = root.children || root.childNodes;\n for (let i = 0; i < children.length; i++) {\n let tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ?\n this._getFirstTabbableElement(children[i]) :\n null;\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n return null;\n }\n /** Get the last tabbable element from a DOM subtree (inclusive). */\n _getLastTabbableElement(root) {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n // Iterate in reverse DOM order.\n let children = root.children || root.childNodes;\n for (let i = children.length - 1; i >= 0; i--) {\n let tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ?\n this._getLastTabbableElement(children[i]) :\n null;\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n return null;\n }\n /** Creates an anchor element. */\n _createAnchor() {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }\n /**\n * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.\n * @param isEnabled Whether the focus trap is enabled.\n * @param anchor Anchor on which to toggle the tabindex.\n */\n _toggleAnchorTabIndex(isEnabled, anchor) {\n // Remove the tabindex completely, rather than setting it to -1, because if the\n // element has a tabindex, the user might still hit it when navigating with the arrow keys.\n isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex');\n }\n /**\n * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.\n * @param enabled: Whether the anchors should trap Tab.\n */\n toggleAnchors(enabled) {\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(enabled, this._startAnchor);\n this._toggleAnchorTabIndex(enabled, this._endAnchor);\n }\n }\n /** Executes a function when the zone is stable. */\n _executeOnStable(fn) {\n if (this._ngZone.isStable) {\n fn();\n }\n else {\n this._ngZone.onStable.pipe(take(1)).subscribe(fn);\n }\n }\n}\n/**\n * Factory that allows easy instantiation of focus traps.\n * @deprecated Use `ConfigurableFocusTrapFactory` instead.\n * @breaking-change for 11.0.0 Remove this class.\n */\nclass FocusTrapFactory {\n constructor(_checker, _ngZone, _document) {\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._document = _document;\n }\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param deferCaptureElements Defers the creation of focus-capturing elements to be done\n * manually by the user.\n * @returns The created focus trap instance.\n */\n create(element, deferCaptureElements = false) {\n return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements);\n }\n}\nFocusTrapFactory.ɵfac = function FocusTrapFactory_Factory(t) { return new (t || FocusTrapFactory)(ɵngcc0.ɵɵinject(InteractivityChecker), ɵngcc0.ɵɵinject(ɵngcc0.NgZone), ɵngcc0.ɵɵinject(DOCUMENT)); };\nFocusTrapFactory.ɵprov = ɵɵdefineInjectable({ factory: function FocusTrapFactory_Factory() { return new FocusTrapFactory(ɵɵinject(InteractivityChecker), ɵɵinject(NgZone), ɵɵinject(DOCUMENT)); }, token: FocusTrapFactory, providedIn: \"root\" });\nFocusTrapFactory.ctorParameters = () => [\n { type: InteractivityChecker },\n { type: NgZone },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FocusTrapFactory, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: InteractivityChecker }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n/** Directive for trapping focus within a region. */\nclass FocusTrapDirective {\n constructor(_elementRef, _focusTrapFactory, _document) {\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n /** Previously focused element to restore focus to upon destroy when using autoCapture. */\n this._previouslyFocusedElement = null;\n this._autoCapture = false;\n this._document = _document;\n this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);\n }\n /** Whether the focus trap is active. */\n get enabled() {\n return this.focusTrap.enabled;\n }\n set enabled(value) {\n this.focusTrap.enabled = coerceBooleanProperty(value);\n }\n /**\n * Whether the directive should automatically move focus into the trapped region upon\n * initialization and return focus to the previous activeElement upon destruction.\n */\n get autoCapture() {\n return this._autoCapture;\n }\n set autoCapture(value) {\n this._autoCapture = coerceBooleanProperty(value);\n }\n ngOnDestroy() {\n this.focusTrap.destroy();\n // If we stored a previously focused element when using autoCapture, return focus to that\n // element now that the trapped region is being destroyed.\n if (this._previouslyFocusedElement) {\n this._previouslyFocusedElement.focus();\n this._previouslyFocusedElement = null;\n }\n }\n ngAfterContentInit() {\n this.focusTrap.attachAnchors();\n if (this.autoCapture) {\n this._captureFocus();\n }\n }\n ngDoCheck() {\n if (!this.focusTrap.hasAttached()) {\n this.focusTrap.attachAnchors();\n }\n }\n ngOnChanges(changes) {\n const autoCaptureChange = changes['autoCapture'];\n if (autoCaptureChange && !autoCaptureChange.firstChange && this.autoCapture &&\n this.focusTrap.hasAttached()) {\n this._captureFocus();\n }\n }\n _captureFocus() {\n this._previouslyFocusedElement = this._document.activeElement;\n this.focusTrap.focusInitialElementWhenReady();\n }\n}\nFocusTrapDirective.ɵfac = function FocusTrapDirective_Factory(t) { return new (t || FocusTrapDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(FocusTrapFactory), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nFocusTrapDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FocusTrapDirective, selectors: [[\"\", \"focusTrap\", \"\"]], inputs: { enabled: [\"cdkTrapFocus\", \"enabled\"], autoCapture: [\"cdkTrapFocusAutoCapture\", \"autoCapture\"] }, exportAs: [\"focusTrap\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nFocusTrapDirective.ctorParameters = () => [\n { type: ElementRef },\n { type: FocusTrapFactory },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\nFocusTrapDirective.propDecorators = {\n enabled: [{ type: Input, args: ['cdkTrapFocus',] }],\n autoCapture: [{ type: Input, args: ['cdkTrapFocusAutoCapture',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FocusTrapDirective, [{\n type: Directive,\n args: [{\n selector: '[focusTrap]',\n exportAs: 'focusTrap'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: FocusTrapFactory }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { enabled: [{\n type: Input,\n args: ['cdkTrapFocus']\n }], autoCapture: [{\n type: Input,\n args: ['cdkTrapFocusAutoCapture']\n }] }); })();\n\nclass FocusTrapModule {\n static forRoot() {\n return {\n ngModule: FocusTrapModule,\n providers: [\n FocusTrapManager,\n Platform,\n InteractivityChecker\n ]\n };\n }\n}\nFocusTrapModule.ɵfac = function FocusTrapModule_Factory(t) { return new (t || FocusTrapModule)(); };\nFocusTrapModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: FocusTrapModule });\nFocusTrapModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FocusTrapModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n declarations: [FocusTrapDirective],\n exports: [FocusTrapDirective]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(FocusTrapModule, { declarations: function () { return [FocusTrapDirective]; }, imports: function () { return [CommonModule]; }, exports: function () { return [FocusTrapDirective]; } }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FocusTrap, FocusTrapDirective, FocusTrapModule, FocusTrapFactory as ɵa, InteractivityChecker as ɵb, Platform as ɵc, FocusTrapManager as ɵd };\n\n","import { Injectable, InjectionToken, Component, ElementRef, Renderer2, HostListener, EventEmitter, Directive, ViewContainerRef, Optional, Inject, Input, Output, RendererFactory2, NgModule } from '@angular/core';\nimport { isBs3, Utils, document as document$1, window as window$1 } from 'ngx-bootstrap/utils';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { PositioningService } from 'ngx-bootstrap/positioning';\nimport { FocusTrapModule } from 'ngx-bootstrap/focus-trap';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from 'ngx-bootstrap/focus-trap';\nimport * as ɵngcc2 from 'ngx-bootstrap/component-loader';\n\nconst _c0 = [\"*\"];\nclass BsModalRef {\n constructor() {\n /**\n * Hides the modal\n */\n this.hide = () => void 0;\n /**\n * Sets new class to modal window\n */\n this.setClass = () => void 0;\n }\n}\nBsModalRef.ɵfac = function BsModalRef_Factory(t) { return new (t || BsModalRef)(); };\nBsModalRef.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: BsModalRef, factory: BsModalRef.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsModalRef, [{\n type: Injectable\n }], function () { return []; }, null); })();\n\nclass ModalBackdropOptions {\n constructor(options) {\n this.animate = true;\n Object.assign(this, options);\n }\n}\n\nclass ModalOptions {\n}\nModalOptions.ɵfac = function ModalOptions_Factory(t) { return new (t || ModalOptions)(); };\nModalOptions.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: ModalOptions, factory: ModalOptions.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ModalOptions, [{\n type: Injectable\n }], null, null); })();\nconst modalConfigDefaults = {\n backdrop: true,\n keyboard: true,\n focus: true,\n show: false,\n ignoreBackdropClick: false,\n class: '',\n animated: true,\n initialState: {},\n closeInterceptor: void 0\n};\nconst MODAL_CONFIG_DEFAULT_OVERRIDE = new InjectionToken('override-default-config');\nconst CLASS_NAME = {\n SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\n BACKDROP: 'modal-backdrop',\n OPEN: 'modal-open',\n FADE: 'fade',\n IN: 'in',\n SHOW: 'show' // bs4\n};\nconst SELECTOR = {\n DIALOG: '.modal-dialog',\n DATA_TOGGLE: '[data-toggle=\"modal\"]',\n DATA_DISMISS: '[data-dismiss=\"modal\"]',\n FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n};\nconst TRANSITION_DURATIONS = {\n MODAL: 300,\n BACKDROP: 150\n};\nconst DISMISS_REASONS = {\n BACKRDOP: 'backdrop-click',\n ESC: 'esc',\n BACK: 'browser-back-navigation-clicked'\n};\n\nclass ModalContainerComponent {\n constructor(options, _element, _renderer) {\n this._element = _element;\n this._renderer = _renderer;\n this.isShown = false;\n this.isAnimated = false;\n this.isModalHiding = false;\n this.clickStartedInContent = false;\n this.config = Object.assign({}, options);\n }\n ngOnInit() {\n if (this.isAnimated) {\n this._renderer.addClass(this._element.nativeElement, CLASS_NAME.FADE);\n }\n this._renderer.setStyle(this._element.nativeElement, 'display', 'block');\n setTimeout(() => {\n this.isShown = true;\n this._renderer.addClass(this._element.nativeElement, isBs3() ? CLASS_NAME.IN : CLASS_NAME.SHOW);\n }, this.isAnimated ? TRANSITION_DURATIONS.BACKDROP : 0);\n if (document && document.body) {\n if (this.bsModalService && this.bsModalService.getModalsCount() === 1) {\n this.bsModalService.checkScrollbar();\n this.bsModalService.setScrollbar();\n }\n this._renderer.addClass(document.body, CLASS_NAME.OPEN);\n this._renderer.setStyle(document.body, 'overflow-y', 'hidden');\n }\n if (this._element.nativeElement) {\n this._element.nativeElement.focus();\n }\n }\n onClickStarted(event) {\n this.clickStartedInContent = event.target !== this._element.nativeElement;\n }\n onClickStop(event) {\n var _a;\n const clickedInBackdrop = event.target === this._element.nativeElement && !this.clickStartedInContent;\n if (this.config.ignoreBackdropClick ||\n this.config.backdrop === 'static' ||\n !clickedInBackdrop) {\n this.clickStartedInContent = false;\n return;\n }\n (_a = this.bsModalService) === null || _a === void 0 ? void 0 : _a.setDismissReason(DISMISS_REASONS.BACKRDOP);\n this.hide();\n }\n onPopState() {\n var _a;\n (_a = this.bsModalService) === null || _a === void 0 ? void 0 : _a.setDismissReason(DISMISS_REASONS.BACK);\n this.hide();\n }\n onEsc(event) {\n var _a, _b;\n if (!this.isShown) {\n return;\n }\n if (event.keyCode === 27 || event.key === 'Escape') {\n event.preventDefault();\n }\n if (this.config.keyboard &&\n this.level === ((_a = this.bsModalService) === null || _a === void 0 ? void 0 : _a.getModalsCount())) {\n (_b = this.bsModalService) === null || _b === void 0 ? void 0 : _b.setDismissReason(DISMISS_REASONS.ESC);\n this.hide();\n }\n }\n ngOnDestroy() {\n if (this.isShown) {\n this._hide();\n }\n }\n hide() {\n if (this.isModalHiding || !this.isShown) {\n return;\n }\n if (this.config.closeInterceptor) {\n this.config.closeInterceptor().then(() => this._hide(), () => undefined);\n return;\n }\n this._hide();\n }\n _hide() {\n this.isModalHiding = true;\n this._renderer.removeClass(this._element.nativeElement, isBs3() ? CLASS_NAME.IN : CLASS_NAME.SHOW);\n setTimeout(() => {\n var _a, _b;\n this.isShown = false;\n if (document &&\n document.body &&\n ((_a = this.bsModalService) === null || _a === void 0 ? void 0 : _a.getModalsCount()) === 1) {\n this._renderer.removeClass(document.body, CLASS_NAME.OPEN);\n this._renderer.setStyle(document.body, 'overflow-y', '');\n }\n (_b = this.bsModalService) === null || _b === void 0 ? void 0 : _b.hide(this.config.id);\n this.isModalHiding = false;\n }, this.isAnimated ? TRANSITION_DURATIONS.MODAL : 0);\n }\n}\nModalContainerComponent.ɵfac = function ModalContainerComponent_Factory(t) { return new (t || ModalContainerComponent)(ɵngcc0.ɵɵdirectiveInject(ModalOptions), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nModalContainerComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: ModalContainerComponent, selectors: [[\"modal-container\"]], hostAttrs: [\"role\", \"dialog\", \"tabindex\", \"-1\", 1, \"modal\"], hostVars: 3, hostBindings: function ModalContainerComponent_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"mousedown\", function ModalContainerComponent_mousedown_HostBindingHandler($event) { return ctx.onClickStarted($event); })(\"click\", function ModalContainerComponent_click_HostBindingHandler($event) { return ctx.onClickStop($event); })(\"popstate\", function ModalContainerComponent_popstate_HostBindingHandler() { return ctx.onPopState(); }, false, ɵngcc0.ɵɵresolveWindow)(\"keydown.esc\", function ModalContainerComponent_keydown_esc_HostBindingHandler($event) { return ctx.onEsc($event); }, false, ɵngcc0.ɵɵresolveWindow);\n } if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"aria-modal\", true)(\"aria-labelledby\", ctx.config.ariaLabelledBy)(\"aria-describedby\", ctx.config.ariaDescribedby);\n } }, ngContentSelectors: _c0, decls: 3, vars: 2, consts: [[\"role\", \"document\", \"focusTrap\", \"\"], [1, \"modal-content\"]], template: function ModalContainerComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1);\n ɵngcc0.ɵɵprojection(2);\n ɵngcc0.ɵɵelementEnd()();\n } if (rf & 2) {\n ɵngcc0.ɵɵclassMap(\"modal-dialog\" + (ctx.config.class ? \" \" + ctx.config.class : \"\"));\n } }, dependencies: [ɵngcc1.FocusTrapDirective], encapsulation: 2 });\nModalContainerComponent.ctorParameters = () => [\n { type: ModalOptions },\n { type: ElementRef },\n { type: Renderer2 }\n];\nModalContainerComponent.propDecorators = {\n onClickStarted: [{ type: HostListener, args: ['mousedown', ['$event'],] }],\n onClickStop: [{ type: HostListener, args: ['click', ['$event'],] }],\n onPopState: [{ type: HostListener, args: ['window:popstate',] }],\n onEsc: [{ type: HostListener, args: ['window:keydown.esc', ['$event'],] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ModalContainerComponent, [{\n type: Component,\n args: [{\n selector: 'modal-container',\n template: `\n <div [class]=\"'modal-dialog' + (config.class ? ' ' + config.class : '')\"\n role=\"document\"\n focusTrap>\n <div class=\"modal-content\">\n <ng-content></ng-content>\n </div>\n </div>\n `,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n class: 'modal',\n role: 'dialog',\n tabindex: '-1',\n '[attr.aria-modal]': 'true',\n '[attr.aria-labelledby]': 'config.ariaLabelledBy',\n '[attr.aria-describedby]': 'config.ariaDescribedby'\n }\n }]\n }], function () { return [{ type: ModalOptions }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }]; }, { onClickStarted: [{\n type: HostListener,\n args: ['mousedown', ['$event']]\n }], onClickStop: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], onPopState: [{\n type: HostListener,\n args: ['window:popstate']\n }], onEsc: [{\n type: HostListener,\n args: ['window:keydown.esc', ['$event']]\n }] }); })();\n\n/** This component will be added as background layout for modals if enabled */\nclass ModalBackdropComponent {\n constructor(element, renderer) {\n this._isAnimated = false;\n this._isShown = false;\n this.element = element;\n this.renderer = renderer;\n }\n get isAnimated() {\n return this._isAnimated;\n }\n set isAnimated(value) {\n this._isAnimated = value;\n }\n get isShown() {\n return this._isShown;\n }\n set isShown(value) {\n this._isShown = value;\n if (value) {\n this.renderer.addClass(this.element.nativeElement, `${CLASS_NAME.IN}`);\n }\n else {\n this.renderer.removeClass(this.element.nativeElement, `${CLASS_NAME.IN}`);\n }\n if (!isBs3()) {\n if (value) {\n this.renderer.addClass(this.element.nativeElement, `${CLASS_NAME.SHOW}`);\n }\n else {\n this.renderer.removeClass(this.element.nativeElement, `${CLASS_NAME.SHOW}`);\n }\n }\n }\n ngOnInit() {\n if (this.isAnimated) {\n this.renderer.addClass(this.element.nativeElement, `${CLASS_NAME.FADE}`);\n Utils.reflow(this.element.nativeElement);\n }\n this.isShown = true;\n }\n}\nModalBackdropComponent.ɵfac = function ModalBackdropComponent_Factory(t) { return new (t || ModalBackdropComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nModalBackdropComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: ModalBackdropComponent, selectors: [[\"bs-modal-backdrop\"]], hostAttrs: [1, \"modal-backdrop\"], decls: 0, vars: 0, template: function ModalBackdropComponent_Template(rf, ctx) { }, encapsulation: 2 });\nModalBackdropComponent.ctorParameters = () => [\n { type: ElementRef },\n { type: Renderer2 }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ModalBackdropComponent, [{\n type: Component,\n args: [{\n selector: 'bs-modal-backdrop',\n template: ' ',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: { class: CLASS_NAME.BACKDROP }\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }]; }, null); })();\n\n// todo: should we support enforce focus in?\nconst TRANSITION_DURATION = 300;\nconst BACKDROP_TRANSITION_DURATION = 150;\n/** Mark any code with directive to show it's content in modal */\nclass ModalDirective {\n constructor(_element, _viewContainerRef, _renderer, clf, modalDefaultOption) {\n this._element = _element;\n this._renderer = _renderer;\n /** This event fires immediately when the `show` instance method is called. */\n this.onShow = new EventEmitter();\n /** This event is fired when the modal has been made visible to the user\n * (will wait for CSS transitions to complete)\n */\n this.onShown = new EventEmitter();\n /** This event is fired immediately when\n * the hide instance method has been called.\n */\n this.onHide = new EventEmitter();\n /** This event is fired when the modal has finished being\n * hidden from the user (will wait for CSS transitions to complete).\n */\n this.onHidden = new EventEmitter();\n this._isShown = false;\n this.isBodyOverflowing = false;\n this.originalBodyPadding = 0;\n this.scrollbarWidth = 0;\n this.timerHideModal = 0;\n this.timerRmBackDrop = 0;\n this.isNested = false;\n this.clickStartedInContent = false;\n this._backdrop = clf.createLoader(_element, _viewContainerRef, _renderer);\n this._config = modalDefaultOption || modalConfigDefaults;\n }\n /** allows to set modal configuration via element property */\n set config(conf) {\n this._config = this.getConfig(conf);\n }\n get config() {\n return this._config;\n }\n get isShown() {\n return this._isShown;\n }\n onClickStarted(event) {\n this.clickStartedInContent = event.target !== this._element.nativeElement;\n }\n onClickStop(event) {\n const clickedInBackdrop = event.target === this._element.nativeElement && !this.clickStartedInContent;\n if (this.config.ignoreBackdropClick ||\n this.config.backdrop === 'static' ||\n !clickedInBackdrop) {\n this.clickStartedInContent = false;\n return;\n }\n this.dismissReason = DISMISS_REASONS.BACKRDOP;\n this.hide(event);\n }\n // todo: consider preventing default and stopping propagation\n onEsc(event) {\n if (!this._isShown) {\n return;\n }\n if (event.keyCode === 27 || event.key === 'Escape') {\n event.preventDefault();\n }\n if (this.config.keyboard) {\n this.dismissReason = DISMISS_REASONS.ESC;\n this.hide();\n }\n }\n ngOnDestroy() {\n if (this._isShown) {\n this._isShown = false;\n this.hideModal();\n this._backdrop.dispose();\n }\n }\n ngOnInit() {\n this._config = this._config || this.getConfig();\n setTimeout(() => {\n if (this._config.show) {\n this.show();\n }\n }, 0);\n }\n /* Public methods */\n /** Allows to manually toggle modal visibility */\n toggle() {\n return this._isShown ? this.hide() : this.show();\n }\n /** Allows to manually open modal */\n show() {\n this.dismissReason = void 0;\n this.onShow.emit(this);\n if (this._isShown) {\n return;\n }\n clearTimeout(this.timerHideModal);\n clearTimeout(this.timerRmBackDrop);\n this._isShown = true;\n this.checkScrollbar();\n this.setScrollbar();\n if (document$1 && document$1.body) {\n if (document$1.body.classList.contains(CLASS_NAME.OPEN)) {\n this.isNested = true;\n }\n else {\n this._renderer.addClass(document$1.body, CLASS_NAME.OPEN);\n this._renderer.setStyle(document$1.body, 'overflow-y', 'hidden');\n }\n }\n this.showBackdrop(() => {\n this.showElement();\n });\n }\n /** Check if we can close the modal */\n hide(event) {\n if (!this._isShown) {\n return;\n }\n if (event) {\n event.preventDefault();\n }\n if (this.config.closeInterceptor) {\n this.config.closeInterceptor().then(() => this._hide(), () => undefined);\n return;\n }\n this._hide();\n }\n /** Private methods @internal */\n /**\n * Manually close modal\n * @internal\n */\n _hide() {\n this.onHide.emit(this);\n window$1.clearTimeout(this.timerHideModal);\n window$1.clearTimeout(this.timerRmBackDrop);\n this._isShown = false;\n this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.IN);\n if (!isBs3()) {\n this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.SHOW);\n }\n // this._addClassIn = false;\n if (this._config.animated) {\n this.timerHideModal = window$1.setTimeout(() => this.hideModal(), TRANSITION_DURATION);\n }\n else {\n this.hideModal();\n }\n }\n getConfig(config) {\n return Object.assign({}, this._config, config);\n }\n /**\n * Show dialog\n * @internal\n */\n showElement() {\n // todo: replace this with component loader usage\n if (!this._element.nativeElement.parentNode ||\n this._element.nativeElement.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // don't move modals dom position\n if (document$1 && document$1.body) {\n document$1.body.appendChild(this._element.nativeElement);\n }\n }\n this._renderer.setAttribute(this._element.nativeElement, 'aria-hidden', 'false');\n this._renderer.setAttribute(this._element.nativeElement, 'aria-modal', 'true');\n this._renderer.setStyle(this._element.nativeElement, 'display', 'block');\n this._renderer.setProperty(this._element.nativeElement, 'scrollTop', 0);\n if (this._config.animated) {\n Utils.reflow(this._element.nativeElement);\n }\n // this._addClassIn = true;\n this._renderer.addClass(this._element.nativeElement, CLASS_NAME.IN);\n if (!isBs3()) {\n this._renderer.addClass(this._element.nativeElement, CLASS_NAME.SHOW);\n }\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.nativeElement.focus();\n }\n this.onShown.emit(this);\n };\n if (this._config.animated) {\n setTimeout(transitionComplete, TRANSITION_DURATION);\n }\n else {\n transitionComplete();\n }\n }\n /** @internal */\n hideModal() {\n this._renderer.setAttribute(this._element.nativeElement, 'aria-hidden', 'true');\n this._renderer.setStyle(this._element.nativeElement, 'display', 'none');\n this.showBackdrop(() => {\n if (!this.isNested) {\n if (document$1 && document$1.body) {\n this._renderer.removeClass(document$1.body, CLASS_NAME.OPEN);\n this._renderer.setStyle(document$1.body, 'overflow-y', '');\n }\n this.resetScrollbar();\n }\n this.resetAdjustments();\n this.focusOtherModal();\n this.onHidden.emit(this);\n });\n }\n // todo: original show was calling a callback when done, but we can use\n // promise\n /** @internal */\n showBackdrop(callback) {\n if (this._isShown &&\n this.config.backdrop &&\n (!this.backdrop || !this.backdrop.instance.isShown)) {\n this.removeBackdrop();\n this._backdrop\n .attach(ModalBackdropComponent)\n .to('body')\n .show({ isAnimated: this._config.animated });\n this.backdrop = this._backdrop._componentRef;\n if (!callback) {\n return;\n }\n if (!this._config.animated) {\n callback();\n return;\n }\n setTimeout(callback, BACKDROP_TRANSITION_DURATION);\n }\n else if (!this._isShown && this.backdrop) {\n this.backdrop.instance.isShown = false;\n const callbackRemove = () => {\n this.removeBackdrop();\n if (callback) {\n callback();\n }\n };\n if (this.backdrop.instance.isAnimated) {\n this.timerRmBackDrop = window$1.setTimeout(callbackRemove, BACKDROP_TRANSITION_DURATION);\n }\n else {\n callbackRemove();\n }\n }\n else if (callback) {\n callback();\n }\n }\n /** @internal */\n removeBackdrop() {\n this._backdrop.hide();\n }\n /** Events tricks */\n // no need for it\n // protected setEscapeEvent():void {\n // if (this._isShown && this._config.keyboard) {\n // $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n // if (event.which === 27) {\n // this.hide()\n // }\n // })\n //\n // } else if (!this._isShown) {\n // $(this._element).off(Event.KEYDOWN_DISMISS)\n // }\n // }\n // protected setResizeEvent():void {\n // console.log(this.renderer.listenGlobal('', Event.RESIZE));\n // if (this._isShown) {\n // $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n // } else {\n // $(window).off(Event.RESIZE)\n // }\n // }\n focusOtherModal() {\n if (this._element.nativeElement.parentElement == null) {\n return;\n }\n const otherOpenedModals = this._element.nativeElement.parentElement.querySelectorAll('.in[bsModal]');\n if (!otherOpenedModals.length) {\n return;\n }\n otherOpenedModals[otherOpenedModals.length - 1].focus();\n }\n /** @internal */\n resetAdjustments() {\n this._renderer.setStyle(this._element.nativeElement, 'paddingLeft', '');\n this._renderer.setStyle(this._element.nativeElement, 'paddingRight', '');\n }\n /** Scroll bar tricks */\n /** @internal */\n checkScrollbar() {\n this.isBodyOverflowing = document$1.body.clientWidth < window$1.innerWidth;\n this.scrollbarWidth = this.getScrollbarWidth();\n }\n setScrollbar() {\n if (!document$1) {\n return;\n }\n this.originalBodyPadding = parseInt(window$1\n .getComputedStyle(document$1.body)\n .getPropertyValue('padding-right') || 0, 10);\n if (this.isBodyOverflowing) {\n document$1.body.style.paddingRight = `${this.originalBodyPadding +\n this.scrollbarWidth}px`;\n }\n }\n resetScrollbar() {\n document$1.body.style.paddingRight = `${this.originalBodyPadding}px`;\n }\n // thx d.walsh\n getScrollbarWidth() {\n const scrollDiv = this._renderer.createElement('div');\n this._renderer.addClass(scrollDiv, CLASS_NAME.SCROLLBAR_MEASURER);\n this._renderer.appendChild(document$1.body, scrollDiv);\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n this._renderer.removeChild(document$1.body, scrollDiv);\n return scrollbarWidth;\n }\n}\nModalDirective.ɵfac = function ModalDirective_Factory(t) { return new (t || ModalDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc2.ComponentLoaderFactory), ɵngcc0.ɵɵdirectiveInject(MODAL_CONFIG_DEFAULT_OVERRIDE, 8)); };\nModalDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: ModalDirective, selectors: [[\"\", \"bsModal\", \"\"]], hostBindings: function ModalDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"mousedown\", function ModalDirective_mousedown_HostBindingHandler($event) { return ctx.onClickStarted($event); })(\"mouseup\", function ModalDirective_mouseup_HostBindingHandler($event) { return ctx.onClickStop($event); })(\"keydown.esc\", function ModalDirective_keydown_esc_HostBindingHandler($event) { return ctx.onEsc($event); });\n } }, inputs: { config: \"config\", closeInterceptor: \"closeInterceptor\" }, outputs: { onShow: \"onShow\", onShown: \"onShown\", onHide: \"onHide\", onHidden: \"onHidden\" }, exportAs: [\"bs-modal\"] });\nModalDirective.ctorParameters = () => [\n { type: ElementRef },\n { type: ViewContainerRef },\n { type: Renderer2 },\n { type: ComponentLoaderFactory },\n { type: ModalOptions, decorators: [{ type: Optional }, { type: Inject, args: [MODAL_CONFIG_DEFAULT_OVERRIDE,] }] }\n];\nModalDirective.propDecorators = {\n config: [{ type: Input }],\n closeInterceptor: [{ type: Input }],\n onShow: [{ type: Output }],\n onShown: [{ type: Output }],\n onHide: [{ type: Output }],\n onHidden: [{ type: Output }],\n onClickStarted: [{ type: HostListener, args: ['mousedown', ['$event'],] }],\n onClickStop: [{ type: HostListener, args: ['mouseup', ['$event'],] }],\n onEsc: [{ type: HostListener, args: ['keydown.esc', ['$event'],] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ModalDirective, [{\n type: Directive,\n args: [{\n selector: '[bsModal]',\n exportAs: 'bs-modal'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc2.ComponentLoaderFactory }, { type: ModalOptions, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MODAL_CONFIG_DEFAULT_OVERRIDE]\n }] }]; }, { onShow: [{\n type: Output\n }], onShown: [{\n type: Output\n }], onHide: [{\n type: Output\n }], onHidden: [{\n type: Output\n }], config: [{\n type: Input\n }], onClickStarted: [{\n type: HostListener,\n args: ['mousedown', ['$event']]\n }], onClickStop: [{\n type: HostListener,\n args: ['mouseup', ['$event']]\n }], \n // todo: consider preventing default and stopping propagation\n onEsc: [{\n type: HostListener,\n args: ['keydown.esc', ['$event']]\n }], closeInterceptor: [{\n type: Input\n }] }); })();\n\nlet currentId = 1;\nclass BsModalService {\n constructor(rendererFactory, clf, modalDefaultOption) {\n this.clf = clf;\n this.modalDefaultOption = modalDefaultOption;\n this.onShow = new EventEmitter();\n this.onShown = new EventEmitter();\n this.onHide = new EventEmitter();\n this.onHidden = new EventEmitter();\n this.isBodyOverflowing = false;\n this.originalBodyPadding = 0;\n this.scrollbarWidth = 0;\n this.modalsCount = 0;\n this.loaders = [];\n this._backdropLoader = this.clf.createLoader();\n this._renderer = rendererFactory.createRenderer(null, null);\n this.config = modalDefaultOption ?\n (Object.assign({}, modalConfigDefaults, modalDefaultOption)) :\n modalConfigDefaults;\n }\n /** Shows a modal */\n show(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n content, config) {\n this.modalsCount++;\n this._createLoaders();\n // must be different per every show() call\n const id = (config === null || config === void 0 ? void 0 : config.id) || currentId++;\n this.config = this.modalDefaultOption ?\n Object.assign({}, modalConfigDefaults, this.modalDefaultOption, config) :\n Object.assign({}, modalConfigDefaults, config);\n this.config.id = id;\n this._showBackdrop();\n this.lastDismissReason = void 0;\n return this._showModal(content);\n }\n hide(id) {\n if (this.modalsCount === 1 || id == null) {\n this._hideBackdrop();\n this.resetScrollbar();\n }\n this.modalsCount = this.modalsCount >= 1 && id != null ? this.modalsCount - 1 : 0;\n setTimeout(() => {\n this._hideModal(id);\n this.removeLoaders(id);\n }, this.config.animated ? TRANSITION_DURATIONS.BACKDROP : 0);\n }\n _showBackdrop() {\n const isBackdropEnabled = this.config.backdrop === true || this.config.backdrop === 'static';\n const isBackdropInDOM = !this.backdropRef || !this.backdropRef.instance.isShown;\n if (this.modalsCount === 1) {\n this.removeBackdrop();\n if (isBackdropEnabled && isBackdropInDOM) {\n this._backdropLoader\n .attach(ModalBackdropComponent)\n .to('body')\n .show({ isAnimated: this.config.animated });\n this.backdropRef = this._backdropLoader._componentRef;\n }\n }\n }\n _hideBackdrop() {\n if (!this.backdropRef) {\n return;\n }\n this.backdropRef.instance.isShown = false;\n const duration = this.config.animated ? TRANSITION_DURATIONS.BACKDROP : 0;\n setTimeout(() => this.removeBackdrop(), duration);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _showModal(content) {\n var _a;\n const modalLoader = this.loaders[this.loaders.length - 1];\n if (this.config && this.config.providers) {\n for (const provider of this.config.providers) {\n modalLoader.provide(provider);\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const bsModalRef = new BsModalRef();\n const modalContainerRef = modalLoader\n .provide({ provide: ModalOptions, useValue: this.config })\n .provide({ provide: BsModalRef, useValue: bsModalRef })\n .attach(ModalContainerComponent)\n .to('body');\n bsModalRef.hide = () => { var _a; return (_a = modalContainerRef.instance) === null || _a === void 0 ? void 0 : _a.hide(); };\n bsModalRef.setClass = (newClass) => {\n if (modalContainerRef.instance) {\n modalContainerRef.instance.config.class = newClass;\n }\n };\n bsModalRef.onHidden = new EventEmitter();\n bsModalRef.onHide = new EventEmitter();\n this.copyEvent(modalLoader.onBeforeHide, bsModalRef.onHide);\n this.copyEvent(modalLoader.onHidden, bsModalRef.onHidden);\n // call 'show' method after assign setClass in bsModalRef.\n // it makes modal component's bsModalRef available to call setClass method\n modalContainerRef.show({\n content,\n isAnimated: this.config.animated,\n initialState: this.config.initialState,\n bsModalService: this,\n id: this.config.id\n });\n if (modalContainerRef.instance) {\n modalContainerRef.instance.level = this.getModalsCount();\n bsModalRef.content = modalLoader.getInnerComponent();\n bsModalRef.id = (_a = modalContainerRef.instance.config) === null || _a === void 0 ? void 0 : _a.id;\n }\n return bsModalRef;\n }\n _hideModal(id) {\n if (id != null) {\n const indexToRemove = this.loaders.findIndex(loader => { var _a; return ((_a = loader.instance) === null || _a === void 0 ? void 0 : _a.config.id) === id; });\n const modalLoader = this.loaders[indexToRemove];\n if (modalLoader) {\n modalLoader.hide(id);\n }\n }\n else {\n this.loaders.forEach((loader) => {\n if (loader.instance) {\n loader.hide(loader.instance.config.id);\n }\n });\n }\n }\n getModalsCount() {\n return this.modalsCount;\n }\n setDismissReason(reason) {\n this.lastDismissReason = reason;\n }\n removeBackdrop() {\n this._renderer.removeClass(document.body, CLASS_NAME.OPEN);\n this._renderer.setStyle(document.body, 'overflow-y', '');\n this._backdropLoader.hide();\n this.backdropRef = void 0;\n }\n /** Checks if the body is overflowing and sets scrollbar width */\n /** @internal */\n checkScrollbar() {\n this.isBodyOverflowing = document.body.clientWidth < window.innerWidth;\n this.scrollbarWidth = this.getScrollbarWidth();\n }\n setScrollbar() {\n if (!document) {\n return;\n }\n this.originalBodyPadding = parseInt(window\n .getComputedStyle(document.body)\n .getPropertyValue('padding-right') || '0', 10);\n if (this.isBodyOverflowing) {\n document.body.style.paddingRight = `${this.originalBodyPadding +\n this.scrollbarWidth}px`;\n }\n }\n resetScrollbar() {\n document.body.style.paddingRight = `${this.originalBodyPadding}px`;\n }\n // thx d.walsh\n getScrollbarWidth() {\n const scrollDiv = this._renderer.createElement('div');\n this._renderer.addClass(scrollDiv, CLASS_NAME.SCROLLBAR_MEASURER);\n this._renderer.appendChild(document.body, scrollDiv);\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n this._renderer.removeChild(document.body, scrollDiv);\n return scrollbarWidth;\n }\n _createLoaders() {\n const loader = this.clf.createLoader();\n this.copyEvent(loader.onBeforeShow, this.onShow);\n this.copyEvent(loader.onShown, this.onShown);\n this.copyEvent(loader.onBeforeHide, this.onHide);\n this.copyEvent(loader.onHidden, this.onHidden);\n this.loaders.push(loader);\n }\n removeLoaders(id) {\n if (id != null) {\n const indexToRemove = this.loaders.findIndex(loader => { var _a; return ((_a = loader.instance) === null || _a === void 0 ? void 0 : _a.config.id) === id; });\n if (indexToRemove >= 0) {\n this.loaders.splice(indexToRemove, 1);\n this.loaders.forEach((loader, i) => {\n if (loader.instance) {\n loader.instance.level = i + 1;\n }\n });\n }\n }\n else {\n this.loaders.splice(0, this.loaders.length);\n }\n }\n copyEvent(from, to) {\n from.subscribe((data) => {\n to.emit(this.lastDismissReason || data);\n });\n }\n}\nBsModalService.ɵfac = function BsModalService_Factory(t) { return new (t || BsModalService)(ɵngcc0.ɵɵinject(ɵngcc0.RendererFactory2), ɵngcc0.ɵɵinject(ɵngcc2.ComponentLoaderFactory), ɵngcc0.ɵɵinject(MODAL_CONFIG_DEFAULT_OVERRIDE, 8)); };\nBsModalService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: BsModalService, factory: BsModalService.ɵfac });\nBsModalService.ctorParameters = () => [\n { type: RendererFactory2 },\n { type: ComponentLoaderFactory },\n { type: ModalOptions, decorators: [{ type: Optional }, { type: Inject, args: [MODAL_CONFIG_DEFAULT_OVERRIDE,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsModalService, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc0.RendererFactory2 }, { type: ɵngcc2.ComponentLoaderFactory }, { type: ModalOptions, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MODAL_CONFIG_DEFAULT_OVERRIDE]\n }] }]; }, null); })();\n\nconst focusTrapModule = FocusTrapModule.forRoot();\nclass ModalModule {\n static forRoot() {\n return {\n ngModule: ModalModule,\n providers: [BsModalService, ComponentLoaderFactory, PositioningService]\n };\n }\n static forChild() {\n return {\n ngModule: ModalModule,\n providers: [BsModalService, ComponentLoaderFactory, PositioningService]\n };\n }\n}\nModalModule.ɵfac = function ModalModule_Factory(t) { return new (t || ModalModule)(); };\nModalModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: ModalModule });\nModalModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [FocusTrapModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ModalModule, [{\n type: NgModule,\n args: [{\n imports: [FocusTrapModule],\n declarations: [\n ModalBackdropComponent,\n ModalDirective,\n ModalContainerComponent\n ],\n exports: [ModalBackdropComponent, ModalDirective],\n entryComponents: [ModalBackdropComponent, ModalContainerComponent]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ModalModule, { declarations: function () { return [ModalBackdropComponent, ModalDirective, ModalContainerComponent]; }, imports: function () { return [FocusTrapModule]; }, exports: function () { return [ModalBackdropComponent, ModalDirective]; } }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BsModalRef, BsModalService, MODAL_CONFIG_DEFAULT_OVERRIDE, ModalBackdropComponent, ModalBackdropOptions, ModalContainerComponent, ModalDirective, ModalModule, ModalOptions, CLASS_NAME as ɵa };\n\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n","let nextHandle = 1;\nlet resolved;\nconst activeHandles = {};\nfunction findAndClearHandle(handle) {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\nexport const Immediate = {\n setImmediate(cb) {\n const handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(() => findAndClearHandle(handle) && cb());\n return handle;\n },\n clearImmediate(handle) {\n findAndClearHandle(handle);\n },\n};\nexport const TestTools = {\n pending() {\n return Object.keys(activeHandles).length;\n }\n};\n","import { Immediate } from '../util/Immediate';\nconst { setImmediate, clearImmediate } = Immediate;\nexport const immediateProvider = {\n setImmediate(...args) {\n const { delegate } = immediateProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args);\n },\n clearImmediate(handle) {\n const { delegate } = immediateProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n },\n delegate: undefined,\n};\n","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport const asapScheduler = new AsapScheduler(AsapAction);\nexport const asap = asapScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AsapScheduler extends AsyncScheduler {\n flush(action) {\n this._active = true;\n const flushId = this._scheduled;\n this._scheduled = undefined;\n const { actions } = this;\n let error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nexport class AsapAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n if (!scheduler.actions.some((action) => action.id === id)) {\n immediateProvider.clearImmediate(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n }\n}\n","import * as i0 from '@angular/core';\nimport { Directive, ElementRef, Input, TemplateRef, Injectable, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Renderer2, NgZone, Optional, Inject, Output, ViewChild, InjectionToken, forwardRef, Attribute, ChangeDetectorRef, HostBinding, ContentChild, ContentChildren, HostListener, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { takeUntil, auditTime, startWith, tap, debounceTime, filter, map } from 'rxjs/operators';\nimport { animationFrameScheduler, asapScheduler, Subject, fromEvent, merge } from 'rxjs';\nimport { DOCUMENT, CommonModule } from '@angular/common';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\n\nconst _c0 = [\"content\"];\nconst _c1 = [\"scroll\"];\nconst _c2 = [\"padding\"];\nconst _c3 = function (a0) { return { searchTerm: a0 }; };\nfunction NgDropdownPanelComponent_div_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 6);\n ɵngcc0.ɵɵelementContainer(1, 7);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.headerTemplate)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(2, _c3, ctx_r0.filterValue));\n} }\nfunction NgDropdownPanelComponent_div_8_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 8);\n ɵngcc0.ɵɵelementContainer(1, 7);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r4 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r4.footerTemplate)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(2, _c3, ctx_r4.filterValue));\n} }\nconst _c4 = [\"*\"];\nconst _c5 = [\"searchInput\"];\nfunction NgSelectComponent_ng_container_4_div_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n const _r13 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"span\", 15);\n ɵngcc0.ɵɵlistener(\"click\", function NgSelectComponent_ng_container_4_div_1_ng_template_1_Template_span_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r13); const item_r7 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r11 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r11.unselect(item_r7)); });\n ɵngcc0.ɵɵtext(1, \"\\u00D7\");\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelement(2, \"span\", 16);\n} if (rf & 2) {\n const item_r7 = ɵngcc0.ɵɵnextContext().$implicit;\n const ctx_r9 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngItemLabel\", item_r7.label)(\"escape\", ctx_r9.escapeHTML);\n} }\nfunction NgSelectComponent_ng_container_4_div_1_ng_template_3_Template(rf, ctx) { }\nconst _c6 = function (a0, a1, a2) { return { item: a0, clear: a1, label: a2 }; };\nfunction NgSelectComponent_ng_container_4_div_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 12);\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_container_4_div_1_ng_template_1_Template, 3, 2, \"ng-template\", null, 13, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_container_4_div_1_ng_template_3_Template, 0, 0, \"ng-template\", 14);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const item_r7 = ctx.$implicit;\n const _r8 = ɵngcc0.ɵɵreference(2);\n const ctx_r6 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵclassProp(\"ng-value-disabled\", item_r7.disabled);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r6.labelTemplate || _r8)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction3(4, _c6, item_r7.value, ctx_r6.clearItem, item_r7.label));\n} }\nfunction NgSelectComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_container_4_div_1_Template, 4, 8, \"div\", 11);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r0.selectedItems)(\"ngForTrackBy\", ctx_r0.trackByOption);\n} }\nfunction NgSelectComponent_5_ng_template_0_Template(rf, ctx) { }\nconst _c7 = function (a0, a1) { return { items: a0, clear: a1 }; };\nfunction NgSelectComponent_5_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, NgSelectComponent_5_ng_template_0_Template, 0, 0, \"ng-template\", 14);\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r1.multiLabelTemplate)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction2(2, _c7, ctx_r1.selectedValues, ctx_r1.clearItem));\n} }\nfunction NgSelectComponent_ng_container_9_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"div\", 19);\n} }\nfunction NgSelectComponent_ng_container_9_ng_template_3_Template(rf, ctx) { }\nfunction NgSelectComponent_ng_container_9_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_container_9_ng_template_1_Template, 1, 0, \"ng-template\", null, 17, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_container_9_ng_template_3_Template, 0, 0, \"ng-template\", 18);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const _r16 = ɵngcc0.ɵɵreference(2);\n const ctx_r3 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r3.loadingSpinnerTemplate || _r16);\n} }\nfunction NgSelectComponent_span_10_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"span\", 20)(1, \"span\", 21);\n ɵngcc0.ɵɵtext(2, \"\\u00D7\");\n ɵngcc0.ɵɵelementEnd()();\n} if (rf & 2) {\n const ctx_r4 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵpropertyInterpolate(\"title\", ctx_r4.clearAllText);\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"span\", 27);\n} if (rf & 2) {\n const item_r24 = ɵngcc0.ɵɵnextContext().$implicit;\n const ctx_r26 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵproperty(\"ngItemLabel\", item_r24.label)(\"escape\", ctx_r26.escapeHTML);\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_3_Template(rf, ctx) { }\nconst _c8 = function (a0, a1, a2, a3) { return { item: a0, item$: a1, index: a2, searchTerm: a3 }; };\nfunction NgSelectComponent_ng_dropdown_panel_13_div_2_Template(rf, ctx) { if (rf & 1) {\n const _r30 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 25);\n ɵngcc0.ɵɵlistener(\"click\", function NgSelectComponent_ng_dropdown_panel_13_div_2_Template_div_click_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r30); const item_r24 = restoredCtx.$implicit; const ctx_r29 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r29.toggleItem(item_r24)); })(\"mouseover\", function NgSelectComponent_ng_dropdown_panel_13_div_2_Template_div_mouseover_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r30); const item_r24 = restoredCtx.$implicit; const ctx_r31 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r31.onItemHover(item_r24)); });\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_1_Template, 1, 2, \"ng-template\", null, 26, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_3_Template, 0, 0, \"ng-template\", 14);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const item_r24 = ctx.$implicit;\n const _r25 = ɵngcc0.ɵɵreference(2);\n const ctx_r19 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵclassProp(\"ng-option-disabled\", item_r24.disabled)(\"ng-option-selected\", item_r24.selected)(\"ng-optgroup\", item_r24.children)(\"ng-option\", !item_r24.children)(\"ng-option-child\", !!item_r24.parent)(\"ng-option-marked\", item_r24 === ctx_r19.itemsList.markedItem);\n ɵngcc0.ɵɵattribute(\"role\", item_r24.children ? \"group\" : \"option\")(\"aria-selected\", item_r24.selected)(\"id\", item_r24 == null ? null : item_r24.htmlId);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", item_r24.children ? ctx_r19.optgroupTemplate || _r25 : ctx_r19.optionTemplate || _r25)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction4(17, _c8, item_r24.value, item_r24, item_r24.index, ctx_r19.searchTerm));\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"span\")(1, \"span\", 30);\n ɵngcc0.ɵɵtext(2);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtext(3);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r33 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵtextInterpolate(ctx_r33.addTagText);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate1(\"\\\"\", ctx_r33.searchTerm, \"\\\"\");\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_3_Template(rf, ctx) { }\nfunction NgSelectComponent_ng_dropdown_panel_13_div_3_Template(rf, ctx) { if (rf & 1) {\n const _r36 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 28);\n ɵngcc0.ɵɵlistener(\"mouseover\", function NgSelectComponent_ng_dropdown_panel_13_div_3_Template_div_mouseover_0_listener() { ɵngcc0.ɵɵrestoreView(_r36); const ctx_r35 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r35.itemsList.unmarkItem()); })(\"click\", function NgSelectComponent_ng_dropdown_panel_13_div_3_Template_div_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r36); const ctx_r37 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r37.selectTag()); });\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_1_Template, 4, 2, \"ng-template\", null, 29, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_3_Template, 0, 0, \"ng-template\", 14);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const _r32 = ɵngcc0.ɵɵreference(2);\n const ctx_r20 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵclassProp(\"ng-option-marked\", !ctx_r20.itemsList.markedItem);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r20.tagTemplate || _r32)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(4, _c3, ctx_r20.searchTerm));\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 32);\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r39 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx_r39.notFoundText);\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_3_Template(rf, ctx) { }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_4_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_1_Template, 2, 1, \"ng-template\", null, 31, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_3_Template, 0, 0, \"ng-template\", 14);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const _r38 = ɵngcc0.ɵɵreference(2);\n const ctx_r21 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r21.notFoundTemplate || _r38)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(2, _c3, ctx_r21.searchTerm));\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 32);\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r42 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx_r42.typeToSearchText);\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_3_Template(rf, ctx) { }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_5_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_1_Template, 2, 1, \"ng-template\", null, 33, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_3_Template, 0, 0, \"ng-template\", 18);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const _r41 = ɵngcc0.ɵɵreference(2);\n const ctx_r22 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r22.typeToSearchTemplate || _r41);\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 32);\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r45 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx_r45.loadingText);\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_3_Template(rf, ctx) { }\nfunction NgSelectComponent_ng_dropdown_panel_13_ng_container_6_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_1_Template, 2, 1, \"ng-template\", null, 34, ɵngcc0.ɵɵtemplateRefExtractor);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_3_Template, 0, 0, \"ng-template\", 14);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const _r44 = ɵngcc0.ɵɵreference(2);\n const ctx_r23 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r23.loadingTextTemplate || _r44)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(2, _c3, ctx_r23.searchTerm));\n} }\nfunction NgSelectComponent_ng_dropdown_panel_13_Template(rf, ctx) { if (rf & 1) {\n const _r48 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"ng-dropdown-panel\", 22);\n ɵngcc0.ɵɵlistener(\"update\", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_update_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r48); const ctx_r47 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r47.viewPortItems = $event); })(\"scroll\", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_scroll_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r48); const ctx_r49 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r49.scroll.emit($event)); })(\"scrollToEnd\", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_scrollToEnd_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r48); const ctx_r50 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r50.scrollToEnd.emit($event)); })(\"outsideClick\", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_outsideClick_0_listener() { ɵngcc0.ɵɵrestoreView(_r48); const ctx_r51 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r51.close()); });\n ɵngcc0.ɵɵelementContainerStart(1);\n ɵngcc0.ɵɵtemplate(2, NgSelectComponent_ng_dropdown_panel_13_div_2_Template, 4, 22, \"div\", 23);\n ɵngcc0.ɵɵtemplate(3, NgSelectComponent_ng_dropdown_panel_13_div_3_Template, 4, 6, \"div\", 24);\n ɵngcc0.ɵɵelementContainerEnd();\n ɵngcc0.ɵɵtemplate(4, NgSelectComponent_ng_dropdown_panel_13_ng_container_4_Template, 4, 4, \"ng-container\", 3);\n ɵngcc0.ɵɵtemplate(5, NgSelectComponent_ng_dropdown_panel_13_ng_container_5_Template, 4, 1, \"ng-container\", 3);\n ɵngcc0.ɵɵtemplate(6, NgSelectComponent_ng_dropdown_panel_13_ng_container_6_Template, 4, 4, \"ng-container\", 3);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r5 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵclassProp(\"ng-select-multiple\", ctx_r5.multiple);\n ɵngcc0.ɵɵproperty(\"virtualScroll\", ctx_r5.virtualScroll)(\"bufferAmount\", ctx_r5.bufferAmount)(\"appendTo\", ctx_r5.appendTo)(\"position\", ctx_r5.dropdownPosition)(\"headerTemplate\", ctx_r5.headerTemplate)(\"footerTemplate\", ctx_r5.footerTemplate)(\"filterValue\", ctx_r5.searchTerm)(\"items\", ctx_r5.itemsList.filteredItems)(\"markedItem\", ctx_r5.itemsList.markedItem)(\"ngClass\", ctx_r5.appendTo ? ctx_r5.classes : null)(\"id\", ctx_r5.dropdownId);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r5.viewPortItems)(\"ngForTrackBy\", ctx_r5.trackByOption);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.showAddTag);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.showNoItemsFound());\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.showTypeToSearch());\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.loading && ctx_r5.itemsList.filteredItems.length === 0);\n} }\nconst unescapedHTMLExp = /[&<>\"']/g;\nconst hasUnescapedHTMLExp = RegExp(unescapedHTMLExp.source);\nconst htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': '''\n};\nfunction escapeHTML(string) {\n return (string && hasUnescapedHTMLExp.test(string)) ?\n string.replace(unescapedHTMLExp, chr => htmlEscapes[chr]) :\n string;\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isObject(value) {\n return typeof value === 'object' && isDefined(value);\n}\nfunction isPromise(value) {\n return value instanceof Promise;\n}\nfunction isFunction(value) {\n return value instanceof Function;\n}\n\nclass NgItemLabelDirective {\n constructor(element) {\n this.element = element;\n this.escape = true;\n }\n ngOnChanges(changes) {\n this.element.nativeElement.innerHTML = this.escape ?\n escapeHTML(this.ngItemLabel) :\n this.ngItemLabel;\n }\n}\nNgItemLabelDirective.ɵfac = function NgItemLabelDirective_Factory(t) { return new (t || NgItemLabelDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgItemLabelDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgItemLabelDirective, selectors: [[\"\", \"ngItemLabel\", \"\"]], inputs: { escape: \"escape\", ngItemLabel: \"ngItemLabel\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgItemLabelDirective.ctorParameters = () => [\n { type: ElementRef }\n];\nNgItemLabelDirective.propDecorators = {\n ngItemLabel: [{ type: Input }],\n escape: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgItemLabelDirective, [{\n type: Directive,\n args: [{ selector: '[ngItemLabel]' }]\n }], function () { return [{ type: ɵngcc0.ElementRef }]; }, { escape: [{\n type: Input\n }], ngItemLabel: [{\n type: Input\n }] }); })();\nclass NgOptionTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgOptionTemplateDirective.ɵfac = function NgOptionTemplateDirective_Factory(t) { return new (t || NgOptionTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgOptionTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgOptionTemplateDirective, selectors: [[\"\", \"ng-option-tmp\", \"\"]] });\nNgOptionTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgOptionTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-option-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgOptgroupTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgOptgroupTemplateDirective.ɵfac = function NgOptgroupTemplateDirective_Factory(t) { return new (t || NgOptgroupTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgOptgroupTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgOptgroupTemplateDirective, selectors: [[\"\", \"ng-optgroup-tmp\", \"\"]] });\nNgOptgroupTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgOptgroupTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-optgroup-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgLabelTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgLabelTemplateDirective.ɵfac = function NgLabelTemplateDirective_Factory(t) { return new (t || NgLabelTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgLabelTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgLabelTemplateDirective, selectors: [[\"\", \"ng-label-tmp\", \"\"]] });\nNgLabelTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgLabelTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-label-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgMultiLabelTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgMultiLabelTemplateDirective.ɵfac = function NgMultiLabelTemplateDirective_Factory(t) { return new (t || NgMultiLabelTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgMultiLabelTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgMultiLabelTemplateDirective, selectors: [[\"\", \"ng-multi-label-tmp\", \"\"]] });\nNgMultiLabelTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgMultiLabelTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-multi-label-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgHeaderTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgHeaderTemplateDirective.ɵfac = function NgHeaderTemplateDirective_Factory(t) { return new (t || NgHeaderTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgHeaderTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgHeaderTemplateDirective, selectors: [[\"\", \"ng-header-tmp\", \"\"]] });\nNgHeaderTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgHeaderTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-header-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgFooterTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgFooterTemplateDirective.ɵfac = function NgFooterTemplateDirective_Factory(t) { return new (t || NgFooterTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgFooterTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgFooterTemplateDirective, selectors: [[\"\", \"ng-footer-tmp\", \"\"]] });\nNgFooterTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgFooterTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-footer-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgNotFoundTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgNotFoundTemplateDirective.ɵfac = function NgNotFoundTemplateDirective_Factory(t) { return new (t || NgNotFoundTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgNotFoundTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgNotFoundTemplateDirective, selectors: [[\"\", \"ng-notfound-tmp\", \"\"]] });\nNgNotFoundTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgNotFoundTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-notfound-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgTypeToSearchTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgTypeToSearchTemplateDirective.ɵfac = function NgTypeToSearchTemplateDirective_Factory(t) { return new (t || NgTypeToSearchTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgTypeToSearchTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgTypeToSearchTemplateDirective, selectors: [[\"\", \"ng-typetosearch-tmp\", \"\"]] });\nNgTypeToSearchTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgTypeToSearchTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-typetosearch-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgLoadingTextTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgLoadingTextTemplateDirective.ɵfac = function NgLoadingTextTemplateDirective_Factory(t) { return new (t || NgLoadingTextTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgLoadingTextTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgLoadingTextTemplateDirective, selectors: [[\"\", \"ng-loadingtext-tmp\", \"\"]] });\nNgLoadingTextTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgLoadingTextTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-loadingtext-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgTagTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgTagTemplateDirective.ɵfac = function NgTagTemplateDirective_Factory(t) { return new (t || NgTagTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgTagTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgTagTemplateDirective, selectors: [[\"\", \"ng-tag-tmp\", \"\"]] });\nNgTagTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgTagTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-tag-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\nclass NgLoadingSpinnerTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgLoadingSpinnerTemplateDirective.ɵfac = function NgLoadingSpinnerTemplateDirective_Factory(t) { return new (t || NgLoadingSpinnerTemplateDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgLoadingSpinnerTemplateDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgLoadingSpinnerTemplateDirective, selectors: [[\"\", \"ng-loadingspinner-tmp\", \"\"]] });\nNgLoadingSpinnerTemplateDirective.ctorParameters = () => [\n { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgLoadingSpinnerTemplateDirective, [{\n type: Directive,\n args: [{ selector: '[ng-loadingspinner-tmp]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n\nclass ConsoleService {\n warn(message) {\n console.warn(message);\n }\n}\nConsoleService.ɵfac = function ConsoleService_Factory(t) { return new (t || ConsoleService)(); };\nConsoleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConsoleService_Factory() { return new ConsoleService(); }, token: ConsoleService, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ConsoleService, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], null, null); })();\n\nfunction newId() {\n // First character is an 'a', it's good practice to tag id to begin with a letter\n return 'axxxxxxxxxxx'.replace(/[x]/g, function (_) {\n // tslint:disable-next-line:no-bitwise\n const val = Math.random() * 16 | 0;\n return val.toString(16);\n });\n}\n\nconst diacritics = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n};\nfunction stripSpecialChars(text) {\n const match = (a) => {\n return diacritics[a] || a;\n };\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n}\n\nclass ItemsList {\n constructor(_ngSelect, _selectionModel) {\n this._ngSelect = _ngSelect;\n this._selectionModel = _selectionModel;\n this._items = [];\n this._filteredItems = [];\n this._markedIndex = -1;\n }\n get items() {\n return this._items;\n }\n get filteredItems() {\n return this._filteredItems;\n }\n get markedIndex() {\n return this._markedIndex;\n }\n get selectedItems() {\n return this._selectionModel.value;\n }\n get markedItem() {\n return this._filteredItems[this._markedIndex];\n }\n get noItemsToSelect() {\n return this._ngSelect.hideSelected && this._items.length === this.selectedItems.length;\n }\n get maxItemsSelected() {\n return this._ngSelect.multiple && this._ngSelect.maxSelectedItems <= this.selectedItems.length;\n }\n get lastSelectedItem() {\n let i = this.selectedItems.length - 1;\n for (; i >= 0; i--) {\n let item = this.selectedItems[i];\n if (!item.disabled) {\n return item;\n }\n }\n return null;\n }\n setItems(items) {\n this._items = items.map((item, index) => this.mapItem(item, index));\n if (this._ngSelect.groupBy) {\n this._groups = this._groupBy(this._items, this._ngSelect.groupBy);\n this._items = this._flatten(this._groups);\n }\n else {\n this._groups = new Map();\n this._groups.set(undefined, this._items);\n }\n this._filteredItems = [...this._items];\n }\n select(item) {\n if (item.selected || this.maxItemsSelected) {\n return;\n }\n const multiple = this._ngSelect.multiple;\n if (!multiple) {\n this.clearSelected();\n }\n this._selectionModel.select(item, multiple, this._ngSelect.selectableGroupAsModel);\n if (this._ngSelect.hideSelected) {\n this._hideSelected(item);\n }\n }\n unselect(item) {\n if (!item.selected) {\n return;\n }\n this._selectionModel.unselect(item, this._ngSelect.multiple);\n if (this._ngSelect.hideSelected && isDefined(item.index) && this._ngSelect.multiple) {\n this._showSelected(item);\n }\n }\n findItem(value) {\n let findBy;\n if (this._ngSelect.compareWith) {\n findBy = item => this._ngSelect.compareWith(item.value, value);\n }\n else if (this._ngSelect.bindValue) {\n findBy = item => !item.children && this.resolveNested(item.value, this._ngSelect.bindValue) === value;\n }\n else {\n findBy = item => item.value === value ||\n !item.children && item.label && item.label === this.resolveNested(value, this._ngSelect.bindLabel);\n }\n return this._items.find(item => findBy(item));\n }\n addItem(item) {\n const option = this.mapItem(item, this._items.length);\n this._items.push(option);\n this._filteredItems.push(option);\n return option;\n }\n clearSelected(keepDisabled = false) {\n this._selectionModel.clear(keepDisabled);\n this._items.forEach(item => {\n item.selected = keepDisabled && item.selected && item.disabled;\n item.marked = false;\n });\n if (this._ngSelect.hideSelected) {\n this.resetFilteredItems();\n }\n }\n findByLabel(term) {\n term = stripSpecialChars(term).toLocaleLowerCase();\n return this.filteredItems.find(item => {\n const label = stripSpecialChars(item.label).toLocaleLowerCase();\n return label.substr(0, term.length) === term;\n });\n }\n filter(term) {\n if (!term) {\n this.resetFilteredItems();\n return;\n }\n this._filteredItems = [];\n term = this._ngSelect.searchFn ? term : stripSpecialChars(term).toLocaleLowerCase();\n const match = this._ngSelect.searchFn || this._defaultSearchFn;\n const hideSelected = this._ngSelect.hideSelected;\n for (const key of Array.from(this._groups.keys())) {\n const matchedItems = [];\n for (const item of this._groups.get(key)) {\n if (hideSelected && (item.parent && item.parent.selected || item.selected)) {\n continue;\n }\n const searchItem = this._ngSelect.searchFn ? item.value : item;\n if (match(term, searchItem)) {\n matchedItems.push(item);\n }\n }\n if (matchedItems.length > 0) {\n const [last] = matchedItems.slice(-1);\n if (last.parent) {\n const head = this._items.find(x => x === last.parent);\n this._filteredItems.push(head);\n }\n this._filteredItems.push(...matchedItems);\n }\n }\n }\n resetFilteredItems() {\n if (this._filteredItems.length === this._items.length) {\n return;\n }\n if (this._ngSelect.hideSelected && this.selectedItems.length > 0) {\n this._filteredItems = this._items.filter(x => !x.selected);\n }\n else {\n this._filteredItems = this._items;\n }\n }\n unmarkItem() {\n this._markedIndex = -1;\n }\n markNextItem() {\n this._stepToItem(+1);\n }\n markPreviousItem() {\n this._stepToItem(-1);\n }\n markItem(item) {\n this._markedIndex = this._filteredItems.indexOf(item);\n }\n markSelectedOrDefault(markDefault) {\n if (this._filteredItems.length === 0) {\n return;\n }\n const lastMarkedIndex = this._getLastMarkedIndex();\n if (lastMarkedIndex > -1) {\n this._markedIndex = lastMarkedIndex;\n }\n else {\n this._markedIndex = markDefault ? this.filteredItems.findIndex(x => !x.disabled) : -1;\n }\n }\n resolveNested(option, key) {\n if (!isObject(option)) {\n return option;\n }\n if (key.indexOf('.') === -1) {\n return option[key];\n }\n else {\n let keys = key.split('.');\n let value = option;\n for (let i = 0, len = keys.length; i < len; ++i) {\n if (value == null) {\n return null;\n }\n value = value[keys[i]];\n }\n return value;\n }\n }\n mapItem(item, index) {\n const label = isDefined(item.$ngOptionLabel) ? item.$ngOptionLabel : this.resolveNested(item, this._ngSelect.bindLabel);\n const value = isDefined(item.$ngOptionValue) ? item.$ngOptionValue : item;\n return {\n index: index,\n label: isDefined(label) ? label.toString() : '',\n value: value,\n disabled: item.disabled,\n htmlId: `${this._ngSelect.dropdownId}-${index}`,\n };\n }\n mapSelectedItems() {\n const multiple = this._ngSelect.multiple;\n for (const selected of this.selectedItems) {\n const value = this._ngSelect.bindValue ? this.resolveNested(selected.value, this._ngSelect.bindValue) : selected.value;\n const item = isDefined(value) ? this.findItem(value) : null;\n this._selectionModel.unselect(selected, multiple);\n this._selectionModel.select(item || selected, multiple, this._ngSelect.selectableGroupAsModel);\n }\n if (this._ngSelect.hideSelected) {\n this._filteredItems = this.filteredItems.filter(x => this.selectedItems.indexOf(x) === -1);\n }\n }\n _showSelected(item) {\n this._filteredItems.push(item);\n if (item.parent) {\n const parent = item.parent;\n const parentExists = this._filteredItems.find(x => x === parent);\n if (!parentExists) {\n this._filteredItems.push(parent);\n }\n }\n else if (item.children) {\n for (const child of item.children) {\n child.selected = false;\n this._filteredItems.push(child);\n }\n }\n this._filteredItems = [...this._filteredItems.sort((a, b) => (a.index - b.index))];\n }\n _hideSelected(item) {\n this._filteredItems = this._filteredItems.filter(x => x !== item);\n if (item.parent) {\n const children = item.parent.children;\n if (children.every(x => x.selected)) {\n this._filteredItems = this._filteredItems.filter(x => x !== item.parent);\n }\n }\n else if (item.children) {\n this._filteredItems = this.filteredItems.filter(x => x.parent !== item);\n }\n }\n _defaultSearchFn(search, opt) {\n const label = stripSpecialChars(opt.label).toLocaleLowerCase();\n return label.indexOf(search) > -1;\n }\n _getNextItemIndex(steps) {\n if (steps > 0) {\n return (this._markedIndex >= this._filteredItems.length - 1) ? 0 : (this._markedIndex + 1);\n }\n return (this._markedIndex <= 0) ? (this._filteredItems.length - 1) : (this._markedIndex - 1);\n }\n _stepToItem(steps) {\n if (this._filteredItems.length === 0 || this._filteredItems.every(x => x.disabled)) {\n return;\n }\n this._markedIndex = this._getNextItemIndex(steps);\n if (this.markedItem.disabled) {\n this._stepToItem(steps);\n }\n }\n _getLastMarkedIndex() {\n if (this._ngSelect.hideSelected) {\n return -1;\n }\n if (this._markedIndex > -1 && this.markedItem === undefined) {\n return -1;\n }\n const selectedIndex = this._filteredItems.indexOf(this.lastSelectedItem);\n if (this.lastSelectedItem && selectedIndex < 0) {\n return -1;\n }\n return Math.max(this.markedIndex, selectedIndex);\n }\n _groupBy(items, prop) {\n const groups = new Map();\n if (items.length === 0) {\n return groups;\n }\n // Check if items are already grouped by given key.\n if (Array.isArray(items[0].value[prop])) {\n for (const item of items) {\n const children = (item.value[prop] || []).map((x, index) => this.mapItem(x, index));\n groups.set(item, children);\n }\n return groups;\n }\n const isFnKey = isFunction(this._ngSelect.groupBy);\n const keyFn = (item) => {\n let key = isFnKey ? prop(item.value) : item.value[prop];\n return isDefined(key) ? key : undefined;\n };\n // Group items by key.\n for (const item of items) {\n let key = keyFn(item);\n const group = groups.get(key);\n if (group) {\n group.push(item);\n }\n else {\n groups.set(key, [item]);\n }\n }\n return groups;\n }\n _flatten(groups) {\n const isGroupByFn = isFunction(this._ngSelect.groupBy);\n const items = [];\n for (const key of Array.from(groups.keys())) {\n let i = items.length;\n if (key === undefined) {\n const withoutGroup = groups.get(undefined) || [];\n items.push(...withoutGroup.map(x => {\n x.index = i++;\n return x;\n }));\n continue;\n }\n const isObjectKey = isObject(key);\n const parent = {\n label: isObjectKey ? '' : String(key),\n children: undefined,\n parent: null,\n index: i++,\n disabled: !this._ngSelect.selectableGroup,\n htmlId: newId(),\n };\n const groupKey = isGroupByFn ? this._ngSelect.bindLabel : this._ngSelect.groupBy;\n const groupValue = this._ngSelect.groupValue || (() => {\n if (isObjectKey) {\n return key.value;\n }\n return { [groupKey]: key };\n });\n const children = groups.get(key).map(x => {\n x.parent = parent;\n x.children = undefined;\n x.index = i++;\n return x;\n });\n parent.children = children;\n parent.value = groupValue(key, children.map(x => x.value));\n items.push(parent);\n items.push(...children);\n }\n return items;\n }\n}\n\nvar KeyCode;\n(function (KeyCode) {\n KeyCode[KeyCode[\"Tab\"] = 9] = \"Tab\";\n KeyCode[KeyCode[\"Enter\"] = 13] = \"Enter\";\n KeyCode[KeyCode[\"Esc\"] = 27] = \"Esc\";\n KeyCode[KeyCode[\"Space\"] = 32] = \"Space\";\n KeyCode[KeyCode[\"ArrowUp\"] = 38] = \"ArrowUp\";\n KeyCode[KeyCode[\"ArrowDown\"] = 40] = \"ArrowDown\";\n KeyCode[KeyCode[\"Backspace\"] = 8] = \"Backspace\";\n})(KeyCode || (KeyCode = {}));\n\nclass NgDropdownPanelService {\n constructor() {\n this._dimensions = {\n itemHeight: 0,\n panelHeight: 0,\n itemsPerViewport: 0\n };\n }\n get dimensions() {\n return this._dimensions;\n }\n calculateItems(scrollPos, itemsLength, buffer) {\n const d = this._dimensions;\n const scrollHeight = d.itemHeight * itemsLength;\n const scrollTop = Math.max(0, scrollPos);\n const indexByScrollTop = scrollTop / scrollHeight * itemsLength;\n let end = Math.min(itemsLength, Math.ceil(indexByScrollTop) + (d.itemsPerViewport + 1));\n const maxStartEnd = end;\n const maxStart = Math.max(0, maxStartEnd - d.itemsPerViewport);\n let start = Math.min(maxStart, Math.floor(indexByScrollTop));\n let topPadding = d.itemHeight * Math.ceil(start) - (d.itemHeight * Math.min(start, buffer));\n topPadding = !isNaN(topPadding) ? topPadding : 0;\n start = !isNaN(start) ? start : -1;\n end = !isNaN(end) ? end : -1;\n start -= buffer;\n start = Math.max(0, start);\n end += buffer;\n end = Math.min(itemsLength, end);\n return {\n topPadding,\n scrollHeight,\n start,\n end\n };\n }\n setDimensions(itemHeight, panelHeight) {\n const itemsPerViewport = Math.max(1, Math.floor(panelHeight / itemHeight));\n this._dimensions = {\n itemHeight,\n panelHeight,\n itemsPerViewport\n };\n }\n getScrollTo(itemTop, itemHeight, lastScroll) {\n const { panelHeight } = this.dimensions;\n const itemBottom = itemTop + itemHeight;\n const top = lastScroll;\n const bottom = top + panelHeight;\n if (panelHeight >= itemBottom && lastScroll === itemTop) {\n return null;\n }\n if (itemBottom > bottom) {\n return top + itemBottom - bottom;\n }\n else if (itemTop <= top) {\n return itemTop;\n }\n return null;\n }\n}\nNgDropdownPanelService.ɵfac = function NgDropdownPanelService_Factory(t) { return new (t || NgDropdownPanelService)(); };\nNgDropdownPanelService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgDropdownPanelService, factory: NgDropdownPanelService.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgDropdownPanelService, [{\n type: Injectable\n }], function () { return []; }, null); })();\n\nconst CSS_POSITIONS = ['top', 'right', 'bottom', 'left'];\nconst SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;\nclass NgDropdownPanelComponent {\n constructor(_renderer, _zone, _panelService, _elementRef, _document) {\n this._renderer = _renderer;\n this._zone = _zone;\n this._panelService = _panelService;\n this._document = _document;\n this.items = [];\n this.position = 'auto';\n this.virtualScroll = false;\n this.filterValue = null;\n this.update = new EventEmitter();\n this.scroll = new EventEmitter();\n this.scrollToEnd = new EventEmitter();\n this.outsideClick = new EventEmitter();\n this._destroy$ = new Subject();\n this._scrollToEndFired = false;\n this._updateScrollHeight = false;\n this._lastScrollPosition = 0;\n this._dropdown = _elementRef.nativeElement;\n }\n get currentPosition() {\n return this._currentPosition;\n }\n get itemsLength() {\n return this._itemsLength;\n }\n set itemsLength(value) {\n if (value !== this._itemsLength) {\n this._itemsLength = value;\n this._onItemsLengthChanged();\n }\n }\n get _startOffset() {\n if (this.markedItem) {\n const { itemHeight, panelHeight } = this._panelService.dimensions;\n const offset = this.markedItem.index * itemHeight;\n return panelHeight > offset ? 0 : offset;\n }\n return 0;\n }\n ngOnInit() {\n this._select = this._dropdown.parentElement;\n this._virtualPadding = this.paddingElementRef.nativeElement;\n this._scrollablePanel = this.scrollElementRef.nativeElement;\n this._contentPanel = this.contentElementRef.nativeElement;\n this._handleScroll();\n this._handleOutsideClick();\n this._appendDropdown();\n this._setupMousedownListener();\n }\n ngOnChanges(changes) {\n if (changes.items) {\n const change = changes.items;\n this._onItemsChange(change.currentValue, change.firstChange);\n }\n }\n ngOnDestroy() {\n this._destroy$.next();\n this._destroy$.complete();\n this._destroy$.unsubscribe();\n if (this.appendTo) {\n this._renderer.removeChild(this._dropdown.parentNode, this._dropdown);\n }\n }\n scrollTo(option, startFromOption = false) {\n if (!option) {\n return;\n }\n const index = this.items.indexOf(option);\n if (index < 0 || index >= this.itemsLength) {\n return;\n }\n let scrollTo;\n if (this.virtualScroll) {\n const itemHeight = this._panelService.dimensions.itemHeight;\n scrollTo = this._panelService.getScrollTo(index * itemHeight, itemHeight, this._lastScrollPosition);\n }\n else {\n const item = this._dropdown.querySelector(`#${option.htmlId}`);\n const lastScroll = startFromOption ? item.offsetTop : this._lastScrollPosition;\n scrollTo = this._panelService.getScrollTo(item.offsetTop, item.clientHeight, lastScroll);\n }\n if (isDefined(scrollTo)) {\n this._scrollablePanel.scrollTop = scrollTo;\n }\n }\n scrollToTag() {\n const panel = this._scrollablePanel;\n panel.scrollTop = panel.scrollHeight - panel.clientHeight;\n }\n adjustPosition() {\n this._updateYPosition();\n }\n _handleDropdownPosition() {\n this._currentPosition = this._calculateCurrentPosition(this._dropdown);\n if (CSS_POSITIONS.includes(this._currentPosition)) {\n this._updateDropdownClass(this._currentPosition);\n }\n else {\n this._updateDropdownClass('bottom');\n }\n if (this.appendTo) {\n this._updateYPosition();\n }\n this._dropdown.style.opacity = '1';\n }\n _updateDropdownClass(currentPosition) {\n CSS_POSITIONS.forEach((position) => {\n const REMOVE_CSS_CLASS = `ng-select-${position}`;\n this._renderer.removeClass(this._dropdown, REMOVE_CSS_CLASS);\n this._renderer.removeClass(this._select, REMOVE_CSS_CLASS);\n });\n const ADD_CSS_CLASS = `ng-select-${currentPosition}`;\n this._renderer.addClass(this._dropdown, ADD_CSS_CLASS);\n this._renderer.addClass(this._select, ADD_CSS_CLASS);\n }\n _handleScroll() {\n this._zone.runOutsideAngular(() => {\n fromEvent(this.scrollElementRef.nativeElement, 'scroll')\n .pipe(takeUntil(this._destroy$), auditTime(0, SCROLL_SCHEDULER))\n .subscribe((e) => {\n const path = e.path || (e.composedPath && e.composedPath());\n const scrollTop = !path || path.length === 0 ? e.target.scrollTop : path[0].scrollTop;\n this._onContentScrolled(scrollTop);\n });\n });\n }\n _handleOutsideClick() {\n if (!this._document) {\n return;\n }\n this._zone.runOutsideAngular(() => {\n merge(fromEvent(this._document, 'touchstart', { capture: true }), fromEvent(this._document, 'mousedown', { capture: true })).pipe(takeUntil(this._destroy$))\n .subscribe($event => this._checkToClose($event));\n });\n }\n _checkToClose($event) {\n if (this._select.contains($event.target) || this._dropdown.contains($event.target)) {\n return;\n }\n const path = $event.path || ($event.composedPath && $event.composedPath());\n if ($event.target && $event.target.shadowRoot && path && path[0] && this._select.contains(path[0])) {\n return;\n }\n this._zone.run(() => this.outsideClick.emit());\n }\n _onItemsChange(items, firstChange) {\n this.items = items || [];\n this._scrollToEndFired = false;\n this.itemsLength = items.length;\n if (this.virtualScroll) {\n this._updateItemsRange(firstChange);\n }\n else {\n this._setVirtualHeight();\n this._updateItems(firstChange);\n }\n }\n _updateItems(firstChange) {\n this.update.emit(this.items);\n if (firstChange === false) {\n return;\n }\n this._zone.runOutsideAngular(() => {\n Promise.resolve().then(() => {\n const panelHeight = this._scrollablePanel.clientHeight;\n this._panelService.setDimensions(0, panelHeight);\n this._handleDropdownPosition();\n this.scrollTo(this.markedItem, firstChange);\n });\n });\n }\n _updateItemsRange(firstChange) {\n this._zone.runOutsideAngular(() => {\n this._measureDimensions().then(() => {\n if (firstChange) {\n this._renderItemsRange(this._startOffset);\n this._handleDropdownPosition();\n }\n else {\n this._renderItemsRange();\n }\n });\n });\n }\n _onContentScrolled(scrollTop) {\n if (this.virtualScroll) {\n this._renderItemsRange(scrollTop);\n }\n this._lastScrollPosition = scrollTop;\n this._fireScrollToEnd(scrollTop);\n }\n _updateVirtualHeight(height) {\n if (this._updateScrollHeight) {\n this._virtualPadding.style.height = `${height}px`;\n this._updateScrollHeight = false;\n }\n }\n _setVirtualHeight() {\n if (!this._virtualPadding) {\n return;\n }\n this._virtualPadding.style.height = `0px`;\n }\n _onItemsLengthChanged() {\n this._updateScrollHeight = true;\n }\n _renderItemsRange(scrollTop = null) {\n if (scrollTop && this._lastScrollPosition === scrollTop) {\n return;\n }\n scrollTop = scrollTop || this._scrollablePanel.scrollTop;\n const range = this._panelService.calculateItems(scrollTop, this.itemsLength, this.bufferAmount);\n this._updateVirtualHeight(range.scrollHeight);\n this._contentPanel.style.transform = `translateY(${range.topPadding}px)`;\n this._zone.run(() => {\n this.update.emit(this.items.slice(range.start, range.end));\n this.scroll.emit({ start: range.start, end: range.end });\n });\n if (isDefined(scrollTop) && this._lastScrollPosition === 0) {\n this._scrollablePanel.scrollTop = scrollTop;\n this._lastScrollPosition = scrollTop;\n }\n }\n _measureDimensions() {\n if (this._panelService.dimensions.itemHeight > 0 || this.itemsLength === 0) {\n return Promise.resolve(this._panelService.dimensions);\n }\n const [first] = this.items;\n this.update.emit([first]);\n return Promise.resolve().then(() => {\n const option = this._dropdown.querySelector(`#${first.htmlId}`);\n const optionHeight = option.clientHeight;\n this._virtualPadding.style.height = `${optionHeight * this.itemsLength}px`;\n const panelHeight = this._scrollablePanel.clientHeight;\n this._panelService.setDimensions(optionHeight, panelHeight);\n return this._panelService.dimensions;\n });\n }\n _fireScrollToEnd(scrollTop) {\n if (this._scrollToEndFired || scrollTop === 0) {\n return;\n }\n const padding = this.virtualScroll ?\n this._virtualPadding :\n this._contentPanel;\n if (scrollTop + this._dropdown.clientHeight >= padding.clientHeight - 1) {\n this._zone.run(() => this.scrollToEnd.emit());\n this._scrollToEndFired = true;\n }\n }\n _calculateCurrentPosition(dropdownEl) {\n if (this.position !== 'auto') {\n return this.position;\n }\n const selectRect = this._select.getBoundingClientRect();\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n const offsetTop = selectRect.top + window.pageYOffset;\n const height = selectRect.height;\n const dropdownHeight = dropdownEl.getBoundingClientRect().height;\n if (offsetTop + height + dropdownHeight > scrollTop + document.documentElement.clientHeight) {\n return 'top';\n }\n else {\n return 'bottom';\n }\n }\n _appendDropdown() {\n if (!this.appendTo) {\n return;\n }\n this._parent = document.querySelector(this.appendTo);\n if (!this._parent) {\n throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);\n }\n this._updateXPosition();\n this._parent.appendChild(this._dropdown);\n }\n _updateXPosition() {\n const select = this._select.getBoundingClientRect();\n const parent = this._parent.getBoundingClientRect();\n const offsetLeft = select.left - parent.left;\n this._dropdown.style.left = offsetLeft + 'px';\n this._dropdown.style.width = select.width + 'px';\n this._dropdown.style.minWidth = select.width + 'px';\n }\n _updateYPosition() {\n const select = this._select.getBoundingClientRect();\n const parent = this._parent.getBoundingClientRect();\n const delta = select.height;\n if (this._currentPosition === 'top') {\n const offsetBottom = parent.bottom - select.bottom;\n this._dropdown.style.bottom = offsetBottom + delta + 'px';\n this._dropdown.style.top = 'auto';\n }\n else if (this._currentPosition === 'bottom') {\n const offsetTop = select.top - parent.top;\n this._dropdown.style.top = offsetTop + delta + 'px';\n this._dropdown.style.bottom = 'auto';\n }\n }\n _setupMousedownListener() {\n this._zone.runOutsideAngular(() => {\n fromEvent(this._dropdown, 'mousedown')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event) => {\n const target = event.target;\n if (target.tagName === 'INPUT') {\n return;\n }\n event.preventDefault();\n });\n });\n }\n}\nNgDropdownPanelComponent.ɵfac = function NgDropdownPanelComponent_Factory(t) { return new (t || NgDropdownPanelComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(NgDropdownPanelService), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(DOCUMENT, 8)); };\nNgDropdownPanelComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgDropdownPanelComponent, selectors: [[\"ng-dropdown-panel\"]], viewQuery: function NgDropdownPanelComponent_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(_c0, 7, ElementRef);\n ɵngcc0.ɵɵviewQuery(_c1, 7, ElementRef);\n ɵngcc0.ɵɵviewQuery(_c2, 7, ElementRef);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.contentElementRef = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.scrollElementRef = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.paddingElementRef = _t.first);\n } }, inputs: { items: \"items\", position: \"position\", virtualScroll: \"virtualScroll\", filterValue: \"filterValue\", markedItem: \"markedItem\", appendTo: \"appendTo\", bufferAmount: \"bufferAmount\", headerTemplate: \"headerTemplate\", footerTemplate: \"footerTemplate\" }, outputs: { update: \"update\", scroll: \"scroll\", scrollToEnd: \"scrollToEnd\", outsideClick: \"outsideClick\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c4, decls: 9, vars: 6, consts: [[\"class\", \"ng-dropdown-header\", 4, \"ngIf\"], [1, \"ng-dropdown-panel-items\", \"scroll-host\"], [\"scroll\", \"\"], [\"padding\", \"\"], [\"content\", \"\"], [\"class\", \"ng-dropdown-footer\", 4, \"ngIf\"], [1, \"ng-dropdown-header\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [1, \"ng-dropdown-footer\"]], template: function NgDropdownPanelComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵtemplate(0, NgDropdownPanelComponent_div_0_Template, 2, 4, \"div\", 0);\n ɵngcc0.ɵɵelementStart(1, \"div\", 1, 2);\n ɵngcc0.ɵɵelement(3, \"div\", null, 3);\n ɵngcc0.ɵɵelementStart(5, \"div\", null, 4);\n ɵngcc0.ɵɵprojection(7);\n ɵngcc0.ɵɵelementEnd()();\n ɵngcc0.ɵɵtemplate(8, NgDropdownPanelComponent_div_8_Template, 2, 4, \"div\", 5);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.headerTemplate);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵclassProp(\"total-padding\", ctx.virtualScroll);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵclassProp(\"scrollable-content\", ctx.virtualScroll && ctx.items.length);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.footerTemplate);\n } }, dependencies: [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet], encapsulation: 2, changeDetection: 0 });\nNgDropdownPanelComponent.ctorParameters = () => [\n { type: Renderer2 },\n { type: NgZone },\n { type: NgDropdownPanelService },\n { type: ElementRef },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] }\n];\nNgDropdownPanelComponent.propDecorators = {\n items: [{ type: Input }],\n markedItem: [{ type: Input }],\n position: [{ type: Input }],\n appendTo: [{ type: Input }],\n bufferAmount: [{ type: Input }],\n virtualScroll: [{ type: Input }],\n headerTemplate: [{ type: Input }],\n footerTemplate: [{ type: Input }],\n filterValue: [{ type: Input }],\n update: [{ type: Output }],\n scroll: [{ type: Output }],\n scrollToEnd: [{ type: Output }],\n outsideClick: [{ type: Output }],\n contentElementRef: [{ type: ViewChild, args: ['content', { read: ElementRef, static: true },] }],\n scrollElementRef: [{ type: ViewChild, args: ['scroll', { read: ElementRef, static: true },] }],\n paddingElementRef: [{ type: ViewChild, args: ['padding', { read: ElementRef, static: true },] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgDropdownPanelComponent, [{\n type: Component,\n args: [{\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'ng-dropdown-panel',\n template: `\n <div *ngIf=\"headerTemplate\" class=\"ng-dropdown-header\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\" [ngTemplateOutletContext]=\"{ searchTerm: filterValue }\"></ng-container>\n </div>\n <div #scroll class=\"ng-dropdown-panel-items scroll-host\">\n <div #padding [class.total-padding]=\"virtualScroll\"></div>\n <div #content [class.scrollable-content]=\"virtualScroll && items.length\">\n <ng-content></ng-content>\n </div>\n </div>\n <div *ngIf=\"footerTemplate\" class=\"ng-dropdown-footer\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{ searchTerm: filterValue }\"></ng-container>\n </div>\n `\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.NgZone }, { type: NgDropdownPanelService }, { type: ɵngcc0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { items: [{\n type: Input\n }], position: [{\n type: Input\n }], virtualScroll: [{\n type: Input\n }], filterValue: [{\n type: Input\n }], update: [{\n type: Output\n }], scroll: [{\n type: Output\n }], scrollToEnd: [{\n type: Output\n }], outsideClick: [{\n type: Output\n }], markedItem: [{\n type: Input\n }], appendTo: [{\n type: Input\n }], bufferAmount: [{\n type: Input\n }], headerTemplate: [{\n type: Input\n }], footerTemplate: [{\n type: Input\n }], contentElementRef: [{\n type: ViewChild,\n args: ['content', { read: ElementRef, static: true }]\n }], scrollElementRef: [{\n type: ViewChild,\n args: ['scroll', { read: ElementRef, static: true }]\n }], paddingElementRef: [{\n type: ViewChild,\n args: ['padding', { read: ElementRef, static: true }]\n }] }); })();\n\nclass NgOptionComponent {\n constructor(elementRef) {\n this.elementRef = elementRef;\n this.stateChange$ = new Subject();\n this._disabled = false;\n }\n get disabled() { return this._disabled; }\n set disabled(value) { this._disabled = this._isDisabled(value); }\n get label() {\n return (this.elementRef.nativeElement.textContent || '').trim();\n }\n ngOnChanges(changes) {\n if (changes.disabled) {\n this.stateChange$.next({\n value: this.value,\n disabled: this._disabled\n });\n }\n }\n ngAfterViewChecked() {\n if (this.label !== this._previousLabel) {\n this._previousLabel = this.label;\n this.stateChange$.next({\n value: this.value,\n disabled: this._disabled,\n label: this.elementRef.nativeElement.innerHTML\n });\n }\n }\n ngOnDestroy() {\n this.stateChange$.complete();\n }\n _isDisabled(value) {\n return value != null && `${value}` !== 'false';\n }\n}\nNgOptionComponent.ɵfac = function NgOptionComponent_Factory(t) { return new (t || NgOptionComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgOptionComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgOptionComponent, selectors: [[\"ng-option\"]], inputs: { disabled: \"disabled\", value: \"value\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c4, decls: 1, vars: 0, template: function NgOptionComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵprojection(0);\n } }, encapsulation: 2, changeDetection: 0 });\nNgOptionComponent.ctorParameters = () => [\n { type: ElementRef }\n];\nNgOptionComponent.propDecorators = {\n value: [{ type: Input }],\n disabled: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgOptionComponent, [{\n type: Component,\n args: [{\n selector: 'ng-option',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content></ng-content>`\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }]; }, { disabled: [{\n type: Input\n }], value: [{\n type: Input\n }] }); })();\n\nclass NgSelectConfig {\n constructor() {\n this.notFoundText = 'No items found';\n this.typeToSearchText = 'Type to search';\n this.addTagText = 'Add item';\n this.loadingText = 'Loading...';\n this.clearAllText = 'Clear all';\n this.disableVirtualScroll = true;\n this.openOnEnter = true;\n this.appearance = 'underline';\n }\n}\nNgSelectConfig.ɵfac = function NgSelectConfig_Factory(t) { return new (t || NgSelectConfig)(); };\nNgSelectConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgSelectConfig_Factory() { return new NgSelectConfig(); }, token: NgSelectConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSelectConfig, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return []; }, null); })();\n\nconst SELECTION_MODEL_FACTORY = new InjectionToken('ng-select-selection-model');\nclass NgSelectComponent {\n constructor(classes, autoFocus, config, newSelectionModel, _elementRef, _cd, _console) {\n this.classes = classes;\n this.autoFocus = autoFocus;\n this.config = config;\n this._cd = _cd;\n this._console = _console;\n this.markFirst = true;\n this.dropdownPosition = 'auto';\n this.loading = false;\n this.closeOnSelect = true;\n this.hideSelected = false;\n this.selectOnTab = false;\n this.bufferAmount = 4;\n this.selectableGroup = false;\n this.selectableGroupAsModel = true;\n this.searchFn = null;\n this.trackByFn = null;\n this.clearOnBackspace = true;\n this.labelForId = null;\n this.inputAttrs = {};\n this.readonly = false;\n this.searchWhileComposing = true;\n this.minTermLength = 0;\n this.editableSearchTerm = false;\n this.keyDownFn = (_) => true;\n this.multiple = false;\n this.addTag = false;\n this.searchable = true;\n this.clearable = true;\n this.isOpen = false;\n // output events\n this.blurEvent = new EventEmitter();\n this.focusEvent = new EventEmitter();\n this.changeEvent = new EventEmitter();\n this.openEvent = new EventEmitter();\n this.closeEvent = new EventEmitter();\n this.searchEvent = new EventEmitter();\n this.clearEvent = new EventEmitter();\n this.addEvent = new EventEmitter();\n this.removeEvent = new EventEmitter();\n this.scroll = new EventEmitter();\n this.scrollToEnd = new EventEmitter();\n this.viewPortItems = [];\n this.searchTerm = null;\n this.dropdownId = newId();\n this.escapeHTML = true;\n this.useDefaultClass = true;\n this._items = [];\n this._defaultLabel = 'label';\n this._pressedKeys = [];\n this._isComposing = false;\n this._destroy$ = new Subject();\n this._keyPress$ = new Subject();\n this._onChange = (_) => { };\n this._onTouched = () => { };\n this.clearItem = (item) => {\n const option = this.selectedItems.find(x => x.value === item);\n this.unselect(option);\n };\n this.trackByOption = (_, item) => {\n if (this.trackByFn) {\n return this.trackByFn(item.value);\n }\n return item;\n };\n this._mergeGlobalConfig(config);\n this.itemsList = new ItemsList(this, newSelectionModel());\n this.element = _elementRef.nativeElement;\n }\n get items() { return this._items; }\n ;\n set items(value) {\n if (value === null) {\n value = [];\n }\n this._itemsAreUsed = true;\n this._items = value;\n }\n ;\n get compareWith() { return this._compareWith; }\n set compareWith(fn) {\n if (fn !== undefined && fn !== null && !isFunction(fn)) {\n throw Error('`compareWith` must be a function.');\n }\n this._compareWith = fn;\n }\n get clearSearchOnAdd() {\n if (isDefined(this._clearSearchOnAdd)) {\n return this._clearSearchOnAdd;\n }\n else if (isDefined(this.config.clearSearchOnAdd)) {\n return this.config.clearSearchOnAdd;\n }\n return this.closeOnSelect;\n }\n ;\n set clearSearchOnAdd(value) {\n this._clearSearchOnAdd = value;\n }\n ;\n get disabled() { return this.readonly || this._disabled; }\n ;\n get filtered() { return (!!this.searchTerm && this.searchable || this._isComposing); }\n ;\n get _editableSearchTerm() {\n return this.editableSearchTerm && !this.multiple;\n }\n get selectedItems() {\n return this.itemsList.selectedItems;\n }\n get selectedValues() {\n return this.selectedItems.map(x => x.value);\n }\n get hasValue() {\n return this.selectedItems.length > 0;\n }\n get currentPanelPosition() {\n if (this.dropdownPanel) {\n return this.dropdownPanel.currentPosition;\n }\n return undefined;\n }\n ngOnInit() {\n this._handleKeyPresses();\n this._setInputAttributes();\n }\n ngOnChanges(changes) {\n if (changes.multiple) {\n this.itemsList.clearSelected();\n }\n if (changes.items) {\n this._setItems(changes.items.currentValue || []);\n }\n if (changes.isOpen) {\n this._manualOpen = isDefined(changes.isOpen.currentValue);\n }\n }\n ngAfterViewInit() {\n if (!this._itemsAreUsed) {\n this.escapeHTML = false;\n this._setItemsFromNgOptions();\n }\n if (isDefined(this.autoFocus)) {\n this.focus();\n }\n }\n ngOnDestroy() {\n this._destroy$.next();\n this._destroy$.complete();\n }\n handleKeyDown($event) {\n const keyCode = KeyCode[$event.which];\n if (keyCode) {\n if (this.keyDownFn($event) === false) {\n return;\n }\n this.handleKeyCode($event);\n }\n else if ($event.key && $event.key.length === 1) {\n this._keyPress$.next($event.key.toLocaleLowerCase());\n }\n }\n handleKeyCode($event) {\n switch ($event.which) {\n case KeyCode.ArrowDown:\n this._handleArrowDown($event);\n break;\n case KeyCode.ArrowUp:\n this._handleArrowUp($event);\n break;\n case KeyCode.Space:\n this._handleSpace($event);\n break;\n case KeyCode.Enter:\n this._handleEnter($event);\n break;\n case KeyCode.Tab:\n this._handleTab($event);\n break;\n case KeyCode.Esc:\n this.close();\n $event.preventDefault();\n break;\n case KeyCode.Backspace:\n this._handleBackspace();\n break;\n }\n }\n handleMousedown($event) {\n const target = $event.target;\n if (target.tagName !== 'INPUT') {\n $event.preventDefault();\n }\n if (target.classList.contains('ng-clear-wrapper')) {\n this.handleClearClick();\n return;\n }\n if (target.classList.contains('ng-arrow-wrapper')) {\n this.handleArrowClick();\n return;\n }\n if (target.classList.contains('ng-value-icon')) {\n return;\n }\n if (!this.focused) {\n this.focus();\n }\n if (this.searchable) {\n this.open();\n }\n else {\n this.toggle();\n }\n }\n handleArrowClick() {\n if (this.isOpen) {\n this.close();\n }\n else {\n this.open();\n }\n }\n handleClearClick() {\n if (this.hasValue) {\n this.itemsList.clearSelected(true);\n this._updateNgModel();\n }\n this._clearSearch();\n this.focus();\n this.clearEvent.emit();\n this._onSelectionChanged();\n }\n clearModel() {\n if (!this.clearable) {\n return;\n }\n this.itemsList.clearSelected();\n this._updateNgModel();\n }\n writeValue(value) {\n this.itemsList.clearSelected();\n this._handleWriteValue(value);\n this._cd.markForCheck();\n }\n registerOnChange(fn) {\n this._onChange = fn;\n }\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n setDisabledState(state) {\n this._disabled = state;\n this._cd.markForCheck();\n }\n toggle() {\n if (!this.isOpen) {\n this.open();\n }\n else {\n this.close();\n }\n }\n open() {\n if (this.disabled || this.isOpen || this.itemsList.maxItemsSelected || this._manualOpen) {\n return;\n }\n if (!this._isTypeahead && !this.addTag && this.itemsList.noItemsToSelect) {\n return;\n }\n this.isOpen = true;\n this.itemsList.markSelectedOrDefault(this.markFirst);\n this.openEvent.emit();\n if (!this.searchTerm) {\n this.focus();\n }\n this.detectChanges();\n }\n close() {\n if (!this.isOpen || this._manualOpen) {\n return;\n }\n this.isOpen = false;\n this._isComposing = false;\n if (!this._editableSearchTerm) {\n this._clearSearch();\n }\n else {\n this.itemsList.resetFilteredItems();\n }\n this.itemsList.unmarkItem();\n this._onTouched();\n this.closeEvent.emit();\n this._cd.markForCheck();\n }\n toggleItem(item) {\n if (!item || item.disabled || this.disabled) {\n return;\n }\n if (this.multiple && item.selected) {\n this.unselect(item);\n }\n else {\n this.select(item);\n }\n if (this._editableSearchTerm) {\n this._setSearchTermFromItems();\n }\n this._onSelectionChanged();\n }\n select(item) {\n if (!item.selected) {\n this.itemsList.select(item);\n if (this.clearSearchOnAdd && !this._editableSearchTerm) {\n this._clearSearch();\n }\n this._updateNgModel();\n if (this.multiple) {\n this.addEvent.emit(item.value);\n }\n }\n if (this.closeOnSelect || this.itemsList.noItemsToSelect) {\n this.close();\n }\n }\n focus() {\n this.searchInput.nativeElement.focus();\n }\n blur() {\n this.searchInput.nativeElement.blur();\n }\n unselect(item) {\n if (!item) {\n return;\n }\n this.itemsList.unselect(item);\n this.focus();\n this._updateNgModel();\n this.removeEvent.emit(item);\n }\n selectTag() {\n let tag;\n if (isFunction(this.addTag)) {\n tag = this.addTag(this.searchTerm);\n }\n else {\n tag = this._primitive ? this.searchTerm : { [this.bindLabel]: this.searchTerm };\n }\n const handleTag = (item) => this._isTypeahead || !this.isOpen ? this.itemsList.mapItem(item, null) : this.itemsList.addItem(item);\n if (isPromise(tag)) {\n tag.then(item => this.select(handleTag(item))).catch(() => { });\n }\n else if (tag) {\n this.select(handleTag(tag));\n }\n }\n showClear() {\n return this.clearable && (this.hasValue || this.searchTerm) && !this.disabled;\n }\n get showAddTag() {\n if (!this._validTerm) {\n return false;\n }\n const term = this.searchTerm.toLowerCase().trim();\n return this.addTag &&\n (!this.itemsList.filteredItems.some(x => x.label.toLowerCase() === term) &&\n (!this.hideSelected && this.isOpen || !this.selectedItems.some(x => x.label.toLowerCase() === term))) &&\n !this.loading;\n }\n showNoItemsFound() {\n const empty = this.itemsList.filteredItems.length === 0;\n return ((empty && !this._isTypeahead && !this.loading) ||\n (empty && this._isTypeahead && this._validTerm && !this.loading)) &&\n !this.showAddTag;\n }\n showTypeToSearch() {\n const empty = this.itemsList.filteredItems.length === 0;\n return empty && this._isTypeahead && !this._validTerm && !this.loading;\n }\n onCompositionStart() {\n this._isComposing = true;\n }\n onCompositionEnd(term) {\n this._isComposing = false;\n if (this.searchWhileComposing) {\n return;\n }\n this.filter(term);\n }\n filter(term) {\n if (this._isComposing && !this.searchWhileComposing) {\n return;\n }\n this.searchTerm = term;\n if (this._isTypeahead && (this._validTerm || this.minTermLength === 0)) {\n this.typeahead.next(term);\n }\n if (!this._isTypeahead) {\n this.itemsList.filter(this.searchTerm);\n if (this.isOpen) {\n this.itemsList.markSelectedOrDefault(this.markFirst);\n }\n }\n this.searchEvent.emit({ term, items: this.itemsList.filteredItems.map(x => x.value) });\n this.open();\n }\n onInputFocus($event) {\n if (this.focused) {\n return;\n }\n if (this._editableSearchTerm) {\n this._setSearchTermFromItems();\n }\n this.element.classList.add('ng-select-focused');\n this.focusEvent.emit($event);\n this.focused = true;\n }\n onInputBlur($event) {\n this.element.classList.remove('ng-select-focused');\n this.blurEvent.emit($event);\n if (!this.isOpen && !this.disabled) {\n this._onTouched();\n }\n if (this._editableSearchTerm) {\n this._setSearchTermFromItems();\n }\n this.focused = false;\n }\n onItemHover(item) {\n if (item.disabled) {\n return;\n }\n this.itemsList.markItem(item);\n }\n detectChanges() {\n if (!this._cd.destroyed) {\n this._cd.detectChanges();\n }\n }\n _setSearchTermFromItems() {\n const selected = this.selectedItems && this.selectedItems[0];\n this.searchTerm = (selected && selected.label) || null;\n }\n _setItems(items) {\n const firstItem = items[0];\n this.bindLabel = this.bindLabel || this._defaultLabel;\n this._primitive = isDefined(firstItem) ? !isObject(firstItem) : this._primitive || this.bindLabel === this._defaultLabel;\n this.itemsList.setItems(items);\n if (items.length > 0 && this.hasValue) {\n this.itemsList.mapSelectedItems();\n }\n if (this.isOpen && isDefined(this.searchTerm) && !this._isTypeahead) {\n this.itemsList.filter(this.searchTerm);\n }\n if (this._isTypeahead || this.isOpen) {\n this.itemsList.markSelectedOrDefault(this.markFirst);\n }\n }\n _setItemsFromNgOptions() {\n const mapNgOptions = (options) => {\n this.items = options.map(option => ({\n $ngOptionValue: option.value,\n $ngOptionLabel: option.elementRef.nativeElement.innerHTML,\n disabled: option.disabled\n }));\n this.itemsList.setItems(this.items);\n if (this.hasValue) {\n this.itemsList.mapSelectedItems();\n }\n this.detectChanges();\n };\n const handleOptionChange = () => {\n const changedOrDestroyed = merge(this.ngOptions.changes, this._destroy$);\n merge(...this.ngOptions.map(option => option.stateChange$))\n .pipe(takeUntil(changedOrDestroyed))\n .subscribe(option => {\n const item = this.itemsList.findItem(option.value);\n item.disabled = option.disabled;\n item.label = option.label || item.label;\n this._cd.detectChanges();\n });\n };\n this.ngOptions.changes\n .pipe(startWith(this.ngOptions), takeUntil(this._destroy$))\n .subscribe(options => {\n this.bindLabel = this._defaultLabel;\n mapNgOptions(options);\n handleOptionChange();\n });\n }\n _isValidWriteValue(value) {\n if (!isDefined(value) || (this.multiple && value === '') || Array.isArray(value) && value.length === 0) {\n return false;\n }\n const validateBinding = (item) => {\n if (!isDefined(this.compareWith) && isObject(item) && this.bindValue) {\n this._console.warn(`Setting object(${JSON.stringify(item)}) as your model with bindValue is not allowed unless [compareWith] is used.`);\n return false;\n }\n return true;\n };\n if (this.multiple) {\n if (!Array.isArray(value)) {\n this._console.warn('Multiple select ngModel should be array.');\n return false;\n }\n return value.every(item => validateBinding(item));\n }\n else {\n return validateBinding(value);\n }\n }\n _handleWriteValue(ngModel) {\n if (!this._isValidWriteValue(ngModel)) {\n return;\n }\n const select = (val) => {\n let item = this.itemsList.findItem(val);\n if (item) {\n this.itemsList.select(item);\n }\n else {\n const isValObject = isObject(val);\n const isPrimitive = !isValObject && !this.bindValue;\n if ((isValObject || isPrimitive)) {\n this.itemsList.select(this.itemsList.mapItem(val, null));\n }\n else if (this.bindValue) {\n item = {\n [this.bindLabel]: null,\n [this.bindValue]: val\n };\n this.itemsList.select(this.itemsList.mapItem(item, null));\n }\n }\n };\n if (this.multiple) {\n ngModel.forEach(item => select(item));\n }\n else {\n select(ngModel);\n }\n }\n _handleKeyPresses() {\n if (this.searchable) {\n return;\n }\n this._keyPress$\n .pipe(takeUntil(this._destroy$), tap(letter => this._pressedKeys.push(letter)), debounceTime(200), filter(() => this._pressedKeys.length > 0), map(() => this._pressedKeys.join('')))\n .subscribe(term => {\n const item = this.itemsList.findByLabel(term);\n if (item) {\n if (this.isOpen) {\n this.itemsList.markItem(item);\n this._scrollToMarked();\n this._cd.markForCheck();\n }\n else {\n this.select(item);\n }\n }\n this._pressedKeys = [];\n });\n }\n _setInputAttributes() {\n const input = this.searchInput.nativeElement;\n const attributes = Object.assign({ type: 'text', autocorrect: 'off', autocapitalize: 'off', autocomplete: this.labelForId ? 'off' : this.dropdownId }, this.inputAttrs);\n for (const key of Object.keys(attributes)) {\n input.setAttribute(key, attributes[key]);\n }\n }\n _updateNgModel() {\n const model = [];\n for (const item of this.selectedItems) {\n if (this.bindValue) {\n let value = null;\n if (item.children) {\n const groupKey = this.groupValue ? this.bindValue : this.groupBy;\n value = item.value[groupKey || this.groupBy];\n }\n else {\n value = this.itemsList.resolveNested(item.value, this.bindValue);\n }\n model.push(value);\n }\n else {\n model.push(item.value);\n }\n }\n const selected = this.selectedItems.map(x => x.value);\n if (this.multiple) {\n this._onChange(model);\n this.changeEvent.emit(selected);\n }\n else {\n this._onChange(isDefined(model[0]) ? model[0] : null);\n this.changeEvent.emit(selected[0]);\n }\n this._cd.markForCheck();\n }\n _clearSearch() {\n if (!this.searchTerm) {\n return;\n }\n this._changeSearch(null);\n this.itemsList.resetFilteredItems();\n }\n _changeSearch(searchTerm) {\n this.searchTerm = searchTerm;\n if (this._isTypeahead) {\n this.typeahead.next(searchTerm);\n }\n }\n _scrollToMarked() {\n if (!this.isOpen || !this.dropdownPanel) {\n return;\n }\n this.dropdownPanel.scrollTo(this.itemsList.markedItem);\n }\n _scrollToTag() {\n if (!this.isOpen || !this.dropdownPanel) {\n return;\n }\n this.dropdownPanel.scrollToTag();\n }\n _onSelectionChanged() {\n if (this.isOpen && this.multiple && this.appendTo) {\n // Make sure items are rendered.\n this._cd.detectChanges();\n this.dropdownPanel.adjustPosition();\n }\n }\n _handleTab($event) {\n if (this.isOpen === false && !this.addTag) {\n return;\n }\n if (this.selectOnTab) {\n if (this.itemsList.markedItem) {\n this.toggleItem(this.itemsList.markedItem);\n $event.preventDefault();\n }\n else if (this.showAddTag) {\n this.selectTag();\n $event.preventDefault();\n }\n else {\n this.close();\n }\n }\n else {\n this.close();\n }\n }\n _handleEnter($event) {\n if (this.isOpen || this._manualOpen) {\n if (this.itemsList.markedItem) {\n this.toggleItem(this.itemsList.markedItem);\n }\n else if (this.showAddTag) {\n this.selectTag();\n }\n }\n else if (this.openOnEnter) {\n this.open();\n }\n else {\n return;\n }\n $event.preventDefault();\n }\n _handleSpace($event) {\n if (this.isOpen || this._manualOpen) {\n return;\n }\n this.open();\n $event.preventDefault();\n }\n _handleArrowDown($event) {\n if (this._nextItemIsTag(+1)) {\n this.itemsList.unmarkItem();\n this._scrollToTag();\n }\n else {\n this.itemsList.markNextItem();\n this._scrollToMarked();\n }\n this.open();\n $event.preventDefault();\n }\n _handleArrowUp($event) {\n if (!this.isOpen) {\n return;\n }\n if (this._nextItemIsTag(-1)) {\n this.itemsList.unmarkItem();\n this._scrollToTag();\n }\n else {\n this.itemsList.markPreviousItem();\n this._scrollToMarked();\n }\n $event.preventDefault();\n }\n _nextItemIsTag(nextStep) {\n const nextIndex = this.itemsList.markedIndex + nextStep;\n return this.addTag && this.searchTerm\n && this.itemsList.markedItem\n && (nextIndex < 0 || nextIndex === this.itemsList.filteredItems.length);\n }\n _handleBackspace() {\n if (this.searchTerm || !this.clearable || !this.clearOnBackspace || !this.hasValue) {\n return;\n }\n if (this.multiple) {\n this.unselect(this.itemsList.lastSelectedItem);\n }\n else {\n this.clearModel();\n }\n }\n get _isTypeahead() {\n return this.typeahead && this.typeahead.observers.length > 0;\n }\n get _validTerm() {\n const term = this.searchTerm && this.searchTerm.trim();\n return term && term.length >= this.minTermLength;\n }\n _mergeGlobalConfig(config) {\n this.placeholder = this.placeholder || config.placeholder;\n this.notFoundText = this.notFoundText || config.notFoundText;\n this.typeToSearchText = this.typeToSearchText || config.typeToSearchText;\n this.addTagText = this.addTagText || config.addTagText;\n this.loadingText = this.loadingText || config.loadingText;\n this.clearAllText = this.clearAllText || config.clearAllText;\n this.virtualScroll = isDefined(this.virtualScroll)\n ? this.virtualScroll\n : isDefined(config.disableVirtualScroll) ? !config.disableVirtualScroll : false;\n this.openOnEnter = isDefined(this.openOnEnter) ? this.openOnEnter : config.openOnEnter;\n this.appendTo = this.appendTo || config.appendTo;\n this.bindValue = this.bindValue || config.bindValue;\n this.bindLabel = this.bindLabel || config.bindLabel;\n this.appearance = this.appearance || config.appearance;\n }\n}\nNgSelectComponent.ɵfac = function NgSelectComponent_Factory(t) { return new (t || NgSelectComponent)(ɵngcc0.ɵɵinjectAttribute('class'), ɵngcc0.ɵɵinjectAttribute('autofocus'), ɵngcc0.ɵɵdirectiveInject(NgSelectConfig), ɵngcc0.ɵɵdirectiveInject(SELECTION_MODEL_FACTORY), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ConsoleService)); };\nNgSelectComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgSelectComponent, selectors: [[\"ng-select\"]], contentQueries: function NgSelectComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgOptionTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgOptgroupTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgLabelTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgMultiLabelTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgHeaderTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgFooterTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgNotFoundTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgTypeToSearchTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgLoadingTextTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgTagTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgLoadingSpinnerTemplateDirective, 5, TemplateRef);\n ɵngcc0.ɵɵcontentQuery(dirIndex, NgOptionComponent, 5);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.optionTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.optgroupTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.labelTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.multiLabelTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.headerTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.footerTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.notFoundTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.typeToSearchTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.loadingTextTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tagTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.loadingSpinnerTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.ngOptions = _t);\n } }, viewQuery: function NgSelectComponent_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(NgDropdownPanelComponent, 5);\n ɵngcc0.ɵɵviewQuery(_c5, 7);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.dropdownPanel = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.searchInput = _t.first);\n } }, hostVars: 20, hostBindings: function NgSelectComponent_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"keydown\", function NgSelectComponent_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); });\n } if (rf & 2) {\n ɵngcc0.ɵɵclassProp(\"ng-select\", ctx.useDefaultClass)(\"ng-select-single\", !ctx.multiple)(\"ng-select-multiple\", ctx.multiple)(\"ng-select-taggable\", ctx.addTag)(\"ng-select-searchable\", ctx.searchable)(\"ng-select-clearable\", ctx.clearable)(\"ng-select-opened\", ctx.isOpen)(\"ng-select-disabled\", ctx.disabled)(\"ng-select-filtered\", ctx.filtered)(\"ng-select-typeahead\", ctx.typeahead);\n } }, inputs: { markFirst: \"markFirst\", dropdownPosition: \"dropdownPosition\", loading: \"loading\", closeOnSelect: \"closeOnSelect\", hideSelected: \"hideSelected\", selectOnTab: \"selectOnTab\", bufferAmount: \"bufferAmount\", selectableGroup: \"selectableGroup\", selectableGroupAsModel: \"selectableGroupAsModel\", searchFn: \"searchFn\", trackByFn: \"trackByFn\", clearOnBackspace: \"clearOnBackspace\", labelForId: \"labelForId\", inputAttrs: \"inputAttrs\", readonly: \"readonly\", searchWhileComposing: \"searchWhileComposing\", minTermLength: \"minTermLength\", editableSearchTerm: \"editableSearchTerm\", keyDownFn: \"keyDownFn\", multiple: \"multiple\", addTag: \"addTag\", searchable: \"searchable\", clearable: \"clearable\", isOpen: \"isOpen\", items: \"items\", compareWith: \"compareWith\", clearSearchOnAdd: \"clearSearchOnAdd\", bindLabel: \"bindLabel\", placeholder: \"placeholder\", notFoundText: \"notFoundText\", typeToSearchText: \"typeToSearchText\", addTagText: \"addTagText\", loadingText: \"loadingText\", clearAllText: \"clearAllText\", virtualScroll: \"virtualScroll\", openOnEnter: \"openOnEnter\", appendTo: \"appendTo\", bindValue: \"bindValue\", appearance: \"appearance\", maxSelectedItems: \"maxSelectedItems\", groupBy: \"groupBy\", groupValue: \"groupValue\", tabIndex: \"tabIndex\", typeahead: \"typeahead\" }, outputs: { blurEvent: \"blur\", focusEvent: \"focus\", changeEvent: \"change\", openEvent: \"open\", closeEvent: \"close\", searchEvent: \"search\", clearEvent: \"clear\", addEvent: \"add\", removeEvent: \"remove\", scroll: \"scroll\", scrollToEnd: \"scrollToEnd\" }, features: [ɵngcc0.ɵɵProvidersFeature([{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgSelectComponent),\n multi: true\n }, NgDropdownPanelService]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 14, vars: 19, consts: [[1, \"ng-select-container\", 3, \"mousedown\"], [1, \"ng-value-container\"], [1, \"ng-placeholder\"], [4, \"ngIf\"], [\"role\", \"combobox\", \"aria-haspopup\", \"listbox\", 1, \"ng-input\"], [\"aria-autocomplete\", \"list\", 3, \"readOnly\", \"disabled\", \"value\", \"input\", \"compositionstart\", \"compositionend\", \"focus\", \"blur\", \"change\"], [\"searchInput\", \"\"], [\"class\", \"ng-clear-wrapper\", 3, \"title\", 4, \"ngIf\"], [1, \"ng-arrow-wrapper\"], [1, \"ng-arrow\"], [\"class\", \"ng-dropdown-panel\", \"role\", \"listbox\", \"aria-label\", \"Options list\", 3, \"virtualScroll\", \"bufferAmount\", \"appendTo\", \"position\", \"headerTemplate\", \"footerTemplate\", \"filterValue\", \"items\", \"markedItem\", \"ng-select-multiple\", \"ngClass\", \"id\", \"update\", \"scroll\", \"scrollToEnd\", \"outsideClick\", 4, \"ngIf\"], [\"class\", \"ng-value\", 3, \"ng-value-disabled\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [1, \"ng-value\"], [\"defaultLabelTemplate\", \"\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"aria-hidden\", \"true\", 1, \"ng-value-icon\", \"left\", 3, \"click\"], [1, \"ng-value-label\", 3, \"ngItemLabel\", \"escape\"], [\"defaultLoadingSpinnerTemplate\", \"\"], [3, \"ngTemplateOutlet\"], [1, \"ng-spinner-loader\"], [1, \"ng-clear-wrapper\", 3, \"title\"], [\"aria-hidden\", \"true\", 1, \"ng-clear\"], [\"role\", \"listbox\", \"aria-label\", \"Options list\", 1, \"ng-dropdown-panel\", 3, \"virtualScroll\", \"bufferAmount\", \"appendTo\", \"position\", \"headerTemplate\", \"footerTemplate\", \"filterValue\", \"items\", \"markedItem\", \"ngClass\", \"id\", \"update\", \"scroll\", \"scrollToEnd\", \"outsideClick\"], [\"class\", \"ng-option\", 3, \"ng-option-disabled\", \"ng-option-selected\", \"ng-optgroup\", \"ng-option\", \"ng-option-child\", \"ng-option-marked\", \"click\", \"mouseover\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"class\", \"ng-option\", \"role\", \"option\", 3, \"ng-option-marked\", \"mouseover\", \"click\", 4, \"ngIf\"], [1, \"ng-option\", 3, \"click\", \"mouseover\"], [\"defaultOptionTemplate\", \"\"], [1, \"ng-option-label\", 3, \"ngItemLabel\", \"escape\"], [\"role\", \"option\", 1, \"ng-option\", 3, \"mouseover\", \"click\"], [\"defaultTagTemplate\", \"\"], [1, \"ng-tag-label\"], [\"defaultNotFoundTemplate\", \"\"], [1, \"ng-option\", \"ng-option-disabled\"], [\"defaultTypeToSearchTemplate\", \"\"], [\"defaultLoadingTextTemplate\", \"\"]], template: function NgSelectComponent_Template(rf, ctx) { if (rf & 1) {\n const _r52 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 0);\n ɵngcc0.ɵɵlistener(\"mousedown\", function NgSelectComponent_Template_div_mousedown_0_listener($event) { return ctx.handleMousedown($event); });\n ɵngcc0.ɵɵelementStart(1, \"div\", 1)(2, \"div\", 2);\n ɵngcc0.ɵɵtext(3);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtemplate(4, NgSelectComponent_ng_container_4_Template, 2, 2, \"ng-container\", 3);\n ɵngcc0.ɵɵtemplate(5, NgSelectComponent_5_Template, 1, 5, null, 3);\n ɵngcc0.ɵɵelementStart(6, \"div\", 4)(7, \"input\", 5, 6);\n ɵngcc0.ɵɵlistener(\"input\", function NgSelectComponent_Template_input_input_7_listener() { ɵngcc0.ɵɵrestoreView(_r52); const _r2 = ɵngcc0.ɵɵreference(8); return ɵngcc0.ɵɵresetView(ctx.filter(_r2.value)); })(\"compositionstart\", function NgSelectComponent_Template_input_compositionstart_7_listener() { return ctx.onCompositionStart(); })(\"compositionend\", function NgSelectComponent_Template_input_compositionend_7_listener() { ɵngcc0.ɵɵrestoreView(_r52); const _r2 = ɵngcc0.ɵɵreference(8); return ɵngcc0.ɵɵresetView(ctx.onCompositionEnd(_r2.value)); })(\"focus\", function NgSelectComponent_Template_input_focus_7_listener($event) { return ctx.onInputFocus($event); })(\"blur\", function NgSelectComponent_Template_input_blur_7_listener($event) { return ctx.onInputBlur($event); })(\"change\", function NgSelectComponent_Template_input_change_7_listener($event) { return $event.stopPropagation(); });\n ɵngcc0.ɵɵelementEnd()()();\n ɵngcc0.ɵɵtemplate(9, NgSelectComponent_ng_container_9_Template, 4, 1, \"ng-container\", 3);\n ɵngcc0.ɵɵtemplate(10, NgSelectComponent_span_10_Template, 3, 1, \"span\", 7);\n ɵngcc0.ɵɵelementStart(11, \"span\", 8);\n ɵngcc0.ɵɵelement(12, \"span\", 9);\n ɵngcc0.ɵɵelementEnd()();\n ɵngcc0.ɵɵtemplate(13, NgSelectComponent_ng_dropdown_panel_13_Template, 7, 19, \"ng-dropdown-panel\", 10);\n } if (rf & 2) {\n ɵngcc0.ɵɵclassProp(\"ng-appearance-outline\", ctx.appearance === \"outline\")(\"ng-has-value\", ctx.hasValue);\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵtextInterpolate(ctx.placeholder);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", (!ctx.multiLabelTemplate || !ctx.multiple) && ctx.selectedItems.length > 0);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.multiple && ctx.multiLabelTemplate && ctx.selectedValues.length > 0);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵattribute(\"aria-expanded\", ctx.isOpen)(\"aria-owns\", ctx.isOpen ? ctx.dropdownId : null);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"readOnly\", !ctx.searchable || ctx.itemsList.maxItemsSelected)(\"disabled\", ctx.disabled)(\"value\", ctx.searchTerm ? ctx.searchTerm : \"\");\n ɵngcc0.ɵɵattribute(\"id\", ctx.labelForId)(\"tabindex\", ctx.tabIndex)(\"aria-activedescendant\", ctx.isOpen ? ctx.itemsList == null ? null : ctx.itemsList.markedItem == null ? null : ctx.itemsList.markedItem.htmlId : null)(\"aria-controls\", ctx.isOpen ? ctx.dropdownId : null);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.loading);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.showClear());\n ɵngcc0.ɵɵadvance(3);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.isOpen);\n } }, dependencies: [ɵngcc1.NgClass, ɵngcc1.NgForOf, ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet, NgDropdownPanelComponent, NgItemLabelDirective], styles: [\".ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\\\"\\\\200b\\\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:bold;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\\n\"], encapsulation: 2, changeDetection: 0 });\nNgSelectComponent.ctorParameters = () => [\n { type: String, decorators: [{ type: Attribute, args: ['class',] }] },\n { type: undefined, decorators: [{ type: Attribute, args: ['autofocus',] }] },\n { type: NgSelectConfig },\n { type: undefined, decorators: [{ type: Inject, args: [SELECTION_MODEL_FACTORY,] }] },\n { type: ElementRef },\n { type: ChangeDetectorRef },\n { type: ConsoleService }\n];\nNgSelectComponent.propDecorators = {\n bindLabel: [{ type: Input }],\n bindValue: [{ type: Input }],\n markFirst: [{ type: Input }],\n placeholder: [{ type: Input }],\n notFoundText: [{ type: Input }],\n typeToSearchText: [{ type: Input }],\n addTagText: [{ type: Input }],\n loadingText: [{ type: Input }],\n clearAllText: [{ type: Input }],\n appearance: [{ type: Input }],\n dropdownPosition: [{ type: Input }],\n appendTo: [{ type: Input }],\n loading: [{ type: Input }],\n closeOnSelect: [{ type: Input }],\n hideSelected: [{ type: Input }],\n selectOnTab: [{ type: Input }],\n openOnEnter: [{ type: Input }],\n maxSelectedItems: [{ type: Input }],\n groupBy: [{ type: Input }],\n groupValue: [{ type: Input }],\n bufferAmount: [{ type: Input }],\n virtualScroll: [{ type: Input }],\n selectableGroup: [{ type: Input }],\n selectableGroupAsModel: [{ type: Input }],\n searchFn: [{ type: Input }],\n trackByFn: [{ type: Input }],\n clearOnBackspace: [{ type: Input }],\n labelForId: [{ type: Input }],\n inputAttrs: [{ type: Input }],\n tabIndex: [{ type: Input }],\n readonly: [{ type: Input }],\n searchWhileComposing: [{ type: Input }],\n minTermLength: [{ type: Input }],\n editableSearchTerm: [{ type: Input }],\n keyDownFn: [{ type: Input }],\n typeahead: [{ type: Input }, { type: HostBinding, args: ['class.ng-select-typeahead',] }],\n multiple: [{ type: Input }, { type: HostBinding, args: ['class.ng-select-multiple',] }],\n addTag: [{ type: Input }, { type: HostBinding, args: ['class.ng-select-taggable',] }],\n searchable: [{ type: Input }, { type: HostBinding, args: ['class.ng-select-searchable',] }],\n clearable: [{ type: Input }, { type: HostBinding, args: ['class.ng-select-clearable',] }],\n isOpen: [{ type: Input }, { type: HostBinding, args: ['class.ng-select-opened',] }],\n items: [{ type: Input }],\n compareWith: [{ type: Input }],\n clearSearchOnAdd: [{ type: Input }],\n blurEvent: [{ type: Output, args: ['blur',] }],\n focusEvent: [{ type: Output, args: ['focus',] }],\n changeEvent: [{ type: Output, args: ['change',] }],\n openEvent: [{ type: Output, args: ['open',] }],\n closeEvent: [{ type: Output, args: ['close',] }],\n searchEvent: [{ type: Output, args: ['search',] }],\n clearEvent: [{ type: Output, args: ['clear',] }],\n addEvent: [{ type: Output, args: ['add',] }],\n removeEvent: [{ type: Output, args: ['remove',] }],\n scroll: [{ type: Output, args: ['scroll',] }],\n scrollToEnd: [{ type: Output, args: ['scrollToEnd',] }],\n optionTemplate: [{ type: ContentChild, args: [NgOptionTemplateDirective, { read: TemplateRef },] }],\n optgroupTemplate: [{ type: ContentChild, args: [NgOptgroupTemplateDirective, { read: TemplateRef },] }],\n labelTemplate: [{ type: ContentChild, args: [NgLabelTemplateDirective, { read: TemplateRef },] }],\n multiLabelTemplate: [{ type: ContentChild, args: [NgMultiLabelTemplateDirective, { read: TemplateRef },] }],\n headerTemplate: [{ type: ContentChild, args: [NgHeaderTemplateDirective, { read: TemplateRef },] }],\n footerTemplate: [{ type: ContentChild, args: [NgFooterTemplateDirective, { read: TemplateRef },] }],\n notFoundTemplate: [{ type: ContentChild, args: [NgNotFoundTemplateDirective, { read: TemplateRef },] }],\n typeToSearchTemplate: [{ type: ContentChild, args: [NgTypeToSearchTemplateDirective, { read: TemplateRef },] }],\n loadingTextTemplate: [{ type: ContentChild, args: [NgLoadingTextTemplateDirective, { read: TemplateRef },] }],\n tagTemplate: [{ type: ContentChild, args: [NgTagTemplateDirective, { read: TemplateRef },] }],\n loadingSpinnerTemplate: [{ type: ContentChild, args: [NgLoadingSpinnerTemplateDirective, { read: TemplateRef },] }],\n dropdownPanel: [{ type: ViewChild, args: [forwardRef(() => NgDropdownPanelComponent),] }],\n searchInput: [{ type: ViewChild, args: ['searchInput', { static: true },] }],\n ngOptions: [{ type: ContentChildren, args: [NgOptionComponent, { descendants: true },] }],\n disabled: [{ type: HostBinding, args: ['class.ng-select-disabled',] }],\n filtered: [{ type: HostBinding, args: ['class.ng-select-filtered',] }],\n handleKeyDown: [{ type: HostListener, args: ['keydown', ['$event'],] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSelectComponent, [{\n type: Component,\n args: [{ selector: 'ng-select', template: \"<div\\n (mousedown)=\\\"handleMousedown($event)\\\"\\n [class.ng-appearance-outline]=\\\"appearance === 'outline'\\\"\\n [class.ng-has-value]=\\\"hasValue\\\"\\n class=\\\"ng-select-container\\\">\\n\\n <div class=\\\"ng-value-container\\\">\\n <div class=\\\"ng-placeholder\\\">{{placeholder}}</div>\\n\\n <ng-container *ngIf=\\\"(!multiLabelTemplate || !multiple ) && selectedItems.length > 0\\\">\\n <div [class.ng-value-disabled]=\\\"item.disabled\\\" class=\\\"ng-value\\\" *ngFor=\\\"let item of selectedItems; trackBy: trackByOption\\\">\\n <ng-template #defaultLabelTemplate>\\n <span class=\\\"ng-value-icon left\\\" (click)=\\\"unselect(item);\\\" aria-hidden=\\\"true\\\">\\u00D7</span>\\n <span class=\\\"ng-value-label\\\" [ngItemLabel]=\\\"item.label\\\" [escape]=\\\"escapeHTML\\\"></span>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"labelTemplate || defaultLabelTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ item: item.value, clear: clearItem, label: item.label }\\\">\\n </ng-template>\\n </div>\\n </ng-container>\\n\\n <ng-template *ngIf=\\\"multiple && multiLabelTemplate && selectedValues.length > 0\\\"\\n [ngTemplateOutlet]=\\\"multiLabelTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ items: selectedValues, clear: clearItem }\\\">\\n </ng-template>\\n\\n <div class=\\\"ng-input\\\"\\n role=\\\"combobox\\\" \\n [attr.aria-expanded]=\\\"isOpen\\\" \\n [attr.aria-owns]=\\\"isOpen ? dropdownId : null\\\" \\n aria-haspopup=\\\"listbox\\\">\\n\\n <input #searchInput\\n [attr.id]=\\\"labelForId\\\"\\n [attr.tabindex]=\\\"tabIndex\\\"\\n [readOnly]=\\\"!searchable || itemsList.maxItemsSelected\\\"\\n [disabled]=\\\"disabled\\\"\\n [value]=\\\"searchTerm ? searchTerm : ''\\\"\\n (input)=\\\"filter(searchInput.value)\\\"\\n (compositionstart)=\\\"onCompositionStart()\\\"\\n (compositionend)=\\\"onCompositionEnd(searchInput.value)\\\"\\n (focus)=\\\"onInputFocus($event)\\\"\\n (blur)=\\\"onInputBlur($event)\\\"\\n (change)=\\\"$event.stopPropagation()\\\"\\n [attr.aria-activedescendant]=\\\"isOpen ? itemsList?.markedItem?.htmlId : null\\\"\\n aria-autocomplete=\\\"list\\\"\\n [attr.aria-controls]=\\\"isOpen ? dropdownId : null\\\">\\n </div>\\n </div>\\n\\n <ng-container *ngIf=\\\"loading\\\">\\n <ng-template #defaultLoadingSpinnerTemplate>\\n <div class=\\\"ng-spinner-loader\\\"></div>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\\\">\\n </ng-template>\\n </ng-container>\\n\\n <span *ngIf=\\\"showClear()\\\" class=\\\"ng-clear-wrapper\\\" title=\\\"{{clearAllText}}\\\">\\n <span class=\\\"ng-clear\\\" aria-hidden=\\\"true\\\">\\u00D7</span>\\n </span>\\n\\n <span class=\\\"ng-arrow-wrapper\\\">\\n <span class=\\\"ng-arrow\\\"></span>\\n </span>\\n</div>\\n\\n<ng-dropdown-panel *ngIf=\\\"isOpen\\\"\\n class=\\\"ng-dropdown-panel\\\"\\n [virtualScroll]=\\\"virtualScroll\\\"\\n [bufferAmount]=\\\"bufferAmount\\\"\\n [appendTo]=\\\"appendTo\\\"\\n [position]=\\\"dropdownPosition\\\"\\n [headerTemplate]=\\\"headerTemplate\\\"\\n [footerTemplate]=\\\"footerTemplate\\\"\\n [filterValue]=\\\"searchTerm\\\"\\n [items]=\\\"itemsList.filteredItems\\\"\\n [markedItem]=\\\"itemsList.markedItem\\\"\\n (update)=\\\"viewPortItems = $event\\\"\\n (scroll)=\\\"scroll.emit($event)\\\"\\n (scrollToEnd)=\\\"scrollToEnd.emit($event)\\\"\\n (outsideClick)=\\\"close()\\\"\\n [class.ng-select-multiple]=\\\"multiple\\\"\\n [ngClass]=\\\"appendTo ? classes : null\\\"\\n [id]=\\\"dropdownId\\\"\\n role=\\\"listbox\\\"\\n aria-label=\\\"Options list\\\">\\n\\n <ng-container>\\n <div class=\\\"ng-option\\\" [attr.role]=\\\"item.children ? 'group' : 'option'\\\" (click)=\\\"toggleItem(item)\\\" (mouseover)=\\\"onItemHover(item)\\\"\\n *ngFor=\\\"let item of viewPortItems; trackBy: trackByOption\\\"\\n [class.ng-option-disabled]=\\\"item.disabled\\\"\\n [class.ng-option-selected]=\\\"item.selected\\\"\\n [class.ng-optgroup]=\\\"item.children\\\"\\n [class.ng-option]=\\\"!item.children\\\"\\n [class.ng-option-child]=\\\"!!item.parent\\\"\\n [class.ng-option-marked]=\\\"item === itemsList.markedItem\\\"\\n [attr.aria-selected]=\\\"item.selected\\\"\\n [attr.id]=\\\"item?.htmlId\\\">\\n\\n <ng-template #defaultOptionTemplate>\\n <span class=\\\"ng-option-label\\\" [ngItemLabel]=\\\"item.label\\\" [escape]=\\\"escapeHTML\\\"></span>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"item.children ? (optgroupTemplate || defaultOptionTemplate) : (optionTemplate || defaultOptionTemplate)\\\"\\n [ngTemplateOutletContext]=\\\"{ item: item.value, item$:item, index: item.index, searchTerm: searchTerm }\\\">\\n </ng-template>\\n </div>\\n\\n <div class=\\\"ng-option\\\" [class.ng-option-marked]=\\\"!itemsList.markedItem\\\" (mouseover)=\\\"itemsList.unmarkItem()\\\" role=\\\"option\\\" (click)=\\\"selectTag()\\\" *ngIf=\\\"showAddTag\\\">\\n <ng-template #defaultTagTemplate>\\n <span><span class=\\\"ng-tag-label\\\">{{addTagText}}</span>\\\"{{searchTerm}}\\\"</span>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"tagTemplate || defaultTagTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ searchTerm: searchTerm }\\\">\\n </ng-template>\\n </div>\\n </ng-container>\\n\\n <ng-container *ngIf=\\\"showNoItemsFound()\\\">\\n <ng-template #defaultNotFoundTemplate>\\n <div class=\\\"ng-option ng-option-disabled\\\">{{notFoundText}}</div>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"notFoundTemplate || defaultNotFoundTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ searchTerm: searchTerm }\\\">\\n </ng-template>\\n </ng-container>\\n\\n <ng-container *ngIf=\\\"showTypeToSearch()\\\">\\n <ng-template #defaultTypeToSearchTemplate>\\n <div class=\\\"ng-option ng-option-disabled\\\">{{typeToSearchText}}</div>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"typeToSearchTemplate || defaultTypeToSearchTemplate\\\">\\n </ng-template>\\n </ng-container>\\n\\n <ng-container *ngIf=\\\"loading && itemsList.filteredItems.length === 0\\\">\\n <ng-template #defaultLoadingTextTemplate>\\n <div class=\\\"ng-option ng-option-disabled\\\">{{loadingText}}</div>\\n </ng-template>\\n\\n <ng-template\\n [ngTemplateOutlet]=\\\"loadingTextTemplate || defaultLoadingTextTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ searchTerm: searchTerm }\\\">\\n </ng-template>\\n </ng-container>\\n\\n</ng-dropdown-panel>\\n\", providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgSelectComponent),\n multi: true\n }, NgDropdownPanelService], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n '[class.ng-select]': 'useDefaultClass',\n '[class.ng-select-single]': '!multiple'\n }, styles: [\".ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\\\"\\\\200b\\\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:bold;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\\n\"] }]\n }], function () { return [{ type: String, decorators: [{\n type: Attribute,\n args: ['class']\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['autofocus']\n }] }, { type: NgSelectConfig }, { type: undefined, decorators: [{\n type: Inject,\n args: [SELECTION_MODEL_FACTORY]\n }] }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }, { type: ConsoleService }]; }, { markFirst: [{\n type: Input\n }], dropdownPosition: [{\n type: Input\n }], loading: [{\n type: Input\n }], closeOnSelect: [{\n type: Input\n }], hideSelected: [{\n type: Input\n }], selectOnTab: [{\n type: Input\n }], bufferAmount: [{\n type: Input\n }], selectableGroup: [{\n type: Input\n }], selectableGroupAsModel: [{\n type: Input\n }], searchFn: [{\n type: Input\n }], trackByFn: [{\n type: Input\n }], clearOnBackspace: [{\n type: Input\n }], labelForId: [{\n type: Input\n }], inputAttrs: [{\n type: Input\n }], readonly: [{\n type: Input\n }], searchWhileComposing: [{\n type: Input\n }], minTermLength: [{\n type: Input\n }], editableSearchTerm: [{\n type: Input\n }], keyDownFn: [{\n type: Input\n }], multiple: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-multiple']\n }], addTag: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-taggable']\n }], searchable: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-searchable']\n }], clearable: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-clearable']\n }], isOpen: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-opened']\n }], blurEvent: [{\n type: Output,\n args: ['blur']\n }], focusEvent: [{\n type: Output,\n args: ['focus']\n }], changeEvent: [{\n type: Output,\n args: ['change']\n }], openEvent: [{\n type: Output,\n args: ['open']\n }], closeEvent: [{\n type: Output,\n args: ['close']\n }], searchEvent: [{\n type: Output,\n args: ['search']\n }], clearEvent: [{\n type: Output,\n args: ['clear']\n }], addEvent: [{\n type: Output,\n args: ['add']\n }], removeEvent: [{\n type: Output,\n args: ['remove']\n }], scroll: [{\n type: Output,\n args: ['scroll']\n }], scrollToEnd: [{\n type: Output,\n args: ['scrollToEnd']\n }], items: [{\n type: Input\n }], compareWith: [{\n type: Input\n }], clearSearchOnAdd: [{\n type: Input\n }], disabled: [{\n type: HostBinding,\n args: ['class.ng-select-disabled']\n }], filtered: [{\n type: HostBinding,\n args: ['class.ng-select-filtered']\n }], handleKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }], bindLabel: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], notFoundText: [{\n type: Input\n }], typeToSearchText: [{\n type: Input\n }], addTagText: [{\n type: Input\n }], loadingText: [{\n type: Input\n }], clearAllText: [{\n type: Input\n }], virtualScroll: [{\n type: Input\n }], openOnEnter: [{\n type: Input\n }], appendTo: [{\n type: Input\n }], bindValue: [{\n type: Input\n }], appearance: [{\n type: Input\n }], maxSelectedItems: [{\n type: Input\n }], groupBy: [{\n type: Input\n }], groupValue: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], typeahead: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-typeahead']\n }], optionTemplate: [{\n type: ContentChild,\n args: [NgOptionTemplateDirective, { read: TemplateRef }]\n }], optgroupTemplate: [{\n type: ContentChild,\n args: [NgOptgroupTemplateDirective, { read: TemplateRef }]\n }], labelTemplate: [{\n type: ContentChild,\n args: [NgLabelTemplateDirective, { read: TemplateRef }]\n }], multiLabelTemplate: [{\n type: ContentChild,\n args: [NgMultiLabelTemplateDirective, { read: TemplateRef }]\n }], headerTemplate: [{\n type: ContentChild,\n args: [NgHeaderTemplateDirective, { read: TemplateRef }]\n }], footerTemplate: [{\n type: ContentChild,\n args: [NgFooterTemplateDirective, { read: TemplateRef }]\n }], notFoundTemplate: [{\n type: ContentChild,\n args: [NgNotFoundTemplateDirective, { read: TemplateRef }]\n }], typeToSearchTemplate: [{\n type: ContentChild,\n args: [NgTypeToSearchTemplateDirective, { read: TemplateRef }]\n }], loadingTextTemplate: [{\n type: ContentChild,\n args: [NgLoadingTextTemplateDirective, { read: TemplateRef }]\n }], tagTemplate: [{\n type: ContentChild,\n args: [NgTagTemplateDirective, { read: TemplateRef }]\n }], loadingSpinnerTemplate: [{\n type: ContentChild,\n args: [NgLoadingSpinnerTemplateDirective, { read: TemplateRef }]\n }], dropdownPanel: [{\n type: ViewChild,\n args: [forwardRef(() => NgDropdownPanelComponent)]\n }], searchInput: [{\n type: ViewChild,\n args: ['searchInput', { static: true }]\n }], ngOptions: [{\n type: ContentChildren,\n args: [NgOptionComponent, { descendants: true }]\n }] }); })();\n\nfunction DefaultSelectionModelFactory() {\n return new DefaultSelectionModel();\n}\nclass DefaultSelectionModel {\n constructor() {\n this._selected = [];\n }\n get value() {\n return this._selected;\n }\n select(item, multiple, groupAsModel) {\n item.selected = true;\n if (!item.children || (!multiple && groupAsModel)) {\n this._selected.push(item);\n }\n if (multiple) {\n if (item.parent) {\n const childrenCount = item.parent.children.length;\n const selectedCount = item.parent.children.filter(x => x.selected).length;\n item.parent.selected = childrenCount === selectedCount;\n }\n else if (item.children) {\n this._setChildrenSelectedState(item.children, true);\n this._removeChildren(item);\n if (groupAsModel && this._activeChildren(item)) {\n this._selected = [...this._selected.filter(x => x.parent !== item), item];\n }\n else {\n this._selected = [...this._selected, ...item.children.filter(x => !x.disabled)];\n }\n }\n }\n }\n unselect(item, multiple) {\n this._selected = this._selected.filter(x => x !== item);\n item.selected = false;\n if (multiple) {\n if (item.parent && item.parent.selected) {\n const children = item.parent.children;\n this._removeParent(item.parent);\n this._removeChildren(item.parent);\n this._selected.push(...children.filter(x => x !== item && !x.disabled));\n item.parent.selected = false;\n }\n else if (item.children) {\n this._setChildrenSelectedState(item.children, false);\n this._removeChildren(item);\n }\n }\n }\n clear(keepDisabled) {\n this._selected = keepDisabled ? this._selected.filter(x => x.disabled) : [];\n }\n _setChildrenSelectedState(children, selected) {\n for (const child of children) {\n if (child.disabled) {\n continue;\n }\n child.selected = selected;\n }\n }\n _removeChildren(parent) {\n this._selected = [\n ...this._selected.filter(x => x.parent !== parent),\n ...parent.children.filter(x => x.parent === parent && x.disabled && x.selected)\n ];\n }\n _removeParent(parent) {\n this._selected = this._selected.filter(x => x !== parent);\n }\n _activeChildren(item) {\n return item.children.every(x => !x.disabled || x.selected);\n }\n}\n\nconst ɵ0 = DefaultSelectionModelFactory;\nclass NgSelectModule {\n}\nNgSelectModule.ɵfac = function NgSelectModule_Factory(t) { return new (t || NgSelectModule)(); };\nNgSelectModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgSelectModule });\nNgSelectModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n { provide: SELECTION_MODEL_FACTORY, useValue: ɵ0 }\n ], imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSelectModule, [{\n type: NgModule,\n args: [{\n declarations: [\n NgDropdownPanelComponent,\n NgOptionComponent,\n NgSelectComponent,\n NgOptgroupTemplateDirective,\n NgOptionTemplateDirective,\n NgLabelTemplateDirective,\n NgMultiLabelTemplateDirective,\n NgHeaderTemplateDirective,\n NgFooterTemplateDirective,\n NgNotFoundTemplateDirective,\n NgTypeToSearchTemplateDirective,\n NgLoadingTextTemplateDirective,\n NgTagTemplateDirective,\n NgLoadingSpinnerTemplateDirective,\n NgItemLabelDirective\n ],\n imports: [\n CommonModule\n ],\n exports: [\n NgSelectComponent,\n NgOptionComponent,\n NgOptgroupTemplateDirective,\n NgOptionTemplateDirective,\n NgLabelTemplateDirective,\n NgMultiLabelTemplateDirective,\n NgHeaderTemplateDirective,\n NgFooterTemplateDirective,\n NgNotFoundTemplateDirective,\n NgTypeToSearchTemplateDirective,\n NgLoadingTextTemplateDirective,\n NgTagTemplateDirective,\n NgLoadingSpinnerTemplateDirective\n ],\n providers: [\n { provide: SELECTION_MODEL_FACTORY, useValue: ɵ0 }\n ]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgSelectModule, { declarations: function () { return [NgDropdownPanelComponent, NgOptionComponent, NgSelectComponent, NgOptgroupTemplateDirective, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective, NgHeaderTemplateDirective, NgFooterTemplateDirective, NgNotFoundTemplateDirective, NgTypeToSearchTemplateDirective, NgLoadingTextTemplateDirective, NgTagTemplateDirective, NgLoadingSpinnerTemplateDirective, NgItemLabelDirective]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgSelectComponent, NgOptionComponent, NgOptgroupTemplateDirective, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective, NgHeaderTemplateDirective, NgFooterTemplateDirective, NgNotFoundTemplateDirective, NgTypeToSearchTemplateDirective, NgLoadingTextTemplateDirective, NgTagTemplateDirective, NgLoadingSpinnerTemplateDirective]; } }); })();\n\n/*\n * Public API Surface of ng-select\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NgSelectComponent, NgSelectConfig, NgSelectModule, SELECTION_MODEL_FACTORY, DefaultSelectionModelFactory as ɵb, DefaultSelectionModel as ɵc, NgDropdownPanelService as ɵd, NgItemLabelDirective as ɵe, NgOptionTemplateDirective as ɵf, NgOptgroupTemplateDirective as ɵg, NgLabelTemplateDirective as ɵh, NgMultiLabelTemplateDirective as ɵi, NgHeaderTemplateDirective as ɵj, NgFooterTemplateDirective as ɵk, NgNotFoundTemplateDirective as ɵl, NgTypeToSearchTemplateDirective as ɵm, NgLoadingTextTemplateDirective as ɵn, NgTagTemplateDirective as ɵo, NgLoadingSpinnerTemplateDirective as ɵp, NgDropdownPanelComponent as ɵq, NgOptionComponent as ɵr, ConsoleService as ɵs };\n\n","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n return audit(() => timer(duration, scheduler));\n}\n","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n let isComplete = false;\n const endDuration = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\nexport default mergeWith;\n","var e={2099:e=>{e.exports='<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"aaaccessibility-desc aaaccessibility-title\"><title id=\"aaaccessibility-title\">Accessibility IconA picture showing a person in a wheelchair.'},4888:e=>{e.exports='Add Item IconA picture showing an item with a plus sign being added to container.'},4100:e=>{e.exports='Add Filter IconA picture showing tree lines and a plus sign.'},4207:e=>{e.exports='Add Row IconA picture showing a rectangle with a plus sign.'},3335:e=>{e.exports='Aggregation IconA picture showing tree lines converging into a triangle pointing right.'},1156:e=>{e.exports='Aids Ribbon IconA picture showing a ribbon.'},8169:e=>{e.exports='Select All IconA picture showing tree lines and a check mark.'},2563:e=>{e.exports='Amazon IconA picture showing the Amazon logo.'},6:e=>{e.exports='Ambulance IconA picture showing an ambulance.'},8587:e=>{e.exports='American Express IconA picture showing the American Express logo.'},4565:e=>{e.exports='Anxiety IconA picture showing a stylized human head with a cloud and lighting inside.'},6872:e=>{e.exports='API IconA picture showing a rectangle with the letters A, P, and I written inside.'},2376:e=>{e.exports='App Symbol IconA picture showing the word app written inside.'},1785:e=>{e.exports='Apple App Store iconA picture showing the Apple AppStore logo.'},1612:e=>{e.exports='Apple Pay IconA picture showing the Apple Pay logo inside.'},8485:e=>{e.exports='Apple IconA picture showing the Apple logo.'},6603:e=>{e.exports='Arrow Down Left IconA picture showing an arrow pointing down attached to an arrow pointing left.'},7266:e=>{e.exports='Arrow Down Right IconA picture showing an arrow pointing down attached to an arrow pointing right.'},8542:e=>{e.exports='Arrow Up Left IconA picture showing an arrow pointing up attached to an arrow pointing left.'},6461:e=>{e.exports='Arrow Up Right IconA picture showing an arrow pointing up attached to an arrow pointing right.'},2976:e=>{e.exports='ATM Dollar IconA picture showing a screen with the Dollar sign and a keypad.'},4044:e=>{e.exports='ATM Euro IconA picture showing a screen with the Euro symbol and a keypad.'},5516:e=>{e.exports='ATM Pound IconA picture showing a screen with the British Pound symbol and a keypad.'},1249:e=>{e.exports='ATM Yen IconA picture showing a screen with the Japanese Yen symbol and a keypad.'},4134:e=>{e.exports='ATM IconA picture showing an empty screen and a keypad.'},2383:e=>{e.exports='Auction IconA picture showing a gavel inside a circle.'},1169:e=>{e.exports='Award IconA picture depicting a medal with the number 1 written inside.'},862:e=>{e.exports='Baby Bottle IconA picture depicting a baby bottle.'},9044:e=>{e.exports='Bacteria IconA picture depicting a bacteria.'},4943:e=>{e.exports='Bandage IconA picture depicting a bandage.'},8333:e=>{e.exports='Bank Safe IconA picture depicting a locked safe.'},2703:e=>{e.exports='Barcode IconA picture showing 6 vertically aligned rectangles, varying in width.'},8106:e=>{e.exports='Battle.net IconA picture showing the Battle.net logo.'},514:e=>{e.exports='Bear Market IconA picture depicting a bear.'},9075:e=>{e.exports='Behance IconA picture showing the Behance logo.'},6668:e=>{e.exports='Bill Paid IconA picture depicting a paper bill with a check mark at the end.'},6589:e=>{e.exports='Biohazard IconA picture showing the biohazard symbol.'},3468:e=>{e.exports='Bitcoin IconA picture showing the Bitcoin logo.'},1115:e=>{e.exports='Blood IconA picture showing two drops of liquid.'},6680:e=>{e.exports='Blu-Ray IconA picture showing the Blu-Ray logo.'},788:e=>{e.exports='Bottom recordsShows percentile records positioned at the bottom.'},2941:e=>{e.exports='Bottom recordsShows records positioned at the bottom.'},2233:e=>{e.exports='Box IconA picture showing the Box logo.'},3956:e=>{e.exports='Braille IconA picture showing 6 dots.'},9250:e=>{e.exports='Breast-feeding IconA picture depicting a woman breastfeeding her child.'},4774:e=>{e.exports='Brick Wall IconA picture depicting a wall made of bricks.'},2124:e=>{e.exports='Brush IconA picture showing a painting brush.'},8205:e=>{e.exports='Bucket IconA picture showing a bucket.'},1803:e=>{e.exports='Budget-Spending IconA picture showing an encircled dollar sign with arrows at the top, bottom, left, and right sides of it.'},7970:e=>{e.exports='Bug IconA picture showing an insect.'},5765:e=>{e.exports='Building IconA picture depicting a building.'},2374:e=>{e.exports='Bull Market IconA picture depicting bull head.'},4827:e=>{e.exports='Bulldozer IconA picture depicting a bulldozer.'},9979:e=>{e.exports='Business Development IconA picture depicting a globe inside a mechanical gear.'},6405:e=>{e.exports='Caduceus IconA picture depicting two snakes twisted around a poll.'},5156:e=>{e.exports='Calculator IconA picture depicting an electronic calculator.'},562:e=>{e.exports='Cancer Ribbon IconA picture depicting a ribbon.'},1046:e=>{e.exports='Candidate Results IconA picture depicting two people standing next to progress indicators.'},8760:e=>{e.exports='Case Sensitive IconA picture showing the letter A written in both upper and lower case.'},1786:e=>{e.exports='Cash IconA picture depicting a stack of cash.'},2353:e=>{e.exports='Cash IconA picture depicting a stack of cash.'},4578:e=>{e.exports='Cash-Only IconA picture depicting a crossed-out credit card.'},4303:e=>{e.exports='Cement Mixer IconA picture depicting a cement mixer truck.'},4175:e=>{e.exports='Certificate IconA picture depicting a badge of honor.'},1319:e=>{e.exports='Check IconA picture depicting a check mark.'},8593:e=>{e.exports='Chrome IconA picture showing the Chrome browser logo.'},3696:e=>{e.exports='Clinic IconA picture showing a house with the cross symbol in the center.'},2859:e=>{e.exports='Code Fork IconA picture depicting a line diverging into two separate lines.'},2906:e=>{e.exports='Code Review IconA picture showing encircled angle brackets with a dot between them.'},5536:e=>{e.exports='Code IconA picture showing encircled angle brackets.'},2801:e=>{e.exports='Commodities IconA picture depicting an oil barrel and 3 gold ingots.'},1027:e=>{e.exports='Condom Used IconA picture depicting a condom with a sperm inside.'},8603:e=>{e.exports='Condom IconA picture depicting an empty, open condom.'},7566:e=>{e.exports='Terminal IconA picture depicting a computer terminal.'},7909:e=>{e.exports='Construction Cone IconA picture depicting a construction cone.'},3960:e=>{e.exports='Construction Project IconA picture depicting a construction project or an architectural plan, a blueprint.'},2642:e=>{e.exports='Construction Trolley IconA picture depicting a construction trolley.'},7784:e=>{e.exports='Contains IconA picture showing the lowercase letter A in a square box.'},2517:e=>{e.exports='Contraception IconA picture depicting a pill.'},4666:e=>{e.exports='Cordless Screwdriver IconA picture depicting a cordless screwdriver.'},5445:e=>{e.exports='Corona Virus IconA picture depicting a virus cell.'},7781:e=>{e.exports='Country Home IconA picture depicting a house in the country with a garden and trees.'},3284:e=>{e.exports='Crane IconA picture depicting a tower crane with a hook.'},676:e=>{e.exports='Credit Cards IconA picture depicting a credit card.'},7915:e=>{e.exports='Credit Control IconA picture depicting a credit card with an eye in the middle.'},6786:e=>{e.exports='Crowd-Funding IconA picture depicting the dollar sign encircled.'},2558:e=>{e.exports='Custom Filter IconAn icon showing that custom filter is applied.'},5458:e=>{e.exports='Deafness IconA picture depicting a crossed-out human ear.'},8758:e=>{e.exports='Debate IconA picture depicting boxing gloves hitting each other.'},2082:e=>{e.exports='Debt IconA picture depicting a scale weight with the dollar symbol printed on it.'},2600:e=>{e.exports='Delivery IconA picture depicting a truck.'},2138:e=>{e.exports='Dental Floss IconA picture depicting a dental floss container.'},2816:e=>{e.exports='Dental Implant IconA picture depicting a tooth crown on a spiral.'},5640:e=>{e.exports='Development IconA picture depicting puzzle pieces.'},9079:e=>{e.exports='Diabetes IconA picture depicting an index finger with a blood drop at the tip.'},2926:e=>{e.exports='Diamond Circled IconA picture depicting an encircled diamond.'},1191:e=>{e.exports='Diamond IconA picture depicting a diamond.'},8147:e=>{e.exports='Diners Club IconA picture showing the Diners Club International logo.'},8901:e=>{e.exports='Discord IconA picture showing the Discord application logo.'},6397:e=>{e.exports='Discount IconA picture showing a percent sign enclosed in a star-shaped object.'},2441:e=>{e.exports='Dividents IconA picture showing a percent sign encircled in rotating arrows.'},7237:e=>{e.exports='DNA IconA picture depicting a spiral.'},5802:e=>{e.exports='Doctor IconA picture depicting a person with stethoscope around their neck.'},1494:e=>{e.exports='Doctors Bag IconA picture depicting a bag with a cross in the middle.'},1085:e=>{e.exports='Does-Not-Contain IconA picture showing the lowercase letter A in a crossed-out square box.'},1544:e=>{e.exports='Does-Not-End-With IconA picture showing crossed-out lines at the end of a square box.'},3099:e=>{e.exports='Does-Not-Start-With IconA picture showing crossed-out lines at the beginning of a square box.'},9154:e=>{e.exports='Dollar Circled IconA picture showing an encircled dollar symbol.'},3145:e=>{e.exports='Dose IconA picture showing a medicine dropper.'},6637:e=>{e.exports='Dribbble IconA picture showing the Dribble website logo.'},7454:e=>{e.exports='Drop Shipping IconA picture depicting an open parachute attached to a box.'},1634:e=>{e.exports='Dropbox IconA picture showing the Dropbox application logo.'},5216:e=>{e.exports='Dump Truck IconA picture showing a dump truck.'},8535:e=>{e.exports='Ebay IconA picture showing the ebay website logo.'},480:e=>{e.exports='Electoral Votes IconA picture depicting a person standing in front of a tribune.'},9082:e=>{e.exports='Embryo IconA picture depicting a baby in its mother's womb.'},5346:e=>{e.exports='End Expression IconA picture showing three dots followed by a right-pointed chevron.'},6312:e=>{e.exports='Ends With IconA picture showing three dots followed by lowercase a.'},6379:e=>{e.exports='Equals IconA picture showing the equals sign.'},1075:e=>{e.exports='Estate IconA picture depicting a big house.'},3770:e=>{e.exports='Ethereum IconA picture showing the Ethereum logo.'},2340:e=>{e.exports='EU Parliament IconA picture depicting the European Parliament building.'},3888:e=>{e.exports='Euro-Circled IconA picture showing an encircled euro symbol.'},4812:e=>{e.exports='Exact Match IconA picture depicting an arrow hitting bulls-eye.'},9753:e=>{e.exports='Face ID IconA picture showing the Apple Face ID icon.'},3551:e=>{e.exports='Facebook Messenger IconA picture showing the Facebook Messenger logo.'},3772:e=>{e.exports='Facebook IconA picture showing the Facebook logo.'},3921:e=>{e.exports='Female Candidate IconA picture showing a woman standing behind a tribune.'},4132:e=>{e.exports='Fertilization IconA picture showing a sperm racing towards an egg.'},5531:e=>{e.exports='File Changes IconA picture depicting a paper document with plus and minus signs drawn inside.'},8213:e=>{e.exports='File Tree IconA picture showing a vertical line diverging into two separate lines.'},5471:e=>{e.exports='Financial Insurance IconA picture showing the dollar sign under an umbrella.'},5299:e=>{e.exports='Firefox IconA picture showing the Firefox browser logo.'},348:e=>{e.exports='Fitness-Watch IconA picture depicting a digital watch with the heart symbol in the middle.'},4931:e=>{e.exports='Foreign Exchange IconA picture showing the euro and dollar symbols encircled in rotating arrows.'},3360:e=>{e.exports='Forklift Truck IconA picture depicting a forklift truck.'},9173:e=>{e.exports='Foundation IconA picture depicting a foundation built with bricks.'},5487:e=>{e.exports='Fountain IconA picture depicting a water fountain.'},5963:e=>{e.exports='Gas Mask IconA picture depicting a gas mask.'},2943:e=>{e.exports='Gift IconA picture depicting a wrapped box.'},1664:e=>{e.exports='Git Branch IconA picture showing a vertical line diverging into two separate lines.'},1499:e=>{e.exports='Git Commit IconA picture showing a line with a big circle in the middle.'},7799:e=>{e.exports='Git Compare IconA picture showing mirroring arrows attached to l-shaped lines.'},7735:e=>{e.exports='Git Issue IconA picture showing an encircled exclamation mark symbol.'},3790:e=>{e.exports='Git Merge IconA picture showing two perpendicular lines.'},7292:e=>{e.exports='GitHub IconA picture showing the GitHub website logo.'},1500:e=>{e.exports='Gold IconA picture depicting a stack of gold ingots.'},7945:e=>{e.exports='Google Drive IconA picture showing the Google Drive logo.'},3437:e=>{e.exports='Google Hangouts IconA picture showing the Google Hangouts logo.'},6735:e=>{e.exports='Google Maps IconA picture showing the Google Maps logo.'},3550:e=>{e.exports='Google Pay IconA picture showing the Google Pay logo.'},4193:e=>{e.exports='Google Play IconA picture showing the Google Play logo.'},2373:e=>{e.exports='Google Translate IconA picture showing the Google Translate logo.'},1092:e=>{e.exports='Google IconA picture showing the Google logo.'},2899:e=>{e.exports='Greater Than or Equal IconA picture showing the grater-than or equal symbol.'},8825:e=>{e.exports='Greater Than IconA picture showing the greater-than symbol.'},743:e=>{e.exports='Grid IconA picture depicting a square grid.'},9357:e=>{e.exports='Hammer IconA picture showing a hammer.'},9773:e=>{e.exports='Hearing Aid IconA picture depicting an earphone inserted into a human ear.'},8314:e=>{e.exports='Heart Care IconA picture showing the heart symbol with a check mark drawn inside it.'},2490:e=>{e.exports='Heart Monitor IconA picture showing the heart symbol with a cardiogram drawn inside it.'},2203:e=>{e.exports='Horn IconA picture depicting a loudspeaker.'},6941:e=>{e.exports='Hospital-Bed IconA picture depicting a bed with the capital letter H next to it.'},8897:e=>{e.exports='Hospital Sign IconA picture showing the capital letter H in a square.'},3143:e=>{e.exports='Hospital IconA picture depicting a house with the capital letter H in the middle.'},4081:e=>{e.exports='Idea Generation IconA picture showing a light bulb encircled in rotating arrows.'},8652:e=>{e.exports='Impact Drill IconA picture showing an impact drill.'},6273:e=>{e.exports='Inspect Code IconA picture depicting a magnifying glass with angled brackets inside it.'},9834:e=>{e.exports='Instagram IconA picture showing the Instagram application logo.'},1147:e=>{e.exports='Internet Explorer IconA picture showing the Internet Explorer browser logo.'},5030:e=>{e.exports='Invoice IconA picture depicting a paper sheet.'},5631:e=>{e.exports='iOS IconA picture showing the iOS logo.'},6855:e=>{e.exports='Is After IconA picture showing a square bracket drawn after a vertical line.'},1619:e=>{e.exports='Is Before IconA picture showing a square bracket drawn before a vertical line.'},7992:e=>{e.exports='Is Empty IconA picture showing a dotted square.'},8805:e=>{e.exports='Is False IconA picture showing an encircled X symbol.'},5124:e=>{e.exports='Is Not Null IconA picture showing a crossed-out circle.'},5646:e=>{e.exports='Is Null IconA picture showing an empty circle.'},761:e=>{e.exports='is True IconA picture showing an encircled check mark symbol.'},1197:e=>{e.exports='JSFiddle IconA picture showing the JSFiddle website logo.'},4092:e=>{e.exports='Jump Down IconA picture showing a bent arrow pointing down towards a line.'},2715:e=>{e.exports='Jump Up IconA picture showing a bent arrow pointing up towards a line.'},2773:e=>{e.exports='Keep Away From Children IconA picture depicting a crossed-out baby head.'},647:e=>{e.exports='Ladder IconA picture showing a ladder.'},4212:e=>{e.exports='Last Month IconA picture depicting a calendar with a back-arrow at the end.'},5238:e=>{e.exports='Last Quarter IconA picture depicting a quarter of a circle with an arrow pointing right.'},4487:e=>{e.exports='Last Week IconA picture depicting a square with an arrow pointing down.'},7356:e=>{e.exports='Last Year IconA picture depicting a calendar with an back-arrow in the middle.'},552:e=>{e.exports='Legal Document IconA picture depicting a sheet of paper with a badge of honor in the middle.'},8293:e=>{e.exports='Less Than or Equal IconA picture showing the lass-than or equal symbol.'},9120:e=>{e.exports='Less Than IconA picture showing the less-than symbol.'},3547:e=>{e.exports='LinkedIn IconA picture showing the LinkedIn logo.'},6857:e=>{e.exports='Loan IconA picture depicting a hand with the dollar symbol above it.'},8422:e=>{e.exports='Maestro IconA picture showing the Maestro logo.'},9840:e=>{e.exports='Maintenance IconA picture showing a wrench and a screwdriver tools.'},9849:e=>{e.exports='Male Candidate IconA picture showing a man behind a tribune.'},6138:e=>{e.exports='Mask IconA picture depicting a face mask.'},4344:e=>{e.exports='Mask IconA picture depicting a face mask.'},3603:e=>{e.exports='Massage IconA picture depicting a person giving another person a massage.'},5497:e=>{e.exports='Mastercard IconA picture showing the MasterCard logo.'},4013:e=>{e.exports='Match IconA picture depicting two puzzle pieces fitting together.'},8695:e=>{e.exports='Medical Book IconA picture depicting a book with the medical cross at the corner of its cover.'},1535:e=>{e.exports='Medicine IconA picture depicting a bottle with the medical cross in the middle.'},3264:e=>{e.exports='Medium IconA picture showing the Medium website logo in the middle.'},5145:e=>{e.exports='Microorganisms IconA picture depicting a single-cell organism.'},6934:e=>{e.exports='Microscope IconA picture depicting a microscope.'},4989:e=>{e.exports='Microsoft IconA picture showing the Microsoft logo.'},8463:e=>{e.exports='Milestone IconA picture depicting a road sign.'},185:e=>{e.exports='Code Value IconA picture depicting a part.'},1913:e=>{e.exports='Money Bag IconA picture depicting a bag of coins.'},2418:e=>{e.exports='Month IconA picture depicting a month calendar.'},7116:e=>{e.exports='Microsoft Edge IconA picture showing the Microsoft Edge browser logo.'},5488:e=>{e.exports='Microsoft Excel IconA picture showing the Microsoft Excel logo.'},3508:e=>{e.exports='Microsoft Office IconA picture showing the Microsoft Office logo.'},6357:e=>{e.exports='Microsoft Outlook IconA picture showing the Microsoft Outlook logo.'},9803:e=>{e.exports='Microsoft Powerpoint IconA picture showing the Microsoft Powerpoint logo.'},7976:e=>{e.exports='Microsoft Teams IconA picture showing the Microsoft Teams logo.'},2091:e=>{e.exports='Microsoft Word IconA picture showing the Microsoft Word logo.'},7666:e=>{e.exports='Next Month iconA picture depicting a calendar with a forward-arrow at the end.'},1855:e=>{e.exports='Next Quarter IconA picture depicting a quarter circle with an arrow pointing right.'},7675:e=>{e.exports='Next Week IconA picture depicting a square with an arrow pointing right.'},2367:e=>{e.exports='Next Year iconA picture depicting a calendar with a forward-arrow in the middle.'},7996:e=>{e.exports='Not Empty IconA picture showing a crossed-out dotted square.'},9446:e=>{e.exports='Not Equal IconA picture showing a crossed-out equals symbol.'},3688:e=>{e.exports='Nurse IconA picture depicting a female nurse.'},9151:e=>{e.exports='Oil Platform IconA picture depicting an oil platform/offshore drilling rig at seas.'},7802:e=>{e.exports='Oil IconA picture depicting an oil barrel.'},4131:e=>{e.exports='OneDrive IconA picture showing the Microsoft OneDrive logo.'},2072:e=>{e.exports='Opera IconA picture showing the Opera browser logo.'},9712:e=>{e.exports='Pacifier IconA picture depicting a baby pacifier.'},4589:e=>{e.exports='Paint Roller IconA picture depicting a paint roller.'},3076:e=>{e.exports='Parliament IconA picture depicting a parliament building.'},8243:e=>{e.exports='Parliament IconA picture depicting a parliament building.'},3931:e=>{e.exports='Paydate IconA picture depicting a credit card in front of a calendar.'},564:e=>{e.exports='Paypal IconA picture showing the PayPal application logo.'},8294:e=>{e.exports='Piggy Bank IconA picture depicting a piggy bank.'},5788:e=>{e.exports='Pill IconA picture depicting a pill.'},6306:e=>{e.exports='Pin Left IconA picture depicting a pin pointed to the left.'},7530:e=>{e.exports='Pin Right IconA picture depicting a pin pointed to the right.'},1216:e=>{e.exports='Pinterest IconA picture showing the Pinterest logo.'},4284:e=>{e.exports='Pipes IconA picture depicting pipes.'},2753:e=>{e.exports='Piping System IconA picture depicting a piping system.'},6864:e=>{e.exports='Plastic Surgery IconA picture depicting a marker-marked human torso.'},2252:e=>{e.exports='Pliers IconA picture showing a pliers.'},8007:e=>{e.exports='Plugin IconA picture depicting an electrical plug.'},4783:e=>{e.exports='Pneumatic Hammer Drill IconA picture depicting a pneumatic hammer drill.'},623:e=>{e.exports='Poop IconA picture depicting feces.'},7587:e=>{e.exports='Popular Votes IconA picture depicting a hand about to drop a ballot into a voting box.'},4171:e=>{e.exports='Pound Circled IconA picture showing an encircled British pound symbol.'},171:e=>{e.exports='Pregnancy No Alcohol IconA picture showing a crossed-out woman drinking wine.'},7375:e=>{e.exports='Previous Quarter IconA picture depicting a quarter circle with an arrow pointing left.'},8577:e=>{e.exports='Next Week IconA picture depicting a square with an arrow pointing left.'},4894:e=>{e.exports='Project Revenue IconA picture showing the dollar symbol inside a mechanical gear encircled by rotating arrows.'},4595:e=>{e.exports='Protester Signs IconA picture showing two signs.'},8280:e=>{e.exports='Pull Request IconA picture showing an l-shaped arrow pointing towards a vertical line to the left.'},7982:e=>{e.exports='Pulse IconA picture depicting a cardiogram.'},4183:e=>{e.exports='Quarter Four IconA picture depicting a quarter of a circle next to a three-thirds circle.'},3480:e=>{e.exports='Quarter One IconA picture depicting a quarter of a circle next to a three-thirds circle.'},7564:e=>{e.exports='Quarter Three IconA picture depicting a quarter of a circle next to a three-thirds circle.'},563:e=>{e.exports='Quarter Two IconA picture depicting a quarter of a circle next to a three-thirds circle.'},4917:e=>{e.exports='Radiator IconA picture showing a radiator used for heating.'},7814:e=>{e.exports='Radioactive IconA picture showing the radioactive symbol.'},8629:e=>{e.exports='Reddit IconA picture showing the Reddit website logo.'},3293:e=>{e.exports='Repository IconA picture depicting a file drawer.'},44:e=>{e.exports='Responsive Layout IconA picture depicting a mobile phone in front of a laptop computer.'},425:e=>{e.exports='Restricted Area IconA picture depicting a restricted area blocked by a barrier or a fence.'},5099:e=>{e.exports='Results by Candidates IconA picture depicting a pie chart.'},8030:e=>{e.exports='Results Pie Chart IconA picture depicting a pie chart.'},5832:e=>{e.exports='RH Negative IconA picture depicting a blood drop with the minus sign in the middle.'},8:e=>{e.exports='RH Positive IconA picture depicting a blood drop with the plus sign in the middle.'},3223:e=>{e.exports='Road Roller IconA picture depicting a road roller machine.'},7652:e=>{e.exports='Rod of Ascelepius IconA picture depicting a snake twisted around a poll.'},2471:e=>{e.exports='Rulers IconA picture depicting different measuring tools.'},26:e=>{e.exports='Safari IconA picture showing the Safari browser logo.'},3877:e=>{e.exports='Safety Vest IconA picture depicting a safety vest.'},1733:e=>{e.exports='Sale IconA picture showing the word sale encircled.'},4009:e=>{e.exports='Sass IconA picture showing the Sass language logo.'},5604:e=>{e.exports='Saw IconA picture depicting a hand saw.'},7681:e=>{e.exports='Scales Balanced IconA picture showing perfectly balanced weight scales.'},1221:e=>{e.exports='Scales Unbalanced IconA picture showing unbalanced weight scales.'},2141:e=>{e.exports='Scissor Lift IconA picture depicting a scissor lift.'},2451:e=>{e.exports='Screwdriver IconA picture showing a screwdriver.'},3629:e=>{e.exports='Security IconA picture depicting a shield-protected briefcase.'},5339:e=>{e.exports='Security IconA picture depicting a shield-protected briefcase.'},8501:e=>{e.exports='Severity IconA picture depicting a gouge.'},6143:e=>{e.exports='Shovel IconA picture showing a shovel.'},2281:e=>{e.exports='Sign Language IconA picture depicting two human hands gesticulating.'},1959:e=>{e.exports='Skype IconA picture showing the Microsoft Skype logo.'},1980:e=>{e.exports='Skyscrapers IconA picture depicting tall buildings.'},2e3:e=>{e.exports='Slack IconA picture showing the Slack application logo.'},635:e=>{e.exports='Snapchat IconA picture showing the Snapchat application logo.'},5678:e=>{e.exports='Sneeze IconA picture depicting a person sneezing.'},2681:e=>{e.exports='Software Architecture IconA picture depicting a scaffold.'},1833:e=>{e.exports='Software Installer IconA picture showing an arrow pointing down at a computer hard drive.'},2160:e=>{e.exports='Solar Panel IconA picture depicting a solar panel.'},7531:e=>{e.exports='Soldering Iron IconA picture depicting a soldering iron.'},7823:e=>{e.exports='Soundcloud IconA picture showing the Soundcloud application icon.'},5321:e=>{e.exports='Source Code IconA picture showing encircled angle brackets.'},5105:e=>{e.exports='Spotify IconA picture showing the Spotify application logo.'},6508:e=>{e.exports='Stackoverflow IconA picture showing the Stackoverflow logo.'},7667:e=>{e.exports='Stairs IconA picture depicting a staircase with railings in a building.'},6843:e=>{e.exports='Start Expression IconA picture showing a left chevron followed by three dots.'},3898:e=>{e.exports='Starts With IconA picture showing the uppercase letter A followed by three dots.'},1683:e=>{e.exports='Stats IconA picture showing a bar chart on a computer screen.'},8473:e=>{e.exports='Steam IconA picture showing the Steam application logo.'},2554:e=>{e.exports='Stethoscope IconA picture depicting a stethoscope.'},4592:e=>{e.exports='Stop Hand IconA picture depicting a sign with a stop hand.'},8430:e=>{e.exports='Strategy IconA picture depicting a chess rook.'},4335:e=>{e.exports=''},4088:e=>{e.exports='Stripe IconA picture showing the Stripe application logo.'},2888:e=>{e.exports='Syringe IconA picture depicting a syringe.'},5364:e=>{e.exports='System Update IconA picture depicting a computer screen with a reload symbol in the middle.'},219:e=>{e.exports='Table Saw Blade IconA picture depicting a table saw blade.'},8469:e=>{e.exports='Tap Water IconA picture depicting tap water.'},8935:e=>{e.exports='Tapeline IconA picture depicting a measuring tape.'},1418:e=>{e.exports='Teeth IconA picture depicting human teeth.'},7934:e=>{e.exports='Telegram IconA picture showing the Telegram application icon.'},6282:e=>{e.exports='Thermometer IconA picture depicting a thermometer.'},389:e=>{e.exports='This Month IconA picture depicting a calendar with an encircled check mark at the end.'},8826:e=>{e.exports='This Quarter IconA picture depicting an arrow pointing right to a quarter of a circle.'},8961:e=>{e.exports='This Quarter IconA picture depicting a square with an arrow pointing up.'},1602:e=>{e.exports='This Year IconA picture depicting a stacked calendar with a check mark in the middle.'},9089:e=>{e.exports='TikTok IconA picture showing the TikTok application logo.'},9761:e=>{e.exports='Timeline IconA picture showing a horizontal line with perpendicular lines across its axis.'},3150:e=>{e.exports='Tinder IconA picture showing the Tinder application icon.'},2579:e=>{e.exports='Today IconA picture depicting a calendar with a check mark in the middle.'},3640:e=>{e.exports='Toilet Paper IconA picture depicting a roll of toilet paper.'},2625:e=>{e.exports='Tomorrow IconA picture depicting a calendar with a right-pointed arrow in the middle.'},8183:e=>{e.exports='Tooth Cracked IconA picture depicting a chipped human tooth.'},5828:e=>{e.exports='Tooth IconA picture depicting a human tooth.'},1869:e=>{e.exports='Top Percentile Records IconShows percentile records positioned at the top.'},6703:e=>{e.exports='Top Records IconShows records positioned at the top.'},5826:e=>{e.exports='TouchID IconA picture showing the Apple TouchID logo.'},133:e=>{e.exports='Tow Truck IconA picture showing a tow truck.'},8238:e=>{e.exports='Towel Rail IconA picture depicting a towel rail in a bathroom.'},9588:e=>{e.exports='Tractor IconA picture depicting a tractor vehicle.'},8231:e=>{e.exports='Trowel IconA picture depicting a trowel tool.'},1316:e=>{e.exports='Twitch IconA picture showing the Twitch application logo.'},8915:e=>{e.exports='Twitter IconA picture showing the Twitter application logo.'},5608:e=>{e.exports='Ungroup IconA picture depicting a broken box with four squares inside it.'},6936:e=>{e.exports='Unpin Left IconA picture depicting a crossed-out left-pointed pin.'},2486:e=>{e.exports='Unpin Right IconA picture depicting a crossed-out right-pointed pin.'},8858:e=>{e.exports='USA California IconA picture depicting the shape of the state of California.'},5134:e=>{e.exports='USA Florida IconA picture depicting the shape of the state of Florida.'},3107:e=>{e.exports='USA lower 48 States IconA picture depicting the shape of the lower 48 states of the USA.'},5862:e=>{e.exports='USA NY iconA picture depicting the shape of the state of New York.'},9383:e=>{e.exports='USA Party Democratic IconA picture showing the Democratic Party symbol of a donkey.'},4612:e=>{e.exports='USA Party Green IconA picture showing the Green Party symbol.'},8530:e=>{e.exports='USA Party Libertarian IconA picture showing the Libertarian Party symbol of a hedgehog.'},8568:e=>{e.exports='USA Party Republican IconA picture showing the Republican Party symbol of an elephant.'},3089:e=>{e.exports='USA TX iconA picture depicting the shape of the state of Texas.'},2402:e=>{e.exports='USB IconA picture showing the USB standard logo.'},5199:e=>{e.exports='Verified Account IconA picture showing a badge with a check mark in the middle.'},3562:e=>{e.exports='Veterinarian IconA picture depicting a paw footprint with a medical cross inside.'},4292:e=>{e.exports='Vial IconA picture depicting a vial.'},7374:e=>{e.exports='Viber IconA picture showing the Viber application logo.'},6337:e=>{e.exports='Vimeo IconA picture showign the Vimeo website logo.'},1920:e=>{e.exports='Virus Protection IconA picture depicting a shield with a virus on it.'},256:e=>{e.exports='Virus Stop IconA picture depicting a crossed-out virus symbol.'},4437:e=>{e.exports='Virus IconA picture depicting a corona-shaped virus.'},5437:e=>{e.exports='Visa IconA picture showing the Visa credit card logo.'},6913:e=>{e.exports='Visually Impaired IconA picture depicting a crossed-out human eye.'},8589:e=>{e.exports='Vote IconA picture depicting a voting box with an arrow pointed towards a slid.'},8921:e=>{e.exports='VSCode IconA picture showing the Microsoft VSCode logo.'},3794:e=>{e.exports='Water Boiler IconA picture depicting a water boiler.'},3859:e=>{e.exports='Water Heater IconA picture depicting a water heater.'},8014:e=>{e.exports='Water Tap IconA picture depicting a water tap.'},3864:e=>{e.exports='WeChat IconA picture showing the WeChat icon.'},8310:e=>{e.exports='Weight Scale IconA picture depicting a weight scale.'},2927:e=>{e.exports='WhatsApp IconA picture showing the WhatsApp application icon.'},8352:e=>{e.exports='White House IconA picture depicting the famous White House presidential building.'},6459:e=>{e.exports='White House IconA picture depicting the famous White House presidential building.'},3207:e=>{e.exports='Wire Transfer IconA picture showing the euro and dollar symbols moving in different directions.'},8341:e=>{e.exports='Worker IconA picture depicting a construction worker with a helmet.'},5236:e=>{e.exports='Workers IconA picture depicting a group of construction workers with helmets.'},5274:e=>{e.exports='Workflow IconA picture depicting a line diverging into three separate lines.'},4895:e=>{e.exports='Wrench IconA picture showing a wrench.'},7349:e=>{e.exports=''},4910:e=>{e.exports=''},4289:e=>{e.exports='Yen Circled IconA picture of an encircled Japanese Yen symbol.'},1828:e=>{e.exports='Yesterday IconA picture depicting a calendar with a back arrow in the middle.'},3495:e=>{e.exports='YouTube IconA picture showing the YouTube website logo.'}},t={};function a(i){var s=t[i];if(void 0!==s)return s.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,a),l.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};(()=>{a.d(i,{lTk:()=>kg,Bd$:()=>xg,_im:()=>cc,U_J:()=>m,KJG:()=>w,SAz:()=>u,t1N:()=>gs,MBC:()=>dc,$6P:()=>fg,cIv:()=>In,ZlE:()=>nc,slj:()=>Ln,huW:()=>hc,hi0:()=>rv,RDp:()=>cv,W3x:()=>Cn,hnq:()=>jn,_wT:()=>qn,uyw:()=>b,NKz:()=>z,c07:()=>y,wbJ:()=>x,oQ7:()=>Ql,FbX:()=>Ul,oGm:()=>Gl,bpX:()=>Ol,Xae:()=>Zl,YP5:()=>$l,R3W:()=>Yl,kc5:()=>vc,QEg:()=>gc,prf:()=>pc,CaT:()=>_l,VQQ:()=>Jl,Ncd:()=>Sn,Tl5:()=>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H1N:()=>fh,LgZ:()=>Bi,WEX:()=>wd,Roi:()=>Ti,xAR:()=>bd,mY5:()=>ud,c2U:()=>Li,sR5:()=>Ii,Tr9:()=>Ah,A$7:()=>zt,_CP:()=>yt,NLz:()=>xt,m3M:()=>kt,$Dt:()=>Hh,kmR:()=>mg,Z8D:()=>ji,wJO:()=>M,lQ1:()=>V,ZTw:()=>js,iZ_:()=>qs,s5D:()=>Cs,ZsF:()=>Ss,_2J:()=>Ts,THr:()=>Ps,EzF:()=>Ds,B_v:()=>Ws,zOh:()=>Ns,Ase:()=>Mh,$W5:()=>Tv,iKp:()=>zd,OTU:()=>yd,CuM:()=>wg,h1n:()=>Vh,VMF:()=>fd,yYn:()=>xd,kN$:()=>kd,oln:()=>Bh,G3k:()=>Ad,Nsu:()=>Rs,jmd:()=>Ih,eGZ:()=>ft,ZJ_:()=>At,bRk:()=>Ht,U3_:()=>ug,Gpw:()=>Hd,ONB:()=>bg,$kt:()=>Es,gYK:()=>Fs,GtC:()=>Eo,KK7:()=>Mt,CBM:()=>Vt,Ldn:()=>Pv,UZF:()=>Bt,tyl:()=>qi,$Sj:()=>Ci,Gf8:()=>Fo,CvE:()=>Si,ZB9:()=>zg});var e=a(4888),t=a(4100),s=a(4207),l=a(6603),o=a(7266),r=a(8542),c=a(6461),d=a(4092),n=a(2715),h=a(6306),v=a(7530),g=a(6936),p=a(2486);const m={name:\"add-child\",value:e,categories:[\"content\"],keywords:[\"add\",\"insert\",\"row\",\"child\",\"new\",\"below\",\"under\"]},w={name:\"add-filter\",value:t,categories:[\"content\"],keywords:[\"add\",\"filter\",\"funnel\",\"leads\",\"new\"]},u={name:\"add-row\",value:s,categories:[\"content\"],keywords:[\"add\",\"insert\",\"row\",\"new\"]},b={name:\"arrow-down-left\",value:l,categories:[\"content\"],keywords:[\"arrow\",\"down\",\"left\",\"dimension\"]},z={name:\"arrow-down-right\",value:o,categories:[\"content\"],keywords:[\"arrow\",\"down\",\"right\"]},y={name:\"arrow-up-left\",value:r,categories:[\"content\"],keywords:[\"arrow\",\"up\",\"left\"]},x={name:\"arrow-up-right\",value:c,categories:[\"content\"],keywords:[\"arrow\",\"up\",\"right\",\"axis\",\"coordinate\",\"system\"]},k={name:\"jump-down\",value:d,categories:[\"content\"],keywords:[\"jump\",\"down\",\"arrow\",\"below\",\"under\"]},f={name:\"jump-up\",value:n,categories:[\"content\"],keywords:[\"jump\",\"up\",\"arrow\",\"above\"]},A={name:\"pin-left\",value:h,categories:[\"content\"],keywords:[\"pin\",\"freeze\",\"left\",\"pushpin\",\"nail\",\"marker\",\"attach\",\"tack\",\"thumbtack\"]},H={name:\"pin-right\",value:v,categories:[\"content\"],keywords:[\"pin\",\"freeze\",\"right\",\"pushpin\",\"nail\",\"marker\",\"attach\",\"tack\",\"thumbtack\"]},M={name:\"unpin-left\",value:g,categories:[\"content\"],keywords:[\"unpin\",\"unfreeze\",\"left\",\"pushpin\",\"nail\",\"marker\",\"detach\",\"tack\",\"thumbtack\"]},V={name:\"unpin-right\",value:p,categories:[\"content\"],keywords:[\"unpin\",\"unfreeze\",\"right\",\"pushpin\",\"nail\",\"marker\",\"detach\",\"tack\",\"thumbtack\"]},B=[m,w,u,b,z,y,x,k,f,A,H,M,V];var I=a(4774),L=a(2124),j=a(8205),q=a(5765),C=a(4827),S=a(4303),T=a(7909),P=a(3960),D=a(2642),W=a(4666),N=a(7781),R=a(3284),E=a(5216),F=a(1075),U=a(3360),G=a(9173),O=a(5487),Q=a(9357),Z=a(8652),$=a(647),Y=a(9840),_=a(9151),J=a(4589),K=a(4284),X=a(2753),ee=a(2252),te=a(4783),ae=a(4917),ie=a(425),se=a(3223),le=a(2471),oe=a(3877),re=a(5604),ce=a(2141),de=a(2451),ne=a(6143),he=a(1980),ve=a(2160),ge=a(7531),pe=a(7667),me=a(4592),we=a(219),ue=a(8469),be=a(8935),ze=a(133),ye=a(8238),xe=a(9588),ke=a(8231),fe=a(3794),Ae=a(3859),He=a(8014),Me=a(8341),Ve=a(5236),Be=a(4895);const Ie={name:\"brick-wall\",value:I,categories:[\"construction\"],keywords:[\"brick\",\"wall\",\"block\",\"pattern\",\"architecture\",\"stone\",\"building\",\"construction\",\"house\"]},Le={name:\"brush\",value:L,categories:[\"construction\"],keywords:[\"brush\",\"decoration\",\"interior\",\"paint\",\"painting\",\"roller\",\"wall\"]},je={name:\"bucket\",value:j,categories:[\"construction\"],keywords:[\"bucket\",\"decoration\",\"interior\",\"paint\",\"water\",\"house\",\"wall\",\"construction\"]},qe={name:\"building\",value:q,categories:[\"construction\"],keywords:[\"building\",\"home\",\"house\",\"apartments\",\"architecture\",\"structure\"]},Ce={name:\"bulldozer\",value:C,categories:[\"construction\"],keywords:[\"bulldozer\",\"digging\",\"excavator\",\"machine\"]},Se={name:\"cement-mixer\",value:S,categories:[\"construction\"],keywords:[\"cement\",\"mixer\",\"concrete\",\"construction\",\"machine\",\"truck\"]},Te={name:\"construction-cone\",value:T,categories:[\"construction\"],keywords:[\"construction\",\"cone\",\"barrier\",\"caution\",\"road\",\"safety\"]},Pe={name:\"construction-project\",value:P,categories:[\"construction\"],keywords:[\"construction\",\"project\",\"blueprint\",\"plan\",\"architecture\"]},De={name:\"construction-trolley\",value:D,categories:[\"construction\"],keywords:[\"construction\",\"trolley\",\"carrier\",\"cart\",\"cement\",\"holder\"]},We={name:\"cordless-screwdriver\",value:W,categories:[\"construction\"],keywords:[\"cordless\",\"screwdriver\",\"drill\",\"driver\",\"electric\",\"power\"]},Ne={name:\"country-home\",value:N,categories:[\"construction\"],keywords:[\"country\",\"home\",\"house\",\"real estate\"]},Re={name:\"crane\",value:R,categories:[\"construction\"],keywords:[\"crane\",\"construction\",\"hook\",\"machinery\",\"tower\"]},Ee={name:\"dump-truck\",value:E,categories:[\"construction\"],keywords:[\"dump\",\"truck\",\"dumper\",\"garbage\",\"trash\",\"waste\",\"vehicle\",\"transport\"]},Fe={name:\"estate\",value:F,categories:[\"construction\"],keywords:[\"estate\",\"building\",\"home\",\"house\",\"architecture\"]},Ue={name:\"forklift-truck\",value:U,categories:[\"construction\"],keywords:[\"forklift\",\"truck\",\"warehouse\",\"industrial\",\"transport\",\"lift\",\"cargo\",\"logistics\",\"loader\",\"machinery\"]},Ge={name:\"foundation\",value:G,categories:[\"construction\"],keywords:[\"foundation\",\"wall\",\"architecture\",\"construction\"]},Oe={name:\"fountain\",value:O,categories:[\"construction\"],keywords:[\"fountain\",\"garden\",\"splash\",\"park\",\"water\"]},Qe={name:\"hammer\",value:Q,categories:[\"construction\"],keywords:[\"hammer\",\"construction\",\"equipment\",\"hardware\",\"repair\",\"tool\",\"work\",\"tools\"]},Ze={name:\"impact-drill\",value:Z,categories:[\"construction\"],keywords:[\"impact drill\",\"power\",\"tools\",\"driver\",\"construction\",\"tool\",\"work\",\"repair\",\"drill\"]},$e={name:\"ladder\",value:$,categories:[\"construction\"],keywords:[\"ladder\",\"construction\",\"building\",\"climb\",\"height\",\"tool\",\"work\",\"tools\"]},Ye={name:\"maintenance\",value:Y,categories:[\"construction\"],keywords:[\"maintenance\",\"construction\",\"tools\",\"hardware\",\"equipment\",\"wrench\",\"screwdriver\",\"tool kit\",\"tool box\"]},_e={name:\"oil-platform\",value:_,categories:[\"construction\"],keywords:[\"oil platform\",\"industry\",\"drilling\",\"platform\",\"oil\",\"rig\",\"offshore\"]},Je={name:\"paint-roller\",value:J,categories:[\"construction\"],keywords:[\"paint roller\",\"equipment\",\"house construction\",\"paint\",\"roller\",\"wall paint\",\"tools\",\"tool\"]},Ke={name:\"pipes\",value:K,categories:[\"construction\"],keywords:[\"pipes\",\"plumbing\",\"pipe\",\"drain\",\"water\"]},Xe={name:\"piping-system\",value:X,categories:[\"construction\"],keywords:[\"piping system\",\"piping\",\"water\",\"drain\",\"water\",\"industrial\"]},et={name:\"pliers\",value:ee,categories:[\"construction\"],keywords:[\"pliers\",\"equipment\",\"tools\",\"tool\",\"repairs\",\"hardware\"]},tt={name:\"pneumatic-hammer-drill\",value:te,categories:[\"construction\"],keywords:[\"pneumatic hammer drill\",\"drill\",\"hammer\",\"hydraulic\",\"jack\",\"kit\",\"pneumatic\",\"asphalt\"]},at={name:\"radiator\",value:ae,categories:[\"construction\"],keywords:[\"radiator\",\"heat\",\"warm\",\"interior\",\"heater\",\"heating\"]},it={name:\"restricted-area\",value:ie,categories:[\"construction\"],keywords:[\"restricted area\",\"zone\",\"no entry\",\"warning sign\",\"caution zone\",\"area\",\"military\",\"restricted\"]},st={name:\"road-roller\",value:se,categories:[\"construction\"],keywords:[\"road roller\",\"construction\",\"road\",\"roller\",\"vehicle\",\"roadwork\"]},lt={name:\"rulers\",value:le,categories:[\"construction\"],keywords:[\"rulers\",\"measure\",\"scale\",\"measurement\",\"centimeter\",\"tools\"]},ot={name:\"safety-vest\",value:oe,categories:[\"construction\"],keywords:[\"safety vest\",\"construction\",\"engineer\",\"jacket\",\"protect\",\"safety\"]},rt={name:\"saw\",value:re,categories:[\"construction\"],keywords:[\"saw\",\"hand\",\"tools\",\"woodworking\",\"equipment\",\"tool\"]},ct={name:\"scissor-lift\",value:ce,categories:[\"construction\"],keywords:[\"scissor lift\",\"lift\",\"scaffolding\",\"scissor\",\"hydraulic\",\"construction\",\"high\",\"factory\",\"industry\"]},dt={name:\"screwdriver\",value:de,categories:[\"construction\"],keywords:[\"screwdriver\",\"tools\",\"tool\",\"hardware\",\"screw\",\"fixer\",\"repair\"]},nt={name:\"shovel\",value:ne,categories:[\"construction\"],keywords:[\"shovel\",\"digging\",\"tool\",\"spade\",\"equipment\"]},ht={name:\"skyscrapers\",value:he,categories:[\"construction\"],keywords:[\"skyscrapers\",\"buildings\",\"city\",\"cityscape\",\"downtown\",\"skyline\",\"architecture\"]},vt={name:\"solar-panel\",value:ve,categories:[\"construction\"],keywords:[\"solar panel\",\"alternative\",\"energy\",\"electricity\",\"panel\",\"solar\"]},gt={name:\"soldering-iron\",value:ge,categories:[\"construction\"],keywords:[\"soldering iron\",\"soldering\",\"iron\",\"tool\",\"copper\",\"manufactoring\",\"electronic\"]},pt={name:\"stairs\",value:pe,categories:[\"construction\"],keywords:[\"stairs\",\"building\",\"climb\",\"height\"]},mt={name:\"stop-hand\",value:me,categories:[\"construction\"],keywords:[\"stop hand\",\"stop\",\"sign\",\"halt\",\"adblock\"]},wt={name:\"table-saw-blade\",value:we,categories:[\"construction\"],keywords:[\"table saw\",\"blade\",\"cut\",\"saw\",\"table\"]},ut={name:\"tap-water\",value:ue,categories:[\"construction\"],keywords:[\"tap water\",\"tap\",\"water\",\"faucet\",\"drip\",\"leak\"]},bt={name:\"tapeline\",value:be,categories:[\"construction\"],keywords:[\"tapeline\",\"centimeter\",\"inches tape\",\"measuring tape\",\"meter stick\",\"inches\",\"measure\",\"metre\",\"ruler\"]},zt={name:\"tow-truck\",value:ze,categories:[\"construction\"],keywords:[\"tow truck\",\"repair\",\"service\",\"tow\",\"truck\",\"towing\",\"vehicle\",\"transport\"]},yt={name:\"towel-rail\",value:ye,categories:[\"construction\"],keywords:[\"towel rail\",\"warmer\",\"heated\",\"towel\",\"rail\",\"bathroom\",\"interior\",\"rack\"]},xt={name:\"tractor\",value:xe,categories:[\"construction\"],keywords:[\"tractor\",\"vehicle\",\"machinery\"]},kt={name:\"trowel\",value:ke,categories:[\"construction\"],keywords:[\"trowel\",\"cement\",\"equipment\",\"tool\",\"renovation\",\"maintenance\"]},ft={name:\"water-boiler\",value:fe,categories:[\"construction\"],keywords:[\"water boiler\",\"boiler\",\"heater\",\"water\",\"heating\",\"appliance\"]},At={name:\"water-heater\",value:Ae,categories:[\"construction\"],keywords:[\"water heater\",\"heater\",\"water\",\"tank\",\"appliance\",\"electrical\",\"heating\"]},Ht={name:\"water-tap\",value:He,categories:[\"construction\"],keywords:[\"water tap\",\"tap\",\"faucet\",\"water\",\"plumbing\",\"valve\"]},Mt={name:\"worker\",value:Me,categories:[\"construction\"],keywords:[\"worker\",\"builder\",\"engineer\",\"man\",\"labor\"]},Vt={name:\"workers\",value:Ve,categories:[\"construction\"],keywords:[\"workers\",\"crew\",\"builders\",\"engineers\",\"men\",\"constructors\"]},Bt={name:\"wrench\",value:Be,categories:[\"construction\"],keywords:[\"wrench\",\"construction\",\"equipment\",\"hardware\",\"metal\",\"tool\"]},It=[Ie,Le,je,qe,Ce,Se,Te,Pe,De,We,Ne,Re,Ee,Fe,Ue,Ge,Oe,Qe,Ze,$e,Ye,_e,Je,Ke,Xe,et,tt,at,it,st,lt,ot,rt,ct,dt,nt,ht,vt,gt,pt,mt,wt,ut,bt,zt,yt,xt,kt,ft,At,Ht,Mt,Vt,Bt];var Lt=a(2941),jt=a(788),qt=a(8760),Ct=a(1319),St=a(7784),Tt=a(2558),Pt=a(1085),Dt=a(1544),Wt=a(3099),Nt=a(5346),Rt=a(6312),Et=a(6379),Ft=a(4812),Ut=a(8825),Gt=a(2899),Ot=a(6855),Qt=a(1619),Zt=a(7992),$t=a(8805),Yt=a(5124),_t=a(5646),Jt=a(761),Kt=a(4212),Xt=a(7356),ea=a(9120),ta=a(8293),aa=a(5238),ia=a(4487),sa=a(4013),la=a(2418),oa=a(7666),ra=a(2367),ca=a(7675),da=a(7996),na=a(9446),ha=a(1855),va=a(7375),ga=a(8577),pa=a(4183),ma=a(3480),wa=a(563),ua=a(7564),ba=a(8169),za=a(6843),ya=a(3898),xa=a(389),ka=a(1602),fa=a(8826),Aa=a(8961),Ha=a(2579),Ma=a(6703),Va=a(1869),Ba=a(2625),Ia=a(5608),La=a(1828),ja=a(4910),qa=a(7349);const Ca={name:\"bottom-percentile-records\",value:jt,categories:[\"editor\"]},Sa={name:\"bottom-records\",value:Lt,categories:[\"editor\"]},Ta={name:\"case-sensitive\",value:qt,categories:[\"editor\"],keywords:[\"case\",\"sensitive\",\"character\",\"text\",\"mode\",\"sentence\",\"style\",\"change\",\"compare\",\"filter\"]},Pa={name:\"check\",value:Ct,categories:[\"editor\"],keywords:[\"check\",\"checked\",\"mark\",\"tick\",\"ok\",\"success\"]},Da={name:\"contains\",value:St,categories:[\"editor\"],keywords:[\"contains\",\"letter\",\"contain\",\"compare\",\"filter\"]},Wa={name:\"custom-filter\",value:Tt,categories:[\"editor\"],keywords:[\"custom\",\"filter\"]},Na={name:\"does-not-contain\",value:Pt,categories:[\"editor\"],keywords:[\"contains\",\"character\",\"contain\",\"compare\",\"filter\"]},Ra={name:\"does-not-end-with\",value:Dt,categories:[\"editor\"]},Ea={name:\"does-not-start-with\",value:Wt,categories:[\"editor\"]},Fa={name:\"end-expression\",value:Nt,categories:[\"editor\"],keywords:[\"end\",\"expression\",\"arrow\",\"right\"]},Ua={name:\"ends-with\",value:Rt,categories:[\"editor\"],keywords:[\"end\",\"character\",\"compare\",\"filter\"]},Ga={name:\"equals\",value:Et,categories:[\"editor\"],keywords:[\"equal\",\"equals\",\"compare\",\"filter\",\"equality\",\"calculation\",\"math\"]},Oa={name:\"exact-match\",value:Ft,categories:[\"editor\"],keywords:[\"exact\",\"match\",\"arrow\",\"target\",\"goal\",\"aim\",\"business\",\"dart\",\"bullseye\"]},Qa={name:\"greater-than\",value:Ut,categories:[\"editor\"],keywords:[\"greater\",\"more\",\"compare\",\"next\",\"forward\",\"chevron\",\"math\",\"inequalty\",\"arrow\"]},Za={name:\"greater-than-or-equal\",value:Gt,categories:[\"editor\"],keywords:[\"greater\",\"more\",\"equal\",\"equals\",\"compare\",\"math\"]},$a={name:\"is-after\",value:Ot,categories:[\"editor\"],keywords:[\"after\",\"comparison\",\"before\",\"convert\",\"decode\",\"render\",\"scan\"]},Ya={name:\"is-before\",value:Qt,categories:[\"editor\"],keywords:[\"after\",\"comparison\",\"before\",\"convert\",\"decode\",\"render\",\"scan\"]},_a={name:\"is-empty\",value:Zt,categories:[\"editor\"],keywords:[\"empty\",\"box\",\"nothing\"]},Ja={name:\"is-false\",value:$t,categories:[\"editor\"],keywords:[\"false\",\"true\",\"choice\",\"options\",\"yes\",\"no\",\"check\",\"tick\",\"cross\"]},Ka={name:\"is-not-null\",value:Yt,categories:[\"editor\"],keywords:[\"empty\",\"null\",\"void\",\"problem\",\"number\",\"invalid\",\"inoperative\",\"none\",\"nothing\"]},Xa={name:\"is-null\",value:_t,categories:[\"editor\"],keywords:[\"null\",\"circle\",\"zero\",\"o\"]},ei={name:\"is-true\",value:Jt,categories:[\"editor\"],keywords:[\"true\",\"false\",\"choice\",\"options\",\"yes\",\"no\",\"check\",\"tick\",\"cross\"]},ti={name:\"last-month\",value:Kt,categories:[\"editor\"],keywords:[\"last\",\"calendar\",\"month\",\"date\",\"day\",\"previous\",\"schedule\",\"arrow\",\"left\",\"page\"]},ai={name:\"last-quarter\",value:aa,categories:[\"editor\"]},ii={name:\"last-week\",value:ia,categories:[\"editor\"]},si={name:\"last-year\",value:Xt,categories:[\"editor\"],keywords:[\"last\",\"calendar\",\"month\",\"date\",\"previous\",\"schedule\",\"arrow\",\"left\"]},li={name:\"less-than\",value:ea,categories:[\"editor\"],keywords:[\"less\",\"smaller\",\"compare\",\"previous\",\"back\",\"chevron\",\"math\",\"inequalty\",\"arrow\"]},oi={name:\"less-than-or-equal\",value:ta,categories:[\"editor\"],keywords:[\"less\",\"smaller\",\"equal\",\"equals\",\"compare\",\"math\"]},ri={name:\"match\",value:sa,categories:[\"editor\"],keywords:[\"match\",\"fit\",\"puzzle\",\"pieces\",\"jigsaw\",\"combination\",\"play\",\"game\",\"toy\"]},ci={name:\"month\",value:la,categories:[\"editor\"]},di={name:\"next-month\",value:oa,categories:[\"editor\"],keywords:[\"next\",\"calendar\",\"month\",\"date\",\"day\",\"following\",\"schedule\",\"arrow\",\"right\",\"page\"]},ni={name:\"next-quarter\",value:ha,categories:[\"editor\"]},hi={name:\"next-week\",value:ca,categories:[\"editor\"]},vi={name:\"next-year\",value:ra,categories:[\"editor\"],keywords:[\"next\",\"calendar\",\"month\",\"date\",\"following\",\"schedule\",\"arrow\",\"right\"]},gi={name:\"not-empty\",value:da,categories:[\"editor\"],keywords:[\"empty\",\"full\"]},pi={name:\"not-equal\",value:na,categories:[\"editor\"],keywords:[\"equal\",\"equals\",\"different\",\"compare\",\"filter\",\"equality\",\"calculation\",\"math\"]},mi={name:\"previous-quarter\",value:va,categories:[\"editor\"]},wi={name:\"previous-week\",value:ga,categories:[\"editor\"]},ui={name:\"quarter-four\",value:pa,categories:[\"editor\"]},bi={name:\"quarter-one\",value:ma,categories:[\"editor\"]},zi={name:\"quarter-three\",value:ua,categories:[\"editor\"]},yi={name:\"quarter-two\",value:wa,categories:[\"editor\"]},xi={name:\"select-all\",value:ba,categories:[\"editor\"],keywords:[\"all\",\"select\",\"check\",\"multiple\"]},ki={name:\"start-expression\",value:za,categories:[\"editor\"],keywords:[\"start\",\"expression\",\"arrow\",\"left\"]},fi={name:\"starts-with\",value:ya,categories:[\"editor\"],keywords:[\"start\",\"character\",\"compare\",\"filter\"]},Ai={name:\"this-month\",value:xa,categories:[\"editor\"],keywords:[\"this\",\"calendar\",\"month\",\"date\",\"day\",\"current\",\"schedule\",\"check\",\"page\",\"now\"]},Hi={name:\"this-quarter\",value:fa,categories:[\"editor\"]},Mi={name:\"this-week\",value:Aa,categories:[\"editor\"]},Vi={name:\"this-year\",value:ka,categories:[\"editor\"],keywords:[\"this\",\"calendar\",\"month\",\"date\",\"current\",\"schedule\",\"check\",\"now\"]},Bi={name:\"today\",value:Ha,categories:[\"editor\"],keywords:[\"today\",\"now\",\"check\",\"date\",\"day\",\"calendar\",\"current\",\"schedule\",\"event\"]},Ii={name:\"top-records\",value:Ma,categories:[\"editor\"]},Li={name:\"top-percentile-records\",value:Va,categories:[\"editor\"]},ji={name:\"ungroup\",value:Ia,categories:[\"editor\"],keywords:[\"ungroup\",\"exclude\",\"extract\"]},qi={name:\"year\",value:ja,categories:[\"editor\"]},Ci={name:\"year-to-date\",value:qa,categories:[\"editor\"]},Si={name:\"yesterday\",value:La,categories:[\"editor\"],keywords:[\"yesterday\",\"date\",\"calendar\",\"left\",\"arrow\",\"past\",\"previous\",\"day\"]},Ti={name:\"tomorrow\",value:Ba,categories:[\"editor\"],keywords:[\"tomorrow\",\"date\",\"calendar\",\"right\",\"arrow\",\"future\",\"next\",\"day\"]},Pi=[Ca,Sa,Ta,Pa,Da,Wa,Na,Ra,Ea,Fa,Ua,Ga,Oa,Qa,Za,$a,Ya,_a,Ja,Ka,Xa,ei,ti,ai,ii,si,li,oi,ri,ci,di,ni,hi,vi,gi,pi,mi,wi,ui,bi,zi,yi,Ua,Ga,_a,xi,ki,fi,Ai,Hi,Mi,Vi,Bi,Li,Ii,ji,Ci,qi,Si,Ti];var Di=a(3335),Wi=a(1046),Ni=a(8758),Ri=a(480),Ei=a(2340),Fi=a(3921),Ui=a(2203),Gi=a(9849),Oi=a(3076),Qi=a(8243),Zi=a(7587),$i=a(4595),Yi=a(5099),_i=a(8030),Ji=a(7681),Ki=a(1221),Xi=a(1683),es=a(9761),ts=a(8858),as=a(5134),is=a(3107),ss=a(5862),ls=a(9383),os=a(4612),rs=a(8530),cs=a(8568),ds=a(3089),ns=a(8589),hs=a(8352),vs=a(6459);const gs={name:\"aggregation\",value:Di,categories:[\"election\"],keywords:[\"aggregation\",\"election results\",\"results\",\"elections\",\"merge\",\"converge\"]},ps={name:\"candidate-results\",value:Wi,categories:[\"election\"],keywords:[\"front runner\",\"slate\",\"candidate\",\"results\",\"elections\"]},ms={name:\"debate\",value:Ni,categories:[\"election\"],keywords:[\"discussion\",\"dispute\",\"argument\",\"elections\",\"battle\",\"fight\",\"boxing\"]},ws={name:\"electoral-votes\",value:Ri,categories:[\"election\"],keywords:[\"electoral college\",\"electoral\",\"votes\",\"presidential election\",\"elections\"]},us={name:\"eu-parliament\",value:Ei,categories:[\"election\"],keywords:[\"European Union\",\"Europe\",\"parliament\",\"EU\",\"government\",\"politics\"]},bs={name:\"female-candidate\",value:Fi,categories:[\"election\"],keywords:[\"female\",\"woman\",\"elections\",\"candidate\",\"speaker\",\"presenter\"]},zs={name:\"horn\",value:Ui,categories:[\"election\"],keywords:[\"broadcast\",\"megaphone\",\"speaker\",\"volume\",\"elections\"]},ys={name:\"male-candidate\",value:Gi,categories:[\"election\"],keywords:[\"male\",\"man\",\"elections\",\"candidate\",\"speaker\",\"presenter\"]},xs={name:\"parliament-1\",value:Oi,categories:[\"election\"],keywords:[\"parliament\",\"capitol\",\"goverment\",\"house\",\"politics\",\"Europe\",\"temple\"]},ks={name:\"parliament-2\",value:Qi,categories:[\"election\"],keywords:[\"parliament\",\"capitol\",\"goverment\",\"house\",\"politics\",\"Berlin\",\"gate\",\"monument\"]},fs={name:\"popular-votes\",value:Zi,categories:[\"election\"],keywords:[\"vote\",\"ballot\",\"cast\",\"station\",\"election\"]},As={name:\"protester-signs\",value:$i,categories:[\"election\"],keywords:[\"protest\",\"protester\",\"demonstration\",\"signs\",\"revolt\",\"turmoil\",\"riot\"]},Hs={name:\"results-by-candidates\",value:Yi,categories:[\"election\"],keywords:[\"results\",\"chart\",\"pie\"]},Ms={name:\"results-piechart\",value:_i,categories:[\"election\"],keywords:[\"results\",\"chart\",\"pie\"]},Vs={name:\"scales-balanced\",value:Ji,categories:[\"election\"],keywords:[\"scales\",\"justice\",\"balance\",\"legal\",\"weight\"]},Bs={name:\"scales-unbalanced\",value:Ki,categories:[\"election\"],keywords:[\"scales\",\"unfair\",\"unbalanced\",\"off-balance\",\"legal\",\"weight\"]},Is={name:\"stats\",value:Xi,categories:[\"election\"],keywords:[\"statistics\",\"chart\",\"screen\",\"display\",\"monitor\"]},Ls={name:\"timeline\",value:es,categories:[\"election\"],keywords:[\"timeline\",\"events\"]},js={name:\"usa-ca\",value:ts,categories:[\"election\"],keywords:[\"USA\",\"state\",\"California\",\"ca\"]},qs={name:\"usa-fl\",value:as,categories:[\"election\"],keywords:[\"USA\",\"state\",\"Florida\",\"fl\"]},Cs={name:\"usa-lower-48-states\",value:is,categories:[\"election\"],keywords:[\"USA\",\"state\",\"lower\",\"48\"]},Ss={name:\"usa-ny\",value:ss,categories:[\"election\"],keywords:[\"USA\",\"state\",\"New York\",\"ny\"]},Ts={name:\"usa-party-democratic\",value:ls,categories:[\"election\"],keywords:[\"USA\",\"party\",\"democratic\",\"democrat\",\"democrats\",\"donkey\",\"politics\"]},Ps={name:\"usa-party-green\",value:os,categories:[\"election\"],keywords:[\"USA\",\"party\",\"green\",\"politics\"]},Ds={name:\"usa-party-libertarian\",value:rs,categories:[\"election\"],keywords:[\"USA\",\"party\",\"libertarian\",\"hedgehog\",\"politics\"]},Ws={name:\"usa-party-republican\",value:cs,categories:[\"election\"],keywords:[\"USA\",\"party\",\"republican\",\"republicans\",\"elephant\",\"politics\"]},Ns={name:\"usa-tx\",value:ds,categories:[\"election\"],keywords:[\"USA\",\"state\",\"Texas\",\"tx\"]},Rs={name:\"vote\",value:ns,categories:[\"election\"],keywords:[\"vote\",\"cast\",\"ballot\",\"box\",\"station\",\"election\"]},Es={name:\"white-house-1\",value:hs,categories:[\"election\"],keywords:[\"white house\",\"president\",\"house\",\"government\",\"Washington\",\"DC\"]},Fs={name:\"white-house-2\",value:vs,categories:[\"election\"],keywords:[\"white house\",\"president\",\"house\",\"government\",\"Washington\",\"DC\",\"Athens\",\"acropolis\"]},Us=[gs,ps,ms,ws,us,bs,zs,ys,xs,ks,fs,As,Hs,Ms,Vs,Bs,Is,Ls,js,qs,Cs,Ss,Ts,Ps,Ds,Ws,Ns,Rs,Es,Fs];var Gs=a(2976),Os=a(4044),Qs=a(5516),Zs=a(4134),$s=a(1249),Ys=a(2383),_s=a(1169),Js=a(8333),Ks=a(2703),Xs=a(514),el=a(6668),tl=a(1803),al=a(2374),il=a(9979),sl=a(5156),ll=a(1786),ol=a(2353),rl=a(4578),cl=a(4175),dl=a(2801),nl=a(676),hl=a(7915),vl=a(6786),gl=a(2082),pl=a(2600),ml=a(2926),wl=a(1191),ul=a(6397),bl=a(2441),zl=a(9154),yl=a(7454),xl=a(3888),kl=a(9753),fl=a(5471),Al=a(4931),Hl=a(2943),Ml=a(1500),Vl=a(4081),Bl=a(5030),Il=a(552),Ll=a(6857),jl=a(1913),ql=a(7802),Cl=a(3931),Sl=a(8294),Tl=a(4171),Pl=a(4894),Dl=a(1733),Wl=a(3629),Nl=a(5339),Rl=a(8430),El=a(3207),Fl=a(4289);const Ul={name:\"atm-dollar\",value:Gs,categories:[\"finance\"],keywords:[\"atm\",\"usd\",\"dollar\",\"bank\",\"cash\",\"money\",\"payment\",\"deposit\",\"withdraw\",\"machine\"]},Gl={name:\"atm-euro\",value:Os,categories:[\"finance\"],keywords:[\"atm\",\"eur\",\"euro\",\"bank\",\"cash\",\"money\",\"payment\",\"deposit\",\"withdraw\",\"machine\"]},Ol={name:\"atm-pound\",value:Qs,categories:[\"finance\"],keywords:[\"atm\",\"gbp\",\"pound\",\"sterling\",\"bank\",\"cash\",\"money\",\"payment\",\"deposit\",\"withdraw\",\"machine\"]},Ql={name:\"atm\",value:Zs,categories:[\"finance\"],keywords:[\"atm\",\"bank\",\"cash\",\"money\",\"payment\",\"deposit\",\"withdraw\",\"machine\"]},Zl={name:\"atm-yen\",value:$s,categories:[\"finance\"],keywords:[\"atm\",\"jpy\",\"yen\",\"bank\",\"cash\",\"money\",\"payment\",\"deposit\",\"withdraw\",\"machine\"]},$l={name:\"auction\",value:Ys,categories:[\"finance\"],keywords:[\"auction\",\"sale\",\"gavel\",\"law\",\"judge\",\"hammer\"]},Yl={name:\"award\",value:_s,categories:[\"finance\"],keywords:[\"award\",\"medal\",\"winner\",\"first\",\"gold\",\"sport\"]},_l={name:\"bank-safe\",value:Js,categories:[\"finance\"],keywords:[\"bank\",\"safe\",\"savings\",\"secure\",\"vault\",\"deposit\",\"locker\",\"safe box\"]},Jl={name:\"barcode\",value:Ks,categories:[\"finance\"],keywords:[\"barcode\",\"code\",\"scan\",\"marketing\",\"commerce\"]},Kl={name:\"bear-market\",value:Xs,categories:[\"finance\"],keywords:[\"bear\",\"market\",\"decreasing\",\"financial\",\"economy\",\"animal\",\"stock\"]},Xl={name:\"bill-paid\",value:el,categories:[\"finance\"],keywords:[\"bill\",\"paid\",\"check\",\"invoice\",\"payment\",\"purchase\",\"accounting\",\"billing\"]},eo={name:\"budget-spending\",value:tl,categories:[\"finance\"],keywords:[\"budget\",\"spending\",\"usd\",\"dollar\",\"accounting\",\"expense\",\"investment\",\"management\",\"ballance\"]},to={name:\"bull-market\",value:al,categories:[\"finance\"],keywords:[\"bull\",\"market\",\"increasing\",\"financial\",\"economy\",\"animal\",\"stock\"]},ao={name:\"business-development\",value:il,categories:[\"finance\"],keywords:[\"business\",\"development\",\"global\",\"worldwide\",\"solutions\",\"organisation\",\"innovation\",\"management\"]},io={name:\"calculator\",value:sl,categories:[\"finance\"],keywords:[\"calculator\",\"math\",\"school\",\"business\",\"accounting\"]},so={name:\"cash\",value:ll,categories:[\"finance\"],keywords:[\"cash\",\"money\",\"notes\",\"bank\",\"pay\",\"payment\",\"banknote\",\"currency\"]},lo={name:\"cash-alt\",value:ol,categories:[\"finance\"],keywords:[\"cash\",\"money\",\"notes\",\"bank\",\"pay\",\"payment\",\"banknote\",\"currency\",\"usd\",\"dollar\"]},oo={name:\"cash-only\",value:rl,categories:[\"finance\"],keywords:[\"cash\",\"no card\",\"payment\",\"money\",\"pay\",\"cash only\"]},ro={name:\"certificate\",value:cl,categories:[\"finance\"],keywords:[\"certificate\",\"medal\",\"badge\",\"seal\",\"prize\",\"award\",\"guarantee\",\"quality\",\"stamp\",\"warranty\",\"collection\"]},co={name:\"commodities\",value:dl,categories:[\"finance\"],keywords:[\"commodities\",\"oil\",\"gold\",\"trade\",\"commodity\",\"crude\",\"market\",\"price\",\"invest\"]},no={name:\"credit-cards\",value:nl,categories:[\"finance\"],keywords:[\"credit\",\"debit\",\"cards\",\"payment\",\"shopping\",\"business\",\"money\",\"cash\"]},ho={name:\"credit-control\",value:hl,categories:[\"finance\"],keywords:[\"credit\",\"control\",\"watch\",\"eye\"]},vo={name:\"crowdfunding\",value:vl,categories:[\"finance\"],keywords:[\"crowdfunding\",\"mutual\",\"fund\",\"contribution\",\"donation\",\"money\",\"usd\",\"dollar\",\"revenue\",\"budget\",\"fundraising\"]},go={name:\"debt\",value:gl,categories:[\"finance\"],keywords:[\"debt\",\"financial\",\"usd\",\"dollar\",\"money\",\"request\"]},po={name:\"delivery\",value:pl,categories:[\"finance\"],keywords:[\"delivery\",\"truck\",\"logistics\",\"van\",\"courier\",\"shipping\",\"service\",\"vehicle\"]},mo={name:\"diamond-circled\",value:ml,categories:[\"finance\"],keywords:[\"diamond\",\"gem\",\"precious\",\"jewellery\",\"circled\",\"jewel\",\"gemstone\"]},wo={name:\"diamond\",value:wl,categories:[\"finance\"],keywords:[\"diamond\",\"gem\",\"precious\",\"jewellery\",\"jewel\",\"gemstone\"]},uo={name:\"discount\",value:ul,categories:[\"finance\"],keywords:[\"discount\",\"percent\",\"percentage\",\"sale\",\"badge\",\"off\",\"%\",\"rebate\",\"subsidy\"]},bo={name:\"dividents\",value:bl,categories:[\"finance\"],keywords:[\"dividents\",\"%\",\"percent\",\"percentage\",\"income\",\"rate\",\"cut\",\"intrest\",\"investment\"]},zo={name:\"dollar-circled\",value:zl,categories:[\"finance\"],keywords:[\"usd\",\"dollar\",\"circled\",\"currency\"]},yo={name:\"drop-shipping\",value:yl,categories:[\"finance\"],keywords:[\"drop\",\"shipping\",\"dropshipping\",\"box\",\"parachute\",\"business\",\"logistics\",\"crate\",\"air\",\"supply\",\"airdrop\",\"fortnite\",\"pubg\",\"battle royale\",\"delivery\",\"package\"]},xo={name:\"euro-circled\",value:xl,categories:[\"finance\"],keywords:[\"eur\",\"euro\",\"circled\",\"currency\",\"eu\"]},ko={name:\"face-id\",value:kl,categories:[\"finance\"],keywords:[\"faceid\",\"biometric\",\"identity\",\"security\",\"face\"]},fo={name:\"financial-insurance\",value:fl,categories:[\"finance\"],keywords:[\"financial\",\"insurance\",\"business\",\"money\",\"protection\",\"security\"]},Ao={name:\"foreign-exchange\",value:Al,categories:[\"finance\"],keywords:[\"foreign\",\"exchange\",\"currency\",\"forex\",\"swap\",\"trade\",\"bank\",\"dollar\",\"usd\",\"euro\",\"eur\",\"money\",\"rate\"]},Ho={name:\"gift\",value:Hl,categories:[\"finance\"],keywords:[\"gift\",\"present\",\"box\",\"christmas\",\"bonus\",\"give\"]},Mo={name:\"gold\",value:Ml,categories:[\"finance\"],keywords:[\"\"]},Vo={name:\"idea-generation\",value:Vl,categories:[\"finance\"],keywords:[\"gold\",\"business\",\"currency\",\"finance\",\"gold bars\",\"treasure\",\"gold blocks\",\"gold cubes\",\"gold bricks\",\"gold ingots\",\"gold biscuits\"]},Bo={name:\"invoice\",value:Bl,categories:[\"finance\"],keywords:[\"invoice\",\"accounting\",\"bill\",\"business\",\"document\",\"file\",\"billing\",\"payment\",\"purchase\"]},Io={name:\"legal-document\",value:Il,categories:[\"finance\"],keywords:[\"legal\",\"document\",\"file\",\"contract\",\"paper\",\"law\",\"court\"]},Lo={name:\"loan\",value:Ll,categories:[\"finance\"],keywords:[\"loan\",\"collateral\",\"convinience loan\",\"mortgage\",\"personal loan\",\"lending\",\"money\",\"dollar\",\"usd\"]},jo={name:\"money-bag\",value:jl,categories:[\"finance\"],keywords:[\"money\",\"bag\",\"cash\",\"coin\",\"currency\",\"dollar\",\"usd\",\"investment\"]},qo={name:\"oil\",value:ql,categories:[\"finance\"],keywords:[\"oil\",\"crude\",\"commodities\",\"barrel\",\"oil container\",\"petroleum\"]},Co={name:\"pay-date\",value:Cl,categories:[\"finance\"],keywords:[\"pay date\",\"calendar\",\"salary\",\"card\",\"payday\",\"payment\",\"finance\",\"schedule\",\"plan\",\"direct debit\"]},So={name:\"piggy-bank\",value:Sl,categories:[\"finance\"],keywords:[\"piggy bank\",\"money\",\"save\",\"savings\",\"piggybank\",\"business\",\"cash\",\"pig\",\"coin\",\"coins\",\"bank\",\"deposit\",\"piglet\"]},To={name:\"pound-circled\",value:Tl,categories:[\"finance\"],keywords:[\"gbp\",\"pound\",\"sterling\",\"circled\",\"currency\"]},Po={name:\"project-revenue\",value:Pl,categories:[\"finance\"],keywords:[\"project\",\"revenue\",\"turnover\",\"income\",\"dollar\",\"usd\",\"money\",\"capital\",\"earnings\",\"profit\",\"automation\",\"make money\"]},Do={name:\"sale\",value:Dl,categories:[\"finance\"],keywords:[\"sale\",\"circled\",\"rebate\",\"discount\",\"deal\",\"commerce\",\"shopping\",\"promo\",\"flash\",\"flashsale\"]},Wo={name:\"security\",value:Wl,categories:[\"finance\"],keywords:[\"security\",\"briefcase\",\"case\",\"guard\",\"insurance\",\"protection\",\"shield\",\"bag\",\"luggage\",\"document\",\"save\"]},No={name:\"security-alt\",value:Nl,categories:[\"finance\"],keywords:[\"security\",\"briefcase\",\"usd\",\"dollar\",\"case\",\"guard\",\"insurance\",\"protection\",\"bag\",\"luggage\",\"document\",\"save\"]},Ro={name:\"strategy\",value:Rl,categories:[\"finance\"],keywords:[\"strategy\",\"business\",\"corporate\",\"strategic\",\"management\",\"plan\",\"planning\",\"chess\",\"game\",\"play\"]},Eo={name:\"wire-transfer\",value:El,categories:[\"finance\"],keywords:[\"wire\",\"money\",\"transfer\",\"currency\",\"exchange\",\"euro\",\"eur\",\"dollar\",\"usd\",\"bank\",\"payment\",\"trade\",\"transaction\"]},Fo={name:\"yen-circled\",value:Fl,categories:[\"finance\"],keywords:[\"jpy\",\"yen\",\"circled\",\"currency\"]},Uo=[Ql,Ul,Gl,Ol,Zl,$l,Yl,_l,Jl,Kl,Xl,eo,to,ao,io,so,lo,oo,ro,co,no,ho,vo,go,po,wo,mo,uo,bo,zo,yo,xo,ko,fo,Ao,Ho,Mo,Vo,Bo,Io,Lo,jo,qo,Co,So,To,Po,Do,Wo,No,Ro,Eo,Fo];var Go=a(2099),Oo=a(1156),Qo=a(6),Zo=a(4565),$o=a(862),Yo=a(9044),_o=a(4943),Jo=a(6589),Ko=a(1115),Xo=a(3956),er=a(9250),tr=a(6405),ar=a(562),ir=a(3696),sr=a(8603),lr=a(1027),or=a(2517),rr=a(5445),cr=a(5458),dr=a(2138),nr=a(2816),hr=a(9079),vr=a(7237),gr=a(1494),pr=a(5802),mr=a(3145),wr=a(9082),ur=a(4132),br=a(348),zr=a(5963),yr=a(9773),xr=a(8314),kr=a(2490),fr=a(6941),Ar=a(8897),Hr=a(3143),Mr=a(2773),Vr=a(6138),Br=a(4344),Ir=a(3603),Lr=a(8695),jr=a(1535),qr=a(5145),Cr=a(6934),Sr=a(3688),Tr=a(9712),Pr=a(5788),Dr=a(6864),Wr=a(623),Nr=a(171),Rr=a(7982),Er=a(7814),Fr=a(5832),Ur=a(8),Gr=a(7652),Or=a(2281),Qr=a(5678),Zr=a(2554),$r=a(4335),Yr=a(2888),_r=a(1418),Jr=a(6282),Kr=a(3640),Xr=a(8183),ec=a(5828),tc=a(3562),ac=a(4292),ic=a(1920),sc=a(256),lc=a(4437),oc=a(6913),rc=a(8310);const cc={name:\"accessibility\",value:Go,categories:[\"health\"],keywords:[\"accessibility\",\"wheelchair\",\"disabled\",\"handicapped\",\"chairbound\",\"impaired\"]},dc={name:\"aids-ribbon\",value:Oo,categories:[\"health\"],keywords:[\"aids\",\"ribbon\",\"hiv\",\"care\",\"community\"]},nc={name:\"ambulance\",value:Qo,categories:[\"health\"],keywords:[\"ambulance\",\"car\",\"medicine\",\"emergency\",\"vehicle\",\"van\",\"healthcare\",\"medical\",\"rescue\"]},hc={name:\"anxiety\",value:Zo,categories:[\"health\"],keywords:[\"anxiety\",\"brainstorm\",\"mental\",\"depression\",\"despair\",\"fatigue\",\"pressure\",\"stress\",\"tension\",\"worried\"]},vc={name:\"baby-bottle\",value:$o,categories:[\"health\"],keywords:[\"baby\",\"bottle\",\"feeding\",\"milk\"]},gc={name:\"bacteria\",value:Yo,categories:[\"health\"],keywords:[\"bacteria\",\"virus\",\"covid\",\"coronavirus\",\"microbe\",\"germs\",\"science\",\"biology\"]},pc={name:\"bandage\",value:_o,categories:[\"health\"],keywords:[\"bandage\",\"band\",\"bandaid\",\"plaster\",\"aid\",\"wound\",\"first aid\",\"healing\"]},mc={name:\"biohazard\",value:Jo,categories:[\"health\"],keywords:[\"biohazard\",\"waste\"]},wc={name:\"blood\",value:Ko,categories:[\"health\"],keywords:[\"blood\",\"drop\",\"donation\",\"droplet\"]},uc={name:\"braille\",value:Xo,categories:[\"health\"],keywords:[\"braile\",\"alphabet\",\"blind\",\"read\",\"accessibility\",\"impaired\"]},bc={name:\"breastfeeding\",value:er,categories:[\"health\"],keywords:[\"breastfeeding\",\"mother\",\"nurse\"]},zc={name:\"caduceus\",value:tr,categories:[\"health\"],keywords:[\"caduceus\",\"medical\",\"asclepiuss\",\"pharmacy\",\"doctor\",\"healthcare\"]},yc={name:\"cancer-ribbon\",value:ar,categories:[\"health\"],keywords:[\"cancer\",\"ribbon\",\"awareness\",\"breast\"]},xc={name:\"clinic\",value:ir,categories:[\"health\"],keywords:[\"clinic\",\"hospital\",\"medical\",\"building\",\"therapy\",\"health center\"]},kc={name:\"condom\",value:sr,categories:[\"health\"],keywords:[\"condom\",\"contraceptive\",\"sex\",\"hiv\",\"latex\",\"preservative\",\"healthcare\",\"sexual\",\"safe\"]},fc={name:\"condom-used\",value:lr,categories:[\"health\"],keywords:[\"condom\",\"contraceptive\",\"sex\",\"hiv\",\"latex\",\"preservative\",\"healthcare\",\"sexual\",\"condom used\",\"semen\",\"sperm\",\"safe\"]},Ac={name:\"contraception\",value:or,categories:[\"health\"],keywords:[\"\"]},Hc={name:\"coronavirus\",value:rr,categories:[\"health\"],keywords:[\"coronavirus\",\"virus\",\"covid\",\"pandemic\",\"corona\",\"germ\",\"infection\"]},Mc={name:\"deafness\",value:cr,categories:[\"health\"],keywords:[\"deafness\",\"deaf\",\"accessibility\",\"hearing\",\"impaired\",\"ear\"]},Vc={name:\"dental-floss\",value:dr,categories:[\"health\"],keywords:[\"dental floss\",\"floss\",\"dentist\",\"tooth\",\"care\",\"flossing\",\"oral\",\"hygiene\",\"teeth\"]},Bc={name:\"dental-implant\",value:nr,categories:[\"health\"],keywords:[\"dental\",\"dentist\",\"implant\",\"tooth\",\"care\",\"oral\"]},Ic={name:\"diabetes\",value:hr,categories:[\"health\"],keywords:[\"diabetes\",\"hand\",\"finger\",\"blood\",\"healtcheck\",\"endocrinology\",\"blood test\",\"blood drop\",\"blood sugar\",\"glucose\"]},Lc={name:\"dna\",value:vr,categories:[\"health\"],keywords:[\"dna\",\"genes\",\"genome\",\"biology\",\"genetics\"]},jc={name:\"doctors-bag\",value:gr,categories:[\"health\"],keywords:[\"doctor\",\"bag\",\"briefcase\",\"healthcare\",\"first aid kit\",\"medical box\",\"medicine\",\"emergency\",\"medical\",\"hospital\",\"nurse\"]},qc={name:\"doctor\",value:pr,categories:[\"health\"],keywords:[\"doctor\",\"surgeon\",\"physician\",\"md\",\"medical\",\"nurse\",\"gp\",\"general practitioner\"]},Cc={name:\"dose\",value:mr,categories:[\"health\"],keywords:[\"dose\",\"doseage\",\"dropper\",\"drop\",\"tool\",\"medicine\",\"sample\",\"eyedropper\"]},Sc={name:\"embryo\",value:wr,categories:[\"health\"],keywords:[\"embryo\",\"baby\",\"fetus\",\"motherhood\",\"pregnancy\",\"pregnant\",\"maternity\",\"mother\"]},Tc={name:\"fertilization\",value:ur,categories:[\"health\"],keywords:[\"fertilization\",\"cell\",\"insemination\",\"ovulation\",\"reproduction\",\"sperm\",\"egg\"]},Pc={name:\"fitness-watch\",value:br,categories:[\"health\"],keywords:[\"fitness\",\"watch\",\"smartwatch\",\"fit band\",\"heart rate\",\"wearable\",\"tracker\",\"sport\",\"diet\"]},Dc={name:\"gas-mask\",value:zr,categories:[\"health\"],keywords:[\"gas\",\"mask\",\"protection\",\"safety\",\"chemical mask\",\"industrial mask\",\"respirator\"]},Wc={name:\"hearing-aid\",value:yr,categories:[\"health\"],keywords:[\"hearing\",\"aid\",\"deaf\",\"deafness\",\"ear\",\"earbuds\",\"sound\"]},Nc={name:\"heart-care\",value:xr,categories:[\"health\"],keywords:[\"heart\",\"care\",\"check\"]},Rc={name:\"heart-monitor\",value:kr,categories:[\"health\"],keywords:[\"heart\",\"pulse\",\"cardiogram\",\"beat\",\"cardiac\",\"healthcare\"]},Ec={name:\"hospital-bed\",value:fr,categories:[\"health\"],keywords:[\"hospital\",\"bed\",\"care\",\"medical\"]},Fc={name:\"hospital-sign\",value:Ar,categories:[\"health\"],keywords:[\"hospital\",\"sign\",\"medical\",\"road sign\"]},Uc={name:\"hospital\",value:Hr,categories:[\"health\"],keywords:[\"hospital\",\"clinic\",\"medical\",\"building\",\"therapy\",\"health center\"]},Gc={name:\"keep-away-from-children\",value:Mr,categories:[\"health\"],keywords:[\"keep away from children\",\"keep away children\",\"not suitable for children\",\"no children\",\"keep away from kids\",\"keep away kids\",\"not suitable for kids\",\"no kids\",\"keep away from babys\",\"keep away babys\",\"not suitable for babys\",\"no babys\"]},Oc={name:\"mask\",value:Vr,categories:[\"health\"],keywords:[\"mask\",\"face mask\",\"medical mask\",\"shield mask\",\"protective mask\",\"dentist mask\",\"covid\",\"prevention\"]},Qc={name:\"mask-alt\",value:Br,categories:[\"health\"],keywords:[\"mask\",\"face mask\",\"medical mask\",\"shield mask\",\"protective mask\",\"dentist mask\",\"covid\",\"prevention\"]},Zc={name:\"massage\",value:Ir,categories:[\"health\"],keywords:[\"massage\",\"spa\",\"relax\",\"body massage\",\"treatment\"]},$c={name:\"medical-book\",value:Lr,categories:[\"health\"],keywords:[\"medical\",\"book\",\"notebook\",\"healthcare\",\"cross\",\"medicine book\",\"pharmacy book\"]},Yc={name:\"medicine\",value:jr,categories:[\"health\"],keywords:[\"medicine\",\"drugs\",\"medical\",\"pill\"]},_c={name:\"microorganisms\",value:qr,categories:[\"health\"],keywords:[\"microorganisms\",\"bacteria\",\"microbes\",\"virus\",\"biological\",\"cell\",\"biology\"]},Jc={name:\"microscope\",value:Cr,categories:[\"health\"],keywords:[\"microscope\",\"lab\",\"biology\",\"chemistry\",\"instrument\",\"science\",\"education\",\"learn\"]},Kc={name:\"nurse\",value:Sr,categories:[\"health\"],keywords:[\"nurse\",\"healthcare\",\"medical\",\"medical assistant\",\"nursemaid\"]},Xc={name:\"pacifier\",value:Tr,categories:[\"health\"],keywords:[\"pacifier\",\"baby\",\"child\",\"children\",\"kid\",\"binky\",\"dummy\",\"nipple\",\"soother\",\"teether\"]},ed={name:\"pill\",value:Pr,categories:[\"health\"],keywords:[\"pill\",\"drugs\",\"medicine\",\"capsule\",\"medical\",\"remedy\",\"medicament\",\"dragee\",\"treatment\",\"aid\"]},td={name:\"plastic-surgery\",value:Dr,categories:[\"health\"],keywords:[\"plastic surgery\",\"cosmetic surgery\",\"esthetician\"]},ad={name:\"poop\",value:Wr,categories:[\"health\"],keywords:[\"poop\",\"shit\",\"crap\",\"poo\",\"faeces\"]},id={name:\"pregnancy-no-alcohol\",value:Nr,categories:[\"health\"],keywords:[\"pregnancy\",\"preagnant\",\"no alcohol\",\"no drinking\",\"non-alcoholic\",\"do not drink\"]},sd={name:\"pulse\",value:Rr,categories:[\"health\"],keywords:[\"pulse\",\"heartbeat\",\"heartrate\"]},ld={name:\"radioactive\",value:Er,categories:[\"health\"],keywords:[\"radioactive\",\"biohazard\",\"danger\",\"radioactivity\",\"radiation\",\"nuke\",\"atomic bomb\",\"atom\",\"nuclear\",\"energy\"]},od={name:\"rh-negative\",value:Fr,categories:[\"health\"],keywords:[\"blood\",\"rh\",\"negative\",\"minus\",\"blood group\",\"blood type\",\"rhesus\",\"donorship\"]},rd={name:\"rh-positive\",value:Ur,categories:[\"health\"],keywords:[\"blood\",\"rh\",\"positive\",\"plus\",\"blood group\",\"blood type\",\"rhesus\",\"donorship\"]},cd={name:\"rod-of-ascelepius\",value:Gr,categories:[\"health\"],keywords:[\"rod of ascelepius\",\"staff of ascelepius\",\"ascelepius\"]},dd={name:\"sign-language\",value:Or,categories:[\"health\"],keywords:[\"sign\",\"language\",\"deaf\",\"asl\",\"deafness\",\"mute\",\"dumb\"]},nd={name:\"sneeze\",value:Qr,categories:[\"health\"],keywords:[\"sneeze\",\"cough\",\"covid\",\"corona\",\"coronavirus\",\"flu\",\"infection\",\"sick\",\"cold\",\"hayfever\"]},hd={name:\"stethoscope\",value:Zr,categories:[\"health\"],keywords:[\"stethoscope\",\"line\",\"doctor\",\"medical\",\"nurse\",\"doctor\",\"healthcare\"]},vd={name:\"stretcher\",value:$r,categories:[\"health\"],keywords:[\"stretcher\",\"aid\",\"hospital\",\"patient\",\"medical\",\"bed\",\"cot\",\"ambulance\"]},gd={name:\"syringe\",value:Yr,categories:[\"health\"],keywords:[\"syringe\",\"medicine\",\"doctor\",\"nurse\",\"drugs\",\"injection\",\"vaccine\",\"vaccination\",\"flu\",\"medical\",\"needle\",\"shot\"]},pd={name:\"teeth\",value:_r,categories:[\"health\"],keywords:[\"teeth\",\"false teeth\",\"tooth\",\"set of teeth\",\"dental\",\"dentist\",\"gums\",\"dentistry\"]},md={name:\"thermometer\",value:Jr,categories:[\"health\"],keywords:[\"thermometer\",\"temperature\",\"weather\",\"celsius\",\"fahrenheit\",\"gauge\",\"science\",\"measure\",\"heat\",\"cold\",\"degree\"]},wd={name:\"toilet-paper\",value:Kr,categories:[\"health\"],keywords:[\"toilet\",\"paper\",\"napkins\",\"roll\"]},ud={name:\"tooth-cracked\",value:Xr,categories:[\"health\"],keywords:[\"tooth\",\"cracked tooth\",\"caries\",\"dental\",\"dentist\",\"broken tooth\",\"damaged tooth\",\"teeth\"]},bd={name:\"tooth\",value:ec,categories:[\"health\"],keywords:[\"tooth\",\"teeth\",\"dental\",\"dentist\"]},zd={name:\"veterinarian\",value:tc,categories:[\"health\"],keywords:[\"veterinarian\",\"vet\",\"pet\",\"animal\",\"clinic\",\"veterinary\"]},yd={name:\"vial\",value:ac,categories:[\"health\"],keywords:[\"vial\",\"test tube\",\"lab\",\"sample\",\"chemistry\"]},xd={name:\"virus-protection\",value:ic,categories:[\"health\"],keywords:[\"virus\",\"protection\",\"shield\",\"immunity\",\"corona\",\"coronavirus\",\"covid\",\"bacteria\",\"safety\",\"antivirus\",\"hygiene\",\"stop virus\"]},kd={name:\"virus-stop\",value:sc,categories:[\"health\"],keywords:[\"virus\",\"stop virus\",\"protection\",\"corona\",\"coronavirus\",\"covid\",\"bacteria\",\"safety\"]},fd={name:\"virus\",value:lc,categories:[\"health\"],keywords:[\"virus\",\"corona\",\"coronavirus\",\"covid\",\"bacteria\",\"flu\"]},Ad={name:\"visually-impaired\",value:oc,categories:[\"health\"],keywords:[\"visually\",\"impaired\",\"blind\",\"eye\",\"sight\"]},Hd={name:\"weight-scale\",value:rc,categories:[\"health\"],keywords:[\"weight\",\"scale\",\"measure\",\"bathroom\",\"bath\",\"overweight\",\"obesity\",\"weighing\",\"fitness\",\"weightloss\"]},Md=[cc,dc,nc,hc,vc,gc,pc,mc,wc,uc,bc,zc,yc,xc,kc,fc,Ac,Hc,Mc,Vc,Bc,Ic,Lc,qc,jc,Cc,Sc,Tc,Pc,Dc,Wc,Nc,Rc,Uc,Ec,Fc,Gc,Oc,Qc,Zc,$c,Yc,_c,Jc,Kc,Xc,ed,td,ad,id,sd,ld,od,rd,cd,dd,nd,hd,vd,gd,pd,md,wd,bd,ud,zd,yd,fd,xd,kd,Ad,Hd];var Vd=a(2563),Bd=a(8587),Id=a(1785),Ld=a(1612),jd=a(8485),qd=a(8106),Cd=a(3468),Sd=a(6680),Td=a(2233),Pd=a(8593),Dd=a(8147),Wd=a(8901),Nd=a(1634),Rd=a(8535),Ed=a(3770),Fd=a(5299),Ud=a(7945),Gd=a(3437),Od=a(6735),Qd=a(3550),Zd=a(4193),$d=a(1092),Yd=a(2373),_d=a(1147),Jd=a(5631),Kd=a(1197),Xd=a(8422),en=a(5497),tn=a(4989),an=a(7116),sn=a(5488),ln=a(3508),on=a(9803),rn=a(7976),cn=a(6357),dn=a(2091),nn=a(4131),hn=a(2072),vn=a(564),gn=a(26),pn=a(4009),mn=a(1959),wn=a(2e3),un=a(7823),bn=a(5105),zn=a(6508),yn=a(8473),xn=a(4088),kn=a(3150),fn=a(5826),An=a(1316),Hn=a(2402),Mn=a(6337),Vn=a(5437),Bn=a(8921);const In={name:\"amazon\",value:Vd,categories:[\"logos\"],keywords:[\"amazon\",\"ecommerce\",\"online\",\"shopping\",\"logo\",\"brand\"]},Ln={name:\"american-express\",value:Bd,categories:[\"logos\"],keywords:[\"americanexpress\",\"amex\",\"card\",\"payment\",\"finance\",\"logo\",\"brand\"]},jn={name:\"apple-app-store\",value:Id,categories:[\"logos\"],keywords:[\"apple\",\"appstore\",\"apps\",\"logo\"]},qn={name:\"apple-pay\",value:Ld,categories:[\"logos\"],keywords:[\"apple\",\"pay\",\"payment\",\"finance\",\"logo\"]},Cn={name:\"apple\",value:jd,categories:[\"logos\"],keywords:[\"apple\",\"mac\",\"iphone\",\"ipad\",\"iwatch\",\"logo\",\"brand\"]},Sn={name:\"battlenet\",value:qd,categories:[\"logos\"],keywords:[\"battlenet\",\"bnet\",\"gaming\",\"blizzard\",\"logo\"]},Tn={name:\"bitcoin\",value:Cd,categories:[\"logos\",\"finance\"],keywords:[\"bitcoin\",\"crypto\",\"currency\",\"coin\",\"cryptocurrency\",\"logo\"]},Pn={name:\"blu-ray\",value:Sd,categories:[\"logos\"],keywords:[\"bluray\",\"ray\",\"entertainment\",\"movie\",\"logo\",\"brand\"]},Dn={name:\"box\",value:Td,categories:[\"logos\"],keywords:[\"box\",\"cloud\",\"logo\"]},Wn={name:\"chrome\",value:Pd,categories:[\"logos\"],keywords:[\"chrome\",\"browser\",\"internet\",\"google\",\"logo\"]},Nn={name:\"diners-club\",value:Dd,categories:[\"logos\",\"finance\"],keywords:[\"diners\",\"club\",\"dinersclub\",\"card\",\"payment\",\"finance\",\"logo\",\"brand\"]},Rn={name:\"discord\",value:Wd,categories:[\"logos\"],keywords:[\"discord\",\"chat\",\"social\",\"logo\"]},En={name:\"dropbox\",value:Nd,categories:[\"logos\"],keywords:[\"dropbox\",\"cloud\",\"logo\"]},Fn={name:\"ebay\",value:Rd,categories:[\"logos\"],keywords:[\"ebay\",\"ecommerce\",\"online\",\"shopping\",\"marketplace\",\"bidding\",\"logo\",\"brand\"]},Un={name:\"ethereum\",value:Ed,categories:[\"logos\"],keywords:[\"ethereum\",\"crypto\",\"currency\",\"coin\",\"cryptocurrency\",\"logo\"]},Gn={name:\"firefox\",value:Fd,categories:[\"logos\"],keywords:[\"firefox\",\"browser\",\"internet\",\"mozilla\",\"logo\"]},On={name:\"google-drive\",value:Ud,categories:[\"logos\"],keywords:[\"drive\",\"google\",\"googledrive\",\"cloud\",\"logo\"]},Qn={name:\"google-hangouts\",value:Gd,categories:[\"logos\"],keywords:[\"hangouts\",\"google\",\"googlehangouts\",\"chat\",\"conferencing\",\"logo\"]},Zn={name:\"google-maps\",value:Od,categories:[\"logos\"],keywords:[\"google\",\"maps\",\"navigation\",\"logo\"]},$n={name:\"google-pay\",value:Qd,categories:[\"logos\"],keywords:[\"google\",\"pay\",\"payment\",\"finance\",\"logo\"]},Yn={name:\"google-play\",value:Zd,categories:[\"logos\"],keywords:[\"google\",\"play\",\"store\",\"playstore\",\"apps\",\"logo\"]},_n={name:\"google\",value:$d,categories:[\"logos\"],keywords:[\"google\",\"g\",\"logo\",\"brand\"]},Jn={name:\"google-translate\",value:Yd,categories:[\"logos\"],keywords:[\"google\",\"translate\",\"language\",\"logo\"]},Kn={name:\"internet-explorer\",value:_d,categories:[\"logos\"],keywords:[\"explorer\",\"browser\",\"internet\",\"microsoft\",\"logo\"]},Xn={name:\"ios\",value:Jd,categories:[\"logos\"],keywords:[\"apple\",\"ios\",\"iphone\",\"ipad\",\"iwatch\",\"programming\",\"logo\"]},eh={name:\"jsfiddle\",value:Kd,categories:[\"logos\"],keywords:[\"jsfiddle\",\"code\",\"programming\",\"editor\",\"snippet\",\"logo\"]},th={name:\"maestro\",value:Xd,categories:[\"logos\",\"finance\"],keywords:[\"maestro\",\"card\",\"payment\",\"finance\",\"logo\",\"brand\"]},ah={name:\"mastercard\",value:en,categories:[\"logos\",\"finance\"],keywords:[\"mastercard\",\"card\",\"payment\",\"finance\",\"logo\",\"brand\"]},ih={name:\"microsoft\",value:tn,categories:[\"logos\"],keywords:[\"microsoft\",\"windows\",\"software\",\"logo\",\"brand\"]},sh={name:\"ms-edge\",value:an,categories:[\"logos\"],keywords:[\"edge\",\"browser\",\"internet\",\"microsoft\",\"logo\"]},lh={name:\"ms-excel\",value:sn,categories:[\"logos\"],keywords:[\"excel\",\"spreadsheet\",\"microsoft\",\"logo\"]},oh={name:\"ms-office\",value:ln,categories:[\"logos\"],keywords:[\"office\",\"365\",\"microsoft\",\"logo\"]},rh={name:\"ms-powerpoint\",value:on,categories:[\"logos\"],keywords:[\"powerpoint\",\"slides\",\"presentation\",\"deck\",\"microsoft\",\"logo\"]},ch={name:\"ms-teams\",value:rn,categories:[\"logos\"],keywords:[\"teams\",\"communication\",\"chat\",\"conferencing\",\"meeting\",\"microsoft\",\"logo\"]},dh={name:\"ms-outlook\",value:cn,categories:[\"logos\"],keywords:[\"outlook\",\"email\",\"communication\",\"microsoft\",\"logo\"]},nh={name:\"ms-word\",value:dn,categories:[\"logos\"],keywords:[\"word\",\"microsoft\",\"logo\"]},hh={name:\"onedrive\",value:nn,categories:[\"logos\"],keywords:[\"onedrive\",\"cloud\",\"microsoft\",\"logo\"]},vh={name:\"opera\",value:hn,categories:[\"logos\"],keywords:[\"opera\",\"browser\",\"internet\",\"logo\",\"o\",\"circle\"]},gh={name:\"paypal\",value:vn,categories:[\"logos\"],keywords:[\"paypal\",\"payment\",\"finance\",\"logo\"]},ph={name:\"safari\",value:gn,categories:[\"logos\"],keywords:[\"safari\",\"browser\",\"internet\",\"apple\",\"logo\",\"compass\",\"dirctions\",\"navigation\"]},mh={name:\"sass\",value:pn,categories:[\"logos\"],keywords:[\"sass\",\"logo\"]},wh={name:\"skype\",value:mn,categories:[\"logos\"],keywords:[\"skype\",\"chat\",\"meeting\",\"conferencing\",\"microsoft\",\"logo\"]},uh={name:\"slack\",value:wn,categories:[\"logos\"],keywords:[\"slack\",\"chat\",\"communication\",\"logo\"]},bh={name:\"soundcloud\",value:un,categories:[\"logos\"],keywords:[\"soundcloud\",\"music\",\"social\",\"media\",\"network\",\"logo\"]},zh={name:\"spotify\",value:bn,categories:[\"logos\"],keywords:[\"spotify\",\"music\",\"network\",\"logo\"]},yh={name:\"stackoverflow\",value:zn,categories:[\"logos\"],keywords:[\"stackoverflow\",\"stack\",\"overflow\",\"social\",\"media\",\"programming\",\"logo\"]},xh={name:\"steam\",value:yn,categories:[\"logos\"],keywords:[\"steam\",\"gaming\",\"games\",\"social\",\"media\",\"logo\"]},kh={name:\"stripe\",value:xn,categories:[\"logos\"],keywords:[\"stripe\",\"payment\",\"finance\",\"logo\"]},fh={name:\"tinder\",value:kn,categories:[\"logos\"],keywords:[\"tinder\",\"dating\",\"chat\",\"match\",\"social\",\"media\",\"network\",\"logo\",\"flame\"]},Ah={name:\"touch-id\",value:fn,categories:[\"logos\"],keywords:[\"touchid\",\"touch\",\"finger\",\"fingerprint\",\"biometric\",\"identity\",\"security\",\"apple\",\"logo\"]},Hh={name:\"twitch\",value:An,categories:[\"logos\"],keywords:[\"twitch\",\"social\",\"media\",\"gaming\",\"logo\",\"cartoon\",\"streaming\"]},Mh={name:\"usb\",value:Hn,categories:[\"logos\"],keywords:[\"usb\",\"flash\",\"drive\",\"logo\"]},Vh={name:\"vimeo\",value:Mn,categories:[\"logos\"],keywords:[\"vimeo\",\"video\",\"social\",\"media\",\"network\",\"logo\"]},Bh={name:\"visa\",value:Vn,categories:[\"logos\",\"finance\"],keywords:[\"visa\",\"card\",\"payment\",\"finance\",\"logo\",\"brand\"]},Ih={name:\"vs-code\",value:Bn,categories:[\"logos\"],keywords:[\"vscode\",\"ide\",\"programming\",\"microsoft\",\"logo\"]},Lh=[In,Ln,Cn,jn,qn,Sn,Tn,Pn,Dn,Wn,Nn,Rn,En,Fn,Un,Gn,_n,On,Qn,Zn,$n,Yn,Jn,Kn,Xn,eh,th,ah,ih,sh,lh,oh,dh,rh,ch,nh,hh,vh,gh,ph,mh,wh,uh,bh,zh,yh,xh,kh,fh,Ah,Hh,Mh,Vh,Bh,Ih];var jh=a(6872),qh=a(2376),Ch=a(7970),Sh=a(2859),Th=a(2906),Ph=a(5536),Dh=a(7566),Wh=a(5640),Nh=a(5531),Rh=a(8213),Eh=a(1664),Fh=a(1499),Uh=a(7799),Gh=a(7735),Oh=a(3790),Qh=a(743),Zh=a(6273),$h=a(8463),Yh=a(185),_h=a(8007),Jh=a(8280),Kh=a(3293),Xh=a(44),ev=a(8501),tv=a(2681),av=a(1833),iv=a(5321),sv=a(5364),lv=a(5199),ov=a(5274);const rv={name:\"api\",value:jh,categories:[\"programming\"],keywords:[\"api\",\"development\",\"interface\",\"service\",\"database\",\"programming\"]},cv={name:\"app-symbol\",value:qh,categories:[\"programming\"],keywords:[\"appsymbol\",\"app\",\"development\",\"programming\",\"circle\",\"a\"]},dv={name:\"bug\",value:Ch,categories:[\"programming\"],keywords:[\"bug\",\"animal\",\"insect\",\"virus\",\"malware\",\"security\",\"development\",\"programming\"]},nv={name:\"code-fork\",value:Sh,categories:[\"programming\"],keywords:[\"codefork\",\"code\",\"fork\",\"git\",\"github\",\"development\",\"collaboration\",\"control\",\"version\",\"programming\"]},hv={name:\"code-review\",value:Th,categories:[\"programming\"],keywords:[\"codereview\",\"review\",\"software\",\"app\",\"development\",\"programming\"]},vv={name:\"code\",value:Ph,categories:[\"programming\"],keywords:[\"code\",\"script\",\"source\",\"development\",\"programming\"]},gv={name:\"terminal\",value:Dh,categories:[\"programming\"],keywords:[\"terminal\",\"console\",\"code\",\"bash\",\"cmd\",\"command\",\"sh\",\"shell\",\"development\",\"programming\"]},pv={name:\"development\",value:Wh,categories:[\"programming\"],keywords:[\"puzzle\",\"pieces\",\"jigsaw\",\"combination\",\"play\",\"game\",\"toy\",\"development\",\"programming\"]},mv={name:\"file-changes\",value:Nh,categories:[\"programming\"],keywords:[\"file\",\"changes\",\"plus\",\"minus\",\"development\",\"programming\"]},wv={name:\"file-tree\",value:Rh,categories:[\"programming\"],keywords:[\"file\",\"tree\",\"hierarchy\",\"files\",\"system\",\"levels\",\"development\",\"programming\",\"chart\",\"organize\",\"structure\",\"treeview\"]},uv={name:\"git-branch\",value:Eh,categories:[\"programming\"],keywords:[\"git\",\"branch\",\"development\",\"programming\",\"commit\",\"fork\",\"split\",\"code\",\"collaboration\"]},bv={name:\"git-commit\",value:Fh,categories:[\"programming\"],keywords:[\"git\",\"commit\",\"development\",\"programming\",\"pull\",\"code\",\"collaboration\"]},zv={name:\"git-compare\",value:Uh,categories:[\"programming\"],keywords:[\"git\",\"compare\",\"development\",\"programming\",\"code\",\"collaboration\"]},yv={name:\"git-issue\",value:Gh,categories:[\"programming\"],keywords:[\"git\",\"issue\",\"development\",\"programming\",\"warning\",\"exclamation\"]},xv={name:\"git-merge\",value:Oh,categories:[\"programming\"],keywords:[\"git\",\"merge\",\"development\",\"programming\",\"code\",\"collaboration\"]},kv={name:\"grid\",value:Qh,categories:[\"programming\"],keywords:[\"grid\",\"table\",\"development\",\"programming\",\"component\",\"datatable\"]},fv={name:\"inspect-code\",value:Zh,categories:[\"programming\"],keywords:[\"inspect\",\"code\",\"development\",\"programming\",\"marketing\",\"markup\",\"search\",\"seo\",\"review\"]},Av={name:\"milestone\",value:$h,categories:[\"programming\"],keywords:[\"milestone\",\"sign\",\"development\",\"programming\",\"travel\",\"roadmap\",\"tourism\"]},Hv={name:\"code-value\",value:Yh,categories:[\"programming\"],keywords:[\"code\",\"value\",\"development\",\"programming\",\"module\",\"chip\",\"cpu\",\"electronics\",\"equipment\",\"hardware\",\"iot\"]},Mv={name:\"plugin\",value:_h,categories:[\"programming\"],keywords:[\"plugin\",\"plug\",\"development\",\"programming\",\"socket\",\"connector\",\"electricity\"]},Vv={name:\"pull-request\",value:Jh,categories:[\"programming\"],keywords:[\"pull\",\"request\",\"development\",\"programming\",\"git\",\"commit\",\"scheme\"]},Bv={name:\"repository\",value:Kh,categories:[\"programming\"],keywords:[\"repo\",\"repository\",\"development\",\"programming\",\"cabinet\",\"document\",\"folder\",\"storage\"]},Iv={name:\"responsive-layout\",value:Xh,categories:[\"programming\"],keywords:[\"responsive\",\"layout\",\"development\",\"programming\",\"device\",\"adaptive\",\"screen\",\"fluid\"]},Lv={name:\"severity\",value:ev,categories:[\"programming\"],keywords:[\"severity\",\"gauge\",\"development\",\"programming\",\"indicator\",\"speed\",\"speedometer\"]},jv={name:\"software-architecture\",value:tv,categories:[\"programming\"],keywords:[\"software\",\"architecture\",\"development\",\"programming\",\"horizontal\"]},qv={name:\"software-installer\",value:av,categories:[\"programming\"],keywords:[\"software\",\"installer\",\"development\",\"programming\",\"install\",\"download\"]},Cv={name:\"source-code\",value:iv,categories:[\"programming\"],keywords:[\"source\",\"code\",\"development\",\"programming\",\"html\",\"web\"]},Sv={name:\"system-update\",value:sv,categories:[\"programming\"],keywords:[\"system\",\"update\",\"development\",\"programming\",\"software\",\"arrows\",\"refresh\",\"sync\"]},Tv={name:\"verified-account\",value:lv,categories:[\"programming\"],keywords:[\"verified\",\"account\",\"development\",\"programming\",\"certified\",\"verify\",\"check\",\"sign\",\"badge\",\"quality\"]},Pv={name:\"workflow\",value:ov,categories:[\"programming\"],keywords:[\"workflow\",\"hierarchy\",\"development\",\"programming\",\"organisation\",\"process\",\"diagram\"]},Dv=[rv,cv,dv,vv,nv,Hv,hv,pv,mv,wv,uv,bv,bv,yv,xv,kv,fv,Av,Mv,Vv,Bv,Iv,Lv,jv,qv,Cv,Sv,gv,Tv,Pv];var Wv=a(9075),Nv=a(6637),Rv=a(3551),Ev=a(3772),Fv=a(7292),Uv=a(9834),Gv=a(3547),Ov=a(3264),Qv=a(1216),Zv=a(8629),$v=a(635),Yv=a(7934),_v=a(9089),Jv=a(8915),Kv=a(7374),Xv=a(3864),eg=a(2927),tg=a(3495);const ag={name:\"behance\",value:Wv,categories:[\"social media\"],keywords:[\"behance\",\"portfolio\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},ig={name:\"dribbble\",value:Nv,categories:[\"social media\"],keywords:[\"dribbble\",\"portfolio\",\"basketball\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},sg={name:\"facebook-messenger\",value:Rv,categories:[\"social media\"],keywords:[\"facebook\",\"messenger\",\"chat\",\"message\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},lg={name:\"facebook\",value:Ev,categories:[\"social media\"],keywords:[\"facebook\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},og={name:\"github\",value:Fv,categories:[\"social media\"],keywords:[\"github\",\"repository\",\"git\",\"programming\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},rg={name:\"instagram\",value:Uv,categories:[\"social media\"],keywords:[\"instagram\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},cg={name:\"linkedin\",value:Gv,categories:[\"social media\"],keywords:[\"linkedin\",\"professional\",\"recruiting\",\"job\",\"employment\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},dg={name:\"medium\",value:Ov,categories:[\"social media\"],keywords:[\"medium\",\"blog\",\"article\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},ng={name:\"pinterest\",value:Qv,categories:[\"social media\"],keywords:[\"pinterest\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},hg={name:\"reddit\",value:Zv,categories:[\"social media\"],keywords:[\"reddit\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},vg={name:\"snapchat\",value:$v,categories:[\"logos\",\"social media\"],keywords:[\"snapchat\",\"ghost\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},gg={name:\"telegram\",value:Yv,categories:[\"logos\",\"social media\"],keywords:[\"telegram\",\"messenger\",\"chat\",\"message\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},pg={name:\"tiktok\",value:_v,categories:[\"social media\"],keywords:[\"tiktok\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},mg={name:\"twitter\",value:Jv,categories:[\"social media\"],keywords:[\"twitter\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},wg={name:\"viber\",value:Kv,categories:[\"social media\"],keywords:[\"viber\",\"messenger\",\"chat\",\"message\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},ug={name:\"wechat\",value:Xv,categories:[\"social media\"],keywords:[\"wechat\",\"messenger\",\"chat\",\"message\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},bg={name:\"whatsapp\",value:eg,categories:[\"social media\"],keywords:[\"whatsapp\",\"messenger\",\"chat\",\"message\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},zg={name:\"youtube\",value:tg,categories:[\"social media\"],keywords:[\"youtube\",\"video\",\"stream\",\"social\",\"media\",\"network\",\"logo\",\"trademark\"]},yg=[ag,ig,sg,lg,og,rg,cg,dg,ng,hg,vg,gg,pg,mg,wg,ug,bg,zg];var xg,kg;!function(e){e[e.construction=0]=\"construction\",e[e.content=1]=\"content\",e[e.editor=2]=\"editor\",e[e.election=3]=\"election\",e[e.finance=4]=\"finance\",e[e.health=5]=\"health\",e[e.logos=6]=\"logos\",e[e.programming=7]=\"programming\",e[e[\"social media\"]=8]=\"social media\"}(xg||(xg={})),function(e){e.values=function(){return Object.keys(xg).filter((e=>!function(e){const t=~~Number(e);return String(t)===e&&t>=0}(e)))}}(kg||(kg={}));const fg=[...B,...It,...Pi,...Us,...Uo,...Md,...Lh,...Dv,...yg]})();var s=i.lTk,l=i.Bd$,o=i._im,r=i.U_J,c=i.KJG,d=i.SAz,n=i.t1N,h=i.MBC,v=i.$6P,g=i.cIv,p=i.ZlE,m=i.slj,w=i.huW,u=i.hi0,b=i.RDp,z=i.W3x,y=i.hnq,x=i._wT,k=i.uyw,f=i.NKz,A=i.c07,H=i.wbJ,M=i.oQ7,V=i.FbX,B=i.oGm,I=i.bpX,L=i.Xae,j=i.YP5,q=i.R3W,C=i.kc5,S=i.QEg,T=i.prf,P=i.CaT,D=i.VQQ,W=i.Ncd,N=i.Tl5,R=i.oUB,E=i.bON,F=i.$ik,U=i.zO6,G=i.yLM,O=i.BBm,Q=i.dsG,Z=i.Hs9,$=i.BZV,Y=i.$cm,_=i.SdW,J=i.WqF,K=i.DmU,X=i.neX,ee=i.yd1,te=i.jIG,ae=i.__Q,ie=i.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C,vo=i.KK7,go=i.CBM,po=i.Ldn,mo=i.UZF,wo=i.tyl,uo=i.$Sj,bo=i.Gf8,zo=i.CvE,yo=i.ZB9;export{s as IconCategory,l as IconCategoryEnum,o as accessibility,r as addChild,c as addFilter,d as addRow,n as aggregation,h as aidsRibbon,v as all,g as amazon,p as ambulance,m as amex,w as anxiety,u as api,b as appSymbol,z as apple,y as appleAppStore,x as applePay,k as arrowDownLeft,f as arrowDownRight,A as arrowUpLeft,H as arrowUpRight,M as atm,V as atmDollar,B as atmEuro,I as atmPound,L as atmYen,j as auction,q as award,C as babyBottle,S as bacteria,T as bandage,P as bankSafe,D as barcode,W as battlenet,N as bearMarket,R as behance,E as billPaid,F as biohazard,U as bitcoin,G as blood,O as bluRay,Q as bottomPercentileRecords,Z as bottomRecords,$ as box,Y as braille,_ as breastfeeding,J as brickWall,K as brush,X as bucket,ee as budgetSpending,te as bug,ae as building,ie as bullMarket,se as bulldozer,le as businessDevelopment,oe as caduceus,re as calculator,ce as cancerRibbon,de as candidateResults,ne as caseSensitive,he as cash,ve as cashAlt,ge as cashOnly,pe as cementMixer,me as certificate,we as check,ue as chrome,be as clinic,ze as code,ye as codeFork,xe as codeModule,ke as codeReview,fe as commodities,Ae as condom,He as condomUsed,Me as construction,Ve as constructionCone,Be as constructionProject,Ie as constructionTrolley,Le as contains,je as content,qe as contraception,Ce as cordlessScrewdriver,Se as coronavirus,Te as countryHome,Pe as crane,De as creditCards,We as creditControl,Ne as crowdfunding,Re as customFilter,Ee as deafness,Fe as debate,Ue as debt,Ge as delivery,Oe as dentalFloss,Qe as dentalImplant,Ze as development,$e as diabetes,Ye as diamond,_e as diamondCircled,Je as dinersClub,Ke as discord,Xe as discount,et as dividents,tt as dna,at as doctor,it as doctorsBag,st as doesNotContain,lt as doesNotEndWith,ot as doesNotStartWith,rt as dollarCircled,ct as dose,dt as dribbble,nt as dropShipping,ht as dropbox,vt as dumpTruck,gt as ebay,pt as editor,mt as elections,wt as electoralVotes,ut as embryo,bt as endExpression,zt as endsWith,yt as equals,xt as estate,kt as ethereum,ft as euParliament,At as euroCircled,Ht as exactMatch,Mt as faceId,Vt as facebook,Bt as facebookMessenger,It as femaleCandidate,Lt as fertilization,jt as fileChanges,qt as fileTree,Ct as finance,St as financialInsurance,Tt as firefox,Pt as fitnessWatch,Dt as foreignExchange,Wt as forkliftTruck,Nt as foundation,Rt as fountain,Et as gasMask,Ft as gift,Ut as gitBranch,Gt as gitCommit,Ot as gitCompare,Qt as gitIssue,Zt as gitMerge,$t as github,Yt as gold,_t as google,Jt as googleDrive,Kt as googleHangouts,Xt as googleMaps,ea as googlePay,ta as googlePlay,aa as googleTranslate,ia as greaterThan,sa as greaterThanOrEqual,la as grid,oa as hammer,ra as health,ca as hearingAid,da as heartCare,na as heartMonitor,ha as horn,va as hospital,ga as hospitalBed,pa as hospitalSign,ma as ideaGeneration,wa as impactDrill,ua as inspectCode,ba as instagram,za as internetExplorer,ya as invoice,xa as ios,ka as isAfter,fa as isBefore,Aa as isEmpty,Ha as isFalse,Ma as isNotNull,Va as isNull,Ba as isTrue,Ia as jsFiddle,La as jumpDown,ja as jumpUp,qa as keepAwayFromChildren,Ca as ladder,Sa as lastMonth,Ta as lastQuarter,Pa as lastWeek,Da as lastYear,Wa as legalDocument,Na as lessThan,Ra as lessThanOrEqual,Ea as linkedin,Fa as loan,Ua as logos,Ga as maestro,Oa as maintenance,Qa as maleCandidate,Za as mask,$a as maskAlt,Ya as massage,_a as mastercard,Ja as match,Ka as medicalBook,Xa as medicine,ei as medium,ti as microorganisms,ai as microscope,ii as microsoft,si as milestone,li as moneyBag,oi as month,ri as msEdge,ci as msExcel,di as msOffice,ni as msOutlook,hi as msPowerpoint,vi as msTeams,gi as msWord,pi as nextMonth,mi as nextQuarter,wi as nextWeek,ui as nextYear,bi as notEmpty,zi as notEqual,yi as nurse,xi as oil,ki as oilPlatform,fi as onedrive,Ai as opera,Hi as pacifier,Mi as paintRoller,Vi as parliament1,Bi as parliament2,Ii as payDate,Li as paypal,ji as piggyBank,qi as pill,Ci as pinLeft,Si as pinRight,Ti as pinterest,Pi as pipes,Di as pipingSystem,Wi as plasticSurgery,Ni as pliers,Ri as plugin,Ei as pneumaticHammerDrill,Fi as poop,Ui as popularVotes,Gi as poundCircled,Oi as pregnancyNoAlcohol,Qi as previousQuarter,Zi as previousWeek,$i as programming,Yi as projectRevenue,_i as protesterSigns,Ji as pullRequest,Ki as pulse,Xi as quarterFour,es as quarterOne,ts as quarterThree,as as quarterTwo,is as radiator,ss as radioactive,ls as reddit,os as repository,rs as responsiveLayout,cs as restrictedArea,ds as resultsByCandidates,ns as resultsPiechart,hs as rhNegative,vs as rhPositive,gs as roadRoller,ps as rodOfAsclepius,ms as rulers,ws as safari,us as safetyVest,bs as sale,zs as sass,ys as saw,xs as scalesBalanced,ks as scalesUnbalanced,fs as scissorLift,As as screwdriver,Hs as security,Ms as securityAlt,Vs as selectAll,Bs as severity,Is as shovel,Ls as signLanguage,js as skype,qs as skyscrapers,Cs as slack,Ss as snapchat,Ts as sneeze,Ps as socialMedia,Ds as softwareArchitecture,Ws as softwareInstaller,Ns as solarPanel,Rs as solderingIron,Es as soundcloud,Fs as sourceCode,Us as spotify,Gs as stackoverflow,Os as stairs,Qs as startExpression,Zs as startsWith,$s as stats,Ys as steam,_s as stethoscope,Js as stopHand,Ks as strategy,Xs as stretcher,el as stripe,tl as syringe,al as systemUpdate,il as tableSawBlade,sl as tapWater,ll as tapeline,ol as teeth,rl as telegram,cl as terminal,dl as thermometer,nl as thisMonth,hl as thisQuarter,vl as thisWeek,gl as thisYear,pl as tiktok,ml as timeline,wl as tinder,ul as today,bl as toiletPaper,zl as tomorrow,yl as tooth,xl as toothCracked,kl as topPercentileRecords,fl as topRecords,Al as touchId,Hl as towTruck,Ml as towelRail,Vl as tractor,Bl as trowel,Il as twitch,Ll as twitter,jl as ungroup,ql as unpinLeft,Cl as unpinRight,Sl as usaCa,Tl as usaFl,Pl as usaLower48States,Dl as usaNy,Wl as usaPartyDemocratic,Nl as usaPartyGreen,Rl as usaPartyLibertarian,El as usaPartyRepublican,Fl as usaTx,Ul as usb,Gl as verifiedAccount,Ol as veterinarian,Ql as vial,Zl as viber,$l as vimeo,Yl as virus,_l as virusProtection,Jl as virusStop,Kl as visa,Xl as visuallyImpaired,eo as vote,to as vsCode,ao as waterBoiler,io as waterHeater,so as waterTap,lo as wechat,oo as weightScale,ro as whatsapp,co as whiteHouse1,no as whiteHouse2,ho as wireTransfer,vo as worker,go as workers,po as workflow,mo as wrench,wo as year,uo as yearToDate,bo as yenCircled,zo as yesterday,yo as youtube};","import * as i1 from '@angular/animations';\nimport { style, animate, animation, keyframes, useAnimation, trigger, transition } from '@angular/animations';\nimport * as i0 from '@angular/core';\nimport { Injectable, Directive, Input, HostListener, NgModule, isDevMode, PLATFORM_ID, Inject, EventEmitter, ViewContainerRef, ElementRef, Optional, Output, HostBinding, InjectionToken, Component, ViewChild, ContentChildren, forwardRef, ContentChild, Self, SecurityContext, TemplateRef, Pipe, inject, LOCALE_ID, QueryList, ViewChildren, Host, ChangeDetectionStrategy, SkipSelf, SimpleChange, createComponent, CUSTOM_ELEMENTS_SCHEMA, reflectComponentType } from '@angular/core';\nimport * as i5 from '@angular/forms';\nimport { NgModel, NgControl, FormControlName, NG_VALUE_ACCESSOR, Validators, NG_VALIDATORS, FormGroup, FormsModule, ReactiveFormsModule, FormControl, RequiredValidator, MinValidator, MaxValidator, EmailValidator, MinLengthValidator, MaxLengthValidator, PatternValidator } from '@angular/forms';\nimport * as i1$1 from '@angular/common';\nimport { isPlatformBrowser, formatDate as formatDate$1, CurrencyPipe, formatPercent, formatNumber, getLocaleCurrencyCode, DatePipe, getLocaleDateFormat, FormatWidth, getLocaleDateTimeFormat, DOCUMENT, CommonModule, getLocaleFirstDayOfWeek, getLocaleCurrencySymbol, formatCurrency as formatCurrency$1, getLocaleNumberFormat, NumberFormatStyle, getCurrencySymbol } from '@angular/common';\nimport { Observable, Subject, fromEvent, interval, animationFrameScheduler, noop, merge, Subscription, timer, pipe } from 'rxjs';\nimport { takeUntil, filter, first as first$1, throttleTime, take, throttle, startWith, debounce, tap, switchMap, skipLast, map, debounceTime, shareReplay, takeWhile, pluck } from 'rxjs/operators';\nimport { mergeWith } from 'lodash-es';\nimport { strToU8, zip } from 'fflate';\nimport * as i1$2 from '@angular/platform-browser';\nimport { HammerGestureConfig, HAMMER_GESTURE_CONFIG, ɵgetDOM } from '@angular/platform-browser';\nimport * as i2 from '@angular/common/http';\nimport { addRow, addChild, pinLeft, unpinLeft, jumpDown, jumpUp, caseSensitive, editor } from '@igniteui/material-icons-extended';\nimport { __decorate, __param } from 'tslib';\nimport 'igniteui-trial-watermark';\nimport { v4 } from 'uuid';\n\nvar EaseIn;\n(function (EaseIn) {\n EaseIn[EaseIn[\"Quad\"] = `cubic-bezier(0.550, 0.085, 0.680, 0.530)`] = \"Quad\";\n EaseIn[EaseIn[\"Cubic\"] = `cubic-bezier(0.550, 0.055, 0.675, 0.190)`] = \"Cubic\";\n EaseIn[EaseIn[\"Quart\"] = `cubic-bezier(0.895, 0.030, 0.685, 0.220)`] = \"Quart\";\n EaseIn[EaseIn[\"Quint\"] = `cubic-bezier(0.755, 0.050, 0.855, 0.060)`] = \"Quint\";\n EaseIn[EaseIn[\"Sine\"] = `cubic-bezier(0.470, 0.000, 0.745, 0.715)`] = \"Sine\";\n EaseIn[EaseIn[\"Expo\"] = `cubic-bezier(0.950, 0.050, 0.795, 0.035)`] = \"Expo\";\n EaseIn[EaseIn[\"Circ\"] = `cubic-bezier(0.600, 0.040, 0.980, 0.335)`] = \"Circ\";\n EaseIn[EaseIn[\"Back\"] = `cubic-bezier(0.600, -0.280, 0.735, 0.045)`] = \"Back\";\n})(EaseIn || (EaseIn = {}));\nvar EaseOut;\n(function (EaseOut) {\n EaseOut[EaseOut[\"Quad\"] = `cubic-bezier(0.250, 0.460, 0.450, 0.940)`] = \"Quad\";\n EaseOut[EaseOut[\"Cubic\"] = `cubic-bezier(0.215, 0.610, 0.355, 1.000)`] = \"Cubic\";\n EaseOut[EaseOut[\"Quart\"] = `cubic-bezier(0.165, 0.840, 0.440, 1.000)`] = \"Quart\";\n EaseOut[EaseOut[\"Quint\"] = `cubic-bezier(0.230, 1.000, 0.320, 1.000)`] = \"Quint\";\n EaseOut[EaseOut[\"Sine\"] = `cubic-bezier(0.390, 0.575, 0.565, 1.000)`] = \"Sine\";\n EaseOut[EaseOut[\"Expo\"] = `cubic-bezier(0.190, 1.000, 0.220, 1.000)`] = \"Expo\";\n EaseOut[EaseOut[\"Circ\"] = `cubic-bezier(0.075, 0.820, 0.165, 1.000)`] = \"Circ\";\n EaseOut[EaseOut[\"Back\"] = `cubic-bezier(0.175, 0.885, 0.320, 1.275)`] = \"Back\";\n})(EaseOut || (EaseOut = {}));\nvar EaseInOut;\n(function (EaseInOut) {\n EaseInOut[EaseInOut[\"Quad\"] = `cubic-bezier(0.455, 0.030, 0.515, 0.955)`] = \"Quad\";\n EaseInOut[EaseInOut[\"Cubic\"] = `cubic-bezier(0.645, 0.045, 0.355, 1.000)`] = \"Cubic\";\n EaseInOut[EaseInOut[\"Quart\"] = `cubic-bezier(0.770, 0.000, 0.175, 1.000)`] = \"Quart\";\n EaseInOut[EaseInOut[\"Quint\"] = `cubic-bezier(0.860, 0.000, 0.070, 1.000)`] = \"Quint\";\n EaseInOut[EaseInOut[\"Sine\"] = `cubic-bezier(0.445, 0.050, 0.550, 0.950)`] = \"Sine\";\n EaseInOut[EaseInOut[\"Expo\"] = `cubic-bezier(1.000, 0.000, 0.000, 1.000)`] = \"Expo\";\n EaseInOut[EaseInOut[\"Circ\"] = `cubic-bezier(0.785, 0.135, 0.150, 0.860)`] = \"Circ\";\n EaseInOut[EaseInOut[\"Back\"] = `cubic-bezier(0.680, -0.550, 0.265, 1.550)`] = \"Back\";\n})(EaseInOut || (EaseInOut = {}));\n\nconst base$3 = [\n style({\n opacity: `{{startOpacity}}`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, style({\n opacity: `{{endOpacity}}`\n }))\n];\nconst baseParams$3 = {\n delay: '0s',\n duration: '350ms',\n easing: EaseOut.Sine,\n endOpacity: 1,\n startOpacity: 0\n};\nconst fadeIn = animation(base$3, {\n params: baseParams$3\n});\nconst fadeOut = animation(base$3, {\n params: {\n delay: '0s',\n duration: '350ms',\n easing: EaseOut.Sine,\n endOpacity: 0,\n startOpacity: 1\n }\n});\n\nconst baseRecipe$2 = [\n style({\n backfaceVisibility: 'hidden',\n transformStyle: 'preserve-3d'\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, keyframes([\n style({\n offset: 0,\n transform: `translateZ({{startDistance}})\n rotate3d({{rotateX}}, {{rotateY}}, {{rotateZ}}, {{startAngle}}deg)`\n }),\n style({\n offset: 1,\n transform: `translateZ({{endDistance}})\n rotate3d({{rotateX}}, {{rotateY}}, {{rotateZ}}, {{endAngle}}deg)`\n })\n ]))\n];\nconst baseParams$2 = {\n delay: '0s',\n duration: '600ms',\n easing: EaseOut.Quad,\n endAngle: 180,\n endDistance: '0px',\n rotateX: 1,\n rotateY: 0,\n rotateZ: 0,\n startAngle: 0,\n startDistance: '0px'\n};\nconst flipTop = animation(baseRecipe$2, {\n params: {\n ...baseParams$2\n }\n});\nconst flipBottom = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n endAngle: -180\n }\n});\nconst flipLeft = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n rotateX: 0,\n rotateY: 1\n }\n});\nconst flipRight = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n endAngle: -180,\n rotateX: 0,\n rotateY: 1\n }\n});\nconst flipHorFwd = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n endDistance: '170px'\n }\n});\nconst flipHorBck = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n endDistance: '-170px'\n }\n});\nconst flipVerFwd = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n endDistance: '170px',\n rotateX: 0,\n rotateY: 1\n }\n});\nconst flipVerBck = animation(baseRecipe$2, {\n params: {\n ...baseParams$2,\n endDistance: '-170px',\n rotateX: 0,\n rotateY: 1\n }\n});\n\nconst baseRecipe$1 = [\n style({\n opacity: `{{startOpacity}}`,\n transform: `rotate3d({{rotateX}},{{rotateY}},{{rotateZ}},{{startAngle}}deg)`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, style({\n offset: 0,\n opacity: `{{endOpacity}}`,\n transform: `rotate3d({{rotateX}},{{rotateY}},{{rotateZ}},{{endAngle}}deg)`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }))\n];\nconst baseInParams$2 = {\n delay: '0s',\n duration: '600ms',\n easing: EaseOut.Quad,\n endAngle: 0,\n endOpacity: 1,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 1,\n startAngle: -360,\n startOpacity: 0,\n xPos: 'center',\n yPos: 'center'\n};\nconst baseOutParams$2 = {\n ...baseInParams$2,\n easing: EaseIn.Quad,\n endOpacity: 0,\n startOpacity: 1\n};\nconst rotateInCenter = animation(baseRecipe$1, {\n params: { ...baseInParams$2 }\n});\nconst rotateOutCenter = animation(baseRecipe$1, {\n params: { ...baseOutParams$2 }\n});\nconst rotateInTop = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'top'\n }\n});\nconst rotateOutTop = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'top'\n }\n});\nconst rotateInRight = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'right'\n }\n});\nconst rotateOutRight = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'right'\n }\n});\nconst rotateInBottom = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'bottom'\n }\n});\nconst rotateOutBottom = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'bottom'\n }\n});\nconst rotateInLeft = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'left'\n }\n});\nconst rotateOutLeft = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'left'\n }\n});\nconst rotateInTr = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'right',\n yPos: 'top'\n }\n});\nconst rotateOutTr = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'right',\n yPos: 'top'\n }\n});\nconst rotateInBr = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'right',\n yPos: 'bottom'\n }\n});\nconst rotateOutBr = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'right',\n yPos: 'bottom'\n }\n});\nconst rotateInBl = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'left',\n yPos: 'bottom'\n }\n});\nconst rotateOutBl = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'left',\n yPos: 'bottom'\n }\n});\nconst rotateInTl = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n xPos: 'left',\n yPos: 'top'\n }\n});\nconst rotateOutTl = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n xPos: 'left',\n yPos: 'top'\n }\n});\nconst rotateInDiagonal1 = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n rotateX: 1,\n rotateY: 1,\n rotateZ: 0\n }\n});\nconst rotateOutDiagonal1 = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n rotateX: 1,\n rotateY: 1,\n rotateZ: 0\n }\n});\nconst rotateInDiagonal2 = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n rotateX: -1,\n rotateY: 1,\n rotateZ: 0\n }\n});\nconst rotateOutDiagonal2 = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n rotateX: -1,\n rotateY: 1,\n rotateZ: 0\n }\n});\nconst rotateInHor = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n rotateX: 0,\n rotateY: 1,\n rotateZ: 0\n }\n});\nconst rotateOutHor = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n rotateX: 0,\n rotateY: 1,\n rotateZ: 0\n }\n});\nconst rotateInVer = animation(baseRecipe$1, {\n params: {\n ...baseInParams$2,\n rotateX: 1,\n rotateY: 0,\n rotateZ: 0\n }\n});\nconst rotateOutVer = animation(baseRecipe$1, {\n params: {\n ...baseOutParams$2,\n rotateX: 1,\n rotateY: 0,\n rotateZ: 0\n }\n});\n\nconst baseRecipe = [\n animate(`{{duration}} {{delay}} {{easing}}`, keyframes([\n style({\n offset: 0,\n transform: `rotate(0deg) translate{{direction}}(0)`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }),\n style({\n offset: 0.1,\n transform: `rotate({{endAngle}}deg) translate{{direction}}(-{{startDistance}})`\n }),\n style({\n offset: 0.2,\n transform: `rotate(-{{startAngle}}deg) translate{{direction}}({{startDistance}})`\n }),\n style({\n offset: 0.3,\n transform: `rotate({{startAngle}}deg) translate{{direction}}(-{{startDistance}})`\n }),\n style({\n offset: 0.4,\n transform: `rotate(-{{startAngle}}deg) translate{{direction}}({{startDistance}})`\n }),\n style({\n offset: 0.5,\n transform: `rotate({{startAngle}}deg) translate{{direction}}(-{{startDistance}})`\n }),\n style({\n offset: 0.6,\n transform: `rotate(-{{startAngle}}deg) translate{{direction}}({{startDistance}})`\n }),\n style({\n offset: 0.7,\n transform: `rotate({{startAngle}}deg) translate{{direction}}(-{{startDistance}})`\n }),\n style({\n offset: 0.8,\n transform: `rotate(-{{endAngle}}deg) translate{{direction}}({{endDistance}})`\n }),\n style({\n offset: 0.9,\n transform: `rotate({{endAngle}}deg) translate{{direction}}(-{{endDistance}})`\n }),\n style({\n offset: 1,\n transform: `rotate(0deg) translate{{direction}}(0)`,\n transformOrigin: `{{xPos}} {{yPos}}`\n })\n ]))\n];\nconst baseParams$1 = {\n delay: '0s',\n direction: 'X',\n duration: '800ms',\n easing: EaseInOut.Quad,\n endAngle: 0,\n endDistance: '8px',\n startAngle: 0,\n startDistance: '10px',\n xPos: 'center',\n yPos: 'center'\n};\nconst shakeHor = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'X'\n }\n});\nconst shakeVer = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y'\n }\n});\nconst shakeTop = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n yPos: 'top'\n }\n});\nconst shakeBottom = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n yPos: 'bottom'\n }\n});\nconst shakeRight = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n xPos: 'right',\n yPos: 'center'\n }\n});\nconst shakeLeft = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n xPos: 'left',\n yPos: 'center'\n }\n});\nconst shakeCenter = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 8,\n endDistance: '0',\n startAngle: 10,\n startDistance: '0',\n xPos: 'center',\n yPos: 'center'\n }\n});\nconst shakeTr = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n xPos: 'right',\n yPos: 'top'\n }\n});\nconst shakeBr = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n xPos: 'right',\n yPos: 'bottom'\n }\n});\nconst shakeBl = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n xPos: 'left',\n yPos: 'bottom'\n }\n});\nconst shakeTl = animation(baseRecipe, {\n params: {\n ...baseParams$1,\n direction: 'Y',\n endAngle: 2,\n endDistance: '0',\n startAngle: 4,\n startDistance: '0',\n xPos: 'left',\n yPos: 'top'\n }\n});\n\nconst heartbeatBase = [\n style({\n animationTimingFunction: `ease-out`,\n transform: `scale(1)`,\n transformOrigin: `center center`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, keyframes([\n style({\n animationTimingFunction: `ease-in`,\n offset: 0.1,\n transform: `scale(0.91)`\n }),\n style({\n animationTimingFunction: `ease-out`,\n offset: 0.17,\n transform: `scale(0.98)`\n }),\n style({\n animationTimingFunction: `ease-in`,\n offset: 0.33,\n transform: `scale(0.87)`\n }),\n style({\n animationTimingFunction: `ease-out`,\n offset: 0.45,\n transform: `scale(1)`\n })\n ]))\n];\nconst heartbeatParams = {\n delay: '0s',\n duration: '1.5s',\n easing: 'ease-in-out'\n};\nconst pulsateBase = [\n animate(`{{duration}} {{delay}} {{easing}}`, keyframes([\n style({\n offset: 0,\n transform: `scale({{fromScale}})`\n }),\n style({\n offset: 0.5,\n transform: `scale({{toScale}})`\n }),\n style({\n offset: 1,\n transform: `scale({{fromScale}})`\n })\n ]))\n];\nconst pulsateParams = {\n delay: '0s',\n duration: '.5s',\n easing: 'ease-in-out',\n fromScale: 1,\n toScale: 1.1\n};\nconst blinkBase = [\n animate(`{{duration}} {{delay}} {{easing}}`, keyframes([\n style({\n offset: 0,\n opacity: .8,\n transform: `scale({{fromScale}})`\n }),\n style({\n offset: 0.8,\n opacity: 0,\n transform: `scale({{midScale}})`\n }),\n style({\n offset: 1,\n opacity: 0,\n transform: `scale({{toScale}})`\n })\n ]))\n];\nconst blinkParams = {\n delay: '0s',\n duration: '.8s',\n easing: 'ease-in-out',\n fromScale: .2,\n midScale: 1.2,\n toScale: 2.2\n};\nconst pulsateFwd = animation(pulsateBase, {\n params: {\n ...pulsateParams\n }\n});\nconst pulsateBck = animation(pulsateBase, {\n params: {\n ...pulsateParams,\n toScale: .9\n }\n});\nconst heartbeat = animation(heartbeatBase, {\n params: {\n ...heartbeatParams\n }\n});\nconst blink = animation(blinkBase, {\n params: {\n ...blinkParams\n }\n});\n\nconst base$2 = [\n style({\n opacity: `{{startOpacity}}`,\n transform: `scale{{direction}}({{fromScale}})`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, style({\n opacity: `{{endOpacity}}`,\n transform: `scale{{direction}}({{toScale}})`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }))\n];\nconst baseInParams$1 = {\n delay: '0s',\n direction: '',\n duration: '350ms',\n easing: EaseOut.Quad,\n endOpacity: 1,\n fromScale: .5,\n startOpacity: 0,\n toScale: 1,\n xPos: '50%',\n yPos: '50%'\n};\nconst baseOutParams$1 = {\n ...baseInParams$1,\n easing: EaseOut.Sine,\n endOpacity: 0,\n fromScale: 1,\n startOpacity: 1,\n toScale: .5\n};\nconst scaleInCenter = animation(base$2, { params: baseInParams$1 });\nconst scaleInBl = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '0',\n yPos: '100%'\n }\n});\nconst scaleInVerCenter = animation(base$2, {\n params: {\n ...baseInParams$1,\n direction: 'Y',\n fromScale: .4\n }\n});\nconst scaleInTop = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '50%',\n yPos: '0'\n }\n});\nconst scaleInLeft = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '0',\n yPos: '50%'\n }\n});\nconst scaleInVerTop = animation(base$2, {\n params: {\n ...baseInParams$1,\n direction: 'Y',\n fromScale: .4,\n xPos: '100%',\n yPos: '0'\n }\n});\nconst scaleInTr = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '100%',\n yPos: '0'\n }\n});\nconst scaleInTl = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '0',\n yPos: '0'\n }\n});\nconst scaleInVerBottom = animation(base$2, {\n params: {\n ...baseInParams$1,\n direction: 'Y',\n fromScale: .4,\n xPos: '0',\n yPos: '100%'\n }\n});\nconst scaleInRight = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '100%',\n yPos: '50%'\n }\n});\nconst scaleInHorCenter = animation(base$2, {\n params: {\n ...baseInParams$1,\n direction: 'X',\n fromScale: .4\n }\n});\nconst scaleInBr = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '100%',\n yPos: '100%'\n }\n});\nconst scaleInHorLeft = animation(base$2, {\n params: {\n ...baseInParams$1,\n direction: 'X',\n fromScale: .4,\n xPos: '0',\n yPos: '0'\n }\n});\nconst scaleInBottom = animation(base$2, {\n params: {\n ...baseInParams$1,\n xPos: '50%',\n yPos: '100%'\n }\n});\nconst scaleInHorRight = animation(base$2, {\n params: {\n ...baseInParams$1,\n direction: 'X',\n fromScale: .4,\n xPos: '100%',\n yPos: '100%'\n }\n});\nconst scaleOutCenter = animation(base$2, { params: baseOutParams$1 });\nconst scaleOutBl = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '0',\n yPos: '100%'\n }\n});\nconst scaleOutBr = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '100%',\n yPos: '100%'\n }\n});\nconst scaleOutVerCenter = animation(base$2, {\n params: {\n ...baseOutParams$1,\n direction: 'Y',\n toScale: .3\n }\n});\nconst scaleOutVerTop = animation(base$2, {\n params: {\n ...baseOutParams$1,\n direction: 'Y',\n toScale: .3,\n xPos: '100%',\n yPos: '0'\n }\n});\nconst scaleOutVerBottom = animation(base$2, {\n params: {\n ...baseOutParams$1,\n direction: 'Y',\n toScale: .3,\n xPos: '0',\n yPos: '100%'\n }\n});\nconst scaleOutTop = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '50%',\n yPos: '0'\n }\n});\nconst scaleOutLeft = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '0',\n yPos: '50%'\n }\n});\nconst scaleOutTr = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '100%',\n yPos: '0'\n }\n});\nconst scaleOutTl = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '0',\n yPos: '0'\n }\n});\nconst scaleOutRight = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '100%',\n yPos: '50%'\n }\n});\nconst scaleOutBottom = animation(base$2, {\n params: {\n ...baseOutParams$1,\n xPos: '50%',\n yPos: '100%'\n }\n});\nconst scaleOutHorCenter = animation(base$2, {\n params: {\n ...baseOutParams$1,\n direction: 'X',\n toScale: .3\n }\n});\nconst scaleOutHorLeft = animation(base$2, {\n params: {\n ...baseOutParams$1,\n direction: 'X',\n toScale: .3,\n xPos: '0',\n yPos: '0'\n }\n});\nconst scaleOutHorRight = animation(base$2, {\n params: {\n ...baseOutParams$1,\n direction: 'X',\n toScale: .3,\n xPos: '100%',\n yPos: '100%'\n }\n});\n\nconst base$1 = [\n style({\n opacity: `{{startOpacity}}`,\n transform: `{{fromPosition}}`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, style({\n opacity: `{{endOpacity}}`,\n transform: `{{toPosition}}`\n }))\n];\nconst baseInParams = {\n delay: '0s',\n duration: '350ms',\n easing: EaseOut.Quad,\n endOpacity: 1,\n fromPosition: 'translateY(-500px)',\n startOpacity: 0,\n toPosition: 'translateY(0)'\n};\nconst baseOutParams = {\n delay: '0s',\n duration: '350ms',\n easing: EaseIn.Quad,\n endOpacity: 0,\n fromPosition: 'translateY(0)',\n startOpacity: 1,\n toPosition: 'translateY(-500px)'\n};\nconst slideInTop = animation(base$1, { params: baseInParams });\nconst slideInLeft = animation(base$1, {\n params: {\n delay: '0s',\n duration: '350ms',\n easing: EaseOut.Quad,\n endOpacity: 1,\n fromPosition: 'translateX(-500px)',\n startOpacity: 0,\n toPosition: 'translateY(0)'\n }\n});\nconst slideInRight = animation(base$1, {\n params: {\n delay: '0s',\n duration: '350ms',\n easing: EaseOut.Quad,\n endOpacity: 1,\n fromPosition: 'translateX(500px)',\n startOpacity: 0,\n toPosition: 'translateY(0)'\n }\n});\nconst slideInBottom = animation(base$1, {\n params: {\n delay: '0s',\n duration: '350ms',\n easing: EaseOut.Quad,\n endOpacity: 1,\n fromPosition: 'translateY(500px)',\n startOpacity: 0,\n toPosition: 'translateY(0)'\n }\n});\nconst slideInTr = animation(base$1, {\n params: {\n ...baseInParams,\n fromPosition: 'translateY(-500px) translateX(500px)',\n toPosition: 'translateY(0) translateX(0)'\n }\n});\nconst slideInTl = animation(base$1, {\n params: {\n ...baseInParams,\n fromPosition: 'translateY(-500px) translateX(-500px)',\n toPosition: 'translateY(0) translateX(0)'\n }\n});\nconst slideInBr = animation(base$1, {\n params: {\n ...baseInParams,\n fromPosition: 'translateY(500px) translateX(500px)',\n toPosition: 'translateY(0) translateX(0)'\n }\n});\nconst slideInBl = animation(base$1, {\n params: {\n ...baseInParams,\n fromPosition: 'translateY(500px) translateX(-500px)',\n toPosition: 'translateY(0) translateX(0)'\n }\n});\nconst slideOutTop = animation(base$1, { params: baseOutParams });\nconst slideOutRight = animation(base$1, {\n params: {\n ...baseOutParams,\n toPosition: 'translateX(500px)'\n }\n});\nconst slideOutBottom = animation(base$1, {\n params: {\n delay: '0s',\n duration: '350ms',\n easing: EaseIn.Quad,\n endOpacity: 0,\n fromPosition: 'translateY(0)',\n startOpacity: 1,\n toPosition: 'translateY(500px)'\n }\n});\nconst slideOutLeft = animation(base$1, {\n params: {\n ...baseOutParams,\n toPosition: 'translateX(-500px)'\n }\n});\nconst slideOutTr = animation(base$1, {\n params: {\n ...baseOutParams,\n fromPosition: 'translateY(0) translateX(0)',\n toPosition: 'translateY(-500px) translateX(500px)'\n }\n});\nconst slideOutBr = animation(base$1, {\n params: {\n ...baseOutParams,\n fromPosition: 'translateY(0) translateX(0)',\n toPosition: 'translateY(500px) translateX(500px)'\n }\n});\nconst slideOutBl = animation(base$1, {\n params: {\n ...baseOutParams,\n fromPosition: 'translateY(0) translateX(0)',\n toPosition: 'translateY(500px) translateX(-500px)'\n }\n});\nconst slideOutTl = animation(base$1, {\n params: {\n ...baseOutParams,\n fromPosition: 'translateY(0) translateX(0)',\n toPosition: 'translateY(-500px) translateX(-500px)'\n }\n});\n\nconst swingBase = [\n style({\n opacity: `{{startOpacity}}`,\n transform: `rotate{{direction}}({{startAngle}}deg)`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, style({\n opacity: `{{endOpacity}}`,\n transform: `rotate{{direction}}({{endAngle}}deg)`,\n transformOrigin: `{{xPos}} {{yPos}}`\n }))\n];\nconst swingParams = {\n delay: '0s',\n direction: 'X',\n duration: '.5s',\n easing: EaseOut.Back,\n endAngle: 0,\n endOpacity: 1,\n startAngle: -100,\n startOpacity: 0,\n xPos: 'top',\n yPos: 'center'\n};\nconst swingOutParams = {\n ...swingParams,\n duration: '.55s',\n easing: EaseIn.Back,\n endAngle: 70,\n endOpacity: 0,\n startAngle: 0,\n startOpacity: 1\n};\nconst swingInTopFwd = animation(swingBase, {\n params: {\n ...swingParams\n }\n});\nconst swingInRightFwd = animation(swingBase, {\n params: {\n ...swingParams,\n direction: 'Y',\n xPos: 'center',\n yPos: 'right'\n }\n});\nconst swingInBottomFwd = animation(swingBase, {\n params: {\n ...swingParams,\n startAngle: 100,\n xPos: 'bottom'\n }\n});\nconst swingInLeftFwd = animation(swingBase, {\n params: {\n ...swingParams,\n direction: 'Y',\n startAngle: 100,\n xPos: 'center',\n yPos: 'left'\n }\n});\nconst swingInTopBck = animation(swingBase, {\n params: {\n ...swingParams,\n duration: '.6s',\n startAngle: 70\n }\n});\nconst swingInRightBck = animation(swingBase, {\n params: {\n ...swingParams,\n direction: 'Y',\n duration: '.6s',\n startAngle: 70,\n xPos: 'center',\n yPos: 'right'\n }\n});\nconst swingInBottomBck = animation(swingBase, {\n params: {\n ...swingParams,\n duration: '.6s',\n startAngle: -70,\n xPos: 'bottom'\n }\n});\nconst swingInLeftBck = animation(swingBase, {\n params: {\n ...swingParams,\n direction: 'Y',\n duration: '.6s',\n startAngle: -70,\n xPos: 'center',\n yPos: 'left'\n }\n});\nconst swingOutTopFwd = animation(swingBase, {\n params: {\n ...swingOutParams\n }\n});\nconst swingOutRightFwd = animation(swingBase, {\n params: {\n ...swingOutParams,\n direction: 'Y',\n xPos: 'center',\n yPos: 'right'\n }\n});\nconst swingOutBottomFwd = animation(swingBase, {\n params: {\n ...swingOutParams,\n endAngle: -70,\n xPos: 'bottom'\n }\n});\nconst swingOutLefttFwd = animation(swingBase, {\n params: {\n ...swingOutParams,\n direction: 'Y',\n endAngle: -70,\n xPos: 'center',\n yPos: 'left'\n }\n});\nconst swingOutTopBck = animation(swingBase, {\n params: {\n ...swingOutParams,\n duration: '.45s',\n endAngle: -100\n }\n});\nconst swingOutRightBck = animation(swingBase, {\n params: {\n ...swingOutParams,\n direction: 'Y',\n duration: '.45s',\n endAngle: -100,\n xPos: 'center',\n yPos: 'right'\n }\n});\nconst swingOutBottomBck = animation(swingBase, {\n params: {\n ...swingOutParams,\n duration: '.45s',\n endAngle: 100,\n xPos: 'bottom'\n }\n});\nconst swingOutLeftBck = animation(swingBase, {\n params: {\n ...swingOutParams,\n direction: 'Y',\n duration: '.45s',\n endAngle: 100,\n xPos: 'center',\n yPos: 'left'\n }\n});\n\nconst base = [\n style({\n opacity: `{{ startOpacity }}`,\n height: `{{ startHeight }}`,\n paddingBlock: `{{ startPadding }}`\n }),\n animate(`{{duration}} {{delay}} {{easing}}`, style({\n opacity: `{{ endOpacity }}`,\n height: `{{ endHeight }}`,\n paddingBlock: `{{ endPadding }}`\n }))\n];\nconst baseParams = {\n delay: '0s',\n duration: '350ms',\n easing: EaseIn.Quad,\n startOpacity: 0,\n endOpacity: 1,\n startHeight: '',\n endHeight: '',\n startPadding: '',\n endPadding: '',\n};\nconst growVerIn = animation(base, {\n params: {\n ...baseParams,\n easing: EaseOut.Quad,\n startOpacity: 0,\n endOpacity: 1,\n startHeight: '0px',\n endHeight: '*',\n startPadding: '0px',\n endPadding: '*'\n }\n});\nconst growVerOut = animation(base, {\n params: {\n ...baseParams,\n easing: EaseOut.Quad,\n startOpacity: 1,\n endOpacity: 0,\n startHeight: '*',\n endHeight: '0px',\n startPadding: '*',\n endPadding: '0px'\n }\n});\n\n/**\n * Common service to be injected between components where those implementing common\n * ToggleView interface can register and toggle directives can call their methods.\n * TODO: Track currently active? Events?\n */\nclass IgxNavigationService {\n constructor() {\n this.navs = {};\n }\n add(id, navItem) {\n this.navs[id] = navItem;\n }\n remove(id) {\n delete this.navs[id];\n }\n get(id) {\n if (id) {\n return this.navs[id];\n }\n }\n toggle(id, ...args) {\n if (this.navs[id]) {\n return this.navs[id].toggle(...args);\n }\n }\n open(id, ...args) {\n if (this.navs[id]) {\n return this.navs[id].open(...args);\n }\n }\n close(id, ...args) {\n if (this.navs[id]) {\n return this.navs[id].close(...args);\n }\n }\n}\nIgxNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return []; } });\n\n/**\n * Directive that can toggle targets through provided NavigationService.\n *\n * Usage:\n * ```\n * \n * ```\n * Where the `ID` matches the ID of compatible `IToggleView` component.\n */\nclass IgxNavigationToggleDirective {\n constructor(nav) {\n this.state = nav;\n }\n toggleNavigationDrawer() {\n this.state.toggle(this.target, true);\n }\n}\nIgxNavigationToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationToggleDirective, deps: [{ token: IgxNavigationService }], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavigationToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavigationToggleDirective, selector: \"[igxNavToggle]\", inputs: { target: [\"igxNavToggle\", \"target\"] }, host: { listeners: { \"click\": \"toggleNavigationDrawer()\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationToggleDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxNavToggle]' }]\n }], ctorParameters: function () { return [{ type: IgxNavigationService }]; }, propDecorators: { target: [{\n type: Input,\n args: ['igxNavToggle']\n }], toggleNavigationDrawer: [{\n type: HostListener,\n args: ['click']\n }] } });\n/**\n * Directive that can close targets through provided NavigationService.\n *\n * Usage:\n * ```\n * \n * ```\n * Where the `ID` matches the ID of compatible `IToggleView` component.\n */\nclass IgxNavigationCloseDirective {\n constructor(nav) {\n this.state = nav;\n }\n closeNavigationDrawer() {\n this.state.close(this.target, true);\n }\n}\nIgxNavigationCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationCloseDirective, deps: [{ token: IgxNavigationService }], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavigationCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavigationCloseDirective, selector: \"[igxNavClose]\", inputs: { target: [\"igxNavClose\", \"target\"] }, host: { listeners: { \"click\": \"closeNavigationDrawer()\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationCloseDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxNavClose]' }]\n }], ctorParameters: function () { return [{ type: IgxNavigationService }]; }, propDecorators: { target: [{\n type: Input,\n args: ['igxNavClose']\n }], closeNavigationDrawer: [{\n type: HostListener,\n args: ['click']\n }] } });\n/**\n * @hidden\n */\nclass IgxNavigationModule {\n}\nIgxNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationModule, declarations: [IgxNavigationCloseDirective, IgxNavigationToggleDirective], exports: [IgxNavigationCloseDirective, IgxNavigationToggleDirective] });\nIgxNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationModule, providers: [IgxNavigationService] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxNavigationCloseDirective, IgxNavigationToggleDirective],\n exports: [IgxNavigationCloseDirective, IgxNavigationToggleDirective],\n providers: [IgxNavigationService]\n }]\n }] });\n\n/* Copyright (c) 2014-2020 Denis Pushkarev\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE\n */\n// Note: Originally copied from core-js-pure package and modified. (https://github.com/zloirock/core-js)\nconst queue = {};\nlet counter = 0;\nlet eventListenerAdded = false;\nconst run = (id) => {\n if (queue.hasOwnProperty(id)) {\n const fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nconst listener = (event) => run(event.data);\n// Use function instead of arrow function to workaround an issue in codesandbox\nfunction setImmediate(cb, ...args) {\n if (window.setImmediate) {\n return window.setImmediate(cb);\n }\n if (!eventListenerAdded) {\n eventListenerAdded = true;\n window.addEventListener('message', listener, false);\n }\n queue[++counter] = () => {\n cb.apply(undefined, args);\n };\n const windowLocation = window.location;\n window.postMessage(counter + '', windowLocation.protocol + '//' + windowLocation.host);\n return counter;\n}\nfunction clearImmediate(id) {\n if (window.clearImmediate) {\n return window.clearImmediate(id);\n }\n delete queue[id];\n}\n\n/**\n * @hidden\n */\nconst showMessage = (message, isMessageShown) => {\n if (!isMessageShown && isDevMode()) {\n console.warn(message);\n }\n return true;\n};\nconst mkenum = (x) => x;\n/**\n *\n * @hidden @internal\n */\nconst getResizeObserver = () => window.ResizeObserver;\n/**\n * @hidden\n */\nconst cloneArray = (array, deep) => {\n const arr = [];\n if (!array) {\n return arr;\n }\n let i = array.length;\n while (i--) {\n arr[i] = deep ? cloneValue(array[i]) : array[i];\n }\n return arr;\n};\n/**\n * Doesn't clone leaf items\n *\n * @hidden\n */\nconst cloneHierarchicalArray = (array, childDataKey) => {\n const result = [];\n if (!array) {\n return result;\n }\n for (const item of array) {\n const clonedItem = cloneValue(item);\n if (Array.isArray(item[childDataKey])) {\n clonedItem[childDataKey] = cloneHierarchicalArray(clonedItem[childDataKey], childDataKey);\n }\n result.push(clonedItem);\n }\n return result;\n};\n/**\n * Creates an object with prototype from provided source and copies\n * all properties descriptors from provided source\n * @param obj Source to copy prototype and descriptors from\n * @returns New object with cloned prototype and property descriptors\n */\nconst copyDescriptors = (obj) => {\n if (obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n }\n};\n/**\n * Deep clones all first level keys of Obj2 and merges them to Obj1\n *\n * @param obj1 Object to merge into\n * @param obj2 Object to merge from\n * @returns Obj1 with merged cloned keys from Obj2\n * @hidden\n */\nconst mergeObjects = (obj1, obj2) => mergeWith(obj1, obj2, (objValue, srcValue) => {\n if (Array.isArray(srcValue)) {\n return objValue = srcValue;\n }\n});\n/**\n * Creates deep clone of provided value.\n * Supports primitive values, dates and objects.\n * If passed value is array returns shallow copy of the array.\n *\n * @param value value to clone\n * @returns Deep copy of provided value\n * @hidden\n */\nconst cloneValue = (value) => {\n if (isDate(value)) {\n return new Date(value.getTime());\n }\n if (Array.isArray(value)) {\n return [...value];\n }\n if (value instanceof Map || value instanceof Set) {\n return value;\n }\n if (isObject(value)) {\n const result = {};\n for (const key of Object.keys(value)) {\n result[key] = cloneValue(value[key]);\n }\n return result;\n }\n return value;\n};\n/**\n * Parse provided input to Date.\n *\n * @param value input to parse\n * @returns Date if parse succeed or null\n * @hidden\n */\nconst parseDate = (value) => {\n // if value is Invalid Date return null\n if (isDate(value)) {\n return !isNaN(value.getTime()) ? value : null;\n }\n return value ? new Date(value) : null;\n};\n/**\n * Returns an array with unique dates only.\n *\n * @param columnValues collection of date values (might be numbers or ISO 8601 strings)\n * @returns collection of unique dates.\n * @hidden\n */\nconst uniqueDates = (columnValues) => columnValues.reduce((a, c) => {\n if (!a.cache[c.label]) {\n a.result.push(c);\n }\n a.cache[c.label] = true;\n return a;\n}, { result: [], cache: {} }).result;\n/**\n * Checks if provided variable is Object\n *\n * @param value Value to check\n * @returns true if provided variable is Object\n * @hidden\n */\nconst isObject = (value) => !!(value && value.toString() === '[object Object]');\n/**\n * Checks if provided variable is Date\n *\n * @param value Value to check\n * @returns true if provided variable is Date\n * @hidden\n */\nconst isDate = (value) => value instanceof Date;\n/**\n * Checks if the two passed arguments are equal\n * Currently supports date objects\n *\n * @param obj1\n * @param obj2\n * @returns: `boolean`\n * @hidden\n */\nconst isEqual = (obj1, obj2) => {\n if (isDate(obj1) && isDate(obj2)) {\n return obj1.getTime() === obj2.getTime();\n }\n return obj1 === obj2;\n};\n/**\n * Checks if provided variable is the value NaN\n *\n * @param value Value to check\n * @returns true if provided variable is NaN\n * @hidden\n */\nconst isNaNvalue = (value) => isNaN(value) && value !== undefined && typeof value !== 'string';\n/**\n * Utility service taking care of various utility functions such as\n * detecting browser features, general cross browser DOM manipulation, etc.\n *\n * @hidden @internal\n */\nclass PlatformUtil {\n constructor(platformId) {\n this.platformId = platformId;\n this.isBrowser = isPlatformBrowser(this.platformId);\n this.isIOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n this.isFirefox = this.isBrowser && /Firefox[\\/\\s](\\d+\\.\\d+)/.test(navigator.userAgent);\n this.isEdge = this.isBrowser && /Edge[\\/\\s](\\d+\\.\\d+)/.test(navigator.userAgent);\n this.isChromium = this.isBrowser && (/Chrom|e?ium/g.test(navigator.userAgent) ||\n /Google Inc/g.test(navigator.vendor)) && !/Edge/g.test(navigator.userAgent);\n this.KEYMAP = mkenum({\n ENTER: 'Enter',\n SPACE: ' ',\n ESCAPE: 'Escape',\n ARROW_DOWN: 'ArrowDown',\n ARROW_UP: 'ArrowUp',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_RIGHT: 'ArrowRight',\n END: 'End',\n HOME: 'Home',\n PAGE_DOWN: 'PageDown',\n PAGE_UP: 'PageUp',\n F2: 'F2',\n TAB: 'Tab',\n SEMICOLON: ';',\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values#editing_keys\n DELETE: 'Delete',\n BACKSPACE: 'Backspace',\n CONTROL: 'Control',\n X: 'x',\n Y: 'y',\n Z: 'z'\n });\n }\n /**\n * @hidden @internal\n * Returns the actual size of the node content, using Range\n * ```typescript\n * let range = document.createRange();\n * let column = this.grid.columnList.filter(c => c.field === 'ID')[0];\n *\n * let size = getNodeSizeViaRange(range, column.cells[0].nativeElement);\n *\n * @remarks\n * The last parameter is useful when the size of the element to measure is modified by a\n * parent element that has explicit size. In such cases the calculated size is never lower\n * and the function may instead remove the parent size while measuring to get the correct value.\n * ```\n */\n getNodeSizeViaRange(range, node, sizeHoldingNode) {\n let overflow = null;\n let nodeStyles;\n if (!this.isFirefox) {\n overflow = node.style.overflow;\n // we need that hack - otherwise content won't be measured correctly in IE/Edge\n node.style.overflow = 'visible';\n }\n if (sizeHoldingNode) {\n const style = sizeHoldingNode.style;\n nodeStyles = [style.width, style.minWidth, style.flexBasis];\n style.width = '';\n style.minWidth = '';\n style.flexBasis = '';\n }\n range.selectNodeContents(node);\n const scale = node.getBoundingClientRect().width / node.offsetWidth;\n const width = range.getBoundingClientRect().width / scale;\n if (!this.isFirefox) {\n // we need that hack - otherwise content won't be measured correctly in IE/Edge\n node.style.overflow = overflow;\n }\n if (sizeHoldingNode) {\n sizeHoldingNode.style.width = nodeStyles[0];\n sizeHoldingNode.style.minWidth = nodeStyles[1];\n sizeHoldingNode.style.flexBasis = nodeStyles[2];\n }\n return width;\n }\n /**\n * Returns true if the current keyboard event is an activation key (Enter/Space bar)\n *\n * @hidden\n * @internal\n *\n * @memberof PlatformUtil\n */\n isActivationKey(event) {\n return event.key === this.KEYMAP.ENTER || event.key === this.KEYMAP.SPACE;\n }\n /**\n * Returns true if the current keyboard event is a combination that closes the filtering UI of the grid. (Escape/Ctrl+Shift+L)\n *\n * @hidden\n * @internal\n * @param event\n * @memberof PlatformUtil\n */\n isFilteringKeyCombo(event) {\n return event.key === this.KEYMAP.ESCAPE || (event.ctrlKey && event.shiftKey && event.key.toLowerCase() === 'l');\n }\n /**\n * @hidden @internal\n */\n isLeftClick(event) {\n return event.button === 0;\n }\n /**\n * @hidden @internal\n */\n isNavigationKey(key) {\n return [\n this.KEYMAP.HOME, this.KEYMAP.END, this.KEYMAP.SPACE,\n this.KEYMAP.ARROW_DOWN, this.KEYMAP.ARROW_LEFT, this.KEYMAP.ARROW_RIGHT, this.KEYMAP.ARROW_UP\n ].includes(key);\n }\n}\nPlatformUtil.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: PlatformUtil, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nPlatformUtil.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: PlatformUtil, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: PlatformUtil, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; } });\n/**\n * @hidden\n */\nconst flatten$1 = (arr) => {\n let result = [];\n arr.forEach(el => {\n result.push(el);\n if (el.children) {\n const children = Array.isArray(el.children) ? el.children : el.children.toArray();\n result = result.concat(flatten$1(children));\n }\n });\n return result;\n};\nconst HORIZONTAL_NAV_KEYS = new Set(['arrowleft', 'left', 'arrowright', 'right', 'home', 'end']);\nconst NAVIGATION_KEYS = new Set([\n 'down',\n 'up',\n 'left',\n 'right',\n 'arrowdown',\n 'arrowup',\n 'arrowleft',\n 'arrowright',\n 'home',\n 'end',\n 'space',\n 'spacebar',\n ' '\n]);\nconst ACCORDION_NAVIGATION_KEYS = new Set('up down arrowup arrowdown home end'.split(' '));\nconst ROW_EXPAND_KEYS = new Set('right down arrowright arrowdown'.split(' '));\nconst ROW_COLLAPSE_KEYS = new Set('left up arrowleft arrowup'.split(' '));\nconst ROW_ADD_KEYS = new Set(['+', 'add', '≠', '±', '=']);\nconst SUPPORTED_KEYS = new Set([...Array.from(NAVIGATION_KEYS),\n ...Array.from(ROW_ADD_KEYS), 'enter', 'f2', 'escape', 'esc', 'pagedown', 'pageup']);\nconst HEADER_KEYS = new Set([...Array.from(NAVIGATION_KEYS), 'escape', 'esc', 'l',\n /** This symbol corresponds to the Alt + L combination under MAC. */\n '¬']);\n/**\n * @hidden\n * @internal\n *\n * Creates a new ResizeObserver on `target` and returns it as an Observable.\n * Run the resizeObservable outside angular zone, because it patches the MutationObserver which causes an infinite loop.\n * Related issue: https://github.com/angular/angular/issues/31712\n */\nconst resizeObservable = (target) => new Observable((observer) => {\n const instance = new (getResizeObserver())((entries) => {\n observer.next(entries);\n });\n instance.observe(target);\n const unsubscribe = () => instance.disconnect();\n return unsubscribe;\n});\n/**\n * @hidden\n * @internal\n *\n * Compares two maps.\n */\nconst compareMaps = (map1, map2) => {\n if (!map2) {\n return !map1 ? true : false;\n }\n if (map1.size !== map2.size) {\n return false;\n }\n let match = true;\n const keys = Array.from(map2.keys());\n for (const key of keys) {\n if (map1.has(key)) {\n match = map1.get(key) === map2.get(key);\n }\n else {\n match = false;\n }\n if (!match) {\n break;\n }\n }\n return match;\n};\n/**\n *\n * Given a property access path in the format `x.y.z` resolves and returns\n * the value of the `z` property in the passed object.\n *\n * @hidden\n * @internal\n */\nconst resolveNestedPath = (obj, path) => {\n const parts = path?.split('.') ?? [];\n let current = obj[parts.shift()];\n parts.forEach(prop => {\n if (current) {\n current = current[prop];\n }\n });\n return current;\n};\n/**\n *\n * Given a property access path in the format `x.y.z` and a value\n * this functions builds and returns an object following the access path.\n *\n * @example\n * ```typescript\n * console.log('x.y.z.', 42);\n * >> { x: { y: { z: 42 } } }\n * ```\n *\n * @hidden\n * @internal\n */\nconst reverseMapper = (path, value) => {\n const obj = {};\n const parts = path?.split('.') ?? [];\n let _prop = parts.shift();\n let mapping;\n // Initial binding for first level bindings\n obj[_prop] = value;\n mapping = obj;\n parts.forEach(prop => {\n // Start building the hierarchy\n mapping[_prop] = {};\n // Go down a level\n mapping = mapping[_prop];\n // Bind the value and move the key\n mapping[prop] = value;\n _prop = prop;\n });\n return obj;\n};\nconst yieldingLoop = (count, chunkSize, callback, done) => {\n let i = 0;\n const chunk = () => {\n const end = Math.min(i + chunkSize, count);\n for (; i < end; ++i) {\n callback(i);\n }\n if (i < count) {\n setImmediate(chunk);\n }\n else {\n done();\n }\n };\n chunk();\n};\nconst isConstructor = (ref) => typeof ref === 'function' && Boolean(ref.prototype) && Boolean(ref.prototype.constructor);\nconst reverseAnimationResolver = (animation) => oppositeAnimation.get(animation) ?? animation;\nconst isHorizontalAnimation = (animation) => horizontalAnimations.includes(animation);\nconst isVerticalAnimation = (animation) => verticalAnimations.includes(animation);\nconst oppositeAnimation = new Map([\n [fadeIn, fadeIn],\n [fadeOut, fadeOut],\n [flipTop, flipBottom],\n [flipBottom, flipTop],\n [flipRight, flipLeft],\n [flipLeft, flipRight],\n [flipHorFwd, flipHorBck],\n [flipHorBck, flipHorFwd],\n [flipVerFwd, flipVerBck],\n [flipVerBck, flipVerFwd],\n [growVerIn, growVerIn],\n [growVerOut, growVerOut],\n [heartbeat, heartbeat],\n [pulsateFwd, pulsateBck],\n [pulsateBck, pulsateFwd],\n [blink, blink],\n [shakeHor, shakeHor],\n [shakeVer, shakeVer],\n [shakeTop, shakeTop],\n [shakeBottom, shakeBottom],\n [shakeRight, shakeRight],\n [shakeLeft, shakeLeft],\n [shakeCenter, shakeCenter],\n [shakeTr, shakeTr],\n [shakeBr, shakeBr],\n [shakeBl, shakeBl],\n [shakeTl, shakeTl],\n [rotateInCenter, rotateInCenter],\n [rotateOutCenter, rotateOutCenter],\n [rotateInTop, rotateInBottom],\n [rotateOutTop, rotateOutBottom],\n [rotateInRight, rotateInLeft],\n [rotateOutRight, rotateOutLeft],\n [rotateInLeft, rotateInRight],\n [rotateOutLeft, rotateOutRight],\n [rotateInBottom, rotateInTop],\n [rotateOutBottom, rotateOutTop],\n [rotateInTr, rotateInBl],\n [rotateOutTr, rotateOutBl],\n [rotateInBr, rotateInTl],\n [rotateOutBr, rotateOutTl],\n [rotateInBl, rotateInTr],\n [rotateOutBl, rotateOutTr],\n [rotateInTl, rotateInBr],\n [rotateOutTl, rotateOutBr],\n [rotateInDiagonal1, rotateInDiagonal1],\n [rotateOutDiagonal1, rotateOutDiagonal1],\n [rotateInDiagonal2, rotateInDiagonal2],\n [rotateOutDiagonal2, rotateOutDiagonal2],\n [rotateInHor, rotateInHor],\n [rotateOutHor, rotateOutHor],\n [rotateInVer, rotateInVer],\n [rotateOutVer, rotateOutVer],\n [scaleInTop, scaleInBottom],\n [scaleOutTop, scaleOutBottom],\n [scaleInRight, scaleInLeft],\n [scaleOutRight, scaleOutLeft],\n [scaleInBottom, scaleInTop],\n [scaleOutBottom, scaleOutTop],\n [scaleInLeft, scaleInRight],\n [scaleOutLeft, scaleOutRight],\n [scaleInCenter, scaleInCenter],\n [scaleOutCenter, scaleOutCenter],\n [scaleInTr, scaleInBl],\n [scaleOutTr, scaleOutBl],\n [scaleInBr, scaleInTl],\n [scaleOutBr, scaleOutTl],\n [scaleInBl, scaleInTr],\n [scaleOutBl, scaleOutTr],\n [scaleInTl, scaleInBr],\n [scaleOutTl, scaleOutBr],\n [scaleInVerTop, scaleInVerBottom],\n [scaleOutVerTop, scaleOutVerBottom],\n [scaleInVerBottom, scaleInVerTop],\n [scaleOutVerBottom, scaleOutVerTop],\n [scaleInVerCenter, scaleInVerCenter],\n [scaleOutVerCenter, scaleOutVerCenter],\n [scaleInHorCenter, scaleInHorCenter],\n [scaleOutHorCenter, scaleOutHorCenter],\n [scaleInHorLeft, scaleInHorRight],\n [scaleOutHorLeft, scaleOutHorRight],\n [scaleInHorRight, scaleInHorLeft],\n [scaleOutHorRight, scaleOutHorLeft],\n [slideInTop, slideInBottom],\n [slideOutTop, slideOutBottom],\n [slideInRight, slideInLeft],\n [slideOutRight, slideOutLeft],\n [slideInBottom, slideInTop],\n [slideOutBottom, slideOutTop],\n [slideInLeft, slideInRight],\n [slideOutLeft, slideOutRight],\n [slideInTr, slideInBl],\n [slideOutTr, slideOutBl],\n [slideInBr, slideInTl],\n [slideOutBr, slideOutTl],\n [slideInBl, slideInTr],\n [slideOutBl, slideOutTr],\n [slideInTl, slideInBr],\n [slideOutTl, slideOutBr],\n [swingInTopFwd, swingInBottomFwd],\n [swingOutTopFwd, swingOutBottomFwd],\n [swingInRightFwd, swingInLeftFwd],\n [swingOutRightFwd, swingOutLefttFwd],\n [swingInLeftFwd, swingInRightFwd],\n [swingOutLefttFwd, swingOutRightFwd],\n [swingInBottomFwd, swingInTopFwd],\n [swingOutBottomFwd, swingOutTopFwd],\n [swingInTopBck, swingInBottomBck],\n [swingOutTopBck, swingOutBottomBck],\n [swingInRightBck, swingInLeftBck],\n [swingOutRightBck, swingOutLeftBck],\n [swingInBottomBck, swingInTopBck],\n [swingOutBottomBck, swingOutTopBck],\n [swingInLeftBck, swingInRightBck],\n [swingOutLeftBck, swingOutRightBck],\n]);\nconst horizontalAnimations = [\n flipRight,\n flipLeft,\n flipVerFwd,\n flipVerBck,\n rotateInRight,\n rotateOutRight,\n rotateInLeft,\n rotateOutLeft,\n rotateInTr,\n rotateOutTr,\n rotateInBr,\n rotateOutBr,\n rotateInBl,\n rotateOutBl,\n rotateInTl,\n rotateOutTl,\n scaleInRight,\n scaleOutRight,\n scaleInLeft,\n scaleOutLeft,\n scaleInTr,\n scaleOutTr,\n scaleInBr,\n scaleOutBr,\n scaleInBl,\n scaleOutBl,\n scaleInTl,\n scaleOutTl,\n scaleInHorLeft,\n scaleOutHorLeft,\n scaleInHorRight,\n scaleOutHorRight,\n slideInRight,\n slideOutRight,\n slideInLeft,\n slideOutLeft,\n slideInTr,\n slideOutTr,\n slideInBr,\n slideOutBr,\n slideInBl,\n slideOutBl,\n slideInTl,\n slideOutTl,\n swingInRightFwd,\n swingOutRightFwd,\n swingInLeftFwd,\n swingOutLefttFwd,\n swingInRightBck,\n swingOutRightBck,\n swingInLeftBck,\n swingOutLeftBck,\n];\nconst verticalAnimations = [\n flipTop,\n flipBottom,\n flipHorFwd,\n flipHorBck,\n growVerIn,\n growVerOut,\n rotateInTop,\n rotateOutTop,\n rotateInBottom,\n rotateOutBottom,\n rotateInTr,\n rotateOutTr,\n rotateInBr,\n rotateOutBr,\n rotateInBl,\n rotateOutBl,\n rotateInTl,\n rotateOutTl,\n scaleInTop,\n scaleOutTop,\n scaleInBottom,\n scaleOutBottom,\n scaleInTr,\n scaleOutTr,\n scaleInBr,\n scaleOutBr,\n scaleInBl,\n scaleOutBl,\n scaleInTl,\n scaleOutTl,\n scaleInVerTop,\n scaleOutVerTop,\n scaleInVerBottom,\n scaleOutVerBottom,\n slideInTop,\n slideOutTop,\n slideInBottom,\n slideOutBottom,\n slideInTr,\n slideOutTr,\n slideInBr,\n slideOutBr,\n slideInBl,\n slideOutBl,\n slideInTl,\n slideOutTl,\n swingInTopFwd,\n swingOutTopFwd,\n swingInBottomFwd,\n swingOutBottomFwd,\n swingInTopBck,\n swingOutTopBck,\n swingInBottomBck,\n swingOutBottomBck,\n];\n/**\n * Similar to Angular's formatDate. However it will not throw on `undefined | null | ''` instead\n * coalescing to an empty string.\n */\nconst formatDate = (value, format, locale, timezone) => {\n if (value === null || value === undefined || value === '') {\n return '';\n }\n return formatDate$1(value, format, locale, timezone);\n};\nconst formatCurrency = new CurrencyPipe(undefined).transform;\n/** Converts pixel values to their rem counterparts for a base value */\nconst rem = (value) => {\n const base = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'));\n return Number(value) / base;\n};\n\nvar PagingError;\n(function (PagingError) {\n PagingError[PagingError[\"None\"] = 0] = \"None\";\n PagingError[PagingError[\"IncorrectPageIndex\"] = 1] = \"IncorrectPageIndex\";\n PagingError[PagingError[\"IncorrectRecordsPerPage\"] = 2] = \"IncorrectRecordsPerPage\";\n})(PagingError || (PagingError = {}));\n\nvar TransactionType;\n(function (TransactionType) {\n TransactionType[\"ADD\"] = \"add\";\n TransactionType[\"DELETE\"] = \"delete\";\n TransactionType[\"UPDATE\"] = \"update\";\n})(TransactionType || (TransactionType = {}));\nvar TransactionEventOrigin;\n(function (TransactionEventOrigin) {\n TransactionEventOrigin[\"UNDO\"] = \"undo\";\n TransactionEventOrigin[\"REDO\"] = \"redo\";\n TransactionEventOrigin[\"CLEAR\"] = \"clear\";\n TransactionEventOrigin[\"ADD\"] = \"add\";\n TransactionEventOrigin[\"END\"] = \"endPending\";\n})(TransactionEventOrigin || (TransactionEventOrigin = {}));\n\nvar SortingDirection;\n(function (SortingDirection) {\n SortingDirection[SortingDirection[\"None\"] = 0] = \"None\";\n SortingDirection[SortingDirection[\"Asc\"] = 1] = \"Asc\";\n SortingDirection[SortingDirection[\"Desc\"] = 2] = \"Desc\";\n})(SortingDirection || (SortingDirection = {}));\nclass DefaultSortingStrategy {\n constructor() { }\n static instance() {\n return this._instance || (this._instance = new this());\n }\n sort(data, fieldName, dir, ignoreCase, valueResolver, isDate, isTime) {\n const key = fieldName;\n const reverse = (dir === SortingDirection.Desc ? -1 : 1);\n const cmpFunc = (obj1, obj2) => this.compareObjects(obj1, obj2, key, reverse, ignoreCase, valueResolver, isDate, isTime);\n return this.arraySort(data, cmpFunc);\n }\n compareValues(a, b) {\n const an = (a === null || a === undefined);\n const bn = (b === null || b === undefined);\n if (an) {\n if (bn) {\n return 0;\n }\n return -1;\n }\n else if (bn) {\n return 1;\n }\n return a > b ? 1 : a < b ? -1 : 0;\n }\n compareObjects(obj1, obj2, key, reverse, ignoreCase, valueResolver, isDate, isTime) {\n let a = valueResolver.call(this, obj1, key, isDate, isTime);\n let b = valueResolver.call(this, obj2, key, isDate, isTime);\n if (ignoreCase) {\n a = a && a.toLowerCase ? a.toLowerCase() : a;\n b = b && b.toLowerCase ? b.toLowerCase() : b;\n }\n return reverse * this.compareValues(a, b);\n }\n arraySort(data, compareFn) {\n return data.sort(compareFn);\n }\n}\nDefaultSortingStrategy._instance = null;\nclass GroupMemberCountSortingStrategy {\n constructor() { }\n static instance() {\n return this._instance || (this._instance = new this());\n }\n sort(data, fieldName, dir) {\n const groupedArray = this.groupBy(data, fieldName);\n const reverse = (dir === SortingDirection.Desc ? -1 : 1);\n const cmpFunc = (a, b) => {\n return this.compareObjects(a, b, groupedArray, fieldName, reverse);\n };\n return data\n .sort((a, b) => a[fieldName].localeCompare(b[fieldName]))\n .sort(cmpFunc);\n }\n groupBy(data, key) {\n return data.reduce((acc, curr) => {\n (acc[curr[key]] = acc[curr[key]] || []).push(curr);\n return acc;\n }, {});\n }\n compareObjects(obj1, obj2, data, fieldName, reverse) {\n let firstItemValuesLength = data[obj1[fieldName]].length;\n let secondItemValuesLength = data[obj2[fieldName]].length;\n return reverse * (firstItemValuesLength - secondItemValuesLength);\n }\n}\nGroupMemberCountSortingStrategy._instance = null;\n\nconst isHierarchyMatch = (h1, h2, expressions) => {\n if (h1.length !== h2.length) {\n return false;\n }\n return h1.every((level, index) => {\n const expr = expressions.find(e => e.fieldName === level.fieldName);\n const comparer = expr.groupingComparer || DefaultSortingStrategy.instance().compareValues;\n return level.fieldName === h2[index].fieldName && comparer(level.value, h2[index].value) === 0;\n });\n};\nconst getHierarchy = (gRow) => {\n const hierarchy = [];\n if (gRow !== undefined && gRow.expression) {\n hierarchy.push({ fieldName: gRow.expression.fieldName, value: gRow.value });\n while (gRow.groupParent) {\n gRow = gRow.groupParent;\n hierarchy.unshift({ fieldName: gRow.expression.fieldName, value: gRow.value });\n }\n }\n return hierarchy;\n};\n\nconst DATE_TYPE = 'date';\nconst TIME_TYPE = 'time';\nconst DATE_TIME_TYPE = 'dateTime';\nconst STRING_TYPE = 'string';\nclass IgxSorting {\n sort(data, expressions, grid) {\n return this.sortDataRecursive(data, expressions, 0, grid);\n }\n groupDataRecursive(data, state, level, parent, metadata, grid = null, groupsRecords = [], fullResult = { data: [], metadata: [] }) {\n const expressions = state.expressions;\n const expansion = state.expansion;\n let i = 0;\n let result = [];\n while (i < data.length) {\n const column = grid ? grid.getColumnByName(expressions[level].fieldName) : null;\n const isDate = column?.dataType === DATE_TYPE || column?.dataType === DATE_TIME_TYPE;\n const isTime = column?.dataType === TIME_TYPE || column?.dataType === DATE_TIME_TYPE;\n const isString = column?.dataType === STRING_TYPE;\n const group = this.groupedRecordsByExpression(data, i, expressions[level], isDate, isTime, isString);\n const groupRow = {\n expression: expressions[level],\n level,\n records: cloneArray(group),\n value: this.getFieldValue(group[0], expressions[level].fieldName, isDate, isTime),\n groupParent: parent,\n groups: [],\n height: grid ? grid.renderedRowHeight : null,\n column\n };\n if (parent) {\n parent.groups.push(groupRow);\n }\n else {\n groupsRecords.push(groupRow);\n }\n const hierarchy = getHierarchy(groupRow);\n const expandState = expansion.find((s) => isHierarchyMatch(s.hierarchy || [{ fieldName: groupRow.expression.fieldName, value: groupRow.value }], hierarchy, expressions));\n const expanded = expandState ? expandState.expanded : state.defaultExpanded;\n let recursiveResult;\n result.push(groupRow);\n metadata.push(null);\n fullResult.data.push(groupRow);\n fullResult.metadata.push(null);\n if (level < expressions.length - 1) {\n recursiveResult = this.groupDataRecursive(group, state, level + 1, groupRow, expanded ? metadata : [], grid, groupsRecords, fullResult);\n if (expanded) {\n result = result.concat(recursiveResult);\n }\n }\n else {\n for (const groupItem of group) {\n fullResult.metadata.push(groupRow);\n fullResult.data.push(groupItem);\n }\n if (expanded) {\n metadata.push(...fullResult.metadata.slice(fullResult.metadata.length - group.length));\n result.push(...fullResult.data.slice(fullResult.data.length - group.length));\n }\n }\n i += group.length;\n }\n return result;\n }\n getFieldValue(obj, key, isDate = false, isTime = false) {\n let resolvedValue = resolveNestedPath(obj, key);\n const date = parseDate(resolvedValue);\n if (date && isDate && isTime) {\n resolvedValue = date;\n }\n else if (date && isDate && !isTime) {\n resolvedValue = new Date(date.setHours(0, 0, 0, 0));\n }\n else if (date && isTime && !isDate) {\n resolvedValue = new Date().setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n }\n return resolvedValue;\n }\n groupedRecordsByExpression(data, index, expression, isDate = false, isTime = false, isString, groupingComparer) {\n const res = [];\n const key = expression.fieldName;\n const len = data.length;\n const groupRecord = data[index];\n let groupval = this.getFieldValue(groupRecord, key, isDate, isTime);\n res.push(groupRecord);\n index++;\n const comparer = expression.groupingComparer || groupingComparer || DefaultSortingStrategy.instance().compareValues;\n for (let i = index; i < len; i++) {\n const currRec = data[i];\n let fieldValue = this.getFieldValue(currRec, key, isDate, isTime);\n if (expression.ignoreCase && isString) {\n // when column's dataType is string but the value is number\n fieldValue = fieldValue?.toString().toLowerCase();\n groupval = groupval?.toString().toLowerCase();\n }\n if (comparer(fieldValue, groupval, currRec, groupRecord) === 0) {\n res.push(currRec);\n }\n else {\n break;\n }\n }\n return res;\n }\n sortDataRecursive(data, expressions, expressionIndex = 0, grid) {\n let i;\n let j;\n let gbData;\n let gbDataLen;\n const exprsLen = expressions.length;\n const dataLen = data.length;\n expressionIndex = expressionIndex || 0;\n if (expressionIndex >= exprsLen || dataLen <= 1) {\n return data;\n }\n const expr = expressions[expressionIndex];\n if (!expr.strategy) {\n expr.strategy = DefaultSortingStrategy.instance();\n }\n const column = grid?.getColumnByName(expr.fieldName);\n const isDate = column?.dataType === DATE_TYPE || column?.dataType === DATE_TIME_TYPE;\n const isTime = column?.dataType === TIME_TYPE || column?.dataType === DATE_TIME_TYPE;\n const isString = column?.dataType === STRING_TYPE;\n data = expr.strategy.sort(data, expr.fieldName, expr.dir, expr.ignoreCase, this.getFieldValue, isDate, isTime, grid);\n if (expressionIndex === exprsLen - 1) {\n return data;\n }\n // in case of multiple sorting\n for (i = 0; i < dataLen; i++) {\n gbData = this.groupedRecordsByExpression(data, i, expr, isDate, isTime, isString, column?.groupingComparer);\n gbDataLen = gbData.length;\n if (gbDataLen > 1) {\n gbData = this.sortDataRecursive(gbData, expressions, expressionIndex + 1, grid);\n }\n for (j = 0; j < gbDataLen; j++) {\n data[i + j] = gbData[j];\n }\n i += gbDataLen - 1;\n }\n return data;\n }\n}\nclass IgxGrouping extends IgxSorting {\n groupBy(data, state, grid, groupsRecords, fullResult = { data: [], metadata: [] }) {\n const metadata = [];\n const grouping = this.groupDataRecursive(data, state, 0, null, metadata, grid, groupsRecords, fullResult);\n return {\n data: grouping,\n metadata\n };\n }\n}\nclass NoopSortingStrategy {\n constructor() { }\n static instance() {\n return this._instance || (this._instance = new NoopSortingStrategy());\n }\n sort(data) {\n return data;\n }\n}\nNoopSortingStrategy._instance = null;\nclass IgxDataRecordSorting extends IgxSorting {\n getFieldValue(obj, key, isDate = false, isTime = false) {\n return super.getFieldValue(obj.data, key, isDate, isTime);\n }\n}\n\nclass DefaultDataCloneStrategy {\n clone(data) {\n return cloneValue(data);\n }\n}\n\n/**\n * @hidden\n */\nconst DataType = mkenum({\n String: 'string',\n Number: 'number',\n Boolean: 'boolean',\n Date: 'date',\n DateTime: 'dateTime',\n Time: 'time',\n Currency: 'currency',\n Percent: 'percent',\n Image: 'image'\n});\n/**\n * @hidden\n */\nconst GridColumnDataType = DataType;\n/**\n * @hidden\n */\nclass DataUtil {\n static sort(data, expressions, sorting = new IgxSorting(), grid) {\n return sorting.sort(data, expressions, grid);\n }\n static treeGridSort(hierarchicalData, expressions, sorting = new IgxDataRecordSorting(), parent, grid) {\n let res = [];\n hierarchicalData.forEach((hr) => {\n const rec = DataUtil.cloneTreeGridRecord(hr);\n rec.parent = parent;\n if (rec.children) {\n rec.children = DataUtil.treeGridSort(rec.children, expressions, sorting, rec, grid);\n }\n res.push(rec);\n });\n res = DataUtil.sort(res, expressions, sorting, grid);\n return res;\n }\n static cloneTreeGridRecord(hierarchicalRecord) {\n const rec = {\n key: hierarchicalRecord.key,\n data: hierarchicalRecord.data,\n children: hierarchicalRecord.children,\n isFilteredOutParent: hierarchicalRecord.isFilteredOutParent,\n level: hierarchicalRecord.level,\n expanded: hierarchicalRecord.expanded\n };\n return rec;\n }\n static group(data, state, grouping = new IgxGrouping(), grid = null, groupsRecords = [], fullResult = { data: [], metadata: [] }) {\n groupsRecords.splice(0, groupsRecords.length);\n return grouping.groupBy(data, state, grid, groupsRecords, fullResult);\n }\n static page(data, state, dataLength) {\n if (!state) {\n return data;\n }\n const len = dataLength !== undefined ? dataLength : data.length;\n const index = state.index;\n const res = [];\n const recordsPerPage = dataLength !== undefined && state.recordsPerPage > dataLength ? dataLength : state.recordsPerPage;\n state.metadata = {\n countPages: 0,\n countRecords: len,\n error: PagingError.None\n };\n if (index < 0 || isNaN(index)) {\n state.metadata.error = PagingError.IncorrectPageIndex;\n return res;\n }\n if (recordsPerPage <= 0 || isNaN(recordsPerPage)) {\n state.metadata.error = PagingError.IncorrectRecordsPerPage;\n return res;\n }\n state.metadata.countPages = Math.ceil(len / recordsPerPage);\n if (!len) {\n return data;\n }\n if (index >= state.metadata.countPages) {\n state.metadata.error = PagingError.IncorrectPageIndex;\n return res;\n }\n return data.slice(index * recordsPerPage, (index + 1) * recordsPerPage);\n }\n static correctPagingState(state, length) {\n const maxPage = Math.ceil(length / state.recordsPerPage) - 1;\n if (!isNaN(maxPage) && state.index > maxPage) {\n state.index = maxPage;\n }\n }\n static getHierarchy(gRow) {\n return getHierarchy(gRow);\n }\n static isHierarchyMatch(h1, h2, expressions) {\n return isHierarchyMatch(h1, h2, expressions);\n }\n /**\n * Merges all changes from provided transactions into provided data collection\n *\n * @param data Collection to merge\n * @param transactions Transactions to merge into data\n * @param primaryKey Primary key of the collection, if any\n * @param deleteRows Should delete rows with DELETE transaction type from data\n * @returns Provided data collections updated with all provided transactions\n */\n static mergeTransactions(data, transactions, primaryKey, cloneStrategy = new DefaultDataCloneStrategy(), deleteRows = false) {\n data.forEach((item, index) => {\n const rowId = primaryKey ? item[primaryKey] : item;\n const transaction = transactions.find(t => t.id === rowId);\n if (transaction && transaction.type === TransactionType.UPDATE) {\n data[index] = mergeObjects(cloneStrategy.clone(data[index]), transaction.newValue);\n }\n });\n if (deleteRows) {\n transactions\n .filter(t => t.type === TransactionType.DELETE)\n .forEach(t => {\n const index = primaryKey ? data.findIndex(d => d[primaryKey] === t.id) : data.findIndex(d => d === t.id);\n if (0 <= index && index < data.length) {\n data.splice(index, 1);\n }\n });\n }\n data.push(...transactions\n .filter(t => t.type === TransactionType.ADD)\n .map(t => t.newValue));\n return data;\n }\n /**\n * Merges all changes from provided transactions into provided hierarchical data collection\n *\n * @param data Collection to merge\n * @param transactions Transactions to merge into data\n * @param childDataKey Data key of child collections\n * @param primaryKey Primary key of the collection, if any\n * @param deleteRows Should delete rows with DELETE transaction type from data\n * @returns Provided data collections updated with all provided transactions\n */\n static mergeHierarchicalTransactions(data, transactions, childDataKey, primaryKey, cloneStrategy = new DefaultDataCloneStrategy(), deleteRows = false) {\n for (const transaction of transactions) {\n if (transaction.path) {\n const parent = this.findParentFromPath(data, primaryKey, childDataKey, transaction.path);\n let collection = parent ? parent[childDataKey] : data;\n switch (transaction.type) {\n case TransactionType.ADD:\n // if there is no parent this is ADD row at root level\n if (parent && !parent[childDataKey]) {\n parent[childDataKey] = collection = [];\n }\n collection.push(transaction.newValue);\n break;\n case TransactionType.UPDATE:\n const updateIndex = collection.findIndex(x => x[primaryKey] === transaction.id);\n if (updateIndex !== -1) {\n collection[updateIndex] = mergeObjects(cloneStrategy.clone(collection[updateIndex]), transaction.newValue);\n }\n break;\n case TransactionType.DELETE:\n if (deleteRows) {\n const deleteIndex = collection.findIndex(r => r[primaryKey] === transaction.id);\n if (deleteIndex !== -1) {\n collection.splice(deleteIndex, 1);\n }\n }\n break;\n }\n }\n else {\n // if there is no path this is ADD row in root. Push the newValue to data\n data.push(transaction.newValue);\n }\n }\n return data;\n }\n static parseValue(dataType, value) {\n if (dataType === GridColumnDataType.Number || dataType === GridColumnDataType.Currency || dataType === GridColumnDataType.Percent) {\n value = parseFloat(value);\n }\n return value;\n }\n static findParentFromPath(data, primaryKey, childDataKey, path) {\n let collection = data;\n let result;\n for (const id of path) {\n result = collection && collection.find(x => x[primaryKey] === id);\n if (!result) {\n break;\n }\n collection = result[childDataKey];\n }\n return result;\n }\n}\n\n/**\n * @hidden\n */\nclass ExportUtilities {\n static getKeysFromData(data) {\n const length = data.length;\n if (length === 0) {\n return [];\n }\n const dataEntry = data[0];\n const dataEntryMiddle = data[Math.floor(length / 2)];\n const dataEntryLast = data[length - 1];\n const keys1 = Object.keys(dataEntry);\n const keys2 = Object.keys(dataEntryMiddle);\n const keys3 = Object.keys(dataEntryLast);\n const keys = new Set(keys1.concat(keys2).concat(keys3));\n return !ExportUtilities.isSpecialData(dataEntry) ? Array.from(keys) : ['Column 1'];\n }\n static saveBlobToFile(blob, fileName) {\n const a = document.createElement('a');\n const url = window.URL.createObjectURL(blob);\n a.download = fileName;\n a.href = url;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }\n static stringToArrayBuffer(s) {\n const buf = new ArrayBuffer(s.length);\n const view = new Uint8Array(buf);\n for (let i = 0; i !== s.length; ++i) {\n /* eslint-disable no-bitwise */\n view[i] = s.charCodeAt(i) & 0xFF;\n /* eslint-enable no-bitwise */\n }\n return buf;\n }\n static isSpecialData(data) {\n return (typeof data === 'string' ||\n typeof data === 'number' ||\n data instanceof Date);\n }\n static hasValue(value) {\n return value !== undefined && value !== null;\n }\n static isNullOrWhitespaces(value) {\n return value === undefined || value === null || !value.trim();\n }\n static sanitizeValue(value) {\n if (!this.hasValue(value)) {\n return '';\n }\n else {\n const stringValue = String(value);\n return stringValue.replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n }\n }\n}\n\nvar FilteringExpressionsTreeType;\n(function (FilteringExpressionsTreeType) {\n FilteringExpressionsTreeType[FilteringExpressionsTreeType[\"Regular\"] = 0] = \"Regular\";\n FilteringExpressionsTreeType[FilteringExpressionsTreeType[\"Advanced\"] = 1] = \"Advanced\";\n})(FilteringExpressionsTreeType || (FilteringExpressionsTreeType = {}));\nclass FilteringExpressionsTree {\n constructor(operator, fieldName) {\n /**\n * Sets/gets the filtering operands.\n * ```typescript\n * const gridExpressionsTree = new FilteringExpressionsTree(FilteringLogic.And);\n * const expression = [\n * {\n * condition: IgxStringFilteringOperand.instance().condition('contains'),\n * fieldName: 'Column Field',\n * searchVal: 'Value',\n * ignoreCase: false\n * }];\n * gridExpressionsTree.filteringOperands.push(expression);\n * this.grid.filteringExpressionsTree = gridExpressionsTree;\n * ```\n * ```typescript\n * let filteringOperands = gridExpressionsTree.filteringOperands;\n * ```\n *\n * @memberof FilteringExpressionsTree\n */\n this.filteringOperands = [];\n this.operator = operator;\n this.fieldName = fieldName;\n }\n /**\n * Checks if filtering expressions tree is empty.\n *\n * @param expressionTree filtering expressions tree.\n */\n static empty(expressionTree) {\n return !expressionTree || !expressionTree.filteringOperands || !expressionTree.filteringOperands.length;\n }\n /**\n * Returns the filtering expression for a column with the provided fieldName.\n * ```typescript\n * let filteringExpression = gridExpressionTree.find('Column Field');\n * ```\n *\n * @memberof FilteringExpressionsTree\n */\n find(fieldName) {\n const index = this.findIndex(fieldName);\n if (index > -1) {\n return this.filteringOperands[index];\n }\n return null;\n }\n /**\n * Returns the index of the filtering expression for a column with the provided fieldName.\n * ```typescript\n * let filteringExpressionIndex = gridExpressionTree.findIndex('Column Field');\n * ```\n *\n * @memberof FilteringExpressionsTree\n */\n findIndex(fieldName) {\n let expr;\n for (let i = 0; i < this.filteringOperands.length; i++) {\n expr = this.filteringOperands[i];\n if (expr instanceof FilteringExpressionsTree) {\n if (this.isFilteringExpressionsTreeForColumn(expr, fieldName)) {\n return i;\n }\n }\n else {\n if (expr.fieldName === fieldName) {\n return i;\n }\n }\n }\n return -1;\n }\n isFilteringExpressionsTreeForColumn(expressionsTree, fieldName) {\n if (expressionsTree.fieldName === fieldName) {\n return true;\n }\n for (const expr of expressionsTree.filteringOperands) {\n if ((expr instanceof FilteringExpressionsTree)) {\n return this.isFilteringExpressionsTreeForColumn(expr, fieldName);\n }\n else {\n return expr.fieldName === fieldName;\n }\n }\n return false;\n }\n}\n\nvar FilteringLogic;\n(function (FilteringLogic) {\n FilteringLogic[FilteringLogic[\"And\"] = 0] = \"And\";\n FilteringLogic[FilteringLogic[\"Or\"] = 1] = \"Or\";\n})(FilteringLogic || (FilteringLogic = {}));\n\nconst DateType = 'date';\nconst DateTimeType = 'dateTime';\nconst TimeType = 'time';\nclass FilterUtil {\n static filter(data, state, grid) {\n if (!state.strategy) {\n state.strategy = new FilteringStrategy();\n }\n return state.strategy.filter(data, state.expressionsTree, state.advancedExpressionsTree, grid);\n }\n}\nclass BaseFilteringStrategy {\n // protected\n findMatchByExpression(rec, expr, isDate, isTime, grid) {\n const cond = expr.condition;\n const val = this.getFieldValue(rec, expr.fieldName, isDate, isTime, grid);\n return cond.logic(val, expr.searchVal, expr.ignoreCase);\n }\n // protected\n matchRecord(rec, expressions, grid) {\n if (expressions) {\n if (expressions instanceof FilteringExpressionsTree) {\n const expressionsTree = expressions;\n const operator = expressionsTree.operator;\n let matchOperand;\n if (expressionsTree.filteringOperands && expressionsTree.filteringOperands.length) {\n for (const operand of expressionsTree.filteringOperands) {\n matchOperand = this.matchRecord(rec, operand, grid);\n // Return false if at least one operand does not match and the filtering logic is And\n if (!matchOperand && operator === FilteringLogic.And) {\n return false;\n }\n // Return true if at least one operand matches and the filtering logic is Or\n if (matchOperand && operator === FilteringLogic.Or) {\n return true;\n }\n }\n return matchOperand;\n }\n return true;\n }\n else {\n const expression = expressions;\n const column = grid && grid.getColumnByName(expression.fieldName);\n const isDate = column ? column.dataType === DateType || column.dataType === DateTimeType : false;\n const isTime = column ? column.dataType === TimeType : false;\n return this.findMatchByExpression(rec, expression, isDate, isTime, grid);\n }\n }\n return true;\n }\n getFilterItems(column, tree) {\n let data = column.grid.gridAPI.filterDataByExpressions(tree);\n data = column.grid.gridAPI.sortDataByExpressions(data, [{ fieldName: column.field, dir: SortingDirection.Asc, ignoreCase: column.sortingIgnoreCase }]);\n const columnField = column.field;\n let filterItems = data.map(record => {\n let value = resolveNestedPath(record, columnField);\n const applyFormatter = column.formatter && this.shouldFormatFilterValues(column);\n value = applyFormatter ?\n column.formatter(value, record) :\n value;\n return {\n value,\n label: this.getFilterItemLabel(column, value, !applyFormatter, record)\n };\n });\n filterItems = this.getUniqueFilterItems(column, filterItems);\n return Promise.resolve(filterItems);\n }\n getFilterItemLabel(column, value, applyFormatter, data) {\n if (column.formatter) {\n if (applyFormatter) {\n return column.formatter(value, data);\n }\n return value;\n }\n const { display, format, digitsInfo, currencyCode, timezone } = column.pipeArgs;\n const locale = column.grid.locale;\n switch (column.dataType) {\n case GridColumnDataType.Date:\n case GridColumnDataType.DateTime:\n case GridColumnDataType.Time:\n return formatDate(value, format, locale, timezone);\n case GridColumnDataType.Currency:\n return formatCurrency(value, currencyCode || getLocaleCurrencyCode(locale), display, digitsInfo, locale);\n case GridColumnDataType.Number:\n return formatNumber(value, locale, digitsInfo);\n case GridColumnDataType.Percent:\n return formatPercent(value, locale, digitsInfo);\n default:\n return value;\n }\n }\n getUniqueFilterItems(column, filterItems) {\n const filteredUniqueValues = filterItems.reduce((map, item) => {\n let key = item.value;\n if (column.dataType === GridColumnDataType.String && column.filteringIgnoreCase) {\n key = key?.toString().toLowerCase();\n }\n else if (column.dataType === GridColumnDataType.DateTime) {\n key = item.value?.toString();\n item.value = key ? new Date(key) : key;\n }\n else if (column.dataType === GridColumnDataType.Time) {\n const date = key ? new Date(key) : key;\n key = date ? new Date().setHours(date.getHours(), date.getMinutes(), date.getSeconds()) : key;\n item.value = key ? new Date(key) : key;\n }\n else if (column.dataType === GridColumnDataType.Date) {\n const date = key ? new Date(key) : key;\n key = date ? new Date(date.getFullYear(), date.getMonth(), date.getDate()).toISOString() : key;\n item.value = date;\n }\n return map.has(key) ? map : map.set(key, item);\n }, new Map());\n const uniqueValues = Array.from(filteredUniqueValues.values());\n return uniqueValues;\n }\n shouldFormatFilterValues(_column) {\n return false;\n }\n}\nclass NoopFilteringStrategy extends BaseFilteringStrategy {\n getFieldValue(rec, _fieldName) {\n return rec;\n }\n static instance() {\n return this._instance || (this._instance = new NoopFilteringStrategy());\n }\n filter(data, _, __) {\n return data;\n }\n}\nNoopFilteringStrategy._instance = null;\nclass FilteringStrategy extends BaseFilteringStrategy {\n constructor() {\n super();\n }\n static instance() {\n return this._instance || (this._instance = new this());\n }\n filter(data, expressionsTree, advancedExpressionsTree, grid) {\n let i;\n let rec;\n const len = data.length;\n const res = [];\n if ((FilteringExpressionsTree.empty(expressionsTree) && FilteringExpressionsTree.empty(advancedExpressionsTree)) || !len) {\n return data;\n }\n for (i = 0; i < len; i++) {\n rec = data[i];\n if (this.matchRecord(rec, expressionsTree, grid) && this.matchRecord(rec, advancedExpressionsTree, grid)) {\n res.push(rec);\n }\n }\n return res;\n }\n getFieldValue(rec, fieldName, isDate = false, isTime = false, grid) {\n const column = grid?.getColumnByName(fieldName);\n let value = resolveNestedPath(rec, fieldName);\n value = column?.formatter && this.shouldFormatFilterValues(column) ?\n column.formatter(value, rec) :\n value && (isDate || isTime) ? parseDate(value) : value;\n return value;\n }\n}\nFilteringStrategy._instance = null;\nclass FormattedValuesFilteringStrategy extends FilteringStrategy {\n /**\n * Creates a new instance of FormattedValuesFilteringStrategy.\n *\n * @param fields An array of column field names that should be formatted.\n * If omitted the values of all columns which has formatter will be formatted.\n */\n constructor(fields) {\n super();\n this.fields = fields;\n }\n shouldFormatFilterValues(column) {\n return !this.fields || this.fields.length === 0 || this.fields.some(f => f === column.field);\n }\n}\n\nclass TreeGridFilteringStrategy extends BaseFilteringStrategy {\n constructor(hierarchicalFilterFields) {\n super();\n this.hierarchicalFilterFields = hierarchicalFilterFields;\n }\n filter(data, expressionsTree, advancedExpressionsTree, grid) {\n return this.filterImpl(data, expressionsTree, advancedExpressionsTree, undefined, grid);\n }\n getFieldValue(rec, fieldName, isDate = false, isTime = false, grid) {\n const column = grid?.getColumnByName(fieldName);\n const hierarchicalRecord = rec;\n let value = this.isHierarchicalFilterField(fieldName) ?\n this.getHierarchicalFieldValue(hierarchicalRecord, fieldName) :\n resolveNestedPath(hierarchicalRecord.data, fieldName);\n value = column?.formatter && this.shouldFormatFilterValues(column) ?\n column.formatter(value, rec.data) :\n value && (isDate || isTime) ? parseDate(value) : value;\n return value;\n }\n getHierarchicalFieldValue(record, field) {\n const value = resolveNestedPath(record.data, field);\n return record.parent ?\n `${this.getHierarchicalFieldValue(record.parent, field)}${value ? `.[${value}]` : ''}` :\n `[${value}]`;\n }\n filterImpl(data, expressionsTree, advancedExpressionsTree, parent, grid) {\n let i;\n let rec;\n const len = data.length;\n const res = [];\n if ((FilteringExpressionsTree.empty(expressionsTree) && FilteringExpressionsTree.empty(advancedExpressionsTree)) || !len) {\n return data;\n }\n for (i = 0; i < len; i++) {\n rec = DataUtil.cloneTreeGridRecord(data[i]);\n rec.parent = parent;\n if (rec.children) {\n const filteredChildren = this.filterImpl(rec.children, expressionsTree, advancedExpressionsTree, rec, grid);\n rec.children = filteredChildren.length > 0 ? filteredChildren : null;\n }\n if (this.matchRecord(rec, expressionsTree, grid) && this.matchRecord(rec, advancedExpressionsTree, grid)) {\n res.push(rec);\n }\n else if (rec.children && rec.children.length > 0) {\n rec.isFilteredOutParent = true;\n res.push(rec);\n }\n }\n return res;\n }\n isHierarchicalFilterField(field) {\n return this.hierarchicalFilterFields && this.hierarchicalFilterFields.indexOf(field) !== -1;\n }\n getFilterItems(column, tree) {\n if (!this.isHierarchicalFilterField(column.field)) {\n return super.getFilterItems(column, tree);\n }\n let data = column.grid.gridAPI.filterTreeDataByExpressions(tree);\n data = DataUtil.treeGridSort(data, [{ fieldName: column.field, dir: SortingDirection.Asc, ignoreCase: column.sortingIgnoreCase }], column.grid.sortStrategy, null, column.grid);\n const items = this.getHierarchicalFilterItems(data, column);\n return Promise.resolve(items);\n }\n getHierarchicalFilterItems(records, column, parent) {\n return records?.map(record => {\n let value = resolveNestedPath(record.data, column.field);\n const applyFormatter = column.formatter && this.shouldFormatFilterValues(column);\n value = applyFormatter ?\n column.formatter(value, record.data) :\n value;\n const hierarchicalValue = parent ?\n (value || value === 0) ? `${parent.value}.[${value}]` : value :\n `[${value}]`;\n const filterItem = { value: hierarchicalValue };\n filterItem.label = this.getFilterItemLabel(column, value, !applyFormatter, record.data);\n filterItem.children = this.getHierarchicalFilterItems(record.children, column, filterItem);\n return filterItem;\n });\n }\n}\nclass TreeGridFormattedValuesFilteringStrategy extends TreeGridFilteringStrategy {\n /**\n * Creates a new instance of FormattedValuesFilteringStrategy.\n *\n * @param fields An array of column field names that should be formatted.\n * If omitted the values of all columns which has formatter will be formatted.\n */\n constructor(fields) {\n super();\n this.fields = fields;\n }\n shouldFormatFilterValues(column) {\n return !this.fields || this.fields.length === 0 || this.fields.some(f => f === column.field);\n }\n}\nclass TreeGridMatchingRecordsOnlyFilteringStrategy extends TreeGridFilteringStrategy {\n filter(data, expressionsTree, advancedExpressionsTree, grid) {\n return this.filterImplementation(data, expressionsTree, advancedExpressionsTree, undefined, grid);\n }\n filterImplementation(data, expressionsTree, advancedExpressionsTree, parent, grid) {\n let i;\n let rec;\n const len = data.length;\n const res = [];\n if ((FilteringExpressionsTree.empty(expressionsTree) && FilteringExpressionsTree.empty(advancedExpressionsTree)) || !len) {\n return data;\n }\n for (i = 0; i < len; i++) {\n rec = DataUtil.cloneTreeGridRecord(data[i]);\n rec.parent = parent;\n if (rec.children) {\n const filteredChildren = this.filterImplementation(rec.children, expressionsTree, advancedExpressionsTree, rec, grid);\n rec.children = filteredChildren.length > 0 ? filteredChildren : null;\n }\n if (this.matchRecord(rec, expressionsTree, grid) && this.matchRecord(rec, advancedExpressionsTree, grid)) {\n res.push(rec);\n }\n else if (rec.children && rec.children.length > 0) {\n rec = this.setCorrectLevelToFilteredRecords(rec);\n res.push(...rec.children);\n }\n }\n return res;\n }\n setCorrectLevelToFilteredRecords(rec) {\n if (rec.children && rec.children.length > 0) {\n rec.children.map(child => {\n child.level = child.level - 1;\n return this.setCorrectLevelToFilteredRecords(child);\n });\n }\n return rec;\n }\n}\n\nconst FilterMode = mkenum({\n quickFilter: 'quickFilter',\n excelStyleFilter: 'excelStyleFilter'\n});\nconst GridSummaryPosition = mkenum({\n top: 'top',\n bottom: 'bottom'\n});\nconst GridSummaryCalculationMode = mkenum({\n rootLevelOnly: 'rootLevelOnly',\n childLevelsOnly: 'childLevelsOnly',\n rootAndChildLevels: 'rootAndChildLevels'\n});\nconst GridSelectionMode = mkenum({\n none: 'none',\n single: 'single',\n multiple: 'multiple',\n multipleCascade: 'multipleCascade'\n});\nconst ColumnDisplayOrder = mkenum({\n Alphabetical: 'Alphabetical',\n DisplayOrder: 'DisplayOrder'\n});\nvar ColumnPinningPosition;\n(function (ColumnPinningPosition) {\n ColumnPinningPosition[ColumnPinningPosition[\"Start\"] = 0] = \"Start\";\n ColumnPinningPosition[ColumnPinningPosition[\"End\"] = 1] = \"End\";\n})(ColumnPinningPosition || (ColumnPinningPosition = {}));\nvar RowPinningPosition;\n(function (RowPinningPosition) {\n RowPinningPosition[RowPinningPosition[\"Top\"] = 0] = \"Top\";\n RowPinningPosition[RowPinningPosition[\"Bottom\"] = 1] = \"Bottom\";\n})(RowPinningPosition || (RowPinningPosition = {}));\nvar GridPagingMode;\n(function (GridPagingMode) {\n GridPagingMode[GridPagingMode[\"Local\"] = 0] = \"Local\";\n GridPagingMode[GridPagingMode[\"Remote\"] = 1] = \"Remote\";\n})(GridPagingMode || (GridPagingMode = {}));\nvar GridInstanceType;\n(function (GridInstanceType) {\n GridInstanceType[GridInstanceType[\"Grid\"] = 0] = \"Grid\";\n GridInstanceType[GridInstanceType[\"TreeGrid\"] = 1] = \"TreeGrid\";\n})(GridInstanceType || (GridInstanceType = {}));\n\nvar ExportRecordType;\n(function (ExportRecordType) {\n ExportRecordType[\"GroupedRecord\"] = \"GroupedRecord\";\n ExportRecordType[\"TreeGridRecord\"] = \"TreeGridRecord\";\n ExportRecordType[\"DataRecord\"] = \"DataRecord\";\n ExportRecordType[\"HierarchicalGridRecord\"] = \"HierarchicalGridRecord\";\n ExportRecordType[\"HeaderRecord\"] = \"HeaderRecord\";\n ExportRecordType[\"SummaryRecord\"] = \"SummaryRecord\";\n ExportRecordType[\"PivotGridRecord\"] = \"PivotGridRecord\";\n})(ExportRecordType || (ExportRecordType = {}));\nvar HeaderType;\n(function (HeaderType) {\n HeaderType[\"RowHeader\"] = \"RowHeader\";\n HeaderType[\"ColumnHeader\"] = \"ColumnHeader\";\n HeaderType[\"MultiRowHeader\"] = \"MultiRowHeader\";\n HeaderType[\"MultiColumnHeader\"] = \"MultiColumnHeader\";\n})(HeaderType || (HeaderType = {}));\n/**hidden\n * A helper class used to identify whether the user has set a specific columnIndex\n * during columnExporting, so we can honor it at the exported file.\n*/\nclass IgxColumnExportingEventArgs {\n get columnIndex() {\n return this._columnIndex;\n }\n set columnIndex(value) {\n this._columnIndex = value;\n this.userSetIndex = true;\n }\n constructor(original) {\n this.userSetIndex = false;\n this.header = original.header;\n this.field = original.field;\n this.cancel = original.cancel;\n this.skipFormatter = original.skipFormatter;\n this.grid = original.grid;\n this.owner = original.owner;\n this._columnIndex = original.columnIndex;\n }\n}\nconst DEFAULT_OWNER = 'default';\nconst GRID_ROOT_SUMMARY = 'igxGridRootSummary';\nconst GRID_PARENT = 'grid-parent';\nconst GRID_LEVEL_COL = 'GRID_LEVEL_COL';\nconst DEFAULT_COLUMN_WIDTH = 8.43;\nconst GRID_CHILD = 'grid-child-';\nclass IgxBaseExporter {\n constructor() {\n this.exportEnded = new EventEmitter();\n /**\n * This event is emitted when a row is exported.\n * ```typescript\n * this.exporterService.rowExporting.subscribe((args: IRowExportingEventArgs) => {\n * // put event handler code here\n * });\n * ```\n *\n * @memberof IgxBaseExporter\n */\n this.rowExporting = new EventEmitter();\n /**\n * This event is emitted when a column is exported.\n * ```typescript\n * this.exporterService.columnExporting.subscribe((args: IColumnExportingEventArgs) => {\n * // put event handler code here\n * });\n * ```\n *\n * @memberof IgxBaseExporter\n */\n this.columnExporting = new EventEmitter();\n this._sort = null;\n this._ownersMap = new Map();\n this._setChildSummaries = false;\n this.summaries = new Map();\n this.rowIslandCounter = -1;\n this.flatRecords = [];\n this.pivotGridColumns = [];\n this.pivotGridKeyValueMap = new Map();\n }\n /**\n * Method for exporting IgxGrid component's data.\n * ```typescript\n * this.exporterService.export(this.igxGridForExport, this.exportOptions);\n * ```\n *\n * @memberof IgxBaseExporter\n */\n export(grid, options) {\n if (options === undefined || options === null) {\n throw Error('No options provided!');\n }\n this.options = options;\n this.locale = grid.locale;\n let columns = grid.columns;\n if (this.options.ignoreMultiColumnHeaders) {\n columns = columns.filter(col => col.children === undefined);\n }\n const columnList = this.getColumns(columns);\n const tagName = grid.nativeElement.tagName.toLowerCase();\n if (tagName === 'igx-hierarchical-grid') {\n this._ownersMap.set(grid, columnList);\n const childLayoutList = grid.childLayoutList;\n for (const island of childLayoutList) {\n this.mapHierarchicalGridColumns(island, grid.data[0]);\n }\n }\n else if (tagName === 'igx-pivot-grid') {\n this.pivotGridColumns = [];\n this.isPivotGridExport = true;\n this.pivotGridKeyValueMap = new Map();\n this.pivotGridRowDimensionsMap = new Map();\n grid.pivotConfiguration.rows.filter(r => r.enabled).forEach(rowDimension => {\n this.addToRowDimensionsMap(rowDimension, rowDimension.memberName);\n });\n this._ownersMap.set(DEFAULT_OWNER, columnList);\n }\n else {\n this._ownersMap.set(DEFAULT_OWNER, columnList);\n }\n this.summaries = this.prepareSummaries(grid);\n this._setChildSummaries = this.summaries.size > 1 && grid.summaryCalculationMode !== GridSummaryCalculationMode.rootLevelOnly;\n this.addLevelColumns();\n this.prepareData(grid);\n this.addLevelData();\n this.addPivotGridColumns(grid);\n this.exportGridRecordsData(this.flatRecords, grid);\n }\n /**\n * Method for exporting any kind of array data.\n * ```typescript\n * this.exporterService.exportData(this.arrayForExport, this.exportOptions);\n * ```\n *\n * @memberof IgxBaseExporter\n */\n exportData(data, options) {\n if (options === undefined || options === null) {\n throw Error('No options provided!');\n }\n this.options = options;\n const records = data.map(d => {\n const record = {\n data: d,\n type: ExportRecordType.DataRecord,\n level: 0\n };\n return record;\n });\n this.exportGridRecordsData(records);\n }\n addToRowDimensionsMap(rowDimension, rootParentName) {\n this.pivotGridRowDimensionsMap[rowDimension.memberName] = rootParentName;\n if (rowDimension.childLevel) {\n this.addToRowDimensionsMap(rowDimension.childLevel, rootParentName);\n }\n }\n exportGridRecordsData(records, grid) {\n if (this._ownersMap.size === 0) {\n const recordsData = records.filter(r => r.type !== ExportRecordType.SummaryRecord).map(r => r.data);\n const keys = ExportUtilities.getKeysFromData(recordsData);\n const columns = keys.map((k) => ({ header: k, field: k, skip: false, headerType: HeaderType.ColumnHeader, level: 0, columnSpan: 1 }));\n const columnWidths = new Array(keys.length).fill(DEFAULT_COLUMN_WIDTH);\n const mapRecord = {\n columns,\n columnWidths,\n indexOfLastPinnedColumn: -1,\n maxLevel: 0\n };\n this._ownersMap.set(DEFAULT_OWNER, mapRecord);\n }\n let shouldReorderColumns = false;\n for (const [key, mapRecord] of this._ownersMap) {\n let skippedPinnedColumnsCount = 0;\n let columnsWithoutHeaderCount = 1;\n let indexOfLastPinnedColumn = mapRecord.indexOfLastPinnedColumn;\n mapRecord.columns.forEach((column, index) => {\n if (!column.skip) {\n const columnExportArgs = {\n header: !ExportUtilities.isNullOrWhitespaces(column.header) ?\n column.header :\n 'Column' + columnsWithoutHeaderCount++,\n field: column.field,\n columnIndex: index,\n cancel: false,\n skipFormatter: false,\n grid: key === DEFAULT_OWNER ? grid : key\n };\n const newColumnExportArgs = new IgxColumnExportingEventArgs(columnExportArgs);\n this.columnExporting.emit(newColumnExportArgs);\n column.header = newColumnExportArgs.header;\n column.skip = newColumnExportArgs.cancel;\n column.skipFormatter = newColumnExportArgs.skipFormatter;\n if (newColumnExportArgs.userSetIndex) {\n column.exportIndex = newColumnExportArgs.columnIndex;\n shouldReorderColumns = true;\n }\n if (column.skip) {\n if (index <= indexOfLastPinnedColumn) {\n skippedPinnedColumnsCount++;\n }\n this.calculateColumnSpans(column, mapRecord, column.columnSpan);\n const nonSkippedColumns = mapRecord.columns.filter(c => !c.skip);\n if (nonSkippedColumns.length > 0) {\n this._ownersMap.get(key).maxLevel = nonSkippedColumns.sort((a, b) => b.level - a.level)[0].level;\n }\n }\n if (this._sort && this._sort.fieldName === column.field) {\n if (column.skip) {\n this._sort = null;\n }\n else {\n this._sort.fieldName = column.header;\n }\n }\n }\n });\n indexOfLastPinnedColumn -= skippedPinnedColumnsCount;\n // Reorder columns only if a column has been assigned a specific columnIndex during columnExporting event\n if (shouldReorderColumns) {\n mapRecord.columns = this.reorderColumns(mapRecord.columns);\n }\n }\n const dataToExport = new Array();\n const actualData = records[0]?.data;\n const isSpecialData = ExportUtilities.isSpecialData(actualData);\n yieldingLoop(records.length, 100, (i) => {\n const row = records[i];\n this.exportRow(dataToExport, row, i, isSpecialData);\n }, () => {\n this.exportDataImplementation(dataToExport, this.options, () => {\n this.resetDefaults();\n });\n });\n }\n calculateColumnSpans(column, mapRecord, span) {\n if (column.headerType === HeaderType.MultiColumnHeader && column.skip) {\n const columnGroupChildren = mapRecord.columns.filter(c => c.columnGroupParent === column.columnGroup);\n columnGroupChildren.forEach(cgc => {\n if (cgc.headerType === HeaderType.MultiColumnHeader) {\n cgc.columnSpan = 0;\n cgc.columnGroupParent = null;\n cgc.skip = true;\n this.calculateColumnSpans(cgc, mapRecord, cgc.columnSpan);\n }\n else {\n cgc.skip = true;\n }\n });\n }\n const targetCol = mapRecord.columns.filter(c => column.columnGroupParent !== null && c.columnGroup === column.columnGroupParent)[0];\n if (targetCol !== undefined) {\n targetCol.columnSpan -= span;\n if (targetCol.columnGroupParent !== null) {\n this.calculateColumnSpans(targetCol, mapRecord, span);\n }\n if (targetCol.columnSpan === 0) {\n targetCol.skip = true;\n }\n }\n }\n exportRow(data, record, index, isSpecialData) {\n if (!isSpecialData) {\n const owner = record.owner === undefined ? DEFAULT_OWNER : record.owner;\n const ownerCols = this._ownersMap.get(owner).columns;\n if (record.type !== ExportRecordType.HeaderRecord) {\n const columns = ownerCols\n .filter(c => c.headerType === HeaderType.ColumnHeader && !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex);\n record.data = columns.reduce((a, e) => {\n if (!e.skip) {\n let rawValue = resolveNestedPath(record.data, e.field);\n const shouldApplyFormatter = e.formatter && !e.skipFormatter && record.type !== ExportRecordType.GroupedRecord;\n const isOfDateType = e.dataType === 'date' || e.dataType === 'dateTime' || e.dataType === 'time';\n if (isOfDateType &&\n record.type !== ExportRecordType.SummaryRecord &&\n record.type !== ExportRecordType.GroupedRecord &&\n !(rawValue instanceof Date) &&\n !shouldApplyFormatter &&\n rawValue !== undefined &&\n rawValue !== null) {\n rawValue = new Date(rawValue);\n }\n else if (e.dataType === 'string' && rawValue instanceof Date) {\n rawValue = rawValue.toString();\n }\n let formattedValue = shouldApplyFormatter ? e.formatter(rawValue) : rawValue;\n if (this.isPivotGridExport && !isNaN(parseFloat(formattedValue))) {\n formattedValue = parseFloat(formattedValue);\n }\n a[e.field] = formattedValue;\n }\n return a;\n }, {});\n }\n else {\n const filteredHeaders = ownerCols.filter(c => c.skip).map(c => c.header ? c.header : c.field);\n record.data = record.data.filter(d => filteredHeaders.indexOf(d) === -1);\n }\n }\n const rowArgs = {\n rowData: record.data,\n rowIndex: index,\n cancel: false\n };\n this.rowExporting.emit(rowArgs);\n if (!rowArgs.cancel) {\n data.push(record);\n }\n }\n reorderColumns(columns) {\n const filteredColumns = columns.filter(c => !c.skip);\n const length = filteredColumns.length;\n const specificIndicesColumns = filteredColumns.filter((col) => !isNaN(col.exportIndex))\n .sort((a, b) => a.exportIndex - b.exportIndex);\n const indices = specificIndicesColumns.map(col => col.exportIndex);\n specificIndicesColumns.forEach(col => {\n filteredColumns.splice(filteredColumns.indexOf(col), 1);\n });\n const reorderedColumns = new Array(length);\n if (specificIndicesColumns.length > Math.max(...indices)) {\n return specificIndicesColumns.concat(filteredColumns);\n }\n else {\n indices.forEach((i, index) => {\n if (i < 0 || i >= length) {\n filteredColumns.push(specificIndicesColumns[index]);\n }\n else {\n let k = i;\n while (k < length && reorderedColumns[k] !== undefined) {\n ++k;\n }\n reorderedColumns[k] = specificIndicesColumns[index];\n }\n });\n for (let i = 0; i < length; i++) {\n if (reorderedColumns[i] === undefined) {\n reorderedColumns[i] = filteredColumns.splice(0, 1)[0];\n }\n }\n }\n return reorderedColumns;\n }\n prepareData(grid) {\n this.flatRecords = [];\n const tagName = grid.nativeElement.tagName.toLowerCase();\n const hasFiltering = (grid.filteringExpressionsTree && grid.filteringExpressionsTree.filteringOperands.length > 0) ||\n (grid.advancedFilteringExpressionsTree && grid.advancedFilteringExpressionsTree.filteringOperands.length > 0);\n const expressions = grid.groupingExpressions ? grid.groupingExpressions.concat(grid.sortingExpressions || []) : grid.sortingExpressions;\n const hasSorting = expressions && expressions.length > 0;\n let setSummaryOwner = false;\n switch (tagName) {\n case 'igx-pivot-grid': {\n this.preparePivotGridData(grid);\n break;\n }\n case 'igx-hierarchical-grid': {\n this.prepareHierarchicalGridData(grid, hasFiltering, hasSorting);\n setSummaryOwner = true;\n break;\n }\n case 'igx-tree-grid': {\n this.prepareTreeGridData(grid, hasFiltering, hasSorting);\n break;\n }\n default: {\n this.prepareGridData(grid, hasFiltering, hasSorting);\n break;\n }\n }\n if (this.summaries.size > 0 && grid.summaryCalculationMode !== GridSummaryCalculationMode.childLevelsOnly) {\n setSummaryOwner ?\n this.setSummaries(GRID_ROOT_SUMMARY, 0, false, grid) :\n this.setSummaries(GRID_ROOT_SUMMARY);\n }\n }\n preparePivotGridData(grid) {\n for (const record of grid.filteredSortedData) {\n const recordData = Object.fromEntries(record.aggregationValues);\n record.dimensionValues.forEach((value, key) => {\n const actualKey = this.pivotGridRowDimensionsMap[key];\n recordData[actualKey] = value;\n });\n const pivotGridRecord = {\n data: recordData,\n level: record.level,\n type: ExportRecordType.PivotGridRecord\n };\n this.flatRecords.push(pivotGridRecord);\n }\n }\n prepareHierarchicalGridData(grid, hasFiltering, hasSorting) {\n const skipOperations = (!hasFiltering || !this.options.ignoreFiltering) &&\n (!hasSorting || !this.options.ignoreSorting);\n if (skipOperations) {\n const data = grid.filteredSortedData;\n this.addHierarchicalGridData(grid, data);\n }\n else {\n let data = grid.data;\n if (hasFiltering && !this.options.ignoreFiltering) {\n const filteringState = {\n expressionsTree: grid.filteringExpressionsTree,\n advancedExpressionsTree: grid.advancedFilteringExpressionsTree,\n strategy: grid.filterStrategy\n };\n data = FilterUtil.filter(data, filteringState, grid);\n }\n if (hasSorting && !this.options.ignoreSorting) {\n this._sort = cloneValue(grid.sortingExpressions[0]);\n data = DataUtil.sort(data, grid.sortingExpressions, grid.sortStrategy, grid);\n }\n this.addHierarchicalGridData(grid, data);\n }\n }\n addHierarchicalGridData(grid, records) {\n const childLayoutList = grid.childLayoutList;\n const columnFields = this._ownersMap.get(grid).columns.map(col => col.field);\n for (const entry of records) {\n const expansionStateVal = grid.expansionStates.has(entry) ? grid.expansionStates.get(entry) : false;\n const dataWithoutChildren = Object.keys(entry)\n .filter(k => columnFields.includes(k))\n .reduce((obj, key) => {\n obj[key] = entry[key];\n return obj;\n }, {});\n const hierarchicalGridRecord = {\n data: dataWithoutChildren,\n level: 0,\n type: ExportRecordType.HierarchicalGridRecord,\n owner: grid,\n hierarchicalOwner: GRID_PARENT\n };\n this.flatRecords.push(hierarchicalGridRecord);\n for (const island of childLayoutList) {\n const path = {\n rowID: island.primaryKey ? entry[island.primaryKey] : entry,\n rowIslandKey: island.key\n };\n const islandGrid = grid?.gridAPI.getChildGrid([path]);\n const keyRecordData = this.prepareIslandData(island, islandGrid, entry[island.key]) || [];\n this.getAllChildColumnsAndData(island, keyRecordData, expansionStateVal, islandGrid);\n }\n }\n }\n prepareSummaries(grid) {\n let summaries = new Map();\n if (this.options.exportSummaries && grid.summaryService.summaryCacheMap.size > 0) {\n const summaryCacheMap = grid.summaryService.summaryCacheMap;\n switch (grid.summaryCalculationMode) {\n case GridSummaryCalculationMode.childLevelsOnly:\n summaryCacheMap.delete(GRID_ROOT_SUMMARY);\n break;\n case GridSummaryCalculationMode.rootLevelOnly:\n for (let k of summaryCacheMap.keys()) {\n if (k !== GRID_ROOT_SUMMARY) {\n summaryCacheMap.delete(k);\n }\n }\n break;\n }\n summaries = summaryCacheMap;\n }\n return summaries;\n }\n prepareIslandData(island, islandGrid, data) {\n if (islandGrid !== undefined) {\n const hasFiltering = (islandGrid.filteringExpressionsTree &&\n islandGrid.filteringExpressionsTree.filteringOperands.length > 0) ||\n (islandGrid.advancedFilteringExpressionsTree &&\n islandGrid.advancedFilteringExpressionsTree.filteringOperands.length > 0);\n const hasSorting = islandGrid.sortingExpressions &&\n islandGrid.sortingExpressions.length > 0;\n const skipOperations = (!hasFiltering || !this.options.ignoreFiltering) &&\n (!hasSorting || !this.options.ignoreSorting);\n if (skipOperations) {\n data = islandGrid.filteredSortedData;\n }\n else {\n if (hasFiltering && !this.options.ignoreFiltering) {\n const filteringState = {\n expressionsTree: islandGrid.filteringExpressionsTree,\n advancedExpressionsTree: islandGrid.advancedFilteringExpressionsTree,\n strategy: islandGrid.filterStrategy\n };\n data = FilterUtil.filter(data, filteringState, islandGrid);\n }\n if (hasSorting && !this.options.ignoreSorting) {\n this._sort = cloneValue(islandGrid.sortingExpressions[0]);\n data = DataUtil.sort(data, islandGrid.sortingExpressions, islandGrid.sortStrategy, islandGrid);\n }\n }\n }\n else {\n const hasFiltering = (island.filteringExpressionsTree &&\n island.filteringExpressionsTree.filteringOperands.length > 0) ||\n (island.advancedFilteringExpressionsTree &&\n island.advancedFilteringExpressionsTree.filteringOperands.length > 0);\n const hasSorting = island.sortingExpressions &&\n island.sortingExpressions.length > 0;\n const skipOperations = (!hasFiltering || this.options.ignoreFiltering) &&\n (!hasSorting || this.options.ignoreSorting);\n if (!skipOperations) {\n if (hasFiltering && !this.options.ignoreFiltering) {\n const filteringState = {\n expressionsTree: island.filteringExpressionsTree,\n advancedExpressionsTree: island.advancedFilteringExpressionsTree,\n strategy: island.filterStrategy\n };\n data = FilterUtil.filter(data, filteringState, island);\n }\n if (hasSorting && !this.options.ignoreSorting) {\n this._sort = cloneValue(island.sortingExpressions[0]);\n data = DataUtil.sort(data, island.sortingExpressions, island.sortStrategy, island);\n }\n }\n }\n return data;\n }\n getAllChildColumnsAndData(island, childData, expansionStateVal, grid) {\n const hierarchicalOwner = `${GRID_CHILD}${++this.rowIslandCounter}`;\n const columnList = this._ownersMap.get(island).columns;\n const columnHeader = columnList\n .filter(col => col.headerType === HeaderType.ColumnHeader)\n .map(col => col.header ? col.header : col.field);\n const headerRecord = {\n data: columnHeader,\n level: island.level,\n type: ExportRecordType.HeaderRecord,\n owner: island,\n hidden: !expansionStateVal,\n hierarchicalOwner\n };\n if (childData && childData.length > 0) {\n this.flatRecords.push(headerRecord);\n for (const rec of childData) {\n const exportRecord = {\n data: rec,\n level: island.level,\n type: ExportRecordType.HierarchicalGridRecord,\n owner: island,\n hidden: !expansionStateVal,\n hierarchicalOwner\n };\n exportRecord.summaryKey = island.key;\n this.flatRecords.push(exportRecord);\n if (island.children.length > 0) {\n const islandExpansionStateVal = grid === undefined ?\n false :\n grid.expansionStates.has(rec) ?\n grid.expansionStates.get(rec) :\n false;\n for (const childIsland of island.children) {\n const path = {\n rowID: childIsland.primaryKey ? rec[childIsland.primaryKey] : rec,\n rowIslandKey: childIsland.key\n };\n // only defined when row is expanded in UI\n const childIslandGrid = grid?.gridAPI.getChildGrid([path]);\n const keyRecordData = this.prepareIslandData(island, childIslandGrid, rec[childIsland.key]) || [];\n this.getAllChildColumnsAndData(childIsland, keyRecordData, islandExpansionStateVal, childIslandGrid);\n }\n }\n }\n if (grid) {\n const summaries = this.prepareSummaries(grid);\n for (const k of summaries.keys()) {\n const summary = summaries.get(k);\n this.setSummaries(island.key, island.level, !expansionStateVal, island, summary, hierarchicalOwner);\n }\n }\n }\n }\n prepareGridData(grid, hasFiltering, hasSorting) {\n const groupedGridGroupingState = {\n expressions: grid.groupingExpressions,\n expansion: grid.groupingExpansionState,\n defaultExpanded: grid.groupsExpanded,\n };\n const hasGrouping = grid.groupingExpressions &&\n grid.groupingExpressions.length > 0;\n const skipOperations = (!hasFiltering || !this.options.ignoreFiltering) &&\n (!hasSorting || !this.options.ignoreSorting) &&\n (!hasGrouping || !this.options.ignoreGrouping);\n if (skipOperations) {\n if (hasGrouping) {\n this.addGroupedData(grid, grid.groupsRecords, groupedGridGroupingState, true);\n }\n else {\n this.addFlatData(grid.filteredSortedData);\n }\n }\n else {\n let gridData = grid.data;\n if (hasFiltering && !this.options.ignoreFiltering) {\n const filteringState = {\n expressionsTree: grid.filteringExpressionsTree,\n advancedExpressionsTree: grid.advancedFilteringExpressionsTree,\n strategy: grid.filterStrategy\n };\n gridData = FilterUtil.filter(gridData, filteringState, grid);\n }\n if (hasSorting && !this.options.ignoreSorting) {\n // TODO: We should drop support for this since in a grouped grid it doesn't make sense\n // this._sort = !isGroupedGrid ?\n // cloneValue(grid.sortingExpressions[0]) :\n // grid.sortingExpressions.length > 1 ?\n // cloneValue(grid.sortingExpressions[1]) :\n // cloneValue(grid.sortingExpressions[0]);\n const expressions = grid.groupingExpressions ? grid.groupingExpressions.concat(grid.sortingExpressions || []) : grid.sortingExpressions;\n gridData = DataUtil.sort(gridData, expressions, grid.sortStrategy, grid);\n }\n if (hasGrouping && !this.options.ignoreGrouping) {\n const groupsRecords = [];\n DataUtil.group(cloneArray(gridData), groupedGridGroupingState, grid.groupStrategy, grid, groupsRecords);\n gridData = groupsRecords;\n }\n if (hasGrouping && !this.options.ignoreGrouping) {\n this.addGroupedData(grid, gridData, groupedGridGroupingState, true);\n }\n else {\n this.addFlatData(gridData);\n }\n }\n }\n prepareTreeGridData(grid, hasFiltering, hasSorting) {\n const skipOperations = (!hasFiltering || !this.options.ignoreFiltering) &&\n (!hasSorting || !this.options.ignoreSorting);\n if (skipOperations) {\n this.addTreeGridData(grid.processedRootRecords);\n }\n else {\n let gridData = grid.rootRecords;\n if (hasFiltering && !this.options.ignoreFiltering) {\n const filteringState = {\n expressionsTree: grid.filteringExpressionsTree,\n advancedExpressionsTree: grid.advancedFilteringExpressionsTree,\n strategy: (grid.filterStrategy) ? grid.filterStrategy : new TreeGridFilteringStrategy()\n };\n gridData = filteringState.strategy\n .filter(gridData, filteringState.expressionsTree, filteringState.advancedExpressionsTree);\n }\n if (hasSorting && !this.options.ignoreSorting) {\n this._sort = cloneValue(grid.sortingExpressions[0]);\n gridData = DataUtil.treeGridSort(gridData, grid.sortingExpressions, grid.sortStrategy);\n }\n this.addTreeGridData(gridData);\n }\n }\n addTreeGridData(records, parentExpanded = true, hierarchicalOwner) {\n if (!records) {\n return;\n }\n for (const record of records) {\n const treeGridRecord = {\n data: record.data,\n level: record.level,\n hidden: !parentExpanded,\n type: ExportRecordType.TreeGridRecord,\n summaryKey: record.key,\n hierarchicalOwner: record.level === 0 ? GRID_PARENT : hierarchicalOwner\n };\n this.flatRecords.push(treeGridRecord);\n if (record.children) {\n this.getTreeGridChildData(record.children, record.key, record.level, record.expanded && parentExpanded);\n }\n }\n }\n getTreeGridChildData(recordChildren, key, level, parentExpanded = true) {\n const hierarchicalOwner = `${GRID_CHILD}${++this.rowIslandCounter}`;\n let summaryLevel = level;\n let summaryHidden = !parentExpanded;\n for (const rc of recordChildren) {\n if (rc.children && rc.children.length > 0) {\n this.addTreeGridData([rc], parentExpanded, hierarchicalOwner);\n summaryLevel = rc.level;\n }\n else {\n const currentRecord = {\n data: rc.data,\n level: rc.level,\n hidden: !parentExpanded,\n type: ExportRecordType.DataRecord,\n hierarchicalOwner\n };\n if (this._setChildSummaries) {\n currentRecord.summaryKey = key;\n }\n this.flatRecords.push(currentRecord);\n summaryLevel = rc.level;\n summaryHidden = !parentExpanded;\n }\n }\n if (this._setChildSummaries) {\n this.setSummaries(key, summaryLevel, summaryHidden, null, null, hierarchicalOwner);\n }\n }\n addFlatData(records) {\n if (!records) {\n return;\n }\n for (const record of records) {\n const data = {\n data: record,\n type: ExportRecordType.DataRecord,\n level: 0\n };\n this.flatRecords.push(data);\n }\n }\n setSummaries(summaryKey, level = 0, hidden = false, owner, summary, hierarchicalOwner) {\n const rootSummary = summary ?? this.summaries.get(summaryKey);\n if (rootSummary) {\n const values = [...rootSummary.values()];\n const biggest = values.sort((a, b) => b.length - a.length)[0];\n for (let i = 0; i < biggest.length; i++) {\n const obj = {};\n for (const [key, value] of rootSummary) {\n const summaries = value.map(s => ({ label: s.label, value: s.summaryResult }));\n obj[key] = summaries[i];\n }\n const summaryRecord = {\n data: obj,\n type: ExportRecordType.SummaryRecord,\n level,\n hidden,\n summaryKey,\n hierarchicalOwner\n };\n if (owner) {\n summaryRecord.owner = owner;\n }\n this.flatRecords.push(summaryRecord);\n }\n }\n }\n addGroupedData(grid, records, groupingState, setGridParent, parentExpanded = true, summaryKeysArr = []) {\n if (!records) {\n return;\n }\n let previousKey = '';\n const firstCol = this._ownersMap.get(DEFAULT_OWNER).columns\n .filter(c => c.headerType === HeaderType.ColumnHeader && !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex)[0].field;\n for (const record of records) {\n let recordVal = record.value;\n const hierarchicalOwner = setGridParent ? GRID_PARENT : `${GRID_CHILD}${++this.rowIslandCounter}`;\n const hierarchy = getHierarchy(record);\n const expandState = groupingState.expansion.find((s) => isHierarchyMatch(s.hierarchy || [{ fieldName: record.expression.fieldName, value: recordVal }], hierarchy, grid.groupingExpressions));\n const expanded = expandState ? expandState.expanded : groupingState.defaultExpanded;\n const isDate = recordVal instanceof Date;\n if (isDate) {\n const timeZoneOffset = recordVal.getTimezoneOffset() * 60000;\n const isoString = (new Date(recordVal - timeZoneOffset)).toISOString();\n const pipe = new DatePipe(grid.locale);\n recordVal = pipe.transform(isoString);\n }\n const groupExpressionName = record.column && record.column.header ?\n record.column.header :\n record.expression.fieldName;\n recordVal = recordVal !== null ? recordVal : '';\n const groupExpression = {\n data: { [firstCol]: `${groupExpressionName}: ${recordVal ?? '(Blank)'} (${record.records.length})` },\n level: record.level,\n hidden: !parentExpanded,\n type: ExportRecordType.GroupedRecord,\n hierarchicalOwner\n };\n this.flatRecords.push(groupExpression);\n let currKey = '';\n let summaryKey = '';\n if (this._setChildSummaries) {\n currKey = `'${groupExpressionName}': '${recordVal}'`;\n summaryKeysArr = summaryKeysArr.filter(a => a !== previousKey);\n previousKey = currKey;\n summaryKeysArr.push(currKey);\n summaryKey = `{ ${summaryKeysArr.join(', ')} }`;\n groupExpression.summaryKey = summaryKey;\n }\n if (record.groups.length > 0) {\n this.addGroupedData(grid, record.groups, groupingState, false, expanded && parentExpanded, summaryKeysArr);\n }\n else {\n const rowRecords = record.records;\n for (const rowRecord of rowRecords) {\n const currentRecord = {\n data: rowRecord,\n level: record.level + 1,\n hidden: !(expanded && parentExpanded),\n type: ExportRecordType.DataRecord,\n hierarchicalOwner\n };\n if (summaryKey) {\n currentRecord.summaryKey = summaryKey;\n }\n this.flatRecords.push(currentRecord);\n }\n }\n if (this._setChildSummaries) {\n this.setSummaries(summaryKey, record.level + 1, !(expanded && parentExpanded), null, null, hierarchicalOwner);\n summaryKeysArr.pop();\n }\n }\n }\n getColumns(columns) {\n const colList = [];\n const colWidthList = [];\n const hiddenColumns = [];\n let indexOfLastPinnedColumn = -1;\n let lastVisibleColumnIndex = -1;\n let maxLevel = 0;\n columns.forEach((column) => {\n const columnHeader = !ExportUtilities.isNullOrWhitespaces(column.header) ? column.header : column.field;\n const exportColumn = !column.hidden || this.options.ignoreColumnsVisibility;\n const index = this.options.ignoreColumnsOrder || this.options.ignoreColumnsVisibility ? column.index : column.visibleIndex;\n const columnWidth = Number(column.width?.slice(0, -2)) || DEFAULT_COLUMN_WIDTH;\n const columnLevel = !this.options.ignoreMultiColumnHeaders ? column.level : 0;\n const isMultiColHeader = column.columnGroup;\n const colSpan = isMultiColHeader ?\n column.allChildren\n .filter(ch => !(ch.columnGroup) && (!this.options.ignoreColumnsVisibility ? !ch.hidden : true))\n .length :\n 1;\n const columnInfo = {\n header: ExportUtilities.sanitizeValue(columnHeader),\n dataType: column.dataType,\n field: column.field,\n skip: !exportColumn,\n formatter: column.formatter,\n skipFormatter: false,\n headerType: isMultiColHeader ? HeaderType.MultiColumnHeader : HeaderType.ColumnHeader,\n columnSpan: colSpan,\n level: columnLevel,\n startIndex: index,\n pinnedIndex: !column.pinned ?\n Number.MAX_VALUE :\n !column.hidden ?\n column.grid.pinnedColumns.indexOf(column)\n : NaN,\n columnGroupParent: column.parent ? column.parent : null,\n columnGroup: isMultiColHeader ? column : null\n };\n if (column.dataType === 'currency') {\n columnInfo.currencyCode = column.pipeArgs.currencyCode\n ? column.pipeArgs.currencyCode\n : getLocaleCurrencyCode(this.locale);\n columnInfo.displayFormat = column.pipeArgs.display\n ? column.pipeArgs.display\n : 'symbol';\n columnInfo.digitsInfo = column.pipeArgs.digitsInfo\n ? column.pipeArgs.digitsInfo\n : '1.0-2';\n }\n if (column.dataType === 'date') {\n columnInfo.dateFormat = getLocaleDateFormat(this.locale, FormatWidth.Medium);\n }\n if (column.dataType === 'dateTime') {\n columnInfo.dateFormat = getLocaleDateTimeFormat(this.locale, FormatWidth.Medium);\n }\n if (this.options.ignoreColumnsOrder) {\n if (columnInfo.startIndex !== columnInfo.pinnedIndex) {\n columnInfo.pinnedIndex = Number.MAX_VALUE;\n }\n }\n if (column.level > maxLevel && !this.options.ignoreMultiColumnHeaders) {\n maxLevel = column.level;\n }\n if (index !== -1) {\n colList.push(columnInfo);\n colWidthList.push(columnWidth);\n lastVisibleColumnIndex = Math.max(lastVisibleColumnIndex, colList.indexOf(columnInfo));\n }\n else {\n hiddenColumns.push(columnInfo);\n }\n if (column.pinned && exportColumn && columnInfo.headerType === HeaderType.ColumnHeader) {\n indexOfLastPinnedColumn++;\n }\n });\n //Append the hidden columns to the end of the list\n hiddenColumns.forEach((hiddenColumn) => {\n colList[++lastVisibleColumnIndex] = hiddenColumn;\n });\n const result = {\n columns: colList,\n columnWidths: colWidthList,\n indexOfLastPinnedColumn,\n maxLevel\n };\n return result;\n }\n mapHierarchicalGridColumns(island, gridData) {\n let columnList;\n let keyData;\n if (island.autoGenerate) {\n keyData = gridData[island.key];\n const islandKeys = island.children.map(i => i.key);\n const islandData = keyData.map(i => {\n const newItem = {};\n Object.keys(i).map(k => {\n if (!islandKeys.includes(k)) {\n newItem[k] = i[k];\n }\n });\n return newItem;\n });\n columnList = this.getAutoGeneratedColumns(islandData);\n }\n else {\n const islandColumnList = island.columns;\n columnList = this.getColumns(islandColumnList);\n }\n this._ownersMap.set(island, columnList);\n if (island.children.length > 0) {\n for (const childIsland of island.children) {\n const islandKeyData = keyData !== undefined ? keyData[0] : {};\n this.mapHierarchicalGridColumns(childIsland, islandKeyData);\n }\n }\n }\n getAutoGeneratedColumns(data) {\n const colList = [];\n const colWidthList = [];\n const keys = Object.keys(data[0]);\n keys.forEach((colKey, i) => {\n const columnInfo = {\n header: colKey,\n field: colKey,\n dataType: 'string',\n skip: false,\n headerType: HeaderType.ColumnHeader,\n columnSpan: 1,\n level: 0,\n startIndex: i,\n pinnedIndex: Number.MAX_VALUE\n };\n colList.push(columnInfo);\n colWidthList.push(DEFAULT_COLUMN_WIDTH);\n });\n const result = {\n columns: colList,\n columnWidths: colWidthList,\n indexOfLastPinnedColumn: -1,\n maxLevel: 0,\n };\n return result;\n }\n addPivotGridColumns(grid) {\n if (grid.nativeElement.tagName.toLowerCase() !== 'igx-pivot-grid') {\n return;\n }\n const enabledRows = grid.pivotConfiguration.rows.filter(r => r.enabled).map((r, i) => ({ name: r.memberName, level: i }));\n this.preparePivotGridColumns(enabledRows);\n this.pivotGridFilterFieldsCount = enabledRows.length;\n const columnList = this._ownersMap.get(DEFAULT_OWNER);\n columnList.columns.unshift(...this.pivotGridColumns);\n columnList.columnWidths.unshift(...Array(this.pivotGridColumns.length).fill(200));\n columnList.indexOfLastPinnedColumn = enabledRows.length - 1;\n columnList.maxRowLevel = enabledRows.length;\n this._ownersMap.set(DEFAULT_OWNER, columnList);\n }\n preparePivotGridColumns(keys, columnGroupParent) {\n if (keys.length === 0) {\n return;\n }\n let startIndex = 0;\n const key = keys[0];\n const records = this.flatRecords.map(r => r.data);\n const groupedRecords = records.reduce((hash, obj) => ({ ...hash, [obj[key.name]]: (hash[obj[key.name]] || []).concat(obj) }), {});\n if (columnGroupParent) {\n const mapKeys = [...this.pivotGridKeyValueMap.keys()];\n const mapValues = [...this.pivotGridKeyValueMap.values()];\n for (const k of Object.keys(groupedRecords)) {\n groupedRecords[k] = groupedRecords[k].filter(row => mapKeys.every(mk => Object.keys(row).includes(mk))\n && mapValues.every(mv => Object.values(row).includes(mv)));\n if (groupedRecords[k].length === 0) {\n delete groupedRecords[k];\n }\n }\n }\n for (const k of Object.keys(groupedRecords)) {\n const rowSpan = groupedRecords[k].length;\n const rowDimensionColumn = {\n rowSpan,\n field: k,\n header: k,\n startIndex,\n skip: false,\n pinnedIndex: 0,\n level: key.level,\n dataType: 'string',\n headerType: groupedRecords[k].length > 1 ? HeaderType.MultiRowHeader : HeaderType.RowHeader,\n };\n if (columnGroupParent) {\n rowDimensionColumn.columnGroupParent = columnGroupParent;\n }\n else {\n rowDimensionColumn.columnGroup = k;\n }\n this.pivotGridColumns.push(rowDimensionColumn);\n if (keys.length > 1) {\n this.pivotGridKeyValueMap.set(key.name, k);\n const newKeys = keys.filter(kdd => kdd !== key);\n this.preparePivotGridColumns(newKeys, k);\n this.pivotGridKeyValueMap.delete(key.name);\n }\n startIndex += rowSpan;\n }\n }\n addLevelColumns() {\n if (this.options.exportSummaries && this.summaries.size > 0) {\n this._ownersMap.forEach(om => {\n const levelCol = {\n header: GRID_LEVEL_COL,\n dataType: 'number',\n field: GRID_LEVEL_COL,\n skip: false,\n skipFormatter: false,\n headerType: HeaderType.ColumnHeader,\n columnSpan: 1,\n level: 0,\n };\n om.columns.push(levelCol);\n om.columnWidths.push(20);\n });\n }\n }\n addLevelData() {\n if (this.options.exportSummaries && this.summaries.size > 0) {\n for (const r of this.flatRecords) {\n if (r.type === ExportRecordType.DataRecord || r.type === ExportRecordType.TreeGridRecord || r.type === ExportRecordType.HierarchicalGridRecord) {\n r.data[GRID_LEVEL_COL] = r.level;\n }\n }\n }\n }\n resetDefaults() {\n this._sort = null;\n this.flatRecords = [];\n this.options = {};\n this._ownersMap.clear();\n this.rowIslandCounter = 0;\n }\n}\n\n/**\n * @hidden\n */\nclass CharSeparatedValueData {\n constructor(_data, valueDelimiter, columns = []) {\n this._data = _data;\n this.columns = columns;\n this._headerRecord = '';\n this._dataRecords = '';\n this._eor = '\\r\\n';\n this._escapeCharacters = ['\\r', '\\n', '\\r\\n'];\n this._delimiterLength = 1;\n this._isSpecialData = false;\n this.setDelimiter(valueDelimiter);\n }\n prepareData(key) {\n if (!this._data || this._data.length === 0) {\n return '';\n }\n let keys = [];\n if (key) {\n keys = key;\n }\n else {\n keys = ExportUtilities.getKeysFromData(this._data);\n }\n if (keys.length === 0) {\n return '';\n }\n this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);\n this._escapeCharacters.push(this._delimiter);\n this._headerRecord = this.processHeaderRecord(keys);\n this._dataRecords = this.processDataRecords(this._data, keys);\n return this._headerRecord + this._dataRecords;\n }\n prepareDataAsync(done) {\n if (!this._data || this._data.length === 0) {\n done('');\n }\n const columns = this.columns?.filter(c => !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex);\n const keys = columns && columns.length ? columns.map(c => c.field) : ExportUtilities.getKeysFromData(this._data);\n if (keys.length === 0) {\n done('');\n }\n this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);\n this._escapeCharacters.push(this._delimiter);\n const headers = columns && columns.length ?\n columns.map(c => c.header ?? c.field) :\n keys;\n this._headerRecord = this.processHeaderRecord(headers);\n this.processDataRecordsAsync(this._data, keys, (dr) => {\n done(this._headerRecord + dr);\n });\n }\n processField(value, escapeChars) {\n let safeValue = ExportUtilities.hasValue(value) ? String(value) : '';\n if (escapeChars.some((v) => safeValue.includes(v))) {\n safeValue = `\"${safeValue}\"`;\n }\n return safeValue + this._delimiter;\n }\n processHeaderRecord(keys) {\n let recordData = '';\n for (const keyName of keys) {\n recordData += this.processField(keyName, this._escapeCharacters);\n }\n return recordData.slice(0, -this._delimiterLength) + this._eor;\n }\n processRecord(record, keys) {\n const recordData = new Array(keys.length);\n for (let index = 0; index < keys.length; index++) {\n const value = (record[keys[index]] !== undefined) ? record[keys[index]] : this._isSpecialData ? record : '';\n recordData[index] = this.processField(value, this._escapeCharacters);\n }\n return recordData.join('').slice(0, -this._delimiterLength) + this._eor;\n }\n processDataRecords(currentData, keys) {\n const dataRecords = new Array(currentData.length);\n for (let i = 0; i < currentData.length; i++) {\n const row = currentData[i];\n dataRecords[i] = this.processRecord(row, keys);\n }\n return dataRecords.join('');\n }\n processDataRecordsAsync(currentData, keys, done) {\n const dataRecords = new Array(currentData.length);\n yieldingLoop(currentData.length, 1000, (i) => {\n const row = currentData[i];\n dataRecords[i] = this.processRecord(row, keys);\n }, () => {\n done(dataRecords.join(''));\n });\n }\n setDelimiter(value) {\n this._delimiter = value;\n this._delimiterLength = value.length;\n }\n}\n\nclass IgxExporterOptionsBase {\n constructor(fileName, _fileExtension) {\n this._fileExtension = _fileExtension;\n /**\n * Specifies whether hidden columns should be exported.\n * ```typescript\n * let ignoreColumnsVisibility = this.exportOptions.ignoreColumnsVisibility;\n * this.exportOptions.ignoreColumnsVisibility = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.ignoreColumnsVisibility = false;\n /**\n * Specifies whether filtered out rows should be exported.\n * ```typescript\n * let ignoreFiltering = this.exportOptions.ignoreFiltering;\n * this.exportOptions.ignoreFiltering = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.ignoreFiltering = false;\n /**\n * Specifies if the exporter should ignore the current column order in the IgxGrid.\n * ```typescript\n * let ignoreColumnsOrder = this.exportOptions.ignoreColumnsOrder;\n * this.exportOptions.ignoreColumnsOrder = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.ignoreColumnsOrder = false;\n /**\n * Specifies whether the exported data should be sorted as in the provided IgxGrid.\n * When you export grouped data, setting ignoreSorting to true will cause\n * the grouping to fail because it relies on the sorting of the records.\n * ```typescript\n * let ignoreSorting = this.exportOptions.ignoreSorting;\n * this.exportOptions.ignoreSorting = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.ignoreSorting = false;\n /**\n * Specifies whether the exported data should be grouped as in the provided IgxGrid.\n * ```typescript\n * let ignoreGrouping = this.exportOptions.ignoreGrouping;\n * this.exportOptions.ignoreGrouping = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.ignoreGrouping = false;\n /**\n * Specifies whether the exported data should include multi column headers as in the provided IgxGrid.\n * ```typescript\n * let ignoreMultiColumnHeaders = this.exportOptions.ignoreMultiColumnHeaders;\n * this.exportOptions.ignoreMultiColumnHeaders = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.ignoreMultiColumnHeaders = false;\n /**\n * Specifies whether the exported data should include column summaries.\n * ```typescript\n * let exportSummaries = this.exportOptions.exportSummaries;\n * this.exportOptions.exportSummaries = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.exportSummaries = true;\n /**\n * Specifies whether the exported data should have frozen headers.\n * ```typescript\n * let freezeHeaders = this.exportOptions.freezeHeaders;\n * this.exportOptions.freezeHeaders = true;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.freezeHeaders = false;\n /**\n * Specifies whether the headers should be exported if there is no data.\n * ```typescript\n * let alwaysExportHeaders = this.exportOptions.alwaysExportHeaders;\n * this.exportOptions.alwaysExportHeaders = false;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n this.alwaysExportHeaders = true;\n this.setFileName(fileName);\n }\n setFileName(fileName) {\n this._fileName = fileName + (fileName.endsWith(this._fileExtension) === false ? this._fileExtension : '');\n }\n /**\n * Gets the file name which will be used for the exporting operation.\n * ```typescript\n * let fileName = this.exportOptions.fileName;\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n get fileName() {\n return this._fileName;\n }\n /**\n * Sets the file name which will be used for the exporting operation.\n * ```typescript\n * this.exportOptions.fileName = 'exportedData01';\n * ```\n *\n * @memberof IgxExporterOptionsBase\n */\n set fileName(value) {\n this.setFileName(value);\n }\n}\n\n/**\n * Objects of this class are used to configure the CSV exporting process.\n */\nclass IgxCsvExporterOptions extends IgxExporterOptionsBase {\n constructor(fileName, fileType) {\n super(fileName, IgxCsvExporterOptions.getExtensionFromFileType(fileType));\n this.setFileType(fileType);\n this.setDelimiter();\n }\n static getExtensionFromFileType(fType) {\n let extension = '';\n switch (fType) {\n case CsvFileTypes.CSV:\n extension = '.csv';\n break;\n case CsvFileTypes.TSV:\n extension = '.tsv';\n break;\n case CsvFileTypes.TAB:\n extension = '.tab';\n break;\n default:\n throw Error('Unsupported CSV file type!');\n }\n return extension;\n }\n /**\n * Gets the value delimiter which will be used for the exporting operation.\n * ```typescript\n * let delimiter = this.exportOptions.valueDelimiter;\n * ```\n *\n * @memberof IgxCsvExporterOptions\n */\n get valueDelimiter() {\n return this._valueDelimiter;\n }\n /**\n * Sets a value delimiter which will overwrite the default delimiter of the selected export format.\n * ```typescript\n * this.exportOptions.valueDelimiter = '|';\n * ```\n *\n * @memberof IgxCsvExporterOptions\n */\n set valueDelimiter(value) {\n this.setDelimiter(value);\n }\n /**\n * Gets the CSV export format.\n * ```typescript\n * let filetype = this.exportOptions.fileType;\n * ```\n *\n * @memberof IgxCsvExporterOptions\n */\n get fileType() {\n return this._fileType;\n }\n /**\n * Sets the CSV export format.\n * ```typescript\n * this.exportOptions.fileType = CsvFileTypes.TAB;\n * ```\n *\n * @memberof IgxCsvExporterOptions\n */\n set fileType(value) {\n this.setFileType(value);\n }\n setFileType(value) {\n if (value !== undefined && value !== null && value !== this._fileType) {\n this._fileType = value;\n const extension = IgxCsvExporterOptions.getExtensionFromFileType(value);\n if (!this.fileName.endsWith(extension)) {\n const oldExt = '.' + this.fileName.split('.').pop();\n const newName = this.fileName.replace(oldExt, extension);\n this._fileExtension = extension;\n this.fileName = newName;\n }\n }\n }\n setDelimiter(value) {\n if (value !== undefined && value !== '' && value !== null) {\n this._valueDelimiter = value;\n }\n else {\n switch (this.fileType) {\n case CsvFileTypes.CSV:\n this._valueDelimiter = ',';\n break;\n case CsvFileTypes.TSV:\n case CsvFileTypes.TAB:\n this._valueDelimiter = '\\t';\n break;\n }\n }\n }\n}\n/**\n * This enumeration is used to configure the default value separator\n * as well as the default file extension used when performing CSV exporting.\n */\nvar CsvFileTypes;\n(function (CsvFileTypes) {\n /**\n * Character Separated Values, default separator is \"comma\", default file extension is .csv\n */\n CsvFileTypes[CsvFileTypes[\"CSV\"] = 0] = \"CSV\";\n /**\n * Tab Separated Values, default separator is tab, default file extension is .tsv\n */\n CsvFileTypes[CsvFileTypes[\"TSV\"] = 1] = \"TSV\";\n /**\n * Tab Separated Values, default separator is tab, default file extension is .tab\n */\n CsvFileTypes[CsvFileTypes[\"TAB\"] = 2] = \"TAB\";\n})(CsvFileTypes || (CsvFileTypes = {}));\n\n/**\n * **Ignite UI for Angular CSV Exporter Service** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/exporter-csv)\n *\n * The Ignite UI for Angular CSV Exporter service can export data in a Character Separated Values format from\n * both raw data (array) or from an `IgxGrid`.\n *\n * Example:\n * ```typescript\n * public localData = [\n * { Name: \"Eric Ridley\", Age: \"26\" },\n * { Name: \"Alanis Brook\", Age: \"22\" },\n * { Name: \"Jonathan Morris\", Age: \"23\" }\n * ];\n *\n * constructor(private csvExportService: IgxCsvExporterService) {\n * }\n *\n * const opt: IgxCsvExporterOptions = new IgxCsvExporterOptions(\"FileName\", CsvFileTypes.CSV);\n * this.csvExportService.exportData(this.localData, opt);\n * ```\n */\nclass IgxCsvExporterService extends IgxBaseExporter {\n constructor() {\n super(...arguments);\n /**\n * This event is emitted when the export process finishes.\n * ```typescript\n * this.exporterService.exportEnded.subscribe((args: ICsvExportEndedEventArgs) => {\n * // put event handler code here\n * });\n * ```\n *\n * @memberof IgxCsvExporterService\n */\n this.exportEnded = new EventEmitter();\n }\n exportDataImplementation(data, options, done) {\n data = data.map((item) => item.data);\n const columnList = this._ownersMap.get(DEFAULT_OWNER);\n const csvData = new CharSeparatedValueData(data, options.valueDelimiter, columnList?.columns);\n csvData.prepareDataAsync((r) => {\n this._stringData = r;\n this.saveFile(options);\n this.exportEnded.emit({ csvData: this._stringData });\n done();\n });\n }\n saveFile(options) {\n switch (options.fileType) {\n case CsvFileTypes.CSV:\n this.exportFile(this._stringData, options.fileName, 'text/csv;charset=utf-8;');\n break;\n case CsvFileTypes.TSV:\n case CsvFileTypes.TAB:\n this.exportFile(this._stringData, options.fileName, 'text/tab-separated-values;charset=utf-8;');\n break;\n }\n }\n exportFile(data, fileName, fileType) {\n const blob = new Blob(['\\ufeff', data], { type: fileType });\n ExportUtilities.saveBlobToFile(blob, fileName);\n }\n}\nIgxCsvExporterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCsvExporterService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxCsvExporterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCsvExporterService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCsvExporterService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\n\n/**\n * @hidden\n */\nvar ExcelFolderTypes;\n(function (ExcelFolderTypes) {\n ExcelFolderTypes[ExcelFolderTypes[\"RootExcelFolder\"] = 0] = \"RootExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"RootRelsExcelFolder\"] = 1] = \"RootRelsExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"DocPropsExcelFolder\"] = 2] = \"DocPropsExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"XLExcelFolder\"] = 3] = \"XLExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"XLRelsExcelFolder\"] = 4] = \"XLRelsExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"ThemeExcelFolder\"] = 5] = \"ThemeExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"WorksheetsExcelFolder\"] = 6] = \"WorksheetsExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"WorksheetsRelsExcelFolder\"] = 7] = \"WorksheetsRelsExcelFolder\";\n ExcelFolderTypes[ExcelFolderTypes[\"TablesExcelFolder\"] = 8] = \"TablesExcelFolder\";\n})(ExcelFolderTypes || (ExcelFolderTypes = {}));\n/**\n * @hidden\n */\nvar ExcelFileTypes;\n(function (ExcelFileTypes) {\n ExcelFileTypes[ExcelFileTypes[\"RootRelsFile\"] = 0] = \"RootRelsFile\";\n ExcelFileTypes[ExcelFileTypes[\"AppFile\"] = 1] = \"AppFile\";\n ExcelFileTypes[ExcelFileTypes[\"CoreFile\"] = 2] = \"CoreFile\";\n ExcelFileTypes[ExcelFileTypes[\"WorkbookRelsFile\"] = 3] = \"WorkbookRelsFile\";\n ExcelFileTypes[ExcelFileTypes[\"ThemeFile\"] = 4] = \"ThemeFile\";\n ExcelFileTypes[ExcelFileTypes[\"WorksheetFile\"] = 5] = \"WorksheetFile\";\n ExcelFileTypes[ExcelFileTypes[\"StyleFile\"] = 6] = \"StyleFile\";\n ExcelFileTypes[ExcelFileTypes[\"WorkbookFile\"] = 7] = \"WorkbookFile\";\n ExcelFileTypes[ExcelFileTypes[\"ContentTypesFile\"] = 8] = \"ContentTypesFile\";\n ExcelFileTypes[ExcelFileTypes[\"SharedStringsFile\"] = 9] = \"SharedStringsFile\";\n ExcelFileTypes[ExcelFileTypes[\"WorksheetRelsFile\"] = 10] = \"WorksheetRelsFile\";\n ExcelFileTypes[ExcelFileTypes[\"TablesFile\"] = 11] = \"TablesFile\";\n})(ExcelFileTypes || (ExcelFileTypes = {}));\n\n/** @hidden */\nclass ExcelStrings {\n static getRels() {\n return ExcelStrings.XML_STRING + '';\n }\n static getApp(worksheetName) {\n return ExcelStrings.XML_STRING + `Microsoft Excel0falseWorksheets1${worksheetName}falsefalsefalse16.0300`;\n }\n static getCore() {\n return ExcelStrings.XML_STRING + '2015-06-05T18:17:20Z2015-06-05T18:17:26Z';\n }\n static getTheme() {\n return ExcelStrings.XML_STRING + '';\n }\n static getStyles() {\n return ExcelStrings.XML_STRING +\n '';\n }\n static getWorkbook(worksheetName) {\n return ExcelStrings.XML_STRING + ``;\n }\n static getWorksheetRels() {\n return ExcelStrings.XML_STRING + ``;\n }\n static getWorkbookRels(hasSharedStrings) {\n let retVal = ExcelStrings.XML_STRING + ``;\n if (hasSharedStrings) {\n retVal += ExcelStrings.SHARED_STRING_RELATIONSHIP;\n }\n retVal += '';\n return retVal;\n }\n static getSheetXML(dimension, freezePane, cols, sheetData, hasTable, outlineLevel = 0, isHierarchical) {\n const hasOutline = outlineLevel > 0;\n const tableParts = hasTable ? '' : '';\n const sheetOutlineProp = hasOutline ? '' : '';\n const sOutlineLevel = hasOutline ? `outlineLevelRow=\"${outlineLevel}\"` : '';\n const dimensions = isHierarchical ? '' : ``;\n // return ExcelStrings.XML_STRING +\n // '' + freezePane + '' + cols + sheetData + '' + tableParts + '';\n return `${ExcelStrings.XML_STRING}\n\n${sheetOutlineProp}\n${dimensions}\n${freezePane}\n\n${cols}\n${sheetData}\n\n${tableParts}`;\n }\n static getSharedStringXML(count, uniqueCount, table) {\n return ExcelStrings.XML_STRING + '' + table + '';\n }\n static getContentTypesXML(hasSharedStrings, hasTable) {\n let contentTypes = ExcelStrings.XML_STRING +\n `\n \n \n \n \n \n \n \n `;\n contentTypes += hasSharedStrings ?\n `\t` : '';\n contentTypes += hasTable ?\n `` : '';\n contentTypes += ``;\n return contentTypes;\n }\n static getTablesXML(autoFilterDimension, tableDimension, tableColumns, sort) {\n return `${ExcelStrings.XML_STRING}\n ${sort}${tableColumns}\n
    `;\n }\n /* eslint-enable max-len */\n static getExcelColumn(index) {\n // Returns the excel column name for given 0-based index\n // For example 27 should return \"AB\"\n let returnString = '';\n while (index >= 0) {\n const char = index % 26;\n returnString = String.fromCharCode(65 + char) + returnString;\n index = Math.floor(index / 26) - 1;\n }\n return returnString;\n }\n}\n/* eslint-disable max-len */\nExcelStrings.XML_STRING = '\\r\\n';\nExcelStrings.SHARED_STRING_RELATIONSHIP = '';\n\n/**\n * @hidden\n */\nclass RootRelsFile {\n writeElement(folder) {\n folder['.rels'] = strToU8(ExcelStrings.getRels());\n }\n}\n/**\n * @hidden\n */\nclass AppFile {\n writeElement(folder, worksheetData) {\n folder['app.xml'] = strToU8(ExcelStrings.getApp(worksheetData.options.worksheetName));\n }\n}\n/**\n * @hidden\n */\nclass CoreFile {\n writeElement(folder) {\n folder['core.xml'] = strToU8(ExcelStrings.getCore());\n }\n}\n/**\n * @hidden\n */\nclass WorkbookRelsFile {\n writeElement(folder, worksheetData) {\n const hasSharedStrings = !worksheetData.isEmpty || worksheetData.options.alwaysExportHeaders;\n folder['workbook.xml.rels'] = strToU8(ExcelStrings.getWorkbookRels(hasSharedStrings));\n }\n}\n/**\n * @hidden\n */\nclass ThemeFile {\n writeElement(folder) {\n folder['theme1.xml'] = strToU8(ExcelStrings.getTheme());\n }\n}\n/**\n * @hidden\n */\nclass WorksheetFile {\n constructor() {\n this.maxOutlineLevel = 0;\n this.sheetData = '';\n this.dimension = '';\n this.freezePane = '';\n this.rowHeight = '';\n this.mergeCellStr = '';\n this.mergeCellsCounter = 0;\n this.rowIndex = 0;\n this.pivotGridRowHeadersMap = new Map();\n this.dimensionMap = new Map();\n this.hierarchicalDimensionMap = new Map();\n this.currentSummaryOwner = '';\n this.currentHierarchicalOwner = '';\n this.firstColumn = Number.MAX_VALUE;\n this.firstDataRow = Number.MAX_VALUE;\n this.currencyStyleMap = new Map([\n ['USD', { styleXf: 5, symbol: '$' }],\n ['GBP', { styleXf: 6, symbol: '£' }],\n ['CNY', { styleXf: 7, symbol: '¥' }],\n ['EUR', { styleXf: 8, symbol: '€' }],\n ['JPY', { styleXf: 9, symbol: '¥' }],\n ]);\n }\n writeElement() { }\n async writeElementAsync(folder, worksheetData) {\n return new Promise(resolve => {\n this.prepareDataAsync(worksheetData, (cols, rows) => {\n const hasTable = (!worksheetData.isEmpty || worksheetData.options.alwaysExportHeaders)\n && worksheetData.options.exportAsTable;\n folder['sheet1.xml'] = strToU8(ExcelStrings.getSheetXML(this.dimension, this.freezePane, cols, rows, hasTable, this.maxOutlineLevel, worksheetData.isHierarchical));\n resolve();\n });\n });\n }\n prepareDataAsync(worksheetData, done) {\n this.sheetData = '';\n let cols = '';\n const dictionary = worksheetData.dataDictionary;\n this.rowIndex = 0;\n if (worksheetData.isEmpty && (!worksheetData.options.alwaysExportHeaders || worksheetData.owner.columns.length === 0)) {\n this.sheetData += '';\n this.dimension = 'A1';\n done('', this.sheetData);\n }\n else {\n const owner = worksheetData.owner;\n const isHierarchicalGrid = worksheetData.isHierarchical;\n const hasMultiColumnHeader = worksheetData.hasMultiColumnHeader;\n const hasMultiRowHeader = worksheetData.hasMultiRowHeader;\n const hasUserSetIndex = owner.columns.some(col => col.exportIndex !== undefined);\n const height = worksheetData.options.rowHeight;\n this.isValidGrid = worksheetData.isHierarchical || worksheetData.isTreeGrid || worksheetData.isGroupedGrid;\n this.rowHeight = height ? ` ht=\"${height}\" customHeight=\"1\"` : '';\n this.sheetData += ``;\n let headersForLevel = [];\n for (let i = 0; i <= owner.maxRowLevel; i++) {\n headersForLevel = owner.columns.filter(c => c.level === i && c.rowSpan > 0 && !c.skip);\n this.printHeaders(worksheetData, headersForLevel, i, true);\n this.rowIndex++;\n }\n this.rowIndex = 0;\n for (let i = 0; i <= owner.maxLevel; i++) {\n this.rowIndex++;\n const pivotGridColumns = this.pivotGridRowHeadersMap.get(this.rowIndex) ?? \"\";\n this.sheetData += `${pivotGridColumns}`;\n const allowedColumns = owner.columns.filter(c => c.headerType !== HeaderType.RowHeader && c.headerType !== HeaderType.MultiRowHeader);\n headersForLevel = hasMultiColumnHeader ?\n allowedColumns\n .filter(c => (c.level < i &&\n c.headerType !== HeaderType.MultiColumnHeader || c.level === i) && c.columnSpan > 0 && !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex) :\n hasUserSetIndex ?\n allowedColumns.filter(c => !c.skip) :\n allowedColumns.filter(c => !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex);\n this.printHeaders(worksheetData, headersForLevel, i, false);\n this.sheetData += ``;\n }\n const multiColumnHeaderLevel = worksheetData.options.ignoreMultiColumnHeaders ? 0 : owner.maxLevel;\n const freezeHeaders = worksheetData.options.freezeHeaders ? 2 + multiColumnHeaderLevel : 1;\n if (!isHierarchicalGrid) {\n const col = worksheetData.hasSummaries ? worksheetData.columnCount + 1 : worksheetData.columnCount - 1;\n this.dimension = 'A1:' + ExcelStrings.getExcelColumn(col) + (worksheetData.rowCount);\n cols += '';\n if (!hasMultiColumnHeader) {\n for (let j = 0; j < worksheetData.columnCount; j++) {\n const width = dictionary.columnWidths[j];\n // Use the width provided in the options if it exists\n let widthInTwips = worksheetData.options.columnWidth !== undefined ?\n worksheetData.options.columnWidth :\n Math.max(((width / 96) * 14.4), WorksheetFile.MIN_WIDTH);\n if (!(widthInTwips > 0)) {\n widthInTwips = WorksheetFile.MIN_WIDTH;\n }\n cols += ``;\n }\n }\n else {\n cols += ``;\n }\n const indexOfLastPinnedColumn = worksheetData.indexOfLastPinnedColumn;\n const frozenColumnCount = indexOfLastPinnedColumn + 1;\n let firstCell = ExcelStrings.getExcelColumn(frozenColumnCount) + freezeHeaders;\n if (indexOfLastPinnedColumn !== undefined && indexOfLastPinnedColumn !== -1 &&\n !worksheetData.options.ignorePinning &&\n !worksheetData.options.ignoreColumnsOrder) {\n this.freezePane =\n ``;\n }\n else if (worksheetData.options.freezeHeaders) {\n firstCell = ExcelStrings.getExcelColumn(0) + freezeHeaders;\n this.freezePane =\n ``;\n }\n }\n else {\n const columnWidth = worksheetData.options.columnWidth ? worksheetData.options.columnWidth : 20;\n cols += ``;\n if (worksheetData.options.freezeHeaders) {\n const firstCell = ExcelStrings.getExcelColumn(0) + freezeHeaders;\n this.freezePane =\n ``;\n }\n }\n if (worksheetData.hasSummaries) {\n cols += ``;\n }\n cols += '';\n this.processDataRecordsAsync(worksheetData, (rows) => {\n this.sheetData += rows;\n this.sheetData += '';\n if ((hasMultiColumnHeader || hasMultiRowHeader) && this.mergeCellsCounter > 0) {\n this.sheetData += `${this.mergeCellStr}`;\n }\n done(cols, this.sheetData);\n });\n }\n }\n processDataRecordsAsync(worksheetData, done) {\n const rowDataArr = [];\n const height = worksheetData.options.rowHeight;\n this.rowHeight = height ? ' ht=\"' + height + '\" customHeight=\"1\"' : '';\n const isHierarchicalGrid = worksheetData.isHierarchical;\n const hasUserSetIndex = worksheetData.owner.columns.some(c => c.exportIndex !== undefined);\n let recordHeaders = [];\n yieldingLoop(worksheetData.rowCount - worksheetData.multiColumnHeaderRows - 1, 1000, (i) => {\n if (!worksheetData.isEmpty) {\n if (!isHierarchicalGrid) {\n if (hasUserSetIndex) {\n recordHeaders = worksheetData.rootKeys;\n }\n else {\n recordHeaders = worksheetData.owner.columns\n .filter(c => c.headerType === HeaderType.ColumnHeader && !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex)\n .map(c => c.field);\n }\n }\n else {\n const record = worksheetData.data[i];\n if (record.type === ExportRecordType.HeaderRecord) {\n const recordOwner = worksheetData.owners.get(record.owner);\n const hasMultiColumnHeaders = recordOwner.columns.some(c => !c.skip && c.headerType === HeaderType.MultiColumnHeader);\n if (hasMultiColumnHeaders) {\n this.hGridPrintMultiColHeaders(worksheetData, rowDataArr, record, recordOwner);\n }\n }\n recordHeaders = Object.keys(worksheetData.data[i].data);\n }\n rowDataArr.push(this.processRow(worksheetData, i, recordHeaders, isHierarchicalGrid));\n }\n }, () => {\n done(rowDataArr.join(''));\n });\n }\n hGridPrintMultiColHeaders(worksheetData, rowDataArr, record, owner) {\n for (let j = 0; j < owner.maxLevel; j++) {\n const recordLevel = record.level;\n const outlineLevel = recordLevel > 0 ? ` outlineLevel=\"${recordLevel}\"` : '';\n this.maxOutlineLevel = this.maxOutlineLevel < recordLevel ? recordLevel : this.maxOutlineLevel;\n const sHidden = record.hidden ? ` hidden=\"1\"` : '';\n this.rowIndex++;\n let row = ``;\n const headersForLevel = owner.columns\n .filter(c => (c.level < j &&\n c.headerType !== HeaderType.MultiColumnHeader || c.level === j) && c.columnSpan > 0 && !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex);\n let startValue = 0 + record.level;\n for (const currentCol of headersForLevel) {\n if (currentCol.level === j) {\n let columnCoordinate;\n columnCoordinate =\n ExcelStrings.getExcelColumn(startValue) + this.rowIndex;\n const columnValue = worksheetData.dataDictionary.saveValue(currentCol.header, true);\n row += `${columnValue}`;\n if (j !== owner.maxLevel) {\n this.mergeCellsCounter++;\n this.mergeCellStr += ` `;\n }\n }\n this.mergeCellStr += `${columnCoordinate}\" />`;\n }\n }\n startValue += currentCol.columnSpan;\n }\n row += ``;\n rowDataArr.push(row);\n }\n }\n processRow(worksheetData, i, headersForLevel, isHierarchicalGrid) {\n const record = worksheetData.data[i];\n const rowData = new Array(worksheetData.columnCount + 2);\n const rowLevel = record.level;\n const outlineLevel = rowLevel > 0 ? ` outlineLevel=\"${rowLevel}\"` : '';\n this.maxOutlineLevel = this.maxOutlineLevel < rowLevel ? rowLevel : this.maxOutlineLevel;\n const sHidden = record.hidden ? ` hidden=\"1\"` : '';\n this.rowIndex++;\n const pivotGridColumns = this.pivotGridRowHeadersMap.get(this.rowIndex) ?? \"\";\n rowData[0] = `${pivotGridColumns}`;\n const keys = worksheetData.isSpecialData ? [record.data] : headersForLevel;\n const isDataRecord = record.type === ExportRecordType.HierarchicalGridRecord\n || record.type === ExportRecordType.DataRecord\n || record.type === ExportRecordType.GroupedRecord\n || record.type === ExportRecordType.TreeGridRecord;\n const isValidRecordType = isDataRecord || record.type === ExportRecordType.SummaryRecord;\n if (isValidRecordType && worksheetData.hasSummaries) {\n this.resolveSummaryDimensions(record, isDataRecord, worksheetData.isGroupedGrid);\n }\n for (let j = 0; j < keys.length; j++) {\n const col = j + (isHierarchicalGrid ? rowLevel : worksheetData.isPivotGrid ? worksheetData.owner.maxRowLevel : 0);\n const cellData = this.getCellData(worksheetData, i, col, keys[j]);\n rowData[j + 1] = cellData;\n }\n rowData[keys.length + 1] = '';\n return rowData.join('');\n }\n getCellData(worksheetData, row, column, key) {\n const dictionary = worksheetData.dataDictionary;\n let columnName = ExcelStrings.getExcelColumn(column) + (this.rowIndex);\n const fullRow = worksheetData.data[row];\n const isHeaderRecord = fullRow.type === ExportRecordType.HeaderRecord;\n const isSummaryRecord = fullRow.type === ExportRecordType.SummaryRecord;\n const isValidRecordType = fullRow.type === ExportRecordType.GroupedRecord\n || fullRow.type === ExportRecordType.DataRecord\n || fullRow.type === ExportRecordType.HierarchicalGridRecord\n || fullRow.type === ExportRecordType.TreeGridRecord;\n this.firstDataRow = this.firstDataRow > this.rowIndex ? this.rowIndex : this.firstDataRow;\n let cellValue = worksheetData.isSpecialData ?\n fullRow.data :\n fullRow.data[key];\n if (cellValue === GRID_LEVEL_COL || key === GRID_LEVEL_COL) {\n columnName = ExcelStrings.getExcelColumn(worksheetData.columnCount + 1) + (this.rowIndex);\n }\n if (worksheetData.hasSummaries && (isValidRecordType || (worksheetData.isGroupedGrid && isSummaryRecord))) {\n this.setSummaryCoordinates(columnName, key, fullRow.hierarchicalOwner, worksheetData.isGroupedGrid && isSummaryRecord);\n }\n if (fullRow.summaryKey && fullRow.summaryKey === GRID_ROOT_SUMMARY && key !== GRID_LEVEL_COL && !this.isValidGrid) {\n this.setRootSummaryStartCoordinate(column, key);\n if (this.firstColumn > column) {\n this.setRootSummaryStartCoordinate(worksheetData.columnCount + 1, GRID_LEVEL_COL);\n this.firstColumn = column;\n }\n }\n const targetColArr = Array.from(worksheetData.owners.values()).map(arr => arr.columns).find(product => product.some(item => item.field === key));\n const targetCol = targetColArr ? targetColArr.find(col => col.field === key) : undefined;\n if ((cellValue === undefined || cellValue === null) && !worksheetData.hasSummaries) {\n return ``;\n }\n else if ((worksheetData.hasSummaries && (isValidRecordType || isHeaderRecord)) || !worksheetData.hasSummaries) {\n const savedValue = dictionary.saveValue(cellValue, isHeaderRecord);\n const isSavedAsString = savedValue !== -1;\n const isSavedAsDate = !isSavedAsString && cellValue instanceof Date;\n let value = isSavedAsString ? savedValue : cellValue;\n if (isSavedAsDate) {\n const timeZoneOffset = value.getTimezoneOffset() * 60000;\n const isoString = (new Date(value - timeZoneOffset)).toISOString();\n value = isoString.substring(0, isoString.indexOf('.'));\n }\n const type = isSavedAsString ? ` t=\"s\"` : isSavedAsDate ? ` t=\"d\"` : '';\n const isTime = targetCol?.dataType === 'time';\n const isDateTime = targetCol?.dataType === 'dateTime';\n const isPercentage = targetCol?.dataType === 'percent';\n const isColumnCurrencyType = targetCol?.dataType === 'currency';\n const format = isPercentage ? ` s=\"12\"` : isDateTime ? ` s=\"11\"` : isTime ? ` s=\"10\"` : isHeaderRecord ? ` s=\"3\"` : isSavedAsString ? '' : isSavedAsDate ? ` s=\"2\"` : isColumnCurrencyType ? ` s=\"${this.currencyStyleMap.get(targetCol.currencyCode)?.styleXf || 0}\"` : ` s=\"1\"`;\n return `${value}`;\n }\n else {\n let summaryFunc = `\"${cellValue ?? \"\"}\"`;\n if (isSummaryRecord && cellValue) {\n const dimensionMapKey = this.isValidGrid ? fullRow.hierarchicalOwner ?? GRID_PARENT : null;\n const level = worksheetData.isGroupedGrid ? worksheetData.maxLevel : fullRow.level;\n summaryFunc = this.getSummaryFunction(cellValue.label, key, dimensionMapKey, level, targetCol);\n if (!summaryFunc) {\n const cellStr = `${cellValue.label}: ${cellValue.value}`;\n const savedValue = dictionary.saveValue(cellStr, false);\n return `${savedValue}`;\n }\n return `${summaryFunc}`;\n }\n return `${summaryFunc}`;\n }\n }\n resolveSummaryDimensions(record, isDataRecord, isGroupedGrid) {\n if (this.isValidGrid &&\n this.currentHierarchicalOwner !== '' &&\n this.currentHierarchicalOwner !== record.owner &&\n !this.hierarchicalDimensionMap.get(this.currentHierarchicalOwner)) {\n this.hierarchicalDimensionMap.set(this.currentHierarchicalOwner, new Map(this.dimensionMap));\n }\n if (isDataRecord) {\n if (this.currentSummaryOwner !== record.summaryKey || this.currentHierarchicalOwner !== record.hierarchicalOwner) {\n this.dimensionMap.clear();\n }\n this.currentSummaryOwner = record.summaryKey;\n // For grouped grid we need to reset the parent map\n // so we can change the startCoordinate for each record\n if (isGroupedGrid && this.currentHierarchicalOwner !== '' && record.hierarchicalOwner === GRID_PARENT) {\n this.hierarchicalDimensionMap.delete(GRID_PARENT);\n }\n this.currentHierarchicalOwner = record.hierarchicalOwner;\n }\n }\n setSummaryCoordinates(columnName, key, hierarchicalOwner, useLastValidEndCoordinate) {\n const targetDimensionMap = this.hierarchicalDimensionMap.get(hierarchicalOwner) ?? this.dimensionMap;\n if (!targetDimensionMap.get(key)) {\n const initialDimensions = {\n startCoordinate: columnName,\n endCoordinate: columnName\n };\n targetDimensionMap.set(key, initialDimensions);\n }\n else {\n if (useLastValidEndCoordinate) {\n this.setEndCoordinates(targetDimensionMap, true);\n }\n else {\n targetDimensionMap.get(key).endCoordinate = columnName;\n this.lastValidRow = targetDimensionMap.get(key).endCoordinate.match(/[a-z]+|[^a-z]+/gi)[1];\n }\n }\n if (this.isValidGrid && !useLastValidEndCoordinate && hierarchicalOwner !== GRID_PARENT) {\n const parentMap = this.hierarchicalDimensionMap.get(GRID_PARENT);\n this.setEndCoordinates(parentMap);\n }\n }\n setEndCoordinates(map, useLastValidEndCoordinate = false) {\n for (const a of map.values()) {\n const colName = a.endCoordinate.match(/[a-z]+|[^a-z]+/gi)[0];\n a.endCoordinate = `${colName}${useLastValidEndCoordinate ? this.lastValidRow : this.rowIndex}`;\n }\n }\n getSummaryFunction(type, key, dimensionMapKey, recordLevel, col) {\n const dimensionMap = dimensionMapKey ? this.hierarchicalDimensionMap.get(dimensionMapKey) : this.dimensionMap;\n const dimensions = dimensionMap.get(key);\n const levelDimensions = dimensionMap.get(GRID_LEVEL_COL);\n let func = '';\n let funcType = '';\n let result = '';\n const currencyInfo = this.currencyStyleMap.get(col.currencyCode);\n switch (type.toLowerCase()) {\n case \"count\":\n return `\"Count: \"&_xlfn.COUNTIF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}, ${recordLevel})`;\n case \"min\":\n func = `_xlfn.MIN(_xlfn.IF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}=${recordLevel}, ${dimensions.startCoordinate}:${dimensions.endCoordinate}))`;\n funcType = `\"Min: \"&`;\n result = funcType + (col.dataType === 'currency' && currencyInfo\n ? `_xlfn.TEXT(${func}, \"${currencyInfo.symbol}#,##0.00\")`\n : `${func}`);\n return result;\n case \"max\":\n func = `_xlfn.MAX(_xlfn.IF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}=${recordLevel}, ${dimensions.startCoordinate}:${dimensions.endCoordinate}))`;\n funcType = `\"Max: \"&`;\n result = funcType + (col.dataType === 'currency' && currencyInfo\n ? `_xlfn.TEXT(${func}, \"${currencyInfo.symbol}#,##0.00\")`\n : `${func}`);\n return result;\n case \"sum\":\n func = `_xlfn.SUMIF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}, ${recordLevel}, ${dimensions.startCoordinate}:${dimensions.endCoordinate})`;\n funcType = `\"Sum: \"&`;\n result = funcType + (col.dataType === 'currency' && currencyInfo\n ? `_xlfn.TEXT(${func}, \"${currencyInfo.symbol}#,##0.00\")`\n : `${func}`);\n return result;\n case \"avg\":\n func = `_xlfn.AVERAGEIF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}, ${recordLevel}, ${dimensions.startCoordinate}:${dimensions.endCoordinate})`;\n funcType = `\"Avg: \"&`;\n result = funcType + (col.dataType === 'currency' && currencyInfo\n ? `_xlfn.TEXT(${func}, \"${currencyInfo.symbol}#,##0.00\")`\n : `${func}`);\n return result;\n case \"earliest\":\n // TODO: get date format from locale\n return `\"Earliest: \"&_xlfn.TEXT(_xlfn.MIN(_xlfn.IF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}=${recordLevel}, ${dimensions.startCoordinate}:${dimensions.endCoordinate})), \"m/d/yyyy\")`;\n case \"latest\":\n // TODO: get date format from locale\n return `\"Latest: \"&_xlfn.TEXT(_xlfn.MAX(_xlfn.IF(${levelDimensions.startCoordinate}:${levelDimensions.endCoordinate}=${recordLevel}, ${dimensions.startCoordinate}:${dimensions.endCoordinate})), \"m/d/yyyy\")`;\n }\n }\n setRootSummaryStartCoordinate(column, key) {\n const firstDataRecordColName = ExcelStrings.getExcelColumn(column) + (this.firstDataRow);\n if (this.dimensionMap.get(key).startCoordinate !== firstDataRecordColName) {\n this.dimensionMap.get(key).startCoordinate = firstDataRecordColName;\n }\n }\n printHeaders(worksheetData, headersForLevel, i, isVertical) {\n let startValue = 0;\n let str = '';\n const isHierarchicalGrid = worksheetData.isHierarchical;\n let rowStyle = isHierarchicalGrid ? ' s=\"3\"' : '';\n const dictionary = worksheetData.dataDictionary;\n const owner = worksheetData.owner;\n const maxLevel = isVertical\n ? owner.maxRowLevel\n : owner.maxLevel;\n for (const currentCol of headersForLevel) {\n const spanLength = isVertical ? currentCol.rowSpan : currentCol.columnSpan;\n if (currentCol.level === i) {\n let columnCoordinate;\n const column = isVertical\n ? this.rowIndex\n : startValue + (owner.maxRowLevel ?? 0);\n const rowCoordinate = isVertical\n ? startValue + owner.maxLevel + 2\n : this.rowIndex;\n const columnValue = dictionary.saveValue(currentCol.header, true, false);\n columnCoordinate = (currentCol.field === GRID_LEVEL_COL\n ? ExcelStrings.getExcelColumn(worksheetData.columnCount + 1)\n : ExcelStrings.getExcelColumn(column)) + rowCoordinate;\n rowStyle = isVertical && currentCol.rowSpan > 1 ? ' s=\"4\"' : rowStyle;\n str = `${columnValue}`;\n if (isVertical) {\n if (this.pivotGridRowHeadersMap.has(rowCoordinate)) {\n this.pivotGridRowHeadersMap.set(rowCoordinate, this.pivotGridRowHeadersMap.get(rowCoordinate) + str);\n }\n else {\n this.pivotGridRowHeadersMap.set(rowCoordinate, str);\n }\n }\n else {\n this.sheetData += str;\n }\n if (i !== maxLevel) {\n this.mergeCellsCounter++;\n this.mergeCellStr += ` `;\n isVertical\n ? this.pivotGridRowHeadersMap.set(row, str)\n : this.sheetData += str;\n }\n }\n this.mergeCellStr += `${columnCoordinate}\" />`;\n }\n }\n startValue += spanLength;\n }\n }\n}\nWorksheetFile.MIN_WIDTH = 8.43;\n/**\n * @hidden\n */\nclass StyleFile {\n writeElement(folder) {\n folder['styles.xml'] = strToU8(ExcelStrings.getStyles());\n }\n}\n/**\n * @hidden\n */\nclass WorkbookFile {\n writeElement(folder, worksheetData) {\n folder['workbook.xml'] = strToU8(ExcelStrings.getWorkbook(worksheetData.options.worksheetName));\n }\n}\n/**\n * @hidden\n */\nclass ContentTypesFile {\n writeElement(folder, worksheetData) {\n const hasSharedStrings = !worksheetData.isEmpty || worksheetData.options.alwaysExportHeaders;\n folder['[Content_Types].xml'] = strToU8(ExcelStrings.getContentTypesXML(hasSharedStrings, worksheetData.options.exportAsTable));\n }\n}\n/**\n * @hidden\n */\nclass SharedStringsFile {\n writeElement(folder, worksheetData) {\n const dict = worksheetData.dataDictionary;\n const sortedValues = dict.getKeys();\n const sharedStrings = new Array(sortedValues.length);\n for (const value of sortedValues) {\n sharedStrings[dict.getSanitizedValue(value)] = '' + value + '';\n }\n folder['sharedStrings.xml'] = strToU8(ExcelStrings.getSharedStringXML(dict.stringsCount, sortedValues.length, sharedStrings.join('')));\n }\n}\n/**\n * @hidden\n */\nclass TablesFile {\n writeElement(folder, worksheetData) {\n const columnCount = worksheetData.columnCount;\n const lastColumn = ExcelStrings.getExcelColumn(columnCount - 1) + worksheetData.rowCount;\n const autoFilterDimension = 'A1:' + lastColumn;\n const tableDimension = worksheetData.isEmpty\n ? 'A1:' + ExcelStrings.getExcelColumn(columnCount - 1) + (worksheetData.rowCount + 1)\n : autoFilterDimension;\n const hasUserSetIndex = worksheetData.owner.columns.some(c => c.exportIndex !== undefined);\n const values = hasUserSetIndex\n ? worksheetData.rootKeys\n : worksheetData.owner.columns\n .filter(c => !c.skip)\n .sort((a, b) => a.startIndex - b.startIndex)\n .sort((a, b) => a.pinnedIndex - b.pinnedIndex)\n .map(c => c.header);\n let sortString = '';\n let tableColumns = '';\n for (let i = 0; i < columnCount; i++) {\n const value = values[i];\n tableColumns += '';\n }\n tableColumns += '';\n if (worksheetData.sort) {\n const sortingExpression = worksheetData.sort;\n const sc = ExcelStrings.getExcelColumn(values.indexOf(sortingExpression.fieldName));\n const dir = sortingExpression.dir - 1;\n sortString = ``;\n }\n folder['table1.xml'] = strToU8(ExcelStrings.getTablesXML(autoFilterDimension, tableDimension, tableColumns, sortString));\n }\n}\n/**\n * @hidden\n */\nclass WorksheetRelsFile {\n writeElement(folder) {\n folder['sheet1.xml.rels'] = strToU8(ExcelStrings.getWorksheetRels());\n }\n}\n\n/** @hidden */\nclass RootExcelFolder {\n get folderName() {\n return '';\n }\n childFiles() {\n return [ExcelFileTypes.ContentTypesFile];\n }\n childFolders() {\n return [\n ExcelFolderTypes.RootRelsExcelFolder,\n ExcelFolderTypes.DocPropsExcelFolder,\n ExcelFolderTypes.XLExcelFolder\n ];\n }\n}\n/** @hidden */\nclass RootRelsExcelFolder {\n get folderName() {\n return '_rels';\n }\n childFiles() {\n return [ExcelFileTypes.RootRelsFile];\n }\n childFolders() {\n return [];\n }\n}\n/** @hidden */\nclass DocPropsExcelFolder {\n get folderName() {\n return 'docProps';\n }\n childFiles() {\n return [\n ExcelFileTypes.AppFile,\n ExcelFileTypes.CoreFile\n ];\n }\n childFolders() {\n return [];\n }\n}\n/** @hidden */\nclass XLExcelFolder {\n get folderName() {\n return 'xl';\n }\n childFiles(data) {\n const retVal = [\n ExcelFileTypes.StyleFile,\n ExcelFileTypes.WorkbookFile\n ];\n if (!data.isEmpty || data.options.alwaysExportHeaders) {\n retVal.push(ExcelFileTypes.SharedStringsFile);\n }\n return retVal;\n }\n childFolders(data) {\n const retVal = [\n ExcelFolderTypes.XLRelsExcelFolder,\n ExcelFolderTypes.ThemeExcelFolder,\n ExcelFolderTypes.WorksheetsExcelFolder\n ];\n if ((!data.isEmpty || data.options.alwaysExportHeaders) && data.options.exportAsTable) {\n retVal.push(ExcelFolderTypes.TablesExcelFolder);\n }\n return retVal;\n }\n}\n/** @hidden */\nclass XLRelsExcelFolder {\n get folderName() {\n return '_rels';\n }\n childFiles() {\n return [ExcelFileTypes.WorkbookRelsFile];\n }\n childFolders() {\n return [];\n }\n}\n/** @hidden */\nclass ThemeExcelFolder {\n get folderName() {\n return 'theme';\n }\n childFiles() {\n return [ExcelFileTypes.ThemeFile];\n }\n childFolders() {\n return [];\n }\n}\n/** @hidden */\nclass WorksheetsExcelFolder {\n get folderName() {\n return 'worksheets';\n }\n childFiles() {\n return [ExcelFileTypes.WorksheetFile];\n }\n childFolders(data) {\n return (data.isEmpty && !data.options.alwaysExportHeaders) || !data.options.exportAsTable ? [] : [ExcelFolderTypes.WorksheetsRelsExcelFolder];\n }\n}\n/** @hidden */\nclass TablesExcelFolder {\n get folderName() {\n return 'tables';\n }\n childFiles() {\n return [ExcelFileTypes.TablesFile];\n }\n childFolders() {\n return [];\n }\n}\n/** @hidden */\nclass WorksheetsRelsExcelFolder {\n get folderName() {\n return '_rels';\n }\n childFiles() {\n return [ExcelFileTypes.WorksheetRelsFile];\n }\n childFolders() {\n return [];\n }\n}\n\n/** @hidden */\nclass ExcelElementsFactory {\n static getExcelFolder(type) {\n switch (type) {\n case ExcelFolderTypes.RootExcelFolder:\n return new RootExcelFolder();\n case ExcelFolderTypes.RootRelsExcelFolder:\n return new RootRelsExcelFolder();\n case ExcelFolderTypes.DocPropsExcelFolder:\n return new DocPropsExcelFolder();\n case ExcelFolderTypes.XLExcelFolder:\n return new XLExcelFolder();\n case ExcelFolderTypes.XLRelsExcelFolder:\n return new XLRelsExcelFolder();\n case ExcelFolderTypes.ThemeExcelFolder:\n return new ThemeExcelFolder();\n case ExcelFolderTypes.WorksheetsExcelFolder:\n return new WorksheetsExcelFolder();\n case ExcelFolderTypes.WorksheetsRelsExcelFolder:\n return new WorksheetsRelsExcelFolder();\n case ExcelFolderTypes.TablesExcelFolder:\n return new TablesExcelFolder();\n default:\n throw new Error('Unknown excel folder type!');\n }\n }\n static getExcelFile(type) {\n switch (type) {\n case ExcelFileTypes.RootRelsFile:\n return new RootRelsFile();\n case ExcelFileTypes.AppFile:\n return new AppFile();\n case ExcelFileTypes.CoreFile:\n return new CoreFile();\n case ExcelFileTypes.WorkbookRelsFile:\n return new WorkbookRelsFile();\n case ExcelFileTypes.ThemeFile:\n return new ThemeFile();\n case ExcelFileTypes.WorksheetFile:\n return new WorksheetFile();\n case ExcelFileTypes.StyleFile:\n return new StyleFile();\n case ExcelFileTypes.WorkbookFile:\n return new WorkbookFile();\n case ExcelFileTypes.ContentTypesFile:\n return new ContentTypesFile();\n case ExcelFileTypes.SharedStringsFile:\n return new SharedStringsFile();\n case ExcelFileTypes.WorksheetRelsFile:\n return new WorksheetRelsFile();\n case ExcelFileTypes.TablesFile:\n return new TablesFile();\n default:\n throw Error('Unknown excel file type!');\n }\n }\n}\n\n/** @hidden */\nclass WorksheetDataDictionary {\n constructor(columnCount, columnWidth, columnWidthsList) {\n this.hasNumberValues = false;\n this.hasDateValues = false;\n this._dictionary = {};\n this._widthsDictionary = {};\n this._counter = 0;\n this.dirtyKeyCollections();\n this._columnWidths = new Array(columnCount);\n if (columnWidth) {\n this._columnWidths.fill(columnWidth);\n }\n else {\n this._columnWidths = columnWidthsList;\n }\n this.stringsCount = 0;\n }\n get columnWidths() {\n return this._columnWidths;\n }\n saveValue(value, isHeader, shouldSanitizeValue = true) {\n let sanitizedValue = '';\n const isDate = value instanceof Date;\n const isSavedAsString = isHeader || (typeof value !== 'number' && value !== Number(value) && !Number.isFinite(value) && !isDate);\n if (isSavedAsString) {\n sanitizedValue = shouldSanitizeValue ? ExportUtilities.sanitizeValue(value) : value;\n if (this._dictionary[sanitizedValue] === undefined) {\n this._dictionary[sanitizedValue] = this._counter++;\n this.dirtyKeyCollections();\n }\n this.stringsCount++;\n }\n else if (isDate) {\n this.hasDateValues = true;\n }\n else {\n this.hasNumberValues = true;\n }\n return isSavedAsString ? this.getSanitizedValue(sanitizedValue) : -1;\n }\n getValue(value) {\n return this.getSanitizedValue(ExportUtilities.sanitizeValue(value));\n }\n getSanitizedValue(sanitizedValue) {\n return this._dictionary[sanitizedValue];\n }\n getKeys() {\n if (!this._keysAreValid) {\n this._keys = Object.keys(this._dictionary);\n this._keysAreValid = true;\n }\n return this._keys;\n }\n getTextWidth(value) {\n if (this._widthsDictionary[value] === undefined) {\n const context = this.getContext();\n const metrics = context.measureText(value);\n this._widthsDictionary[value] = metrics.width + WorksheetDataDictionary.TEXT_PADDING;\n }\n return this._widthsDictionary[value];\n }\n getContext() {\n if (!this._context) {\n const canvas = document.createElement('canvas');\n this._context = canvas.getContext('2d');\n this._context.font = WorksheetDataDictionary.DEFAULT_FONT;\n }\n return this._context;\n }\n dirtyKeyCollections() {\n this._keysAreValid = false;\n }\n}\nWorksheetDataDictionary.DEFAULT_FONT = '11pt Calibri';\nWorksheetDataDictionary.TEXT_PADDING = 5;\n\n/** @hidden */\nclass WorksheetData {\n constructor(_data, options, sort, columnCount, rootKeys, indexOfLastPinnedColumn, columnWidths, owner, owners) {\n this._data = _data;\n this.options = options;\n this.sort = sort;\n this.columnCount = columnCount;\n this.rootKeys = rootKeys;\n this.indexOfLastPinnedColumn = indexOfLastPinnedColumn;\n this.columnWidths = columnWidths;\n this.owner = owner;\n this.owners = owners;\n this.initializeData();\n }\n get data() {\n return this._data;\n }\n get rowCount() {\n return this._rowCount;\n }\n get isEmpty() {\n return !this.rowCount\n || this.rowCount === this.owner.maxLevel + 1\n || !this.columnCount\n || this.owner.columns.every(c => c.skip);\n }\n get isSpecialData() {\n return this._isSpecialData;\n }\n get dataDictionary() {\n return this._dataDictionary;\n }\n get hasMultiColumnHeader() {\n return this._hasMultiColumnHeader;\n }\n get hasSummaries() {\n return this._hasSummaries;\n }\n get hasMultiRowHeader() {\n return this._hasMultiRowHeader;\n }\n get isHierarchical() {\n return this._isHierarchical;\n }\n get isTreeGrid() {\n return this._isTreeGrid;\n }\n get isPivotGrid() {\n return this._isPivotGrid;\n }\n get isGroupedGrid() {\n return this._data.some(d => d.type === ExportRecordType.GroupedRecord);\n }\n get maxLevel() {\n return [...new Set(this._data.map(item => item.level))].sort((a, b) => (a > b ? -1 : 1))[0];\n }\n get multiColumnHeaderRows() {\n return !this.options.ignoreMultiColumnHeaders ? Array.from(this.owners.values()).map(c => c.maxLevel).reduce((a, b) => a + b) : 0;\n }\n initializeData() {\n this._dataDictionary = new WorksheetDataDictionary(this.columnCount, this.options.columnWidth, this.columnWidths);\n this._hasMultiColumnHeader = Array.from(this.owners.values())\n .some(o => o.columns.some(col => !col.skip && col.headerType === HeaderType.MultiColumnHeader));\n this._hasMultiRowHeader = Array.from(this.owners.values())\n .some(o => o.columns.some(col => !col.skip && col.headerType === HeaderType.MultiRowHeader));\n this._isHierarchical = this.data[0]?.type === ExportRecordType.HierarchicalGridRecord\n || !(typeof (Array.from(this.owners.keys())[0]) === 'string');\n this._hasSummaries = this._data.filter(d => d.type === ExportRecordType.SummaryRecord).length > 0;\n this._isTreeGrid = this._data.filter(d => d.type === ExportRecordType.TreeGridRecord).length > 0;\n this._isPivotGrid = this.data[0]?.type === ExportRecordType.PivotGridRecord;\n const exportMultiColumnHeaders = this._hasMultiColumnHeader && !this.options.ignoreMultiColumnHeaders;\n if (this._isHierarchical || exportMultiColumnHeaders || this._isPivotGrid) {\n this.options.exportAsTable = false;\n }\n if (!this._data || this._data.length === 0) {\n if (!this._isHierarchical) {\n this._rowCount = this.owner.maxLevel + 1;\n }\n return;\n }\n this._isSpecialData = ExportUtilities.isSpecialData(this._data[0].data);\n this._rowCount = this._data.length + this.multiColumnHeaderRows + 1;\n }\n}\n\nconst EXCEL_MAX_ROWS = 1048576;\nconst EXCEL_MAX_COLS = 16384;\n/**\n * **Ignite UI for Angular Excel Exporter Service** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/exporter_excel.html)\n *\n * The Ignite UI for Angular Excel Exporter service can export data in Microsoft® Excel® format from both raw data\n * (array) or from an `IgxGrid`.\n *\n * Example:\n * ```typescript\n * public localData = [\n * { Name: \"Eric Ridley\", Age: \"26\" },\n * { Name: \"Alanis Brook\", Age: \"22\" },\n * { Name: \"Jonathan Morris\", Age: \"23\" }\n * ];\n *\n * constructor(private excelExportService: IgxExcelExporterService) {\n * }\n *\n * this.excelExportService.exportData(this.localData, new IgxExcelExporterOptions(\"FileName\"));\n * ```\n */\nclass IgxExcelExporterService extends IgxBaseExporter {\n constructor() {\n super(...arguments);\n /**\n * This event is emitted when the export process finishes.\n * ```typescript\n * this.exporterService.exportEnded.subscribe((args: IExcelExportEndedEventArgs) => {\n * // put event handler code here\n * });\n * ```\n *\n * @memberof IgxExcelExporterService\n */\n this.exportEnded = new EventEmitter();\n }\n static async populateZipFileConfig(fileStructure, folder, worksheetData) {\n for (const childFolder of folder.childFolders(worksheetData)) {\n const folderInstance = ExcelElementsFactory.getExcelFolder(childFolder);\n const childStructure = fileStructure[folderInstance.folderName] = {};\n await IgxExcelExporterService.populateZipFileConfig(childStructure, folderInstance, worksheetData);\n }\n for (const childFile of folder.childFiles(worksheetData)) {\n const fileInstance = ExcelElementsFactory.getExcelFile(childFile);\n if (fileInstance instanceof WorksheetFile) {\n await fileInstance.writeElementAsync(fileStructure, worksheetData);\n }\n else {\n fileInstance.writeElement(fileStructure, worksheetData);\n }\n }\n }\n exportDataImplementation(data, options, done) {\n const firstDataElement = data[0];\n const isHierarchicalGrid = firstDataElement?.type === ExportRecordType.HierarchicalGridRecord;\n const isPivotGrid = firstDataElement?.type === ExportRecordType.PivotGridRecord;\n let rootKeys;\n let columnCount;\n let columnWidths;\n let indexOfLastPinnedColumn;\n let defaultOwner;\n const columnsExceedLimit = typeof firstDataElement !== 'undefined' ?\n isHierarchicalGrid ?\n data.some(d => Object.keys(d.data).length > EXCEL_MAX_COLS) :\n Object.keys(firstDataElement.data).length > EXCEL_MAX_COLS :\n false;\n if (data.length > EXCEL_MAX_ROWS || columnsExceedLimit) {\n throw Error('The Excel file can contain up to 1,048,576 rows and 16,384 columns.');\n }\n if (typeof firstDataElement !== 'undefined') {\n let maxLevel = 0;\n data.forEach((r) => {\n maxLevel = Math.max(maxLevel, r.level);\n });\n if (maxLevel > 7) {\n throw Error('Can create an outline of up to eight levels!');\n }\n if (isHierarchicalGrid) {\n columnCount = data\n .map(a => this._ownersMap.get(a.owner).columns.filter(c => !c.skip).length + a.level)\n .sort((a, b) => b - a)[0];\n rootKeys = this._ownersMap.get(firstDataElement.owner).columns.filter(c => !c.skip).map(c => c.field);\n defaultOwner = this._ownersMap.get(firstDataElement.owner);\n }\n else {\n defaultOwner = this._ownersMap.get(DEFAULT_OWNER);\n const columns = defaultOwner.columns.filter(col => col.field !== GRID_LEVEL_COL && !col.skip && col.headerType === HeaderType.ColumnHeader);\n columnWidths = defaultOwner.columnWidths;\n indexOfLastPinnedColumn = defaultOwner.indexOfLastPinnedColumn;\n columnCount = isPivotGrid ? columns.length + this.pivotGridFilterFieldsCount : columns.length;\n rootKeys = columns.map(c => c.field);\n }\n }\n else {\n const ownersKeys = Array.from(this._ownersMap.keys());\n defaultOwner = this._ownersMap.get(ownersKeys[0]);\n columnWidths = defaultOwner.columnWidths;\n columnCount = defaultOwner.columns.filter(col => col.field !== GRID_LEVEL_COL && !col.skip && col.headerType === HeaderType.ColumnHeader).length;\n }\n const worksheetData = new WorksheetData(data, options, this._sort, columnCount, rootKeys, indexOfLastPinnedColumn, columnWidths, defaultOwner, this._ownersMap);\n const rootFolder = ExcelElementsFactory.getExcelFolder(ExcelFolderTypes.RootExcelFolder);\n const fileData = {};\n IgxExcelExporterService.populateZipFileConfig(fileData, rootFolder, worksheetData)\n .then(() => {\n zip(fileData, (_, result) => {\n this.saveFile(result, options.fileName);\n this.exportEnded.emit({ xlsx: fileData });\n done();\n });\n });\n }\n saveFile(data, fileName) {\n const blob = new Blob([data], {\n type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n });\n ExportUtilities.saveBlobToFile(blob, fileName);\n }\n}\nIgxExcelExporterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelExporterService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxExcelExporterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelExporterService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelExporterService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\n\n/**\n * Objects of this class are used to configure the Excel exporting process.\n */\nclass IgxExcelExporterOptions extends IgxExporterOptionsBase {\n constructor(fileName) {\n super(fileName, '.xlsx');\n /**\n * Specifies if column pinning should be ignored. If ignoreColumnsOrder is set to true,\n * this option will always be considered as set to true.\n * ```typescript\n * let ignorePinning = this.exportOptions.ignorePinning;\n * this.exportOptions.ignorePinning = true;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n this.ignorePinning = false;\n /**\n * Specifies whether the exported data should be formatted as Excel table. (True by default)\n * ```typescript\n * let exportAsTable = this.exportOptions.exportAsTable;\n * this.exportOptions.exportAsTable = false;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n this.exportAsTable = true;\n }\n /**\n * Gets the width of the columns in the exported excel file.\n * ```typescript\n * let width = this.exportOptions.columnWidth;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n get columnWidth() {\n return this._columnWidth;\n }\n /**\n * Sets the width of the columns in the exported excel file. If left unspecified,\n * the width of the column or the default width of the excel columns will be used.\n * ```typescript\n * this.exportOptions.columnWidth = 55;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n set columnWidth(value) {\n if (value < 0) {\n throw Error('Invalid value for column width!');\n }\n this._columnWidth = value;\n }\n /**\n * Gets the height of the rows in the exported excel file.\n * ```typescript\n * let height = this.exportOptions.rowHeight;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n get rowHeight() {\n return this._rowHeight;\n }\n /**\n * Sets the height of the rows in the exported excel file. If left unspecified or 0,\n * the default height of the excel rows will be used.\n * ```typescript\n * this.exportOptions.rowHeight = 25;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n set rowHeight(value) {\n if (value < 0) {\n throw Error('Invalid value for row height!');\n }\n this._rowHeight = value;\n }\n /**\n * Gets the name of the worksheet in the exported excel file.\n * ```typescript\n * let worksheetName = this.exportOptions.worksheetName;\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n get worksheetName() {\n if (this._worksheetName === undefined || this._worksheetName === null) {\n return 'Sheet1';\n }\n return this._worksheetName;\n }\n /**\n * Sets the name of the worksheet in the exported excel file.\n * ```typescript\n * this.exportOptions.worksheetName = \"Worksheet\";\n * ```\n *\n * @memberof IgxExcelExporterOptions\n */\n set worksheetName(value) {\n this._worksheetName = value;\n }\n}\n\nclass IgxAngularAnimationPlayer {\n get position() {\n return this._innerPlayer.getPosition();\n }\n set position(value) {\n this.internalPlayer.setPosition(value);\n }\n constructor(internalPlayer) {\n this.internalPlayer = internalPlayer;\n this.animationStart = new EventEmitter();\n this.animationEnd = new EventEmitter();\n this.internalPlayer.onDone(() => this.onDone());\n const innerRenderer = this.internalPlayer._renderer;\n // We need inner player as Angular.AnimationPlayer.getPosition returns always 0.\n // To workaround this we are getting the positions from the inner player.\n // This is logged in Angular here - https://github.com/angular/angular/issues/18891\n // As soon as this is resolved we can remove this hack\n this._innerPlayer = innerRenderer.engine.players[innerRenderer.engine.players.length - 1];\n }\n init() {\n this.internalPlayer.init();\n }\n play() {\n this.animationStart.emit({ owner: this });\n this.internalPlayer.play();\n }\n finish() {\n this.internalPlayer.finish();\n // TODO: when animation finish angular deletes all onDone handlers. Add handlers again if needed\n }\n reset() {\n this.internalPlayer.reset();\n // calling reset does not change hasStarted to false. This is why we are doing it here via internal field\n this.internalPlayer._started = false;\n }\n destroy() {\n this.internalPlayer.destroy();\n }\n hasStarted() {\n return this.internalPlayer.hasStarted();\n }\n onDone() {\n this.animationEnd.emit({ owner: this });\n }\n}\n\nclass IgxAngularAnimationService {\n constructor(builder) {\n this.builder = builder;\n }\n buildAnimation(animationMetaData, element) {\n if (!animationMetaData) {\n return null;\n }\n const animationBuilder = this.builder.build(animationMetaData);\n const player = new IgxAngularAnimationPlayer(animationBuilder.create(element));\n return player;\n }\n}\nIgxAngularAnimationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAngularAnimationService, deps: [{ token: i1.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxAngularAnimationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAngularAnimationService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAngularAnimationService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.AnimationBuilder }]; } });\n\nvar HorizontalAlignment;\n(function (HorizontalAlignment) {\n HorizontalAlignment[HorizontalAlignment[\"Left\"] = -1] = \"Left\";\n HorizontalAlignment[HorizontalAlignment[\"Center\"] = -0.5] = \"Center\";\n HorizontalAlignment[HorizontalAlignment[\"Right\"] = 0] = \"Right\";\n})(HorizontalAlignment || (HorizontalAlignment = {}));\nvar VerticalAlignment;\n(function (VerticalAlignment) {\n VerticalAlignment[VerticalAlignment[\"Top\"] = -1] = \"Top\";\n VerticalAlignment[VerticalAlignment[\"Middle\"] = -0.5] = \"Middle\";\n VerticalAlignment[VerticalAlignment[\"Bottom\"] = 0] = \"Bottom\";\n})(VerticalAlignment || (VerticalAlignment = {}));\n/**\n * Defines the possible values of the overlays' position strategy.\n */\nvar RelativePositionStrategy;\n(function (RelativePositionStrategy) {\n RelativePositionStrategy[\"Connected\"] = \"connected\";\n RelativePositionStrategy[\"Auto\"] = \"auto\";\n RelativePositionStrategy[\"Elastic\"] = \"elastic\";\n})(RelativePositionStrategy || (RelativePositionStrategy = {}));\n/**\n * Defines the possible positions for the relative overlay settings presets.\n */\nvar RelativePosition;\n(function (RelativePosition) {\n RelativePosition[\"Above\"] = \"above\";\n RelativePosition[\"Below\"] = \"below\";\n RelativePosition[\"Before\"] = \"before\";\n RelativePosition[\"After\"] = \"after\";\n RelativePosition[\"Default\"] = \"default\";\n})(RelativePosition || (RelativePosition = {}));\n/**\n * Defines the possible positions for the absolute overlay settings presets.\n */\nvar AbsolutePosition;\n(function (AbsolutePosition) {\n AbsolutePosition[\"Bottom\"] = \"bottom\";\n AbsolutePosition[\"Top\"] = \"top\";\n AbsolutePosition[\"Center\"] = \"center\";\n})(AbsolutePosition || (AbsolutePosition = {}));\n// TODO: make this interface\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\n/** @hidden @internal */\nclass Util {\n /**\n * Calculates the rectangle of target for provided overlay settings. Defaults to 0,0,0,0,0,0 rectangle\n * if no target is provided\n *\n * @param settings Overlay settings for which to calculate target rectangle\n */\n static getTargetRect(target) {\n let targetRect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0\n };\n if (target instanceof HTMLElement) {\n targetRect = target.getBoundingClientRect();\n }\n else if (target instanceof Point) {\n const targetPoint = target;\n targetRect = {\n bottom: targetPoint.y,\n height: 0,\n left: targetPoint.x,\n right: targetPoint.x,\n top: targetPoint.y,\n width: 0\n };\n }\n return targetRect;\n }\n static getViewportRect(document) {\n const width = document.documentElement.clientWidth;\n const height = document.documentElement.clientHeight;\n const scrollPosition = Util.getViewportScrollPosition(document);\n return {\n top: scrollPosition.y,\n left: scrollPosition.x,\n right: scrollPosition.x + width,\n bottom: scrollPosition.y + height,\n width,\n height,\n };\n }\n static getViewportScrollPosition(document) {\n const documentElement = document.documentElement;\n const documentRect = documentElement.getBoundingClientRect();\n const horizontalScrollPosition = -documentRect.left || document.body.scrollLeft || window.scrollX || documentElement.scrollLeft || 0;\n const verticalScrollPosition = -documentRect.top || document.body.scrollTop || window.scrollY || documentElement.scrollTop || 0;\n return new Point(horizontalScrollPosition, verticalScrollPosition);\n }\n static cloneInstance(object) {\n const clonedObj = Object.assign(Object.create(Object.getPrototypeOf(object)), object);\n clonedObj.settings = cloneValue(clonedObj.settings);\n return clonedObj;\n }\n}\n\n/**\n * Positions the element based on the directions and start point passed in trough PositionSettings.\n * It is possible to either pass a start point or an HTMLElement as a positioning base.\n */\nclass ConnectedPositioningStrategy {\n constructor(settings) {\n this._defaultSettings = {\n horizontalDirection: HorizontalAlignment.Right,\n verticalDirection: VerticalAlignment.Bottom,\n horizontalStartPoint: HorizontalAlignment.Left,\n verticalStartPoint: VerticalAlignment.Bottom,\n openAnimation: scaleInVerTop,\n closeAnimation: scaleOutVerTop,\n minSize: { width: 0, height: 0 }\n };\n this.settings = Object.assign({}, this._defaultSettings, settings);\n }\n /**\n * Position the element based on the PositionStrategy implementing this interface.\n *\n * @param contentElement The HTML element to be positioned\n * @param size Size of the element\n * @param document reference to the Document object\n * @param initialCall should be true if this is the initial call to the method\n * @param target attaching target for the component to show\n * ```typescript\n * settings.positionStrategy.position(content, size, document, true);\n * ```\n */\n position(contentElement, size, document, initialCall, target) {\n const targetElement = target || this.settings.target;\n const rects = this.calculateElementRectangles(contentElement, targetElement);\n this.setStyle(contentElement, rects.targetRect, rects.elementRect, {});\n }\n /**\n * Creates clone of this position strategy\n * @returns clone of this position strategy\n */\n clone() {\n return Util.cloneInstance(this);\n }\n /**\n * Obtains the DomRect objects for the required elements - target and element to position\n *\n * @returns target and element DomRect objects\n */\n calculateElementRectangles(contentElement, target) {\n return {\n targetRect: Util.getTargetRect(target),\n elementRect: contentElement.getBoundingClientRect()\n };\n }\n /**\n * Sets element's style which effectively positions provided element according\n * to provided position settings\n *\n * @param element Element to position\n * @param targetRect Bounding rectangle of strategy target\n * @param elementRect Bounding rectangle of the element\n */\n setStyle(element, targetRect, elementRect, connectedFit) {\n const horizontalOffset = connectedFit.horizontalOffset ? connectedFit.horizontalOffset : 0;\n const verticalOffset = connectedFit.verticalOffset ? connectedFit.verticalOffset : 0;\n const startPoint = {\n x: targetRect.right + targetRect.width * this.settings.horizontalStartPoint + horizontalOffset,\n y: targetRect.bottom + targetRect.height * this.settings.verticalStartPoint + verticalOffset\n };\n const wrapperRect = element.parentElement.getBoundingClientRect();\n // clean up styles - if auto position strategy is chosen we may pass here several times\n element.style.right = '';\n element.style.left = '';\n element.style.bottom = '';\n element.style.top = '';\n switch (this.settings.horizontalDirection) {\n case HorizontalAlignment.Left:\n element.style.right = `${Math.round(wrapperRect.right - startPoint.x)}px`;\n break;\n case HorizontalAlignment.Center:\n element.style.left = `${Math.round(startPoint.x - wrapperRect.left - elementRect.width / 2)}px`;\n break;\n case HorizontalAlignment.Right:\n element.style.left = `${Math.round(startPoint.x - wrapperRect.left)}px`;\n break;\n }\n switch (this.settings.verticalDirection) {\n case VerticalAlignment.Top:\n element.style.bottom = `${Math.round(wrapperRect.bottom - startPoint.y)}px`;\n break;\n case VerticalAlignment.Middle:\n element.style.top = `${Math.round(startPoint.y - wrapperRect.top - elementRect.height / 2)}px`;\n break;\n case VerticalAlignment.Bottom:\n element.style.top = `${Math.round(startPoint.y - wrapperRect.top)}px`;\n break;\n }\n }\n}\n\nclass BaseFitPositionStrategy extends ConnectedPositioningStrategy {\n /**\n * Position the element based on the PositionStrategy implementing this interface.\n *\n * @param contentElement The HTML element to be positioned\n * @param size Size of the element\n * @param document reference to the Document object\n * @param initialCall should be true if this is the initial call to the method\n * @param target attaching target for the component to show\n * ```typescript\n * settings.positionStrategy.position(content, size, document, true);\n * ```\n */\n position(contentElement, size, document, initialCall, target) {\n const targetElement = target || this.settings.target;\n const rects = super.calculateElementRectangles(contentElement, targetElement);\n const connectedFit = {};\n if (initialCall) {\n connectedFit.targetRect = rects.targetRect;\n connectedFit.contentElementRect = rects.elementRect;\n this._initialSettings = this._initialSettings || Object.assign({}, this.settings);\n this.settings = Object.assign({}, this._initialSettings);\n connectedFit.viewPortRect = Util.getViewportRect(document);\n this.updateViewPortFit(connectedFit);\n if (this.shouldFitInViewPort(connectedFit)) {\n this.fitInViewport(contentElement, connectedFit);\n }\n }\n this.setStyle(contentElement, rects.targetRect, rects.elementRect, connectedFit);\n }\n /**\n * Checks if element can fit in viewport and updates provided connectedFit\n * with the result\n *\n * @param connectedFit connectedFit to update\n */\n updateViewPortFit(connectedFit) {\n connectedFit.left = this.calculateLeft(connectedFit.targetRect, connectedFit.contentElementRect, this.settings.horizontalStartPoint, this.settings.horizontalDirection, connectedFit.horizontalOffset ? connectedFit.horizontalOffset : 0);\n connectedFit.right = connectedFit.left + connectedFit.contentElementRect.width;\n connectedFit.fitHorizontal = {\n back: Math.round(connectedFit.left),\n forward: Math.round(connectedFit.viewPortRect.width - connectedFit.right)\n };\n connectedFit.top = this.calculateTop(connectedFit.targetRect, connectedFit.contentElementRect, this.settings.verticalStartPoint, this.settings.verticalDirection, connectedFit.verticalOffset ? connectedFit.verticalOffset : 0);\n connectedFit.bottom = connectedFit.top + connectedFit.contentElementRect.height;\n connectedFit.fitVertical = {\n back: Math.round(connectedFit.top),\n forward: Math.round(connectedFit.viewPortRect.height - connectedFit.bottom)\n };\n }\n /**\n * Calculates the position of the left border of the element if it gets positioned\n * with provided start point and direction\n *\n * @param targetRect Rectangle of the target where element is attached\n * @param elementRect Rectangle of the element\n * @param startPoint Start point of the target\n * @param direction Direction in which to show the element\n */\n calculateLeft(targetRect, elementRect, startPoint, direction, offset) {\n return targetRect.right + targetRect.width * startPoint + elementRect.width * direction + offset;\n }\n /**\n * Calculates the position of the top border of the element if it gets positioned\n * with provided position settings related to the target\n *\n * @param targetRect Rectangle of the target where element is attached\n * @param elementRect Rectangle of the element\n * @param startPoint Start point of the target\n * @param direction Direction in which to show the element\n */\n calculateTop(targetRect, elementRect, startPoint, direction, offset) {\n return targetRect.bottom + targetRect.height * startPoint + elementRect.height * direction + offset;\n }\n /**\n * Returns whether the element should fit in viewport\n *\n * @param connectedFit connectedFit object containing all necessary parameters\n */\n shouldFitInViewPort(connectedFit) {\n return connectedFit.fitHorizontal.back < 0 || connectedFit.fitHorizontal.forward < 0 ||\n connectedFit.fitVertical.back < 0 || connectedFit.fitVertical.forward < 0;\n }\n}\n\n/**\n * Positions the element as in **Connected** positioning strategy and re-positions the element in\n * the view port (calculating a different start point) in case the element is partially getting out of view\n */\nclass AutoPositionStrategy extends BaseFitPositionStrategy {\n /**\n * Fits the element into viewport according to the position settings\n *\n * @param element element to fit in viewport\n * @param connectedFit connectedFit object containing all necessary parameters\n */\n fitInViewport(element, connectedFit) {\n const transformString = [];\n if (connectedFit.fitHorizontal.back < 0 || connectedFit.fitHorizontal.forward < 0) {\n if (this.canFlipHorizontal(connectedFit)) {\n this.flipHorizontal();\n this.flipAnimation(FlipDirection.Horizontal);\n }\n else {\n const horizontalPush = this.horizontalPush(connectedFit);\n transformString.push(`translateX(${horizontalPush}px)`);\n }\n }\n if (connectedFit.fitVertical.back < 0 || connectedFit.fitVertical.forward < 0) {\n if (this.canFlipVertical(connectedFit)) {\n this.flipVertical();\n this.flipAnimation(FlipDirection.Vertical);\n }\n else {\n const verticalPush = this.verticalPush(connectedFit);\n transformString.push(`translateY(${verticalPush}px)`);\n }\n }\n element.style.transform = transformString.join(' ').trim();\n }\n /**\n * Checks if element can be flipped without get off the viewport\n *\n * @param connectedFit connectedFit object containing all necessary parameters\n * @returns true if element can be flipped and stain in viewport\n */\n canFlipHorizontal(connectedFit) {\n // HorizontalAlignment can be Left = -1; Center = -0.5 or Right = 0.\n // To virtually flip direction and start point (both are HorizontalAlignment) we can do this:\n // flippedAlignment = (-1) * (HorizontalAlignment + 1)\n // this way:\n // (-1) * (Left + 1) = 0 = Right\n // (-1) * (Center + 1) = -0.5 = Center\n // (-1) * (Right + 1) = -1 = Left\n const flippedStartPoint = (-1) * (this.settings.horizontalStartPoint + 1);\n const flippedDirection = (-1) * (this.settings.horizontalDirection + 1);\n const leftBorder = this.calculateLeft(connectedFit.targetRect, connectedFit.contentElementRect, flippedStartPoint, flippedDirection, 0);\n const rightBorder = leftBorder + connectedFit.contentElementRect.width;\n return 0 < leftBorder && rightBorder < connectedFit.viewPortRect.width;\n }\n /**\n * Checks if element can be flipped without get off the viewport\n *\n * @param connectedFit connectedFit object containing all necessary parameters\n * @returns true if element can be flipped and stain in viewport\n */\n canFlipVertical(connectedFit) {\n const flippedStartPoint = (-1) * (this.settings.verticalStartPoint + 1);\n const flippedDirection = (-1) * (this.settings.verticalDirection + 1);\n const topBorder = this.calculateTop(connectedFit.targetRect, connectedFit.contentElementRect, flippedStartPoint, flippedDirection, 0);\n const bottomBorder = topBorder + connectedFit.contentElementRect.height;\n return 0 < topBorder && bottomBorder < connectedFit.viewPortRect.height;\n }\n /**\n * Flips direction and start point of the position settings\n */\n flipHorizontal() {\n switch (this.settings.horizontalDirection) {\n case HorizontalAlignment.Left:\n this.settings.horizontalDirection = HorizontalAlignment.Right;\n break;\n case HorizontalAlignment.Right:\n this.settings.horizontalDirection = HorizontalAlignment.Left;\n break;\n }\n switch (this.settings.horizontalStartPoint) {\n case HorizontalAlignment.Left:\n this.settings.horizontalStartPoint = HorizontalAlignment.Right;\n break;\n case HorizontalAlignment.Right:\n this.settings.horizontalStartPoint = HorizontalAlignment.Left;\n break;\n }\n }\n /**\n * Flips direction and start point of the position settings\n */\n flipVertical() {\n switch (this.settings.verticalDirection) {\n case VerticalAlignment.Top:\n this.settings.verticalDirection = VerticalAlignment.Bottom;\n break;\n case VerticalAlignment.Bottom:\n this.settings.verticalDirection = VerticalAlignment.Top;\n break;\n }\n switch (this.settings.verticalStartPoint) {\n case VerticalAlignment.Top:\n this.settings.verticalStartPoint = VerticalAlignment.Bottom;\n break;\n case VerticalAlignment.Bottom:\n this.settings.verticalStartPoint = VerticalAlignment.Top;\n break;\n }\n }\n /**\n * Calculates necessary horizontal push according to provided connectedFit\n *\n * @param connectedFit connectedFit object containing all necessary parameters\n * @returns amount of necessary translation which will push the element into viewport\n */\n horizontalPush(connectedFit) {\n const leftExtend = connectedFit.left;\n const rightExtend = connectedFit.right - connectedFit.viewPortRect.width;\n // if leftExtend < 0 overlay goes beyond left end of the screen. We should push it back with exactly\n // as much as it is beyond the screen.\n // if rightExtend > 0 overlay goes beyond right end of the screen. We should push it back with the\n // extend but with amount not bigger than what left between left border of screen and left border of\n // overlay, e.g. leftExtend\n if (leftExtend < 0) {\n return Math.abs(leftExtend);\n }\n else if (rightExtend > 0) {\n return -Math.min(rightExtend, leftExtend);\n }\n else {\n return 0;\n }\n }\n /**\n * Calculates necessary vertical push according to provided connectedFit\n *\n * @param connectedFit connectedFit object containing all necessary parameters\n * @returns amount of necessary translation which will push the element into viewport\n */\n verticalPush(connectedFit) {\n const topExtend = connectedFit.top;\n const bottomExtend = connectedFit.bottom - connectedFit.viewPortRect.height;\n if (topExtend < 0) {\n return Math.abs(topExtend);\n }\n else if (bottomExtend > 0) {\n return -Math.min(bottomExtend, topExtend);\n }\n else {\n return 0;\n }\n }\n /**\n * Changes open and close animation with reverse animation if one exists\n *\n * @param flipDirection direction for which to change the animations\n */\n flipAnimation(flipDirection) {\n if (this.settings.openAnimation) {\n this.settings.openAnimation = this.updateAnimation(this.settings.openAnimation, flipDirection);\n }\n if (this.settings.closeAnimation) {\n this.settings.closeAnimation = this.updateAnimation(this.settings.closeAnimation, flipDirection);\n }\n }\n /**\n * Tries to find the reverse animation according to provided direction\n *\n * @param animation animation to update\n * @param direction required animation direction\n * @returns reverse animation in given direction if one exists\n */\n updateAnimation(animation, direction) {\n switch (direction) {\n case FlipDirection.Horizontal:\n if (isHorizontalAnimation(animation)) {\n return reverseAnimationResolver(animation);\n }\n break;\n case FlipDirection.Vertical:\n if (isVerticalAnimation(animation)) {\n return reverseAnimationResolver(animation);\n }\n break;\n }\n return animation;\n }\n}\nvar FlipDirection;\n(function (FlipDirection) {\n FlipDirection[FlipDirection[\"Horizontal\"] = 0] = \"Horizontal\";\n FlipDirection[FlipDirection[\"Vertical\"] = 1] = \"Vertical\";\n})(FlipDirection || (FlipDirection = {}));\n\n/**\n * Positions the element based on the directions passed in trough PositionSettings.\n * These are Top/Middle/Bottom for verticalDirection and Left/Center/Right for horizontalDirection\n */\nclass GlobalPositionStrategy {\n constructor(settings) {\n this._defaultSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Middle,\n horizontalStartPoint: HorizontalAlignment.Center,\n verticalStartPoint: VerticalAlignment.Middle,\n openAnimation: fadeIn,\n closeAnimation: fadeOut,\n minSize: { width: 0, height: 0 }\n };\n this.settings = Object.assign({}, this._defaultSettings, settings);\n }\n /**\n * Position the element based on the PositionStrategy implementing this interface.\n *\n * @param contentElement The HTML element to be positioned\n * @param size Size of the element\n * @param document reference to the Document object\n * @param initialCall should be true if this is the initial call to the method\n * @param target attaching target for the component to show\n * ```typescript\n * settings.positionStrategy.position(content, size, document, true);\n * ```\n */\n position(contentElement) {\n contentElement.classList.add('igx-overlay__content--relative');\n contentElement.parentElement.classList.add('igx-overlay__wrapper--flex');\n this.setPosition(contentElement);\n }\n /**\n * Clone the strategy instance.\n * ```typescript\n * settings.positionStrategy.clone();\n * ```\n */\n clone() {\n return Util.cloneInstance(this);\n }\n setPosition(contentElement) {\n switch (this.settings.horizontalDirection) {\n case HorizontalAlignment.Left:\n contentElement.parentElement.style.justifyContent = 'flex-start';\n break;\n case HorizontalAlignment.Center:\n contentElement.parentElement.style.justifyContent = 'center';\n break;\n case HorizontalAlignment.Right:\n contentElement.parentElement.style.justifyContent = 'flex-end';\n break;\n default:\n break;\n }\n switch (this.settings.verticalDirection) {\n case VerticalAlignment.Top:\n contentElement.parentElement.style.alignItems = 'flex-start';\n break;\n case VerticalAlignment.Middle:\n contentElement.parentElement.style.alignItems = 'center';\n break;\n case VerticalAlignment.Bottom:\n contentElement.parentElement.style.alignItems = 'flex-end';\n break;\n default:\n break;\n }\n }\n}\n\n/**\n * Positions the element inside the containing outlet based on the directions passed in trough PositionSettings.\n * These are Top/Middle/Bottom for verticalDirection and Left/Center/Right for horizontalDirection\n */\nclass ContainerPositionStrategy extends GlobalPositionStrategy {\n constructor(settings) {\n super(settings);\n }\n /**\n * Position the element based on the PositionStrategy implementing this interface.\n */\n position(contentElement) {\n contentElement.classList.add('igx-overlay__content--relative');\n contentElement.parentElement.classList.add('igx-overlay__wrapper--flex-container');\n this.setPosition(contentElement);\n }\n}\n\n/**\n * Positions the element as in **Connected** positioning strategy and resize the element\n * to fit in the view port in case the element is partially getting out of view\n */\nclass ElasticPositionStrategy extends BaseFitPositionStrategy {\n /**\n * Fits the element into viewport according to the position settings\n *\n * @param element element to fit in viewport\n * @param connectedFit connectedFit object containing all necessary parameters\n */\n fitInViewport(element, connectedFit) {\n element.classList.add('igx-overlay__content--elastic');\n const transformString = [];\n if (connectedFit.fitHorizontal.back < 0 || connectedFit.fitHorizontal.forward < 0) {\n const maxReduction = Math.max(0, connectedFit.contentElementRect.width - this.settings.minSize.width);\n const leftExtend = Math.max(0, -connectedFit.fitHorizontal.back);\n const rightExtend = Math.max(0, -connectedFit.fitHorizontal.forward);\n const reduction = Math.min(maxReduction, leftExtend + rightExtend);\n element.style.width = `${connectedFit.contentElementRect.width - reduction}px`;\n // if direction is center and element goes off the screen in left direction we should push the\n // element to the right. Prevents left still going out of view when normally positioned\n if (this.settings.horizontalDirection === HorizontalAlignment.Center) {\n // the amount of translation depends on whether element goes off the screen to the left,\n // to the right or in both directions, as well as how much it goes of the screen and finally\n // on the minSize. The translation should be proportional between left and right extend\n // taken from the reduction\n const translation = leftExtend * reduction / (leftExtend + rightExtend);\n if (translation > 0) {\n transformString.push(`translateX(${translation}px)`);\n }\n }\n }\n if (connectedFit.fitVertical.back < 0 || connectedFit.fitVertical.forward < 0) {\n const maxReduction = Math.max(0, connectedFit.contentElementRect.height - this.settings.minSize.height);\n const topExtend = Math.max(0, -connectedFit.fitVertical.back);\n const bottomExtend = Math.max(0, -connectedFit.fitVertical.forward);\n const reduction = Math.min(maxReduction, topExtend + bottomExtend);\n element.style.height = `${connectedFit.contentElementRect.height - reduction}px`;\n // if direction is middle and element goes off the screen in top direction we should push the\n // element to the bottom. Prevents top still going out of view when normally positioned\n if (this.settings.verticalDirection === VerticalAlignment.Middle) {\n // the amount of translation depends on whether element goes off the screen to the top,\n // to the bottom or in both directions, as well as how much it goes of the screen and finally\n // on the minSize. The translation should be proportional between top and bottom extend\n // taken from the reduction\n const translation = topExtend * reduction / (topExtend + bottomExtend);\n if (translation > 0) {\n transformString.push(`translateY(${translation}px)`);\n }\n }\n }\n element.style.transform = transformString.join(' ').trim();\n }\n}\n\nclass ScrollStrategy {\n constructor() { }\n}\n\n/**\n * Empty scroll strategy. Does nothing.\n */\nclass NoOpScrollStrategy extends ScrollStrategy {\n constructor() {\n super();\n }\n /**\n * Initializes the strategy. Should be called once\n */\n initialize() { }\n /**\n * Detaches the strategy\n * ```typescript\n * settings.scrollStrategy.detach();\n * ```\n */\n attach() { }\n /**\n * Detaches the strategy\n * ```typescript\n * settings.scrollStrategy.detach();\n * ```\n */\n detach() { }\n}\n\n/**\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/overlay-main)\n * The overlay service allows users to show components on overlay div above all other elements in the page.\n */\nclass IgxOverlayService {\n constructor(_factoryResolver, _appRef, _injector, builder, document, _zone, platformUtil, animationService) {\n this._factoryResolver = _factoryResolver;\n this._appRef = _appRef;\n this._injector = _injector;\n this.builder = builder;\n this.document = document;\n this._zone = _zone;\n this.platformUtil = platformUtil;\n this.animationService = animationService;\n /**\n * Emitted just before the overlay content starts to open.\n * ```typescript\n * opening(event: OverlayCancelableEventArgs){\n * const opening = event;\n * }\n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Emitted after the overlay content is opened and all animations are finished.\n * ```typescript\n * opened(event: OverlayEventArgs){\n * const opened = event;\n * }\n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Emitted just before the overlay content starts to close.\n * ```typescript\n * closing(event: OverlayCancelableEventArgs){\n * const closing = event;\n * }\n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Emitted after the overlay content is closed and all animations are finished.\n * ```typescript\n * closed(event: OverlayEventArgs){\n * const closed = event;\n * }\n * ```\n */\n this.closed = new EventEmitter();\n /**\n * Emitted before the content is appended to the overlay.\n * ```typescript\n * contentAppending(event: OverlayEventArgs){\n * const contentAppending = event;\n * }\n * ```\n */\n this.contentAppending = new EventEmitter();\n /**\n * Emitted after the content is appended to the overlay, and before animations are started.\n * ```typescript\n * contentAppended(event: OverlayEventArgs){\n * const contentAppended = event;\n * }\n * ```\n */\n this.contentAppended = new EventEmitter();\n /**\n * Emitted just before the overlay animation start.\n * ```typescript\n * animationStarting(event: OverlayAnimationEventArgs){\n * const animationStarting = event;\n * }\n * ```\n */\n this.animationStarting = new EventEmitter();\n this._componentId = 0;\n this._overlayInfos = [];\n this.destroy$ = new Subject();\n this._cursorStyleIsSet = false;\n this._defaultSettings = {\n excludeFromOutsideClick: [],\n positionStrategy: new GlobalPositionStrategy(),\n scrollStrategy: new NoOpScrollStrategy(),\n modal: true,\n closeOnOutsideClick: true,\n closeOnEscape: false\n };\n /** @hidden */\n this.repositionAll = () => {\n for (let i = this._overlayInfos.length; i--;) {\n this.reposition(this._overlayInfos[i].id);\n }\n };\n this.documentClicked = (ev) => {\n // if we get to modal overlay just return - we should not close anything under it\n // if we get to non-modal overlay do the next:\n // 1. Check it has close on outside click. If not go on to next overlay;\n // 2. If true check if click is on the element. If it is on the element we have closed\n // already all previous non-modal with close on outside click elements, so we return. If\n // not close the overlay and check next\n for (let i = this._overlayInfos.length; i--;) {\n const info = this._overlayInfos[i];\n if (info.settings.modal) {\n return;\n }\n if (info.settings.closeOnOutsideClick) {\n const target = ev.composed ? ev.composedPath()[0] : ev.target;\n const overlayElement = info.elementRef.nativeElement;\n // check if the click is on the overlay element or on an element from the exclusion list, and if so do not close the overlay\n const excludeElements = info.settings.excludeFromOutsideClick ?\n [...info.settings.excludeFromOutsideClick, overlayElement] : [overlayElement];\n const isInsideClick = excludeElements.some(e => e.contains(target));\n if (isInsideClick) {\n return;\n // if the click is outside click, but close animation has started do nothing\n }\n else if (!(info.closeAnimationPlayer?.hasStarted())) {\n this._hide(info.id, ev);\n }\n }\n }\n };\n this._document = this.document;\n }\n /**\n * Creates overlay settings with global or container position strategy and preset position settings\n *\n * @param position Preset position settings. Default position is 'center'\n * @param outlet The outlet container to attach the overlay to\n * @returns Non-modal overlay settings based on Global or Container position strategy and the provided position.\n */\n static createAbsoluteOverlaySettings(position, outlet) {\n const positionSettings = this.createAbsolutePositionSettings(position);\n const strategy = outlet ? new ContainerPositionStrategy(positionSettings) : new GlobalPositionStrategy(positionSettings);\n const overlaySettings = {\n positionStrategy: strategy,\n scrollStrategy: new NoOpScrollStrategy(),\n modal: false,\n closeOnOutsideClick: true,\n outlet\n };\n return overlaySettings;\n }\n /**\n * Creates overlay settings with auto, connected or elastic position strategy and preset position settings\n *\n * @param target Attaching target for the component to show\n * @param strategy The relative position strategy to be applied to the overlay settings. Default is Auto positioning strategy.\n * @param position Preset position settings. By default the element is positioned below the target, left aligned.\n * @returns Non-modal overlay settings based on the provided target, strategy and position.\n */\n static createRelativeOverlaySettings(target, position, strategy) {\n const positionSettings = this.createRelativePositionSettings(position);\n const overlaySettings = {\n target,\n positionStrategy: this.createPositionStrategy(strategy, positionSettings),\n scrollStrategy: new NoOpScrollStrategy(),\n modal: false,\n closeOnOutsideClick: true\n };\n return overlaySettings;\n }\n static createAbsolutePositionSettings(position) {\n let positionSettings;\n switch (position) {\n case AbsolutePosition.Bottom:\n positionSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Bottom,\n openAnimation: slideInBottom,\n closeAnimation: slideOutBottom\n };\n break;\n case AbsolutePosition.Top:\n positionSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Top,\n openAnimation: slideInTop,\n closeAnimation: slideOutTop\n };\n break;\n case AbsolutePosition.Center:\n default:\n positionSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Middle,\n openAnimation: fadeIn,\n closeAnimation: fadeOut\n };\n }\n return positionSettings;\n }\n static createRelativePositionSettings(position) {\n let positionSettings;\n switch (position) {\n case RelativePosition.Above:\n positionSettings = {\n horizontalStartPoint: HorizontalAlignment.Center,\n verticalStartPoint: VerticalAlignment.Top,\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Top,\n openAnimation: scaleInVerBottom,\n closeAnimation: scaleOutVerBottom,\n };\n break;\n case RelativePosition.Below:\n positionSettings = {\n horizontalStartPoint: HorizontalAlignment.Center,\n verticalStartPoint: VerticalAlignment.Bottom,\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Bottom,\n openAnimation: scaleInVerTop,\n closeAnimation: scaleOutVerTop\n };\n break;\n case RelativePosition.After:\n positionSettings = {\n horizontalStartPoint: HorizontalAlignment.Right,\n verticalStartPoint: VerticalAlignment.Middle,\n horizontalDirection: HorizontalAlignment.Right,\n verticalDirection: VerticalAlignment.Middle,\n openAnimation: scaleInHorLeft,\n closeAnimation: scaleOutHorLeft\n };\n break;\n case RelativePosition.Before:\n positionSettings = {\n horizontalStartPoint: HorizontalAlignment.Left,\n verticalStartPoint: VerticalAlignment.Middle,\n horizontalDirection: HorizontalAlignment.Left,\n verticalDirection: VerticalAlignment.Middle,\n openAnimation: scaleInHorRight,\n closeAnimation: scaleOutHorRight\n };\n break;\n case RelativePosition.Default:\n default:\n positionSettings = {\n horizontalStartPoint: HorizontalAlignment.Left,\n verticalStartPoint: VerticalAlignment.Bottom,\n horizontalDirection: HorizontalAlignment.Right,\n verticalDirection: VerticalAlignment.Bottom,\n openAnimation: scaleInVerTop,\n closeAnimation: scaleOutVerTop,\n };\n break;\n }\n return positionSettings;\n }\n static createPositionStrategy(strategy, positionSettings) {\n switch (strategy) {\n case RelativePositionStrategy.Connected:\n return new ConnectedPositioningStrategy(positionSettings);\n case RelativePositionStrategy.Elastic:\n return new ElasticPositionStrategy(positionSettings);\n case RelativePositionStrategy.Auto:\n default:\n return new AutoPositionStrategy(positionSettings);\n }\n }\n attach(componentOrElement, viewContainerRefOrSettings, moduleRefOrSettings) {\n const info = this.getOverlayInfo(componentOrElement, this.getUserViewContainerOrModuleRef(viewContainerRefOrSettings, moduleRefOrSettings));\n if (!info) {\n console.warn('Overlay was not able to attach provided component!');\n return null;\n }\n info.id = (this._componentId++).toString();\n info.visible = false;\n const settings = Object.assign({}, this._defaultSettings, this.getUserOverlaySettings(viewContainerRefOrSettings, moduleRefOrSettings));\n // Emit the contentAppending event before appending the content\n const eventArgs = { id: info.id, elementRef: info.elementRef, componentRef: info.componentRef, settings };\n this.contentAppending.emit(eventArgs);\n // Append the content to the overlay\n info.settings = eventArgs.settings;\n this._overlayInfos.push(info);\n info.hook = this.placeElementHook(info.elementRef.nativeElement);\n const elementRect = info.elementRef.nativeElement.getBoundingClientRect();\n info.initialSize = { width: elementRect.width, height: elementRect.height };\n this.moveElementToOverlay(info);\n this.contentAppended.emit({ id: info.id, componentRef: info.componentRef });\n info.settings.scrollStrategy.initialize(this._document, this, info.id);\n info.settings.scrollStrategy.attach();\n this.addOutsideClickListener(info);\n this.addResizeHandler();\n this.addCloseOnEscapeListener(info);\n this.buildAnimationPlayers(info);\n return info.id;\n }\n /**\n * Remove overlay with the provided id.\n *\n * @param id Id of the overlay to remove\n * ```typescript\n * this.overlay.detach(id);\n * ```\n */\n detach(id) {\n const info = this.getOverlayById(id);\n if (!info) {\n console.warn('igxOverlay.detach was called with wrong id: ', id);\n return;\n }\n info.detached = true;\n this.finishAnimations(info);\n info.settings.scrollStrategy.detach();\n this.removeOutsideClickListener(info);\n this.removeResizeHandler();\n this.cleanUp(info);\n }\n /**\n * Remove all the overlays.\n * ```typescript\n * this.overlay.detachAll();\n * ```\n */\n detachAll() {\n for (let i = this._overlayInfos.length; i--;) {\n this.detach(this._overlayInfos[i].id);\n }\n }\n /**\n * Shows the overlay for provided id.\n *\n * @param id Id to show overlay for\n * @param settings Display settings for the overlay, such as positioning and scroll/close behavior.\n */\n show(id, settings) {\n const info = this.getOverlayById(id);\n if (!info) {\n console.warn('igxOverlay.show was called with wrong id: ', id);\n return;\n }\n const eventArgs = { id, componentRef: info.componentRef, cancel: false };\n this.opening.emit(eventArgs);\n if (eventArgs.cancel) {\n return;\n }\n if (settings) {\n // TODO: update attach\n }\n this.updateSize(info);\n info.settings.positionStrategy.position(info.elementRef.nativeElement.parentElement, { width: info.initialSize.width, height: info.initialSize.height }, document, true, info.settings.target);\n this.addModalClasses(info);\n if (info.settings.positionStrategy.settings.openAnimation) {\n // TODO: should we build players again. This was already done in attach!!!\n // this.buildAnimationPlayers(info);\n this.playOpenAnimation(info);\n }\n else {\n // to eliminate flickering show the element just before opened fires\n info.wrapperElement.style.visibility = '';\n info.visible = true;\n this.opened.emit({ id: info.id, componentRef: info.componentRef });\n }\n }\n /**\n * Hides the component with the ID provided as a parameter.\n * ```typescript\n * this.overlay.hide(id);\n * ```\n */\n hide(id, event) {\n this._hide(id, event);\n }\n /**\n * Hides all the components and the overlay.\n * ```typescript\n * this.overlay.hideAll();\n * ```\n */\n hideAll() {\n for (let i = this._overlayInfos.length; i--;) {\n this.hide(this._overlayInfos[i].id);\n }\n }\n /**\n * Repositions the component with ID provided as a parameter.\n *\n * @param id Id to reposition overlay for\n * ```typescript\n * this.overlay.reposition(id);\n * ```\n */\n reposition(id) {\n const overlayInfo = this.getOverlayById(id);\n if (!overlayInfo || !overlayInfo.settings) {\n console.error('Wrong id provided in overlay.reposition method. Id: ' + id);\n return;\n }\n if (!overlayInfo.visible) {\n return;\n }\n const contentElement = overlayInfo.elementRef.nativeElement.parentElement;\n const contentElementRect = contentElement.getBoundingClientRect();\n overlayInfo.settings.positionStrategy.position(contentElement, {\n width: contentElementRect.width,\n height: contentElementRect.height\n }, this._document, false, overlayInfo.settings.target);\n }\n /**\n * Offsets the content along the corresponding axis by the provided amount\n *\n * @param id Id to offset overlay for\n * @param deltaX Amount of offset in horizontal direction\n * @param deltaY Amount of offset in vertical direction\n * ```typescript\n * this.overlay.setOffset(id, deltaX, deltaY);\n * ```\n */\n setOffset(id, deltaX, deltaY) {\n const info = this.getOverlayById(id);\n if (!info) {\n return;\n }\n info.transformX += deltaX;\n info.transformY += deltaY;\n const transformX = info.transformX;\n const transformY = info.transformY;\n const translate = `translate(${transformX}px, ${transformY}px)`;\n info.elementRef.nativeElement.parentElement.style.transform = translate;\n }\n /** @hidden */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /** @hidden @internal */\n getOverlayById(id) {\n if (!id) {\n return null;\n }\n const info = this._overlayInfos.find(e => e.id === id);\n return info;\n }\n _hide(id, event) {\n const info = this.getOverlayById(id);\n if (!info) {\n console.warn('igxOverlay.hide was called with wrong id: ', id);\n return;\n }\n const eventArgs = { id, componentRef: info.componentRef, cancel: false, event };\n this.closing.emit(eventArgs);\n if (eventArgs.cancel) {\n return;\n }\n this.removeModalClasses(info);\n if (info.settings.positionStrategy.settings.closeAnimation) {\n this.playCloseAnimation(info, event);\n }\n else {\n this.closeDone(info);\n }\n }\n getUserOverlaySettings(viewContainerRefOrSettings, moduleRefOrSettings) {\n let result;\n if (viewContainerRefOrSettings && !(viewContainerRefOrSettings instanceof ViewContainerRef)) {\n result = viewContainerRefOrSettings;\n return result;\n }\n if (moduleRefOrSettings && !('injector' in moduleRefOrSettings && 'componentFactoryResolver' in moduleRefOrSettings)) {\n result = moduleRefOrSettings;\n }\n return result;\n }\n getUserViewContainerOrModuleRef(viewContainerRefOrSettings, moduleRefOrSettings) {\n let result;\n if (viewContainerRefOrSettings instanceof ViewContainerRef) {\n result = viewContainerRefOrSettings;\n }\n if (moduleRefOrSettings && 'injector' in moduleRefOrSettings && 'componentFactoryResolver' in moduleRefOrSettings) {\n result = moduleRefOrSettings;\n }\n return result;\n }\n getOverlayInfo(component, viewContainerRef) {\n const info = { ngZone: this._zone, transformX: 0, transformY: 0 };\n if (component instanceof ElementRef) {\n info.elementRef = component;\n }\n else {\n let dynamicComponent;\n if (viewContainerRef instanceof ViewContainerRef) {\n dynamicComponent = viewContainerRef.createComponent(component);\n }\n else {\n let dynamicFactory;\n const factoryResolver = viewContainerRef ? viewContainerRef.componentFactoryResolver : this._factoryResolver;\n try {\n dynamicFactory = factoryResolver.resolveComponentFactory(component);\n }\n catch (error) {\n console.error(error);\n return null;\n }\n const injector = viewContainerRef ? viewContainerRef.injector : this._injector;\n dynamicComponent = dynamicFactory.create(injector);\n this._appRef.attachView(dynamicComponent.hostView);\n }\n if (dynamicComponent.onDestroy) {\n dynamicComponent.onDestroy(() => {\n if (!info.detached && this._overlayInfos.indexOf(info) !== -1) {\n this.detach(info.id);\n }\n });\n }\n // If the element is newly created from a Component, it is wrapped in 'ng-component' tag - we do not want that.\n const element = dynamicComponent.location.nativeElement;\n info.elementRef = { nativeElement: element };\n info.componentRef = dynamicComponent;\n }\n return info;\n }\n placeElementHook(element) {\n if (!element.parentElement) {\n return null;\n }\n const hook = this._document.createElement('div');\n hook.style.display = 'none';\n element.parentElement.insertBefore(hook, element);\n return hook;\n }\n moveElementToOverlay(info) {\n info.wrapperElement = this.getWrapperElement();\n const contentElement = this.getContentElement(info.wrapperElement, info.settings.modal);\n this.getOverlayElement(info).appendChild(info.wrapperElement);\n contentElement.appendChild(info.elementRef.nativeElement);\n }\n getWrapperElement() {\n const wrapper = this._document.createElement('div');\n wrapper.classList.add('igx-overlay__wrapper');\n return wrapper;\n }\n getContentElement(wrapperElement, modal) {\n const content = this._document.createElement('div');\n if (modal) {\n content.classList.add('igx-overlay__content--modal');\n content.addEventListener('click', (ev) => {\n ev.stopPropagation();\n });\n }\n else {\n content.classList.add('igx-overlay__content');\n }\n content.addEventListener('scroll', (ev) => {\n ev.stopPropagation();\n });\n // hide element to eliminate flickering. Show the element exactly before animation starts\n wrapperElement.style.visibility = 'hidden';\n wrapperElement.appendChild(content);\n return content;\n }\n getOverlayElement(info) {\n if (info.settings.outlet) {\n return info.settings.outlet.nativeElement || info.settings.outlet;\n }\n if (!this._overlayElement) {\n this._overlayElement = this._document.createElement('div');\n this._overlayElement.classList.add('igx-overlay');\n this._document.body.appendChild(this._overlayElement);\n }\n return this._overlayElement;\n }\n updateSize(info) {\n if (info.componentRef) {\n // if we are positioning component this is first time it gets visible\n // and we can finally get its size\n info.componentRef.changeDetectorRef.detectChanges();\n info.initialSize = info.elementRef.nativeElement.getBoundingClientRect();\n }\n // set content div width only if element to show has width\n if (info.initialSize.width !== 0) {\n info.elementRef.nativeElement.parentElement.style.width = info.initialSize.width + 'px';\n }\n }\n closeDone(info) {\n info.visible = false;\n if (info.wrapperElement) {\n // to eliminate flickering show the element just before animation start\n info.wrapperElement.style.visibility = 'hidden';\n }\n if (!info.closeAnimationDetaching) {\n this.closed.emit({ id: info.id, componentRef: info.componentRef, event: info.event });\n }\n delete info.event;\n }\n cleanUp(info) {\n const child = info.elementRef.nativeElement;\n const outlet = this.getOverlayElement(info);\n // if same element is shown in other overlay outlet will not contain\n // the element and we should not remove it form outlet\n if (outlet.contains(child)) {\n outlet.removeChild(child.parentNode.parentNode);\n }\n if (info.componentRef) {\n this._appRef.detachView(info.componentRef.hostView);\n info.componentRef.destroy();\n delete info.componentRef;\n }\n if (info.hook) {\n info.hook.parentElement.insertBefore(info.elementRef.nativeElement, info.hook);\n info.hook.parentElement.removeChild(info.hook);\n delete info.hook;\n }\n const index = this._overlayInfos.indexOf(info);\n this._overlayInfos.splice(index, 1);\n // this._overlayElement.parentElement check just for tests that manually delete the element\n if (this._overlayInfos.length === 0) {\n if (this._overlayElement && this._overlayElement.parentElement) {\n this._overlayElement.parentElement.removeChild(this._overlayElement);\n this._overlayElement = null;\n }\n this.removeCloseOnEscapeListener();\n }\n // clean all the resources attached to info\n delete info.elementRef;\n delete info.settings;\n delete info.initialSize;\n info.openAnimationDetaching = true;\n info.openAnimationPlayer?.destroy();\n delete info.openAnimationPlayer;\n info.closeAnimationDetaching = true;\n info.closeAnimationPlayer?.destroy();\n delete info.closeAnimationPlayer;\n delete info.ngZone;\n delete info.wrapperElement;\n info = null;\n }\n playOpenAnimation(info) {\n // if there is opening animation already started do nothing\n if (info.openAnimationPlayer?.hasStarted()) {\n return;\n }\n if (info.closeAnimationPlayer?.hasStarted()) {\n const position = info.closeAnimationPlayer.position;\n info.closeAnimationPlayer.reset();\n info.openAnimationPlayer.init();\n info.openAnimationPlayer.position = 1 - position;\n }\n this.animationStarting.emit({ id: info.id, animationPlayer: info.openAnimationPlayer, animationType: 'open' });\n // to eliminate flickering show the element just before animation start\n info.wrapperElement.style.visibility = '';\n info.visible = true;\n info.openAnimationPlayer.play();\n }\n playCloseAnimation(info, event) {\n // if there is closing animation already started do nothing\n if (info.closeAnimationPlayer?.hasStarted()) {\n return;\n }\n if (info.openAnimationPlayer?.hasStarted()) {\n const position = info.openAnimationPlayer.position;\n info.openAnimationPlayer.reset();\n info.closeAnimationPlayer.init();\n info.closeAnimationPlayer.position = 1 - position;\n }\n this.animationStarting.emit({ id: info.id, animationPlayer: info.closeAnimationPlayer, animationType: 'close' });\n info.event = event;\n info.closeAnimationPlayer.play();\n }\n // TODO: check if applyAnimationParams will work with complex animations\n applyAnimationParams(wrapperElement, animationOptions) {\n if (!animationOptions) {\n wrapperElement.style.transitionDuration = '0ms';\n return;\n }\n if (!animationOptions.options || !animationOptions.options.params) {\n return;\n }\n const params = animationOptions.options.params;\n if (params.duration) {\n wrapperElement.style.transitionDuration = params.duration;\n }\n if (params.easing) {\n wrapperElement.style.transitionTimingFunction = params.easing;\n }\n }\n addOutsideClickListener(info) {\n if (info.settings.closeOnOutsideClick) {\n if (info.settings.modal) {\n fromEvent(info.elementRef.nativeElement.parentElement.parentElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe((e) => this._hide(info.id, e));\n }\n else if (\n // if all overlays minus closing overlays equals one add the handler\n this._overlayInfos.filter(x => x.settings.closeOnOutsideClick && !x.settings.modal).length -\n this._overlayInfos.filter(x => x.settings.closeOnOutsideClick && !x.settings.modal &&\n x.closeAnimationPlayer?.hasStarted()).length === 1) {\n // click event is not fired on iOS. To make element \"clickable\" we are\n // setting the cursor to pointer\n if (this.platformUtil.isIOS && !this._cursorStyleIsSet) {\n this._cursorOriginalValue = this._document.body.style.cursor;\n this._document.body.style.cursor = 'pointer';\n this._cursorStyleIsSet = true;\n }\n this._document.addEventListener('click', this.documentClicked, true);\n }\n }\n }\n removeOutsideClickListener(info) {\n if (info.settings.modal === false) {\n let shouldRemoveClickEventListener = true;\n this._overlayInfos.forEach(o => {\n if (o.settings.modal === false && o.id !== info.id) {\n shouldRemoveClickEventListener = false;\n }\n });\n if (shouldRemoveClickEventListener) {\n if (this._cursorStyleIsSet) {\n this._document.body.style.cursor = this._cursorOriginalValue;\n this._cursorOriginalValue = '';\n this._cursorStyleIsSet = false;\n }\n this._document.removeEventListener('click', this.documentClicked, true);\n }\n }\n }\n addResizeHandler() {\n const closingOverlaysCount = this._overlayInfos\n .filter(o => o.closeAnimationPlayer?.hasStarted())\n .length;\n if (this._overlayInfos.length - closingOverlaysCount === 1) {\n this._document.defaultView.addEventListener('resize', this.repositionAll);\n }\n }\n removeResizeHandler() {\n const closingOverlaysCount = this._overlayInfos\n .filter(o => o.closeAnimationPlayer?.hasStarted())\n .length;\n if (this._overlayInfos.length - closingOverlaysCount === 1) {\n this._document.defaultView.removeEventListener('resize', this.repositionAll);\n }\n }\n addCloseOnEscapeListener(info) {\n if (info.settings.closeOnEscape && !this._keyPressEventListener) {\n this._keyPressEventListener = fromEvent(this._document, 'keydown').pipe(filter((ev) => ev.key === 'Escape' || ev.key === 'Esc')).subscribe((ev) => {\n const visibleOverlays = this._overlayInfos.filter(o => o.visible);\n if (visibleOverlays.length < 1) {\n return;\n }\n const targetOverlayInfo = visibleOverlays[visibleOverlays.length - 1];\n if (targetOverlayInfo.visible && targetOverlayInfo.settings.closeOnEscape) {\n this.hide(targetOverlayInfo.id, ev);\n }\n });\n }\n }\n removeCloseOnEscapeListener() {\n if (this._keyPressEventListener) {\n this._keyPressEventListener.unsubscribe();\n this._keyPressEventListener = null;\n }\n }\n addModalClasses(info) {\n if (info.settings.modal) {\n const wrapperElement = info.elementRef.nativeElement.parentElement.parentElement;\n wrapperElement.classList.remove('igx-overlay__wrapper');\n this.applyAnimationParams(wrapperElement, info.settings.positionStrategy.settings.openAnimation);\n requestAnimationFrame(() => {\n wrapperElement.classList.add('igx-overlay__wrapper--modal');\n });\n }\n }\n removeModalClasses(info) {\n if (info.settings.modal) {\n const wrapperElement = info.elementRef.nativeElement.parentElement.parentElement;\n this.applyAnimationParams(wrapperElement, info.settings.positionStrategy.settings.closeAnimation);\n wrapperElement.classList.remove('igx-overlay__wrapper--modal');\n wrapperElement.classList.add('igx-overlay__wrapper');\n }\n }\n buildAnimationPlayers(info) {\n if (info.settings.positionStrategy.settings.openAnimation) {\n info.openAnimationPlayer = this.animationService\n .buildAnimation(info.settings.positionStrategy.settings.openAnimation, info.elementRef.nativeElement);\n info.openAnimationPlayer.animationEnd\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.openAnimationDone(info));\n }\n if (info.settings.positionStrategy.settings.closeAnimation) {\n info.closeAnimationPlayer = this.animationService\n .buildAnimation(info.settings.positionStrategy.settings.closeAnimation, info.elementRef.nativeElement);\n info.closeAnimationPlayer.animationEnd\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.closeAnimationDone(info));\n }\n }\n openAnimationDone(info) {\n if (!info.openAnimationDetaching) {\n this.opened.emit({ id: info.id, componentRef: info.componentRef });\n }\n if (info.openAnimationPlayer) {\n info.openAnimationPlayer.reset();\n }\n if (info.closeAnimationPlayer?.hasStarted()) {\n info.closeAnimationPlayer.reset();\n }\n }\n closeAnimationDone(info) {\n if (info.closeAnimationPlayer) {\n info.closeAnimationPlayer.reset();\n }\n if (info.openAnimationPlayer?.hasStarted()) {\n info.openAnimationPlayer.reset();\n }\n this.closeDone(info);\n }\n finishAnimations(info) {\n // // TODO: should we emit here opened or closed events\n if (info.openAnimationPlayer?.hasStarted()) {\n info.openAnimationPlayer.finish();\n }\n if (info.closeAnimationPlayer?.hasStarted()) {\n info.closeAnimationPlayer.finish();\n }\n }\n}\nIgxOverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxOverlayService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1.AnimationBuilder }, { token: DOCUMENT }, { token: i0.NgZone }, { token: PlatformUtil }, { token: IgxAngularAnimationService }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxOverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxOverlayService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxOverlayService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1.AnimationBuilder }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }]; } });\n\n// Export position strategies\n\n/**\n * On scroll reposition the overlay content.\n */\nclass AbsoluteScrollStrategy extends ScrollStrategy {\n constructor(scrollContainer) {\n super();\n this._initialized = false;\n this.onScroll = (e) => {\n const overlayInfo = this._overlayService.getOverlayById(this._id);\n if (!overlayInfo) {\n return;\n }\n if (!overlayInfo.elementRef.nativeElement.contains(e.target)) {\n this._overlayService.reposition(this._id);\n }\n };\n this._scrollContainer = scrollContainer;\n }\n /**\n * Initializes the strategy. Should be called once\n *\n * @param document reference to Document object.\n * @param overlayService IgxOverlay service to use in this strategy.\n * @param id Unique id for this strategy.\n * ```typescript\n * settings.scrollStrategy.initialize(document, overlay, id);\n * ```\n */\n initialize(document, overlayService, id) {\n if (this._initialized) {\n return;\n }\n this._overlayService = overlayService;\n this._id = id;\n this._document = document;\n this._zone = overlayService.getOverlayById(id).ngZone;\n this._initialized = true;\n }\n /**\n * Attaches the strategy\n * ```typescript\n * settings.scrollStrategy.attach();\n * ```\n */\n attach() {\n if (this._zone) {\n this._zone.runOutsideAngular(() => {\n this.addScrollEventListener();\n });\n }\n else {\n this.addScrollEventListener();\n }\n }\n /**\n * Detaches the strategy\n * ```typescript\n * settings.scrollStrategy.detach();\n * ```\n */\n detach() {\n if (this._scrollContainer) {\n this._scrollContainer.removeEventListener('scroll', this.onScroll, true);\n }\n else {\n // Tired of this thing throwing every other time. Fix it ffs!\n this._document?.removeEventListener('scroll', this.onScroll, true);\n }\n this._initialized = false;\n }\n addScrollEventListener() {\n if (this._scrollContainer) {\n this._scrollContainer.addEventListener('scroll', this.onScroll, true);\n }\n else {\n this._document.addEventListener('scroll', this.onScroll, true);\n }\n }\n}\n\n/**\n * Prevents scrolling while the overlay content is shown.\n */\nclass BlockScrollStrategy extends ScrollStrategy {\n constructor() {\n super();\n this._initialized = false;\n this.onScroll = (ev) => {\n ev.preventDefault();\n if (!this._sourceElement || this._sourceElement !== ev.target) {\n this._sourceElement = ev.target;\n this._initialScrollTop = this._sourceElement.scrollTop;\n this._initialScrollLeft = this._sourceElement.scrollLeft;\n }\n this._sourceElement.scrollTop = this._initialScrollTop;\n this._sourceElement.scrollLeft = this._initialScrollLeft;\n };\n }\n /**\n * Initializes the strategy. Should be called once\n *\n */\n initialize(document) {\n if (this._initialized) {\n return;\n }\n this._document = document;\n this._initialized = true;\n }\n /**\n * Attaches the strategy\n * ```typescript\n * settings.scrollStrategy.attach();\n * ```\n */\n attach() {\n this._document.addEventListener('scroll', this.onScroll, true);\n }\n /**\n * Detaches the strategy\n * ```typescript\n * settings.scrollStrategy.detach();\n * ```\n */\n detach() {\n this._document.removeEventListener('scroll', this.onScroll, true);\n this._sourceElement = null;\n this._initialScrollTop = 0;\n this._initialScrollLeft = 0;\n this._initialized = false;\n }\n}\n\n/**\n * Uses a tolerance and closes the shown component upon scrolling if the tolerance is exceeded\n */\nclass CloseScrollStrategy extends ScrollStrategy {\n constructor(scrollContainer) {\n super();\n this._initialized = false;\n this.onScroll = (ev) => {\n if (!this._sourceElement) {\n this._sourceElement = ev.target;\n this.initialScrollTop = this._sourceElement.scrollTop;\n this.initialScrollLeft = this._sourceElement.scrollLeft;\n }\n if (this._overlayInfo.elementRef.nativeElement.contains(this._sourceElement)) {\n return;\n }\n if (Math.abs(this._sourceElement.scrollTop - this.initialScrollTop) > this._threshold ||\n Math.abs(this._sourceElement.scrollLeft - this.initialScrollLeft) > this._threshold) {\n this._overlayService.hide(this._id);\n }\n };\n this._scrollContainer = scrollContainer;\n this._threshold = 10;\n }\n /**\n * Initializes the strategy. Should be called once\n *\n * @param document reference to Document object.\n * @param overlayService IgxOverlay service to use in this strategy.\n * @param id Unique id for this strategy.\n * ```typescript\n * settings.scrollStrategy.initialize(document, overlay, id);\n * ```\n */\n initialize(document, overlayService, id) {\n if (this._initialized) {\n return;\n }\n this._overlayService = overlayService;\n this._id = id;\n this._document = document;\n this._initialized = true;\n this._overlayInfo = overlayService.getOverlayById(id);\n }\n /**\n * Attaches the strategy\n * ```typescript\n * settings.scrollStrategy.attach();\n * ```\n */\n attach() {\n if (this._scrollContainer) {\n this._scrollContainer.addEventListener('scroll', this.onScroll);\n this._sourceElement = this._scrollContainer;\n }\n else {\n this._document.addEventListener('scroll', this.onScroll, true);\n }\n }\n /**\n * Detaches the strategy\n * ```typescript\n * settings.scrollStrategy.detach();\n * ```\n */\n detach() {\n // TODO: check why event listener removes only on first call and remains on each next!!!\n if (this._scrollContainer) {\n this._scrollContainer.removeEventListener('scroll', this.onScroll);\n }\n else {\n this._document.removeEventListener('scroll', this.onScroll, true);\n }\n this._sourceElement = null;\n this._initialized = false;\n }\n}\n\n// Export scroll strategies\n\nclass IgxBaseTransactionService {\n constructor() {\n /**\n * Event fired when transaction state has changed - add transaction, commit all transactions, undo and redo\n */\n this.onStateUpdate = new EventEmitter();\n this._isPending = false;\n this._pendingTransactions = [];\n this._pendingStates = new Map();\n this._cloneStrategy = new DefaultDataCloneStrategy();\n }\n /**\n * Gets/Sets the data clone strategy used to clone data\n */\n get cloneStrategy() {\n return this._cloneStrategy;\n }\n set cloneStrategy(strategy) {\n if (strategy) {\n this._cloneStrategy = strategy;\n }\n }\n /**\n * @returns if there are any transactions in the Redo stack\n */\n get canRedo() {\n return false;\n }\n /**\n * @returns if there are any transactions in the Undo stack\n */\n get canUndo() {\n return false;\n }\n /**\n * Returns whether transaction is enabled for this service\n */\n get enabled() {\n return this._isPending;\n }\n /**\n * Adds provided transaction with recordRef if any\n *\n * @param transaction Transaction to be added\n * @param recordRef Reference to the value of the record in the data source related to the changed item\n */\n add(transaction, recordRef) {\n if (this._isPending) {\n this.updateState(this._pendingStates, transaction, recordRef);\n this._pendingTransactions.push(transaction);\n }\n }\n /**\n * Returns all recorded transactions in chronological order\n *\n * @param id Optional record id to get transactions for\n * @returns All transaction in the service or for the specified record\n */\n getTransactionLog(_id) {\n return [];\n }\n /**\n * Remove the last transaction if any\n */\n undo() { }\n /**\n * Applies the last undone transaction if any\n */\n redo() { }\n /**\n * Returns aggregated changes from all transactions\n *\n * @param mergeChanges If set to true will merge each state's value over relate recordRef\n * and will record resulting value in the related transaction\n * @returns Collection of aggregated transactions for each changed record\n */\n getAggregatedChanges(mergeChanges) {\n const result = [];\n this._pendingStates.forEach((state, key) => {\n const value = mergeChanges ? this.getAggregatedValue(key, mergeChanges) : state.value;\n result.push({ id: key, newValue: value, type: state.type });\n });\n return result;\n }\n /**\n * Returns the state of the record with provided id\n *\n * @param id The id of the record\n * @param pending Should get pending state\n * @returns State of the record if any\n */\n getState(id) {\n return this._pendingStates.get(id);\n }\n /**\n * Returns value of the required id including all uncommitted changes\n *\n * @param id The id of the record to return value for\n * @param mergeChanges If set to true will merge state's value over relate recordRef\n * and will return merged value\n * @returns Value with changes or **null**\n */\n getAggregatedValue(id, mergeChanges) {\n const state = this._pendingStates.get(id);\n if (!state) {\n return null;\n }\n if (mergeChanges && state.recordRef) {\n return this.updateValue(state);\n }\n return state.value;\n }\n /**\n * Applies all transactions over the provided data\n *\n * @param data Data source to update\n * @param id Optional record id to commit transactions for\n */\n commit(_data, _id) { }\n /**\n * Clears all transactions\n *\n * @param id Optional record id to clear transactions for\n */\n clear(_id) {\n this._pendingStates.clear();\n this._pendingTransactions = [];\n }\n /**\n * Starts pending transactions. All transactions passed after call to startPending\n * will not be added to transaction log\n */\n startPending() {\n this._isPending = true;\n }\n /**\n * Clears all pending transactions and aggregated pending state. If commit is set to true\n * commits pending states as single transaction\n *\n * @param commit Should commit the pending states\n */\n endPending(_commit) {\n this._isPending = false;\n this._pendingStates.clear();\n this._pendingTransactions = [];\n }\n /**\n * Updates the provided states collection according to passed transaction and recordRef\n *\n * @param states States collection to apply the update to\n * @param transaction Transaction to apply to the current state\n * @param recordRef Reference to the value of the record in data source, if any, where transaction should be applied\n */\n updateState(states, transaction, recordRef) {\n let state = states.get(transaction.id);\n if (state) {\n if (isObject(state.value)) {\n mergeObjects(state.value, transaction.newValue);\n }\n else {\n state.value = transaction.newValue;\n }\n }\n else {\n state = { value: this.cloneStrategy.clone(transaction.newValue), recordRef, type: transaction.type };\n states.set(transaction.id, state);\n }\n this.cleanState(transaction.id, states);\n }\n /**\n * Updates the recordRef of the provided state with all the changes in the state. Accepts primitive and object value types\n *\n * @param state State to update value for\n * @returns updated value including all the changes in provided state\n */\n updateValue(state) {\n return this.mergeValues(state.recordRef, state.value);\n }\n /**\n * Merges second values in first value and the result in empty object. If values are primitive type\n * returns second value if exists, or first value.\n *\n * @param first Value to merge into\n * @param second Value to merge\n */\n mergeValues(first, second) {\n if (isObject(first) || isObject(second)) {\n return mergeObjects(this.cloneStrategy.clone(first), second);\n }\n else {\n return second ? second : first;\n }\n }\n /**\n * Compares the state with recordRef and clears all duplicated values. If any state ends as\n * empty object removes it from states.\n *\n * @param state State to clean\n */\n cleanState(id, states) {\n const state = states.get(id);\n // do nothing if\n // there is no state, or\n // there is no state value (e.g. DELETED transaction), or\n // there is no recordRef (e.g. ADDED transaction)\n if (state && state.value && state.recordRef) {\n // if state's value is object compare each key with the ones in recordRef\n // if values in any key are the same delete it from state's value\n // if state's value is not object, simply compare with recordRef and remove\n // the state if they are equal\n if (isObject(state.recordRef)) {\n for (const key of Object.keys(state.value)) {\n if (JSON.stringify(state.recordRef[key]) === JSON.stringify(state.value[key])) {\n delete state.value[key];\n }\n }\n // if state's value is empty remove the state from the states, only if state is not DELETE type\n if (state.type !== TransactionType.DELETE && Object.keys(state.value).length === 0) {\n states.delete(id);\n }\n }\n else {\n if (state.recordRef === state.value) {\n states.delete(id);\n }\n }\n }\n }\n}\n\nclass IgxTransactionService extends IgxBaseTransactionService {\n constructor() {\n super(...arguments);\n this._transactions = [];\n this._redoStack = [];\n this._undoStack = [];\n this._states = new Map();\n }\n /**\n * @returns if there are any transactions in the Undo stack\n */\n get canUndo() {\n return this._undoStack.length > 0;\n }\n /**\n * @returns if there are any transactions in the Redo stack\n */\n get canRedo() {\n return this._redoStack.length > 0;\n }\n /**\n * Adds provided transaction with recordRef if any\n *\n * @param transaction Transaction to be added\n * @param recordRef Reference to the value of the record in the data source related to the changed item\n */\n add(transaction, recordRef) {\n const states = this._isPending ? this._pendingStates : this._states;\n this.verifyAddedTransaction(states, transaction, recordRef);\n this.addTransaction(transaction, states, recordRef);\n }\n /**\n * Returns all recorded transactions in chronological order\n *\n * @param id Optional record id to get transactions for\n * @returns All transaction in the service or for the specified record\n */\n getTransactionLog(id) {\n if (id !== undefined) {\n return this._transactions.filter(t => t.id === id);\n }\n return [...this._transactions];\n }\n /**\n * Returns aggregated changes from all transactions\n *\n * @param mergeChanges If set to true will merge each state's value over relate recordRef\n * and will record resulting value in the related transaction\n * @returns Collection of aggregated transactions for each changed record\n */\n getAggregatedChanges(mergeChanges) {\n const result = [];\n this._states.forEach((state, key) => {\n const value = mergeChanges ? this.mergeValues(state.recordRef, state.value) : state.value;\n result.push({ id: key, newValue: value, type: state.type });\n });\n return result;\n }\n /**\n * Returns the state of the record with provided id\n *\n * @param id The id of the record\n * @param pending Should get pending state\n * @returns State of the record if any\n */\n getState(id, pending = false) {\n return pending ? this._pendingStates.get(id) : this._states.get(id);\n }\n /**\n * Returns whether transaction is enabled for this service\n */\n get enabled() {\n return true;\n }\n /**\n * Returns value of the required id including all uncommitted changes\n *\n * @param id The id of the record to return value for\n * @param mergeChanges If set to true will merge state's value over relate recordRef\n * and will return merged value\n * @returns Value with changes or **null**\n */\n getAggregatedValue(id, mergeChanges) {\n const state = this._states.get(id);\n const pendingState = super.getState(id);\n // if there is no state and there is no pending state return null\n if (!state && !pendingState) {\n return null;\n }\n const pendingChange = super.getAggregatedValue(id, false);\n const change = state && state.value;\n let aggregatedValue = this.mergeValues(change, pendingChange);\n if (mergeChanges) {\n const originalValue = state ? state.recordRef : pendingState.recordRef;\n aggregatedValue = this.mergeValues(originalValue, aggregatedValue);\n }\n return aggregatedValue;\n }\n /**\n * Clears all pending transactions and aggregated pending state. If commit is set to true\n * commits pending states as single transaction\n *\n * @param commit Should commit the pending states\n */\n endPending(commit) {\n this._isPending = false;\n if (commit) {\n const actions = [];\n // don't use addTransaction due to custom undo handling\n for (const transaction of this._pendingTransactions) {\n const pendingState = this._pendingStates.get(transaction.id);\n this._transactions.push(transaction);\n this.updateState(this._states, transaction, pendingState.recordRef);\n actions.push({ transaction, recordRef: pendingState.recordRef });\n }\n this._undoStack.push(actions);\n this._redoStack = [];\n this.onStateUpdate.emit({ origin: TransactionEventOrigin.END, actions });\n }\n super.endPending(commit);\n }\n /**\n * Applies all transactions over the provided data\n *\n * @param data Data source to update\n * @param id Optional record id to commit transactions for\n */\n commit(data, id) {\n if (id !== undefined) {\n const state = this.getState(id);\n if (state) {\n this.updateRecord(data, state);\n }\n }\n else {\n this._states.forEach((s) => {\n this.updateRecord(data, s);\n });\n }\n this.clear(id);\n }\n /**\n * Clears all transactions\n *\n * @param id Optional record id to clear transactions for\n */\n clear(id) {\n if (id !== undefined) {\n this._transactions = this._transactions.filter(t => t.id !== id);\n this._states.delete(id);\n // Undo stack is an array of actions. Each action is array of transaction like objects\n // We are going trough all the actions. For each action we are filtering out transactions\n // with provided id. Finally if any action ends up as empty array we are removing it from\n // undo stack\n this._undoStack = this._undoStack.map(a => a.filter(t => t.transaction.id !== id)).filter(a => a.length > 0);\n }\n else {\n this._transactions = [];\n this._states.clear();\n this._undoStack = [];\n }\n this._redoStack = [];\n this.onStateUpdate.emit({ origin: TransactionEventOrigin.CLEAR, actions: [] });\n }\n /**\n * Remove the last transaction if any\n */\n undo() {\n if (this._undoStack.length <= 0) {\n return;\n }\n const lastActions = this._undoStack.pop();\n this._transactions.splice(this._transactions.length - lastActions.length);\n this._redoStack.push(lastActions);\n this._states.clear();\n for (const currentActions of this._undoStack) {\n for (const transaction of currentActions) {\n this.updateState(this._states, transaction.transaction, transaction.recordRef);\n }\n }\n this.onStateUpdate.emit({ origin: TransactionEventOrigin.UNDO, actions: lastActions });\n }\n /**\n * Applies the last undone transaction if any\n */\n redo() {\n if (this._redoStack.length > 0) {\n const actions = this._redoStack.pop();\n for (const action of actions) {\n this.updateState(this._states, action.transaction, action.recordRef);\n this._transactions.push(action.transaction);\n }\n this._undoStack.push(actions);\n this.onStateUpdate.emit({ origin: TransactionEventOrigin.REDO, actions });\n }\n }\n addTransaction(transaction, states, recordRef) {\n this.updateState(states, transaction, recordRef);\n const transactions = this._isPending ? this._pendingTransactions : this._transactions;\n transactions.push(transaction);\n if (!this._isPending) {\n const actions = [{ transaction, recordRef }];\n this._undoStack.push(actions);\n this._redoStack = [];\n this.onStateUpdate.emit({ origin: TransactionEventOrigin.ADD, actions });\n }\n }\n /**\n * Verifies if the passed transaction is correct. If not throws an exception.\n *\n * @param transaction Transaction to be verified\n */\n verifyAddedTransaction(states, transaction, recordRef) {\n const state = states.get(transaction.id);\n switch (transaction.type) {\n case TransactionType.ADD:\n if (state) {\n // cannot add same item twice\n throw new Error(`Cannot add this transaction. Transaction with id: ${transaction.id} has been already added.`);\n }\n break;\n case TransactionType.DELETE:\n case TransactionType.UPDATE:\n if (state && state.type === TransactionType.DELETE) {\n // cannot delete or update deleted items\n throw new Error(`Cannot add this transaction. Transaction with id: ${transaction.id} has been already deleted.`);\n }\n if (!state && !recordRef && !this._isPending) {\n // cannot initially add transaction or delete item with no recordRef\n throw new Error(`Cannot add this transaction. This is first transaction of type ${transaction.type} ` +\n `for id ${transaction.id}. For first transaction of this type recordRef is mandatory.`);\n }\n break;\n }\n }\n /**\n * Updates the provided states collection according to passed transaction and recordRef\n *\n * @param states States collection to apply the update to\n * @param transaction Transaction to apply to the current state\n * @param recordRef Reference to the value of the record in data source, if any, where transaction should be applied\n */\n updateState(states, transaction, recordRef) {\n let state = states.get(transaction.id);\n // if TransactionType is ADD simply add transaction to states;\n // if TransactionType is DELETE:\n // - if there is state with this id of type ADD remove it from the states;\n // - if there is state with this id of type UPDATE change its type to DELETE;\n // - if there is no state with this id add transaction to states;\n // if TransactionType is UPDATE:\n // - if there is state with this id of type ADD merge new value and state recordRef into state new value\n // - if there is state with this id of type UPDATE merge new value into state new value\n // - if there is state with this id and state type is DELETE change its type to UPDATE\n // - if there is no state with this id add transaction to states;\n if (state) {\n switch (transaction.type) {\n case TransactionType.DELETE:\n if (state.type === TransactionType.ADD) {\n states.delete(transaction.id);\n }\n else if (state.type === TransactionType.UPDATE) {\n state.value = transaction.newValue;\n state.type = TransactionType.DELETE;\n }\n break;\n case TransactionType.UPDATE:\n if (isObject(state.value)) {\n if (state.type === TransactionType.ADD) {\n state.value = this.mergeValues(state.value, transaction.newValue);\n }\n if (state.type === TransactionType.UPDATE) {\n mergeObjects(state.value, transaction.newValue);\n }\n }\n else {\n state.value = transaction.newValue;\n }\n }\n }\n else {\n state = { value: this.cloneStrategy.clone(transaction.newValue), recordRef, type: transaction.type };\n states.set(transaction.id, state);\n }\n this.cleanState(transaction.id, states);\n }\n /**\n * Updates state related record in the provided data\n *\n * @param data Data source to update\n * @param state State to update data from\n */\n updateRecord(data, state) {\n const index = data.findIndex(i => JSON.stringify(i) === JSON.stringify(state.recordRef || {}));\n switch (state.type) {\n case TransactionType.ADD:\n data.push(state.value);\n break;\n case TransactionType.DELETE:\n if (0 <= index && index < data.length) {\n data.splice(index, 1);\n }\n break;\n case TransactionType.UPDATE:\n if (0 <= index && index < data.length) {\n data[index] = this.updateValue(state);\n }\n break;\n }\n }\n}\n\n/** @experimental @hidden */\nclass IgxHierarchicalTransactionService extends IgxTransactionService {\n getAggregatedChanges(mergeChanges) {\n const result = [];\n this._states.forEach((state, key) => {\n const value = mergeChanges ? this.mergeValues(state.recordRef, state.value) : this.cloneStrategy.clone(state.value);\n this.clearArraysFromObject(value);\n result.push({ id: key, path: state.path, newValue: value, type: state.type });\n });\n return result;\n }\n commit(data, primaryKeyOrId, childDataKey, id) {\n if (childDataKey !== undefined) {\n let transactions = this.getAggregatedChanges(true);\n if (id !== undefined) {\n transactions = transactions.filter(t => t.id === id);\n }\n DataUtil.mergeHierarchicalTransactions(data, transactions, childDataKey, primaryKeyOrId, this.cloneStrategy, true);\n this.clear(id);\n }\n else {\n super.commit(data, primaryKeyOrId);\n }\n }\n updateState(states, transaction, recordRef) {\n super.updateState(states, transaction, recordRef);\n // if transaction has no path, e.g. flat data source, get out\n if (!transaction.path) {\n return;\n }\n const currentState = states.get(transaction.id);\n if (currentState) {\n currentState.path = transaction.path;\n }\n // if transaction has path, Hierarchical data source, and it is DELETE\n // type transaction for all child rows remove ADD states and update\n // transaction type and value of UPDATE states\n if (transaction.type === TransactionType.DELETE) {\n states.forEach((v, k) => {\n if (v.path && v.path.indexOf(transaction.id) !== -1) {\n switch (v.type) {\n case TransactionType.ADD:\n states.delete(k);\n break;\n case TransactionType.UPDATE:\n states.get(k).type = TransactionType.DELETE;\n states.get(k).value = null;\n }\n }\n });\n }\n }\n // TODO: remove this method. Force cloning to strip child arrays when needed instead\n clearArraysFromObject(obj) {\n if (obj) {\n for (const prop of Object.keys(obj)) {\n if (Array.isArray(obj[prop])) {\n delete obj[prop];\n }\n }\n }\n }\n}\n\n/**\n * Factory service for instantiating TransactionServices\n */\nclass IgxFlatTransactionFactory {\n /**\n * Creates a new Transaction service instance depending on the specified type.\n *\n * @param type The type of the transaction\n * @returns a new instance of TransactionService\n */\n create(type) {\n switch (type) {\n case (\"Base\" /* TRANSACTION_TYPE.Base */):\n return new IgxTransactionService();\n default:\n return new IgxBaseTransactionService();\n }\n }\n}\nIgxFlatTransactionFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFlatTransactionFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxFlatTransactionFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFlatTransactionFactory, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFlatTransactionFactory, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }] });\n/**\n * Factory service for instantiating HierarchicalTransactionServices\n */\nclass IgxHierarchicalTransactionFactory extends IgxFlatTransactionFactory {\n /**\n * Creates a new HierarchialTransaction service instance depending on the specified type.\n *\n * @param type The type of the transaction\n * @returns a new instance of HierarchialTransaction\n */\n create(type) {\n switch (type) {\n case (\"Base\" /* TRANSACTION_TYPE.Base */):\n return new IgxHierarchicalTransactionService();\n ;\n default:\n return new IgxBaseTransactionService();\n }\n }\n}\nIgxHierarchicalTransactionFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalTransactionFactory, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxHierarchicalTransactionFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalTransactionFactory, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalTransactionFactory, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }] });\n\n// Export services\n\nclass IgxToggleDirective {\n /**\n * @hidden\n */\n get collapsed() {\n return this._collapsed;\n }\n /**\n * @hidden\n */\n get element() {\n return this.elementRef.nativeElement;\n }\n /**\n * @hidden\n */\n get hiddenClass() {\n return this.collapsed;\n }\n /**\n * @hidden\n */\n get defaultClass() {\n return !this.collapsed;\n }\n /**\n * @hidden\n */\n constructor(elementRef, cdr, overlayService, navigationService) {\n this.elementRef = elementRef;\n this.cdr = cdr;\n this.overlayService = overlayService;\n this.navigationService = navigationService;\n /**\n * Emits an event after the toggle container is opened.\n *\n * ```typescript\n * onToggleOpened(event) {\n * alert(\"Toggle opened!\");\n * }\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Emits an event before the toggle container is opened.\n *\n * ```typescript\n * onToggleOpening(event) {\n * alert(\"Toggle opening!\");\n * }\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Emits an event after the toggle container is closed.\n *\n * ```typescript\n * onToggleClosed(event) {\n * alert(\"Toggle closed!\");\n * }\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.closed = new EventEmitter();\n /**\n * Emits an event before the toggle container is closed.\n *\n * ```typescript\n * onToggleClosing(event) {\n * alert(\"Toggle closing!\");\n * }\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Emits an event after the toggle element is appended to the overlay container.\n *\n * ```typescript\n * onAppended() {\n * alert(\"Content appended!\");\n * }\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.appended = new EventEmitter();\n this._collapsed = true;\n this.destroy$ = new Subject();\n this._overlaySubFilter = [\n filter(x => x.id === this._overlayId),\n takeUntil(this.destroy$)\n ];\n this.overlayClosed = (e) => {\n this._collapsed = true;\n this.cdr.detectChanges();\n this.unsubscribe();\n this.overlayService.detach(this.overlayId);\n const args = { owner: this, id: this._overlayId, event: e.event };\n delete this._overlayId;\n this.closed.emit(args);\n this.cdr.markForCheck();\n };\n }\n /**\n * Opens the toggle.\n *\n * ```typescript\n * this.myToggle.open();\n * ```\n */\n open(overlaySettings) {\n // if there is open animation do nothing\n // if toggle is not collapsed and there is no close animation do nothing\n const info = this.overlayService.getOverlayById(this._overlayId);\n const openAnimationStarted = info?.openAnimationPlayer?.hasStarted() ?? false;\n const closeAnimationStarted = info?.closeAnimationPlayer?.hasStarted() ?? false;\n if (openAnimationStarted || !(this._collapsed || closeAnimationStarted)) {\n return;\n }\n this._collapsed = false;\n this.cdr.detectChanges();\n if (!info) {\n this.unsubscribe();\n this.subscribe();\n this._overlayId = this.overlayService.attach(this.elementRef, overlaySettings);\n }\n const args = { cancel: false, owner: this, id: this._overlayId };\n this.opening.emit(args);\n if (args.cancel) {\n this.unsubscribe();\n this.overlayService.detach(this._overlayId);\n this._collapsed = true;\n delete this._overlayId;\n this.cdr.detectChanges();\n return;\n }\n this.overlayService.show(this._overlayId, overlaySettings);\n }\n /**\n * Closes the toggle.\n *\n * ```typescript\n * this.myToggle.close();\n * ```\n */\n close(event) {\n // if toggle is collapsed do nothing\n // if there is close animation do nothing, toggle will close anyway\n const info = this.overlayService.getOverlayById(this._overlayId);\n const closeAnimationStarted = info?.closeAnimationPlayer?.hasStarted() || false;\n if (this._collapsed || closeAnimationStarted) {\n return;\n }\n this.overlayService.hide(this._overlayId, event);\n }\n /**\n * Opens or closes the toggle, depending on its current state.\n *\n * ```typescript\n * this.myToggle.toggle();\n * ```\n */\n toggle(overlaySettings) {\n // if toggle is collapsed call open\n // if there is running close animation call open\n if (this.collapsed || this.isClosing) {\n this.open(overlaySettings);\n }\n else {\n this.close();\n }\n }\n /** @hidden @internal */\n get isClosing() {\n const info = this.overlayService.getOverlayById(this._overlayId);\n return info ? info.closeAnimationPlayer?.hasStarted() : false;\n }\n /**\n * Returns the id of the overlay the content is rendered in.\n * ```typescript\n * this.myToggle.overlayId;\n * ```\n */\n get overlayId() {\n return this._overlayId;\n }\n /**\n * Repositions the toggle.\n * ```typescript\n * this.myToggle.reposition();\n * ```\n */\n reposition() {\n this.overlayService.reposition(this._overlayId);\n }\n /**\n * Offsets the content along the corresponding axis by the provided amount\n */\n setOffset(deltaX, deltaY) {\n this.overlayService.setOffset(this._overlayId, deltaX, deltaY);\n }\n /**\n * @hidden\n */\n ngOnInit() {\n if (this.navigationService && this.id) {\n this.navigationService.add(this.id, this);\n }\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n if (this.navigationService && this.id) {\n this.navigationService.remove(this.id);\n }\n if (this._overlayId) {\n this.overlayService.detach(this._overlayId);\n }\n this.unsubscribe();\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n subscribe() {\n this._overlayContentAppendedSub = this.overlayService\n .contentAppended\n .pipe(first$1(), takeUntil(this.destroy$))\n .subscribe(() => {\n const args = { owner: this, id: this._overlayId };\n this.appended.emit(args);\n });\n this._overlayOpenedSub = this.overlayService\n .opened\n .pipe(...this._overlaySubFilter)\n .subscribe(() => {\n const args = { owner: this, id: this._overlayId };\n this.opened.emit(args);\n });\n this._overlayClosingSub = this.overlayService\n .closing\n .pipe(...this._overlaySubFilter)\n .subscribe((e) => {\n const args = { cancel: false, event: e.event, owner: this, id: this._overlayId };\n this.closing.emit(args);\n e.cancel = args.cancel;\n // in case event is not canceled this will close the toggle and we need to unsubscribe.\n // Otherwise if for some reason, e.g. close on outside click, close() gets called before\n // onClosed was fired we will end with calling onClosing more than once\n if (!e.cancel) {\n this.clearSubscription(this._overlayClosingSub);\n }\n });\n this._overlayClosedSub = this.overlayService\n .closed\n .pipe(...this._overlaySubFilter)\n .subscribe(this.overlayClosed);\n }\n unsubscribe() {\n this.clearSubscription(this._overlayOpenedSub);\n this.clearSubscription(this._overlayClosingSub);\n this.clearSubscription(this._overlayClosedSub);\n this.clearSubscription(this._overlayContentAppendedSub);\n }\n clearSubscription(subscription) {\n if (subscription && !subscription.closed) {\n subscription.unsubscribe();\n }\n }\n}\nIgxToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxOverlayService }, { token: IgxNavigationService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: { id: \"id\" }, outputs: { opened: \"opened\", opening: \"opening\", closed: \"closed\", closing: \"closing\", appended: \"appended\" }, host: { properties: { \"class.igx-toggle--hidden\": \"this.hiddenClass\", \"attr.aria-hidden\": \"this.hiddenClass\", \"class.igx-toggle\": \"this.defaultClass\" } }, exportAs: [\"toggle\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'toggle',\n selector: '[igxToggle]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { opened: [{\n type: Output\n }], opening: [{\n type: Output\n }], closed: [{\n type: Output\n }], closing: [{\n type: Output\n }], appended: [{\n type: Output\n }], id: [{\n type: Input\n }], hiddenClass: [{\n type: HostBinding,\n args: ['class.igx-toggle--hidden']\n }, {\n type: HostBinding,\n args: ['attr.aria-hidden']\n }], defaultClass: [{\n type: HostBinding,\n args: ['class.igx-toggle']\n }] } });\nclass IgxToggleActionDirective {\n /**\n * @hidden\n */\n set target(target) {\n if (target !== null && target !== '') {\n this._target = target;\n }\n }\n /**\n * @hidden\n */\n get target() {\n if (typeof this._target === 'string') {\n return this.navigationService.get(this._target);\n }\n return this._target;\n }\n constructor(element, navigationService) {\n this.element = element;\n this.navigationService = navigationService;\n }\n /**\n * @hidden\n */\n onClick() {\n if (this.outlet) {\n this._overlayDefaults.outlet = this.outlet;\n }\n const clonedSettings = Object.assign({}, this._overlayDefaults, this.overlaySettings);\n this.updateOverlaySettings(clonedSettings);\n this.target.toggle(clonedSettings);\n }\n /**\n * @hidden\n */\n ngOnInit() {\n const targetElement = this.element.nativeElement;\n this._overlayDefaults = {\n target: targetElement,\n positionStrategy: new ConnectedPositioningStrategy(),\n scrollStrategy: new AbsoluteScrollStrategy(),\n closeOnOutsideClick: true,\n modal: false,\n excludeFromOutsideClick: [targetElement]\n };\n }\n /**\n * Updates provided overlay settings\n *\n * @param settings settings to update\n * @returns returns updated copy of provided overlay settings\n */\n updateOverlaySettings(settings) {\n if (settings && settings.positionStrategy) {\n const positionStrategyClone = settings.positionStrategy.clone();\n settings.target = this.element.nativeElement;\n settings.positionStrategy = positionStrategyClone;\n }\n return settings;\n }\n}\nIgxToggleActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleActionDirective, deps: [{ token: i0.ElementRef }, { token: IgxNavigationService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxToggleActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxToggleActionDirective, selector: \"[igxToggleAction]\", inputs: { overlaySettings: \"overlaySettings\", outlet: [\"igxToggleOutlet\", \"outlet\"], target: [\"igxToggleAction\", \"target\"] }, host: { listeners: { \"click\": \"onClick()\" } }, exportAs: [\"toggle-action\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleActionDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'toggle-action',\n selector: '[igxToggleAction]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { overlaySettings: [{\n type: Input\n }], outlet: [{\n type: Input,\n args: ['igxToggleOutlet']\n }], target: [{\n type: Input,\n args: ['igxToggleAction']\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }] } });\n/**\n * Mark an element as an igxOverlay outlet container.\n * Directive instance is exported as `overlay-outlet` to be assigned to templates variables:\n * ```html\n *
    \n * ```\n */\nclass IgxOverlayOutletDirective {\n constructor(element) {\n this.element = element;\n }\n /** @hidden */\n get nativeElement() {\n return this.element.nativeElement;\n }\n}\nIgxOverlayOutletDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxOverlayOutletDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxOverlayOutletDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxOverlayOutletDirective, selector: \"[igxOverlayOutlet]\", exportAs: [\"overlay-outlet\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxOverlayOutletDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'overlay-outlet',\n selector: '[igxOverlayOutlet]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });\n/**\n * @hidden\n */\nclass IgxToggleModule {\n}\nIgxToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleModule, declarations: [IgxToggleDirective, IgxToggleActionDirective, IgxOverlayOutletDirective], exports: [IgxToggleDirective, IgxToggleActionDirective, IgxOverlayOutletDirective] });\nIgxToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleModule, providers: [IgxNavigationService] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToggleModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxToggleDirective, IgxToggleActionDirective, IgxOverlayOutletDirective],\n exports: [IgxToggleDirective, IgxToggleActionDirective, IgxOverlayOutletDirective],\n providers: [IgxNavigationService]\n }]\n }] });\n\n/** @hidden */\nvar Navigate;\n(function (Navigate) {\n Navigate[Navigate[\"Up\"] = -1] = \"Up\";\n Navigate[Navigate[\"Down\"] = 1] = \"Down\";\n})(Navigate || (Navigate = {}));\n/** Key actions that have designated handlers in IgxDropDownComponent */\nconst DropDownActionKey = mkenum({\n ESCAPE: 'escape',\n ENTER: 'enter',\n SPACE: 'space'\n});\nconst IGX_DROPDOWN_BASE = new InjectionToken('IgxDropDownBaseToken');\n\n/** @hidden */\nclass IgxSelectionAPIService {\n constructor() {\n /**\n * If primaryKey is defined, then multiple selection is based on the primaryKey, and it is array of numbers, strings, etc.\n * If the primaryKey is omitted, then selection is based on the item data\n */\n this.selection = new Map();\n }\n /**\n * Get current component selection.\n *\n * @param componentID ID of the component.\n */\n get(componentID) {\n return this.selection.get(componentID);\n }\n /**\n * Set new component selection.\n *\n * @param componentID ID of the component.\n * @param newSelection The new component selection to be set.\n */\n set(componentID, newSelection) {\n if (!componentID) {\n throw Error('Invalid value for component id!');\n }\n this.selection.set(componentID, newSelection);\n }\n /**\n * Clears selection for component.\n *\n * @param componentID ID of the component.\n */\n clear(componentID) {\n this.selection.set(componentID, this.get_empty());\n }\n /**\n * Get current component selection length.\n *\n * @param componentID ID of the component.\n */\n size(componentID) {\n const sel = this.get(componentID);\n return sel ? sel.size : 0;\n }\n /**\n * Creates new selection that consist of the new item added to the current component selection.\n * The returned collection is new Set,\n * therefore if you want to update component selection you need to call in addition the set_selection() method\n * or instead use the select_item() one.\n *\n * @param componentID ID of the component, which we add new item to.\n * @param itemID ID of the item to add to component selection.\n * @param sel Used internally only by the selection (add_items method) to accumulate selection for multiple items.\n *\n * @returns Selection after the new item is added.\n */\n add_item(componentID, itemID, sel) {\n if (!sel) {\n sel = new Set(this.get(componentID));\n }\n if (sel === undefined) {\n sel = this.get_empty();\n }\n sel.add(itemID);\n return sel;\n }\n /**\n * Creates new selection that consist of the new items added to the current component selection.\n * The returned collection is new Set,\n * therefore if you want to update component selection you need to call in addition the set_selection() method\n * or instead use the select_items() one.\n *\n * @param componentID ID of the component, which we add new items to.\n * @param itemIDs Array of IDs of the items to add to component selection.\n * @param clearSelection If true it will clear previous selection.\n *\n * @returns Selection after the new items are added.\n */\n add_items(componentID, itemIDs, clearSelection) {\n let selection;\n if (clearSelection) {\n selection = this.get_empty();\n }\n else if (itemIDs && itemIDs.length === 0) {\n selection = new Set(this.get(componentID));\n }\n itemIDs.forEach((item) => selection = this.add_item(componentID, item, selection));\n return selection;\n }\n /**\n * Add item to the current component selection.\n *\n * @param componentID ID of the component, which we add new item to.\n * @param itemID ID of the item to add to component selection.\n * @param sel Used internally only by the selection (select_items method) to accumulate selection for multiple items.\n */\n select_item(componentID, itemID, sel) {\n this.set(componentID, this.add_item(componentID, itemID, sel));\n }\n /**\n * Add items to the current component selection.\n *\n * @param componentID ID of the component, which we add new items to.\n * @param itemIDs Array of IDs of the items to add to component selection.\n * @param clearSelection If true it will clear previous selection.\n */\n select_items(componentID, itemID, clearSelection) {\n this.set(componentID, this.add_items(componentID, itemID, clearSelection));\n }\n /**\n * Creates new selection that consist of the new items excluded from the current component selection.\n * The returned collection is new Set,\n * therefore if you want to update component selection you need to call in addition the set_selection() method\n * or instead use the deselect_item() one.\n *\n * @param componentID ID of the component, which we remove items from.\n * @param itemID ID of the item to remove from component selection.\n * @param sel Used internally only by the selection (delete_items method) to accumulate deselected items.\n *\n * @returns Selection after the item is removed.\n */\n delete_item(componentID, itemID, sel) {\n if (!sel) {\n sel = new Set(this.get(componentID));\n }\n if (sel === undefined) {\n return;\n }\n sel.delete(itemID);\n return sel;\n }\n /**\n * Creates new selection that consist of the new items removed to the current component selection.\n * The returned collection is new Set,\n * therefore if you want to update component selection you need to call in addition the set_selection() method\n * or instead use the deselect_items() one.\n *\n * @param componentID ID of the component, which we remove items from.\n * @param itemID ID of the items to remove from component selection.\n *\n * @returns Selection after the items are removed.\n */\n delete_items(componentID, itemIDs) {\n let selection;\n itemIDs.forEach((deselectedItem) => selection = this.delete_item(componentID, deselectedItem, selection));\n return selection;\n }\n /**\n * Remove item from the current component selection.\n *\n * @param componentID ID of the component, which we remove item from.\n * @param itemID ID of the item to remove from component selection.\n * @param sel Used internally only by the selection (deselect_items method) to accumulate selection for multiple items.\n */\n deselect_item(componentID, itemID, sel) {\n this.set(componentID, this.delete_item(componentID, itemID, sel));\n }\n /**\n * Remove items to the current component selection.\n *\n * @param componentID ID of the component, which we add new items to.\n * @param itemIDs Array of IDs of the items to add to component selection.\n */\n deselect_items(componentID, itemID, _clearSelection) {\n this.set(componentID, this.delete_items(componentID, itemID));\n }\n /**\n * Check if the item is selected in the component selection.\n *\n * @param componentID ID of the component.\n * @param itemID ID of the item to search.\n *\n * @returns If item is selected.\n */\n is_item_selected(componentID, itemID) {\n const sel = this.get(componentID);\n if (!sel) {\n return false;\n }\n return sel.has(itemID);\n }\n /**\n * Get first element in the selection.\n * This is correct when we have only one item in the collection (for single selection purposes)\n * and the method returns that item.\n *\n * @param componentID ID of the component.\n *\n * @returns First element in the set.\n */\n first_item(componentID) {\n const sel = this.get(componentID);\n if (sel && sel.size > 0) {\n return sel.values().next().value;\n }\n }\n /**\n * Returns whether all items are selected.\n *\n * @param componentID ID of the component.\n * @param dataCount: number Number of items in the data.\n *\n * @returns If all items are selected.\n */\n are_all_selected(componentID, dataCount) {\n return dataCount > 0 && dataCount === this.size(componentID);\n }\n /**\n * Returns whether any of the items is selected.\n *\n * @param componentID ID of the component.\n * @param data Entire data array.\n *\n * @returns If there is any item selected.\n */\n are_none_selected(componentID) {\n return this.size(componentID) === 0;\n }\n /**\n * Get all primary key values from a data array. If there isn't a primary key defined that the entire data is returned instead.\n *\n * @param data Entire data array.\n * @param primaryKey Data primary key.\n *\n * @returns Array of identifiers, either primary key values or the entire data array.\n */\n get_all_ids(data, primaryKey) {\n // If primaryKey is 0, this should still map to the property\n return primaryKey !== undefined && primaryKey !== null ? data.map((x) => x[primaryKey]) : data;\n }\n /**\n * Returns empty selection collection.\n *\n * @returns empty set.\n */\n get_empty() {\n return new Set();\n }\n}\nIgxSelectionAPIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectionAPIService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxSelectionAPIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectionAPIService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectionAPIService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\n\nlet NEXT_ID$v = 0;\n/**\n * The `` is a container intended for row items in\n * a `` container.\n */\nclass IgxDropDownGroupComponent {\n constructor() {\n /**\n * @hidden @internal\n */\n this.role = 'group';\n /** @hidden @internal */\n this.groupClass = true;\n /**\n * Sets/gets if the item group is disabled\n *\n * ```typescript\n * const myDropDownGroup: IgxDropDownGroupComponent = this.dropdownGroup;\n * // get\n * ...\n * const groupState: boolean = myDropDownGroup.disabled;\n * ...\n * //set\n * ...\n * myDropDownGroup,disabled = false;\n * ...\n * ```\n *\n * ```html\n * \n * \n * {{ item.text }}\n * \n * \n * ```\n *\n * **NOTE:** All items inside of a disabled drop down group will be treated as disabled\n */\n this.disabled = false;\n this._id = NEXT_ID$v++;\n }\n /**\n * @hidden @internal\n */\n get labelId() {\n return `igx-item-group-label-${this._id}`;\n }\n get labelledBy() {\n return this.labelId;\n }\n}\nIgxDropDownGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxDropDownGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDownGroupComponent, selector: \"igx-drop-down-item-group\", inputs: { disabled: \"disabled\", label: \"label\" }, host: { properties: { \"attr.aria-labelledby\": \"this.labelledBy\", \"attr.role\": \"this.role\", \"class.igx-drop-down__group\": \"this.groupClass\", \"attr.aria-disabled\": \"this.disabled\", \"class.igx-drop-down__group--disabled\": \"this.disabled\" } }, ngImport: i0, template: `\n \n \n `, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownGroupComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-drop-down-item-group',\n template: `\n \n \n `\n }]\n }], propDecorators: { labelledBy: [{\n type: HostBinding,\n args: [`attr.aria-labelledby`]\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], groupClass: [{\n type: HostBinding,\n args: ['class.igx-drop-down__group']\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: [`attr.aria-disabled`]\n }, {\n type: HostBinding,\n args: ['class.igx-drop-down__group--disabled']\n }], label: [{\n type: Input\n }] } });\n\nlet NEXT_ID$u = 0;\n/**\n * An abstract class defining a drop-down item:\n * With properties / styles for selection, highlight, height\n * Bindable property for passing data (`value: any`)\n * Parent component (has to be used under a parent with type `IDropDownBase`)\n * Method for handling click on Host()\n */\nclass IgxDropDownItemBaseDirective {\n get ariaLabel() {\n return this._label ? this._label : this.value ? this.value : this.id;\n }\n set ariaLabel(value) {\n this._label = value;\n }\n /**\n * @hidden @internal\n */\n get itemID() {\n return this;\n }\n /**\n * The data index of the dropdown item.\n *\n * ```typescript\n * // get the data index of the selected dropdown item\n * let selectedItemIndex = this.dropdown.selectedItem.index\n * ```\n */\n get index() {\n if (this._index === null) {\n return this.itemIndex;\n }\n return this._index;\n }\n set index(value) {\n this._index = value;\n }\n /**\n * @hidden @internal\n */\n get itemStyle() {\n return !this.isHeader;\n }\n /**\n * @hidden @internal\n */\n get itemStyleCosy() {\n return this.dropDown.displayDensity === 'cosy' && !this.isHeader;\n }\n /**\n * @hidden @internal\n */\n get itemStyleCompact() {\n return this.dropDown.displayDensity === 'compact' && !this.isHeader;\n }\n /**\n * Sets/Gets if the item is the currently selected one in the dropdown\n *\n * ```typescript\n * let mySelectedItem = this.dropdown.selectedItem;\n * let isMyItemSelected = mySelectedItem.selected; // true\n * ```\n *\n * Two-way data binding\n * ```html\n * \n * ```\n */\n get selected() {\n return this._selected;\n }\n set selected(value) {\n if (this.isHeader) {\n return;\n }\n this._selected = value;\n this.selectedChange.emit(this._selected);\n }\n /**\n * Sets/gets if the given item is focused\n * ```typescript\n * let mySelectedItem = this.dropdown.selectedItem;\n * let isMyItemFocused = mySelectedItem.focused;\n * ```\n */\n get focused() {\n return this.isSelectable && this._focused;\n }\n /**\n * ```html\n * \n *
    \n * {{item.field}}\n *
    \n *
    \n * ```\n */\n set focused(value) {\n this._focused = value;\n }\n /**\n * @hidden @internal\n */\n get headerClassCosy() {\n return this.isHeader && this.dropDown.displayDensity === 'cosy';\n }\n /**\n * @hidden @internal\n */\n get headerClassCompact() {\n return this.isHeader && this.dropDown.displayDensity === 'compact';\n }\n /**\n * Sets/gets if the given item is disabled\n *\n * ```typescript\n * // get\n * let mySelectedItem = this.dropdown.selectedItem;\n * let myItemIsDisabled = mySelectedItem.disabled;\n * ```\n *\n * ```html\n * \n *
    \n * {{item.field}}\n *
    \n *
    \n * ```\n * **NOTE:** Drop-down items inside of a disabled `IgxDropDownGroup` will always count as disabled\n */\n get disabled() {\n return this.group ? this.group.disabled || this._disabled : this._disabled;\n }\n set disabled(value) {\n this._disabled = value;\n }\n /**\n * Gets item index\n *\n * @hidden @internal\n */\n get itemIndex() {\n return this.dropDown.items.indexOf(this);\n }\n /**\n * Gets item element height\n *\n * @hidden @internal\n */\n get elementHeight() {\n return this.elementRef.nativeElement.clientHeight;\n }\n /**\n * Get item html element\n *\n * @hidden @internal\n */\n get element() {\n return this.elementRef;\n }\n get hasIndex() {\n return this._index !== null && this._index !== undefined;\n }\n constructor(dropDown, elementRef, group, selection) {\n this.dropDown = dropDown;\n this.elementRef = elementRef;\n this.group = group;\n this.selection = selection;\n /**\n * Sets/gets the `id` of the item.\n * ```html\n * \n * ```\n * ```typescript\n * let itemId = this.item.id;\n * ```\n *\n * @memberof IgxSelectItemComponent\n */\n this.id = `igx-drop-down-item-${NEXT_ID$u++}`;\n /**\n * @hidden\n */\n this.selectedChange = new EventEmitter();\n /**\n * Gets/sets the `role` attribute of the item. Default is 'option'.\n *\n * ```html\n * \n * ```\n */\n this.role = 'option';\n /**\n * @hidden\n */\n this._focused = false;\n this._selected = false;\n this._index = null;\n this._disabled = false;\n this._label = null;\n }\n /**\n * @hidden\n * @internal\n */\n clicked(event) {\n }\n /**\n * @hidden\n * @internal\n */\n handleMousedown(event) {\n if (!this.dropDown.allowItemsFocus) {\n event.preventDefault();\n }\n }\n ngDoCheck() {\n if (this._selected) {\n const dropDownSelectedItem = this.dropDown.selectedItem;\n if (!dropDownSelectedItem) {\n this.dropDown.selectItem(this);\n }\n else if (this.hasIndex\n ? this._index !== dropDownSelectedItem.index || this.value !== dropDownSelectedItem.value :\n this !== dropDownSelectedItem) {\n this.dropDown.selectItem(this);\n }\n }\n }\n /** Returns true if the items is not a header or disabled */\n get isSelectable() {\n return !(this.disabled || this.isHeader);\n }\n /** If `allowItemsFocus` is enabled, keep the browser focus on the active item */\n ensureItemFocus() {\n if (this.dropDown.allowItemsFocus) {\n const focusedItem = this.dropDown.items.find((item) => item.focused);\n if (!focusedItem) {\n return;\n }\n focusedItem.element.nativeElement.focus({ preventScroll: true });\n }\n }\n}\nIgxDropDownItemBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownItemBaseDirective, deps: [{ token: IGX_DROPDOWN_BASE }, { token: i0.ElementRef }, { token: IgxDropDownGroupComponent, optional: true }, { token: IgxSelectionAPIService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDropDownItemBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDownItemBaseDirective, selector: \"[igxDropDownItemBase]\", inputs: { id: \"id\", ariaLabel: \"ariaLabel\", index: \"index\", value: \"value\", selected: \"selected\", isHeader: \"isHeader\", disabled: \"disabled\", role: \"role\" }, outputs: { selectedChange: \"selectedChange\" }, host: { listeners: { \"click\": \"clicked($event)\", \"mousedown\": \"handleMousedown($event)\" }, properties: { \"attr.id\": \"this.id\", \"attr.aria-label\": \"this.ariaLabel\", \"class.igx-drop-down__item\": \"this.itemStyle\", \"class.igx-drop-down__item--cosy\": \"this.itemStyleCosy\", \"class.igx-drop-down__item--compact\": \"this.itemStyleCompact\", \"attr.aria-selected\": \"this.selected\", \"class.igx-drop-down__item--selected\": \"this.selected\", \"class.igx-drop-down__item--focused\": \"this.focused\", \"class.igx-drop-down__header\": \"this.isHeader\", \"class.igx-drop-down__header--cosy\": \"this.headerClassCosy\", \"class.igx-drop-down__header--compact\": \"this.headerClassCompact\", \"attr.aria-disabled\": \"this.disabled\", \"class.igx-drop-down__item--disabled\": \"this.disabled\", \"attr.role\": \"this.role\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownItemBaseDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDropDownItemBase]'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_DROPDOWN_BASE]\n }] }, { type: i0.ElementRef }, { type: IgxDropDownGroupComponent, decorators: [{\n type: Optional\n }] }, { type: IgxSelectionAPIService, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IgxSelectionAPIService]\n }] }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], ariaLabel: [{\n type: HostBinding,\n args: ['attr.aria-label']\n }, {\n type: Input\n }], index: [{\n type: Input\n }], value: [{\n type: Input\n }], itemStyle: [{\n type: HostBinding,\n args: ['class.igx-drop-down__item']\n }], itemStyleCosy: [{\n type: HostBinding,\n args: ['class.igx-drop-down__item--cosy']\n }], itemStyleCompact: [{\n type: HostBinding,\n args: ['class.igx-drop-down__item--compact']\n }], selected: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.aria-selected']\n }, {\n type: HostBinding,\n args: ['class.igx-drop-down__item--selected']\n }], selectedChange: [{\n type: Output\n }], focused: [{\n type: HostBinding,\n args: ['class.igx-drop-down__item--focused']\n }], isHeader: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-drop-down__header']\n }], headerClassCosy: [{\n type: HostBinding,\n args: ['class.igx-drop-down__header--cosy']\n }], headerClassCompact: [{\n type: HostBinding,\n args: ['class.igx-drop-down__header--compact']\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.aria-disabled']\n }, {\n type: HostBinding,\n args: ['class.igx-drop-down__item--disabled']\n }], role: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.role']\n }], clicked: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], handleMousedown: [{\n type: HostListener,\n args: ['mousedown', ['$event']]\n }] } });\n\n/**\n * The `` is a container intended for row items in\n * a `` container.\n */\nclass IgxDropDownItemComponent extends IgxDropDownItemBaseDirective {\n /**\n * Sets/gets if the given item is focused\n * ```typescript\n * let mySelectedItem = this.dropdown.selectedItem;\n * let isMyItemFocused = mySelectedItem.focused;\n * ```\n */\n get focused() {\n let focusedState = this._focused;\n if (this.hasIndex) {\n const focusedItem = this.selection.first_item(`${this.dropDown.id}-active`);\n const focusedIndex = focusedItem ? focusedItem.index : -1;\n focusedState = this._index === focusedIndex;\n }\n return this.isSelectable && focusedState;\n }\n /**\n * Sets/gets if the given item is focused\n * ```typescript\n * let mySelectedItem = this.dropdown.selectedItem;\n * let isMyItemFocused = mySelectedItem.focused;\n * ```\n */\n set focused(value) {\n this._focused = value;\n }\n /**\n * Sets/Gets if the item is the currently selected one in the dropdown\n *\n * ```typescript\n * let mySelectedItem = this.dropdown.selectedItem;\n * let isMyItemSelected = mySelectedItem.selected; // true\n * ```\n *\n * Two-way data binding\n * ```html\n * \n * ```\n */\n get selected() {\n if (this.hasIndex) {\n const item = this.selection.first_item(`${this.dropDown.id}`);\n return item ? item.index === this._index && item.value === this.value : false;\n }\n return this._selected;\n }\n /**\n * Sets/Gets if the item is the currently selected one in the dropdown\n *\n */\n set selected(value) {\n if (this.isHeader) {\n return;\n }\n this._selected = value;\n this.selectedChange.emit(this._selected);\n }\n /**\n * @hidden @internal\n */\n get setTabIndex() {\n const shouldSetTabIndex = this.dropDown.allowItemsFocus && this.isSelectable;\n if (shouldSetTabIndex) {\n return 0;\n }\n else {\n return null;\n }\n }\n clicked(event) {\n if (!this.isSelectable) {\n this.ensureItemFocus();\n return;\n }\n if (this.selection) {\n this.dropDown.selectItem(this, event);\n }\n }\n}\nIgxDropDownItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxDropDownItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDownItemComponent, selector: \"igx-drop-down-item\", host: { properties: { \"attr.tabindex\": \"this.setTabIndex\" } }, usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownItemComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-drop-down-item', template: \"\\n \\n \\n \\n \\n \\n \\n\\n\" }]\n }], propDecorators: { setTabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }] } });\n\n/**\n * Defines the possible values of the components' display density.\n */\nconst DisplayDensity = mkenum({\n comfortable: 'comfortable',\n cosy: 'cosy',\n compact: 'compact'\n});\n/**\n * Defines the DisplayDensity DI token.\n */\nconst DisplayDensityToken = new InjectionToken('DisplayDensity');\n/**\n * Base class containing all logic required for implementing DisplayDensity.\n */\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nclass DisplayDensityBase {\n /**\n * Returns the theme of the component.\n * The default theme is `comfortable`.\n * Available options are `comfortable`, `cosy`, `compact`.\n * ```typescript\n * let componentTheme = this.component.displayDensity;\n * ```\n */\n get displayDensity() {\n return this._displayDensity ||\n ((this.displayDensityOptions && this.displayDensityOptions.displayDensity) || DisplayDensity.comfortable);\n }\n /**\n * Sets the theme of the component.\n */\n set displayDensity(val) {\n const currentDisplayDensity = this._displayDensity;\n this._displayDensity = val;\n if (currentDisplayDensity !== this._displayDensity) {\n const densityChangedArgs = {\n oldDensity: currentDisplayDensity,\n newDensity: this._displayDensity\n };\n this.densityChanged.emit(densityChangedArgs);\n }\n }\n constructor(displayDensityOptions) {\n this.displayDensityOptions = displayDensityOptions;\n this.densityChanged = new EventEmitter();\n this.oldDisplayDensityOptions = { displayDensity: DisplayDensity.comfortable };\n Object.assign(this.oldDisplayDensityOptions, displayDensityOptions);\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this.initialDensity = this._displayDensity;\n }\n ngDoCheck() {\n if (!this._displayDensity && this.displayDensityOptions &&\n this.oldDisplayDensityOptions.displayDensity !== this.displayDensityOptions.displayDensity) {\n const densityChangedArgs = {\n oldDensity: this.oldDisplayDensityOptions.displayDensity,\n newDensity: this.displayDensityOptions.displayDensity\n };\n this.densityChanged.emit(densityChangedArgs);\n this.oldDisplayDensityOptions = Object.assign(this.oldDisplayDensityOptions, this.displayDensityOptions);\n }\n }\n /**\n * Given a style class of a component/element returns the modified version of it based\n * on the current display density.\n */\n getComponentDensityClass(baseStyleClass) {\n switch (this.displayDensity) {\n case DisplayDensity.cosy:\n return `${baseStyleClass}--${DisplayDensity.cosy}`;\n case DisplayDensity.compact:\n return `${baseStyleClass}--${DisplayDensity.compact}`;\n default:\n return baseStyleClass;\n }\n }\n}\nDisplayDensityBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: DisplayDensityBase, deps: [{ token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nDisplayDensityBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: DisplayDensityBase, selector: \"[igxDisplayDensityBase]\", inputs: { displayDensity: \"displayDensity\" }, outputs: { densityChanged: \"densityChanged\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: DisplayDensityBase, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDisplayDensityBase]'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { densityChanged: [{\n type: Output\n }], displayDensity: [{\n type: Input\n }] } });\nclass IgxDisplayDensityModule {\n}\nIgxDisplayDensityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDisplayDensityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDisplayDensityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDisplayDensityModule, declarations: [DisplayDensityBase], exports: [DisplayDensityBase] });\nIgxDisplayDensityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDisplayDensityModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDisplayDensityModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n DisplayDensityBase\n ],\n exports: [\n DisplayDensityBase\n ]\n }]\n }] });\n\nlet NEXT_ID$t = 0;\n/**\n * An abstract class, defining a drop-down component, with:\n * Properties for display styles and classes\n * A collection items of type `IgxDropDownItemBaseDirective`\n * Properties and methods for navigating (highlighting/focusing) items from the collection\n * Properties and methods for selecting items from the collection\n */\nclass IgxDropDownBaseDirective extends DisplayDensityBase {\n /**\n * Gets/Sets the drop down's id\n *\n * ```typescript\n * // get\n * let myDropDownCurrentId = this.dropdown.id;\n * ```\n * ```html\n * \n * \n * ```\n */\n get id() {\n return this._id;\n }\n set id(value) {\n this._id = value;\n }\n /**\n * Get all non-header items\n *\n * ```typescript\n * let myDropDownItems = this.dropdown.items;\n * ```\n */\n get items() {\n const items = [];\n if (this.children !== undefined) {\n for (const child of this.children.toArray()) {\n if (!child.isHeader) {\n items.push(child);\n }\n }\n }\n return items;\n }\n /**\n * Get all header items\n *\n * ```typescript\n * let myDropDownHeaderItems = this.dropdown.headers;\n * ```\n */\n get headers() {\n const headers = [];\n if (this.children !== undefined) {\n for (const child of this.children.toArray()) {\n if (child.isHeader) {\n headers.push(child);\n }\n }\n }\n return headers;\n }\n /**\n * Get dropdown html element\n *\n * ```typescript\n * let myDropDownElement = this.dropdown.element;\n * ```\n */\n get element() {\n return this.elementRef.nativeElement;\n }\n /**\n * @hidden @internal\n * Get dropdown's html element of its scroll container\n */\n get scrollContainer() {\n return this.element;\n }\n constructor(elementRef, cdr, _displayDensityOptions) {\n super(_displayDensityOptions);\n this.elementRef = elementRef;\n this.cdr = cdr;\n this._displayDensityOptions = _displayDensityOptions;\n /**\n * Emitted when item selection is changing, before the selection completes\n *\n * ```html\n * \n * ```\n */\n this.selectionChanging = new EventEmitter();\n /**\n * Gets/Sets the drop down's container max height.\n *\n * ```typescript\n * // get\n * let maxHeight = this.dropdown.maxHeight;\n * ```\n * ```html\n * \n * \n * ```\n */\n this.maxHeight = null;\n /**\n * @hidden @internal\n */\n this.cssClass = true;\n this._focusedItem = null;\n this._id = `igx-drop-down-${NEXT_ID$t++}`;\n }\n /** Keydown Handler */\n onItemActionKey(key, event) {\n switch (key) {\n case DropDownActionKey.ENTER:\n case DropDownActionKey.SPACE:\n this.selectItem(this.focusedItem, event);\n break;\n case DropDownActionKey.ESCAPE:\n }\n }\n /**\n * Emits selectionChanging with the target item & event\n *\n * @hidden @internal\n * @param newSelection the item selected\n * @param event the event that triggered the call\n */\n selectItem(newSelection, event) {\n this.selectionChanging.emit({\n newSelection,\n oldSelection: null,\n cancel: false\n });\n }\n /**\n * @hidden @internal\n */\n get focusedItem() {\n return this._focusedItem;\n }\n /**\n * @hidden @internal\n */\n set focusedItem(item) {\n this._focusedItem = item;\n }\n /**\n * Navigates to the item on the specified index\n *\n * @param newIndex number - the index of the item in the `items` collection\n */\n navigateItem(newIndex) {\n if (newIndex !== -1) {\n const oldItem = this._focusedItem;\n const newItem = this.items[newIndex];\n if (oldItem) {\n oldItem.focused = false;\n }\n this.focusedItem = newItem;\n this.scrollToHiddenItem(newItem);\n this.focusedItem.focused = true;\n }\n }\n /**\n * @hidden @internal\n */\n navigateFirst() {\n this.navigate(Navigate.Down, -1);\n }\n /**\n * @hidden @internal\n */\n navigateLast() {\n this.navigate(Navigate.Up, this.items.length);\n }\n /**\n * @hidden @internal\n */\n navigateNext() {\n this.navigate(Navigate.Down);\n }\n /**\n * @hidden @internal\n */\n navigatePrev() {\n this.navigate(Navigate.Up);\n }\n scrollToHiddenItem(newItem) {\n const elementRect = newItem.element.nativeElement.getBoundingClientRect();\n const parentRect = this.scrollContainer.getBoundingClientRect();\n if (parentRect.top > elementRect.top) {\n this.scrollContainer.scrollTop -= (parentRect.top - elementRect.top);\n }\n if (parentRect.bottom < elementRect.bottom) {\n this.scrollContainer.scrollTop += (elementRect.bottom - parentRect.bottom);\n }\n }\n navigate(direction, currentIndex) {\n let index = -1;\n if (this._focusedItem) {\n index = currentIndex ? currentIndex : this.focusedItem.itemIndex;\n }\n const newIndex = this.getNearestSiblingFocusableItemIndex(index, direction);\n this.navigateItem(newIndex);\n }\n getNearestSiblingFocusableItemIndex(startIndex, direction) {\n let index = startIndex;\n const items = this.items;\n while (items[index + direction] && items[index + direction].disabled) {\n index += direction;\n }\n index += direction;\n if (index >= 0 && index < items.length) {\n return index;\n }\n else {\n return -1;\n }\n }\n}\nIgxDropDownBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDropDownBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDownBaseDirective, inputs: { width: \"width\", height: \"height\", id: \"id\", maxHeight: \"maxHeight\" }, outputs: { selectionChanging: \"selectionChanging\" }, host: { properties: { \"style.maxHeight\": \"this.maxHeight\", \"class.igx-drop-down\": \"this.cssClass\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownBaseDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { selectionChanging: [{\n type: Output\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], id: [{\n type: Input\n }], maxHeight: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['style.maxHeight']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-drop-down']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxScrollInertiaDirective {\n constructor(element, _zone) {\n this.element = element;\n this._zone = _zone;\n this.wheelStep = 50;\n this.inertiaStep = 1.5;\n this.smoothingStep = 1.5;\n this.smoothingDuration = 0.5;\n this.swipeToleranceX = 20;\n this.inertiaDeltaY = 3;\n this.inertiaDeltaX = 2;\n this.inertiaDuration = 0.5;\n this._savedSpeedsX = [];\n this.baseDeltaMultiplier = 1 / 120;\n this.firefoxDeltaMultiplier = 1 / 30;\n }\n ngOnInit() {\n this._zone.runOutsideAngular(() => {\n this.parentElement = this.element.nativeElement.parentElement || this.element.nativeElement.parentNode;\n if (!this.parentElement) {\n return;\n }\n const targetElem = this.parentElement;\n targetElem.addEventListener('wheel', this.onWheel.bind(this));\n targetElem.addEventListener('touchstart', this.onTouchStart.bind(this));\n targetElem.addEventListener('touchmove', this.onTouchMove.bind(this));\n targetElem.addEventListener('touchend', this.onTouchEnd.bind(this));\n });\n }\n ngOnDestroy() {\n this._zone.runOutsideAngular(() => {\n const targetElem = this.parentElement;\n if (!targetElem) {\n return;\n }\n targetElem.removeEventListener('wheel', this.onWheel);\n targetElem.removeEventListener('touchstart', this.onTouchStart);\n targetElem.removeEventListener('touchmove', this.onTouchMove);\n targetElem.removeEventListener('touchend', this.onTouchEnd);\n });\n }\n /**\n * @hidden\n * Function that is called when scrolling with the mouse wheel or using touchpad\n */\n onWheel(evt) {\n // if no scrollbar return\n if (!this.IgxScrollInertiaScrollContainer) {\n return;\n }\n // if ctrl key is pressed and the user want to zoom in/out the page\n if (evt.ctrlKey) {\n return;\n }\n let scrollDeltaX;\n let scrollDeltaY;\n const scrollStep = this.wheelStep;\n const minWheelStep = 1 / this.wheelStep;\n const smoothing = this.smoothingDuration !== 0;\n this._startX = this.IgxScrollInertiaScrollContainer.scrollLeft;\n this._startY = this.IgxScrollInertiaScrollContainer.scrollTop;\n if (evt.wheelDeltaX) {\n /* Option supported on Chrome, Safari, Opera.\n /* 120 is default for mousewheel on these browsers. Other values are for trackpads */\n scrollDeltaX = -evt.wheelDeltaX * this.baseDeltaMultiplier;\n if (-minWheelStep < scrollDeltaX && scrollDeltaX < minWheelStep) {\n scrollDeltaX = Math.sign(scrollDeltaX) * minWheelStep;\n }\n }\n else if (evt.deltaX) {\n /* For other browsers that don't provide wheelDelta, use the deltaY to determine direction and pass default values. */\n const deltaScaledX = evt.deltaX * (evt.deltaMode === 0 ? this.firefoxDeltaMultiplier : 1);\n scrollDeltaX = this.calcAxisCoords(deltaScaledX, -1, 1);\n }\n /** Get delta for the Y axis */\n if (evt.wheelDeltaY) {\n /* Option supported on Chrome, Safari, Opera.\n /* 120 is default for mousewheel on these browsers. Other values are for trackpads */\n scrollDeltaY = -evt.wheelDeltaY * this.baseDeltaMultiplier;\n if (-minWheelStep < scrollDeltaY && scrollDeltaY < minWheelStep) {\n scrollDeltaY = Math.sign(scrollDeltaY) * minWheelStep;\n }\n }\n else if (evt.deltaY) {\n /* For other browsers that don't provide wheelDelta, use the deltaY to determine direction and pass default values. */\n const deltaScaledY = evt.deltaY * (evt.deltaMode === 0 ? this.firefoxDeltaMultiplier : 1);\n scrollDeltaY = this.calcAxisCoords(deltaScaledY, -1, 1);\n }\n if (evt.composedPath && this.didChildScroll(evt, scrollDeltaX, scrollDeltaY)) {\n return;\n }\n if (scrollDeltaX && this.IgxScrollInertiaDirection === 'horizontal') {\n const nextLeft = this._startX + scrollDeltaX * scrollStep;\n if (!smoothing) {\n this._scrollToX(nextLeft);\n }\n else {\n this._smoothWheelScroll(scrollDeltaX);\n }\n const maxScrollLeft = parseInt(this.IgxScrollInertiaScrollContainer.children[0].style.width, 10);\n if (0 < nextLeft && nextLeft < maxScrollLeft) {\n // Prevent navigating through pages when scrolling on Mac\n evt.preventDefault();\n }\n }\n else if (evt.shiftKey && scrollDeltaY && this.IgxScrollInertiaDirection === 'horizontal') {\n if (!smoothing) {\n const step = this._startX + scrollDeltaY * scrollStep;\n this._scrollToX(step);\n }\n else {\n this._smoothWheelScroll(scrollDeltaY);\n }\n }\n else if (!evt.shiftKey && scrollDeltaY && this.IgxScrollInertiaDirection === 'vertical') {\n const nextTop = this._startY + scrollDeltaY * scrollStep;\n if (!smoothing) {\n this._scrollToY(nextTop);\n }\n else {\n this._smoothWheelScroll(scrollDeltaY);\n }\n this.preventParentScroll(evt, true, nextTop);\n }\n }\n /**\n * @hidden\n * When there is still room to scroll up/down prevent the parent elements from scrolling too.\n */\n preventParentScroll(evt, preventDefault, nextTop = 0) {\n const curScrollTop = nextTop === 0 ? this.IgxScrollInertiaScrollContainer.scrollTop : nextTop;\n const maxScrollTop = this.IgxScrollInertiaScrollContainer.children[0].scrollHeight -\n this.IgxScrollInertiaScrollContainer.offsetHeight;\n if (0 < curScrollTop && curScrollTop < maxScrollTop) {\n if (preventDefault) {\n evt.preventDefault();\n }\n if (evt.stopPropagation) {\n evt.stopPropagation();\n }\n }\n }\n /**\n * @hidden\n * Checks if the wheel event would have scrolled an element under the display container\n * in DOM tree so that it can correctly be ignored until that element can no longer be scrolled.\n */\n didChildScroll(evt, scrollDeltaX, scrollDeltaY) {\n const path = evt.composedPath();\n let i = 0;\n while (i < path.length && path[i].localName !== 'igx-display-container') {\n const e = path[i++];\n if (e.scrollHeight > e.clientHeight) {\n const overflowY = window.getComputedStyle(e)['overflow-y'];\n if (overflowY === 'auto' || overflowY === 'scroll') {\n if (scrollDeltaY > 0 && e.scrollHeight - Math.abs(Math.round(e.scrollTop)) !== e.clientHeight) {\n return true;\n }\n if (scrollDeltaY < 0 && e.scrollTop !== 0) {\n return true;\n }\n }\n }\n if (e.scrollWidth > e.clientWidth) {\n const overflowX = window.getComputedStyle(e)['overflow-x'];\n if (overflowX === 'auto' || overflowX === 'scroll') {\n if (scrollDeltaX > 0 && e.scrollWidth - Math.abs(Math.round(e.scrollLeft)) !== e.clientWidth) {\n return true;\n }\n if (scrollDeltaX < 0 && e.scrollLeft !== 0) {\n return true;\n }\n }\n }\n }\n return false;\n }\n /**\n * @hidden\n * Function that is called the first moment we start interacting with the content on a touch device\n */\n onTouchStart(event) {\n if (!this.IgxScrollInertiaScrollContainer) {\n return false;\n }\n // stops any current ongoing inertia\n cancelAnimationFrame(this._touchInertiaAnimID);\n const touch = event.touches[0];\n this._startX = this.IgxScrollInertiaScrollContainer.scrollLeft;\n this._startY = this.IgxScrollInertiaScrollContainer.scrollTop;\n this._touchStartX = touch.pageX;\n this._touchStartY = touch.pageY;\n this._lastTouchEnd = new Date().getTime();\n this._lastTouchX = touch.pageX;\n this._lastTouchY = touch.pageY;\n this._savedSpeedsX = [];\n this._savedSpeedsY = [];\n // Vars regarding swipe offset\n this._totalMovedX = 0;\n this._offsetRecorded = false;\n this._offsetDirection = 0;\n if (this.IgxScrollInertiaDirection === 'vertical') {\n this.preventParentScroll(event, false);\n }\n }\n /**\n * @hidden\n * Function that is called when we need to scroll the content based on touch interactions\n */\n onTouchMove(event) {\n if (!this.IgxScrollInertiaScrollContainer) {\n return;\n }\n const touch = event.touches[0];\n const destX = this._startX + (this._touchStartX - touch.pageX) * Math.sign(this.inertiaStep);\n const destY = this._startY + (this._touchStartY - touch.pageY) * Math.sign(this.inertiaStep);\n /* Handle complex touchmoves when swipe stops but the toch doesn't end and then a swipe is initiated again */\n /* **********************************************************/\n const timeFromLastTouch = (new Date().getTime()) - this._lastTouchEnd;\n if (timeFromLastTouch !== 0 && timeFromLastTouch < 100) {\n const speedX = (this._lastTouchX - touch.pageX) / timeFromLastTouch;\n const speedY = (this._lastTouchY - touch.pageY) / timeFromLastTouch;\n // Save the last 5 speeds between two touchmoves on X axis\n if (this._savedSpeedsX.length < 5) {\n this._savedSpeedsX.push(speedX);\n }\n else {\n this._savedSpeedsX.shift();\n this._savedSpeedsX.push(speedX);\n }\n // Save the last 5 speeds between two touchmoves on Y axis\n if (this._savedSpeedsY.length < 5) {\n this._savedSpeedsY.push(speedY);\n }\n else {\n this._savedSpeedsY.shift();\n this._savedSpeedsY.push(speedY);\n }\n }\n this._lastTouchEnd = new Date().getTime();\n this._lastMovedX = this._lastTouchX - touch.pageX;\n this._lastMovedY = this._lastTouchY - touch.pageY;\n this._lastTouchX = touch.pageX;\n this._lastTouchY = touch.pageY;\n this._totalMovedX += this._lastMovedX;\n /*\tDo not scroll using touch untill out of the swipeToleranceX bounds */\n if (Math.abs(this._totalMovedX) < this.swipeToleranceX && !this._offsetRecorded) {\n this._scrollTo(this._startX, destY);\n }\n else {\n /*\tRecord the direction the first time we are out of the swipeToleranceX bounds.\n *\tThat way we know which direction we apply the offset so it doesn't hickup when moving out of the swipeToleranceX bounds */\n if (!this._offsetRecorded) {\n this._offsetDirection = Math.sign(destX - this._startX);\n this._offsetRecorded = true;\n }\n /*\tScroll with offset ammout of swipeToleranceX in the direction we have exited the bounds and\n don't change it after that ever until touchend and again touchstart */\n this._scrollTo(destX - this._offsetDirection * this.swipeToleranceX, destY);\n }\n // On Safari preventing the touchmove would prevent default page scroll behaviour even if there is the element doesn't have overflow\n if (this.IgxScrollInertiaDirection === 'vertical') {\n this.preventParentScroll(event, true);\n }\n }\n onTouchEnd(event) {\n let speedX = 0;\n let speedY = 0;\n // savedSpeedsX and savedSpeedsY have same length\n for (let i = 0; i < this._savedSpeedsX.length; i++) {\n speedX += this._savedSpeedsX[i];\n speedY += this._savedSpeedsY[i];\n }\n speedX = this._savedSpeedsX.length ? speedX / this._savedSpeedsX.length : 0;\n speedY = this._savedSpeedsX.length ? speedY / this._savedSpeedsY.length : 0;\n // Use the lastMovedX and lastMovedY to determine if the swipe stops without lifting the finger so we don't start inertia\n if ((Math.abs(speedX) > 0.1 || Math.abs(speedY) > 0.1) &&\n (Math.abs(this._lastMovedX) > 2 || Math.abs(this._lastMovedY) > 2)) {\n this._inertiaInit(speedX, speedY);\n }\n if (this.IgxScrollInertiaDirection === 'vertical') {\n this.preventParentScroll(event, false);\n }\n }\n _smoothWheelScroll(delta) {\n this._nextY = this.IgxScrollInertiaScrollContainer.scrollTop;\n this._nextX = this.IgxScrollInertiaScrollContainer.scrollLeft;\n let x = -1;\n let wheelInertialAnimation = null;\n const inertiaWheelStep = () => {\n if (x > 1) {\n cancelAnimationFrame(wheelInertialAnimation);\n return;\n }\n const nextScroll = ((-3 * x * x + 3) * delta * 2) * this.smoothingStep;\n if (this.IgxScrollInertiaDirection === 'vertical') {\n this._nextY += nextScroll;\n this._scrollToY(this._nextY);\n }\n else {\n this._nextX += nextScroll;\n this._scrollToX(this._nextX);\n }\n //continue the inertia\n x += 0.08 * (1 / this.smoothingDuration);\n wheelInertialAnimation = requestAnimationFrame(inertiaWheelStep);\n };\n wheelInertialAnimation = requestAnimationFrame(inertiaWheelStep);\n }\n _inertiaInit(speedX, speedY) {\n const stepModifer = this.inertiaStep;\n const inertiaDuration = this.inertiaDuration;\n let x = 0;\n this._nextX = this.IgxScrollInertiaScrollContainer.scrollLeft;\n this._nextY = this.IgxScrollInertiaScrollContainer.scrollTop;\n // Sets timeout until executing next movement iteration of the inertia\n const inertiaStep = () => {\n if (x > 6) {\n cancelAnimationFrame(this._touchInertiaAnimID);\n return;\n }\n if (Math.abs(speedX) > Math.abs(speedY)) {\n x += 0.05 / (1 * inertiaDuration);\n }\n else {\n x += 0.05 / (1 * inertiaDuration);\n }\n if (x <= 1) {\n // We use constant quation to determine the offset without speed falloff befor x reaches 1\n if (Math.abs(speedY) <= Math.abs(speedX) * this.inertiaDeltaY) {\n this._nextX += 1 * speedX * 15 * stepModifer;\n }\n if (Math.abs(speedY) >= Math.abs(speedX) * this.inertiaDeltaX) {\n this._nextY += 1 * speedY * 15 * stepModifer;\n }\n }\n else {\n // We use the quation \"y = 2 / (x + 0.55) - 0.3\" to determine the offset\n if (Math.abs(speedY) <= Math.abs(speedX) * this.inertiaDeltaY) {\n this._nextX += Math.abs(2 / (x + 0.55) - 0.3) * speedX * 15 * stepModifer;\n }\n if (Math.abs(speedY) >= Math.abs(speedX) * this.inertiaDeltaX) {\n this._nextY += Math.abs(2 / (x + 0.55) - 0.3) * speedY * 15 * stepModifer;\n }\n }\n // If we have mixed environment we use the default behaviour. i.e. touchscreen + mouse\n this._scrollTo(this._nextX, this._nextY);\n this._touchInertiaAnimID = requestAnimationFrame(inertiaStep);\n };\n // Start inertia and continue it recursively\n this._touchInertiaAnimID = requestAnimationFrame(inertiaStep);\n }\n calcAxisCoords(target, min, max) {\n if (target === undefined || target < min) {\n target = min;\n }\n else if (target > max) {\n target = max;\n }\n return target;\n }\n _scrollTo(destX, destY) {\n // TODO Trigger scrolling event?\n const scrolledX = this._scrollToX(destX);\n const scrolledY = this._scrollToY(destY);\n return { x: scrolledX, y: scrolledY };\n }\n _scrollToX(dest) {\n this.IgxScrollInertiaScrollContainer.scrollLeft = dest;\n }\n _scrollToY(dest) {\n this.IgxScrollInertiaScrollContainer.scrollTop = dest;\n }\n}\nIgxScrollInertiaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxScrollInertiaDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nIgxScrollInertiaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxScrollInertiaDirective, selector: \"[igxScrollInertia]\", inputs: { IgxScrollInertiaDirection: \"IgxScrollInertiaDirection\", IgxScrollInertiaScrollContainer: \"IgxScrollInertiaScrollContainer\", wheelStep: \"wheelStep\", inertiaStep: \"inertiaStep\", smoothingStep: \"smoothingStep\", smoothingDuration: \"smoothingDuration\", swipeToleranceX: \"swipeToleranceX\", inertiaDeltaY: \"inertiaDeltaY\", inertiaDeltaX: \"inertiaDeltaX\", inertiaDuration: \"inertiaDuration\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxScrollInertiaDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxScrollInertia]' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { IgxScrollInertiaDirection: [{\n type: Input\n }], IgxScrollInertiaScrollContainer: [{\n type: Input\n }], wheelStep: [{\n type: Input\n }], inertiaStep: [{\n type: Input\n }], smoothingStep: [{\n type: Input\n }], smoothingDuration: [{\n type: Input\n }], swipeToleranceX: [{\n type: Input\n }], inertiaDeltaY: [{\n type: Input\n }], inertiaDeltaX: [{\n type: Input\n }], inertiaDuration: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxScrollInertiaModule {\n}\nIgxScrollInertiaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxScrollInertiaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxScrollInertiaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxScrollInertiaModule, declarations: [IgxScrollInertiaDirective], imports: [CommonModule], exports: [IgxScrollInertiaDirective] });\nIgxScrollInertiaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxScrollInertiaModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxScrollInertiaModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxScrollInertiaDirective],\n exports: [IgxScrollInertiaDirective],\n imports: [CommonModule]\n }]\n }] });\n\nclass DisplayContainerComponent {\n constructor(cdr, _viewContainer) {\n this.cdr = cdr;\n this._viewContainer = _viewContainer;\n this.cssClass = 'igx-display-container';\n this.notVirtual = true;\n }\n}\nDisplayContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: DisplayContainerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });\nDisplayContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: DisplayContainerComponent, selector: \"igx-display-container\", host: { properties: { \"class\": \"this.cssClass\", \"class.igx-display-container--inactive\": \"this.notVirtual\" } }, viewQueries: [{ propertyName: \"_vcr\", first: true, predicate: [\"display_container\"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: \"_scrollInertia\", first: true, predicate: [\"display_container\"], descendants: true, read: IgxScrollInertiaDirective, static: true }], ngImport: i0, template: `\n \n
    \n `, isInline: true, dependencies: [{ kind: \"directive\", type: IgxScrollInertiaDirective, selector: \"[igxScrollInertia]\", inputs: [\"IgxScrollInertiaDirection\", \"IgxScrollInertiaScrollContainer\", \"wheelStep\", \"inertiaStep\", \"smoothingStep\", \"smoothingDuration\", \"swipeToleranceX\", \"inertiaDeltaY\", \"inertiaDeltaX\", \"inertiaDuration\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: DisplayContainerComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-display-container',\n template: `\n \n
    \n `\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { _vcr: [{\n type: ViewChild,\n args: ['display_container', { read: ViewContainerRef, static: true }]\n }], _scrollInertia: [{\n type: ViewChild,\n args: ['display_container', { read: IgxScrollInertiaDirective, static: true }]\n }], cssClass: [{\n type: HostBinding,\n args: ['class']\n }], notVirtual: [{\n type: HostBinding,\n args: ['class.igx-display-container--inactive']\n }] } });\n\nclass VirtualHelperBaseDirective {\n constructor(elementRef, cdr, _zone, document, platformUtil) {\n this.elementRef = elementRef;\n this.cdr = cdr;\n this._zone = _zone;\n this.document = document;\n this.platformUtil = platformUtil;\n this.scrollAmount = 0;\n this._size = 0;\n this.destroy$ = new Subject();\n this._afterViewInit = false;\n this._detached = false;\n this._scrollNativeSize = this.calculateScrollNativeSize();\n }\n onScroll(event) {\n this.scrollAmount = event.target.scrollTop || event.target.scrollLeft;\n }\n ngAfterViewInit() {\n this._afterViewInit = true;\n if (!this.platformUtil.isBrowser) {\n return;\n }\n const delayTime = 0;\n this._zone.runOutsideAngular(() => {\n resizeObservable(this.nativeElement).pipe(throttleTime(delayTime), takeUntil(this.destroy$)).subscribe((event) => this.handleMutations(event));\n });\n }\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n ngOnDestroy() {\n this.destroyed = true;\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n calculateScrollNativeSize() {\n const div = this.document.createElement('div');\n const style = div.style;\n style.width = '100px';\n style.height = '100px';\n style.position = 'absolute';\n style.top = '-10000px';\n style.top = '-10000px';\n style.overflow = 'scroll';\n this.document.body.appendChild(div);\n const scrollWidth = div.offsetWidth - div.clientWidth;\n this.document.body.removeChild(div);\n return scrollWidth ? scrollWidth + 1 : 1;\n }\n set size(value) {\n if (this.destroyed) {\n return;\n }\n this._size = value;\n if (this._afterViewInit) {\n this.cdr.detectChanges();\n }\n }\n get size() {\n return this._size;\n }\n get scrollNativeSize() {\n return this._scrollNativeSize;\n }\n get isAttachedToDom() {\n return this.document.body.contains(this.nativeElement);\n }\n handleMutations(event) {\n const hasSize = !(event[0].contentRect.height === 0 && event[0].contentRect.width === 0);\n if (!hasSize && !this.isAttachedToDom) {\n // scroll bar detached from DOM\n this._detached = true;\n }\n else if (this._detached && hasSize && this.isAttachedToDom) {\n // attached back now.\n this.restoreScroll();\n }\n }\n restoreScroll() { }\n}\nVirtualHelperBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: VirtualHelperBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nVirtualHelperBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: VirtualHelperBaseDirective, selector: \"[igxVirtualHelperBase]\", host: { listeners: { \"scroll\": \"onScroll($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: VirtualHelperBaseDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxVirtualHelperBase]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: PlatformUtil }]; }, propDecorators: { onScroll: [{\n type: HostListener,\n args: ['scroll', ['$event']]\n }] } });\n\n/**\n * @hidden\n */\nclass HVirtualHelperComponent extends VirtualHelperBaseDirective {\n constructor(elementRef, cdr, zone, document, platformUtil) {\n super(elementRef, cdr, zone, document, platformUtil);\n this.cssClasses = 'igx-vhelper--horizontal';\n }\n restoreScroll() {\n this.nativeElement.scrollLeft = this.scrollAmount;\n }\n}\nHVirtualHelperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: HVirtualHelperComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nHVirtualHelperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: HVirtualHelperComponent, selector: \"igx-horizontal-virtual-helper\", inputs: { width: \"width\" }, host: { properties: { \"class\": \"this.cssClasses\" } }, viewQueries: [{ propertyName: \"_vcr\", first: true, predicate: [\"horizontal_container\"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: '
    ', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: HVirtualHelperComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-horizontal-virtual-helper',\n template: '
    '\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: PlatformUtil }]; }, propDecorators: { _vcr: [{\n type: ViewChild,\n args: ['horizontal_container', { read: ViewContainerRef, static: true }]\n }], width: [{\n type: Input\n }], cssClasses: [{\n type: HostBinding,\n args: ['class']\n }] } });\n\nclass VirtualHelperComponent extends VirtualHelperBaseDirective {\n constructor(elementRef, cdr, zone, document, platformUtil) {\n super(elementRef, cdr, zone, document, platformUtil);\n this.cssClasses = 'igx-vhelper--vertical';\n }\n ngOnInit() {\n this.scrollWidth = this.scrollNativeSize;\n }\n restoreScroll() {\n this.nativeElement.scrollTop = this.scrollAmount;\n }\n}\nVirtualHelperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: VirtualHelperComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nVirtualHelperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: VirtualHelperComponent, selector: \"igx-virtual-helper\", inputs: { itemsLength: \"itemsLength\" }, host: { properties: { \"scrollTop\": \"this.scrollTop\", \"style.width.px\": \"this.scrollWidth\", \"class\": \"this.cssClasses\" } }, viewQueries: [{ propertyName: \"_vcr\", first: true, predicate: [\"container\"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: '
    ', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: VirtualHelperComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-virtual-helper',\n template: '
    '\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: PlatformUtil }]; }, propDecorators: { scrollTop: [{\n type: HostBinding,\n args: ['scrollTop']\n }], scrollWidth: [{\n type: HostBinding,\n args: ['style.width.px']\n }], _vcr: [{\n type: ViewChild,\n args: ['container', { read: ViewContainerRef, static: true }]\n }], itemsLength: [{\n type: Input\n }], cssClasses: [{\n type: HostBinding,\n args: ['class']\n }] } });\n\nclass IgxForOfSyncService {\n constructor() {\n this._master = new Map();\n }\n /**\n * @hidden\n */\n isMaster(directive) {\n return this._master.get(directive.igxForScrollOrientation) === directive;\n }\n /**\n * @hidden\n */\n setMaster(directive, forced = false) {\n const orientation = directive.igxForScrollOrientation;\n if (orientation && (forced || !this._master.has(orientation))) {\n this._master.set(orientation, directive);\n }\n }\n /**\n * @hidden\n */\n resetMaster() {\n this._master.clear();\n }\n /**\n * @hidden\n */\n sizesCache(dir) {\n return this._master.get(dir).sizesCache;\n }\n /**\n * @hidden\n */\n chunkSize(dir) {\n return this._master.get(dir).state.chunkSize;\n }\n}\nIgxForOfSyncService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfSyncService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxForOfSyncService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfSyncService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfSyncService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\nclass IgxForOfScrollSyncService {\n constructor() {\n this._masterScroll = new Map();\n }\n setScrollMaster(dir, scroll) {\n this._masterScroll.set(dir, scroll);\n }\n getScrollMaster(dir) {\n return this._masterScroll.get(dir);\n }\n}\nIgxForOfScrollSyncService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfScrollSyncService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxForOfScrollSyncService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfScrollSyncService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfScrollSyncService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\n\n/* eslint-disable @angular-eslint/no-conflicting-lifecycle */\nconst MAX_PERF_SCROLL_DIFF = 4;\n/**\n * @publicApi\n */\nclass IgxForOfContext {\n constructor($implicit, index, count) {\n this.$implicit = $implicit;\n this.index = index;\n this.count = count;\n }\n /**\n * A function that returns whether the element is the first or not\n */\n get first() {\n return this.index === 0;\n }\n /**\n * A function that returns whether the element is the last or not\n */\n get last() {\n return this.index === this.count - 1;\n }\n /**\n * A function that returns whether the element is even or not\n */\n get even() {\n return this.index % 2 === 0;\n }\n /**\n * A function that returns whether the element is odd or not\n */\n get odd() {\n return !this.even;\n }\n}\n// eslint-disable @angular-eslint/no-conflicting-lifecycle\nclass IgxForOfDirective {\n /**\n * The total count of the virtual data items, when using remote service.\n * Similar to the property totalItemCount, but this will allow setting the data count into the template.\n * ```html\n * \n * ```\n */\n get igxForTotalItemCount() {\n return this.totalItemCount;\n }\n set igxForTotalItemCount(value) {\n this.totalItemCount = value;\n }\n /**\n * The total count of the virtual data items, when using remote service.\n * ```typescript\n * this.parentVirtDir.totalItemCount = data.Count;\n * ```\n */\n get totalItemCount() {\n return this._totalItemCount;\n }\n set totalItemCount(val) {\n if (this._totalItemCount !== val) {\n this._totalItemCount = val;\n // update sizes in case total count changes.\n const newSize = this.initSizesCache(this.igxForOf);\n const sizeDiff = this.scrollComponent.size - newSize;\n this.scrollComponent.size = newSize;\n const lastChunkExceeded = this.state.startIndex + this.state.chunkSize > val;\n if (lastChunkExceeded) {\n this.state.startIndex = val - this.state.chunkSize;\n }\n this._adjustScrollPositionAfterSizeChange(sizeDiff);\n }\n }\n get displayContainer() {\n return this.dc?.instance?._viewContainer?.element?.nativeElement;\n }\n get virtualHelper() {\n return this.scrollComponent.nativeElement;\n }\n /**\n * @hidden\n */\n get isRemote() {\n return this.totalItemCount !== null;\n }\n /**\n *\n * Gets/Sets the scroll position.\n * ```typescript\n * const position = directive.scrollPosition;\n * directive.scrollPosition = value;\n * ```\n */\n get scrollPosition() {\n return this.scrollComponent.scrollAmount;\n }\n set scrollPosition(val) {\n if (val === this.scrollComponent.scrollAmount) {\n return;\n }\n if (this.igxForScrollOrientation === 'horizontal' && this.scrollComponent) {\n this.scrollComponent.nativeElement.scrollLeft = val;\n }\n else if (this.scrollComponent) {\n this.scrollComponent.nativeElement.scrollTop = val;\n }\n }\n /**\n * @hidden\n */\n get isRTL() {\n const dir = window.getComputedStyle(this.dc.instance._viewContainer.element.nativeElement).getPropertyValue('direction');\n return dir === 'rtl';\n }\n get sizesCache() {\n return this._sizesCache;\n }\n set sizesCache(value) {\n this._sizesCache = value;\n }\n get _isScrolledToBottom() {\n if (!this.getScroll()) {\n return true;\n }\n const scrollHeight = this.getScroll().scrollHeight;\n // Use === and not >= because `scrollTop + container size` can't be bigger than `scrollHeight`, unless something isn't updated.\n // Also use Math.round because Chrome has some inconsistencies and `scrollTop + container` can be float when zooming the page.\n return Math.round(this.getScroll().scrollTop + this.igxForContainerSize) === scrollHeight;\n }\n get _isAtBottomIndex() {\n return this.igxForOf && this.state.startIndex + this.state.chunkSize > this.igxForOf.length;\n }\n constructor(_viewContainer, _template, _differs, cdr, _zone, syncScrollService, platformUtil, document) {\n this._viewContainer = _viewContainer;\n this._template = _template;\n this._differs = _differs;\n this.cdr = cdr;\n this._zone = _zone;\n this.syncScrollService = syncScrollService;\n this.platformUtil = platformUtil;\n this.document = document;\n /**\n * An @Input property that specifies the scroll orientation.\n * Scroll orientation can be \"vertical\" or \"horizontal\".\n * ```html\n * \n * ```\n */\n this.igxForScrollOrientation = 'vertical';\n /**\n * An event that is emitted after a new chunk has been loaded.\n * ```html\n * \n * ```\n * ```typescript\n * loadChunk(e){\n * alert(\"chunk loaded!\");\n * }\n * ```\n */\n this.chunkLoad = new EventEmitter();\n /**\n * @hidden @internal\n * An event that is emitted when scrollbar visibility has changed.\n */\n this.scrollbarVisibilityChanged = new EventEmitter();\n /**\n * An event that is emitted after the rendered content size of the igxForOf has been changed.\n */\n this.contentSizeChange = new EventEmitter();\n /**\n * An event that is emitted after data has been changed.\n * ```html\n * \n * ```\n * ```typescript\n * dataChanged(e){\n * alert(\"data changed!\");\n * }\n * ```\n */\n this.dataChanged = new EventEmitter();\n this.beforeViewDestroyed = new EventEmitter();\n /**\n * An event that is emitted on chunk loading to emit the current state information - startIndex, endIndex, totalCount.\n * Can be used for implementing remote load on demand for the igxFor data.\n * ```html\n * \n * ```\n * ```typescript\n * chunkPreload(e){\n * alert(\"chunk is loading!\");\n * }\n * ```\n */\n this.chunkPreload = new EventEmitter();\n /**\n * The current state of the directive. It contains `startIndex` and `chunkSize`.\n * state.startIndex - The index of the item at which the current visible chunk begins.\n * state.chunkSize - The number of items the current visible chunk holds.\n * These options can be used when implementing remote virtualization as they provide the necessary state information.\n * ```typescript\n * const gridState = this.parentVirtDir.state;\n * ```\n */\n this.state = {\n startIndex: 0,\n chunkSize: 0\n };\n this._sizesCache = [];\n this._differ = null;\n this.heightCache = [];\n /** Internal track for scroll top that is being virtualized */\n this._virtScrollTop = 0;\n /** If the next onScroll event is triggered due to internal setting of scrollTop */\n this._bScrollInternal = false;\n // End properties related to virtual height handling\n this._embeddedViews = [];\n this.contentResizeNotify = new Subject();\n /** Height that is being virtualized. */\n this._virtHeight = 0;\n /**\n * @hidden\n */\n this.destroy$ = new Subject();\n this._totalItemCount = null;\n /**\n * Ratio for height that's being virtualizaed and the one visible\n * If _virtHeightRatio = 1, the visible height and the virtualized are the same, also _maxHeight > _virtHeight.\n */\n this._virtHeightRatio = 1;\n }\n verticalScrollHandler(event) {\n this.onScroll(event);\n }\n isScrollable() {\n return this.scrollComponent.size > parseInt(this.igxForContainerSize, 10);\n }\n /**\n * @hidden\n */\n ngOnInit() {\n let totalSize = 0;\n const vc = this.igxForScrollContainer ? this.igxForScrollContainer._viewContainer : this._viewContainer;\n this.igxForSizePropName = this.igxForSizePropName || 'width';\n this.dc = this._viewContainer.createComponent(DisplayContainerComponent, { index: 0 });\n this.dc.instance.scrollDirection = this.igxForScrollOrientation;\n if (this.igxForOf && this.igxForOf.length) {\n totalSize = this.initSizesCache(this.igxForOf);\n this.scrollComponent = this.syncScrollService.getScrollMaster(this.igxForScrollOrientation);\n this.state.chunkSize = this._calculateChunkSize();\n this.dc.instance.notVirtual = !(this.igxForContainerSize && this.state.chunkSize < this.igxForOf.length);\n if (this.scrollComponent && !this.scrollComponent.destroyed) {\n this.state.startIndex = Math.min(this.getIndexAt(this.scrollPosition, this.sizesCache), this.igxForOf.length - this.state.chunkSize);\n }\n for (let i = this.state.startIndex; i < this.state.startIndex + this.state.chunkSize &&\n this.igxForOf[i] !== undefined; i++) {\n const input = this.igxForOf[i];\n const embeddedView = this.dc.instance._vcr.createEmbeddedView(this._template, new IgxForOfContext(input, this.getContextIndex(input), this.igxForOf.length));\n this._embeddedViews.push(embeddedView);\n }\n }\n if (this.igxForScrollOrientation === 'vertical') {\n this.dc.instance._viewContainer.element.nativeElement.style.top = '0px';\n this.scrollComponent = this.syncScrollService.getScrollMaster(this.igxForScrollOrientation);\n if (!this.scrollComponent || this.scrollComponent.destroyed) {\n this.scrollComponent = vc.createComponent(VirtualHelperComponent).instance;\n }\n this._maxHeight = this._calcMaxBrowserHeight();\n this.scrollComponent.size = this.igxForOf ? this._calcHeight() : 0;\n this.syncScrollService.setScrollMaster(this.igxForScrollOrientation, this.scrollComponent);\n this._zone.runOutsideAngular(() => {\n this.verticalScrollHandler = this.verticalScrollHandler.bind(this);\n this.scrollComponent.nativeElement.addEventListener('scroll', this.verticalScrollHandler);\n this.dc.instance.scrollContainer = this.scrollComponent.nativeElement;\n });\n const destructor = takeUntil(this.destroy$);\n this.contentResizeNotify.pipe(filter(() => this.igxForContainerSize && this.igxForOf && this.igxForOf.length > 0), throttleTime(40, undefined, { leading: true, trailing: true }), destructor).subscribe(() => this._zone.runTask(() => this.updateSizes()));\n }\n if (this.igxForScrollOrientation === 'horizontal') {\n this.func = (evt) => this.onHScroll(evt);\n this.scrollComponent = this.syncScrollService.getScrollMaster(this.igxForScrollOrientation);\n if (!this.scrollComponent) {\n this.scrollComponent = vc.createComponent(HVirtualHelperComponent).instance;\n this.scrollComponent.size = totalSize;\n this.syncScrollService.setScrollMaster(this.igxForScrollOrientation, this.scrollComponent);\n this._zone.runOutsideAngular(() => {\n this.scrollComponent.nativeElement.addEventListener('scroll', this.func);\n this.dc.instance.scrollContainer = this.scrollComponent.nativeElement;\n });\n }\n else {\n this._zone.runOutsideAngular(() => {\n this.scrollComponent.nativeElement.addEventListener('scroll', this.func);\n this.dc.instance.scrollContainer = this.scrollComponent.nativeElement;\n });\n }\n this._updateHScrollOffset();\n }\n }\n ngAfterViewInit() {\n if (this.igxForScrollOrientation === 'vertical') {\n this._zone.runOutsideAngular(() => {\n this.contentObserver = new (getResizeObserver())(() => this.contentResizeNotify.next());\n this.contentObserver.observe(this.dc.instance._viewContainer.element.nativeElement);\n });\n }\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this.removeScrollEventListeners();\n this.destroy$.next(true);\n this.destroy$.complete();\n if (this.contentObserver) {\n this.contentObserver.disconnect();\n }\n }\n /**\n * @hidden\n */\n ngOnChanges(changes) {\n const forOf = 'igxForOf';\n if (forOf in changes) {\n const value = changes[forOf].currentValue;\n if (!this._differ && value) {\n try {\n this._differ = this._differs.find(value).create(this.igxForTrackBy);\n }\n catch (e) {\n throw new Error(`Cannot find a differ supporting object \"${value}\" of type \"${getTypeNameForDebugging(value)}\".\n NgFor only supports binding to Iterables such as Arrays.`);\n }\n }\n }\n const defaultItemSize = 'igxForItemSize';\n if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&\n this.igxForScrollOrientation === 'vertical' && this.igxForOf) {\n // handle default item size changed.\n this.initSizesCache(this.igxForOf);\n this._applyChanges();\n }\n const containerSize = 'igxForContainerSize';\n if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {\n this._recalcOnContainerChange();\n }\n }\n /**\n * @hidden\n */\n ngDoCheck() {\n if (this._differ) {\n const changes = this._differ.diff(this.igxForOf);\n if (changes) {\n // re-init cache.\n if (!this.igxForOf) {\n this.igxForOf = [];\n }\n this._updateSizeCache();\n this._zone.run(() => {\n this._applyChanges();\n this.cdr.markForCheck();\n this._updateScrollOffset();\n this.dataChanged.emit();\n });\n }\n }\n }\n /**\n * Shifts the scroll thumb position.\n * ```typescript\n * this.parentVirtDir.addScrollTop(5);\n * ```\n *\n * @param addTop negative value to scroll up and positive to scroll down;\n */\n addScrollTop(addTop) {\n if (addTop === 0 && this.igxForScrollOrientation === 'horizontal') {\n return false;\n }\n const originalVirtScrollTop = this._virtScrollTop;\n const containerSize = parseInt(this.igxForContainerSize, 10);\n const maxVirtScrollTop = this._virtHeight - containerSize;\n this._bScrollInternal = true;\n this._virtScrollTop += addTop;\n this._virtScrollTop = this._virtScrollTop > 0 ?\n (this._virtScrollTop < maxVirtScrollTop ? this._virtScrollTop : maxVirtScrollTop) :\n 0;\n this.scrollPosition += addTop / this._virtHeightRatio;\n if (Math.abs(addTop / this._virtHeightRatio) < 1) {\n // Actual scroll delta that was added is smaller than 1 and onScroll handler doesn't trigger when scrolling < 1px\n const scrollOffset = this.fixedUpdateAllElements(this._virtScrollTop);\n // scrollOffset = scrollOffset !== parseInt(this.igxForItemSize, 10) ? scrollOffset : 0;\n this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';\n }\n const maxRealScrollTop = this.scrollComponent.nativeElement.scrollHeight - containerSize;\n if ((this._virtScrollTop > 0 && this.scrollPosition === 0) ||\n (this._virtScrollTop < maxVirtScrollTop && this.scrollPosition === maxRealScrollTop)) {\n // Actual scroll position is at the top or bottom, but virtual one is not at the top or bottom (there's more to scroll)\n // Recalculate actual scroll position based on the virtual scroll.\n this.scrollPosition = this._virtScrollTop / this._virtHeightRatio;\n }\n else if (this._virtScrollTop === 0 && this.scrollPosition > 0) {\n // Actual scroll position is not at the top, but virtual scroll is. Just update the actual scroll\n this.scrollPosition = 0;\n }\n else if (this._virtScrollTop === maxVirtScrollTop && this.scrollPosition < maxRealScrollTop) {\n // Actual scroll position is not at the bottom, but virtual scroll is. Just update the acual scroll\n this.scrollPosition = maxRealScrollTop;\n }\n return this._virtScrollTop !== originalVirtScrollTop;\n }\n /**\n * Scrolls to the specified index.\n * ```typescript\n * this.parentVirtDir.scrollTo(5);\n * ```\n *\n * @param index\n */\n scrollTo(index) {\n if (index < 0 || index > (this.isRemote ? this.totalItemCount : this.igxForOf.length) - 1) {\n return;\n }\n const containerSize = parseInt(this.igxForContainerSize, 10);\n const isPrevItem = index < this.state.startIndex || this.scrollPosition > this.sizesCache[index];\n let nextScroll = isPrevItem ? this.sizesCache[index] : this.sizesCache[index + 1] - containerSize;\n if (nextScroll < 0) {\n return;\n }\n if (this.igxForScrollOrientation === 'horizontal') {\n this.scrollPosition = this.isRTL ? -nextScroll : nextScroll;\n }\n else {\n const maxVirtScrollTop = this._virtHeight - containerSize;\n if (nextScroll > maxVirtScrollTop) {\n nextScroll = maxVirtScrollTop;\n }\n this._bScrollInternal = true;\n this._virtScrollTop = nextScroll;\n this.scrollPosition = this._virtScrollTop / this._virtHeightRatio;\n this._adjustToIndex = !isPrevItem ? index : null;\n }\n }\n /**\n * Scrolls by one item into the appropriate next direction.\n * For \"horizontal\" orientation that will be the right column and for \"vertical\" that is the lower row.\n * ```typescript\n * this.parentVirtDir.scrollNext();\n * ```\n */\n scrollNext() {\n const scr = Math.abs(Math.ceil(this.scrollPosition));\n const endIndex = this.getIndexAt(scr + parseInt(this.igxForContainerSize, 10), this.sizesCache);\n this.scrollTo(endIndex);\n }\n /**\n * Scrolls by one item into the appropriate previous direction.\n * For \"horizontal\" orientation that will be the left column and for \"vertical\" that is the upper row.\n * ```typescript\n * this.parentVirtDir.scrollPrev();\n * ```\n */\n scrollPrev() {\n this.scrollTo(this.state.startIndex - 1);\n }\n /**\n * Scrolls by one page into the appropriate next direction.\n * For \"horizontal\" orientation that will be one view to the right and for \"vertical\" that is one view to the bottom.\n * ```typescript\n * this.parentVirtDir.scrollNextPage();\n * ```\n */\n scrollNextPage() {\n if (this.igxForScrollOrientation === 'horizontal') {\n this.scrollPosition += this.isRTL ? -parseInt(this.igxForContainerSize, 10) : parseInt(this.igxForContainerSize, 10);\n }\n else {\n this.addScrollTop(parseInt(this.igxForContainerSize, 10));\n }\n }\n /**\n * Scrolls by one page into the appropriate previous direction.\n * For \"horizontal\" orientation that will be one view to the left and for \"vertical\" that is one view to the top.\n * ```typescript\n * this.parentVirtDir.scrollPrevPage();\n * ```\n */\n scrollPrevPage() {\n if (this.igxForScrollOrientation === 'horizontal') {\n this.scrollPosition -= this.isRTL ? -parseInt(this.igxForContainerSize, 10) : parseInt(this.igxForContainerSize, 10);\n }\n else {\n const containerSize = (parseInt(this.igxForContainerSize, 10));\n this.addScrollTop(-containerSize);\n }\n }\n /**\n * @hidden\n */\n getColumnScrollLeft(colIndex) {\n return this.sizesCache[colIndex];\n }\n /**\n * Returns the total number of items that are fully visible.\n * ```typescript\n * this.parentVirtDir.getItemCountInView();\n * ```\n */\n getItemCountInView() {\n let startIndex = this.getIndexAt(this.scrollPosition, this.sizesCache);\n if (this.scrollPosition - this.sizesCache[startIndex] > 0) {\n // fisrt item is not fully in view\n startIndex++;\n }\n const endIndex = this.getIndexAt(this.scrollPosition + parseInt(this.igxForContainerSize, 10), this.sizesCache);\n return endIndex - startIndex;\n }\n /**\n * Returns a reference to the scrollbar DOM element.\n * This is either a vertical or horizontal scrollbar depending on the specified igxForScrollOrientation.\n * ```typescript\n * dir.getScroll();\n * ```\n */\n getScroll() {\n return this.scrollComponent?.nativeElement;\n }\n /**\n * Returns the size of the element at the specified index.\n * ```typescript\n * this.parentVirtDir.getSizeAt(1);\n * ```\n */\n getSizeAt(index) {\n return this.sizesCache[index + 1] - this.sizesCache[index];\n }\n /**\n * @hidden\n * Function that is called to get the native scrollbar size that the browsers renders.\n */\n getScrollNativeSize() {\n return this.scrollComponent ? this.scrollComponent.scrollNativeSize : 0;\n }\n /**\n * Returns the scroll offset of the element at the specified index.\n * ```typescript\n * this.parentVirtDir.getScrollForIndex(1);\n * ```\n */\n getScrollForIndex(index, bottom) {\n const containerSize = parseInt(this.igxForContainerSize, 10);\n const scroll = bottom ? Math.max(0, this.sizesCache[index + 1] - containerSize) : this.sizesCache[index];\n return scroll;\n }\n /**\n * Returns the index of the element at the specified offset.\n * ```typescript\n * this.parentVirtDir.getIndexAtScroll(100);\n * ```\n */\n getIndexAtScroll(scrollOffset) {\n return this.getIndexAt(scrollOffset, this.sizesCache);\n }\n /**\n * Returns whether the target index is outside the view.\n * ```typescript\n * this.parentVirtDir.isIndexOutsideView(10);\n * ```\n */\n isIndexOutsideView(index) {\n const targetNode = index >= this.state.startIndex && index <= this.state.startIndex + this.state.chunkSize ?\n this._embeddedViews.map(view => view.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE) || view.rootNodes[0].nextElementSibling)[index - this.state.startIndex] : null;\n const rowHeight = this.getSizeAt(index);\n const containerSize = parseInt(this.igxForContainerSize, 10);\n const containerOffset = -(this.scrollPosition - this.sizesCache[this.state.startIndex]);\n const endTopOffset = targetNode ? targetNode.offsetTop + rowHeight + containerOffset : containerSize + rowHeight;\n return !targetNode || targetNode.offsetTop < Math.abs(containerOffset)\n || containerSize && endTopOffset - containerSize > 5;\n }\n /**\n * @hidden\n * Function that recalculates and updates cache sizes.\n */\n recalcUpdateSizes() {\n const dimension = this.igxForScrollOrientation === 'horizontal' ?\n this.igxForSizePropName : 'height';\n const diffs = [];\n let totalDiff = 0;\n const l = this._embeddedViews.length;\n const rNodes = this._embeddedViews.map(view => view.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE) || view.rootNodes[0].nextElementSibling);\n for (let i = 0; i < l; i++) {\n const rNode = rNodes[i];\n if (rNode) {\n const height = window.getComputedStyle(rNode).getPropertyValue('height');\n const h = parseFloat(height) || parseInt(this.igxForItemSize, 10);\n const index = this.state.startIndex + i;\n if (!this.isRemote && !this.igxForOf[index]) {\n continue;\n }\n const margin = this.getMargin(rNode, dimension);\n const oldVal = dimension === 'height' ? this.heightCache[index] : this.igxForOf[index][dimension];\n const newVal = (dimension === 'height' ? h : rNode.clientWidth) + margin;\n if (dimension === 'height') {\n this.heightCache[index] = newVal;\n }\n else {\n this.igxForOf[index][dimension] = newVal;\n }\n const currDiff = newVal - oldVal;\n diffs.push(currDiff);\n totalDiff += currDiff;\n this.sizesCache[index + 1] += totalDiff;\n }\n }\n // update cache\n if (Math.abs(totalDiff) > 0) {\n for (let j = this.state.startIndex + this.state.chunkSize + 1; j < this.sizesCache.length; j++) {\n this.sizesCache[j] += totalDiff;\n }\n // update scrBar heights/widths\n if (this.igxForScrollOrientation === 'horizontal') {\n const firstScrollChild = this.scrollComponent.nativeElement.children.item(0);\n const totalWidth = parseInt(firstScrollChild.style.width, 10) + totalDiff;\n firstScrollChild.style.width = `${totalWidth}px`;\n }\n const reducer = (acc, val) => acc + val;\n if (this.igxForScrollOrientation === 'vertical') {\n const scrToBottom = this._isScrolledToBottom && !this.dc.instance.notVirtual;\n const hSum = this.heightCache.reduce(reducer);\n if (hSum > this._maxHeight) {\n this._virtHeightRatio = hSum / this._maxHeight;\n }\n this.scrollComponent.size = Math.min(this.scrollComponent.size + totalDiff, this._maxHeight);\n this._virtHeight = hSum;\n if (!this.scrollComponent.destroyed) {\n this.scrollComponent.cdr.detectChanges();\n }\n if (scrToBottom && !this._isAtBottomIndex) {\n const containerSize = parseInt(this.igxForContainerSize, 10);\n const maxVirtScrollTop = this._virtHeight - containerSize;\n this._bScrollInternal = true;\n this._virtScrollTop = maxVirtScrollTop;\n this.scrollPosition = maxVirtScrollTop;\n return;\n }\n if (this._adjustToIndex) {\n // in case scrolled to specific index where after scroll heights are changed\n // need to adjust the offsets so that item is last in view.\n const updatesToIndex = this._adjustToIndex - this.state.startIndex + 1;\n const sumDiffs = diffs.slice(0, updatesToIndex).reduce(reducer);\n if (sumDiffs !== 0) {\n this.addScrollTop(sumDiffs);\n }\n this._adjustToIndex = null;\n }\n }\n }\n }\n /**\n * @hidden\n * Reset scroll position.\n * Needed in case scrollbar is hidden/detached but we still need to reset it.\n */\n resetScrollPosition() {\n this.scrollPosition = 0;\n this.scrollComponent.scrollAmount = 0;\n this.state.startIndex = 0;\n }\n /**\n * @hidden\n */\n removeScrollEventListeners() {\n if (this.igxForScrollOrientation === 'horizontal') {\n this._zone.runOutsideAngular(() => this.scrollComponent?.nativeElement?.removeEventListener('scroll', this.func));\n }\n else {\n this._zone.runOutsideAngular(() => this.scrollComponent?.nativeElement?.removeEventListener('scroll', this.verticalScrollHandler));\n }\n }\n /**\n * @hidden\n * Function that is called when scrolling vertically\n */\n onScroll(event) {\n /* in certain situations this may be called when no scrollbar is visible */\n if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) {\n return;\n }\n if (!this._bScrollInternal) {\n this._calcVirtualScrollTop(event.target.scrollTop);\n }\n else {\n this._bScrollInternal = false;\n }\n const prevStartIndex = this.state.startIndex;\n const scrollOffset = this.fixedUpdateAllElements(this._virtScrollTop);\n this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';\n this._zone.onStable.pipe(first$1()).subscribe(this.recalcUpdateSizes.bind(this));\n this.dc.changeDetectorRef.detectChanges();\n if (prevStartIndex !== this.state.startIndex) {\n this.chunkLoad.emit(this.state);\n }\n }\n updateSizes() {\n if (!this.scrollComponent.nativeElement.isConnected)\n return;\n const scrollable = this.isScrollable();\n this.recalcUpdateSizes();\n this._applyChanges();\n this._updateScrollOffset();\n if (scrollable !== this.isScrollable()) {\n this.scrollbarVisibilityChanged.emit();\n }\n else {\n this.contentSizeChange.emit();\n }\n }\n /**\n * @hidden\n */\n fixedUpdateAllElements(inScrollTop) {\n const count = this.isRemote ? this.totalItemCount : this.igxForOf.length;\n let newStart = this.getIndexAt(inScrollTop, this.sizesCache);\n if (newStart + this.state.chunkSize > count) {\n newStart = count - this.state.chunkSize;\n }\n const prevStart = this.state.startIndex;\n const diff = newStart - this.state.startIndex;\n this.state.startIndex = newStart;\n if (diff) {\n this.chunkPreload.emit(this.state);\n if (!this.isRemote) {\n // recalculate and apply page size.\n if (diff && Math.abs(diff) <= MAX_PERF_SCROLL_DIFF) {\n if (diff > 0) {\n this.moveApplyScrollNext(prevStart);\n }\n else {\n this.moveApplyScrollPrev(prevStart);\n }\n }\n else {\n this.fixedApplyScroll();\n }\n }\n }\n return inScrollTop - this.sizesCache[this.state.startIndex];\n }\n /**\n * @hidden\n * The function applies an optimized state change for scrolling down/right employing context change with view rearrangement\n */\n moveApplyScrollNext(prevIndex) {\n const start = prevIndex + this.state.chunkSize;\n const end = start + this.state.startIndex - prevIndex;\n const container = this.dc.instance._vcr;\n for (let i = start; i < end && this.igxForOf[i] !== undefined; i++) {\n const embView = this._embeddedViews.shift();\n if (!embView.destroyed) {\n this.scrollFocus(embView.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE)\n || embView.rootNodes[0].nextElementSibling);\n const view = container.detach(0);\n this.updateTemplateContext(embView.context, i);\n container.insert(view);\n this._embeddedViews.push(embView);\n }\n }\n }\n /**\n * @hidden\n * The function applies an optimized state change for scrolling up/left employing context change with view rearrangement\n */\n moveApplyScrollPrev(prevIndex) {\n const container = this.dc.instance._vcr;\n for (let i = prevIndex - 1; i >= this.state.startIndex && this.igxForOf[i] !== undefined; i--) {\n const embView = this._embeddedViews.pop();\n if (!embView.destroyed) {\n this.scrollFocus(embView.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE)\n || embView.rootNodes[0].nextElementSibling);\n const view = container.detach(container.length - 1);\n this.updateTemplateContext(embView.context, i);\n container.insert(view, 0);\n this._embeddedViews.unshift(embView);\n }\n }\n }\n /**\n * @hidden\n */\n getContextIndex(input) {\n return this.isRemote ? this.state.startIndex + this.igxForOf.indexOf(input) : this.igxForOf.indexOf(input);\n }\n /**\n * @hidden\n * Function which updates the passed context of an embedded view with the provided index\n * from the view container.\n * Often, called while handling a scroll event.\n */\n updateTemplateContext(context, index = 0) {\n context.$implicit = this.igxForOf[index];\n context.index = this.getContextIndex(this.igxForOf[index]);\n context.count = this.igxForOf.length;\n }\n /**\n * @hidden\n * The function applies an optimized state change through context change for each view\n */\n fixedApplyScroll() {\n let j = 0;\n const endIndex = this.state.startIndex + this.state.chunkSize;\n for (let i = this.state.startIndex; i < endIndex && this.igxForOf[i] !== undefined; i++) {\n const embView = this._embeddedViews[j++];\n this.updateTemplateContext(embView.context, i);\n }\n }\n /**\n * @hidden\n * @internal\n *\n * Clears focus inside the virtualized container on small scroll swaps.\n */\n scrollFocus(node) {\n const activeElement = this.document.activeElement;\n // Remove focus in case the the active element is inside the view container.\n // Otherwise we hit an exception while doing the 'small' scrolls swapping.\n // For more information:\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild\n // https://bugs.chromium.org/p/chromium/issues/detail?id=432392\n if (node && node.contains(this.document.activeElement)) {\n activeElement.blur();\n }\n }\n /**\n * @hidden\n * Function that is called when scrolling horizontally\n */\n onHScroll(event) {\n /* in certain situations this may be called when no scrollbar is visible */\n const firstScrollChild = this.scrollComponent.nativeElement.children.item(0);\n if (!parseInt(firstScrollChild.style.width, 10)) {\n return;\n }\n const prevStartIndex = this.state.startIndex;\n const scrLeft = event.target.scrollLeft;\n // Updating horizontal chunks\n const scrollOffset = this.fixedUpdateAllElements(Math.abs(event.target.scrollLeft));\n if (scrLeft < 0) {\n // RTL\n this.dc.instance._viewContainer.element.nativeElement.style.left = scrollOffset + 'px';\n }\n else {\n this.dc.instance._viewContainer.element.nativeElement.style.left = -scrollOffset + 'px';\n }\n this.dc.changeDetectorRef.detectChanges();\n if (prevStartIndex !== this.state.startIndex) {\n this.chunkLoad.emit(this.state);\n }\n }\n /**\n * Gets the function used to track changes in the items collection.\n * By default the object references are compared. However this can be optimized if you have unique identifier\n * value that can be used for the comparison instead of the object ref or if you have some other property values\n * in the item object that should be tracked for changes.\n * This option is similar to ngForTrackBy.\n * ```typescript\n * const trackFunc = this.parentVirtDir.igxForTrackBy;\n * ```\n */\n get igxForTrackBy() {\n return this._trackByFn;\n }\n /**\n * Sets the function used to track changes in the items collection.\n * This function can be set in scenarios where you want to optimize or\n * customize the tracking of changes for the items in the collection.\n * The igxForTrackBy function takes the index and the current item as arguments and needs to return the unique identifier for this item.\n * ```typescript\n * this.parentVirtDir.igxForTrackBy = (index, item) => {\n * return item.id + item.width;\n * };\n * ```\n */\n set igxForTrackBy(fn) {\n this._trackByFn = fn;\n }\n /**\n * @hidden\n */\n _applyChanges() {\n const prevChunkSize = this.state.chunkSize;\n this.applyChunkSizeChange();\n this._recalcScrollBarSize();\n if (this.igxForOf && this.igxForOf.length && this.dc) {\n const embeddedViewCopy = Object.assign([], this._embeddedViews);\n let startIndex = this.state.startIndex;\n let endIndex = this.state.chunkSize + this.state.startIndex;\n if (this.isRemote) {\n startIndex = 0;\n endIndex = this.igxForOf.length;\n }\n for (let i = startIndex; i < endIndex && this.igxForOf[i] !== undefined; i++) {\n const embView = embeddedViewCopy.shift();\n this.updateTemplateContext(embView.context, i);\n }\n if (prevChunkSize !== this.state.chunkSize) {\n this.chunkLoad.emit(this.state);\n }\n }\n }\n /**\n * @hidden\n */\n _calcMaxBrowserHeight() {\n if (!this.platformUtil.isBrowser) {\n return 0;\n }\n const div = this.document.createElement('div');\n const style = div.style;\n style.position = 'absolute';\n style.top = '9999999999999999px';\n this.document.body.appendChild(div);\n const size = Math.abs(div.getBoundingClientRect()['top']);\n this.document.body.removeChild(div);\n return size;\n }\n /**\n * @hidden\n * Recalculates the chunkSize based on current startIndex and returns the new size.\n * This should be called after this.state.startIndex is updated, not before.\n */\n _calculateChunkSize() {\n let chunkSize = 0;\n if (this.igxForContainerSize !== null && this.igxForContainerSize !== undefined) {\n if (!this.sizesCache) {\n this.initSizesCache(this.igxForOf);\n }\n chunkSize = this._calcMaxChunkSize();\n if (this.igxForOf && chunkSize > this.igxForOf.length) {\n chunkSize = this.igxForOf.length;\n }\n }\n else {\n if (this.igxForOf) {\n chunkSize = this.igxForOf.length;\n }\n }\n return chunkSize;\n }\n /**\n * @hidden\n */\n getElement(viewref, nodeName) {\n const elem = viewref.element.nativeElement.parentNode.getElementsByTagName(nodeName);\n return elem.length > 0 ? elem[0] : null;\n }\n /**\n * @hidden\n */\n initSizesCache(items) {\n let totalSize = 0;\n let size = 0;\n const dimension = this.igxForSizePropName || 'height';\n let i = 0;\n this.sizesCache = [];\n this.heightCache = [];\n this.sizesCache.push(0);\n const count = this.isRemote ? this.totalItemCount : items.length;\n for (i; i < count; i++) {\n size = this._getItemSize(items[i], dimension);\n if (this.igxForScrollOrientation === 'vertical') {\n this.heightCache.push(size);\n }\n totalSize += size;\n this.sizesCache.push(totalSize);\n }\n return totalSize;\n }\n _updateSizeCache() {\n if (this.igxForScrollOrientation === 'horizontal') {\n this.initSizesCache(this.igxForOf);\n return;\n }\n const oldHeight = this.heightCache.length > 0 ? this.heightCache.reduce((acc, val) => acc + val) : 0;\n const newHeight = this.initSizesCache(this.igxForOf);\n const diff = oldHeight - newHeight;\n this._adjustScrollPositionAfterSizeChange(diff);\n }\n /**\n * @hidden\n */\n _calcMaxChunkSize() {\n let i = 0;\n let length = 0;\n let maxLength = 0;\n const arr = [];\n let sum = 0;\n const availableSize = parseInt(this.igxForContainerSize, 10);\n if (!availableSize) {\n return 0;\n }\n const dimension = this.igxForScrollOrientation === 'horizontal' ?\n this.igxForSizePropName : 'height';\n const reducer = (accumulator, currentItem) => accumulator + this._getItemSize(currentItem, dimension);\n for (i; i < this.igxForOf.length; i++) {\n let item = this.igxForOf[i];\n if (dimension === 'height') {\n item = { value: this.igxForOf[i], height: this.heightCache[i] };\n }\n const size = dimension === 'height' ?\n this.heightCache[i] :\n this._getItemSize(item, dimension);\n sum = arr.reduce(reducer, size);\n if (sum < availableSize) {\n arr.push(item);\n length = arr.length;\n if (i === this.igxForOf.length - 1) {\n // reached end without exceeding\n // include prev items until size is filled or first item is reached.\n let curItem = dimension === 'height' ? arr[0].value : arr[0];\n let prevIndex = this.igxForOf.indexOf(curItem) - 1;\n while (prevIndex >= 0 && sum <= availableSize) {\n curItem = dimension === 'height' ? arr[0].value : arr[0];\n prevIndex = this.igxForOf.indexOf(curItem) - 1;\n const prevItem = this.igxForOf[prevIndex];\n const prevSize = dimension === 'height' ?\n this.heightCache[prevIndex] :\n parseInt(prevItem[dimension], 10);\n sum = arr.reduce(reducer, prevSize);\n arr.unshift(prevItem);\n length = arr.length;\n }\n }\n }\n else {\n arr.push(item);\n length = arr.length + 1;\n arr.shift();\n }\n if (length > maxLength) {\n maxLength = length;\n }\n }\n return maxLength;\n }\n /**\n * @hidden\n */\n getIndexAt(left, set) {\n let start = 0;\n let end = set.length - 1;\n if (left === 0) {\n return 0;\n }\n while (start <= end) {\n const midIdx = Math.floor((start + end) / 2);\n const midLeft = set[midIdx];\n const cmp = left - midLeft;\n if (cmp > 0) {\n start = midIdx + 1;\n }\n else if (cmp < 0) {\n end = midIdx - 1;\n }\n else {\n return midIdx;\n }\n }\n return end;\n }\n _recalcScrollBarSize() {\n const count = this.isRemote ? this.totalItemCount : (this.igxForOf ? this.igxForOf.length : 0);\n this.dc.instance.notVirtual = !(this.igxForContainerSize && this.dc && this.state.chunkSize < count);\n const scrollable = this.isScrollable();\n if (this.igxForScrollOrientation === 'horizontal') {\n const totalWidth = parseInt(this.igxForContainerSize, 10) > 0 ? this.initSizesCache(this.igxForOf) : 0;\n this.scrollComponent.nativeElement.style.width = this.igxForContainerSize + 'px';\n this.scrollComponent.size = totalWidth;\n if (totalWidth <= parseInt(this.igxForContainerSize, 10)) {\n this.resetScrollPosition();\n }\n }\n if (this.igxForScrollOrientation === 'vertical') {\n this.scrollComponent.nativeElement.style.height = parseInt(this.igxForContainerSize, 10) + 'px';\n this.scrollComponent.size = this._calcHeight();\n if (this.scrollComponent.size <= parseInt(this.igxForContainerSize, 10)) {\n this.resetScrollPosition();\n }\n }\n if (scrollable !== this.isScrollable()) {\n // scrollbar visibility has changed\n this.scrollbarVisibilityChanged.emit();\n }\n }\n _calcHeight() {\n let height;\n if (this.heightCache) {\n height = this.heightCache.reduce((acc, val) => acc + val, 0);\n }\n else {\n height = this.initSizesCache(this.igxForOf);\n }\n this._virtHeight = height;\n if (height > this._maxHeight) {\n this._virtHeightRatio = height / this._maxHeight;\n height = this._maxHeight;\n }\n return height;\n }\n _recalcOnContainerChange() {\n const prevChunkSize = this.state.chunkSize;\n this.applyChunkSizeChange();\n this._recalcScrollBarSize();\n if (prevChunkSize !== this.state.chunkSize) {\n this.chunkLoad.emit(this.state);\n }\n if (this.sizesCache && this.igxForScrollOrientation === 'horizontal') {\n // Updating horizontal chunks and offsets based on the new scrollLeft\n const scrollOffset = this.fixedUpdateAllElements(this.scrollPosition);\n this.dc.instance._viewContainer.element.nativeElement.style.left = -scrollOffset + 'px';\n }\n }\n /**\n * @hidden\n * Removes an element from the embedded views and updates chunkSize.\n */\n removeLastElem() {\n const oldElem = this._embeddedViews.pop();\n this.beforeViewDestroyed.emit(oldElem);\n // also detach from ViewContainerRef to make absolutely sure this is removed from the view container.\n this.dc.instance._vcr.detach(this.dc.instance._vcr.length - 1);\n oldElem.destroy();\n this.state.chunkSize--;\n }\n /**\n * @hidden\n * If there exists an element that we can create embedded view for creates it, appends it and updates chunkSize\n */\n addLastElem() {\n let elemIndex = this.state.startIndex + this.state.chunkSize;\n if (!this.isRemote && !this.igxForOf) {\n return;\n }\n if (elemIndex >= this.igxForOf.length) {\n elemIndex = this.igxForOf.length - this.state.chunkSize;\n }\n const input = this.igxForOf[elemIndex];\n const embeddedView = this.dc.instance._vcr.createEmbeddedView(this._template, new IgxForOfContext(input, this.getContextIndex(input), this.igxForOf.length));\n this._embeddedViews.push(embeddedView);\n this.state.chunkSize++;\n this._zone.run(() => this.cdr.markForCheck());\n }\n /**\n * Recalculates chunkSize and adds/removes elements if need due to the change.\n * this.state.chunkSize is updated in @addLastElem() or @removeLastElem()\n */\n applyChunkSizeChange() {\n const chunkSize = this.isRemote ? (this.igxForOf ? this.igxForOf.length : 0) : this._calculateChunkSize();\n if (chunkSize > this.state.chunkSize) {\n const diff = chunkSize - this.state.chunkSize;\n for (let i = 0; i < diff; i++) {\n this.addLastElem();\n }\n }\n else if (chunkSize < this.state.chunkSize) {\n const diff = this.state.chunkSize - chunkSize;\n for (let i = 0; i < diff; i++) {\n this.removeLastElem();\n }\n }\n }\n _updateScrollOffset() {\n if (this.igxForScrollOrientation === 'horizontal') {\n this._updateHScrollOffset();\n }\n else {\n this._updateVScrollOffset();\n }\n }\n _calcVirtualScrollTop(scrollTop) {\n const containerSize = parseInt(this.igxForContainerSize, 10);\n const maxRealScrollTop = this.scrollComponent.size - containerSize;\n const realPercentScrolled = maxRealScrollTop !== 0 ? scrollTop / maxRealScrollTop : 0;\n const maxVirtScrollTop = this._virtHeight - containerSize;\n this._virtScrollTop = realPercentScrolled * maxVirtScrollTop;\n }\n _getItemSize(item, dimension) {\n const dim = item ? item[dimension] : null;\n return typeof dim === 'number' ? dim : parseInt(this.igxForItemSize, 10) || 0;\n }\n _updateVScrollOffset() {\n let scrollOffset = 0;\n let currentScrollTop = this.scrollPosition;\n if (this._virtHeightRatio !== 1) {\n this._calcVirtualScrollTop(this.scrollPosition);\n currentScrollTop = this._virtScrollTop;\n }\n const vScroll = this.scrollComponent.nativeElement;\n scrollOffset = vScroll && this.scrollComponent.size ?\n currentScrollTop - this.sizesCache[this.state.startIndex] : 0;\n this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';\n }\n _updateHScrollOffset() {\n let scrollOffset = 0;\n scrollOffset = this.scrollComponent.nativeElement &&\n this.scrollComponent.size ?\n this.scrollPosition - this.sizesCache[this.state.startIndex] : 0;\n this.dc.instance._viewContainer.element.nativeElement.style.left = -scrollOffset + 'px';\n }\n _adjustScrollPositionAfterSizeChange(sizeDiff) {\n // if data has been changed while container is scrolled\n // should update scroll top/left according to change so that same startIndex is in view\n if (Math.abs(sizeDiff) > 0 && this.scrollPosition > 0) {\n this.recalcUpdateSizes();\n const offset = this.igxForScrollOrientation === 'horizontal' ?\n parseInt(this.dc.instance._viewContainer.element.nativeElement.style.left, 10) :\n parseInt(this.dc.instance._viewContainer.element.nativeElement.style.top, 10);\n const newSize = this.sizesCache[this.state.startIndex] - offset;\n this.scrollPosition = newSize;\n if (this.scrollPosition !== newSize) {\n this.scrollComponent.scrollAmount = newSize;\n }\n }\n }\n getMargin(node, dimension) {\n const styles = window.getComputedStyle(node);\n if (dimension === 'height') {\n return parseFloat(styles['marginTop']) +\n parseFloat(styles['marginBottom']) || 0;\n }\n return parseFloat(styles['marginLeft']) +\n parseFloat(styles['marginRight']) || 0;\n }\n}\nIgxForOfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: IgxForOfScrollSyncService }, { token: PlatformUtil }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nIgxForOfDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxForOfDirective, selector: \"[igxFor][igxForOf]\", inputs: { igxForOf: \"igxForOf\", igxForSizePropName: \"igxForSizePropName\", igxForScrollOrientation: \"igxForScrollOrientation\", igxForScrollContainer: \"igxForScrollContainer\", igxForContainerSize: \"igxForContainerSize\", igxForItemSize: \"igxForItemSize\", igxForTotalItemCount: \"igxForTotalItemCount\", igxForTrackBy: \"igxForTrackBy\" }, outputs: { chunkLoad: \"chunkLoad\", scrollbarVisibilityChanged: \"scrollbarVisibilityChanged\", contentSizeChange: \"contentSizeChange\", dataChanged: \"dataChanged\", beforeViewDestroyed: \"beforeViewDestroyed\", chunkPreload: \"chunkPreload\" }, providers: [IgxForOfScrollSyncService], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxFor][igxForOf]',\n providers: [IgxForOfScrollSyncService]\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: IgxForOfScrollSyncService }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { igxForOf: [{\n type: Input\n }], igxForSizePropName: [{\n type: Input\n }], igxForScrollOrientation: [{\n type: Input\n }], igxForScrollContainer: [{\n type: Input\n }], igxForContainerSize: [{\n type: Input\n }], igxForItemSize: [{\n type: Input\n }], chunkLoad: [{\n type: Output\n }], scrollbarVisibilityChanged: [{\n type: Output\n }], contentSizeChange: [{\n type: Output\n }], dataChanged: [{\n type: Output\n }], beforeViewDestroyed: [{\n type: Output\n }], chunkPreload: [{\n type: Output\n }], igxForTotalItemCount: [{\n type: Input\n }], igxForTrackBy: [{\n type: Input\n }] } });\nconst getTypeNameForDebugging = (type) => type.name || typeof type;\nclass IgxGridForOfDirective extends IgxForOfDirective {\n set igxGridForOf(value) {\n this.igxForOf = value;\n }\n get igxGridForOf() {\n return this.igxForOf;\n }\n /**\n * @hidden\n * @internal\n */\n get sizesCache() {\n if (this.igxForScrollOrientation === 'horizontal') {\n if (this.igxGridForOfUniqueSizeCache || this.syncService.isMaster(this)) {\n return this._sizesCache;\n }\n return this.syncService.sizesCache(this.igxForScrollOrientation);\n }\n else {\n return this._sizesCache;\n }\n }\n /**\n * @hidden\n * @internal\n */\n set sizesCache(value) {\n this._sizesCache = value;\n }\n get itemsDimension() {\n return this.igxForSizePropName || 'height';\n }\n recalcUpdateSizes() {\n if (this.igxGridForOfVariableSizes && this.igxForScrollOrientation === 'vertical') {\n super.recalcUpdateSizes();\n }\n }\n constructor(_viewContainer, _template, _differs, cdr, _zone, _platformUtil, _document, syncScrollService, syncService) {\n super(_viewContainer, _template, _differs, cdr, _zone, syncScrollService, _platformUtil, _document);\n this.syncService = syncService;\n this.igxGridForOfUniqueSizeCache = false;\n this.igxGridForOfVariableSizes = true;\n /**\n * @hidden @internal\n * An event that is emitted after data has been changed but before the view is refreshed\n */\n this.dataChanging = new EventEmitter();\n }\n ngOnInit() {\n this.syncService.setMaster(this);\n super.ngOnInit();\n this.removeScrollEventListeners();\n }\n ngOnChanges(changes) {\n const forOf = 'igxGridForOf';\n this.syncService.setMaster(this);\n if (forOf in changes) {\n const value = changes[forOf].currentValue;\n if (!this._differ && value) {\n try {\n this._differ = this._differs.find(value).create(this.igxForTrackBy);\n }\n catch (e) {\n throw new Error(`Cannot find a differ supporting object \"${value}\" of type \"${getTypeNameForDebugging(value)}\".\n NgFor only supports binding to Iterables such as Arrays.`);\n }\n }\n if (this.igxForScrollOrientation === 'horizontal') {\n // in case collection has changes, reset sync service\n this.syncService.setMaster(this, true);\n }\n }\n const defaultItemSize = 'igxForItemSize';\n if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&\n this.igxForScrollOrientation === 'vertical' && this.igxForOf) {\n // handle default item size changed.\n this.initSizesCache(this.igxForOf);\n }\n const containerSize = 'igxForContainerSize';\n if (containerSize in changes && !changes[containerSize].firstChange && this.igxForOf) {\n this._recalcOnContainerChange();\n }\n }\n /**\n * @hidden\n * @internal\n */\n assumeMaster() {\n this._sizesCache = this.syncService.sizesCache(this.igxForScrollOrientation);\n this.syncService.setMaster(this, true);\n }\n ngDoCheck() {\n if (this._differ) {\n const changes = this._differ.diff(this.igxForOf);\n if (changes) {\n const args = {\n containerSize: this.igxForContainerSize\n };\n this.dataChanging.emit(args);\n // re-init cache.\n if (!this.igxForOf) {\n this.igxForOf = [];\n }\n /* we need to reset the master dir if all rows are removed\n (e.g. because of filtering); if all columns are hidden, rows are\n still rendered empty, so we should not reset master */\n if (!this.igxForOf.length &&\n this.igxForScrollOrientation === 'vertical') {\n this.syncService.resetMaster();\n }\n this.syncService.setMaster(this);\n this.igxForContainerSize = args.containerSize;\n const sizeDiff = this._updateSizeCache(changes);\n this._applyChanges();\n if (sizeDiff && this.igxForScrollOrientation === 'vertical') {\n this._adjustScrollPositionAfterSizeChange(sizeDiff);\n }\n this._updateScrollOffset();\n this.dataChanged.emit();\n }\n }\n }\n onScroll(event) {\n if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) {\n return;\n }\n if (!this._bScrollInternal) {\n this._calcVirtualScrollTop(event.target.scrollTop);\n }\n else {\n this._bScrollInternal = false;\n }\n const scrollOffset = this.fixedUpdateAllElements(this._virtScrollTop);\n this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px';\n this._zone.onStable.pipe(first$1()).subscribe(this.recalcUpdateSizes.bind(this));\n this.cdr.markForCheck();\n }\n onHScroll(scrollAmount) {\n /* in certain situations this may be called when no scrollbar is visible */\n const firstScrollChild = this.scrollComponent.nativeElement.children.item(0);\n if (!this.scrollComponent || !parseInt(firstScrollChild.style.width, 10)) {\n return;\n }\n // Updating horizontal chunks\n const scrollOffset = this.fixedUpdateAllElements(Math.abs(scrollAmount));\n if (scrollAmount < 0) {\n // RTL\n this.dc.instance._viewContainer.element.nativeElement.style.left = scrollOffset + 'px';\n }\n else {\n // LTR\n this.dc.instance._viewContainer.element.nativeElement.style.left = -scrollOffset + 'px';\n }\n }\n getItemSize(item) {\n let size = 0;\n const dimension = this.igxForSizePropName || 'height';\n if (this.igxForScrollOrientation === 'vertical') {\n size = this._getItemSize(item, dimension);\n if (item && item.summaries) {\n size = item.max;\n }\n else if (item && item.groups && item.height) {\n size = item.height;\n }\n }\n else {\n size = parseInt(item[dimension], 10) || 0;\n }\n return size;\n }\n initSizesCache(items) {\n if (!this.syncService.isMaster(this) && this.igxForScrollOrientation === 'horizontal') {\n const masterSizesCache = this.syncService.sizesCache(this.igxForScrollOrientation);\n return masterSizesCache[masterSizesCache.length - 1];\n }\n let totalSize = 0;\n let size = 0;\n let i = 0;\n this.sizesCache = [];\n this.heightCache = [];\n this.sizesCache.push(0);\n const count = this.isRemote ? this.totalItemCount : items.length;\n for (i; i < count; i++) {\n size = this.getItemSize(items[i]);\n if (this.igxForScrollOrientation === 'vertical') {\n this.heightCache.push(size);\n }\n totalSize += size;\n this.sizesCache.push(totalSize);\n }\n return totalSize;\n }\n _updateSizeCache(changes = null) {\n if (this.igxForScrollOrientation === 'horizontal') {\n const oldSize = this.sizesCache[this.sizesCache.length - 1];\n const newSize = this.initSizesCache(this.igxForOf);\n const diff = oldSize - newSize;\n return diff;\n }\n const oldHeight = this.heightCache.length > 0 ? this.heightCache.reduce((acc, val) => acc + val) : 0;\n let newHeight = oldHeight;\n if (changes && !this.isRemote) {\n newHeight = this.handleCacheChanges(changes);\n }\n else {\n return;\n }\n const diff = oldHeight - newHeight;\n // if data has been changed while container is scrolled\n // should update scroll top/left according to change so that same startIndex is in view\n if (Math.abs(diff) > 0 && this.platformUtil.isBrowser) {\n // TODO: This code can be removed. However tests need to be rewritten in a way that they wait for ResizeObserved to complete.\n // So leaving as is for the moment.\n requestAnimationFrame(() => {\n this.recalcUpdateSizes();\n const offset = parseInt(this.dc.instance._viewContainer.element.nativeElement.style.top, 10);\n if (this.scrollPosition !== 0) {\n this.scrollPosition = this.sizesCache[this.state.startIndex] - offset;\n }\n else {\n this._updateScrollOffset();\n }\n });\n }\n return diff;\n }\n handleCacheChanges(changes) {\n const identityChanges = [];\n const newHeightCache = [];\n const newSizesCache = [];\n newSizesCache.push(0);\n let newHeight = 0;\n // When there are more than one removed items the changes are not reliable so those with identity change should be default size.\n let numRemovedItems = 0;\n changes.forEachRemovedItem(() => numRemovedItems++);\n // Get the identity changes to determine later if those that have changed their indexes should be assigned default item size.\n changes.forEachIdentityChange((item) => {\n if (item.currentIndex !== item.previousIndex) {\n // Filter out ones that have not changed their index.\n identityChanges[item.currentIndex] = item;\n }\n });\n // Processing each item that is passed to the igxForOf so far seem to be most reliable. We parse the updated list of items.\n changes.forEachItem((item) => {\n if (item.previousIndex !== null &&\n (numRemovedItems < 2 || !identityChanges.length || identityChanges[item.currentIndex])) {\n // Reuse cache on those who have previousIndex.\n // When there are more than one removed items currently the changes are not readable so ones with identity change\n // should be racalculated.\n newHeightCache[item.currentIndex] = this.heightCache[item.previousIndex];\n }\n else {\n // Assign default item size.\n newHeightCache[item.currentIndex] = this.getItemSize(item.item);\n }\n newSizesCache[item.currentIndex + 1] = newSizesCache[item.currentIndex] + newHeightCache[item.currentIndex];\n newHeight += newHeightCache[item.currentIndex];\n });\n this.heightCache = newHeightCache;\n this.sizesCache = newSizesCache;\n return newHeight;\n }\n addLastElem() {\n let elemIndex = this.state.startIndex + this.state.chunkSize;\n if (!this.isRemote && !this.igxForOf) {\n return;\n }\n if (elemIndex >= this.igxForOf.length) {\n elemIndex = this.igxForOf.length - this.state.chunkSize;\n }\n const input = this.igxForOf[elemIndex];\n const embeddedView = this.dc.instance._vcr.createEmbeddedView(this._template, new IgxForOfContext(input, this.getContextIndex(input), this.igxForOf.length));\n this._embeddedViews.push(embeddedView);\n this.state.chunkSize++;\n }\n _updateViews(prevChunkSize) {\n if (this.igxForOf && this.igxForOf.length && this.dc) {\n const embeddedViewCopy = Object.assign([], this._embeddedViews);\n let startIndex;\n let endIndex;\n if (this.isRemote) {\n startIndex = 0;\n endIndex = this.igxForOf.length;\n }\n else {\n startIndex = this.getIndexAt(this.scrollPosition, this.sizesCache);\n if (startIndex + this.state.chunkSize > this.igxForOf.length) {\n startIndex = this.igxForOf.length - this.state.chunkSize;\n }\n this.state.startIndex = startIndex;\n endIndex = this.state.chunkSize + this.state.startIndex;\n }\n for (let i = startIndex; i < endIndex && this.igxForOf[i] !== undefined; i++) {\n const embView = embeddedViewCopy.shift();\n this.updateTemplateContext(embView.context, i);\n }\n if (prevChunkSize !== this.state.chunkSize) {\n this.chunkLoad.emit(this.state);\n }\n }\n }\n _applyChanges() {\n const prevChunkSize = this.state.chunkSize;\n this.applyChunkSizeChange();\n this._recalcScrollBarSize();\n this._updateViews(prevChunkSize);\n }\n /**\n * @hidden\n */\n _calcMaxChunkSize() {\n if (this.igxForScrollOrientation === 'horizontal') {\n if (this.syncService.isMaster(this)) {\n return super._calcMaxChunkSize();\n }\n return this.syncService.chunkSize(this.igxForScrollOrientation);\n }\n else {\n return super._calcMaxChunkSize();\n }\n }\n}\nIgxGridForOfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridForOfDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: PlatformUtil }, { token: DOCUMENT }, { token: IgxForOfScrollSyncService }, { token: IgxForOfSyncService }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGridForOfDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridForOfDirective, selector: \"[igxGridFor][igxGridForOf]\", inputs: { igxGridForOf: \"igxGridForOf\", igxGridForOfUniqueSizeCache: \"igxGridForOfUniqueSizeCache\", igxGridForOfVariableSizes: \"igxGridForOfVariableSizes\" }, outputs: { dataChanging: \"dataChanging\" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridForOfDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGridFor][igxGridForOf]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: IgxForOfScrollSyncService }, { type: IgxForOfSyncService }]; }, propDecorators: { igxGridForOf: [{\n type: Input\n }], igxGridForOfUniqueSizeCache: [{\n type: Input\n }], igxGridForOfVariableSizes: [{\n type: Input\n }], dataChanging: [{\n type: Output\n }] } });\n/**\n * @hidden\n */\nclass IgxForOfModule {\n}\nIgxForOfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxForOfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfModule, declarations: [IgxForOfDirective, IgxGridForOfDirective, DisplayContainerComponent,\n VirtualHelperComponent,\n HVirtualHelperComponent,\n VirtualHelperBaseDirective], imports: [IgxScrollInertiaModule, CommonModule], exports: [IgxForOfDirective, IgxGridForOfDirective] });\nIgxForOfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfModule, imports: [IgxScrollInertiaModule, CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxForOfModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxForOfDirective,\n IgxGridForOfDirective,\n DisplayContainerComponent,\n VirtualHelperComponent,\n HVirtualHelperComponent,\n VirtualHelperBaseDirective\n ],\n exports: [IgxForOfDirective, IgxGridForOfDirective],\n imports: [IgxScrollInertiaModule, CommonModule]\n }]\n }] });\n\n/**\n * **Ignite UI for Angular DropDown** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/drop-down)\n *\n * The Ignite UI for Angular Drop Down displays a scrollable list of items which may be visually grouped and\n * supports selection of a single item. Clicking or tapping an item selects it and closes the Drop Down\n *\n * Example:\n * ```html\n * \n * \n * {{ item.value }}\n * \n * \n * ```\n */\nclass IgxDropDownComponent extends IgxDropDownBaseDirective {\n /**\n * @hidden @internal\n */\n get focusedItem() {\n if (this.virtDir) {\n return this._focusedItem && this._focusedItem.index !== -1 ?\n (this.children.find(e => e.index === this._focusedItem.index) || null) :\n null;\n }\n return this._focusedItem;\n }\n set focusedItem(value) {\n if (!value) {\n this.selection.clear(`${this.id}-active`);\n this._focusedItem = null;\n return;\n }\n this._focusedItem = value;\n if (this.virtDir) {\n this._focusedItem = {\n value: value.value,\n index: value.index\n };\n }\n this.selection.set(`${this.id}-active`, new Set([this._focusedItem]));\n }\n get id() {\n return this._id;\n }\n set id(value) {\n this.selection.set(value, this.selection.get(this.id));\n this.selection.clear(this.id);\n this.selection.set(value, this.selection.get(`${this.id}-active`));\n this.selection.clear(`${this.id}-active`);\n this._id = value;\n }\n /** Id of the internal listbox of the drop down */\n get listId() {\n return this.id + '-list';\n }\n /**\n * Get currently selected item\n *\n * ```typescript\n * let currentItem = this.dropdown.selectedItem;\n * ```\n */\n get selectedItem() {\n const selectedItem = this.selection.first_item(this.id);\n if (selectedItem) {\n return selectedItem;\n }\n return null;\n }\n /**\n * Gets if the dropdown is collapsed\n *\n * ```typescript\n * let isCollapsed = this.dropdown.collapsed;\n * ```\n */\n get collapsed() {\n return this.toggleDirective.collapsed;\n }\n /** @hidden @internal */\n get scrollContainer() {\n return this.scrollContainerRef.nativeElement;\n }\n get collectionLength() {\n if (this.virtDir) {\n return this.virtDir.totalItemCount || this.virtDir.igxForOf.length;\n }\n }\n constructor(elementRef, cdr, selection, _displayDensityOptions) {\n super(elementRef, cdr, _displayDensityOptions);\n this.selection = selection;\n /**\n * Emitted before the dropdown is opened\n *\n * ```html\n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Emitted after the dropdown is opened\n *\n * ```html\n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Emitted before the dropdown is closed\n *\n * ```html\n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Emitted after the dropdown is closed\n *\n * ```html\n * \n * ```\n */\n this.closed = new EventEmitter();\n /**\n * Gets/sets whether items take focus. Disabled by default.\n * When enabled, drop down items gain tab index and are focused when active -\n * this includes activating the selected item when opening the drop down and moving with keyboard navigation.\n *\n * Note: Keep that focus shift in mind when using the igxDropDownItemNavigation directive\n * and ensure it's placed either on each focusable item or a common ancestor to allow it to handle keyboard events.\n *\n * ```typescript\n * // get\n * let dropDownAllowsItemFocus = this.dropdown.allowItemsFocus;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.allowItemsFocus = false;\n this.destroy$ = new Subject();\n }\n /**\n * Opens the dropdown\n *\n * ```typescript\n * this.dropdown.open();\n * ```\n */\n open(overlaySettings) {\n this.toggleDirective.open(overlaySettings);\n this.updateScrollPosition();\n }\n /**\n * Closes the dropdown\n *\n * ```typescript\n * this.dropdown.close();\n * ```\n */\n close(event) {\n this.toggleDirective.close(event);\n }\n /**\n * Toggles the dropdown\n *\n * ```typescript\n * this.dropdown.toggle();\n * ```\n */\n toggle(overlaySettings) {\n if (this.collapsed || this.toggleDirective.isClosing) {\n this.open(overlaySettings);\n }\n else {\n this.close();\n }\n }\n /**\n * Select an item by index\n *\n * @param index of the item to select; If the drop down uses *igxFor, pass the index in data\n */\n setSelectedItem(index) {\n if (index < 0 || index >= this.items.length) {\n return;\n }\n let newSelection;\n if (this.virtDir) {\n newSelection = {\n value: this.virtDir.igxForOf[index],\n index\n };\n }\n else {\n newSelection = this.items[index];\n }\n this.selectItem(newSelection);\n }\n /**\n * Navigates to the item on the specified index\n * If the data in the drop-down is virtualized, pass the index of the item in the virtualized data.\n *\n * @param newIndex number\n */\n navigateItem(index) {\n if (this.virtDir) {\n if (index === -1 || index >= this.collectionLength) {\n return;\n }\n const direction = index > (this.focusedItem ? this.focusedItem.index : -1) ? Navigate.Down : Navigate.Up;\n const subRequired = this.isIndexOutOfBounds(index, direction);\n this.focusedItem = {\n value: this.virtDir.igxForOf[index],\n index\n };\n if (subRequired) {\n this.virtDir.scrollTo(index);\n }\n if (subRequired) {\n this.virtDir.chunkLoad.pipe(take(1)).subscribe(() => {\n this.skipHeader(direction);\n });\n }\n else {\n this.skipHeader(direction);\n }\n }\n else {\n super.navigateItem(index);\n }\n if (this.allowItemsFocus && this.focusedItem) {\n this.focusedItem.element.nativeElement.focus();\n this.cdr.markForCheck();\n }\n }\n /**\n * @hidden @internal\n */\n updateScrollPosition() {\n if (!this.virtDir) {\n return;\n }\n if (!this.selectedItem) {\n this.virtDir.scrollTo(0);\n return;\n }\n let targetScroll = this.virtDir.getScrollForIndex(this.selectedItem.index);\n const itemsInView = this.virtDir.igxForContainerSize / this.virtDir.igxForItemSize;\n targetScroll -= (itemsInView / 2 - 1) * this.virtDir.igxForItemSize;\n this.virtDir.getScroll().scrollTop = targetScroll;\n }\n /**\n * @hidden @internal\n */\n onToggleOpening(e) {\n const args = { owner: this, event: e.event, cancel: false };\n this.opening.emit(args);\n e.cancel = args.cancel;\n if (e.cancel) {\n return;\n }\n if (this.virtDir) {\n this.virtDir.scrollPosition = this._scrollPosition;\n }\n }\n /**\n * @hidden @internal\n */\n onToggleContentAppended(_event) {\n if (!this.virtDir && this.selectedItem) {\n this.scrollToItem(this.selectedItem);\n }\n }\n /**\n * @hidden @internal\n */\n onToggleOpened() {\n this.updateItemFocus();\n this.opened.emit({ owner: this });\n }\n /**\n * @hidden @internal\n */\n onToggleClosing(e) {\n const args = { owner: this, event: e.event, cancel: false };\n this.closing.emit(args);\n e.cancel = args.cancel;\n if (e.cancel) {\n return;\n }\n if (this.virtDir) {\n this._scrollPosition = this.virtDir.scrollPosition;\n }\n }\n /**\n * @hidden @internal\n */\n onToggleClosed() {\n this.focusItem(false);\n this.closed.emit({ owner: this });\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n this.selection.clear(this.id);\n this.selection.clear(`${this.id}-active`);\n }\n /** @hidden @internal */\n calculateScrollPosition(item) {\n if (!item) {\n return 0;\n }\n const elementRect = item.element.nativeElement.getBoundingClientRect();\n const parentRect = this.scrollContainer.getBoundingClientRect();\n const scrollDelta = parentRect.top - elementRect.top;\n let scrollPosition = this.scrollContainer.scrollTop - scrollDelta;\n const dropDownHeight = this.scrollContainer.clientHeight;\n scrollPosition -= dropDownHeight / 2;\n scrollPosition += item.elementHeight / 2;\n return Math.floor(scrollPosition);\n }\n /**\n * @hidden @internal\n */\n ngOnChanges(changes) {\n if (changes.id) {\n // temp workaround until fix --> https://github.com/angular/angular/issues/34992\n this.toggleDirective.id = changes.id.currentValue;\n }\n }\n ngAfterViewInit() {\n if (this.virtDir) {\n this.virtDir.igxForItemSize = 28;\n }\n }\n /** Keydown Handler */\n onItemActionKey(key, event) {\n super.onItemActionKey(key, event);\n this.close(event);\n }\n /**\n * Virtual scroll implementation\n *\n * @hidden @internal\n */\n navigateFirst() {\n if (this.virtDir) {\n this.navigateItem(0);\n }\n else {\n super.navigateFirst();\n }\n }\n /**\n * @hidden @internal\n */\n navigateLast() {\n if (this.virtDir) {\n this.navigateItem(this.virtDir.totalItemCount ? this.virtDir.totalItemCount - 1 : this.virtDir.igxForOf.length - 1);\n }\n else {\n super.navigateLast();\n }\n }\n /**\n * @hidden @internal\n */\n navigateNext() {\n if (this.virtDir) {\n this.navigateItem(this._focusedItem ? this._focusedItem.index + 1 : 0);\n }\n else {\n super.navigateNext();\n }\n }\n /**\n * @hidden @internal\n */\n navigatePrev() {\n if (this.virtDir) {\n this.navigateItem(this._focusedItem ? this._focusedItem.index - 1 : 0);\n }\n else {\n super.navigatePrev();\n }\n }\n /**\n * Handles the `selectionChanging` emit and the drop down toggle when selection changes\n *\n * @hidden\n * @internal\n * @param newSelection\n * @param event\n */\n selectItem(newSelection, event) {\n const oldSelection = this.selectedItem;\n if (!newSelection) {\n newSelection = this.focusedItem;\n }\n if (newSelection === null) {\n return;\n }\n if (newSelection instanceof IgxDropDownItemBaseDirective && newSelection.isHeader) {\n return;\n }\n if (this.virtDir) {\n newSelection = {\n value: newSelection.value,\n index: newSelection.index\n };\n }\n const args = { oldSelection, newSelection, cancel: false, owner: this };\n this.selectionChanging.emit(args);\n if (!args.cancel) {\n if (this.isSelectionValid(args.newSelection)) {\n this.selection.set(this.id, new Set([args.newSelection]));\n if (!this.virtDir) {\n if (oldSelection) {\n oldSelection.selected = false;\n }\n if (args.newSelection) {\n args.newSelection.selected = true;\n }\n }\n if (event) {\n this.toggleDirective.close(event);\n }\n }\n else {\n throw new Error('Please provide a valid drop-down item for the selection!');\n }\n }\n }\n /**\n * Clears the selection of the dropdown\n * ```typescript\n * this.dropdown.clearSelection();\n * ```\n */\n clearSelection() {\n const oldSelection = this.selectedItem;\n const newSelection = null;\n const args = { oldSelection, newSelection, cancel: false, owner: this };\n this.selectionChanging.emit(args);\n if (this.selectedItem && !args.cancel) {\n this.selectedItem.selected = false;\n this.selection.clear(this.id);\n }\n }\n /**\n * Checks whether the selection is valid\n * `null` - the selection should be emptied\n * Virtual? - the selection should at least have and `index` and `value` property\n * Non-virtual? - the selection should be a valid drop-down item and **not** be a header\n */\n isSelectionValid(selection) {\n return selection === null\n || (this.virtDir && selection.hasOwnProperty('value') && selection.hasOwnProperty('index'))\n || (selection instanceof IgxDropDownItemComponent && !selection.isHeader);\n }\n scrollToItem(item) {\n this.scrollContainer.scrollTop = this.calculateScrollPosition(item);\n }\n focusItem(value) {\n if (value || this._focusedItem) {\n this._focusedItem.focused = value;\n }\n }\n updateItemFocus() {\n if (this.selectedItem) {\n this.focusedItem = this.selectedItem;\n this.focusItem(true);\n }\n else if (this.allowItemsFocus) {\n this.navigateFirst();\n }\n }\n skipHeader(direction) {\n if (!this.focusedItem) {\n return;\n }\n if (this.focusedItem.isHeader || this.focusedItem.disabled) {\n if (direction === Navigate.Up) {\n this.navigatePrev();\n }\n else {\n this.navigateNext();\n }\n }\n }\n isIndexOutOfBounds(index, direction) {\n const virtState = this.virtDir.state;\n const currentPosition = this.virtDir.getScroll().scrollTop;\n const itemPosition = this.virtDir.getScrollForIndex(index, direction === Navigate.Down);\n const indexOutOfChunk = index < virtState.startIndex || index > virtState.chunkSize + virtState.startIndex;\n const scrollNeeded = direction === Navigate.Down ? currentPosition < itemPosition : currentPosition > itemPosition;\n const subRequired = indexOutOfChunk || scrollNeeded;\n return subRequired;\n }\n}\nIgxDropDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxSelectionAPIService }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxDropDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDownComponent, selector: \"igx-drop-down\", inputs: { allowItemsFocus: \"allowItemsFocus\", labelledBy: \"labelledBy\" }, outputs: { opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\" }, providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxDropDownComponent }], queries: [{ propertyName: \"virtDir\", first: true, predicate: IgxForOfDirective, descendants: true, read: IgxForOfDirective }, { propertyName: \"children\", predicate: i0.forwardRef(function () { return IgxDropDownItemComponent; }), descendants: true }], viewQueries: [{ propertyName: \"toggleDirective\", first: true, predicate: IgxToggleDirective, descendants: true, static: true }, { propertyName: \"scrollContainerRef\", first: true, predicate: [\"scrollContainer\"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: \"
    \\n
    \\n \\n \\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-drop-down', providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxDropDownComponent }], template: \"
    \\n
    \\n \\n \\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxSelectionAPIService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { children: [{\n type: ContentChildren,\n args: [forwardRef(() => IgxDropDownItemComponent), { descendants: true }]\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], allowItemsFocus: [{\n type: Input\n }], labelledBy: [{\n type: Input\n }], virtDir: [{\n type: ContentChild,\n args: [IgxForOfDirective, { read: IgxForOfDirective }]\n }], toggleDirective: [{\n type: ViewChild,\n args: [IgxToggleDirective, { static: true }]\n }], scrollContainerRef: [{\n type: ViewChild,\n args: ['scrollContainer', { static: true }]\n }] } });\n\n/**\n * Navigation Directive that handles keyboard events on its host and controls a targeted IgxDropDownBaseDirective component\n */\nclass IgxDropDownItemNavigationDirective {\n constructor(dropdown) {\n this.dropdown = dropdown;\n this._target = null;\n }\n /**\n * Gets the target of the navigation directive;\n *\n * ```typescript\n * // Get\n * export class MyComponent {\n * ...\n * @ContentChild(IgxDropDownNavigationDirective)\n * navDirective: IgxDropDownNavigationDirective = null\n * ...\n * const navTarget: IgxDropDownBaseDirective = navDirective.navTarget\n * }\n * ```\n */\n get target() {\n return this._target;\n }\n /**\n * Sets the target of the navigation directive;\n * If no valid target is passed, it falls back to the drop down context\n *\n * ```html\n * \n * \n * ...\n * \n * ...\n * \n * ```\n */\n set target(target) {\n this._target = target ? target : this.dropdown;\n }\n /**\n * Captures keydown events and calls the appropriate handlers on the target component\n */\n handleKeyDown(event) {\n if (event) {\n const key = event.key.toLowerCase();\n if (!this.target.collapsed) { // If dropdown is opened\n const navKeys = ['esc', 'escape', 'enter', 'space', 'spacebar', ' ',\n 'arrowup', 'up', 'arrowdown', 'down', 'home', 'end'];\n if (navKeys.indexOf(key) === -1) { // If key has appropriate function in DD\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n }\n else { // If dropdown is closed, do nothing\n return;\n }\n switch (key) {\n case 'esc':\n case 'escape':\n this.target.onItemActionKey(DropDownActionKey.ESCAPE, event);\n break;\n case 'enter':\n this.target.onItemActionKey(DropDownActionKey.ENTER, event);\n break;\n case 'space':\n case 'spacebar':\n case ' ':\n this.target.onItemActionKey(DropDownActionKey.SPACE, event);\n break;\n case 'arrowup':\n case 'up':\n this.onArrowUpKeyDown();\n break;\n case 'arrowdown':\n case 'down':\n this.onArrowDownKeyDown();\n break;\n case 'home':\n this.onHomeKeyDown();\n break;\n case 'end':\n this.onEndKeyDown();\n break;\n default:\n return;\n }\n }\n }\n /**\n * Navigates to previous item\n */\n onArrowDownKeyDown() {\n this.target.navigateNext();\n }\n /**\n * Navigates to previous item\n */\n onArrowUpKeyDown() {\n this.target.navigatePrev();\n }\n /**\n * Navigates to target's last item\n */\n onEndKeyDown() {\n this.target.navigateLast();\n }\n /**\n * Navigates to target's first item\n */\n onHomeKeyDown() {\n this.target.navigateFirst();\n }\n}\nIgxDropDownItemNavigationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownItemNavigationDirective, deps: [{ token: IGX_DROPDOWN_BASE, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDropDownItemNavigationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDownItemNavigationDirective, selector: \"[igxDropDownItemNavigation]\", inputs: { target: [\"igxDropDownItemNavigation\", \"target\"] }, host: { listeners: { \"keydown\": \"handleKeyDown($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownItemNavigationDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDropDownItemNavigation]'\n }]\n }], ctorParameters: function () { return [{ type: IgxDropDownBaseDirective, decorators: [{\n type: Self\n }, {\n type: Optional\n }, {\n type: Inject,\n args: [IGX_DROPDOWN_BASE]\n }] }]; }, propDecorators: { target: [{\n type: Input,\n args: ['igxDropDownItemNavigation']\n }], handleKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\n/**\n * @hidden\n */\nclass IgxDropDownModule {\n}\nIgxDropDownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDropDownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownModule, declarations: [IgxDropDownComponent,\n IgxDropDownItemBaseDirective,\n IgxDropDownItemComponent,\n IgxDropDownGroupComponent,\n IgxDropDownItemNavigationDirective], imports: [CommonModule,\n IgxToggleModule], exports: [IgxDropDownComponent,\n IgxDropDownItemComponent,\n IgxDropDownGroupComponent,\n IgxDropDownItemNavigationDirective] });\nIgxDropDownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownModule, imports: [CommonModule,\n IgxToggleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDownModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxDropDownComponent,\n IgxDropDownItemBaseDirective,\n IgxDropDownItemComponent,\n IgxDropDownGroupComponent,\n IgxDropDownItemNavigationDirective\n ],\n exports: [\n IgxDropDownComponent,\n IgxDropDownItemComponent,\n IgxDropDownGroupComponent,\n IgxDropDownItemNavigationDirective\n ],\n imports: [\n CommonModule,\n IgxToggleModule\n ]\n }]\n }] });\n\nconst DatePickerResourceStringsEN = {\n igx_date_picker_change_date: 'Change Date',\n igx_date_picker_choose_date: 'Choose Date'\n};\n\nconst DateRangePickerResourceStringsEN = {\n igx_date_range_picker_date_separator: 'to',\n igx_date_range_picker_done_button: 'Done'\n};\n\nconst GridResourceStringsEN = {\n igx_grid_groupByArea_message: 'Drag a column header and drop it here to group by that column.',\n igx_grid_groupByArea_select_message: 'Select all rows in the group with field name {0} and value {1}.',\n igx_grid_groupByArea_deselect_message: 'Deselect all rows in the group with field name {0} and value {1}.',\n igx_grid_emptyFilteredGrid_message: 'No records found.',\n igx_grid_emptyGrid_message: 'Grid has no data.',\n igx_grid_filter: 'Filter',\n igx_grid_filter_row_close: 'Close',\n igx_grid_filter_row_reset: 'Reset',\n igx_grid_filter_row_placeholder: 'Add filter value',\n igx_grid_filter_row_boolean_placeholder: 'All',\n igx_grid_filter_row_date_placeholder: 'Pick up date',\n igx_grid_filter_row_time_placeholder: 'Pick up time',\n igx_grid_filter_operator_and: 'And',\n igx_grid_filter_operator_or: 'Or',\n igx_grid_complex_filter: 'Complex Filter',\n igx_grid_filter_contains: 'Contains',\n igx_grid_filter_doesNotContain: 'Does Not Contain',\n igx_grid_filter_startsWith: 'Starts With',\n igx_grid_filter_endsWith: 'Ends With',\n igx_grid_filter_equals: 'Equals',\n igx_grid_filter_doesNotEqual: 'Does Not Equal',\n igx_grid_filter_empty: 'Empty',\n igx_grid_filter_notEmpty: 'Not Empty',\n igx_grid_filter_null: 'Null',\n igx_grid_filter_notNull: 'Not Null',\n igx_grid_filter_before: 'Before',\n igx_grid_filter_after: 'After',\n igx_grid_filter_at: 'At',\n igx_grid_filter_not_at: 'Not At',\n igx_grid_filter_at_before: 'At or Before',\n igx_grid_filter_at_after: 'At or After',\n igx_grid_filter_today: 'Today',\n igx_grid_filter_yesterday: 'Yesterday',\n igx_grid_filter_thisMonth: 'This Month',\n igx_grid_filter_lastMonth: 'Last Month',\n igx_grid_filter_nextMonth: 'Next Month',\n igx_grid_filter_thisYear: 'This Year',\n igx_grid_filter_lastYear: 'Last Year',\n igx_grid_filter_nextYear: 'Next Year',\n igx_grid_filter_greaterThan: 'Greater Than',\n igx_grid_filter_lessThan: 'Less Than',\n igx_grid_filter_greaterThanOrEqualTo: 'Greater Than Or Equal To',\n igx_grid_filter_lessThanOrEqualTo: 'Less Than Or Equal To',\n igx_grid_filter_true: 'True',\n igx_grid_filter_false: 'False',\n igx_grid_filter_all: 'All',\n igx_grid_filter_condition_placeholder: 'Select filter',\n igx_grid_summary_count: 'Count',\n igx_grid_summary_min: 'Min',\n igx_grid_summary_max: 'Max',\n igx_grid_summary_sum: 'Sum',\n igx_grid_summary_average: 'Avg',\n igx_grid_summary_earliest: 'Earliest',\n igx_grid_summary_latest: 'Latest',\n igx_grid_excel_filter_moving_left: 'move left',\n igx_grid_excel_filter_moving_left_short: 'left',\n igx_grid_excel_filter_moving_right: 'move right',\n igx_grid_excel_filter_moving_right_short: 'right',\n igx_grid_excel_filter_moving_header: 'move',\n igx_grid_excel_filter_sorting_asc: 'ascending',\n igx_grid_excel_filter_sorting_asc_short: 'asc',\n igx_grid_excel_filter_sorting_desc: 'descending',\n igx_grid_excel_filter_sorting_desc_short: 'desc',\n igx_grid_excel_filter_sorting_header: 'sort',\n igx_grid_excel_filter_clear: 'Clear column filters',\n igx_grid_excel_custom_dialog_add: 'add filter',\n igx_grid_excel_custom_dialog_clear: 'Clear filter',\n igx_grid_excel_custom_dialog_header: 'Custom auto-filter on column: ',\n igx_grid_excel_cancel: 'cancel',\n igx_grid_excel_apply: 'apply',\n igx_grid_excel_search_placeholder: 'Search',\n igx_grid_excel_select_all: 'Select All',\n igx_grid_excel_select_all_search_results: 'Select all search results',\n igx_grid_excel_add_to_filter: 'Add current selection to filter',\n igx_grid_excel_blanks: '(Blanks)',\n igx_grid_excel_hide: 'Hide column',\n igx_grid_excel_show: 'Show column',\n igx_grid_excel_pin: 'Pin column',\n igx_grid_excel_unpin: 'Unpin column',\n igx_grid_excel_select: 'Select column',\n igx_grid_excel_deselect: 'Deselect column',\n igx_grid_excel_text_filter: 'Text filter',\n igx_grid_excel_number_filter: 'Number filter',\n igx_grid_excel_date_filter: 'Date filter',\n igx_grid_excel_boolean_filter: 'Boolean filter',\n igx_grid_excel_currency_filter: 'Currency filter',\n igx_grid_excel_custom_filter: 'Custom filter...',\n igx_grid_excel_no_matches: 'No matches',\n igx_grid_advanced_filter_title: 'Advanced Filtering',\n igx_grid_advanced_filter_and_group: '\"And\" Group',\n igx_grid_advanced_filter_or_group: '\"Or\" Group',\n igx_grid_advanced_filter_end_group: 'End Group',\n igx_grid_advanced_filter_create_and_group: 'Create \"And\" Group',\n igx_grid_advanced_filter_create_or_group: 'Create \"Or\" Group',\n igx_grid_advanced_filter_and_label: 'and',\n igx_grid_advanced_filter_or_label: 'or',\n igx_grid_advanced_filter_add_condition: 'Condition',\n igx_grid_advanced_filter_ungroup: 'Ungroup',\n igx_grid_advanced_filter_delete: 'Delete',\n igx_grid_advanced_filter_delete_filters: 'Delete filters',\n igx_grid_advanced_filter_initial_text: 'Start with creating a group of conditions linked with \"And\" or \"Or\"',\n igx_grid_advanced_filter_column_placeholder: 'Select column',\n igx_grid_advanced_filter_value_placeholder: 'Value',\n igx_grid_pinned_row_indicator: 'Pinned',\n igx_grid_hiding_check_all_label: 'Show All',\n igx_grid_hiding_uncheck_all_label: 'Hide All',\n igx_grid_pinning_check_all_label: 'Pin All',\n igx_grid_pinning_uncheck_all_label: 'Unpin All',\n igx_grid_row_edit_btn_done: 'Done',\n igx_grid_row_edit_btn_cancel: 'Cancel',\n igx_grid_toolbar_actions_filter_prompt: 'Filter columns list ...',\n igx_grid_toolbar_pinning_button_tooltip: 'Open column pinning dropdown',\n igx_grid_toolbar_hiding_button_tooltip: 'Open column hiding dropdown',\n igx_grid_toolbar_pinning_title: 'Pinned columns',\n igx_grid_toolbar_hiding_title: 'Visible columns',\n igx_grid_toolbar_advanced_filtering_button_tooltip: 'Open advanced filtering dialog',\n igx_grid_toolbar_advanced_filtering_button_label: 'Advanced filtering',\n igx_grid_toolbar_exporter_button_tooltip: 'Open exporter dropdown',\n igx_grid_toolbar_exporter_button_label: 'Export',\n igx_grid_toolbar_exporter_excel_entry_text: 'Export to Excel',\n igx_grid_toolbar_exporter_csv_entry_text: 'Export to CSV',\n igx_grid_snackbar_addrow_label: 'Row added',\n igx_grid_snackbar_addrow_actiontext: 'SHOW',\n igx_grid_actions_edit_label: 'Edit',\n igx_grid_actions_add_label: 'Add',\n igx_grid_add_row_label: 'ADD ROW',\n igx_grid_actions_add_child_label: 'Add Child',\n igx_grid_actions_delete_label: 'Delete',\n igx_grid_actions_pin_label: 'Pin',\n igx_grid_actions_unpin_label: 'Unpin',\n igx_grid_actions_jumpUp_label: 'Jump up',\n igx_grid_actions_jumpDown_label: 'Jump down',\n igx_grid_pivot_date_dimension_total: 'All Periods',\n igx_grid_pivot_aggregate_count: 'Count',\n igx_grid_pivot_aggregate_min: 'Minimum',\n igx_grid_pivot_aggregate_max: 'Maximum',\n igx_grid_pivot_aggregate_sum: 'Sum',\n igx_grid_pivot_aggregate_avg: 'Average',\n igx_grid_pivot_aggregate_date_latest: 'Latest Date',\n igx_grid_pivot_aggregate_date_earliest: 'Earliest Date',\n igx_grid_pivot_aggregate_time_latest: 'Latest Time',\n igx_grid_pivot_aggregate_time_earliest: 'Earliest Time',\n igx_grid_pivot_empty_row_drop_area: 'Drop Row Fields here.',\n igx_grid_pivot_empty_column_drop_area: 'Drop Column Fields here.',\n igx_grid_pivot_empty_filter_drop_area: 'Drop Filter Fields here.',\n igx_grid_pivot_empty_value_drop_area: 'Drop Value Fields here.',\n igx_grid_pivot_row_drop_chip: 'Drop here to use as row',\n igx_grid_pivot_column_drop_chip: 'Drop here to use as column',\n igx_grid_pivot_filter_drop_chip: 'Drop here to use as filter',\n igx_grid_pivot_value_drop_chip: 'Drop here to use as value',\n igx_grid_pivot_empty_message: 'Pivot grid has no dimensions and values.',\n igx_grid_pivot_selector_filters: 'Filters',\n igx_grid_pivot_selector_rows: 'Rows',\n igx_grid_pivot_selector_columns: 'Columns',\n igx_grid_pivot_selector_values: 'Values',\n igx_grid_pivot_selector_panel_empty: 'Drop Items Here',\n igx_grid_required_validation_error: 'This field is required',\n igx_grid_min_validation_error: 'A value of at least {0} should be entered',\n igx_grid_max_validation_error: 'A value no more than {0} should be entered',\n igx_grid_min_length_validation_error: 'Entry should be at least {0} character(s) long',\n igx_grid_max_length_validation_error: 'Entry should be no more than {0} character(s) long',\n igx_grid_email_validation_error: 'A valid email address should be entered',\n igx_grid_pattern_validation_error: 'Entry does not match the required pattern',\n igx_grid_pivot_no_aggregator: 'No valid aggregator found for {0}. Please set either a valid aggregatorName or aggregator.'\n};\n\nconst TimePickerResourceStringsEN = {\n igx_time_picker_ok: 'OK',\n igx_time_picker_cancel: 'Cancel',\n igx_time_picker_change_time: 'Change Time',\n igx_time_picker_choose_time: 'Choose Time'\n};\n\nconst PaginatorResourceStringsEN = {\n igx_paginator_label: 'Items per page',\n igx_paginator_pager_text: 'of',\n igx_paginator_first_page_button_text: 'Go to first page',\n igx_paginator_previous_page_button_text: 'Previous page',\n igx_paginator_last_page_button_text: 'Go to last page',\n igx_paginator_next_page_button_text: 'Next page',\n};\n\nconst CarouselResourceStringsEN = {\n igx_carousel_of: 'of',\n igx_carousel_slide: 'slide',\n igx_carousel_previous_slide: 'previous slide',\n igx_carousel_next_slide: 'next slide'\n};\n\nconst ChipResourceStringsEN = {\n igx_chip_remove: 'remove chip',\n igx_chip_select: 'select chip'\n};\n\nconst ListResourceStringsEN = {\n igx_list_no_items: 'There are no items in the list.',\n igx_list_loading: 'Loading data from the server...'\n};\n\nconst CalendarResourceStringsEN = {\n igx_calendar_previous_month: 'Previous Month',\n igx_calendar_next_month: 'Next Month',\n igx_calendar_select_month: 'Select Month',\n igx_calendar_select_year: 'Select Year',\n igx_calendar_range_start: 'Range start',\n igx_calendar_range_end: 'Range end',\n igx_calendar_selected_month_is: 'Selected month is ',\n igx_calendar_first_picker_of: 'First picker of {0} starts from',\n igx_calendar_multi_selection: 'Multi selection calendar with {0} date pickers',\n igx_calendar_range_selection: 'Range selection calendar with {0} date pickers',\n igx_calendar_single_selection: 'Calendar with {0} date pickers',\n igx_calendar_singular_multi_selection: 'Multi selection calendar',\n igx_calendar_singular_range_selection: 'Range selection calendar',\n igx_calendar_singular_single_selection: 'Calendar',\n};\n\nconst InputResourceStringsEN = {\n igx_input_upload_button: 'Upload File',\n igx_input_file_placeholder: 'No file chosen',\n};\n\nconst TreeResourceStringsEN = {\n igx_expand: 'Expand',\n igx_collapse: 'Collapse',\n};\n\nconst ActionStripResourceStringsEN = {\n igx_action_strip_button_more_title: 'More'\n};\n\nconst QueryBuilderResourceStringsEN = {\n igx_query_builder_date_placeholder: 'Pick up date',\n igx_query_builder_time_placeholder: 'Pick up time',\n igx_query_builder_filter_operator_and: 'And',\n igx_query_builder_filter_operator_or: 'Or',\n igx_query_builder_filter_contains: 'Contains',\n igx_query_builder_filter_doesNotContain: 'Does Not Contain',\n igx_query_builder_filter_startsWith: 'Starts With',\n igx_query_builder_filter_endsWith: 'Ends With',\n igx_query_builder_filter_equals: 'Equals',\n igx_query_builder_filter_doesNotEqual: 'Does Not Equal',\n igx_query_builder_filter_empty: 'Empty',\n igx_query_builder_filter_notEmpty: 'Not Empty',\n igx_query_builder_filter_null: 'Null',\n igx_query_builder_filter_notNull: 'Not Null',\n igx_query_builder_filter_before: 'Before',\n igx_query_builder_filter_after: 'After',\n igx_query_builder_filter_at: 'At',\n igx_query_builder_filter_not_at: 'Not At',\n igx_query_builder_filter_at_before: 'At or Before',\n igx_query_builder_filter_at_after: 'At or After',\n igx_query_builder_filter_today: 'Today',\n igx_query_builder_filter_yesterday: 'Yesterday',\n igx_query_builder_filter_thisMonth: 'This Month',\n igx_query_builder_filter_lastMonth: 'Last Month',\n igx_query_builder_filter_nextMonth: 'Next Month',\n igx_query_builder_filter_thisYear: 'This Year',\n igx_query_builder_filter_lastYear: 'Last Year',\n igx_query_builder_filter_nextYear: 'Next Year',\n igx_query_builder_filter_greaterThan: 'Greater Than',\n igx_query_builder_filter_lessThan: 'Less Than',\n igx_query_builder_filter_greaterThanOrEqualTo: 'Greater Than Or Equal To',\n igx_query_builder_filter_lessThanOrEqualTo: 'Less Than Or Equal To',\n igx_query_builder_filter_true: 'True',\n igx_query_builder_filter_false: 'False',\n igx_query_builder_filter_all: 'All',\n igx_query_builder_title: 'Query Builder',\n igx_query_builder_and_group: '\"And\" Group',\n igx_query_builder_or_group: '\"Or\" Group',\n igx_query_builder_end_group: 'End Group',\n igx_query_builder_and_label: 'and',\n igx_query_builder_or_label: 'or',\n igx_query_builder_add_condition: 'Condition',\n igx_query_builder_create_and_group: 'Create \"And\" Group',\n igx_query_builder_create_or_group: 'Create \"Or\" Group',\n igx_query_builder_ungroup: 'Ungroup',\n igx_query_builder_delete: 'Delete',\n igx_query_builder_delete_filters: 'Delete filters',\n igx_query_builder_initial_text: 'Start with creating a group of conditions linked with \"And\" or \"Or\"',\n igx_query_builder_column_placeholder: 'Select column',\n igx_query_builder_condition_placeholder: 'Select filter',\n igx_query_builder_value_placeholder: 'Value',\n};\n\nconst ComboResourceStringsEN = {\n igx_combo_empty_message: 'The list is empty'\n};\n\nconst BannerResourceStringsEN = {\n igx_banner_button_dismiss: 'Dismiss'\n};\n\n/**\n * @hidden\n * IF YOU EDIT THIS OBJECT, DO NOT FORGET TO UPDATE\n * projects/igniteui-angular-i18n as well (create the appropriately named files,\n * containing the new/updated component string keys and EN strings for values + create a separate issue + pending-localization label)\n *\n * TODO Add automation tests:\n * 1) each of the folders/languages under \\projects\\igniteui-angular-i18n\\src\\ contain resources.ts file with matching components count.\n * \\projects\\igniteui-angular-i18n\\src\\BG\\resources.ts contains IgxResourceStringsBG.count matching this.CurrentResourceStrings.count\n * 2) \\igniteui-angular\\projects\\igniteui-angular\\src\\public_api.ts --> Check if the new interface is added\n * to IInputResourceStrings (just a proxy as it is later on imported in the angular-i18n package)\n */\nconst CurrentResourceStrings = {\n GridResStrings: cloneValue(GridResourceStringsEN),\n PaginatorResStrings: cloneValue(PaginatorResourceStringsEN),\n TimePickerResStrings: cloneValue(TimePickerResourceStringsEN),\n CalendarResStrings: cloneValue(CalendarResourceStringsEN),\n ChipResStrings: cloneValue(ChipResourceStringsEN),\n ComboResStrings: cloneValue(ComboResourceStringsEN),\n DatePickerResourceStrings: cloneValue(DatePickerResourceStringsEN),\n DateRangePickerResStrings: cloneValue(DateRangePickerResourceStringsEN),\n CarouselResStrings: cloneValue(CarouselResourceStringsEN),\n ListResStrings: cloneValue(ListResourceStringsEN),\n InputResStrings: cloneValue(InputResourceStringsEN),\n TreeResStrings: cloneValue(TreeResourceStringsEN),\n ActionStripResourceStrings: cloneValue(ActionStripResourceStringsEN),\n QueryBuilderResStrings: cloneValue(QueryBuilderResourceStringsEN),\n BannerResourceStrings: cloneValue(BannerResourceStringsEN)\n};\nconst updateResourceStrings = (currentStrings, newStrings) => {\n for (const key of Object.keys(newStrings)) {\n if (key in currentStrings) {\n currentStrings[key] = newStrings[key];\n }\n }\n};\n/**\n * Changes the resource strings for all components in the application\n * ```\n * @param resourceStrings to be applied\n */\nconst changei18n = (resourceStrings) => {\n for (const key of Object.keys(CurrentResourceStrings)) {\n updateResourceStrings(CurrentResourceStrings[key], resourceStrings);\n }\n};\n/**\n * Returns current resource strings for all components\n */\nconst getCurrentResourceStrings = () => ({\n ...CurrentResourceStrings.CalendarResStrings,\n ...CurrentResourceStrings.CarouselResStrings,\n ...CurrentResourceStrings.ChipResStrings,\n ...CurrentResourceStrings.ComboResStrings,\n ...CurrentResourceStrings.DatePickerResourceStrings,\n ...CurrentResourceStrings.DateRangePickerResStrings,\n ...CurrentResourceStrings.GridResStrings,\n ...CurrentResourceStrings.InputResStrings,\n ...CurrentResourceStrings.ListResStrings,\n ...CurrentResourceStrings.PaginatorResStrings,\n ...CurrentResourceStrings.TimePickerResStrings,\n ...CurrentResourceStrings.TreeResStrings,\n ...CurrentResourceStrings.ActionStripResourceStrings,\n ...CurrentResourceStrings.QueryBuilderResStrings,\n ...CurrentResourceStrings.BannerResourceStrings\n});\n\nconst IgxButtonType = mkenum({\n Flat: 'flat',\n Raised: 'raised',\n Outlined: 'outlined',\n Icon: 'icon',\n FAB: 'fab'\n});\n/**\n * The Button directive provides the Ignite UI Button functionality to every component that's intended to be used as a button.\n *\n * @igxModule IgxButtonModule\n *\n * @igxParent Data Entry & Display\n *\n * @igxTheme igx-button-theme\n *\n * @igxKeywords button, span, div, click\n *\n * @remarks\n * The Ignite UI Button directive is intended to be used by any button, span or div and turn it into a fully functional button.\n *\n * @example\n * ```html\n * \n * ```\n */\nclass IgxButtonDirective extends DisplayDensityBase {\n /**\n * Gets or sets whether the button is selected.\n * Mainly used in the IgxButtonGroup component and it will have no effect if set separately.\n *\n * @example\n * ```html\n * \n * ```\n */\n set selected(value) {\n if (this._selected !== value) {\n if (!this._selected) {\n this.buttonSelected.emit({\n button: this\n });\n }\n this._selected = value;\n }\n }\n get selected() {\n return this._selected;\n }\n constructor(element, _renderer, _displayDensityOptions) {\n super(_displayDensityOptions);\n this.element = element;\n this._renderer = _renderer;\n this._displayDensityOptions = _displayDensityOptions;\n /**\n * Called when the button is clicked.\n */\n this.buttonClick = new EventEmitter();\n /**\n * Called when the button is selected.\n */\n this.buttonSelected = new EventEmitter();\n /**\n * Sets/gets the `role` attribute.\n *\n * @example\n * ```typescript\n * this.button.role = 'navbutton';\n * let buttonRole = this.button.role;\n * ```\n */\n this.role = 'button';\n /**\n * @hidden\n * @internal\n */\n this._cssClass = 'igx-button';\n /**\n * @hidden\n * @internal\n */\n this._disabled = false;\n /**\n * @hidden\n * @internal\n */\n this._selected = false;\n }\n /**\n * @hidden\n * @internal\n */\n onClick(ev) {\n this.buttonClick.emit(ev);\n }\n /**\n * Returns the underlying DOM element.\n */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /**\n * Sets the type of the button.\n *\n * @example\n * ```html\n * \n * ```\n */\n set type(type) {\n const t = type ? type : IgxButtonType.Flat;\n if (this._type !== t) {\n this._type = t;\n }\n }\n /**\n * Sets the button text color.\n *\n * @example\n * ```html\n * \n * ```\n */\n set color(value) {\n this._color = value || this.nativeElement.style.color;\n this._renderer.setStyle(this.nativeElement, 'color', this._color);\n }\n /**\n * Sets the background color of the button.\n *\n * @example\n * ```html\n * \n * ```\n */\n set background(value) {\n this._backgroundColor = value || this._backgroundColor;\n this._renderer.setStyle(this.nativeElement, 'background', this._backgroundColor);\n }\n /**\n * Sets the `aria-label` attribute.\n *\n * @example\n * ```html\n * \n * ```\n */\n set label(value) {\n this._label = value || this._label;\n this._renderer.setAttribute(this.nativeElement, 'aria-label', this._label);\n }\n /**\n * Get the disabled state of the button;\n *\n * @example\n * ```typescript\n * const disabled = this.button.disabled;\n * ```\n */\n get disabled() {\n return this._disabled;\n }\n /**\n * Enables/disables the button.\n *\n * @example\n * ```html\n * \n * ```\n */\n set disabled(val) {\n this._disabled = (val === '') || val;\n }\n /**\n * @hidden\n * @internal\n */\n get flat() {\n return this._type === IgxButtonType.Flat;\n }\n /**\n * @hidden\n * @internal\n */\n get raised() {\n return this._type === IgxButtonType.Raised;\n }\n /**\n * @hidden\n * @internal\n */\n get outlined() {\n return this._type === IgxButtonType.Outlined;\n }\n /**\n * @hidden\n * @internal\n */\n get icon() {\n return this._type === IgxButtonType.Icon;\n }\n /**\n * @hidden\n * @internal\n */\n get fab() {\n return this._type === IgxButtonType.FAB;\n }\n /**\n * @hidden\n * @internal\n */\n get cosy() {\n return this.displayDensity === DisplayDensity.cosy;\n }\n /**\n * @hidden\n * @internal\n */\n get compact() {\n return this.displayDensity === DisplayDensity.compact;\n }\n /**\n * @hidden\n * @internal\n */\n get disabledAttribute() {\n return this._disabled ? this._disabled : null;\n }\n /**\n * @hidden\n * @internal\n */\n select() {\n this.selected = true;\n }\n /**\n * @hidden\n * @internal\n */\n deselect() {\n this._selected = false;\n }\n}\nIgxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: { selected: \"selected\", type: [\"igxButton\", \"type\"], color: [\"igxButtonColor\", \"color\"], background: [\"igxButtonBackground\", \"background\"], label: [\"igxLabel\", \"label\"], disabled: \"disabled\" }, outputs: { buttonClick: \"buttonClick\", buttonSelected: \"buttonSelected\" }, host: { listeners: { \"click\": \"onClick($event)\" }, properties: { \"attr.role\": \"this.role\", \"class.igx-button\": \"this._cssClass\", \"class.igx-button--disabled\": \"this.disabled\", \"class.igx-button--flat\": \"this.flat\", \"class.igx-button--raised\": \"this.raised\", \"class.igx-button--outlined\": \"this.outlined\", \"class.igx-button--icon\": \"this.icon\", \"class.igx-button--fab\": \"this.fab\", \"class.igx-button--cosy\": \"this.cosy\", \"class.igx-button--compact\": \"this.compact\", \"attr.disabled\": \"this.disabledAttribute\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxButton]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { buttonClick: [{\n type: Output\n }], buttonSelected: [{\n type: Output\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], _cssClass: [{\n type: HostBinding,\n args: ['class.igx-button']\n }], selected: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], type: [{\n type: Input,\n args: ['igxButton']\n }], color: [{\n type: Input,\n args: ['igxButtonColor']\n }], background: [{\n type: Input,\n args: ['igxButtonBackground']\n }], label: [{\n type: Input,\n args: ['igxLabel']\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-button--disabled']\n }], flat: [{\n type: HostBinding,\n args: ['class.igx-button--flat']\n }], raised: [{\n type: HostBinding,\n args: ['class.igx-button--raised']\n }], outlined: [{\n type: HostBinding,\n args: ['class.igx-button--outlined']\n }], icon: [{\n type: HostBinding,\n args: ['class.igx-button--icon']\n }], fab: [{\n type: HostBinding,\n args: ['class.igx-button--fab']\n }], cosy: [{\n type: HostBinding,\n args: ['class.igx-button--cosy']\n }], compact: [{\n type: HostBinding,\n args: ['class.igx-button--compact']\n }], disabledAttribute: [{\n type: HostBinding,\n args: ['attr.disabled']\n }] } });\n/**\n *\n * @hidden\n */\nclass IgxButtonModule {\n}\nIgxButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonModule, declarations: [IgxButtonDirective], exports: [IgxButtonDirective] });\nIgxButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxButtonDirective],\n exports: [IgxButtonDirective]\n }]\n }] });\n\nvar IgxHintPosition;\n(function (IgxHintPosition) {\n IgxHintPosition[IgxHintPosition[\"START\"] = 0] = \"START\";\n IgxHintPosition[IgxHintPosition[\"END\"] = 1] = \"END\";\n})(IgxHintPosition || (IgxHintPosition = {}));\nclass IgxHintDirective {\n constructor() {\n /**\n * Sets/gets whether the hint position is at the start.\n * Default value is `false`.\n * ```typescript\n * @ViewChild('hint', {read: IgxHintDirective})\n * public igxHint: IgxHintDirective;\n * this.igxHint.isPositionStart = true;\n * ```\n * ```typescript\n * let isHintPositionStart = this.igxHint.isPositionStart;\n * ```\n *\n * @memberof IgxHintDirective\n */\n this.isPositionStart = false;\n /**\n * Sets/gets whether the hint position is at the end.\n * Default value is `false`.\n * ```typescript\n * @ViewChild('hint', {read: IgxHintDirective})\n * public igxHint: IgxHintDirective;\n * this.igxHint.isPositionEnd = true;\n * ```\n * ```typescript\n * let isHintPositionEnd = this.igxHint.isPositionEnd;\n * ```\n *\n * @memberof IgxHintDirective\n */\n this.isPositionEnd = false;\n this._position = IgxHintPosition.START;\n }\n /**\n * Sets the position of the hint.\n * ```html\n * \n * \n * IgxHint displayed at the start\n * \n * ```\n *\n * @memberof IgxHintDirective\n */\n set position(value) {\n const position = IgxHintPosition[value.toUpperCase()];\n if (position !== undefined) {\n this._position = position;\n this._applyPosition(this._position);\n }\n }\n /**\n * Gets the position of the hint.\n * ```typescript\n * @ViewChild('hint', {read: IgxHintDirective})\n * public igxHint: IgxHintDirective;\n * let hintPosition = this.igxHint.position;\n * ```\n *\n * @memberof IgxHintDirective\n */\n get position() {\n return this._position.toString();\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this._applyPosition(this._position);\n }\n _applyPosition(position) {\n this.isPositionStart = this.isPositionEnd = false;\n switch (position) {\n case IgxHintPosition.START:\n this.isPositionStart = true;\n break;\n case IgxHintPosition.END:\n this.isPositionEnd = true;\n break;\n default: break;\n }\n }\n}\nIgxHintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxHintDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHintDirective, selector: \"igx-hint,[igxHint]\", inputs: { position: \"position\" }, host: { properties: { \"class.igx-input-group__hint-item--start\": \"this.isPositionStart\", \"class.igx-input-group__hint-item--end\": \"this.isPositionEnd\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHintDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-hint,[igxHint]'\n }]\n }], propDecorators: { isPositionStart: [{\n type: HostBinding,\n args: ['class.igx-input-group__hint-item--start']\n }], isPositionEnd: [{\n type: HostBinding,\n args: ['class.igx-input-group__hint-item--end']\n }], position: [{\n type: Input,\n args: ['position']\n }] } });\n\n/** @hidden */\nclass IgxInputGroupBase {\n}\n\nconst nativeValidationAttributes = [\n 'required',\n 'pattern',\n 'minlength',\n 'maxlength',\n 'min',\n 'max',\n 'step',\n];\nvar IgxInputState;\n(function (IgxInputState) {\n IgxInputState[IgxInputState[\"INITIAL\"] = 0] = \"INITIAL\";\n IgxInputState[IgxInputState[\"VALID\"] = 1] = \"VALID\";\n IgxInputState[IgxInputState[\"INVALID\"] = 2] = \"INVALID\";\n})(IgxInputState || (IgxInputState = {}));\n/**\n * The `igxInput` directive creates single- or multiline text elements, covering common scenarios when dealing with form inputs.\n *\n * @igxModule IgxInputGroupModule\n *\n * @igxParent Data Entry & Display\n *\n * @igxTheme igx-input-group-theme\n *\n * @igxKeywords input, input group, form, field, validation\n *\n * @igxGroup presentation\n *\n * @example\n * ```html\n * \n * \n * \n * \n * ```\n */\nclass IgxInputDirective {\n constructor(inputGroup, ngModel, formControl, element, cdr, renderer) {\n this.inputGroup = inputGroup;\n this.ngModel = ngModel;\n this.formControl = formControl;\n this.element = element;\n this.cdr = cdr;\n this.renderer = renderer;\n /**\n * Sets/gets whether the `\"igx-input-group__input\"` class is added to the host element.\n * Default value is `false`.\n *\n * @example\n * ```typescript\n * this.igxInput.isInput = true;\n * ```\n *\n * @example\n * ```typescript\n * let isCLassAdded = this.igxInput.isInput;\n * ```\n */\n this.isInput = false;\n /**\n * Sets/gets whether the `\"class.igx-input-group__textarea\"` class is added to the host element.\n * Default value is `false`.\n *\n * @example\n * ```typescript\n * this.igxInput.isTextArea = true;\n * ```\n *\n * @example\n * ```typescript\n * let isCLassAdded = this.igxInput.isTextArea;\n * ```\n */\n this.isTextArea = false;\n this._valid = IgxInputState.INITIAL;\n this._disabled = false;\n }\n get ngControl() {\n return this.ngModel ? this.ngModel : this.formControl;\n }\n /**\n * Sets the `value` property.\n *\n * @example\n * ```html\n * \n * \n * \n * ```\n */\n set value(value) {\n this.nativeElement.value = value ?? '';\n this.updateValidityState();\n }\n /**\n * Gets the `value` property.\n *\n * @example\n * ```typescript\n * @ViewChild('igxInput', {read: IgxInputDirective})\n * public igxInput: IgxInputDirective;\n * let inputValue = this.igxInput.value;\n * ```\n */\n get value() {\n return this.nativeElement.value;\n }\n /**\n * Sets the `disabled` property.\n *\n * @example\n * ```html\n * \n * \n * \n * ```\n */\n set disabled(value) {\n this._disabled = this.inputGroup.disabled = !!((value === '') || value);\n if (this.focused && this._disabled) {\n // Browser focus may not fire in good time and mess with change detection, adjust here in advance:\n this.inputGroup.isFocused = false;\n }\n }\n /**\n * Gets the `disabled` property\n *\n * @example\n * ```typescript\n * @ViewChild('igxInput', {read: IgxInputDirective})\n * public igxInput: IgxInputDirective;\n * let isDisabled = this.igxInput.disabled;\n * ```\n */\n get disabled() {\n return this._disabled;\n }\n /**\n * Sets the `required` property.\n *\n * @example\n * ```html\n * \n * \n * \n * ```\n */\n set required(value) {\n this.nativeElement.required = this.inputGroup.isRequired = (value === '') || value;\n }\n /**\n * Gets whether the igxInput is required.\n *\n * @example\n * ```typescript\n * let isRequired = this.igxInput.required;\n * ```\n */\n get required() {\n let validation;\n if (this.ngControl && (this.ngControl.control.validator || this.ngControl.control.asyncValidator)) {\n validation = this.ngControl.control.validator({});\n }\n return validation && validation.required || this.nativeElement.hasAttribute('required');\n }\n /**\n * @hidden\n * @internal\n */\n onFocus() {\n this.inputGroup.isFocused = true;\n }\n /**\n * @param event The event to invoke the handler\n *\n * @hidden\n * @internal\n */\n onBlur() {\n this.inputGroup.isFocused = false;\n this.updateValidityState();\n }\n /** @hidden @internal */\n onInput() {\n this.checkNativeValidity();\n }\n /** @hidden @internal */\n change(event) {\n if (this.type === 'file') {\n const fileList = event.target\n .files;\n const fileArray = [];\n if (fileList) {\n for (const file of Array.from(fileList)) {\n fileArray.push(file);\n }\n }\n this._fileNames = (fileArray || []).map((f) => f.name).join(', ');\n if (this.required && fileList?.length > 0) {\n this._valid = IgxInputState.INITIAL;\n }\n }\n }\n /** @hidden @internal */\n get fileNames() {\n return this._fileNames;\n }\n /** @hidden @internal */\n clear() {\n this.ngControl?.control?.setValue('');\n this.nativeElement.value = null;\n this._fileNames = '';\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.inputGroup.hasPlaceholder = this.nativeElement.hasAttribute('placeholder');\n if (this.ngControl && this.ngControl.disabled !== null) {\n this.disabled = this.ngControl.disabled;\n }\n this.inputGroup.disabled =\n this.inputGroup.disabled ||\n this.nativeElement.hasAttribute('disabled');\n this.inputGroup.isRequired = this.nativeElement.hasAttribute('required');\n // Make sure we do not invalidate the input on init\n if (!this.ngControl) {\n this._valid = IgxInputState.INITIAL;\n }\n // Also check the control's validators for required\n if (this.required && !this.inputGroup.isRequired) {\n this.inputGroup.isRequired = this.required;\n }\n this.renderer.setAttribute(this.nativeElement, 'aria-required', this.required.toString());\n const elTag = this.nativeElement.tagName.toLowerCase();\n if (elTag === 'textarea') {\n this.isTextArea = true;\n }\n else {\n this.isInput = true;\n }\n if (this.ngControl) {\n this._statusChanges$ = this.ngControl.statusChanges.subscribe(this.onStatusChanged.bind(this));\n }\n this.cdr.detectChanges();\n }\n /** @hidden @internal */\n ngOnDestroy() {\n if (this._statusChanges$) {\n this._statusChanges$.unsubscribe();\n }\n }\n /**\n * Sets a focus on the igxInput.\n *\n * @example\n * ```typescript\n * this.igxInput.focus();\n * ```\n */\n focus() {\n this.nativeElement.focus();\n }\n /**\n * Gets the `nativeElement` of the igxInput.\n *\n * @example\n * ```typescript\n * let igxInputNativeElement = this.igxInput.nativeElement;\n * ```\n */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /** @hidden @internal */\n onStatusChanged() {\n // Enable/Disable control based on ngControl #7086\n if (this.disabled !== this.ngControl.disabled) {\n this.disabled = this.ngControl.disabled;\n }\n this.updateValidityState();\n }\n /**\n * @hidden\n * @internal\n */\n updateValidityState() {\n if (this.ngControl) {\n if (this.ngControl.control.validator || this.ngControl.control.asyncValidator) {\n // Run the validation with empty object to check if required is enabled.\n const error = this.ngControl.control.validator({});\n this.inputGroup.isRequired = error && error.required;\n if (!this.disabled && (this.ngControl.control.touched || this.ngControl.control.dirty)) {\n // the control is not disabled and is touched or dirty\n this._valid = this.ngControl.invalid ?\n IgxInputState.INVALID : this.focused ? IgxInputState.VALID :\n IgxInputState.INITIAL;\n }\n else {\n // if control is untouched, pristine, or disabled its state is initial. This is when user did not interact\n // with the input or when form/control is reset\n this._valid = IgxInputState.INITIAL;\n }\n }\n else {\n // If validator is dynamically cleared, reset label's required class(asterisk) and IgxInputState #10010\n this._valid = IgxInputState.INITIAL;\n this.inputGroup.isRequired = false;\n }\n this.renderer.setAttribute(this.nativeElement, 'aria-required', this.required.toString());\n const ariaInvalid = this.valid === IgxInputState.INVALID;\n this.renderer.setAttribute(this.nativeElement, 'aria-invalid', ariaInvalid.toString());\n }\n else {\n this.checkNativeValidity();\n }\n }\n /**\n * Gets whether the igxInput has a placeholder.\n *\n * @example\n * ```typescript\n * let hasPlaceholder = this.igxInput.hasPlaceholder;\n * ```\n */\n get hasPlaceholder() {\n return this.nativeElement.hasAttribute('placeholder');\n }\n /**\n * Gets the placeholder element of the igxInput.\n *\n * @example\n * ```typescript\n * let igxInputPlaceholder = this.igxInput.placeholder;\n * ```\n */\n get placeholder() {\n return this.nativeElement.placeholder;\n }\n /**\n * @returns An indicator of whether the input has validator attributes or not\n *\n * @hidden\n * @internal\n */\n _hasValidators() {\n for (const nativeValidationAttribute of nativeValidationAttributes) {\n if (this.nativeElement.hasAttribute(nativeValidationAttribute)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Gets whether the igxInput is focused.\n *\n * @example\n * ```typescript\n * let isFocused = this.igxInput.focused;\n * ```\n */\n get focused() {\n return this.inputGroup.isFocused;\n }\n /**\n * Gets the state of the igxInput.\n *\n * @example\n * ```typescript\n * let igxInputState = this.igxInput.valid;\n * ```\n */\n get valid() {\n return this._valid;\n }\n /**\n * Sets the state of the igxInput.\n *\n * @example\n * ```typescript\n * this.igxInput.valid = IgxInputState.INVALID;\n * ```\n */\n set valid(value) {\n this._valid = value;\n }\n /**\n * Gets whether the igxInput is valid.\n *\n * @example\n * ```typescript\n * let valid = this.igxInput.isValid;\n * ```\n */\n get isValid() {\n return this.valid !== IgxInputState.INVALID;\n }\n /**\n * A function to assign a native validity property of an input.\n * This should be used when there's no ngControl\n *\n * @hidden\n * @internal\n */\n checkNativeValidity() {\n if (!this.disabled && this._hasValidators()) {\n this._valid = this.nativeElement.checkValidity() ?\n this.focused ? IgxInputState.VALID : IgxInputState.INITIAL :\n IgxInputState.INVALID;\n }\n }\n /**\n * Returns the input type.\n *\n * @hidden\n * @internal\n */\n get type() {\n return this.nativeElement.type;\n }\n}\nIgxInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputDirective, deps: [{ token: IgxInputGroupBase }, { token: NgModel, optional: true, self: true }, { token: NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nIgxInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: { value: \"value\", disabled: \"disabled\", required: \"required\" }, host: { listeners: { \"focus\": \"onFocus()\", \"blur\": \"onBlur()\", \"input\": \"onInput()\", \"change\": \"change($event)\" }, properties: { \"class.igx-input-group__input\": \"this.isInput\", \"class.igx-input-group__textarea\": \"this.isTextArea\", \"disabled\": \"this.disabled\" } }, exportAs: [\"igxInput\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxInput]',\n exportAs: 'igxInput',\n }]\n }], ctorParameters: function () { return [{ type: IgxInputGroupBase }, { type: i5.NgModel, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NgModel]\n }] }, { type: i5.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NgControl]\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { isInput: [{\n type: HostBinding,\n args: ['class.igx-input-group__input']\n }], isTextArea: [{\n type: HostBinding,\n args: ['class.igx-input-group__textarea']\n }], value: [{\n type: Input\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['disabled']\n }], required: [{\n type: Input\n }], onFocus: [{\n type: HostListener,\n args: ['focus']\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }], onInput: [{\n type: HostListener,\n args: ['input']\n }], change: [{\n type: HostListener,\n args: ['change', ['$event']]\n }] } });\n\nlet NEXT_ID$s = 0;\nclass IgxLabelDirective {\n constructor() {\n this.defaultClass = true;\n /**\n * @hidden\n */\n this.id = `igx-label-${NEXT_ID$s++}`;\n }\n}\nIgxLabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxLabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxLabelDirective, selector: \"[igxLabel]\", inputs: { id: \"id\" }, host: { properties: { \"class.igx-input-group__label\": \"this.defaultClass\", \"attr.id\": \"this.id\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLabelDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxLabel]'\n }]\n }], propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-input-group__label']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }] } });\n\n/**\n * @hidden\n */\nclass IgxPrefixDirective {\n}\nIgxPrefixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxPrefixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPrefixDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-prefix,[igxPrefix],[igxStart]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxPrefixModule {\n}\nIgxPrefixModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPrefixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxPrefixModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPrefixModule, declarations: [IgxPrefixDirective], exports: [IgxPrefixDirective] });\nIgxPrefixModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPrefixModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPrefixModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxPrefixDirective],\n exports: [IgxPrefixDirective]\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxSuffixDirective {\n}\nIgxSuffixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSuffixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSuffixDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-suffix,[igxSuffix],[igxEnd]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxSuffixModule {\n}\nIgxSuffixModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSuffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSuffixModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSuffixModule, declarations: [IgxSuffixDirective], exports: [IgxSuffixDirective] });\nIgxSuffixModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSuffixModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSuffixModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxSuffixDirective],\n exports: [IgxSuffixDirective]\n }]\n }] });\n\n/**\n * **Ignite UI for Angular Icon Service** -\n *\n * The Ignite UI Icon Service makes it easy for developers to include custom SVG images and use them with IgxIconComponent.\n * In addition it could be used to associate a custom class to be applied on IgxIconComponent according to given font-family.\n *\n * Example:\n * ```typescript\n * this.iconService.registerFamilyAlias('material', 'material-icons');\n * this.iconService.addSvgIcon('aruba', '/assets/svg/country_flags/aruba.svg', 'svg-flags');\n * ```\n */\nclass IgxIconService {\n constructor(_sanitizer, _httpClient, _platformUtil, _document) {\n this._sanitizer = _sanitizer;\n this._httpClient = _httpClient;\n this._platformUtil = _platformUtil;\n this._document = _document;\n this._family = 'material-icons';\n this._familyAliases = new Map();\n this._cachedSvgIcons = new Map();\n this._iconLoaded = new Subject();\n this.iconLoaded = this._iconLoaded.asObservable();\n if (this._platformUtil?.isBrowser) {\n this._domParser = new DOMParser();\n }\n }\n /**\n * Returns the default font-family.\n * ```typescript\n * const defaultFamily = this.iconService.defaultFamily;\n * ```\n */\n get defaultFamily() {\n return this._family;\n }\n /**\n * Sets the default font-family.\n * ```typescript\n * this.iconService.defaultFamily = 'svg-flags';\n * ```\n */\n set defaultFamily(className) {\n this._family = className;\n }\n /**\n * Registers a custom class to be applied to IgxIconComponent for a given font-family.\n * ```typescript\n * this.iconService.registerFamilyAlias('material', 'material-icons');\n * ```\n */\n registerFamilyAlias(alias, className = alias) {\n this._familyAliases.set(alias, className);\n return this;\n }\n /**\n * Returns the custom class, if any, associated to a given font-family.\n * ```typescript\n * const familyClass = this.iconService.familyClassName('material');\n * ```\n */\n familyClassName(alias) {\n return this._familyAliases.get(alias) || alias;\n }\n /**\n * Adds an SVG image to the cache. SVG source is an url.\n * ```typescript\n * this.iconService.addSvgIcon('aruba', '/assets/svg/country_flags/aruba.svg', 'svg-flags');\n * ```\n */\n addSvgIcon(name, url, family = this._family, stripMeta = false) {\n if (name && url) {\n const safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(url);\n if (!safeUrl) {\n throw new Error(`The provided URL could not be processed as trusted resource URL by Angular's DomSanitizer: \"${url}\".`);\n }\n const sanitizedUrl = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n if (!sanitizedUrl) {\n throw new Error(`The URL provided was not trusted as a resource URL: \"${url}\".`);\n }\n if (!this.isSvgIconCached(name, family)) {\n this.fetchSvg(url).subscribe((res) => {\n this.cacheSvgIcon(name, res, family, stripMeta);\n this._iconLoaded.next({ name, value: res, family });\n });\n }\n }\n else {\n throw new Error('You should provide at least `name` and `url` to register an svg icon.');\n }\n }\n /**\n * Adds an SVG image to the cache. SVG source is its text.\n * ```typescript\n * this.iconService.addSvgIconFromText('simple', '\n * ', 'svg-flags');\n * ```\n */\n addSvgIconFromText(name, iconText, family = '', stripMeta = false) {\n if (name && iconText) {\n if (this.isSvgIconCached(name, family)) {\n return;\n }\n this.cacheSvgIcon(name, iconText, family, stripMeta);\n }\n else {\n throw new Error('You should provide at least `name` and `iconText` to register an svg icon.');\n }\n }\n /**\n * Returns whether a given SVG image is present in the cache.\n * ```typescript\n * const isSvgCached = this.iconService.isSvgIconCached('aruba', 'svg-flags');\n * ```\n */\n isSvgIconCached(name, family = '') {\n const familyClassName = this.familyClassName(family);\n if (this._cachedSvgIcons.has(familyClassName)) {\n const familyRegistry = this._cachedSvgIcons.get(familyClassName);\n return familyRegistry.has(name);\n }\n return false;\n }\n /**\n * Returns the cached SVG image as string.\n * ```typescript\n * const svgIcon = this.iconService.getSvgIcon('aruba', 'svg-flags');\n * ```\n */\n getSvgIcon(name, family = '') {\n const familyClassName = this.familyClassName(family);\n return this._cachedSvgIcons.get(familyClassName)?.get(name);\n }\n /**\n * @hidden\n */\n fetchSvg(url) {\n const req = this._httpClient.get(url, { responseType: 'text' });\n return req;\n }\n /**\n * @hidden\n */\n cacheSvgIcon(name, value, family = this._family, stripMeta) {\n family = !!family ? family : this._family;\n if (this._platformUtil?.isBrowser && name && value) {\n const doc = this._domParser.parseFromString(value, 'image/svg+xml');\n const svg = doc.querySelector('svg');\n if (!this._cachedSvgIcons.has(family)) {\n this._cachedSvgIcons.set(family, new Map());\n }\n if (svg) {\n svg.setAttribute('fit', '');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n if (stripMeta) {\n const title = svg.querySelector('title');\n const desc = svg.querySelector('desc');\n if (title) {\n svg.removeChild(title);\n }\n if (desc) {\n svg.removeChild(desc);\n }\n }\n const safeSvg = this._sanitizer.bypassSecurityTrustHtml(svg.outerHTML);\n this._cachedSvgIcons.get(family).set(name, safeSvg);\n }\n }\n }\n}\nIgxIconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconService, deps: [{ token: i1$2.DomSanitizer, optional: true }, { token: i2.HttpClient, optional: true }, { token: PlatformUtil, optional: true }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxIconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return [{ type: i1$2.DomSanitizer, decorators: [{\n type: Optional\n }] }, { type: i2.HttpClient, decorators: [{\n type: Optional\n }] }, { type: PlatformUtil, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * Icon provides a way to include material icons to markup\n *\n * @igxModule IgxIconModule\n *\n * @igxTheme igx-icon-theme\n *\n * @igxKeywords icon, picture\n *\n * @igxGroup Display\n *\n * @remarks\n *\n * The Ignite UI Icon makes it easy for developers to include material design icons directly in their markup. The icons\n * support different icon families and can be marked as active or disabled using the `active` property. This will change the appearance\n * of the icon.\n *\n * @example\n * ```html\n * home\n * ```\n */\nclass IgxIconComponent {\n constructor(el, iconService, ref) {\n this.el = el;\n this.iconService = iconService;\n this.ref = ref;\n /**\n * This allows you to change the value of `class.igx-icon`. By default it's `igx-icon`.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-icon';\n /**\n * This allows you to disable the `aria-hidden` attribute. By default it's applied.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\") public icon: IgxIconComponent;\n * constructor(private cdRef:ChangeDetectorRef) {}\n * ngAfterViewInit() {\n * this.icon.ariaHidden = false;\n * this.cdRef.detectChanges();\n * }\n * ```\n */\n this.ariaHidden = true;\n /**\n * An @Input property that allows you to disable the `active` property. By default it's applied.\n *\n * @example\n * ```html\n * settings\n * ```\n */\n this.active = true;\n this.destroy$ = new Subject();\n this.family = this.iconService.defaultFamily;\n this.iconService.registerFamilyAlias('material', 'material-icons');\n this.iconService.iconLoaded\n .pipe(first$1((e) => e.name === this.name && e.family === this.family), takeUntil(this.destroy$))\n .subscribe(() => this.ref.detectChanges());\n }\n /**\n * @hidden\n * @internal\n */\n ngOnInit() {\n this.updateIconClass();\n }\n /**\n * @hidden\n * @internal\n */\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n /**\n * An accessor that returns the value of the family property.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\")\n * public icon: IgxIconComponent;\n * ngAfterViewInit() {\n * let iconFamily = this.icon.getFamily;\n * }\n * ```\n */\n get getFamily() {\n return this.family;\n }\n /**\n * An accessor that returns the value of the active property.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\")\n * public icon: IgxIconComponent;\n * ngAfterViewInit() {\n * let iconActive = this.icon.getActive;\n * }\n * ```\n */\n get getActive() {\n return this.active;\n }\n /**\n * An accessor that returns inactive property.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\")\n * public icon: IgxIconComponent;\n * ngAfterViewInit() {\n * let iconActive = this.icon.getInactive;\n * }\n * ```\n */\n get getInactive() {\n return !this.active;\n }\n /**\n * An accessor that returns the value of the iconName property.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\")\n * public icon: IgxIconComponent;\n * ngAfterViewInit() {\n * let name = this.icon.getName;\n * }\n * ```\n */\n get getName() {\n return this.name;\n }\n /**\n * An accessor that returns the underlying SVG image as SafeHtml.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\")\n * public icon: IgxIconComponent;\n * ngAfterViewInit() {\n * let svg: SafeHtml = this.icon.getSvg;\n * }\n * ```\n */\n get getSvg() {\n if (this.iconService.isSvgIconCached(this.name, this.family)) {\n return this.iconService.getSvgIcon(this.name, this.family);\n }\n return null;\n }\n /**\n * An accessor that returns a TemplateRef to explicit, svg or no ligature.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyIcon\")\n * public icon: IgxIconComponent;\n * ngAfterViewInit() {\n * let iconTemplate = this.icon.template;\n * }\n * ```\n */\n get template() {\n if (this.name) {\n if (this.iconService.isSvgIconCached(this.name, this.family)) {\n return this.svgImage;\n }\n return this.noLigature;\n }\n return this.explicitLigature;\n }\n /**\n * @hidden\n * @internal\n */\n updateIconClass() {\n const className = this.iconService.familyClassName(this.family);\n this.el.nativeElement.classList.add(className);\n if (this.name && !this.iconService.isSvgIconCached(this.name, this.family)) {\n this.el.nativeElement.classList.add(this.name);\n }\n }\n}\nIgxIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconComponent, deps: [{ token: i0.ElementRef }, { token: IgxIconService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxIconComponent, selector: \"igx-icon\", inputs: { family: \"family\", active: \"active\", name: \"name\" }, host: { properties: { \"class.igx-icon\": \"this.cssClass\", \"attr.aria-hidden\": \"this.ariaHidden\", \"class.igx-icon--inactive\": \"this.getInactive\" } }, viewQueries: [{ propertyName: \"noLigature\", first: true, predicate: [\"noLigature\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"explicitLigature\", first: true, predicate: [\"explicitLigature\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"svgImage\", first: true, predicate: [\"svgImage\"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: \"\\n\\n\\n \\n\\n\\n\\n
    \\n
    \\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-icon', template: \"\\n\\n\\n \\n\\n\\n\\n
    \\n
    \\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IgxIconService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-icon']\n }], ariaHidden: [{\n type: HostBinding,\n args: ['attr.aria-hidden']\n }], family: [{\n type: Input,\n args: ['family']\n }], active: [{\n type: Input,\n args: ['active']\n }], name: [{\n type: Input,\n args: ['name']\n }], noLigature: [{\n type: ViewChild,\n args: ['noLigature', { read: TemplateRef, static: true }]\n }], explicitLigature: [{\n type: ViewChild,\n args: ['explicitLigature', { read: TemplateRef, static: true }]\n }], svgImage: [{\n type: ViewChild,\n args: ['svgImage', { read: TemplateRef, static: true }]\n }], getInactive: [{\n type: HostBinding,\n args: ['class.igx-icon--inactive']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxIconModule {\n}\nIgxIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconModule, declarations: [IgxIconComponent], imports: [CommonModule], exports: [IgxIconComponent] });\nIgxIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxIconModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxIconComponent],\n exports: [IgxIconComponent],\n imports: [CommonModule]\n }]\n }] });\n\nconst IgxInputGroupEnum = mkenum({\n Line: 'line',\n Box: 'box',\n Border: 'border',\n Search: 'search'\n});\n/**\n * Defines the InputGroupType DI token.\n */\n// Should this go trough Interface https://angular.io/api/core/InjectionToken\nconst IGX_INPUT_GROUP_TYPE = new InjectionToken('InputGroupType');\n\nconst IgxInputGroupTheme = mkenum({\n Material: 'material',\n Fluent: 'fluent',\n Bootstrap: 'bootstrap',\n IndigoDesign: 'indigo-design'\n});\nclass IgxInputGroupComponent extends DisplayDensityBase {\n /**\n * Sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * Returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n /** @hidden */\n get validClass() {\n return this.input.valid === IgxInputState.VALID;\n }\n /** @hidden */\n get invalidClass() {\n return this.input.valid === IgxInputState.INVALID;\n }\n /** @hidden */\n get isFilled() {\n return this._filled || (this.input && this.input.value);\n }\n /** @hidden */\n get isDisplayDensityCosy() {\n return this.displayDensity === DisplayDensity.cosy;\n }\n /** @hidden */\n get isDisplayDensityComfortable() {\n return this.displayDensity === DisplayDensity.comfortable;\n }\n /** @hidden */\n get isDisplayDensityCompact() {\n return this.displayDensity === DisplayDensity.compact;\n }\n /** @hidden */\n get textAreaClass() {\n return this.input.isTextArea;\n }\n /**\n * An @Input property that sets how the input will be styled.\n * Allowed values of type IgxInputGroupType.\n * ```html\n * \n * ```\n */\n set type(value) {\n this._type = value;\n }\n /**\n * Returns the type of the `IgxInputGroupComponent`. How the input is styled.\n * The default is `line`.\n * ```typescript\n * @ViewChild(\"MyInputGroup\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let inputType = this.inputGroup.type;\n * }\n * ```\n */\n get type() {\n return this._type || this._inputGroupType || 'line';\n }\n /**\n * Sets the theme of the input.\n * Allowed values of type IgxInputGroupTheme.\n * ```typescript\n * @ViewChild(\"MyInputGroup\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit() {\n * let inputTheme = 'fluent';\n * }\n */\n set theme(value) {\n this._theme = value;\n }\n /**\n * Returns the theme of the input.\n * The returned value is of type IgxInputGroupType.\n * ```typescript\n * @ViewChild(\"MyInputGroup\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit() {\n * let inputTheme = this.inputGroup.theme;\n * }\n */\n get theme() {\n return this._theme;\n }\n constructor(element, _displayDensityOptions, _inputGroupType, document, platform, cdr) {\n super(_displayDensityOptions);\n this.element = element;\n this._inputGroupType = _inputGroupType;\n this.document = document;\n this.platform = platform;\n this.cdr = cdr;\n /**\n * Property that enables/disables the auto-generated class of the `IgxInputGroupComponent`.\n * By default applied the class is applied.\n * ```typescript\n * @ViewChild(\"MyInputGroup\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * this.inputGroup.defaultClass = false;\n * ```\n * }\n */\n this.defaultClass = true;\n /** @hidden */\n this.hasPlaceholder = false;\n /** @hidden */\n this.isRequired = false;\n /** @hidden */\n this.isFocused = false;\n /**\n * @hidden @internal\n * When truthy, disables the `IgxInputGroupComponent`.\n * Controlled by the underlying `IgxInputDirective`.\n * ```html\n * \n * ```\n */\n this.disabled = false;\n /**\n * Prevents automatically focusing the input when clicking on other elements in the input group (e.g. prefix or suffix).\n *\n * @remarks Automatic focus causes software keyboard to show on mobile devices.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.suppressInputAutofocus = false;\n /** @hidden */\n this.hasWarning = false;\n this._type = null;\n this._filled = false;\n this._theme$ = new Subject();\n this._resourceStrings = CurrentResourceStrings.InputResStrings;\n this._subscription = this._theme$.asObservable().subscribe(value => {\n this._theme = value;\n this.cdr.detectChanges();\n });\n }\n /** @hidden */\n onClick(event) {\n if (!this.isFocused &&\n event.target !== this.input.nativeElement &&\n !this.suppressInputAutofocus) {\n this.input.focus();\n }\n }\n /** @hidden */\n onPointerDown(event) {\n if (this.isFocused && event.target !== this.input.nativeElement) {\n event.preventDefault();\n }\n }\n /** @hidden @internal */\n hintClickHandler(event) {\n event.stopPropagation();\n }\n /**\n * Returns whether the `IgxInputGroupComponent` has hints.\n * ```typescript\n * @ViewChild(\"MyInputGroup\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let inputHints = this.inputGroup.hasHints;\n * }\n * ```\n */\n get hasHints() {\n return this.hints.length > 0;\n }\n /** @hidden @internal */\n get hasPrefixes() {\n return this._prefixes.length > 0 || this.isFileType;\n }\n /** @hidden @internal */\n set prefixes(items) {\n this._prefixes = items;\n }\n /** @hidden @internal */\n get hasSuffixes() {\n return this._suffixes.length > 0 || this.isFileType && this.isFilled;\n }\n /** @hidden @internal */\n set suffixes(items) {\n this._suffixes = items;\n }\n /**\n * Returns whether the `IgxInputGroupComponent` has border.\n * ```typescript\n * @ViewChild(\"MyInputGroup\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let inputBorder = this.inputGroup.hasBorder;\n * }\n * ```\n */\n get hasBorder() {\n return ((this.type === 'line' || this.type === 'box') &&\n this._theme === 'material');\n }\n /**\n * Returns whether the `IgxInputGroupComponent` type is line.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeLine = this.inputGroup.isTypeLine;\n * }\n * ```\n */\n get isTypeLine() {\n return this.type === 'line' && this._theme === 'material';\n }\n /**\n * Returns whether the `IgxInputGroupComponent` type is box.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeBox = this.inputGroup.isTypeBox;\n * }\n * ```\n */\n get isTypeBox() {\n return this.type === 'box' && this._theme === 'material';\n }\n /** @hidden @internal */\n uploadButtonHandler() {\n this.input.nativeElement.click();\n }\n /** @hidden @internal */\n clearValueHandler() {\n this.input.clear();\n }\n /** @hidden @internal */\n get isFileType() {\n return this.input.type === 'file';\n }\n /** @hidden @internal */\n get fileNames() {\n return this.input.fileNames || this._resourceStrings.igx_input_file_placeholder;\n }\n /**\n * Returns whether the `IgxInputGroupComponent` type is border.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeBorder = this.inputGroup.isTypeBorder;\n * }\n * ```\n */\n get isTypeBorder() {\n return this.type === 'border' && this._theme === 'material';\n }\n /**\n * Returns true if the `IgxInputGroupComponent` theme is Fluent.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeFluent = this.inputGroup.isTypeFluent;\n * }\n * ```\n */\n get isTypeFluent() {\n return this._theme === 'fluent';\n }\n /**\n * Returns true if the `IgxInputGroupComponent` theme is Bootstrap.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeBootstrap = this.inputGroup.isTypeBootstrap;\n * }\n * ```\n */\n get isTypeBootstrap() {\n return this._theme === 'bootstrap';\n }\n /**\n * Returns true if the `IgxInputGroupComponent` theme is Indigo.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeIndigo = this.inputGroup.isTypeIndigo;\n * }\n * ```\n */\n get isTypeIndigo() {\n return this._theme === 'indigo-design';\n }\n /**\n * Returns whether the `IgxInputGroupComponent` type is search.\n * ```typescript\n * @ViewChild(\"MyInputGroup1\")\n * public inputGroup: IgxInputGroupComponent;\n * ngAfterViewInit(){\n * let isTypeSearch = this.inputGroup.isTypeSearch;\n * }\n * ```\n */\n get isTypeSearch() {\n return this.type === 'search';\n }\n /** @hidden */\n get filled() {\n return this._filled;\n }\n /** @hidden */\n set filled(val) {\n this._filled = val;\n }\n /** @hidden @internal */\n ngAfterViewChecked() {\n if (!this._theme) {\n const cssProp = this.document.defaultView\n .getComputedStyle(this.element.nativeElement)\n .getPropertyValue('--theme')\n .trim();\n if (cssProp !== '') {\n Promise.resolve().then(() => {\n this._theme$.next(cssProp);\n this.cdr.markForCheck();\n });\n }\n }\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this._subscription.unsubscribe();\n }\n}\nIgxInputGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputGroupComponent, deps: [{ token: i0.ElementRef }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }, { token: DOCUMENT }, { token: PlatformUtil }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxInputGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: { resourceStrings: \"resourceStrings\", suppressInputAutofocus: \"suppressInputAutofocus\", type: \"type\", theme: \"theme\" }, host: { listeners: { \"click\": \"onClick($event)\", \"pointerdown\": \"onPointerDown($event)\" }, properties: { \"class.igx-input-group\": \"this.defaultClass\", \"class.igx-input-group--placeholder\": \"this.hasPlaceholder\", \"class.igx-input-group--required\": \"this.isRequired\", \"class.igx-input-group--focused\": \"this.isFocused\", \"class.igx-input-group--disabled\": \"this.disabled\", \"class.igx-input-group--warning\": \"this.hasWarning\", \"class.igx-input-group--valid\": \"this.validClass\", \"class.igx-input-group--invalid\": \"this.invalidClass\", \"class.igx-input-group--filled\": \"this.isFilled\", \"class.igx-input-group--cosy\": \"this.isDisplayDensityCosy\", \"class.igx-input-group--comfortable\": \"this.isDisplayDensityComfortable\", \"class.igx-input-group--compact\": \"this.isDisplayDensityCompact\", \"class.igx-input-group--textarea-group\": \"this.textAreaClass\", \"class.igx-input-group--prefixed\": \"this.hasPrefixes\", \"class.igx-input-group--suffixed\": \"this.hasSuffixes\", \"class.igx-input-group--box\": \"this.isTypeBox\", \"class.igx-input-group--file\": \"this.isFileType\", \"class.igx-input-group--border\": \"this.isTypeBorder\", \"class.igx-input-group--fluent\": \"this.isTypeFluent\", \"class.igx-input-group--bootstrap\": \"this.isTypeBootstrap\", \"class.igx-input-group--indigo\": \"this.isTypeIndigo\", \"class.igx-input-group--search\": \"this.isTypeSearch\" } }, providers: [{ provide: IgxInputGroupBase, useExisting: IgxInputGroupComponent }], queries: [{ propertyName: \"input\", first: true, predicate: IgxInputDirective, descendants: true, read: IgxInputDirective, static: true }, { propertyName: \"hints\", predicate: IgxHintDirective, read: IgxHintDirective }, { propertyName: \"_prefixes\", predicate: IgxPrefixDirective, descendants: true, read: IgxPrefixDirective }, { propertyName: \"_suffixes\", predicate: IgxSuffixDirective, descendants: true, read: IgxSuffixDirective }], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n \\n {{ resourceStrings.igx_input_upload_button }}\\n \\n \\n\\n\\n\\n \\n {{ fileNames }}\\n \\n\\n\\n\\n \\n clear\\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\\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
    \\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 \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i1$1.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i1$1.NgSwitchDefault, selector: \"[ngSwitchDefault]\" }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputGroupComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-input-group', providers: [{ provide: IgxInputGroupBase, useExisting: IgxInputGroupComponent }], template: \"
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n \\n {{ resourceStrings.igx_input_upload_button }}\\n \\n \\n\\n\\n\\n \\n {{ fileNames }}\\n \\n\\n\\n\\n \\n clear\\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\\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
    \\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 \\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: PlatformUtil }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { resourceStrings: [{\n type: Input\n }], defaultClass: [{\n type: HostBinding,\n args: ['class.igx-input-group']\n }], hasPlaceholder: [{\n type: HostBinding,\n args: ['class.igx-input-group--placeholder']\n }], isRequired: [{\n type: HostBinding,\n args: ['class.igx-input-group--required']\n }], isFocused: [{\n type: HostBinding,\n args: ['class.igx-input-group--focused']\n }], disabled: [{\n type: HostBinding,\n args: ['class.igx-input-group--disabled']\n }], suppressInputAutofocus: [{\n type: Input\n }], hasWarning: [{\n type: HostBinding,\n args: ['class.igx-input-group--warning']\n }], hints: [{\n type: ContentChildren,\n args: [IgxHintDirective, { read: IgxHintDirective }]\n }], _prefixes: [{\n type: ContentChildren,\n args: [IgxPrefixDirective, { read: IgxPrefixDirective, descendants: true }]\n }], _suffixes: [{\n type: ContentChildren,\n args: [IgxSuffixDirective, { read: IgxSuffixDirective, descendants: true }]\n }], input: [{\n type: ContentChild,\n args: [IgxInputDirective, { read: IgxInputDirective, static: true }]\n }], validClass: [{\n type: HostBinding,\n args: ['class.igx-input-group--valid']\n }], invalidClass: [{\n type: HostBinding,\n args: ['class.igx-input-group--invalid']\n }], isFilled: [{\n type: HostBinding,\n args: ['class.igx-input-group--filled']\n }], isDisplayDensityCosy: [{\n type: HostBinding,\n args: ['class.igx-input-group--cosy']\n }], isDisplayDensityComfortable: [{\n type: HostBinding,\n args: ['class.igx-input-group--comfortable']\n }], isDisplayDensityCompact: [{\n type: HostBinding,\n args: ['class.igx-input-group--compact']\n }], textAreaClass: [{\n type: HostBinding,\n args: ['class.igx-input-group--textarea-group']\n }], type: [{\n type: Input,\n args: ['type']\n }], theme: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], onPointerDown: [{\n type: HostListener,\n args: ['pointerdown', ['$event']]\n }], hasPrefixes: [{\n type: HostBinding,\n args: ['class.igx-input-group--prefixed']\n }], hasSuffixes: [{\n type: HostBinding,\n args: ['class.igx-input-group--suffixed']\n }], isTypeBox: [{\n type: HostBinding,\n args: ['class.igx-input-group--box']\n }], isFileType: [{\n type: HostBinding,\n args: ['class.igx-input-group--file']\n }], isTypeBorder: [{\n type: HostBinding,\n args: ['class.igx-input-group--border']\n }], isTypeFluent: [{\n type: HostBinding,\n args: ['class.igx-input-group--fluent']\n }], isTypeBootstrap: [{\n type: HostBinding,\n args: ['class.igx-input-group--bootstrap']\n }], isTypeIndigo: [{\n type: HostBinding,\n args: ['class.igx-input-group--indigo']\n }], isTypeSearch: [{\n type: HostBinding,\n args: ['class.igx-input-group--search']\n }] } });\n/** @hidden */\nclass IgxInputGroupModule {\n}\nIgxInputGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxInputGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputGroupModule, declarations: [IgxInputGroupComponent, IgxHintDirective,\n IgxInputDirective,\n IgxLabelDirective], imports: [CommonModule, IgxPrefixModule, IgxSuffixModule, IgxButtonModule, IgxIconModule], exports: [IgxInputGroupComponent, IgxHintDirective,\n IgxInputDirective,\n IgxLabelDirective,\n IgxPrefixModule,\n IgxSuffixModule,\n IgxButtonModule,\n IgxIconModule] });\nIgxInputGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputGroupModule, imports: [CommonModule, IgxPrefixModule, IgxSuffixModule, IgxButtonModule, IgxIconModule, IgxPrefixModule,\n IgxSuffixModule,\n IgxButtonModule,\n IgxIconModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxInputGroupModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxInputGroupComponent,\n IgxHintDirective,\n IgxInputDirective,\n IgxLabelDirective,\n ],\n exports: [\n IgxInputGroupComponent,\n IgxHintDirective,\n IgxInputDirective,\n IgxLabelDirective,\n IgxPrefixModule,\n IgxSuffixModule,\n IgxButtonModule,\n IgxIconModule\n ],\n imports: [CommonModule, IgxPrefixModule, IgxSuffixModule, IgxButtonModule, IgxIconModule],\n }]\n }] });\n\n/**\n * **Ignite UI for Angular Autocomplete** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/autocomplete.html)\n *\n * The igxAutocomplete directive provides a way to enhance a text input\n * by showing a drop down of suggested options, provided by the developer.\n *\n * Example:\n * ```html\n * \n * \n * \n * {{town}}\n * \n * \n * ```\n */\nclass IgxAutocompleteDirective extends IgxDropDownItemNavigationDirective {\n /**\n * Sets the target of the autocomplete directive\n *\n * ```html\n * \n * \n * ...\n * \n * ...\n * \n * ```\n */\n get target() {\n return this._target;\n }\n set target(v) {\n this._target = v;\n }\n /** @hidden @internal */\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n /** @hidden @internal */\n get parentElement() {\n return this.group ? this.group.element.nativeElement : this.nativeElement;\n }\n get settings() {\n const settings = Object.assign({}, this.defaultSettings, this.autocompleteSettings);\n const target = settings.target || settings.positionStrategy.settings.target;\n if (!target) {\n const positionStrategyClone = settings.positionStrategy.clone();\n settings.target = this.parentElement;\n settings.positionStrategy = positionStrategyClone;\n }\n return settings;\n }\n /** @hidden @internal */\n get ariaExpanded() {\n return !this.collapsed;\n }\n /** @hidden @internal */\n get hasPopUp() {\n return 'listbox';\n }\n /** @hidden @internal */\n get ariaOwns() {\n return this.target.listId;\n }\n /** @hidden @internal */\n get ariaActiveDescendant() {\n return !this.target.collapsed && this.target.focusedItem ? this.target.focusedItem.id : null;\n }\n /** @hidden @internal */\n get ariaAutocomplete() {\n return 'list';\n }\n get model() {\n return this.ngModel || this.formControl;\n }\n constructor(ngModel, formControl, group, elementRef, cdr) {\n super(null);\n this.ngModel = ngModel;\n this.formControl = formControl;\n this.group = group;\n this.elementRef = elementRef;\n this.cdr = cdr;\n /** @hidden @internal */\n this.autofill = 'off';\n /** @hidden @internal */\n this.role = 'combobox';\n /**\n * Enables/disables autocomplete component\n *\n * ```typescript\n * // get\n * let disabled = this.autocomplete.disabled;\n * ```\n * ```html\n * \n * \n * ```\n * ```typescript\n * // set\n * public disabled = true;\n * ```\n */\n this.disabled = false;\n /**\n * Emitted after item from the drop down is selected\n *\n * ```html\n * \n * ```\n */\n this.selectionChanging = new EventEmitter();\n this._shouldBeOpen = false;\n this.destroy$ = new Subject();\n }\n /** @hidden @internal */\n onInput() {\n this.open();\n }\n /** @hidden @internal */\n onCompositionStart() {\n if (!this._composing) {\n this._composing = true;\n }\n }\n /** @hidden @internal */\n onCompositionEnd() {\n this._composing = false;\n }\n /** @hidden @internal */\n onArrowDown(event) {\n event.preventDefault();\n this.open();\n }\n /** @hidden @internal */\n onTab() {\n this.close();\n }\n /** @hidden @internal */\n handleKeyDown(event) {\n if (!this.collapsed && !this._composing) {\n switch (event.key.toLowerCase()) {\n case 'space':\n case 'spacebar':\n case ' ':\n case 'home':\n case 'end':\n return;\n default:\n super.handleKeyDown(event);\n }\n }\n }\n /** @hidden @internal */\n onArrowDownKeyDown() {\n super.onArrowDownKeyDown();\n }\n /** @hidden @internal */\n onArrowUpKeyDown() {\n super.onArrowUpKeyDown();\n }\n /** @hidden @internal */\n onEndKeyDown() {\n super.onEndKeyDown();\n }\n /** @hidden @internal */\n onHomeKeyDown() {\n super.onHomeKeyDown();\n }\n /**\n * Closes autocomplete drop down\n */\n close() {\n this._shouldBeOpen = false;\n if (this.collapsed) {\n return;\n }\n this.target.close();\n }\n /**\n * Opens autocomplete drop down\n */\n open() {\n this._shouldBeOpen = true;\n if (this.disabled || !this.collapsed || this.target.children.length === 0) {\n return;\n }\n // if no drop-down width is set, the drop-down will be as wide as the autocomplete input;\n this.target.width = this.target.width || (this.parentElement.clientWidth + 'px');\n this.target.open(this.settings);\n this.highlightFirstItem();\n }\n /** @hidden @internal */\n ngOnInit() {\n const targetElement = this.parentElement;\n this.defaultSettings = {\n target: targetElement,\n modal: false,\n scrollStrategy: new AbsoluteScrollStrategy(),\n positionStrategy: new AutoPositionStrategy(),\n excludeFromOutsideClick: [targetElement]\n };\n }\n /** @hidden */\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n ngAfterViewInit() {\n this.target.children.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.target.children.length) {\n if (!this.collapsed) {\n this.highlightFirstItem();\n }\n else if (this._shouldBeOpen) {\n this.open();\n }\n }\n else {\n // _shouldBeOpen flag should remain unchanged since this state change doesn't come from outside of the component\n // (like in the case of public API or user interaction).\n this.target.close();\n }\n });\n this.target.selectionChanging.pipe(takeUntil(this.destroy$)).subscribe(this.select.bind(this));\n }\n get collapsed() {\n return this.target ? this.target.collapsed : true;\n }\n select(value) {\n if (!value.newSelection) {\n return;\n }\n value.cancel = true; // Disable selection in the drop down, because in autocomplete we do not save selection.\n const newValue = value.newSelection.value;\n const args = { value: newValue, cancel: false };\n this.selectionChanging.emit(args);\n if (args.cancel) {\n return;\n }\n this.close();\n // Update model after the input is re-focused, in order to have proper valid styling.\n // Otherwise when item is selected using mouse (and input is blurred), then valid style will be removed.\n if (this.model) {\n this.model.control.setValue(newValue);\n }\n else {\n this.nativeElement.value = newValue;\n }\n }\n ;\n highlightFirstItem() {\n if (this.target.focusedItem) {\n this.target.focusedItem.focused = false;\n this.target.focusedItem = null;\n }\n this.target.navigateFirst();\n this.cdr.detectChanges();\n }\n ;\n}\nIgxAutocompleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAutocompleteDirective, deps: [{ token: NgModel, optional: true, self: true }, { token: FormControlName, optional: true, self: true }, { token: IgxInputGroupComponent, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxAutocompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxAutocompleteDirective, selector: \"[igxAutocomplete]\", inputs: { target: [\"igxAutocomplete\", \"target\"], autocompleteSettings: [\"igxAutocompleteSettings\", \"autocompleteSettings\"], disabled: [\"igxAutocompleteDisabled\", \"disabled\"] }, outputs: { selectionChanging: \"selectionChanging\" }, host: { listeners: { \"input\": \"onInput()\", \"compositionstart\": \"onCompositionStart()\", \"compositionend\": \"onCompositionEnd()\", \"keydown.ArrowDown\": \"onArrowDown($event)\", \"keydown.Alt.ArrowDown\": \"onArrowDown($event)\", \"keydown.ArrowUp\": \"onArrowDown($event)\", \"keydown.Alt.ArrowUp\": \"onArrowDown($event)\", \"keydown.Tab\": \"onTab()\", \"keydown.Shift.Tab\": \"onTab()\" }, properties: { \"attr.autocomplete\": \"this.autofill\", \"attr.role\": \"this.role\", \"attr.aria-expanded\": \"this.ariaExpanded\", \"attr.aria-haspopup\": \"this.hasPopUp\", \"attr.aria-owns\": \"this.ariaOwns\", \"attr.aria-activedescendant\": \"this.ariaActiveDescendant\", \"attr.aria-autocomplete\": \"this.ariaAutocomplete\" } }, exportAs: [\"igxAutocomplete\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAutocompleteDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxAutocomplete]',\n exportAs: 'igxAutocomplete'\n }]\n }], ctorParameters: function () { return [{ type: i5.NgModel, decorators: [{\n type: Self\n }, {\n type: Optional\n }, {\n type: Inject,\n args: [NgModel]\n }] }, { type: i5.FormControlName, decorators: [{\n type: Self\n }, {\n type: Optional\n }, {\n type: Inject,\n args: [FormControlName]\n }] }, { type: IgxInputGroupComponent, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { target: [{\n type: Input,\n args: ['igxAutocomplete']\n }], autocompleteSettings: [{\n type: Input,\n args: ['igxAutocompleteSettings']\n }], autofill: [{\n type: HostBinding,\n args: ['attr.autocomplete']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], disabled: [{\n type: Input,\n args: ['igxAutocompleteDisabled']\n }], selectionChanging: [{\n type: Output\n }], ariaExpanded: [{\n type: HostBinding,\n args: ['attr.aria-expanded']\n }], hasPopUp: [{\n type: HostBinding,\n args: ['attr.aria-haspopup']\n }], ariaOwns: [{\n type: HostBinding,\n args: ['attr.aria-owns']\n }], ariaActiveDescendant: [{\n type: HostBinding,\n args: ['attr.aria-activedescendant']\n }], ariaAutocomplete: [{\n type: HostBinding,\n args: ['attr.aria-autocomplete']\n }], onInput: [{\n type: HostListener,\n args: ['input']\n }], onCompositionStart: [{\n type: HostListener,\n args: ['compositionstart']\n }], onCompositionEnd: [{\n type: HostListener,\n args: ['compositionend']\n }], onArrowDown: [{\n type: HostListener,\n args: ['keydown.ArrowDown', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.Alt.ArrowDown', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.ArrowUp', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.Alt.ArrowUp', ['$event']]\n }], onTab: [{\n type: HostListener,\n args: ['keydown.Tab']\n }, {\n type: HostListener,\n args: ['keydown.Shift.Tab']\n }] } });\n/** @hidden */\nclass IgxAutocompleteModule {\n}\nIgxAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAutocompleteModule, declarations: [IgxAutocompleteDirective], imports: [IgxDropDownModule, CommonModule], exports: [IgxAutocompleteDirective] });\nIgxAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAutocompleteModule, imports: [IgxDropDownModule, CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAutocompleteModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [IgxDropDownModule, CommonModule],\n declarations: [IgxAutocompleteDirective],\n exports: [IgxAutocompleteDirective]\n }]\n }] });\n\nconst IgxDividerType = mkenum({\n SOLID: 'solid',\n DASHED: 'dashed'\n});\nlet NEXT_ID$r = 0;\nclass IgxDividerDirective {\n constructor() {\n /**\n * Sets/gets the `id` of the divider.\n * If not set, `id` will have value `\"igx-divider-0\"`;\n * ```html\n * \n * ```\n * ```typescript\n * let dividerId = this.divider.id;\n * ```\n */\n this.id = `igx-divider-${NEXT_ID$r++}`;\n /**\n * An @Input property that sets the value of `role` attribute.\n * If not the default value of `separator` will be used.\n */\n this.role = 'separator';\n /**\n * Sets the type of the divider. The default value\n * is `default`. The divider can also be `dashed`;\n * ```html\n * \n * ```\n */\n this.type = IgxDividerType.SOLID;\n /**\n * An @Input that sets the `middle` attribute of the divider.\n * If set to `true` and an `inset` value has been provided,\n * the divider will start shrinking from both ends.\n * ```html\n * \n * ```\n */\n this.middle = false;\n /**\n * An @Input that sets the vertical attribute of the divider.\n * ```html\n * \n * ```\n */\n this.vertical = false;\n /**\n * An @Input property that sets the value of the `inset` attribute.\n * If not provided it will be set to `'0'`.\n * ```html\n * \n * ```\n */\n this._inset = '0';\n }\n get isDashed() {\n return this.type === IgxDividerType.DASHED;\n }\n /**\n * Sets the inset of the divider from the side(s).\n * If the divider attribute `middle` is set to `true`,\n * it will inset the divider on both sides.\n * ```typescript\n * this.divider.inset = '32px';\n * ```\n */\n set inset(value) {\n this._inset = value;\n }\n /**\n * Gets the current divider inset in terms of\n * margin representation as applied to the divider.\n * ```typescript\n * const inset = this.divider.inset;\n * ```\n */\n get inset() {\n const baseMargin = '0';\n if (this.middle) {\n if (this.vertical) {\n return `${this._inset} ${baseMargin}`;\n }\n return `${baseMargin} ${this._inset}`;\n }\n else {\n if (this.vertical) {\n return `${this._inset} ${baseMargin} 0 ${baseMargin}`;\n }\n return `${baseMargin} 0 ${baseMargin} ${this._inset}`;\n }\n }\n /**\n * A getter that returns `true` if the type of the divider is `default`;\n * ```typescript\n * const isDefault = this.divider.isDefault;\n * ```\n */\n get isSolid() {\n return this.type === IgxDividerType.SOLID;\n }\n}\nIgxDividerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDividerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxDividerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDividerDirective, selector: \"igx-divider\", inputs: { id: \"id\", role: \"role\", type: \"type\", middle: \"middle\", vertical: \"vertical\", _inset: [\"inset\", \"_inset\"] }, host: { properties: { \"attr.id\": \"this.id\", \"attr.role\": \"this.role\", \"class.igx-divider\": \"this.type\", \"class.igx-divider--dashed\": \"this.isDashed\", \"class.igx-divider--inset\": \"this.middle\", \"class.igx-divider--vertical\": \"this.vertical\", \"style.margin\": \"this.inset\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDividerDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-divider'\n }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }], type: [{\n type: HostBinding,\n args: ['class.igx-divider']\n }, {\n type: Input\n }], isDashed: [{\n type: HostBinding,\n args: ['class.igx-divider--dashed']\n }], middle: [{\n type: HostBinding,\n args: ['class.igx-divider--inset']\n }, {\n type: Input\n }], vertical: [{\n type: HostBinding,\n args: ['class.igx-divider--vertical']\n }, {\n type: Input\n }], inset: [{\n type: HostBinding,\n args: ['style.margin']\n }], _inset: [{\n type: Input,\n args: ['inset']\n }] } });\nclass IgxDividerModule {\n}\nIgxDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDividerModule, declarations: [IgxDividerDirective], exports: [IgxDividerDirective] });\nIgxDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDividerModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDividerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxDividerDirective],\n exports: [IgxDividerDirective]\n }]\n }] });\n\n// @dynamic\nclass IgxDefaultDropStrategy {\n dropAction(_drag, _drop, _atIndex) { }\n}\n// @dynamic\nclass IgxAppendDropStrategy {\n constructor(_renderer) {\n this._renderer = _renderer;\n }\n dropAction(drag, drop, _atIndex) {\n const dragElement = drag.element.nativeElement;\n const dropAreaElement = drop.element.nativeElement;\n this._renderer.removeChild(dragElement.parentNode, dragElement);\n this._renderer.appendChild(dropAreaElement, dragElement);\n }\n}\n// @dynamic\nclass IgxPrependDropStrategy {\n constructor(_renderer) {\n this._renderer = _renderer;\n }\n dropAction(drag, drop, _atIndex) {\n const dragElement = drag.element.nativeElement;\n const dropAreaElement = drop.element.nativeElement;\n this._renderer.removeChild(dragElement.parentNode, dragElement);\n if (dropAreaElement.children.length) {\n this._renderer.insertBefore(dropAreaElement, dragElement, dropAreaElement.children[0]);\n }\n else {\n this._renderer.appendChild(dropAreaElement, dragElement);\n }\n }\n}\n// @dynamic\nclass IgxInsertDropStrategy {\n constructor(_renderer) {\n this._renderer = _renderer;\n }\n dropAction(drag, drop, atIndex) {\n if (drag.element.nativeElement.parentElement === drop.element.nativeElement && atIndex === -1) {\n return;\n }\n const dragElement = drag.element.nativeElement;\n const dropAreaElement = drop.element.nativeElement;\n this._renderer.removeChild(dragElement.parentNode, dragElement);\n if (atIndex !== -1 && dropAreaElement.children.length > atIndex) {\n this._renderer.insertBefore(dropAreaElement, dragElement, dropAreaElement.children[atIndex]);\n }\n else {\n this._renderer.appendChild(dropAreaElement, dragElement);\n }\n }\n}\n\nvar DragScrollDirection$1;\n(function (DragScrollDirection) {\n DragScrollDirection[DragScrollDirection[\"UP\"] = 0] = \"UP\";\n DragScrollDirection[DragScrollDirection[\"DOWN\"] = 1] = \"DOWN\";\n DragScrollDirection[DragScrollDirection[\"LEFT\"] = 2] = \"LEFT\";\n DragScrollDirection[DragScrollDirection[\"RIGHT\"] = 3] = \"RIGHT\";\n})(DragScrollDirection$1 || (DragScrollDirection$1 = {}));\nvar DragDirection;\n(function (DragDirection) {\n DragDirection[DragDirection[\"VERTICAL\"] = 0] = \"VERTICAL\";\n DragDirection[DragDirection[\"HORIZONTAL\"] = 1] = \"HORIZONTAL\";\n DragDirection[DragDirection[\"BOTH\"] = 2] = \"BOTH\";\n})(DragDirection || (DragDirection = {}));\nclass IgxDragLocation {\n constructor(_pageX, _pageY) {\n this._pageX = _pageX;\n this._pageY = _pageY;\n this.pageX = parseFloat(_pageX);\n this.pageY = parseFloat(_pageY);\n }\n}\nclass IgxDragHandleDirective {\n constructor(element) {\n this.element = element;\n this.baseClass = true;\n }\n}\nIgxDragHandleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragHandleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDragHandleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDragHandleDirective, selector: \"[igxDragHandle]\", host: { properties: { \"class.igx-drag__handle\": \"this.baseClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragHandleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDragHandle]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { baseClass: [{\n type: HostBinding,\n args: ['class.igx-drag__handle']\n }] } });\nclass IgxDragIgnoreDirective {\n constructor(element) {\n this.element = element;\n this.baseClass = true;\n }\n}\nIgxDragIgnoreDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragIgnoreDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDragIgnoreDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDragIgnoreDirective, selector: \"[igxDragIgnore]\", host: { properties: { \"class.igx-drag__ignore\": \"this.baseClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragIgnoreDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDragIgnore]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { baseClass: [{\n type: HostBinding,\n args: ['class.igx-drag__ignore']\n }] } });\nclass IgxDragDirective {\n /**\n * - Save data inside the `igxDrag` directive. This can be set when instancing `igxDrag` on an element.\n * ```html\n *
    \n * ```\n *\n * @memberof IgxDragDirective\n */\n set data(value) {\n this._data = value;\n }\n get data() {\n return this._data;\n }\n /**\n * Gets the current location of the element relative to the page.\n */\n get location() {\n return new IgxDragLocation(this.pageX, this.pageY);\n }\n /**\n * Gets the original location of the element before dragging started.\n */\n get originLocation() {\n return new IgxDragLocation(this.baseOriginLeft, this.baseOriginTop);\n }\n /**\n * @hidden\n */\n get pointerEventsEnabled() {\n return typeof PointerEvent !== 'undefined';\n }\n /**\n * @hidden\n */\n get touchEventsEnabled() {\n return 'ontouchstart' in window;\n }\n /**\n * @hidden\n */\n get pageX() {\n if (this.ghost && this.ghostElement) {\n return this.ghostLeft;\n }\n return this.baseLeft + this.windowScrollLeft;\n }\n /**\n * @hidden\n */\n get pageY() {\n if (this.ghost && this.ghostElement) {\n return this.ghostTop;\n }\n return this.baseTop + this.windowScrollTop;\n }\n get baseLeft() {\n return this.element.nativeElement.getBoundingClientRect().left;\n }\n get baseTop() {\n return this.element.nativeElement.getBoundingClientRect().top;\n }\n get baseOriginLeft() {\n return this.baseLeft - this.getTransformX(this.element.nativeElement);\n }\n get baseOriginTop() {\n return this.baseTop - this.getTransformY(this.element.nativeElement);\n }\n set ghostLeft(pageX) {\n if (this.ghostElement) {\n // We need to take into account marginLeft, since top style does not include margin, but pageX includes the margin.\n const ghostMarginLeft = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-left'], 10);\n // If ghost host is defined it needs to be taken into account.\n this.ghostElement.style.left = (pageX - ghostMarginLeft - this._ghostHostX) + 'px';\n }\n }\n get ghostLeft() {\n if (this.ghostElement) {\n return parseInt(this.ghostElement.style.left, 10) + this._ghostHostX;\n }\n }\n set ghostTop(pageY) {\n if (this.ghostElement) {\n // We need to take into account marginTop, since top style does not include margin, but pageY includes the margin.\n const ghostMarginTop = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-top'], 10);\n // If ghost host is defined it needs to be taken into account.\n this.ghostElement.style.top = (pageY - ghostMarginTop - this._ghostHostY) + 'px';\n }\n }\n get ghostTop() {\n if (this.ghostElement) {\n return parseInt(this.ghostElement.style.top, 10) + this._ghostHostY;\n }\n }\n get windowScrollTop() {\n return document.documentElement.scrollTop || window.scrollY;\n }\n get windowScrollLeft() {\n return document.documentElement.scrollLeft || window.scrollX;\n }\n get windowScrollHeight() {\n return document.documentElement.scrollHeight;\n }\n get windowScrollWidth() {\n return document.documentElement.scrollWidth;\n }\n /**\n * An @Input property that specifies the offset of the dragged element relative to the mouse in pixels.\n * By default it's taking the relative position to the mouse when the drag started and keeps it the same.\n * ```html\n *
    \n *
    \n * Drag Me!\n *
    \n * ```\n *\n * @memberof IgxDragDirective\n */\n set ghostOffsetX(value) {\n this._offsetX = parseInt(value, 10);\n }\n get ghostOffsetX() {\n return this._offsetX !== undefined ? this._offsetX : this._defaultOffsetX;\n }\n /**\n * An @Input property that specifies the offset of the dragged element relative to the mouse in pixels.\n * By default it's taking the relative position to the mouse when the drag started and keeps it the same.\n * ```html\n *
    \n *
    \n * Drag Me!\n *
    \n * ```\n *\n * @memberof IgxDragDirective\n */\n set ghostOffsetY(value) {\n this._offsetY = parseInt(value, 10);\n }\n get ghostOffsetY() {\n return this._offsetY !== undefined ? this._offsetY : this._defaultOffsetY;\n }\n constructor(cdr, element, viewContainer, zone, renderer, platformUtil) {\n this.cdr = cdr;\n this.element = element;\n this.viewContainer = viewContainer;\n this.zone = zone;\n this.renderer = renderer;\n this.platformUtil = platformUtil;\n /**\n * An @Input property that indicates when the drag should start.\n * By default the drag starts after the draggable element is moved by 5px.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n *\n * @memberof IgxDragDirective\n */\n this.dragTolerance = 5;\n /**\n * An @Input property that indicates the directions that the element can be dragged.\n * By default it is set to both horizontal and vertical directions.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public dragDir = DragDirection.HORIZONTAL;\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.dragDirection = DragDirection.BOTH;\n /**\n * An @Input property that specifies if the base element should not be moved and a ghost element should be rendered that represents it.\n * By default it is set to `true`.\n * If it is set to `false` when dragging the base element is moved instead and no ghost elements are rendered.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n *\n * @memberof IgxDragDirective\n */\n this.ghost = true;\n /**\n * Sets a custom class that will be added to the `ghostElement` element.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n *\n * @memberof IgxDragDirective\n */\n this.ghostClass = '';\n /**\n * An @Input assigning a scroll container to the dragged element. By default its the window.\n */\n this.scrollContainer = null;\n /**\n * Event triggered when the draggable element drag starts.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public onDragStart(){\n * alert(\"The drag has stared!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.dragStart = new EventEmitter();\n /**\n * Event triggered when the draggable element has been moved.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public onDragMove(){\n * alert(\"The element has moved!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.dragMove = new EventEmitter();\n /**\n * Event triggered when the draggable element is released.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public onDragEnd(){\n * alert(\"The drag has ended!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.dragEnd = new EventEmitter();\n /**\n * Event triggered when the draggable element is clicked.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public onDragClick(){\n * alert(\"The element has been clicked!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.dragClick = new EventEmitter();\n /**\n * Event triggered when the drag ghost element is created.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public ghostCreated(){\n * alert(\"The ghost has been created!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.ghostCreate = new EventEmitter();\n /**\n * Event triggered when the drag ghost element is created.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public ghostDestroyed(){\n * alert(\"The ghost has been destroyed!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.ghostDestroy = new EventEmitter();\n /**\n * Event triggered after the draggable element is released and after its animation has finished.\n * ```html\n *
    \n * Drag Me!\n *
    \n * ```\n * ```typescript\n * public onMoveEnd(){\n * alert(\"The move has ended!\");\n * }\n * ```\n *\n * @memberof IgxDragDirective\n */\n this.transitioned = new EventEmitter();\n /**\n * @hidden\n */\n this.baseClass = true;\n /**\n * @hidden\n */\n this.selectDisabled = false;\n /**\n * @hidden\n */\n this.defaultReturnDuration = '0.5s';\n /**\n * @hidden\n */\n this.animInProgress = false;\n this.ghostContext = null;\n this._startX = 0;\n this._startY = 0;\n this._lastX = 0;\n this._lastY = 0;\n this._dragStarted = false;\n this._ghostHostX = 0;\n this._ghostHostY = 0;\n this._pointerDownId = null;\n this._clicked = false;\n this._lastDropArea = null;\n this._destroy = new Subject();\n this._removeOnDestroy = true;\n this._scrollContainer = null;\n this._originalScrollContainerWidth = 0;\n this._originalScrollContainerHeight = 0;\n this._scrollContainerStep = 5;\n this._scrollContainerStepMs = 10;\n this._scrollContainerThreshold = 25;\n this._containerScrollIntervalId = null;\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n if (!this.dragHandles || !this.dragHandles.length) {\n // Set user select none to the whole draggable element if no drag handles are defined.\n this.selectDisabled = true;\n }\n // Bind events\n this.zone.runOutsideAngular(() => {\n if (!this.platformUtil.isBrowser) {\n return;\n }\n const targetElements = this.dragHandles && this.dragHandles.length ?\n this.dragHandles.map((item) => item.element.nativeElement) : [this.element.nativeElement];\n targetElements.forEach((element) => {\n if (this.pointerEventsEnabled) {\n fromEvent(element, 'pointerdown').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerDown(res));\n fromEvent(element, 'pointermove').pipe(throttle(() => interval(0, animationFrameScheduler)), takeUntil(this._destroy)).subscribe((res) => this.onPointerMove(res));\n fromEvent(element, 'pointerup').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerUp(res));\n if (!this.ghost) {\n // Do not bind `lostpointercapture` to the target, because we will bind it on the ghost later.\n fromEvent(element, 'lostpointercapture').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerLost(res));\n }\n }\n else if (this.touchEventsEnabled) {\n fromEvent(element, 'touchstart').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerDown(res));\n }\n else {\n // We don't have pointer events and touch events. Use then mouse events.\n fromEvent(element, 'mousedown').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerDown(res));\n }\n });\n // We should bind to document events only once when there are no pointer events.\n if (!this.pointerEventsEnabled && this.touchEventsEnabled) {\n fromEvent(document.defaultView, 'touchmove').pipe(throttle(() => interval(0, animationFrameScheduler)), takeUntil(this._destroy)).subscribe((res) => this.onPointerMove(res));\n fromEvent(document.defaultView, 'touchend').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerUp(res));\n }\n else if (!this.pointerEventsEnabled) {\n fromEvent(document.defaultView, 'mousemove').pipe(throttle(() => interval(0, animationFrameScheduler)), takeUntil(this._destroy)).subscribe((res) => this.onPointerMove(res));\n fromEvent(document.defaultView, 'mouseup').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onPointerUp(res));\n }\n this.element.nativeElement.addEventListener('transitionend', (args) => {\n this.onTransitionEnd(args);\n });\n });\n // Set transition duration to 0s. This also helps with setting `visibility: hidden` to the base to not lag.\n this.element.nativeElement.style.transitionDuration = '0.0s';\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this._destroy.next(true);\n this._destroy.complete();\n if (this.ghost && this.ghostElement && this._removeOnDestroy) {\n this.ghostElement.parentNode.removeChild(this.ghostElement);\n this.ghostElement = null;\n if (this._dynamicGhostRef) {\n this._dynamicGhostRef.destroy();\n this._dynamicGhostRef = null;\n }\n }\n if (this._containerScrollIntervalId) {\n clearInterval(this._containerScrollIntervalId);\n this._containerScrollIntervalId = null;\n }\n }\n /**\n * Sets desired location of the base element or ghost element if rended relative to the document.\n *\n * @param newLocation New location that should be applied. It is advised to get new location using getBoundingClientRects() + scroll.\n */\n setLocation(newLocation) {\n // We do not subtract marginLeft and marginTop here because here we calculate deltas.\n if (this.ghost && this.ghostElement) {\n const offsetHostX = this.ghostHost ? this.ghostHostOffsetLeft(this.ghostHost) : 0;\n const offsetHostY = this.ghostHost ? this.ghostHostOffsetTop(this.ghostHost) : 0;\n this.ghostLeft = newLocation.pageX - offsetHostX + this.windowScrollLeft;\n this.ghostTop = newLocation.pageY - offsetHostY + this.windowScrollTop;\n }\n else if (!this.ghost) {\n const deltaX = newLocation.pageX - this.pageX;\n const deltaY = newLocation.pageY - this.pageY;\n const transformX = this.getTransformX(this.element.nativeElement);\n const transformY = this.getTransformY(this.element.nativeElement);\n this.setTransformXY(transformX + deltaX, transformY + deltaY);\n }\n this._startX = this.baseLeft;\n this._startY = this.baseTop;\n }\n /**\n * Animates the base or ghost element depending on the `ghost` input to its initial location.\n * If `ghost` is true but there is not ghost rendered, it will be created and animated.\n * If the base element has changed its DOM position its initial location will be changed accordingly.\n *\n * @param customAnimArgs Custom transition properties that will be applied when performing the transition.\n * @param startLocation Start location from where the transition should start.\n */\n transitionToOrigin(customAnimArgs, startLocation) {\n if ((!!startLocation && startLocation.pageX === this.baseOriginLeft && startLocation.pageY === this.baseOriginLeft) ||\n (!startLocation && this.ghost && !this.ghostElement)) {\n return;\n }\n if (!!startLocation && startLocation.pageX !== this.pageX && startLocation.pageY !== this.pageY) {\n if (this.ghost && !this.ghostElement) {\n this._startX = startLocation.pageX;\n this._startY = startLocation.pageY;\n this._ghostStartX = this._startX;\n this._ghostStartY = this._startY;\n this.createGhost(this._startX, this._startY);\n }\n this.setLocation(startLocation);\n }\n this.animInProgress = true;\n // Use setTimeout because we need to be sure that the element is positioned first correctly if there is start location.\n setTimeout(() => {\n if (this.ghost) {\n this.ghostElement.style.transitionProperty = 'top, left';\n this.ghostElement.style.transitionDuration =\n customAnimArgs && customAnimArgs.duration ? customAnimArgs.duration + 's' : this.defaultReturnDuration;\n this.ghostElement.style.transitionTimingFunction =\n customAnimArgs && customAnimArgs.timingFunction ? customAnimArgs.timingFunction : '';\n this.ghostElement.style.transitionDelay = customAnimArgs && customAnimArgs.delay ? customAnimArgs.delay + 's' : '';\n this.setLocation(new IgxDragLocation(this.baseLeft, this.baseTop));\n }\n else if (!this.ghost) {\n this.element.nativeElement.style.transitionProperty = 'transform';\n this.element.nativeElement.style.transitionDuration =\n customAnimArgs && customAnimArgs.duration ? customAnimArgs.duration + 's' : this.defaultReturnDuration;\n this.element.nativeElement.style.transitionTimingFunction =\n customAnimArgs && customAnimArgs.timingFunction ? customAnimArgs.timingFunction : '';\n this.element.nativeElement.style.transitionDelay = customAnimArgs && customAnimArgs.delay ? customAnimArgs.delay + 's' : '';\n this._startX = this.baseLeft;\n this._startY = this.baseTop;\n this.setTransformXY(0, 0);\n }\n }, 0);\n }\n /**\n * Animates the base or ghost element to a specific target location or other element using transition.\n * If `ghost` is true but there is not ghost rendered, it will be created and animated.\n * It is recommended to use 'getBoundingClientRects() + pageScroll' when determining desired location.\n *\n * @param target Target that the base or ghost will transition to. It can be either location in the page or another HTML element.\n * @param customAnimArgs Custom transition properties that will be applied when performing the transition.\n * @param startLocation Start location from where the transition should start.\n */\n transitionTo(target, customAnimArgs, startLocation) {\n if (!!startLocation && this.ghost && !this.ghostElement) {\n this._startX = startLocation.pageX;\n this._startY = startLocation.pageY;\n this._ghostStartX = this._startX;\n this._ghostStartY = this._startY;\n }\n else if (!!startLocation && (!this.ghost || this.ghostElement)) {\n this.setLocation(startLocation);\n }\n else if (this.ghost && !this.ghostElement) {\n this._startX = this.baseLeft;\n this._startY = this.baseTop;\n this._ghostStartX = this._startX + this.windowScrollLeft;\n this._ghostStartY = this._startY + this.windowScrollTop;\n }\n if (this.ghost && !this.ghostElement) {\n this.createGhost(this._startX, this._startY);\n }\n this.animInProgress = true;\n // Use setTimeout because we need to be sure that the element is positioned first correctly if there is start location.\n setTimeout(() => {\n const movedElem = this.ghost ? this.ghostElement : this.element.nativeElement;\n movedElem.style.transitionProperty = this.ghost && this.ghostElement ? 'left, top' : 'transform';\n movedElem.style.transitionDuration =\n customAnimArgs && customAnimArgs.duration ? customAnimArgs.duration + 's' : this.defaultReturnDuration;\n movedElem.style.transitionTimingFunction =\n customAnimArgs && customAnimArgs.timingFunction ? customAnimArgs.timingFunction : '';\n movedElem.style.transitionDelay = customAnimArgs && customAnimArgs.delay ? customAnimArgs.delay + 's' : '';\n if (target instanceof IgxDragLocation) {\n this.setLocation(new IgxDragLocation(target.pageX, target.pageY));\n }\n else {\n const targetRects = target.nativeElement.getBoundingClientRect();\n this.setLocation(new IgxDragLocation(targetRects.left - this.windowScrollLeft, targetRects.top - this.windowScrollTop));\n }\n }, 0);\n }\n /**\n * @hidden\n * Method bound to the PointerDown event of the base element igxDrag is initialized.\n * @param event PointerDown event captured\n */\n onPointerDown(event) {\n const ignoredElement = this.dragIgnoredElems.find(elem => elem.element.nativeElement === event.target);\n if (ignoredElement) {\n return;\n }\n this._clicked = true;\n this._pointerDownId = event.pointerId;\n // Set pointer capture so we detect pointermove even if mouse is out of bounds until ghostElement is created.\n const handleFound = this.dragHandles.find(handle => handle.element.nativeElement === event.currentTarget);\n const targetElement = handleFound ? handleFound.element.nativeElement : this.element.nativeElement;\n if (this.pointerEventsEnabled) {\n targetElement.setPointerCapture(this._pointerDownId);\n }\n else {\n targetElement.focus();\n event.preventDefault();\n }\n if (this.pointerEventsEnabled || !this.touchEventsEnabled) {\n // Check first for pointer events or non touch, because we can have pointer events and touch events at once.\n this._startX = event.pageX;\n this._startY = event.pageY;\n }\n else if (this.touchEventsEnabled) {\n this._startX = event.touches[0].pageX;\n this._startY = event.touches[0].pageY;\n }\n this._defaultOffsetX = this.baseLeft - this._startX + this.windowScrollLeft;\n this._defaultOffsetY = this.baseTop - this._startY + this.windowScrollTop;\n this._ghostStartX = this._startX + this.ghostOffsetX;\n this._ghostStartY = this._startY + this.ghostOffsetY;\n this._lastX = this._startX;\n this._lastY = this._startY;\n }\n /**\n * @hidden\n * Perform drag move logic when dragging and dispatching events if there is igxDrop under the pointer.\n * This method is bound at first at the base element.\n * If dragging starts and after the ghostElement is rendered the pointerId is reassigned it. Then this method is bound to it.\n * @param event PointerMove event captured\n */\n onPointerMove(event) {\n if (this._clicked) {\n let pageX;\n let pageY;\n if (this.pointerEventsEnabled || !this.touchEventsEnabled) {\n // Check first for pointer events or non touch, because we can have pointer events and touch events at once.\n pageX = event.pageX;\n pageY = event.pageY;\n }\n else if (this.touchEventsEnabled) {\n pageX = event.touches[0].pageX;\n pageY = event.touches[0].pageY;\n // Prevent scrolling on touch while dragging\n event.preventDefault();\n }\n const totalMovedX = pageX - this._startX;\n const totalMovedY = pageY - this._startY;\n if (!this._dragStarted &&\n (Math.abs(totalMovedX) > this.dragTolerance || Math.abs(totalMovedY) > this.dragTolerance)) {\n const dragStartArgs = {\n originalEvent: event,\n owner: this,\n startX: pageX - totalMovedX,\n startY: pageY - totalMovedY,\n pageX,\n pageY,\n cancel: false\n };\n this.zone.run(() => {\n this.dragStart.emit(dragStartArgs);\n });\n if (!dragStartArgs.cancel) {\n this._dragStarted = true;\n if (this.ghost) {\n // We moved enough so ghostElement can be rendered and actual dragging to start.\n // When creating it will take into account any offset set by the user by default.\n this.createGhost(pageX, pageY);\n }\n else if (this._offsetX !== undefined || this._offsetY !== undefined) {\n // There is no need for ghost, but we will need to position initially the base element to reflect any offset.\n const transformX = (this._offsetX !== undefined ? this._offsetX - this._defaultOffsetX : 0) +\n this.getTransformX(this.element.nativeElement);\n const transformY = (this._offsetY !== undefined ? this._offsetY - this._defaultOffsetY : 0) +\n this.getTransformY(this.element.nativeElement);\n this.setTransformXY(transformX, transformY);\n }\n }\n else {\n return;\n }\n }\n else if (!this._dragStarted) {\n return;\n }\n const moveArgs = {\n originalEvent: event,\n owner: this,\n startX: this._startX,\n startY: this._startY,\n pageX: this._lastX,\n pageY: this._lastY,\n nextPageX: pageX,\n nextPageY: pageY,\n cancel: false\n };\n this.dragMove.emit(moveArgs);\n const setPageX = moveArgs.nextPageX;\n const setPageY = moveArgs.nextPageY;\n if (!moveArgs.cancel) {\n // Scroll root container if the user reaches its boundaries.\n this.onScrollContainer();\n // Move the actual element around\n if (this.ghost) {\n const updatedTotalMovedX = this.dragDirection === DragDirection.VERTICAL ? 0 : setPageX - this._startX;\n const updatedTotalMovedY = this.dragDirection === DragDirection.HORIZONTAL ? 0 : setPageY - this._startY;\n this.ghostLeft = this._ghostStartX + updatedTotalMovedX;\n this.ghostTop = this._ghostStartY + updatedTotalMovedY;\n }\n else {\n const lastMovedX = this.dragDirection === DragDirection.VERTICAL ? 0 : setPageX - this._lastX;\n const lastMovedY = this.dragDirection === DragDirection.HORIZONTAL ? 0 : setPageY - this._lastY;\n const translateX = this.getTransformX(this.element.nativeElement) + lastMovedX;\n const translateY = this.getTransformY(this.element.nativeElement) + lastMovedY;\n this.setTransformXY(translateX, translateY);\n }\n this.dispatchDragEvents(pageX, pageY, event);\n }\n this._lastX = setPageX;\n this._lastY = setPageY;\n }\n }\n /**\n * @hidden\n * Perform drag end logic when releasing the ghostElement and dispatching drop event if igxDrop is under the pointer.\n * This method is bound at first at the base element.\n * If dragging starts and after the ghostElement is rendered the pointerId is reassigned to it. Then this method is bound to it.\n * @param event PointerUp event captured\n */\n onPointerUp(event) {\n if (!this._clicked) {\n return;\n }\n let pageX;\n let pageY;\n if (this.pointerEventsEnabled || !this.touchEventsEnabled) {\n // Check first for pointer events or non touch, because we can have pointer events and touch events at once.\n pageX = event.pageX;\n pageY = event.pageY;\n }\n else if (this.touchEventsEnabled) {\n pageX = event.touches[0].pageX;\n pageY = event.touches[0].pageY;\n // Prevent scrolling on touch while dragging\n event.preventDefault();\n }\n const eventArgs = {\n originalEvent: event,\n owner: this,\n startX: this._startX,\n startY: this._startY,\n pageX,\n pageY\n };\n this._pointerDownId = null;\n this._clicked = false;\n if (this._dragStarted) {\n if (this._lastDropArea && this._lastDropArea !== this.element.nativeElement) {\n this.dispatchDropEvent(event.pageX, event.pageY, event);\n }\n this.zone.run(() => {\n this.dragEnd.emit(eventArgs);\n });\n if (!this.animInProgress) {\n this.onTransitionEnd(null);\n }\n }\n else {\n // Trigger our own click event because when there is no ghost, native click cannot be prevented when dragging.\n this.zone.run(() => {\n this.dragClick.emit(eventArgs);\n });\n }\n if (this._containerScrollIntervalId) {\n clearInterval(this._containerScrollIntervalId);\n this._containerScrollIntervalId = null;\n }\n }\n /**\n * @hidden\n * Execute this method whe the pointer capture has been lost.\n * This means that during dragging the user has performed other action like right clicking and then clicking somewhere else.\n * This method will ensure that the drag state is being reset in this case as if the user released the dragged element.\n * @param event Event captured\n */\n onPointerLost(event) {\n if (!this._clicked) {\n return;\n }\n const eventArgs = {\n originalEvent: event,\n owner: this,\n startX: this._startX,\n startY: this._startY,\n pageX: event.pageX,\n pageY: event.pageY\n };\n this._pointerDownId = null;\n this._clicked = false;\n if (this._dragStarted) {\n this.zone.run(() => {\n this.dragEnd.emit(eventArgs);\n });\n if (!this.animInProgress) {\n this.onTransitionEnd(null);\n }\n }\n }\n /**\n * @hidden\n */\n onTransitionEnd(event) {\n if ((!this._dragStarted && !this.animInProgress) || this._clicked) {\n // Return if no dragging started and there is no animation in progress.\n return;\n }\n if (this.ghost && this.ghostElement) {\n this._ghostStartX = this.baseLeft + this.windowScrollLeft;\n this._ghostStartY = this.baseTop + this.windowScrollTop;\n const ghostDestroyArgs = {\n owner: this,\n ghostElement: this.ghostElement,\n cancel: false\n };\n this.ghostDestroy.emit(ghostDestroyArgs);\n if (ghostDestroyArgs.cancel) {\n return;\n }\n this.ghostElement.remove();\n this.ghostElement = null;\n if (this._dynamicGhostRef) {\n this._dynamicGhostRef.destroy();\n this._dynamicGhostRef = null;\n }\n }\n else if (!this.ghost) {\n this.element.nativeElement.style.transitionProperty = '';\n this.element.nativeElement.style.transitionDuration = '0.0s';\n this.element.nativeElement.style.transitionTimingFunction = '';\n this.element.nativeElement.style.transitionDelay = '';\n }\n this.animInProgress = false;\n this._dragStarted = false;\n // Execute transitioned after everything is reset so if the user sets new location on the base now it would work as expected.\n this.zone.run(() => {\n this.transitioned.emit({\n originalEvent: event,\n owner: this,\n startX: this._startX,\n startY: this._startY,\n pageX: this._startX,\n pageY: this._startY\n });\n });\n }\n /**\n * @hidden\n * Create ghost element - if a Node object is provided it creates a clone of that node,\n * otherwise it clones the host element.\n * Bind all needed events.\n * @param pageX Latest pointer position on the X axis relative to the page.\n * @param pageY Latest pointer position on the Y axis relative to the page.\n * @param node The Node object to be cloned.\n */\n createGhost(pageX, pageY, node = null) {\n if (!this.ghost) {\n return;\n }\n if (this.ghostTemplate) {\n this._dynamicGhostRef = this.viewContainer.createEmbeddedView(this.ghostTemplate, this.ghostContext);\n this.ghostElement = this._dynamicGhostRef.rootNodes[0];\n }\n else {\n this.ghostElement = node ? node.cloneNode(true) : this.element.nativeElement.cloneNode(true);\n }\n const totalMovedX = pageX - this._startX;\n const totalMovedY = pageY - this._startY;\n this._ghostHostX = this.ghostHost ? this.ghostHostOffsetLeft(this.ghostHost) : 0;\n this._ghostHostY = this.ghostHost ? this.ghostHostOffsetTop(this.ghostHost) : 0;\n this.ghostElement.style.transitionDuration = '0.0s';\n this.ghostElement.style.position = 'absolute';\n if (this.ghostClass) {\n this.renderer.addClass(this.ghostElement, this.ghostClass);\n }\n const createEventArgs = {\n owner: this,\n ghostElement: this.ghostElement,\n cancel: false\n };\n this.ghostCreate.emit(createEventArgs);\n if (createEventArgs.cancel) {\n this.ghostElement = null;\n if (this.ghostTemplate && this._dynamicGhostRef) {\n this._dynamicGhostRef.destroy();\n }\n return;\n }\n if (this.ghostHost) {\n this.ghostHost.appendChild(this.ghostElement);\n }\n else {\n document.body.appendChild(this.ghostElement);\n }\n const ghostMarginLeft = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-left'], 10);\n const ghostMarginTop = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-top'], 10);\n this.ghostElement.style.left = (this._ghostStartX - ghostMarginLeft + totalMovedX - this._ghostHostX) + 'px';\n this.ghostElement.style.top = (this._ghostStartY - ghostMarginTop + totalMovedY - this._ghostHostY) + 'px';\n if (this.pointerEventsEnabled) {\n // The ghostElement takes control for moving and dragging after it has been rendered.\n if (this._pointerDownId !== null) {\n this.ghostElement.setPointerCapture(this._pointerDownId);\n }\n this.ghostElement.addEventListener('pointermove', (args) => {\n this.onPointerMove(args);\n });\n this.ghostElement.addEventListener('pointerup', (args) => {\n this.onPointerUp(args);\n });\n this.ghostElement.addEventListener('lostpointercapture', (args) => {\n this.onPointerLost(args);\n });\n }\n // Transition animation when the ghostElement is released and it returns to it's original position.\n this.ghostElement.addEventListener('transitionend', (args) => {\n this.onTransitionEnd(args);\n });\n this.cdr.detectChanges();\n }\n /**\n * @hidden\n * Dispatch custom igxDragEnter/igxDragLeave events based on current pointer position and if drop area is under.\n */\n dispatchDragEvents(pageX, pageY, originalEvent) {\n let topDropArea;\n const customEventArgs = {\n startX: this._startX,\n startY: this._startY,\n pageX,\n pageY,\n owner: this,\n originalEvent\n };\n const elementsFromPoint = this.getElementsAtPoint(pageX, pageY);\n let targetElements = [];\n // Check for shadowRoot instance and use it if present\n for (const elFromPoint of elementsFromPoint) {\n if (!!elFromPoint?.shadowRoot) {\n targetElements = targetElements.concat(this.getFromShadowRoot(elFromPoint, pageX, pageY, elementsFromPoint));\n }\n else if (targetElements.indexOf(elFromPoint) === -1) {\n targetElements.push(elFromPoint);\n }\n }\n for (const element of targetElements) {\n if (element.getAttribute('droppable') === 'true' &&\n element !== this.ghostElement && element !== this.element.nativeElement) {\n topDropArea = element;\n break;\n }\n }\n if (topDropArea &&\n (!this._lastDropArea || (this._lastDropArea && this._lastDropArea !== topDropArea))) {\n if (this._lastDropArea) {\n this.dispatchEvent(this._lastDropArea, 'igxDragLeave', customEventArgs);\n }\n this._lastDropArea = topDropArea;\n this.dispatchEvent(this._lastDropArea, 'igxDragEnter', customEventArgs);\n }\n else if (!topDropArea && this._lastDropArea) {\n this.dispatchEvent(this._lastDropArea, 'igxDragLeave', customEventArgs);\n this._lastDropArea = null;\n return;\n }\n if (topDropArea) {\n this.dispatchEvent(topDropArea, 'igxDragOver', customEventArgs);\n }\n }\n /**\n * @hidden\n * Traverse shadow dom in depth.\n */\n getFromShadowRoot(elem, pageX, pageY, parentDomElems) {\n const elementsFromPoint = elem.shadowRoot.elementsFromPoint(pageX, pageY);\n const shadowElements = elementsFromPoint.filter(cur => parentDomElems.indexOf(cur) === -1);\n let res = [];\n for (const elFromPoint of shadowElements) {\n if (!!elFromPoint?.shadowRoot && elFromPoint.shadowRoot !== elem.shadowRoot) {\n res = res.concat(this.getFromShadowRoot(elFromPoint, pageX, pageY, elementsFromPoint));\n }\n res.push(elFromPoint);\n }\n return res;\n }\n /**\n * @hidden\n * Dispatch custom igxDrop event based on current pointer position if there is last recorder drop area under the pointer.\n * Last recorder drop area is updated in @dispatchDragEvents method.\n */\n dispatchDropEvent(pageX, pageY, originalEvent) {\n const eventArgs = {\n startX: this._startX,\n startY: this._startY,\n pageX,\n pageY,\n owner: this,\n originalEvent\n };\n this.dispatchEvent(this._lastDropArea, 'igxDrop', eventArgs);\n this.dispatchEvent(this._lastDropArea, 'igxDragLeave', eventArgs);\n this._lastDropArea = null;\n }\n /**\n * @hidden\n */\n getElementsAtPoint(pageX, pageY) {\n // correct the coordinates with the current scroll position, because\n // document.elementsFromPoint consider position within the current viewport\n // window.pageXOffset == window.scrollX; // always true\n // using window.pageXOffset for IE9 compatibility\n const viewPortX = pageX - window.pageXOffset;\n const viewPortY = pageY - window.pageYOffset;\n if (document['msElementsFromPoint']) {\n // Edge and IE special snowflakes\n const elements = document['msElementsFromPoint'](viewPortX, viewPortY);\n return elements === null ? [] : elements;\n }\n else {\n // Other browsers like Chrome, Firefox, Opera\n return document.elementsFromPoint(viewPortX, viewPortY);\n }\n }\n /**\n * @hidden\n */\n dispatchEvent(target, eventName, eventArgs) {\n // This way is IE11 compatible.\n const dragLeaveEvent = document.createEvent('CustomEvent');\n dragLeaveEvent.initCustomEvent(eventName, false, false, eventArgs);\n target.dispatchEvent(dragLeaveEvent);\n // Otherwise can be used `target.dispatchEvent(new CustomEvent(eventName, eventArgs));`\n }\n getTransformX(elem) {\n let posX = 0;\n if (elem.style.transform) {\n const matrix = elem.style.transform;\n const values = matrix ? matrix.match(/-?[\\d\\.]+/g) : undefined;\n posX = values ? Number(values[1]) : 0;\n }\n return posX;\n }\n getTransformY(elem) {\n let posY = 0;\n if (elem.style.transform) {\n const matrix = elem.style.transform;\n const values = matrix ? matrix.match(/-?[\\d\\.]+/g) : undefined;\n posY = values ? Number(values[2]) : 0;\n }\n return posY;\n }\n /** Method setting transformation to the base draggable element. */\n setTransformXY(x, y) {\n this.element.nativeElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n }\n ghostHostOffsetLeft(ghostHost) {\n const ghostPosition = document.defaultView.getComputedStyle(ghostHost).getPropertyValue('position');\n if (ghostPosition === 'static' && ghostHost.offsetParent && ghostHost.offsetParent === document.body) {\n return 0;\n }\n else if (ghostPosition === 'static' && ghostHost.offsetParent) {\n return ghostHost.offsetParent.getBoundingClientRect().left - this.windowScrollLeft;\n }\n return ghostHost.getBoundingClientRect().left - this.windowScrollLeft;\n }\n ghostHostOffsetTop(ghostHost) {\n const ghostPosition = document.defaultView.getComputedStyle(ghostHost).getPropertyValue('position');\n if (ghostPosition === 'static' && ghostHost.offsetParent && ghostHost.offsetParent === document.body) {\n return 0;\n }\n else if (ghostPosition === 'static' && ghostHost.offsetParent) {\n return ghostHost.offsetParent.getBoundingClientRect().top - this.windowScrollTop;\n }\n return ghostHost.getBoundingClientRect().top - this.windowScrollTop;\n }\n getContainerScrollDirection() {\n const containerBounds = this.scrollContainer ? this.scrollContainer.getBoundingClientRect() : null;\n const scrolledX = !this.scrollContainer ? this.windowScrollLeft > 0 : this.scrollContainer.scrollLeft > 0;\n const scrolledY = !this.scrollContainer ? this.windowScrollTop > 0 : this.scrollContainer.scrollTop > 0;\n // Take into account window scroll top because we do not use fixed positioning to the window.\n const topBorder = (!this.scrollContainer ? 0 : containerBounds.top) + this.windowScrollTop + this._scrollContainerThreshold;\n // Subtract the element height because we position it from top left corner.\n const elementHeight = this.ghost && this.ghostElement ? this.ghostElement.offsetHeight : this.element.nativeElement.offsetHeight;\n const bottomBorder = (!this.scrollContainer ? window.innerHeight : containerBounds.bottom) +\n this.windowScrollTop - this._scrollContainerThreshold - elementHeight;\n // Same for window scroll left\n const leftBorder = (!this.scrollContainer ? 0 : containerBounds.left) + this.windowScrollLeft + this._scrollContainerThreshold;\n // Subtract the element width again because we position it from top left corner.\n const elementWidth = this.ghost && this.ghostElement ? this.ghostElement.offsetWidth : this.element.nativeElement.offsetWidth;\n const rightBorder = (!this.scrollContainer ? window.innerWidth : containerBounds.right) +\n this.windowScrollLeft - this._scrollContainerThreshold - elementWidth;\n if (this.pageY <= topBorder && scrolledY) {\n return DragScrollDirection$1.UP;\n }\n else if (this.pageY > bottomBorder) {\n return DragScrollDirection$1.DOWN;\n }\n else if (this.pageX < leftBorder && scrolledX) {\n return DragScrollDirection$1.LEFT;\n }\n else if (this.pageX > rightBorder) {\n return DragScrollDirection$1.RIGHT;\n }\n return null;\n }\n onScrollContainerStep(scrollDir) {\n animationFrameScheduler.schedule(() => {\n let xDir = scrollDir == DragScrollDirection$1.LEFT ? -1 : (scrollDir == DragScrollDirection$1.RIGHT ? 1 : 0);\n let yDir = scrollDir == DragScrollDirection$1.UP ? -1 : (scrollDir == DragScrollDirection$1.DOWN ? 1 : 0);\n if (!this.scrollContainer) {\n // Cap scrolling so we don't scroll past the window max scroll position.\n const maxScrollX = this._originalScrollContainerWidth - document.documentElement.clientWidth;\n const maxScrollY = this._originalScrollContainerHeight - document.documentElement.clientHeight;\n xDir = (this.windowScrollLeft <= 0 && xDir < 0) || (this.windowScrollLeft >= maxScrollX && xDir > 0) ? 0 : xDir;\n yDir = (this.windowScrollTop <= 0 && yDir < 0) || (this.windowScrollTop >= maxScrollY && yDir > 0) ? 0 : yDir;\n }\n else {\n // Cap scrolling so we don't scroll past the container max scroll position.\n const maxScrollX = this._originalScrollContainerWidth - this.scrollContainer.clientWidth;\n const maxScrollY = this._originalScrollContainerHeight - this.scrollContainer.clientHeight;\n xDir = (this.scrollContainer.scrollLeft <= 0 && xDir < 0) || (this.scrollContainer.scrollLeft >= maxScrollX && xDir > 0) ? 0 : xDir;\n yDir = (this.scrollContainer.scrollTop <= 0 && yDir < 0) || (this.scrollContainer.scrollTop >= maxScrollY && yDir > 0) ? 0 : yDir;\n }\n const scrollByX = xDir * this._scrollContainerStep;\n const scrollByY = yDir * this._scrollContainerStep;\n // Scroll the corresponding window or container.\n if (!this.scrollContainer) {\n window.scrollBy(scrollByX, scrollByY);\n }\n else {\n this.scrollContainer.scrollLeft += scrollByX;\n this.scrollContainer.scrollTop += scrollByY;\n }\n if (this.ghost && !this.scrollContainer) {\n // Scroll the ghost only when there is no container specifies.\n // If it has container the ghost pretty much stays in the same position while the container is scrolled since e use top/left position.\n // Otherwise increase the position the same amount we have scrolled the window\n this.ghostLeft += scrollByX;\n this.ghostTop += scrollByY;\n }\n else if (!this.ghost) {\n // Move the base element the same amount we moved the window/container because we use transformations.\n const translateX = this.getTransformX(this.element.nativeElement) + scrollByX;\n const translateY = this.getTransformY(this.element.nativeElement) + scrollByY;\n this.setTransformXY(translateX, translateY);\n if (!this.scrollContainer) {\n this._lastX += scrollByX;\n this._lastY += scrollByY;\n }\n }\n });\n }\n onScrollContainer() {\n const scrollDir = this.getContainerScrollDirection();\n if (scrollDir !== null && scrollDir !== undefined && !this._containerScrollIntervalId) {\n // Save original container sizes to ensure that we don't increase scroll sizes infinitely when out of bounds.\n this._originalScrollContainerWidth = this.scrollContainer ? this.scrollContainer.scrollWidth : this.windowScrollWidth;\n this._originalScrollContainerHeight = this.scrollContainer ? this.scrollContainer.scrollHeight : this.windowScrollHeight;\n this._containerScrollIntervalId = setInterval(() => this.onScrollContainerStep(scrollDir), this._scrollContainerStepMs);\n }\n else if ((scrollDir === null || scrollDir === undefined) && this._containerScrollIntervalId) {\n // We moved out of end bounds and there is interval started\n clearInterval(this._containerScrollIntervalId);\n this._containerScrollIntervalId = null;\n }\n }\n}\nIgxDragDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDragDirective, selector: \"[igxDrag]\", inputs: { data: [\"igxDrag\", \"data\"], dragTolerance: \"dragTolerance\", dragDirection: \"dragDirection\", dragChannel: \"dragChannel\", ghost: \"ghost\", ghostClass: \"ghostClass\", ghostTemplate: \"ghostTemplate\", ghostHost: \"ghostHost\", scrollContainer: \"scrollContainer\", ghostOffsetX: \"ghostOffsetX\", ghostOffsetY: \"ghostOffsetY\" }, outputs: { dragStart: \"dragStart\", dragMove: \"dragMove\", dragEnd: \"dragEnd\", dragClick: \"dragClick\", ghostCreate: \"ghostCreate\", ghostDestroy: \"ghostDestroy\", transitioned: \"transitioned\" }, host: { properties: { \"class.igx-drag\": \"this.baseClass\", \"class.igx-drag--select-disabled\": \"this.selectDisabled\" } }, queries: [{ propertyName: \"dragHandles\", predicate: IgxDragHandleDirective, descendants: true }, { propertyName: \"dragIgnoredElems\", predicate: IgxDragIgnoreDirective, descendants: true }], exportAs: [\"drag\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'drag',\n selector: '[igxDrag]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: PlatformUtil }]; }, propDecorators: { data: [{\n type: Input,\n args: ['igxDrag']\n }], dragTolerance: [{\n type: Input\n }], dragDirection: [{\n type: Input\n }], dragChannel: [{\n type: Input\n }], ghost: [{\n type: Input\n }], ghostClass: [{\n type: Input\n }], ghostTemplate: [{\n type: Input\n }], ghostHost: [{\n type: Input\n }], scrollContainer: [{\n type: Input\n }], dragStart: [{\n type: Output\n }], dragMove: [{\n type: Output\n }], dragEnd: [{\n type: Output\n }], dragClick: [{\n type: Output\n }], ghostCreate: [{\n type: Output\n }], ghostDestroy: [{\n type: Output\n }], transitioned: [{\n type: Output\n }], dragHandles: [{\n type: ContentChildren,\n args: [IgxDragHandleDirective, { descendants: true }]\n }], dragIgnoredElems: [{\n type: ContentChildren,\n args: [IgxDragIgnoreDirective, { descendants: true }]\n }], baseClass: [{\n type: HostBinding,\n args: ['class.igx-drag']\n }], selectDisabled: [{\n type: HostBinding,\n args: ['class.igx-drag--select-disabled']\n }], ghostOffsetX: [{\n type: Input\n }], ghostOffsetY: [{\n type: Input\n }] } });\nclass IgxDropDirective {\n /**\n * - Save data inside the `igxDrop` directive. This can be set when instancing `igxDrop` on an element.\n * ```html\n *
    \n * ```\n *\n * @memberof IgxDropDirective\n */\n set data(v) {\n this._data = v;\n }\n get data() {\n return this._data;\n }\n /**\n * An @Input property that specifies a drop strategy type that will be executed when an `IgxDrag` element is released inside\n * the current drop area. The provided strategies are:\n * - IgxDefaultDropStrategy - This is the default base strategy and it doesn't perform any actions.\n * - IgxAppendDropStrategy - Appends the dropped element to last position as a direct child to the `igxDrop`.\n * - IgxPrependDropStrategy - Prepends the dropped element to first position as a direct child to the `igxDrop`.\n * - IgxInsertDropStrategy - If the dropped element is released above a child element of the `igxDrop`, it will be inserted\n * at that position. Otherwise the dropped element will be appended if released outside any child of the `igxDrop`.\n * ```html\n *
    \n * DragMe\n *
    \n *
    \n * Numbers drop area!\n *
    \n * ```\n * ```typescript\n * import { IgxAppendDropStrategy } from 'igniteui-angular';\n *\n * export class App {\n * public myDropStrategy = IgxAppendDropStrategy;\n * }\n * ```\n *\n * @memberof IgxDropDirective\n */\n set dropStrategy(classRef) {\n this._dropStrategy = new classRef(this._renderer);\n }\n get dropStrategy() {\n return this._dropStrategy;\n }\n constructor(element, _renderer, _zone) {\n this.element = element;\n this._renderer = _renderer;\n this._zone = _zone;\n /**\n * Event triggered when dragged element enters the area of the element.\n * ```html\n *
    \n *
    \n * ```\n * ```typescript\n * public dragEnter(){\n * alert(\"A draggable element has entered the chip area!\");\n * }\n * ```\n *\n * @memberof IgxDropDirective\n */\n this.enter = new EventEmitter();\n /**\n * Event triggered when dragged element enters the area of the element.\n * ```html\n *
    \n *
    \n * ```\n * ```typescript\n * public dragEnter(){\n * alert(\"A draggable element has entered the chip area!\");\n * }\n * ```\n *\n * @memberof IgxDropDirective\n */\n this.over = new EventEmitter();\n /**\n * Event triggered when dragged element leaves the area of the element.\n * ```html\n *
    \n *
    \n * ```\n * ```typescript\n * public dragLeave(){\n * alert(\"A draggable element has left the chip area!\");\n * }\n * ```\n *\n * @memberof IgxDropDirective\n */\n this.leave = new EventEmitter();\n /**\n * Event triggered when dragged element is dropped in the area of the element.\n * Since the `igxDrop` has default logic that appends the dropped element as a child, it can be canceled here.\n * To cancel the default logic the `cancel` property of the event needs to be set to true.\n * ```html\n *
    \n *
    \n * ```\n * ```typescript\n * public dragDrop(){\n * alert(\"A draggable element has been dropped in the chip area!\");\n * }\n * ```\n *\n * @memberof IgxDropDirective\n */\n this.dropped = new EventEmitter();\n /**\n * @hidden\n */\n this.droppable = true;\n /**\n * @hidden\n */\n this.dragover = false;\n /**\n * @hidden\n */\n this._destroy = new Subject();\n this._dropStrategy = new IgxDefaultDropStrategy();\n }\n /**\n * @hidden\n */\n onDragDrop(event) {\n if (!this.isDragLinked(event.detail.owner)) {\n return;\n }\n const elementPosX = this.element.nativeElement.getBoundingClientRect().left + this.getWindowScrollLeft();\n const elementPosY = this.element.nativeElement.getBoundingClientRect().top + this.getWindowScrollTop();\n const offsetX = event.detail.pageX - elementPosX;\n const offsetY = event.detail.pageY - elementPosY;\n const args = {\n owner: this,\n originalEvent: event.detail.originalEvent,\n drag: event.detail.owner,\n dragData: event.detail.owner.data,\n startX: event.detail.startX,\n startY: event.detail.startY,\n pageX: event.detail.pageX,\n pageY: event.detail.pageY,\n offsetX,\n offsetY,\n cancel: false\n };\n this._zone.run(() => {\n this.dropped.emit(args);\n });\n if (this._dropStrategy && !args.cancel) {\n const elementsAtPoint = event.detail.owner.getElementsAtPoint(event.detail.pageX, event.detail.pageY);\n const insertIndex = this.getInsertIndexAt(event.detail.owner, elementsAtPoint);\n this._dropStrategy.dropAction(event.detail.owner, this, insertIndex);\n }\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this._zone.runOutsideAngular(() => {\n fromEvent(this.element.nativeElement, 'igxDragEnter').pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onDragEnter(res));\n fromEvent(this.element.nativeElement, 'igxDragLeave').pipe(takeUntil(this._destroy)).subscribe((res) => this.onDragLeave(res));\n fromEvent(this.element.nativeElement, 'igxDragOver').pipe(takeUntil(this._destroy)).subscribe((res) => this.onDragOver(res));\n });\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this._destroy.next(true);\n this._destroy.complete();\n }\n /**\n * @hidden\n */\n onDragOver(event) {\n const elementPosX = this.element.nativeElement.getBoundingClientRect().left + this.getWindowScrollLeft();\n const elementPosY = this.element.nativeElement.getBoundingClientRect().top + this.getWindowScrollTop();\n const offsetX = event.detail.pageX - elementPosX;\n const offsetY = event.detail.pageY - elementPosY;\n const eventArgs = {\n originalEvent: event.detail.originalEvent,\n owner: this,\n drag: event.detail.owner,\n dragData: event.detail.owner.data,\n startX: event.detail.startX,\n startY: event.detail.startY,\n pageX: event.detail.pageX,\n pageY: event.detail.pageY,\n offsetX,\n offsetY\n };\n this.over.emit(eventArgs);\n }\n /**\n * @hidden\n */\n onDragEnter(event) {\n if (!this.isDragLinked(event.detail.owner)) {\n return;\n }\n this.dragover = true;\n const elementPosX = this.element.nativeElement.getBoundingClientRect().left + this.getWindowScrollLeft();\n const elementPosY = this.element.nativeElement.getBoundingClientRect().top + this.getWindowScrollTop();\n const offsetX = event.detail.pageX - elementPosX;\n const offsetY = event.detail.pageY - elementPosY;\n const eventArgs = {\n originalEvent: event.detail.originalEvent,\n owner: this,\n drag: event.detail.owner,\n dragData: event.detail.owner.data,\n startX: event.detail.startX,\n startY: event.detail.startY,\n pageX: event.detail.pageX,\n pageY: event.detail.pageY,\n offsetX,\n offsetY\n };\n this._zone.run(() => {\n this.enter.emit(eventArgs);\n });\n }\n /**\n * @hidden\n */\n onDragLeave(event) {\n if (!this.isDragLinked(event.detail.owner)) {\n return;\n }\n this.dragover = false;\n const elementPosX = this.element.nativeElement.getBoundingClientRect().left + this.getWindowScrollLeft();\n const elementPosY = this.element.nativeElement.getBoundingClientRect().top + this.getWindowScrollTop();\n const offsetX = event.detail.pageX - elementPosX;\n const offsetY = event.detail.pageY - elementPosY;\n const eventArgs = {\n originalEvent: event.detail.originalEvent,\n owner: this,\n drag: event.detail.owner,\n dragData: event.detail.owner.data,\n startX: event.detail.startX,\n startY: event.detail.startY,\n pageX: event.detail.pageX,\n pageY: event.detail.pageY,\n offsetX,\n offsetY\n };\n this._zone.run(() => {\n this.leave.emit(eventArgs);\n });\n }\n getWindowScrollTop() {\n return window.scrollY ? window.scrollY : (window.pageYOffset ? window.pageYOffset : 0);\n }\n getWindowScrollLeft() {\n return window.scrollX ? window.scrollX : (window.pageXOffset ? window.pageXOffset : 0);\n }\n isDragLinked(drag) {\n const dragLinkArray = drag.dragChannel instanceof Array;\n const dropLinkArray = this.dropChannel instanceof Array;\n if (!dragLinkArray && !dropLinkArray) {\n return this.dropChannel === drag.dragChannel;\n }\n else if (!dragLinkArray && dropLinkArray) {\n const dropLinks = this.dropChannel;\n for (const link of dropLinks) {\n if (link === drag.dragChannel) {\n return true;\n }\n }\n }\n else if (dragLinkArray && !dropLinkArray) {\n const dragLinks = drag.dragChannel;\n for (const link of dragLinks) {\n if (link === this.dropChannel) {\n return true;\n }\n }\n }\n else {\n const dragLinks = drag.dragChannel;\n const dropLinks = this.dropChannel;\n for (const draglink of dragLinks) {\n for (const droplink of dropLinks) {\n if (draglink === droplink) {\n return true;\n }\n }\n }\n }\n return false;\n }\n getInsertIndexAt(draggedDir, elementsAtPoint) {\n let insertIndex = -1;\n const dropChildren = Array.prototype.slice.call(this.element.nativeElement.children);\n if (!dropChildren.length) {\n return insertIndex;\n }\n let i = 0;\n let childUnder = null;\n while (!childUnder && i < elementsAtPoint.length) {\n if (elementsAtPoint[i].parentElement === this.element.nativeElement) {\n childUnder = elementsAtPoint[i];\n }\n i++;\n }\n const draggedElemIndex = dropChildren.indexOf(draggedDir.element.nativeElement);\n insertIndex = dropChildren.indexOf(childUnder);\n if (draggedElemIndex !== -1 && draggedElemIndex < insertIndex) {\n insertIndex++;\n }\n return insertIndex;\n }\n}\nIgxDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDropDirective, selector: \"[igxDrop]\", inputs: { data: [\"igxDrop\", \"data\"], dropChannel: \"dropChannel\", dropStrategy: \"dropStrategy\" }, outputs: { enter: \"enter\", over: \"over\", leave: \"leave\", dropped: \"dropped\" }, host: { listeners: { \"igxDrop\": \"onDragDrop($event)\" }, properties: { \"attr.droppable\": \"this.droppable\", \"class.dragOver\": \"this.dragover\" } }, exportAs: [\"drop\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDropDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'drop',\n selector: '[igxDrop]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { data: [{\n type: Input,\n args: ['igxDrop']\n }], dropChannel: [{\n type: Input\n }], dropStrategy: [{\n type: Input\n }], enter: [{\n type: Output\n }], over: [{\n type: Output\n }], leave: [{\n type: Output\n }], dropped: [{\n type: Output\n }], droppable: [{\n type: HostBinding,\n args: ['attr.droppable']\n }], dragover: [{\n type: HostBinding,\n args: ['class.dragOver']\n }], onDragDrop: [{\n type: HostListener,\n args: ['igxDrop', ['$event']]\n }] } });\n/**\n * @hidden\n */\nclass IgxDragDropModule {\n}\nIgxDragDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragDropModule, declarations: [IgxDragDirective, IgxDropDirective, IgxDragHandleDirective, IgxDragIgnoreDirective], exports: [IgxDragDirective, IgxDropDirective, IgxDragHandleDirective, IgxDragIgnoreDirective] });\nIgxDragDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragDropModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragDropModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxDragDirective, IgxDropDirective, IgxDragHandleDirective, IgxDragIgnoreDirective],\n exports: [IgxDragDirective, IgxDropDirective, IgxDragHandleDirective, IgxDragIgnoreDirective]\n }]\n }] });\n\nclass IgxFilterOptions {\n constructor() {\n // Input text value that will be used as a filtering pattern (matching condition is based on it)\n this.inputValue = '';\n }\n // Function - get value to be tested from the item\n // item - single item of the list to be filtered\n // key - property name of item, which value should be tested\n // Default behavior - returns \"key\"- named property value of item if key is provided,\n // otherwise textContent of the item's html element\n get_value(item, key) {\n let result = '';\n if (key && item[key]) {\n result = item[key].toString();\n }\n else if (item.element) {\n if (item.element.nativeElement) {\n result = item.element.nativeElement.textContent.trim();\n // Check if element doesn't return the DOM element directly\n }\n else if (item.element.textContent) {\n result = item.element.textContent.trim();\n }\n }\n return result;\n }\n // Function - formats the original text before matching process\n // Default behavior - returns text to lower case\n formatter(valueToTest) {\n return valueToTest.toLowerCase();\n }\n // Function - determines whether the item met the condition\n // valueToTest - text value that should be tested\n // inputValue - text value from input that condition is based on\n // Default behavior - \"contains\"\n matchFn(valueToTest, inputValue) {\n return valueToTest.indexOf(inputValue && inputValue.toLowerCase() || '') > -1;\n }\n // Function - executed after matching test for every matched item\n // Default behavior - shows the item\n metConditionFn(item) {\n if (item.hasOwnProperty('hidden')) {\n item.hidden = false;\n }\n }\n // Function - executed for every NOT matched item after matching test\n // Default behavior - hides the item\n overdueConditionFn(item) {\n if (item.hasOwnProperty('hidden')) {\n item.hidden = true;\n }\n }\n}\nclass IgxFilterDirective {\n constructor(element) {\n this.element = element;\n this.filtering = new EventEmitter(false); // synchronous event emitter\n this.filtered = new EventEmitter();\n }\n ngOnChanges(changes) {\n // Detect only changes of input value\n if (changes.filterOptions &&\n changes.filterOptions.currentValue &&\n changes.filterOptions.currentValue.inputValue !== undefined &&\n changes.filterOptions.previousValue &&\n changes.filterOptions.currentValue.inputValue !== changes.filterOptions.previousValue.inputValue) {\n this.filter();\n }\n }\n filter() {\n if (!this.filterOptions.items) {\n return;\n }\n const args = { cancel: false, items: this.filterOptions.items };\n this.filtering.emit(args);\n if (args.cancel) {\n return;\n }\n const pipe = new IgxFilterPipe();\n const filtered = pipe.transform(this.filterOptions.items, this.filterOptions);\n this.filtered.emit({ filteredItems: filtered });\n }\n}\nIgxFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxFilterDirective, selector: \"[igxFilter]\", inputs: { filterOptions: [\"igxFilter\", \"filterOptions\"] }, outputs: { filtering: \"filtering\", filtered: \"filtered\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxFilter]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { filtering: [{\n type: Output\n }], filtered: [{\n type: Output\n }], filterOptions: [{\n type: Input,\n args: ['igxFilter']\n }] } });\nclass IgxFilterPipe {\n findMatchByKey(item, options, key) {\n const match = options.matchFn(options.formatter(options.get_value(item, key)), options.inputValue);\n if (match) {\n if (options.metConditionFn) {\n options.metConditionFn(item);\n }\n }\n else {\n if (options.overdueConditionFn) {\n options.overdueConditionFn(item);\n }\n }\n return match;\n }\n transform(items, \n // options - initial settings of filter functionality\n options) {\n let result = [];\n if (!items || !items.length || !options) {\n return;\n }\n if (options.items) {\n items = options.items;\n }\n result = items.filter((item) => {\n if (!Array.isArray(options.key)) {\n return this.findMatchByKey(item, options, options.key);\n }\n else {\n let isMatch = false;\n options.key.forEach(key => {\n if (this.findMatchByKey(item, options, key)) {\n isMatch = true;\n }\n });\n return isMatch;\n }\n });\n return result;\n }\n}\nIgxFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxFilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterPipe, name: \"igxFilter\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'igxFilter',\n pure: false\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxFilterModule {\n}\nIgxFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterModule, declarations: [IgxFilterDirective, IgxFilterPipe], imports: [CommonModule], exports: [IgxFilterDirective, IgxFilterPipe] });\nIgxFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxFilterDirective, IgxFilterPipe],\n exports: [IgxFilterDirective, IgxFilterPipe],\n imports: [CommonModule]\n }]\n }] });\n\n/**\n * Injection token is used to inject the EditorProvider token into components\n *\n * @hidden @internal\n */\nconst EDITOR_PROVIDER = new InjectionToken('EditorProvider');\n\nclass IgxFocusDirective {\n /**\n * Returns the state of the igxFocus.\n * ```typescript\n * @ViewChild('focusContainer', {read: IgxFocusDirective})\n * public igxFocus: IgxFocusDirective;\n * let isFocusOn = this.igxFocus.focused;\n * ```\n *\n * @memberof IgxFocusDirective\n */\n get focused() {\n return this.focusState;\n }\n /**\n * Sets the state of the igxFocus.\n * ```html\n * \n * \n * \n * ```\n *\n * @memberof IgxFocusDirective\n */\n set focused(val) {\n this.focusState = val;\n this.trigger();\n }\n /**\n * Gets the native element of the igxFocus.\n * ```typescript\n * @ViewChild('focusContainer', {read: IgxFocusDirective})\n * public igxFocus: IgxFocusDirective;\n * let igxFocusNativeElement = this.igxFocus.nativeElement;\n * ```\n *\n * @memberof IgxFocusDirective\n */\n get nativeElement() {\n if (this.comp && this.comp[0] && this.comp[0].getEditElement) {\n return this.comp[0].getEditElement();\n }\n if (this.control && this.control[0] && this.control[0].getEditElement) {\n return this.control[0].getEditElement();\n }\n return this.element.nativeElement;\n }\n constructor(element, comp, control) {\n this.element = element;\n this.comp = comp;\n this.control = control;\n this.focusState = true;\n }\n /**\n * Triggers the igxFocus state.\n * ```typescript\n * @ViewChild('focusContainer', {read: IgxFocusDirective})\n * public igxFocus: IgxFocusDirective;\n * this.igxFocus.trigger();\n * ```\n *\n * @memberof IgxFocusDirective\n */\n trigger() {\n if (this.focusState) {\n requestAnimationFrame(() => this.nativeElement.focus({ preventScroll: true }));\n }\n }\n}\nIgxFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusDirective, deps: [{ token: i0.ElementRef }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: EDITOR_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxFocusDirective, selector: \"[igxFocus]\", inputs: { focused: [\"igxFocus\", \"focused\"] }, exportAs: [\"igxFocus\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'igxFocus',\n selector: '[igxFocus]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }, {\n type: Self\n }, {\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [EDITOR_PROVIDER]\n }, {\n type: Self\n }, {\n type: Optional\n }] }]; }, propDecorators: { focused: [{\n type: Input,\n args: ['igxFocus']\n }] } });\n/**\n * @hidden\n */\nclass IgxFocusModule {\n}\nIgxFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusModule, declarations: [IgxFocusDirective], exports: [IgxFocusDirective] });\nIgxFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxFocusDirective],\n exports: [IgxFocusDirective]\n }]\n }] });\n\nclass IgxFocusTrapDirective {\n /** @hidden */\n get element() {\n return this.elementRef.nativeElement;\n }\n /** @hidden */\n constructor(elementRef, platformUtil) {\n this.elementRef = elementRef;\n this.platformUtil = platformUtil;\n this.destroy$ = new Subject();\n this._focusTrap = true;\n }\n /**\n * Sets whether the Tab key focus is trapped within the element.\n *\n * @example\n * ```html\n *
    \n * ```\n */\n set focusTrap(focusTrap) {\n this._focusTrap = focusTrap;\n }\n /** @hidden */\n get focusTrap() {\n return this._focusTrap;\n }\n /** @hidden */\n ngAfterViewInit() {\n fromEvent(this.element, 'keydown')\n .pipe(takeUntil(this.destroy$))\n .subscribe((event) => {\n if (this._focusTrap && event.key === this.platformUtil.KEYMAP.TAB) {\n this.handleTab(event);\n }\n });\n }\n /** @hidden */\n ngOnDestroy() {\n this.destroy$.complete();\n }\n handleTab(event) {\n const elements = this.getFocusableElements(this.element);\n if (elements.length > 0) {\n const focusedElement = this.getFocusedElement();\n const focusedElementIndex = elements.findIndex((element) => element === focusedElement);\n const direction = event.shiftKey ? -1 : 1;\n let nextFocusableElementIndex = focusedElementIndex + direction;\n if (nextFocusableElementIndex < 0) {\n nextFocusableElementIndex = elements.length - 1;\n }\n if (nextFocusableElementIndex >= elements.length) {\n nextFocusableElementIndex = 0;\n }\n elements[nextFocusableElementIndex].focus();\n }\n else {\n this.element.focus();\n }\n event.preventDefault();\n }\n getFocusableElements(element) {\n return Array.from(element.querySelectorAll('a[href], button, input, textarea, select, details,[tabindex]:not([tabindex=\"-1\"])')).filter(el => !el.hasAttribute('disabled') && !el.getAttribute('aria-hidden'));\n }\n getFocusedElement() {\n let activeElement = typeof document !== 'undefined' && document\n ? document.activeElement\n : null;\n while (activeElement && activeElement.shadowRoot) {\n const newActiveElement = activeElement.shadowRoot.activeElement;\n if (newActiveElement === activeElement) {\n break;\n }\n else {\n activeElement = newActiveElement;\n }\n }\n return activeElement;\n }\n}\nIgxFocusTrapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusTrapDirective, deps: [{ token: i0.ElementRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxFocusTrapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxFocusTrapDirective, selector: \"[igxFocusTrap]\", inputs: { focusTrap: [\"igxFocusTrap\", \"focusTrap\"] }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusTrapDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxFocusTrap]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: PlatformUtil }]; }, propDecorators: { focusTrap: [{\n type: Input,\n args: ['igxFocusTrap']\n }] } });\n/**\n * @hidden\n */\nclass IgxFocusTrapModule {\n}\nIgxFocusTrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusTrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxFocusTrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusTrapModule, declarations: [IgxFocusTrapDirective], exports: [IgxFocusTrapDirective] });\nIgxFocusTrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusTrapModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFocusTrapModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxFocusTrapDirective],\n exports: [IgxFocusTrapDirective]\n }]\n }] });\n\nclass IgxLayoutDirective {\n constructor() {\n /**\n * Sets the default flow direction of the container's children.\n *\n * Defaults to `rows`.\n *\n * ```html\n * \n *
    1
    \n *
    2
    \n *
    3
    \n * \n * ```\n */\n this.dir = 'row';\n /**\n * Defines the direction flex children are placed in the flex container.\n *\n * When set to `true`, the `rows` direction goes right to left and `columns` goes bottom to top.\n *\n * ```html\n * \n *
    1
    \n *
    2
    \n *
    3
    \n * \n * ```\n */\n this.reverse = false;\n /**\n * By default the immediate children will all try to fit onto one line.\n *\n * The default value `nowrap` sets this behavior.\n *\n * Other accepted values are `wrap` and `wrap-reverse`.\n *\n * ```html\n * \n *
    1
    \n *
    2
    \n *
    3
    \n * \n * ```\n */\n this.wrap = 'nowrap';\n /**\n * Defines the alignment along the main axis.\n *\n * Defaults to `flex-start` which packs the children toward the start line.\n *\n * Other possible values are `flex-end`, `center`, `space-between`, `space-around`.\n *\n * ```html\n * \n *
    1
    \n *
    2
    \n *
    3
    \n * \n * ```\n */\n this.justify = 'flex-start';\n /**\n * Defines the default behavior for how children are laid out along the corss axis of the current line.\n *\n * Defaults to `flex-start`.\n *\n * Other possible values are `flex-end`, `center`, `baseline`, and `stretch`.\n *\n * ```html\n * \n *
    1
    \n *
    2
    \n *
    3
    \n * \n * ```\n */\n this.itemAlign = 'stretch';\n /**\n * @hidden\n */\n this.display = 'flex';\n }\n /**\n * @hidden\n */\n get flexwrap() {\n return this.wrap;\n }\n /**\n * @hidden\n */\n get justifycontent() {\n return this.justify;\n }\n /**\n * @hidden\n */\n get align() {\n return this.itemAlign;\n }\n /**\n * @hidden\n */\n get direction() {\n if (this.reverse) {\n return (this.dir === 'row') ? 'row-reverse' : 'column-reverse';\n }\n return (this.dir === 'row') ? 'row' : 'column';\n }\n}\nIgxLayoutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxLayoutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxLayoutDirective, selector: \"[igxLayout]\", inputs: { dir: [\"igxLayoutDir\", \"dir\"], reverse: [\"igxLayoutReverse\", \"reverse\"], wrap: [\"igxLayoutWrap\", \"wrap\"], justify: [\"igxLayoutJustify\", \"justify\"], itemAlign: [\"igxLayoutItemAlign\", \"itemAlign\"] }, host: { properties: { \"style.display\": \"this.display\", \"style.flex-wrap\": \"this.flexwrap\", \"style.justify-content\": \"this.justifycontent\", \"style.align-items\": \"this.align\", \"style.flex-direction\": \"this.direction\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLayoutDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxLayout]'\n }]\n }], propDecorators: { dir: [{\n type: Input,\n args: ['igxLayoutDir']\n }], reverse: [{\n type: Input,\n args: ['igxLayoutReverse']\n }], wrap: [{\n type: Input,\n args: ['igxLayoutWrap']\n }], justify: [{\n type: Input,\n args: ['igxLayoutJustify']\n }], itemAlign: [{\n type: Input,\n args: ['igxLayoutItemAlign']\n }], display: [{\n type: HostBinding,\n args: ['style.display']\n }], flexwrap: [{\n type: HostBinding,\n args: ['style.flex-wrap']\n }], justifycontent: [{\n type: HostBinding,\n args: ['style.justify-content']\n }], align: [{\n type: HostBinding,\n args: ['style.align-items']\n }], direction: [{\n type: HostBinding,\n args: ['style.flex-direction']\n }] } });\nclass IgxFlexDirective {\n constructor() {\n /**\n * Applies the `grow` attribute to an element that uses the directive.\n *\n * Default value is `1`.\n *\n * ```html\n *
    \n *
    Content1
    \n *
    Content2
    \n *
    Content3
    \n *
    \n * ```\n */\n this.grow = 1;\n /**\n * Applies the `shrink` attribute to an element that uses the directive.\n *\n * Default value is `1`.\n *\n * ```html\n *
    \n *
    Content1
    \n *
    Content2
    \n *
    Content3
    \n *
    \n * ```\n */\n this.shrink = 1;\n /**\n * Applies the directive to an element.\n *\n * Possible values include `igxFlexGrow`, `igxFlexShrink`, `igxFlexOrder`, `igxFlexBasis`.\n *\n * ```html\n *
    Content
    \n * ```\n */\n this.flex = '';\n /**\n * Applies the `order` attribute to an element that uses the directive.\n *\n * Default value is `0`.\n *\n * ```html\n *
    \n *
    Content1
    \n *
    Content2
    \n *
    Content3
    \n *
    \n * ```\n */\n this.order = 0;\n /**\n * Applies the `flex-basis` attribute to an element that uses the directive.\n *\n * Default value is `auto`.\n *\n * Other possible values include `content`, `max-content`, `min-content`, `fit-content`.\n *\n * ```html\n *
    Content
    \n * ```\n */\n this.basis = 'auto';\n }\n /**\n * @hidden\n */\n get style() {\n if (this.flex) {\n return `${this.flex}`;\n }\n return `${this.grow} ${this.shrink} ${this.basis}`;\n }\n /**\n * @hidden\n */\n get itemorder() {\n return this.order || 0;\n }\n}\nIgxFlexDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFlexDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxFlexDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxFlexDirective, selector: \"[igxFlex]\", inputs: { grow: [\"igxFlexGrow\", \"grow\"], shrink: [\"igxFlexShrink\", \"shrink\"], flex: [\"igxFlex\", \"flex\"], order: [\"igxFlexOrder\", \"order\"], basis: [\"igxFlexBasis\", \"basis\"] }, host: { properties: { \"style.flex\": \"this.style\", \"style.order\": \"this.itemorder\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFlexDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxFlex]'\n }]\n }], propDecorators: { grow: [{\n type: Input,\n args: ['igxFlexGrow']\n }], shrink: [{\n type: Input,\n args: ['igxFlexShrink']\n }], flex: [{\n type: Input,\n args: ['igxFlex']\n }], order: [{\n type: Input,\n args: ['igxFlexOrder']\n }], basis: [{\n type: Input,\n args: ['igxFlexBasis']\n }], style: [{\n type: HostBinding,\n args: ['style.flex']\n }], itemorder: [{\n type: HostBinding,\n args: ['style.order']\n }] } });\n/**\n * @hidden\n */\nclass IgxLayoutModule {\n}\nIgxLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLayoutModule, declarations: [IgxFlexDirective, IgxLayoutDirective], exports: [IgxFlexDirective, IgxLayoutDirective] });\nIgxLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLayoutModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLayoutModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxFlexDirective, IgxLayoutDirective],\n exports: [IgxFlexDirective, IgxLayoutDirective]\n }]\n }] });\n\nconst FLAGS = new Set('aACL09#&?');\nconst REGEX = new Map([\n ['C', /(?!^$)/u],\n ['&', /[^\\p{Separator}]/u],\n ['a', /[\\p{Letter}\\d\\p{Separator}]/u],\n ['A', /[\\p{Letter}\\d]/u],\n ['?', /[\\p{Letter}\\p{Separator}]/u],\n ['L', /\\p{Letter}/u],\n ['0', /\\d/],\n ['9', /[\\d\\p{Separator}]/u],\n ['#', /[\\d\\-+]/], // Numeric and sign\n]);\n;\nconst replaceCharAt = (string, idx, char) => `${string.substring(0, idx)}${char}${string.substring(idx + 1)}`;\nfunction parseMask(format) {\n const literals = new Map();\n let mask = format;\n for (let i = 0, j = 0; i < format.length; i++, j++) {\n const [current, next] = [format.charAt(i), format.charAt(i + 1)];\n if (current === '\\\\' && FLAGS.has(next)) {\n mask = replaceCharAt(mask, j, '');\n literals.set(j, next);\n i++;\n }\n else {\n if (!FLAGS.has(current)) {\n literals.set(j, current);\n }\n }\n }\n return { literals, mask };\n}\n/** @hidden */\nclass MaskParsingService {\n applyMask(inputVal, maskOptions, pos = 0) {\n let outputVal = '';\n let value = '';\n const { literals, mask } = parseMask(maskOptions.format);\n const literalKeys = Array.from(literals.keys());\n const nonLiteralIndices = this.getNonLiteralIndices(mask, literalKeys);\n const literalValues = Array.from(literals.values());\n if (inputVal != null) {\n value = inputVal.toString();\n }\n for (const _maskSym of mask) {\n outputVal += maskOptions.promptChar;\n }\n literals.forEach((val, key) => {\n outputVal = replaceCharAt(outputVal, key, val);\n });\n if (!value) {\n return outputVal;\n }\n const nonLiteralValues = this.getNonLiteralValues(value, literalValues);\n for (let i = 0; i < nonLiteralValues.length; i++) {\n const char = nonLiteralValues[i];\n const isCharValid = this.validateCharOnPosition(char, nonLiteralIndices[i], mask);\n if (!isCharValid && char !== maskOptions.promptChar) {\n nonLiteralValues[i] = maskOptions.promptChar;\n }\n }\n if (nonLiteralValues.length > nonLiteralIndices.length) {\n nonLiteralValues.splice(nonLiteralIndices.length);\n }\n for (const nonLiteralValue of nonLiteralValues) {\n const char = nonLiteralValue;\n outputVal = replaceCharAt(outputVal, nonLiteralIndices[pos++], char);\n }\n return outputVal;\n }\n parseValueFromMask(maskedValue, maskOptions) {\n let outputVal = '';\n const literalValues = Array.from(parseMask(maskOptions.format).literals.values());\n for (const val of maskedValue) {\n if (literalValues.indexOf(val) === -1) {\n if (val !== maskOptions.promptChar) {\n outputVal += val;\n }\n }\n }\n return outputVal;\n }\n replaceInMask(maskedValue, value, maskOptions, start, end) {\n const { literals, mask } = parseMask(maskOptions.format);\n const literalsPositions = Array.from(literals.keys());\n value = this.replaceIMENumbers(value);\n const chars = Array.from(value);\n let cursor = start;\n end = Math.min(end, maskedValue.length);\n let initialMaskedValue = maskedValue;\n for (let i = start; i < end || (chars.length && i < maskedValue.length); i++) {\n if (literalsPositions.indexOf(i) !== -1) {\n if (chars[0] === maskedValue[i]) {\n cursor = i + 1;\n chars.shift();\n }\n continue;\n }\n if (chars[0]\n && !this.validateCharOnPosition(chars[0], i, mask)\n && chars[0] !== maskOptions.promptChar) {\n break;\n }\n let char = maskOptions.promptChar;\n if (chars.length) {\n cursor = i + 1;\n char = chars.shift();\n }\n maskedValue = replaceCharAt(maskedValue, i, char);\n }\n if (value.length <= 1) {\n let isDelete = false;\n cursor = start;\n for (let i = 0; i < literalsPositions.length; i++) {\n if (value === '') {\n // on `delete` the cursor should move forward\n cursor = Math.max(cursor, end);\n isDelete = true;\n }\n else if (cursor === literalsPositions[i]) {\n cursor = literalsPositions[i] + 1;\n }\n }\n if (!isDelete && initialMaskedValue !== maskedValue) {\n cursor++;\n }\n }\n return { value: maskedValue, end: cursor };\n }\n /** Validates only non literal positions. */\n validateCharOnPosition(inputChar, position, mask) {\n const regex = REGEX.get(mask.charAt(position));\n return regex ? regex.test(inputChar) : false;\n }\n getNonLiteralIndices(mask, literalKeys) {\n const nonLiteralsIndices = new Array();\n for (let i = 0; i < mask.length; i++) {\n if (literalKeys.indexOf(i) === -1) {\n nonLiteralsIndices.push(i);\n }\n }\n return nonLiteralsIndices;\n }\n getNonLiteralValues(value, literalValues) {\n const nonLiteralValues = new Array();\n for (const val of value) {\n if (literalValues.indexOf(val) === -1) {\n nonLiteralValues.push(val);\n }\n }\n return nonLiteralValues;\n }\n replaceIMENumbers(value) {\n return value.replace(/[0123456789]/g, (num) => ({\n '1': '1', '2': '2', '3': '3', '4': '4', '5': '5',\n '6': '6', '7': '7', '8': '8', '9': '9', '0': '0'\n }[num]));\n }\n}\nMaskParsingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: MaskParsingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nMaskParsingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: MaskParsingService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: MaskParsingService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }] });\n\nclass IgxMaskDirective {\n /**\n * Sets the input mask.\n * ```html\n * \n * ```\n */\n get mask() {\n return this._mask || this.defaultMask;\n }\n set mask(val) {\n // B.P. 9th June 2021 #7490\n if (val !== this._mask) {\n const cleanInputValue = this.maskParser.parseValueFromMask(this.inputValue, this.maskOptions);\n this.setPlaceholder(val);\n this._mask = val;\n this.updateInputValue(cleanInputValue);\n }\n }\n /** @hidden */\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n /** @hidden @internal; */\n get inputValue() {\n return this.nativeElement.value;\n }\n /** @hidden @internal */\n set inputValue(val) {\n this.nativeElement.value = val;\n }\n /** @hidden */\n get maskOptions() {\n const format = this.mask || this.defaultMask;\n const promptChar = this.promptChar && this.promptChar.substring(0, 1);\n return { format, promptChar };\n }\n /** @hidden */\n get selectionStart() {\n // Edge(classic) and FF don't select text on drop\n return this.nativeElement.selectionStart === this.nativeElement.selectionEnd && this._hasDropAction ?\n this.nativeElement.selectionEnd - this._droppedData.length :\n this.nativeElement.selectionStart;\n }\n /** @hidden */\n get selectionEnd() {\n return this.nativeElement.selectionEnd;\n }\n /** @hidden */\n get start() {\n return this._start;\n }\n /** @hidden */\n get end() {\n return this._end;\n }\n constructor(elementRef, maskParser, renderer, platform) {\n this.elementRef = elementRef;\n this.maskParser = maskParser;\n this.renderer = renderer;\n this.platform = platform;\n /**\n * Sets the character representing a fillable spot in the input mask.\n * Default value is \"'_'\".\n * ```html\n * \n * ```\n */\n this.promptChar = '_';\n /**\n * Emits an event each time the value changes.\n * Provides `rawValue: string` and `formattedValue: string` as event arguments.\n * ```html\n * \n * ```\n */\n this.valueChanged = new EventEmitter();\n this._end = 0;\n this._start = 0;\n this._oldText = '';\n this._dataValue = '';\n this._focused = false;\n this.defaultMask = 'CCCCCCCCCC';\n this._onTouchedCallback = noop;\n this._onChangeCallback = noop;\n }\n /** @hidden */\n onKeyDown(event) {\n const key = event.key;\n if (!key) {\n return;\n }\n if ((event.ctrlKey && (key === this.platform.KEYMAP.Z || key === this.platform.KEYMAP.Y))) {\n event.preventDefault();\n }\n this._key = key;\n this._start = this.selectionStart;\n this._end = this.selectionEnd;\n }\n /** @hidden @internal */\n onCompositionStart() {\n if (!this._composing) {\n this._compositionStartIndex = this._start;\n this._composing = true;\n }\n }\n /** @hidden @internal */\n onCompositionEnd() {\n this._start = this._compositionStartIndex;\n const end = this.selectionEnd;\n const valueToParse = this.inputValue.substring(this._start, end);\n this.updateInput(valueToParse);\n this._end = this.selectionEnd;\n this._compositionValue = this.inputValue;\n }\n /** @hidden @internal */\n onInputChanged(event) {\n /**\n * '!this._focused' is a fix for #8165\n * On page load IE triggers input events before focus events and\n * it does so for every single input on the page.\n * The mask needs to be prevented from doing anything while this is happening because\n * the end user will be unable to blur the input.\n * https://stackoverflow.com/questions/21406138/input-event-triggered-on-internet-explorer-when-placeholder-changed\n */\n if (this._composing) {\n if (this.inputValue.length < this._oldText.length) {\n // software keyboard input delete\n this._key = this.platform.KEYMAP.BACKSPACE;\n }\n return;\n }\n // After the compositionend event Chromium triggers input events of type 'deleteContentBackward' and\n // we need to adjust the start and end indexes to include mask literals\n if (event.inputType === 'deleteContentBackward' && this._key !== this.platform.KEYMAP.BACKSPACE) {\n const isInputComplete = this._compositionStartIndex === 0 && this._end === this.mask.length;\n let numberOfMaskLiterals = 0;\n const literalPos = parseMask(this.maskOptions.format).literals.keys();\n for (const index of literalPos) {\n if (index >= this._compositionStartIndex && index <= this._end) {\n numberOfMaskLiterals++;\n }\n }\n this.inputValue = isInputComplete ?\n this.inputValue.substring(0, this.selectionEnd - numberOfMaskLiterals) + this.inputValue.substring(this.selectionEnd)\n : this._compositionValue?.substring(0, this._compositionStartIndex) || this.inputValue;\n if (this._compositionValue) {\n this._start = this.selectionStart;\n this._end = this.selectionEnd;\n this.nativeElement.selectionStart = isInputComplete ? this._start - numberOfMaskLiterals : this._compositionStartIndex;\n this.nativeElement.selectionEnd = this._end - numberOfMaskLiterals;\n this.nativeElement.selectionEnd = this._end;\n this._start = this.selectionStart;\n this._end = this.selectionEnd;\n }\n }\n if (this._hasDropAction) {\n this._start = this.selectionStart;\n }\n let valueToParse = '';\n switch (this._key) {\n case this.platform.KEYMAP.DELETE:\n this._end = this._start === this._end ? ++this._end : this._end;\n break;\n case this.platform.KEYMAP.BACKSPACE:\n this._start = this.selectionStart;\n break;\n default:\n valueToParse = this.inputValue.substring(this._start, this.selectionEnd);\n break;\n }\n this.updateInput(valueToParse);\n }\n /** @hidden */\n onPaste() {\n this._oldText = this.inputValue;\n this._start = this.selectionStart;\n }\n /** @hidden */\n onFocus() {\n if (this.nativeElement.readOnly) {\n return;\n }\n this._focused = true;\n this.showMask(this.inputValue);\n }\n /** @hidden */\n onBlur(value) {\n this._focused = false;\n this.showDisplayValue(value);\n this._onTouchedCallback();\n }\n /** @hidden */\n onDragEnter() {\n if (!this._focused && !this._dataValue) {\n this.showMask(this._dataValue);\n }\n }\n /** @hidden */\n onDragLeave() {\n if (!this._focused) {\n this.showDisplayValue(this.inputValue);\n }\n }\n /** @hidden */\n onDrop(event) {\n this._hasDropAction = true;\n this._droppedData = event.dataTransfer.getData('text');\n }\n /** @hidden */\n ngOnInit() {\n this.setPlaceholder(this.maskOptions.format);\n }\n /**\n * TODO: Remove after date/time picker integration refactor\n *\n * @hidden\n */\n ngAfterViewChecked() {\n if (this._composing) {\n return;\n }\n this._oldText = this.inputValue;\n }\n /** @hidden */\n writeValue(value) {\n if (this.promptChar && this.promptChar.length > 1) {\n this.maskOptions.promptChar = this.promptChar.substring(0, 1);\n }\n this.inputValue = value ? this.maskParser.applyMask(value, this.maskOptions) : '';\n if (this.displayValuePipe) {\n this.inputValue = this.displayValuePipe.transform(this.inputValue);\n }\n this._dataValue = this.includeLiterals ? this.inputValue : value;\n this.valueChanged.emit({ rawValue: value, formattedValue: this.inputValue });\n }\n /** @hidden */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /** @hidden */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden */\n showMask(value) {\n if (this.focusedValuePipe) {\n // TODO(D.P.): focusedValuePipe should be deprecated or force-checked to match mask format\n this.inputValue = this.focusedValuePipe.transform(value);\n }\n else {\n this.inputValue = this.maskParser.applyMask(value, this.maskOptions);\n }\n this._oldText = this.inputValue;\n }\n /** @hidden */\n setSelectionRange(start, end = start) {\n this.nativeElement.setSelectionRange(start, end);\n }\n /** @hidden */\n afterInput() {\n this._oldText = this.inputValue;\n this._hasDropAction = false;\n this._start = 0;\n this._end = 0;\n this._key = null;\n this._composing = false;\n }\n /** @hidden */\n setPlaceholder(value) {\n const placeholder = this.nativeElement.placeholder;\n if (!placeholder || placeholder === this.mask) {\n this.renderer.setAttribute(this.nativeElement, 'placeholder', parseMask(value ?? '').mask || this.defaultMask);\n }\n }\n updateInputValue(value) {\n if (this._focused) {\n this.showMask(value);\n }\n else if (!this.displayValuePipe) {\n this.inputValue = this.inputValue ? this.maskParser.applyMask(value, this.maskOptions) : '';\n }\n }\n updateInput(valueToParse) {\n const replacedData = this.maskParser.replaceInMask(this._oldText, valueToParse, this.maskOptions, this._start, this._end);\n this.inputValue = replacedData.value;\n if (this._key === this.platform.KEYMAP.BACKSPACE) {\n replacedData.end = this._start;\n }\n ;\n this.setSelectionRange(replacedData.end);\n const rawVal = this.maskParser.parseValueFromMask(this.inputValue, this.maskOptions);\n this._dataValue = this.includeLiterals ? this.inputValue : rawVal;\n this._onChangeCallback(this._dataValue);\n this.valueChanged.emit({ rawValue: rawVal, formattedValue: this.inputValue });\n this.afterInput();\n }\n showDisplayValue(value) {\n if (this.displayValuePipe) {\n this.inputValue = this.displayValuePipe.transform(value);\n }\n else if (value === this.maskParser.applyMask(null, this.maskOptions)) {\n this.inputValue = '';\n }\n }\n}\nIgxMaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMaskDirective, deps: [{ token: i0.ElementRef }, { token: MaskParsingService }, { token: i0.Renderer2 }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxMaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxMaskDirective, selector: \"[igxMask]\", inputs: { mask: [\"igxMask\", \"mask\"], promptChar: \"promptChar\", includeLiterals: \"includeLiterals\", displayValuePipe: \"displayValuePipe\", focusedValuePipe: \"focusedValuePipe\" }, outputs: { valueChanged: \"valueChanged\" }, host: { listeners: { \"keydown\": \"onKeyDown($event)\", \"compositionstart\": \"onCompositionStart()\", \"compositionend\": \"onCompositionEnd()\", \"input\": \"onInputChanged($event)\", \"paste\": \"onPaste()\", \"focus\": \"onFocus()\", \"blur\": \"onBlur($event.target.value)\", \"dragenter\": \"onDragEnter()\", \"dragleave\": \"onDragLeave()\", \"drop\": \"onDrop($event)\" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxMaskDirective, multi: true }], exportAs: [\"igxMask\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMaskDirective, decorators: [{\n type: Directive,\n args: [{\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxMaskDirective, multi: true }],\n selector: '[igxMask]',\n exportAs: 'igxMask'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MaskParsingService }, { type: i0.Renderer2 }, { type: PlatformUtil }]; }, propDecorators: { mask: [{\n type: Input,\n args: ['igxMask']\n }], promptChar: [{\n type: Input\n }], includeLiterals: [{\n type: Input\n }], displayValuePipe: [{\n type: Input\n }], focusedValuePipe: [{\n type: Input\n }], valueChanged: [{\n type: Output\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }], onCompositionStart: [{\n type: HostListener,\n args: ['compositionstart']\n }], onCompositionEnd: [{\n type: HostListener,\n args: ['compositionend']\n }], onInputChanged: [{\n type: HostListener,\n args: ['input', ['$event']]\n }], onPaste: [{\n type: HostListener,\n args: ['paste']\n }], onFocus: [{\n type: HostListener,\n args: ['focus']\n }], onBlur: [{\n type: HostListener,\n args: ['blur', ['$event.target.value']]\n }], onDragEnter: [{\n type: HostListener,\n args: ['dragenter']\n }], onDragLeave: [{\n type: HostListener,\n args: ['dragleave']\n }], onDrop: [{\n type: HostListener,\n args: ['drop', ['$event']]\n }] } });\n/** @hidden */\nclass IgxMaskModule {\n}\nIgxMaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxMaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMaskModule, declarations: [IgxMaskDirective], imports: [CommonModule], exports: [IgxMaskDirective] });\nIgxMaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMaskModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMaskModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxMaskDirective],\n exports: [IgxMaskDirective],\n imports: [CommonModule]\n }]\n }] });\n\nclass IgxRippleDirective {\n /**\n * Enables/disables the ripple to be centered.\n * ```html\n * \n * ```\n *\n * @memberof IgxRippleDirective\n */\n set centered(value) {\n this._centered = value || this.centered;\n }\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n constructor(builder, elementRef, renderer, zone) {\n this.builder = builder;\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.zone = zone;\n /**\n * Sets/gets the ripple target.\n * ```html\n *
    \n * ```\n * ```typescript\n * @ViewChild('rippleContainer', {read: IgxRippleDirective})\n * public ripple: IgxRippleDirective;\n * let rippleTarget = this.ripple.rippleTarget;\n * ```\n * Can set the ripple to activate on a child element inside the parent where igxRipple is defined.\n * ```html\n *
    \n * \n *
    \n * ```\n *\n * @memberof IgxRippleDirective\n */\n this.rippleTarget = '';\n /**\n * Sets/gets the ripple duration(in milliseconds).\n * Default value is `600`.\n * ```html\n * \n * ```\n * ```typescript\n * @ViewChild('rippleContainer', {read: IgxRippleDirective})\n * public ripple: IgxRippleDirective;\n * let rippleDuration = this.ripple.rippleDuration;\n * ```\n *\n * @memberof IgxRippleDirective\n */\n this.rippleDuration = 600;\n /**\n * Sets/gets whether the ripple is disabled.\n * Default value is `false`.\n * ```html\n * \n * ```\n * ```typescript\n * @ViewChild('rippleContainer', {read: IgxRippleDirective})\n * public ripple: IgxRippleDirective;\n * let isRippleDisabled = this.ripple.rippleDisabled;\n * ```\n *\n * @memberof IgxRippleDirective\n */\n this.rippleDisabled = false;\n this.rippleElementClass = 'igx-ripple__inner';\n this.rippleHostClass = 'igx-ripple';\n this._centered = false;\n this.animationQueue = [];\n }\n /**\n * @hidden\n */\n onMouseDown(event) {\n this.zone.runOutsideAngular(() => this._ripple(event));\n }\n setStyles(rippleElement, styleParams) {\n this.renderer.addClass(rippleElement, this.rippleElementClass);\n this.renderer.setStyle(rippleElement, 'width', `${styleParams.radius}px`);\n this.renderer.setStyle(rippleElement, 'height', `${styleParams.radius}px`);\n this.renderer.setStyle(rippleElement, 'top', `${styleParams.top}px`);\n this.renderer.setStyle(rippleElement, 'left', `${styleParams.left}px`);\n if (this.rippleColor) {\n this.renderer.setStyle(rippleElement, 'background', this.rippleColor);\n }\n }\n _ripple(event) {\n if (this.rippleDisabled) {\n return;\n }\n const target = (this.rippleTarget ? this.nativeElement.querySelector(this.rippleTarget) || this.nativeElement : this.nativeElement);\n const rectBounds = target.getBoundingClientRect();\n const radius = Math.max(rectBounds.width, rectBounds.height);\n let left = Math.round(event.clientX - rectBounds.left - radius / 2);\n let top = Math.round(event.clientY - rectBounds.top - radius / 2);\n if (this._centered) {\n left = top = 0;\n }\n const dimensions = {\n radius,\n top,\n left\n };\n const rippleElement = this.renderer.createElement('span');\n this.setStyles(rippleElement, dimensions);\n this.renderer.addClass(target, this.rippleHostClass);\n this.renderer.appendChild(target, rippleElement);\n const animation = this.builder.build([\n style({ opacity: 0.5, transform: 'scale(.3)' }),\n animate(this.rippleDuration, style({ opacity: 0, transform: 'scale(2)' }))\n ]).create(rippleElement);\n this.animationQueue.push(animation);\n animation.onDone(() => {\n this.animationQueue.splice(this.animationQueue.indexOf(animation), 1);\n target.removeChild(rippleElement);\n if (this.animationQueue.length < 1) {\n this.renderer.removeClass(target, this.rippleHostClass);\n }\n });\n animation.play();\n }\n}\nIgxRippleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRippleDirective, deps: [{ token: i1.AnimationBuilder }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRippleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: { rippleTarget: [\"igxRippleTarget\", \"rippleTarget\"], rippleColor: [\"igxRipple\", \"rippleColor\"], rippleDuration: [\"igxRippleDuration\", \"rippleDuration\"], centered: [\"igxRippleCentered\", \"centered\"], rippleDisabled: [\"igxRippleDisabled\", \"rippleDisabled\"] }, host: { listeners: { \"mousedown\": \"onMouseDown($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRippleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRipple]'\n }]\n }], ctorParameters: function () { return [{ type: i1.AnimationBuilder }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { rippleTarget: [{\n type: Input,\n args: ['igxRippleTarget']\n }], rippleColor: [{\n type: Input,\n args: ['igxRipple']\n }], rippleDuration: [{\n type: Input,\n args: ['igxRippleDuration']\n }], centered: [{\n type: Input,\n args: ['igxRippleCentered']\n }], rippleDisabled: [{\n type: Input,\n args: ['igxRippleDisabled']\n }], onMouseDown: [{\n type: HostListener,\n args: ['mousedown', ['$event']]\n }] } });\n/**\n * @hidden\n */\nclass IgxRippleModule {\n}\nIgxRippleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRippleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxRippleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRippleModule, declarations: [IgxRippleDirective], exports: [IgxRippleDirective] });\nIgxRippleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRippleModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRippleModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxRippleDirective],\n exports: [IgxRippleDirective]\n }]\n }] });\n\nconst RadioLabelPosition = mkenum({\n BEFORE: 'before',\n AFTER: 'after'\n});\nlet nextId$3 = 0;\n/**\n * **Ignite UI for Angular Radio Button** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/radio_button.html)\n *\n * The Ignite UI Radio Button allows the user to select a single option from an available set of options that are listed side by side.\n *\n * Example:\n * ```html\n * \n * Simple radio button\n * \n * ```\n */\nclass IgxRadioComponent {\n /**\n * Gets the `nativeElement` of the igx-radio.\n *\n * @example\n * ```typescript\n * let igxRadioNativeElement = this.igxRadio.nativeElement;\n * ```\n */\n get nativeElement() {\n return this.nativeRadio.nativeElement;\n }\n /**\n * Sets/gets whether the radio button is required.\n * If not set, `required` will have value `false`.\n * ```html\n * \n * ```\n * ```typescript\n * let isRequired = this.radio.required;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n get required() {\n return this._required || this.nativeElement.hasAttribute('required');\n }\n set required(value) {\n this._required = (value === '') || value;\n }\n /**\n * Sets/gets the `disabled` attribute.\n * Default value is `false`.\n * ```html\n * \n * ```\n * ```typescript\n * let isDisabled = this.radio.disabled;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n get disabled() {\n return this._disabled || false;\n }\n set disabled(value) {\n this._disabled = (value === '') || value;\n }\n /**\n * Sets/gets whether the radio button is invalid.\n * Default value is `false`.\n * ```html\n * \n * ```\n * ```typescript\n * let isInvalid = this.radio.invalid;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n get invalid() {\n return this._invalid || false;\n }\n set invalid(value) {\n this._invalid = !!value;\n }\n constructor(cdr, renderer, ngControl) {\n this.cdr = cdr;\n this.renderer = renderer;\n this.ngControl = ngControl;\n /**\n * @hidden\n * @internal\n */\n this.destroy$ = new Subject();\n /**\n * Sets/gets the `id` of the radio component.\n * If not set, the `id` of the first radio component will be `\"igx-radio-0\"`.\n * ```html\n * \n * ```\n * ```typescript\n * let radioId = this.radio.id;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.id = `igx-radio-${nextId$3++}`;\n /**\n * Sets/gets the id of the `label` element in the radio component.\n * If not set, the id of the `label` in the first radio component will be `\"igx-radio-0-label\"`.\n * ```html\n * \n * ```\n * ```typescript\n * let labelId = this.radio.labelId;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.labelId = `${this.id}-label`;\n /**\n * Sets the value of the `tabindex` attribute.\n * ```html\n * \n * ```\n * ```typescript\n * let tabIndex = this.radio.tabindex;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.tabindex = null;\n /**\n * Enables/disables the ripple effect on the radio button..\n * If not set, the `disableRipple` will have value `false`.\n * ```html\n * \n * ```\n * ```typescript\n * let isDisabledRipple = this.radio.disableRipple;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.disableRipple = false;\n /**\n * Sets/gets the `aria-labelledby` attribute of the radio component.\n * If not set, the `aria-labelledby` will be equal to the value of `labelId` attribute.\n * ```html\n * \n * ```\n * ```typescript\n * let ariaLabelledBy = this.radio.ariaLabelledBy;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.ariaLabelledBy = this.labelId;\n /**\n * Sets/gets the `aria-label` attribute of the radio component.\n * ```html\n * \n * ```\n * ```typescript\n * let ariaLabel = this.radio.ariaLabel;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.ariaLabel = null;\n /**\n * An event that is emitted after the radio `value` is changed.\n * Provides references to the `IgxRadioComponent` and the `value` property as event arguments.\n *\n * @memberof IgxRadioComponent\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n this.change = new EventEmitter();\n /** @hidden @internal */\n this.blurRadio = new EventEmitter();\n /**\n * Returns the class of the radio component.\n * ```typescript\n * let radioClass = this.radio.cssClass;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.cssClass = 'igx-radio';\n /**\n * Sets/gets the `checked` attribute.\n * Default value is `false`.\n * ```html\n * \n * ```\n * ```typescript\n * let isChecked = this.radio.checked;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.checked = false;\n /**\n * Sets/gets whether the radio component is on focus.\n * Default value is `false`.\n * ```typescript\n * this.radio.focus = true;\n * ```\n * ```typescript\n * let isFocused = this.radio.focused;\n * ```\n *\n * @memberof IgxRadioComponent\n */\n this.focused = false;\n /**\n * @hidden\n */\n this.inputId = `${this.id}-input`;\n /**\n * @hidden\n * @internal\n */\n this._required = false;\n /**\n * @hidden\n * @internal\n */\n this._invalid = false;\n /**\n * @hidden\n */\n this._onTouchedCallback = noop;\n /**\n * @hidden\n */\n this._onChangeCallback = noop;\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n if (this.ngControl) {\n this.ngControl.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(this.onStatusChanged.bind(this));\n if (this.ngControl.control.validator || this.ngControl.control.asyncValidator) {\n this._required = this.ngControl?.control?.hasValidator(Validators.required);\n this.cdr.detectChanges();\n }\n }\n }\n onStatusChanged() {\n if (this.disabled !== this.ngControl.disabled) {\n this.disabled = this.ngControl.disabled;\n }\n this.updateValidityState();\n }\n /**\n * @hidden\n * @internal\n */\n _changed(event) {\n if (event instanceof Event) {\n event.preventDefault();\n }\n }\n /**\n * @hidden\n * @internal\n */\n onKeyUp(event) {\n event.stopPropagation();\n if (!this.focused) {\n this.focused = true;\n }\n }\n /**\n * @hidden\n */\n _clicked() {\n this.select();\n }\n /**\n * Selects the current radio button.\n * ```typescript\n * this.radio.select();\n * ```\n *\n * @memberof IgxRadioComponent\n */\n select() {\n if (!this.checked) {\n this.checked = true;\n this.invalid = false;\n this.change.emit({ value: this.value, radio: this });\n this._onChangeCallback(this.value);\n }\n }\n /**\n * Deselects the current radio button.\n * ```typescript\n * this.radio.deselect();\n * ```\n *\n * @memberof IgxRadioComponent\n */\n deselect() {\n this.checked = false;\n this.focused = false;\n this.cdr.markForCheck();\n }\n /**\n * Checks whether the provided value is consistent to the current radio button.\n * If it is, the checked attribute will have value `true`;\n * ```typescript\n * this.radio.writeValue('radioButtonValue');\n * ```\n */\n writeValue(value) {\n this.value = this.value || value;\n if (value === this.value) {\n this.select();\n }\n else {\n this.deselect();\n }\n }\n /** @hidden */\n getEditElement() {\n return this.nativeRadio.nativeElement;\n }\n /**\n * @hidden\n */\n get labelClass() {\n switch (this.labelPosition) {\n case RadioLabelPosition.BEFORE:\n return `${this.cssClass}__label--before`;\n case RadioLabelPosition.AFTER:\n default:\n return `${this.cssClass}__label`;\n }\n }\n /**\n * @hidden\n */\n onBlur() {\n this.focused = false;\n this._onTouchedCallback();\n this.updateValidityState();\n this.blurRadio.emit();\n }\n /**\n * @hidden\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * @hidden\n */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /**\n * @hidden\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /**\n * @hidden\n * @internal\n */\n updateValidityState() {\n if (this.ngControl) {\n if (!this.disabled && (this.ngControl.control.touched || this.ngControl.control.dirty)) {\n // the control is not disabled and is touched or dirty\n if (this.checked) {\n this._invalid = this.ngControl.invalid;\n }\n else {\n this._invalid = this.required ? true : false;\n }\n }\n else {\n // if control is untouched, pristine, or disabled its state is initial. This is when user did not interact\n // with the radio or when form/control is reset\n this._invalid = false;\n }\n }\n else {\n this.checkNativeValidity();\n }\n }\n /**\n * A function to assign a native validity property of a radio.\n * This should be used when there's no ngControl\n *\n * @hidden\n * @internal\n */\n checkNativeValidity() {\n if (!this.disabled && this._required && !this.checked) {\n this._invalid = !this.focused;\n }\n }\n}\nIgxRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRadioComponent, selector: \"igx-radio\", inputs: { id: \"id\", labelId: \"labelId\", labelPosition: \"labelPosition\", value: \"value\", name: \"name\", tabindex: \"tabindex\", disableRipple: \"disableRipple\", required: \"required\", ariaLabelledBy: [\"aria-labelledby\", \"ariaLabelledBy\"], ariaLabel: [\"aria-label\", \"ariaLabel\"], checked: \"checked\", disabled: \"disabled\", invalid: \"invalid\" }, outputs: { change: \"change\" }, host: { listeners: { \"change\": \"_changed($event)\", \"keyup\": \"onKeyUp($event)\", \"click\": \"_clicked()\", \"blur\": \"onBlur()\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-radio\": \"this.cssClass\", \"class.igx-radio--checked\": \"this.checked\", \"class.igx-radio--disabled\": \"this.disabled\", \"class.igx-radio--invalid\": \"this.invalid\", \"class.igx-radio--focused\": \"this.focused\" } }, providers: [{\n provide: EDITOR_PROVIDER,\n useExisting: IgxRadioComponent,\n multi: true\n }], viewQueries: [{ propertyName: \"nativeRadio\", first: true, predicate: [\"radio\"], descendants: true, static: true }, { propertyName: \"nativeLabel\", first: true, predicate: [\"nativeLabel\"], descendants: true, static: true }, { propertyName: \"placeholderLabel\", first: true, predicate: [\"placeholderLabel\"], descendants: true, static: true }], ngImport: i0, template: \"\\n\\n\\n
    \\n
    \\n\\n\\n \\n\\n\", dependencies: [{ kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-radio', providers: [{\n provide: EDITOR_PROVIDER,\n useExisting: IgxRadioComponent,\n multi: true\n }], template: \"\\n\\n\\n
    \\n
    \\n\\n\\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i5.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; }, propDecorators: { nativeRadio: [{\n type: ViewChild,\n args: ['radio', { static: true }]\n }], nativeLabel: [{\n type: ViewChild,\n args: ['nativeLabel', { static: true }]\n }], placeholderLabel: [{\n type: ViewChild,\n args: ['placeholderLabel', { static: true }]\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], labelId: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], value: [{\n type: Input\n }], name: [{\n type: Input\n }], tabindex: [{\n type: Input\n }], disableRipple: [{\n type: Input\n }], required: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], change: [{\n type: Output\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-radio']\n }], checked: [{\n type: HostBinding,\n args: ['class.igx-radio--checked']\n }, {\n type: Input\n }], disabled: [{\n type: HostBinding,\n args: ['class.igx-radio--disabled']\n }, {\n type: Input\n }], invalid: [{\n type: HostBinding,\n args: ['class.igx-radio--invalid']\n }, {\n type: Input\n }], focused: [{\n type: HostBinding,\n args: ['class.igx-radio--focused']\n }], _changed: [{\n type: HostListener,\n args: ['change', ['$event']]\n }], onKeyUp: [{\n type: HostListener,\n args: ['keyup', ['$event']]\n }], _clicked: [{\n type: HostListener,\n args: ['click']\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }] } });\n\n/**\n * @hidden\n */\nfunction DIR_DOCUMENT_FACTORY() {\n return inject(DOCUMENT);\n}\n/**\n * Injection token is used to inject the document into Directionality\n * which factory could be faked for testing purposes.\n *\n * We can't provide and mock the DOCUMENT token from platform-browser because configureTestingModule\n * allows override of the default providers, directive, pipes, modules of the test injector\n * which causes errors.\n *\n * @hidden\n */\nconst DIR_DOCUMENT = new InjectionToken('dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY\n});\n/**\n * @hidden\n *\n * Bidirectional service that extracts the value of the direction attribute on the body or html elements.\n *\n * The dir attribute over the body element takes precedence.\n */\nclass IgxDirectionality {\n get value() {\n return this._dir;\n }\n get document() {\n return this._document;\n }\n get rtl() {\n return this._dir === 'rtl';\n }\n constructor(document) {\n this._document = document;\n const bodyDir = this._document.body ? this._document.body.dir : null;\n const htmlDir = this._document.documentElement ? this._document.documentElement.dir : null;\n const extractedDir = bodyDir || htmlDir;\n this._dir = (extractedDir === 'ltr' || extractedDir === 'rtl') ? extractedDir : 'ltr';\n }\n}\nIgxDirectionality.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDirectionality, deps: [{ token: DIR_DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxDirectionality.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDirectionality, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDirectionality, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DIR_DOCUMENT]\n }] }]; } });\n\n/**\n * Determines the Radio Group alignment\n */\nconst RadioGroupAlignment = mkenum({\n horizontal: 'horizontal',\n vertical: 'vertical'\n});\nlet nextId$2 = 0;\n/**\n * Radio group directive renders set of radio buttons.\n *\n * @igxModule IgxRadioModule\n *\n * @igxTheme igx-radio-theme\n *\n * @igxKeywords radiogroup, radio, button, input\n *\n * @igxGroup Data Entry & Display\n *\n * @remarks\n * The Ignite UI Radio Group allows the user to select a single option from an available set of options that are listed side by side.\n *\n * @example:\n * ```html\n * \n * \n * {{item}}\n * \n * \n * ```\n */\nclass IgxRadioGroupDirective {\n /**\n * Sets/gets the `value` attribute.\n *\n * @example\n * ```html\n * \n * ```\n */\n get value() {\n return this._value;\n }\n set value(newValue) {\n if (this._value !== newValue) {\n this._value = newValue;\n this._selectRadioButton();\n }\n }\n /**\n * Sets/gets the `name` attribute of the radio group component. All child radio buttons inherits this name.\n *\n * @example\n * ```html\n * \n * ```\n */\n get name() {\n return this._name;\n }\n set name(newValue) {\n if (this._name !== newValue) {\n this._name = newValue;\n this._setRadioButtonNames();\n }\n }\n /**\n * Sets/gets whether the radio group is required.\n *\n * @remarks\n * If not set, `required` will have value `false`.\n *\n * @example\n * ```html\n * \n * ```\n */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = value === '' || value;\n this._setRadioButtonsRequired();\n }\n /**\n * Sets/gets the selected child radio button.\n *\n * @example\n * ```typescript\n * let selectedButton = this.radioGroup.selected;\n * this.radioGroup.selected = selectedButton;\n * ```\n */\n get selected() {\n return this._selected;\n }\n set selected(selected) {\n if (this._selected !== selected) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n }\n }\n /**\n * Sets/gets whether the radio group is invalid.\n *\n * @remarks\n * If not set, `invalid` will have value `false`.\n *\n * @example\n * ```html\n * \n * ```\n */\n get invalid() {\n return this._invalid;\n }\n set invalid(value) {\n this._invalid = value === '' || value;\n this._setRadioButtonsInvalid();\n }\n handleClick(event) {\n event.stopPropagation();\n this.selected.nativeElement.focus();\n }\n handleKeyDown(event) {\n const { key } = event;\n const buttons = this.radioButtons.filter(radio => !radio.disabled);\n const checked = buttons.find((radio) => radio.checked);\n if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) {\n let index = checked ? buttons.indexOf(checked) : -1;\n const ltr = this._directionality.value === 'ltr';\n switch (key) {\n case 'ArrowUp':\n index += -1;\n break;\n case 'ArrowLeft':\n index += ltr ? -1 : 1;\n break;\n case 'ArrowRight':\n index += ltr ? 1 : -1;\n break;\n default:\n index += 1;\n }\n if (index < 0)\n index = buttons.length - 1;\n if (index > buttons.length - 1)\n index = 0;\n buttons.forEach((radio) => {\n radio.deselect();\n radio.nativeElement.blur();\n });\n buttons[index].focused = true;\n buttons[index].nativeElement.focus();\n buttons[index].select();\n event.preventDefault();\n }\n if (event.key === \"Tab\") {\n buttons.forEach((radio) => {\n if (radio !== checked) {\n event.stopPropagation();\n }\n });\n }\n }\n /**\n * Returns the alignment of the `igx-radio-group`.\n * ```typescript\n * @ViewChild(\"MyRadioGroup\")\n * public radioGroup: IgxRadioGroupDirective;\n * ngAfterViewInit(){\n * let radioAlignment = this.radioGroup.alignment;\n * }\n * ```\n */\n get alignment() {\n return this.vertical ? RadioGroupAlignment.vertical : RadioGroupAlignment.horizontal;\n }\n /**\n * Allows you to set the radio group alignment.\n * Available options are `RadioGroupAlignment.horizontal` (default) and `RadioGroupAlignment.vertical`.\n * ```typescript\n * public alignment = RadioGroupAlignment.vertical;\n * //..\n * ```\n * ```html\n * \n * ```\n */\n set alignment(value) {\n this.vertical = value === RadioGroupAlignment.vertical;\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterContentInit() {\n // The initial value can possibly be set by NgModel and it is possible that\n // the OnInit of the NgModel occurs after the OnInit of this class.\n this._isInitialized = true;\n this.radioButtons.changes.pipe(startWith(0), takeUntil(this.destroy$)).subscribe(() => {\n this.queryChange$.next();\n setTimeout(() => this._initRadioButtons());\n });\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n if (this.ngControl) {\n this.ngControl.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.invalid = false;\n });\n if (this.ngControl.control.validator || this.ngControl.control.asyncValidator) {\n this._required = this.ngControl?.control?.hasValidator(Validators.required);\n }\n }\n if (this.radioButtons) {\n this.radioButtons.forEach((button) => {\n fromEvent(button.nativeElement, 'blur')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.updateValidityOnBlur();\n });\n fromEvent(button.nativeElement, 'keyup')\n .pipe(takeUntil(this.destroy$))\n .subscribe((event) => {\n this.updateOnKeyUp(event);\n });\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n updateValidityOnBlur() {\n this.radioButtons.forEach((button) => {\n button.focused = false;\n });\n if (this.required) {\n const checked = this.radioButtons.find(x => x.checked);\n this.invalid = !checked;\n }\n }\n /**\n * @hidden\n * @internal\n */\n updateOnKeyUp(event) {\n const checked = this.radioButtons.find(x => x.checked);\n if (event.key === \"Tab\") {\n this.radioButtons.forEach((radio) => {\n if (radio === checked) {\n checked.focused = true;\n }\n });\n }\n }\n ngDoCheck() {\n this._updateTabIndex();\n }\n _updateTabIndex() {\n // Needed so that the keyboard navigation of a radio group\n // placed inside a dialog works properly\n if (this.radioButtons) {\n const checked = this.radioButtons.find(x => x.checked);\n if (checked) {\n this.radioButtons.forEach((button) => {\n checked.nativeElement.tabIndex = 0;\n if (button !== checked) {\n button.nativeElement.tabIndex = -1;\n button.focused = false;\n }\n });\n }\n }\n }\n /**\n * Sets the \"checked\" property value on the radio input element.\n *\n * @remarks\n * Checks whether the provided value is consistent to the current radio button.\n * If it is, the checked attribute will have value `true` and selected property will contain the selected `IgxRadioComponent`.\n *\n * @example\n * ```typescript\n * this.radioGroup.writeValue('radioButtonValue');\n * ```\n */\n writeValue(value) {\n this.value = value;\n }\n /**\n * Registers a function called when the control value changes.\n *\n * @hidden\n * @internal\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * Registers a function called when the control is touched.\n *\n * @hidden\n * @internal\n */\n registerOnTouched(fn) {\n if (this.radioButtons) {\n this.radioButtons.forEach((button) => {\n button.registerOnTouched(fn);\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n constructor(ngControl, _directionality) {\n this.ngControl = ngControl;\n this._directionality = _directionality;\n /**\n * An event that is emitted after the radio group `value` is changed.\n *\n * @remarks\n * Provides references to the selected `IgxRadioComponent` and the `value` property as event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n this.change = new EventEmitter();\n /**\n * The css class applied to the component.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-radio-group';\n /**\n * Sets vertical alignment to the radio group, if `alignment` is set to `vertical`.\n * By default the alignment is horizontal.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.vertical = false;\n /**\n * @hidden\n * @internal\n */\n this._onChangeCallback = noop;\n /**\n * @hidden\n * @internal\n */\n this._name = `igx-radio-group-${nextId$2++}`;\n /**\n * @hidden\n * @internal\n */\n this._value = null;\n /**\n * @hidden\n * @internal\n */\n this._selected = null;\n /**\n * @hidden\n * @internal\n */\n this._isInitialized = false;\n /**\n * @hidden\n * @internal\n */\n this._required = false;\n /**\n * @hidden\n * @internal\n */\n this._invalid = false;\n /**\n * @hidden\n * @internal\n */\n this.destroy$ = new Subject();\n /**\n * @hidden\n * @internal\n */\n this.queryChange$ = new Subject();\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n /**\n * @hidden\n * @internal\n */\n _initRadioButtons() {\n if (this.radioButtons) {\n const props = { name: this._name, required: this._required };\n this.radioButtons.forEach((button) => {\n Object.assign(button, props);\n if (button.value === this._value) {\n button.checked = true;\n this._selected = button;\n }\n button.change.pipe(takeUntil(button.destroy$), takeUntil(this.destroy$), takeUntil(this.queryChange$)).subscribe((ev) => this._selectedRadioButtonChanged(ev));\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n _selectedRadioButtonChanged(args) {\n this.radioButtons.forEach((button) => {\n button.checked = button.id === args.radio.id;\n if (button.checked) {\n this.invalid = false;\n }\n });\n this._selected = args.radio;\n this._value = args.value;\n if (this._isInitialized) {\n this.change.emit(args);\n this._onChangeCallback(this.value);\n }\n }\n /**\n * @hidden\n * @internal\n */\n _setRadioButtonNames() {\n if (this.radioButtons) {\n this.radioButtons.forEach((button) => {\n button.name = this._name;\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n _selectRadioButton() {\n if (this.radioButtons) {\n this.radioButtons.forEach((button) => {\n if (this._value === null) {\n // no value - uncheck all radio buttons\n if (button.checked) {\n button.checked = false;\n }\n }\n else {\n if (this._value === button.value) {\n // selected button\n if (this._selected !== button) {\n this._selected = button;\n }\n if (!button.checked) {\n button.select();\n }\n }\n else {\n // non-selected button\n if (button.checked) {\n button.checked = false;\n }\n }\n }\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n _setRadioButtonsRequired() {\n if (this.radioButtons) {\n this.radioButtons.forEach((button) => {\n button.required = this._required;\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n _setRadioButtonsInvalid() {\n if (this.radioButtons) {\n this.radioButtons.forEach((button) => {\n button.invalid = this._invalid;\n });\n }\n }\n}\nIgxRadioGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioGroupDirective, deps: [{ token: i5.NgControl, optional: true, self: true }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRadioGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRadioGroupDirective, selector: \"igx-radio-group, [igxRadioGroup]\", inputs: { value: \"value\", name: \"name\", required: \"required\", selected: \"selected\", invalid: \"invalid\", alignment: \"alignment\" }, outputs: { change: \"change\" }, host: { listeners: { \"click\": \"handleClick($event)\", \"keydown\": \"handleKeyDown($event)\" }, properties: { \"class.igx-radio-group\": \"this.cssClass\", \"class.igx-radio-group--vertical\": \"this.vertical\" } }, queries: [{ propertyName: \"radioButtons\", predicate: IgxRadioComponent, descendants: true }], exportAs: [\"igxRadioGroup\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioGroupDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'igxRadioGroup',\n selector: 'igx-radio-group, [igxRadioGroup]'\n }]\n }], ctorParameters: function () { return [{ type: i5.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: IgxDirectionality }]; }, propDecorators: { radioButtons: [{\n type: ContentChildren,\n args: [IgxRadioComponent, { descendants: true }]\n }], value: [{\n type: Input\n }], name: [{\n type: Input\n }], required: [{\n type: Input\n }], selected: [{\n type: Input\n }], invalid: [{\n type: Input\n }], change: [{\n type: Output\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-radio-group']\n }], vertical: [{\n type: HostBinding,\n args: ['class.igx-radio-group--vertical']\n }], handleClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], handleKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }], alignment: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxRadioModule {\n}\nIgxRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioModule, declarations: [IgxRadioGroupDirective, IgxRadioComponent], imports: [IgxRippleModule], exports: [IgxRadioGroupDirective, IgxRadioComponent] });\nIgxRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioModule, imports: [IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRadioModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxRadioGroupDirective, IgxRadioComponent],\n exports: [IgxRadioGroupDirective, IgxRadioComponent],\n imports: [IgxRippleModule]\n }]\n }] });\n\nclass IgxTextHighlightDirective {\n /**\n * The underlying value of the element that will be highlighted.\n *\n * ```typescript\n * // get\n * const elementValue = this.textHighlight.value;\n * ```\n *\n * ```html\n * \n * \n * \n * ```\n */\n get value() {\n return this._value;\n }\n set value(value) {\n if (value === undefined || value === null) {\n this._value = '';\n }\n else {\n this._value = value;\n }\n }\n /**\n * @hidden\n */\n get lastSearchInfo() {\n return this._lastSearchInfo;\n }\n constructor(element, renderer) {\n this.element = element;\n this.renderer = renderer;\n /**\n * Identifies the highlight within a unique group.\n * This allows it to have several different highlight groups,\n * with each of them having their own active highlight.\n *\n * ```html\n * \n * \n * ```\n */\n this.groupName = '';\n this.destroy$ = new Subject();\n this._value = '';\n this._div = null;\n this._observer = null;\n this._nodeWasRemoved = false;\n this._forceEvaluation = false;\n this._activeElementIndex = -1;\n this._defaultCssClass = 'igx-highlight';\n this._defaultActiveCssClass = 'igx-highlight--active';\n IgxTextHighlightDirective.onActiveElementChanged.pipe(takeUntil(this.destroy$)).subscribe((groupName) => {\n if (this.groupName === groupName) {\n if (this._activeElementIndex !== -1) {\n this.deactivate();\n }\n this.activateIfNecessary();\n }\n });\n }\n /**\n * Activates the highlight at a given index.\n * (if such index exists)\n */\n static setActiveHighlight(groupName, highlight) {\n IgxTextHighlightDirective.highlightGroupsMap.set(groupName, highlight);\n IgxTextHighlightDirective.onActiveElementChanged.emit(groupName);\n }\n /**\n * Clears any existing highlight.\n */\n static clearActiveHighlight(groupName) {\n IgxTextHighlightDirective.highlightGroupsMap.set(groupName, {\n index: -1\n });\n IgxTextHighlightDirective.onActiveElementChanged.emit(groupName);\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this.clearHighlight();\n if (this._observer !== null) {\n this._observer.disconnect();\n }\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden\n */\n ngOnChanges(changes) {\n if (changes.value && !changes.value.firstChange) {\n this._valueChanged = true;\n }\n else if ((changes.row !== undefined && !changes.row.firstChange) ||\n (changes.column !== undefined && !changes.column.firstChange) ||\n (changes.page !== undefined && !changes.page.firstChange)) {\n if (this._activeElementIndex !== -1) {\n this.deactivate();\n }\n this.activateIfNecessary();\n }\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n this.parentElement = this.renderer.parentNode(this.element.nativeElement);\n if (IgxTextHighlightDirective.highlightGroupsMap.has(this.groupName) === false) {\n IgxTextHighlightDirective.highlightGroupsMap.set(this.groupName, {\n index: -1\n });\n }\n this._lastSearchInfo = {\n searchedText: '',\n content: this.value,\n matchCount: 0,\n caseSensitive: false,\n exactMatch: false\n };\n this._container = this.parentElement.firstElementChild;\n }\n /**\n * @hidden\n */\n ngAfterViewChecked() {\n if (this._valueChanged) {\n this.highlight(this._lastSearchInfo.searchedText, this._lastSearchInfo.caseSensitive, this._lastSearchInfo.exactMatch);\n this.activateIfNecessary();\n this._valueChanged = false;\n }\n }\n /**\n * Clears the existing highlight and highlights the searched text.\n * Returns how many times the element contains the searched text.\n */\n highlight(text, caseSensitive, exactMatch) {\n const caseSensitiveResolved = caseSensitive ? true : false;\n const exactMatchResolved = exactMatch ? true : false;\n if (this.searchNeedsEvaluation(text, caseSensitiveResolved, exactMatchResolved)) {\n this._lastSearchInfo.searchedText = text;\n this._lastSearchInfo.caseSensitive = caseSensitiveResolved;\n this._lastSearchInfo.exactMatch = exactMatchResolved;\n this._lastSearchInfo.content = this.value;\n if (text === '' || text === undefined || text === null) {\n this.clearHighlight();\n }\n else {\n this.clearChildElements(true);\n this._lastSearchInfo.matchCount = this.getHighlightedText(text, caseSensitive, exactMatch);\n }\n }\n else if (this._nodeWasRemoved) {\n this._lastSearchInfo.searchedText = text;\n this._lastSearchInfo.caseSensitive = caseSensitiveResolved;\n this._lastSearchInfo.exactMatch = exactMatchResolved;\n }\n return this._lastSearchInfo.matchCount;\n }\n /**\n * Clears any existing highlight.\n */\n clearHighlight() {\n this.clearChildElements(false);\n this._lastSearchInfo.searchedText = '';\n this._lastSearchInfo.matchCount = 0;\n }\n /**\n * Activates the highlight if it is on the currently active row and column.\n */\n activateIfNecessary() {\n const group = IgxTextHighlightDirective.highlightGroupsMap.get(this.groupName);\n if (group.index >= 0 && group.column === this.column && group.row === this.row && compareMaps(this.metadata, group.metadata)) {\n this.activate(group.index);\n }\n }\n /**\n * Attaches a MutationObserver to the parentElement and watches for when the container element is removed/readded to the DOM.\n * Should be used only when necessary as using many observers may lead to performance degradation.\n */\n observe() {\n if (this._observer === null) {\n const callback = (mutationList) => {\n mutationList.forEach((mutation) => {\n const removedNodes = Array.from(mutation.removedNodes);\n removedNodes.forEach((n) => {\n if (n === this._container) {\n this._nodeWasRemoved = true;\n this.clearChildElements(false);\n }\n });\n const addedNodes = Array.from(mutation.addedNodes);\n addedNodes.forEach((n) => {\n if (n === this.parentElement.firstElementChild && this._nodeWasRemoved) {\n this._container = this.parentElement.firstElementChild;\n this._nodeWasRemoved = false;\n this._forceEvaluation = true;\n this.highlight(this._lastSearchInfo.searchedText, this._lastSearchInfo.caseSensitive, this._lastSearchInfo.exactMatch);\n this._forceEvaluation = false;\n this.activateIfNecessary();\n this._observer.disconnect();\n this._observer = null;\n }\n });\n });\n };\n this._observer = new MutationObserver(callback);\n this._observer.observe(this.parentElement, { childList: true });\n }\n }\n activate(index) {\n this.deactivate();\n if (this._div !== null) {\n const spans = this._div.querySelectorAll('span');\n this._activeElementIndex = index;\n if (spans.length <= index) {\n return;\n }\n const elementToActivate = spans[index];\n this.renderer.addClass(elementToActivate, this._defaultActiveCssClass);\n this.renderer.addClass(elementToActivate, this.activeCssClass);\n }\n }\n deactivate() {\n if (this._activeElementIndex === -1) {\n return;\n }\n const spans = this._div.querySelectorAll('span');\n if (spans.length <= this._activeElementIndex) {\n this._activeElementIndex = -1;\n return;\n }\n const elementToDeactivate = spans[this._activeElementIndex];\n this.renderer.removeClass(elementToDeactivate, this._defaultActiveCssClass);\n this.renderer.removeClass(elementToDeactivate, this.activeCssClass);\n this._activeElementIndex = -1;\n }\n clearChildElements(originalContentHidden) {\n this.renderer.setProperty(this.element.nativeElement, 'hidden', originalContentHidden);\n if (this._div !== null) {\n this.renderer.removeChild(this.parentElement, this._div);\n this._div = null;\n this._activeElementIndex = -1;\n }\n }\n getHighlightedText(searchText, caseSensitive, exactMatch) {\n this.appendDiv();\n const stringValue = String(this.value);\n const contentStringResolved = !caseSensitive ? stringValue.toLowerCase() : stringValue;\n const searchTextResolved = !caseSensitive ? searchText.toLowerCase() : searchText;\n let matchCount = 0;\n if (exactMatch) {\n if (contentStringResolved === searchTextResolved) {\n this.appendSpan(`${stringValue}`);\n matchCount++;\n }\n else {\n this.appendText(stringValue);\n }\n }\n else {\n let foundIndex = contentStringResolved.indexOf(searchTextResolved, 0);\n let previousMatchEnd = 0;\n while (foundIndex !== -1) {\n const start = foundIndex;\n const end = foundIndex + searchTextResolved.length;\n this.appendText(stringValue.substring(previousMatchEnd, start));\n // eslint-disable-next-line max-len\n this.appendSpan(`${stringValue.substring(start, end)}`);\n previousMatchEnd = end;\n matchCount++;\n foundIndex = contentStringResolved.indexOf(searchTextResolved, end);\n }\n this.appendText(stringValue.substring(previousMatchEnd, stringValue.length));\n }\n return matchCount;\n }\n appendText(text) {\n const textElement = this.renderer.createText(text);\n this.renderer.appendChild(this._div, textElement);\n }\n appendSpan(outerHTML) {\n const span = this.renderer.createElement('span');\n this.renderer.appendChild(this._div, span);\n this.renderer.setProperty(span, 'outerHTML', outerHTML);\n }\n appendDiv() {\n this._div = this.renderer.createElement('div');\n if (this.containerClass) {\n this.renderer.addClass(this._div, this.containerClass);\n }\n this.renderer.appendChild(this.parentElement, this._div);\n }\n searchNeedsEvaluation(text, caseSensitive, exactMatch) {\n const searchedText = this._lastSearchInfo.searchedText;\n return !this._nodeWasRemoved &&\n (searchedText === null ||\n searchedText !== text ||\n this._lastSearchInfo.content !== this.value ||\n this._lastSearchInfo.caseSensitive !== caseSensitive ||\n this._lastSearchInfo.exactMatch !== exactMatch ||\n this._forceEvaluation);\n }\n}\nIgxTextHighlightDirective.highlightGroupsMap = new Map();\nIgxTextHighlightDirective.onActiveElementChanged = new EventEmitter();\nIgxTextHighlightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextHighlightDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTextHighlightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTextHighlightDirective, selector: \"[igxTextHighlight]\", inputs: { cssClass: \"cssClass\", activeCssClass: \"activeCssClass\", containerClass: \"containerClass\", groupName: \"groupName\", value: \"value\", row: \"row\", column: \"column\", metadata: \"metadata\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextHighlightDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxTextHighlight]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { cssClass: [{\n type: Input,\n args: ['cssClass']\n }], activeCssClass: [{\n type: Input,\n args: ['activeCssClass']\n }], containerClass: [{\n type: Input,\n args: ['containerClass']\n }], groupName: [{\n type: Input,\n args: ['groupName']\n }], value: [{\n type: Input,\n args: ['value']\n }], row: [{\n type: Input,\n args: ['row']\n }], column: [{\n type: Input,\n args: ['column']\n }], metadata: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxTextHighlightModule {\n}\nIgxTextHighlightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTextHighlightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextHighlightModule, declarations: [IgxTextHighlightDirective], exports: [IgxTextHighlightDirective] });\nIgxTextHighlightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextHighlightModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextHighlightModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxTextHighlightDirective],\n exports: [IgxTextHighlightDirective]\n }]\n }] });\n\nclass IgxTextSelectionDirective {\n /**\n * Returns whether the input element is selectable through the directive.\n *\n * ```typescript\n * // get\n * @ViewChild('firstName',\n * {read: IgxTextSelectionDirective})\n * public firstName: IgxTextSelectionDirective;\n *\n * public getFirstNameSelectionStatus() {\n * return this.firstName.selected;\n * }\n * ```\n */\n get selected() {\n return this.selectionState;\n }\n /**\n * Determines whether the input element could be selected through the directive.\n *\n * ```html\n * \n * \n * \n *\n * \n * \n * ```\n */\n set selected(val) {\n this.selectionState = val;\n }\n /**\n * Returns the nativeElement of the element where the directive was applied.\n *\n * ```html\n * \n * \n * ```\n *\n * ```typescript\n * @ViewChild('firstName',\n * {read: IgxTextSelectionDirective})\n * public inputElement: IgxTextSelectionDirective;\n *\n * public getNativeElement() {\n * return this.inputElement.nativeElement;\n * }\n * ```\n */\n get nativeElement() {\n return this.element.nativeElement;\n }\n constructor(element) {\n this.element = element;\n this.selectionState = true;\n }\n /**\n * @hidden\n */\n onFocus() {\n this.trigger();\n }\n /**\n * Triggers the selection of the element if it is marked as selectable.\n *\n * ```html\n * \n * \n * ```\n *\n * ```typescript\n * @ViewChild('firstName',\n * {read: IgxTextSelectionDirective})\n * public inputElement: IgxTextSelectionDirective;\n *\n * public triggerElementSelection() {\n * this.inputElement.trigger();\n * }\n * ```\n */\n trigger() {\n if (this.selected && this.nativeElement.value.length) {\n // delay the select call to avoid race conditions in case the directive is applied\n // to an element with its own focus handler\n requestAnimationFrame(() => this.nativeElement.select());\n }\n }\n}\nIgxTextSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextSelectionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTextSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTextSelectionDirective, selector: \"[igxTextSelection]\", inputs: { selected: [\"igxTextSelection\", \"selected\"] }, host: { listeners: { \"focus\": \"onFocus()\" } }, exportAs: [\"igxTextSelection\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextSelectionDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'igxTextSelection',\n selector: '[igxTextSelection]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { selected: [{\n type: Input,\n args: ['igxTextSelection']\n }], onFocus: [{\n type: HostListener,\n args: ['focus']\n }] } });\n/**\n * @hidden\n */\nclass IgxTextSelectionModule {\n}\nIgxTextSelectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextSelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTextSelectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextSelectionModule, declarations: [IgxTextSelectionDirective], exports: [IgxTextSelectionDirective] });\nIgxTextSelectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextSelectionModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTextSelectionModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxTextSelectionDirective],\n exports: [IgxTextSelectionDirective]\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxTemplateOutletDirective {\n constructor(_viewContainerRef, _zone, cdr) {\n this._viewContainerRef = _viewContainerRef;\n this._zone = _zone;\n this.cdr = cdr;\n this.viewCreated = new EventEmitter();\n this.viewMoved = new EventEmitter();\n this.cachedViewLoaded = new EventEmitter();\n this.beforeViewDetach = new EventEmitter();\n /**\n * The embedded views cache. Collection is key-value paired.\n * Key is the template type, value is another key-value paired collection\n * where the key is the template id and value is the embedded view for the related template.\n */\n this._embeddedViewsMap = new Map();\n }\n ngOnChanges(changes) {\n const actionType = this._getActionType(changes);\n switch (actionType) {\n case TemplateOutletAction.CreateView:\n this._recreateView();\n break;\n case TemplateOutletAction.MoveView:\n this._moveView();\n break;\n case TemplateOutletAction.UseCachedView:\n this._useCachedView();\n break;\n case TemplateOutletAction.UpdateViewContext:\n this._updateExistingContext(this.igxTemplateOutletContext);\n break;\n }\n }\n cleanCache() {\n this._embeddedViewsMap.forEach((collection) => {\n collection.forEach((item => {\n if (!item.destroyed) {\n item.destroy();\n }\n }));\n collection.clear();\n });\n this._embeddedViewsMap.clear();\n }\n cleanView(tmplID) {\n const embViewCollection = this._embeddedViewsMap.get(tmplID.type);\n const embView = embViewCollection?.get(tmplID.id);\n if (embView) {\n embView.destroy();\n this._embeddedViewsMap.get(tmplID.type).delete(tmplID.id);\n }\n }\n _recreateView() {\n const prevIndex = this._viewRef ? this._viewContainerRef.indexOf(this._viewRef) : -1;\n // detach old and create new\n if (prevIndex !== -1) {\n this.beforeViewDetach.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });\n this._viewContainerRef.detach(prevIndex);\n }\n if (this.igxTemplateOutlet) {\n this._viewRef = this._viewContainerRef.createEmbeddedView(this.igxTemplateOutlet, this.igxTemplateOutletContext);\n this.viewCreated.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });\n const tmplId = this.igxTemplateOutletContext['templateID'];\n if (tmplId) {\n // if context contains a template id, check if we have a view for that template already stored in the cache\n // if not create a copy and add it to the cache in detached state.\n // Note: Views in detached state do not appear in the DOM, however they remain stored in memory.\n const resCollection = this._embeddedViewsMap.get(this.igxTemplateOutletContext['templateID'].type);\n const res = resCollection?.get(this.igxTemplateOutletContext['templateID'].id);\n if (!res) {\n this._embeddedViewsMap.set(this.igxTemplateOutletContext['templateID'].type, new Map([[this.igxTemplateOutletContext['templateID'].id, this._viewRef]]));\n }\n }\n }\n }\n _moveView() {\n // using external view and inserting it in current view.\n const view = this.igxTemplateOutletContext['moveView'];\n const owner = this.igxTemplateOutletContext['owner'];\n if (view !== this._viewRef) {\n if (owner._viewContainerRef.indexOf(view) !== -1) {\n // detach in case view it is attached somewhere else at the moment.\n this.beforeViewDetach.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });\n owner._viewContainerRef.detach(owner._viewContainerRef.indexOf(view));\n }\n if (this._viewRef && this._viewContainerRef.indexOf(this._viewRef) !== -1) {\n this.beforeViewDetach.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this._viewRef));\n }\n this._viewRef = view;\n this._viewContainerRef.insert(view, 0);\n this._updateExistingContext(this.igxTemplateOutletContext);\n this.viewMoved.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });\n }\n else {\n this._updateExistingContext(this.igxTemplateOutletContext);\n }\n }\n _useCachedView() {\n // use view for specific template cached in the current template outlet\n const tmplID = this.igxTemplateOutletContext['templateID'];\n const cachedView = tmplID ?\n this._embeddedViewsMap.get(tmplID.type)?.get(tmplID.id) :\n null;\n // if view exists, but template has been changed and there is a view in the cache with the related template\n // then detach old view and insert the stored one with the matching template\n // after that update its context.\n if (this._viewContainerRef.length > 0) {\n this.beforeViewDetach.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this._viewRef));\n }\n this._viewRef = cachedView;\n const oldContext = this._cloneContext(cachedView.context);\n this._viewContainerRef.insert(this._viewRef, 0);\n this._updateExistingContext(this.igxTemplateOutletContext);\n this.cachedViewLoaded.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext, oldContext });\n }\n _shouldRecreateView(changes) {\n const ctxChange = changes['igxTemplateOutletContext'];\n return !!changes['igxTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n }\n _hasContextShapeChanged(ctxChange) {\n const prevCtxKeys = Object.keys(ctxChange.previousValue || {});\n const currCtxKeys = Object.keys(ctxChange.currentValue || {});\n if (prevCtxKeys.length === currCtxKeys.length) {\n for (const propName of currCtxKeys) {\n if (prevCtxKeys.indexOf(propName) === -1) {\n return true;\n }\n }\n return false;\n }\n else {\n return true;\n }\n }\n _updateExistingContext(ctx) {\n for (const propName of Object.keys(ctx)) {\n this._viewRef.context[propName] = this.igxTemplateOutletContext[propName];\n }\n }\n _cloneContext(ctx) {\n const clone = {};\n for (const propName of Object.keys(ctx)) {\n clone[propName] = ctx[propName];\n }\n return clone;\n }\n _getActionType(changes) {\n const movedView = this.igxTemplateOutletContext['moveView'];\n const tmplID = this.igxTemplateOutletContext['templateID'];\n const cachedView = tmplID ?\n this._embeddedViewsMap.get(tmplID.type)?.get(tmplID.id) :\n null;\n const shouldRecreate = this._shouldRecreateView(changes);\n if (movedView) {\n // view is moved from external source\n return TemplateOutletAction.MoveView;\n }\n else if (shouldRecreate && cachedView) {\n // should recreate (template or context change) and there is a matching template in cache\n return TemplateOutletAction.UseCachedView;\n }\n else if (!this._viewRef || shouldRecreate) {\n // no view or should recreate\n return TemplateOutletAction.CreateView;\n }\n else if (this.igxTemplateOutletContext) {\n // has context, update context\n return TemplateOutletAction.UpdateViewContext;\n }\n }\n}\nIgxTemplateOutletDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTemplateOutletDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTemplateOutletDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTemplateOutletDirective, selector: \"[igxTemplateOutlet]\", inputs: { igxTemplateOutletContext: \"igxTemplateOutletContext\", igxTemplateOutlet: \"igxTemplateOutlet\" }, outputs: { viewCreated: \"viewCreated\", viewMoved: \"viewMoved\", cachedViewLoaded: \"cachedViewLoaded\", beforeViewDetach: \"beforeViewDetach\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTemplateOutletDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxTemplateOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { igxTemplateOutletContext: [{\n type: Input\n }], igxTemplateOutlet: [{\n type: Input\n }], viewCreated: [{\n type: Output\n }], viewMoved: [{\n type: Output\n }], cachedViewLoaded: [{\n type: Output\n }], beforeViewDetach: [{\n type: Output\n }] } });\nvar TemplateOutletAction;\n(function (TemplateOutletAction) {\n TemplateOutletAction[TemplateOutletAction[\"CreateView\"] = 0] = \"CreateView\";\n TemplateOutletAction[TemplateOutletAction[\"MoveView\"] = 1] = \"MoveView\";\n TemplateOutletAction[TemplateOutletAction[\"UseCachedView\"] = 2] = \"UseCachedView\";\n TemplateOutletAction[TemplateOutletAction[\"UpdateViewContext\"] = 3] = \"UpdateViewContext\";\n})(TemplateOutletAction || (TemplateOutletAction = {}));\n/**\n * @hidden\n */\nclass IgxTemplateOutletModule {\n}\nIgxTemplateOutletModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTemplateOutletModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTemplateOutletModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTemplateOutletModule, declarations: [IgxTemplateOutletDirective], imports: [CommonModule], exports: [IgxTemplateOutletDirective] });\nIgxTemplateOutletModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTemplateOutletModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTemplateOutletModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxTemplateOutletDirective],\n exports: [IgxTemplateOutletDirective],\n imports: [CommonModule]\n }]\n }] });\n\nlet NEXT_ID$q = 0;\n/**\n * **Ignite UI for Angular Tooltip** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip)\n *\n * The Ignite UI for Angular Tooltip directive is used to mark an HTML element in the markup as one that should behave as a tooltip.\n * The tooltip is used in combination with the Ignite UI for Angular Tooltip Target by assigning the exported tooltip reference to the\n * respective target's selector property.\n *\n * Example:\n * ```html\n * \n * Hello there, I am a tooltip!\n * ```\n */\nclass IgxTooltipDirective extends IgxToggleDirective {\n /**\n * @hidden\n */\n get hiddenClass() {\n return this.collapsed;\n }\n /**\n * @hidden\n */\n get defaultClass() {\n return !this.collapsed;\n }\n /**\n * Get the role attribute of the tooltip.\n *\n * ```typescript\n * let tooltipRole = this.tooltip.role;\n * ```\n */\n get role() {\n return 'tooltip';\n }\n /** @hidden */\n constructor(elementRef, cdr, overlayService, navigationService) {\n // D.P. constructor duplication due to es6 compilation, might be obsolete in the future\n super(elementRef, cdr, overlayService, navigationService);\n /**\n * Identifier for the tooltip.\n * If this is property is not explicitly set, it will be automatically generated.\n *\n * ```typescript\n * let tooltipId = this.tooltip.id;\n * ```\n */\n this.id = `igx-tooltip-${NEXT_ID$q++}`;\n /**\n * @hidden\n * Returns whether close time out has started\n */\n this.toBeHidden = false;\n /**\n * @hidden\n * Returns whether open time out has started\n */\n this.toBeShown = false;\n }\n /**\n * If there is open animation in progress this method will finish is.\n * If there is no open animation in progress this method will open the toggle with no animation.\n *\n * @param overlaySettings setting to use for opening the toggle\n */\n forceOpen(overlaySettings) {\n const info = this.overlayService.getOverlayById(this._overlayId);\n const hasOpenAnimation = info ? info.openAnimationPlayer : false;\n if (hasOpenAnimation) {\n info.openAnimationPlayer.finish();\n info.openAnimationPlayer.reset();\n info.openAnimationPlayer = null;\n }\n else if (this.collapsed) {\n const animation = overlaySettings.positionStrategy.settings.openAnimation;\n overlaySettings.positionStrategy.settings.openAnimation = null;\n this.open(overlaySettings);\n overlaySettings.positionStrategy.settings.openAnimation = animation;\n }\n }\n /**\n * If there is close animation in progress this method will finish is.\n * If there is no close animation in progress this method will close the toggle with no animation.\n *\n * @param overlaySettings settings to use for closing the toggle\n */\n forceClose(overlaySettings) {\n const info = this.overlayService.getOverlayById(this._overlayId);\n const hasCloseAnimation = info ? info.closeAnimationPlayer : false;\n if (hasCloseAnimation) {\n info.closeAnimationPlayer.finish();\n info.closeAnimationPlayer.reset();\n info.closeAnimationPlayer = null;\n }\n else if (!this.collapsed) {\n const animation = overlaySettings.positionStrategy.settings.closeAnimation;\n overlaySettings.positionStrategy.settings.closeAnimation = null;\n this.close();\n overlaySettings.positionStrategy.settings.closeAnimation = animation;\n }\n }\n}\nIgxTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxOverlayService }, { token: IgxNavigationService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTooltipDirective, selector: \"[igxTooltip]\", inputs: { context: \"context\", id: \"id\" }, host: { properties: { \"class.igx-tooltip--hidden\": \"this.hiddenClass\", \"class.igx-tooltip--desktop\": \"this.defaultClass\", \"attr.id\": \"this.id\", \"attr.role\": \"this.role\" } }, exportAs: [\"tooltip\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'tooltip',\n selector: '[igxTooltip]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { hiddenClass: [{\n type: HostBinding,\n args: ['class.igx-tooltip--hidden']\n }], defaultClass: [{\n type: HostBinding,\n args: ['class.igx-tooltip--desktop']\n }], context: [{\n type: Input,\n args: ['context']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }] } });\n\nclass IgxTooltipComponent {\n}\nIgxTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTooltipComponent, selector: \"igx-tooltip\", viewQueries: [{ propertyName: \"tooltip\", first: true, predicate: IgxTooltipDirective, descendants: true, static: true }], ngImport: i0, template: \"{{content}}\", dependencies: [{ kind: \"directive\", type: IgxTooltipDirective, selector: \"[igxTooltip]\", inputs: [\"context\", \"id\"], exportAs: [\"tooltip\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tooltip', template: \"{{content}}\" }]\n }], propDecorators: { tooltip: [{\n type: ViewChild,\n args: [IgxTooltipDirective, { static: true }]\n }] } });\n\n/**\n * **Ignite UI for Angular Tooltip Target** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip)\n *\n * The Ignite UI for Angular Tooltip Target directive is used to mark an HTML element in the markup as one that has a tooltip.\n * The tooltip target is used in combination with the Ignite UI for Angular Tooltip by assigning the exported tooltip reference to the\n * target's selector property.\n *\n * Example:\n * ```html\n * \n * Hello there, I am a tooltip!\n * ```\n */\nclass IgxTooltipTargetDirective extends IgxToggleActionDirective {\n /**\n * @hidden\n */\n set target(target) {\n if (target !== null && target !== '') {\n this._target = target;\n }\n }\n /**\n * @hidden\n */\n get target() {\n if (typeof this._target === 'string') {\n return this._navigationService.get(this._target);\n }\n return this._target;\n }\n /**\n * @hidden\n */\n set tooltip(content) {\n if (!this.target && (typeof content === 'string' || content instanceof String)) {\n const tooltipComponent = this._viewContainerRef.createComponent(IgxTooltipComponent);\n tooltipComponent.instance.content = content;\n this._target = tooltipComponent.instance.tooltip;\n }\n }\n /**\n * Gets the respective native element of the directive.\n *\n * ```typescript\n * let tooltipTargetElement = this.tooltipTarget.nativeElement;\n * ```\n */\n get nativeElement() {\n return this._element.nativeElement;\n }\n /**\n * Indicates if the tooltip that is is associated with this target is currently hidden.\n *\n * ```typescript\n * let tooltipHiddenValue = this.tooltipTarget.tooltipHidden;\n * ```\n */\n get tooltipHidden() {\n return !this.target || this.target.collapsed;\n }\n constructor(_element, _navigationService, _viewContainerRef) {\n super(_element, _navigationService);\n this._element = _element;\n this._navigationService = _navigationService;\n this._viewContainerRef = _viewContainerRef;\n /**\n * Gets/sets the amount of milliseconds that should pass before showing the tooltip.\n *\n * ```typescript\n * // get\n * let tooltipShowDelay = this.tooltipTarget.showDelay;\n * ```\n *\n * ```html\n * \n * \n * Hello there, I am a tooltip!\n * ```\n */\n this.showDelay = 500;\n /**\n * Gets/sets the amount of milliseconds that should pass before hiding the tooltip.\n *\n * ```typescript\n * // get\n * let tooltipHideDelay = this.tooltipTarget.hideDelay;\n * ```\n *\n * ```html\n * \n * \n * Hello there, I am a tooltip!\n * ```\n */\n this.hideDelay = 500;\n /**\n * Specifies if the tooltip should not show when hovering its target with the mouse. (defaults to false)\n * While setting this property to 'true' will disable the user interactions that shows/hides the tooltip,\n * the developer will still be able to show/hide the tooltip through the API.\n *\n * ```typescript\n * // get\n * let tooltipDisabledValue = this.tooltipTarget.tooltipDisabled;\n * ```\n *\n * ```html\n * \n * \n * Hello there, I am a tooltip!\n * ```\n */\n this.tooltipDisabled = false;\n /**\n * Emits an event when the tooltip that is associated with this target starts showing.\n * This event is fired before the start of the countdown to showing the tooltip.\n *\n * ```typescript\n * tooltipShowing(args: ITooltipShowEventArgs) {\n * alert(\"Tooltip started showing!\");\n * }\n * ```\n *\n * ```html\n * \n * Hello there, I am a tooltip!\n * ```\n */\n this.tooltipShow = new EventEmitter();\n /**\n * Emits an event when the tooltip that is associated with this target starts hiding.\n * This event is fired before the start of the countdown to hiding the tooltip.\n *\n * ```typescript\n * tooltipHiding(args: ITooltipHideEventArgs) {\n * alert(\"Tooltip started hiding!\");\n * }\n * ```\n *\n * ```html\n * \n * Hello there, I am a tooltip!\n * ```\n */\n this.tooltipHide = new EventEmitter();\n this.destroy$ = new Subject();\n }\n /**\n * @hidden\n */\n onClick() {\n if (!this.target.collapsed) {\n this.target.forceClose(this.mergedOverlaySettings);\n }\n }\n /**\n * @hidden\n */\n onMouseEnter() {\n if (this.tooltipDisabled) {\n return;\n }\n this.checkOutletAndOutsideClick();\n const shouldReturn = this.preMouseEnterCheck();\n if (shouldReturn) {\n return;\n }\n const showingArgs = { target: this, tooltip: this.target, cancel: false };\n this.tooltipShow.emit(showingArgs);\n if (showingArgs.cancel) {\n return;\n }\n this.target.toBeShown = true;\n this.target.timeoutId = setTimeout(() => {\n this.target.open(this.mergedOverlaySettings); // Call open() of IgxTooltipDirective\n this.target.toBeShown = false;\n }, this.showDelay);\n }\n /**\n * @hidden\n */\n onMouseLeave() {\n if (this.tooltipDisabled) {\n return;\n }\n this.checkOutletAndOutsideClick();\n const shouldReturn = this.preMouseLeaveCheck();\n if (shouldReturn || this.target.collapsed) {\n return;\n }\n this.target.toBeHidden = true;\n this.target.timeoutId = setTimeout(() => {\n this.target.close(); // Call close() of IgxTooltipDirective\n this.target.toBeHidden = false;\n }, this.hideDelay);\n }\n /**\n * @hidden\n */\n onTouchStart() {\n if (this.tooltipDisabled) {\n return;\n }\n this.showTooltip();\n }\n /**\n * @hidden\n */\n onDocumentTouchStart(event) {\n if (this.tooltipDisabled) {\n return;\n }\n if (this.nativeElement !== event.target &&\n !this.nativeElement.contains(event.target)) {\n this.hideTooltip();\n }\n }\n /**\n * @hidden\n */\n ngOnInit() {\n super.ngOnInit();\n const positionSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n horizontalStartPoint: HorizontalAlignment.Center,\n openAnimation: useAnimation(scaleInCenter, { params: { duration: '150ms' } }),\n closeAnimation: useAnimation(fadeOut, { params: { duration: '75ms' } })\n };\n this._overlayDefaults.positionStrategy = new AutoPositionStrategy(positionSettings);\n this._overlayDefaults.closeOnOutsideClick = false;\n this._overlayDefaults.closeOnEscape = true;\n this.target.closing.pipe(takeUntil(this.destroy$)).subscribe((event) => {\n const hidingArgs = { target: this, tooltip: this.target, cancel: false };\n this.tooltipHide.emit(hidingArgs);\n if (hidingArgs.cancel) {\n event.cancel = true;\n }\n });\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n /**\n * Shows the tooltip by respecting the 'showDelay' property.\n *\n * ```typescript\n * this.tooltipTarget.showTooltip();\n * ```\n */\n showTooltip() {\n clearTimeout(this.target.timeoutId);\n if (!this.target.collapsed) {\n // if close animation has started finish it, or close the tooltip with no animation\n this.target.forceClose(this.mergedOverlaySettings);\n this.target.toBeHidden = false;\n }\n const showingArgs = { target: this, tooltip: this.target, cancel: false };\n this.tooltipShow.emit(showingArgs);\n if (showingArgs.cancel) {\n return;\n }\n this.target.toBeShown = true;\n this.target.timeoutId = setTimeout(() => {\n this.target.open(this.mergedOverlaySettings); // Call open() of IgxTooltipDirective\n this.target.toBeShown = false;\n }, this.showDelay);\n }\n /**\n * Hides the tooltip by respecting the 'hideDelay' property.\n *\n * ```typescript\n * this.tooltipTarget.hideTooltip();\n * ```\n */\n hideTooltip() {\n if (this.target.collapsed && this.target.toBeShown) {\n clearTimeout(this.target.timeoutId);\n }\n if (this.target.collapsed || this.target.toBeHidden) {\n return;\n }\n this.target.toBeHidden = true;\n this.target.timeoutId = setTimeout(() => {\n this.target.close(); // Call close() of IgxTooltipDirective\n this.target.toBeHidden = false;\n }, this.hideDelay);\n }\n checkOutletAndOutsideClick() {\n if (this.outlet) {\n this._overlayDefaults.outlet = this.outlet;\n }\n }\n get mergedOverlaySettings() {\n return Object.assign({}, this._overlayDefaults, this.overlaySettings);\n }\n // Return true if the execution in onMouseEnter should be terminated after this method\n preMouseEnterCheck() {\n // If tooltip is about to be opened\n if (this.target.toBeShown) {\n clearTimeout(this.target.timeoutId);\n this.target.toBeShown = false;\n }\n // If Tooltip is opened or about to be hidden\n if (!this.target.collapsed || this.target.toBeHidden) {\n clearTimeout(this.target.timeoutId);\n // if close animation has started finish it, or close the tooltip with no animation\n this.target.forceClose(this.mergedOverlaySettings);\n this.target.toBeHidden = false;\n }\n return false;\n }\n // Return true if the execution in onMouseLeave should be terminated after this method\n preMouseLeaveCheck() {\n clearTimeout(this.target.timeoutId);\n // If tooltip is about to be opened\n if (this.target.toBeShown) {\n this.target.toBeShown = false;\n this.target.toBeHidden = false;\n return true;\n }\n return false;\n }\n}\nIgxTooltipTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipTargetDirective, deps: [{ token: i0.ElementRef }, { token: IgxNavigationService, optional: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTooltipTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTooltipTargetDirective, selector: \"[igxTooltipTarget]\", inputs: { showDelay: \"showDelay\", hideDelay: \"hideDelay\", tooltipDisabled: \"tooltipDisabled\", target: [\"igxTooltipTarget\", \"target\"], tooltip: \"tooltip\" }, outputs: { tooltipShow: \"tooltipShow\", tooltipHide: \"tooltipHide\" }, host: { listeners: { \"click\": \"onClick()\", \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\", \"touchstart\": \"onTouchStart()\", \"document:touchstart\": \"onDocumentTouchStart($event)\" } }, exportAs: [\"tooltipTarget\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipTargetDirective, decorators: [{\n type: Directive,\n args: [{\n exportAs: 'tooltipTarget',\n selector: '[igxTooltipTarget]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }, { type: i0.ViewContainerRef }]; }, propDecorators: { showDelay: [{\n type: Input,\n args: ['showDelay']\n }], hideDelay: [{\n type: Input,\n args: ['hideDelay']\n }], tooltipDisabled: [{\n type: Input,\n args: ['tooltipDisabled']\n }], target: [{\n type: Input,\n args: ['igxTooltipTarget']\n }], tooltip: [{\n type: Input\n }], tooltipShow: [{\n type: Output\n }], tooltipHide: [{\n type: Output\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }], onTouchStart: [{\n type: HostListener,\n args: ['touchstart']\n }], onDocumentTouchStart: [{\n type: HostListener,\n args: ['document:touchstart', ['$event']]\n }] } });\n\n/**\n * @hidden\n */\nclass IgxTooltipModule {\n}\nIgxTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipModule, declarations: [IgxTooltipDirective, IgxTooltipTargetDirective, IgxTooltipComponent], imports: [CommonModule], exports: [IgxTooltipDirective, IgxTooltipTargetDirective] });\nIgxTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipModule, providers: [IgxOverlayService], imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTooltipModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxTooltipDirective, IgxTooltipTargetDirective, IgxTooltipComponent],\n exports: [IgxTooltipDirective, IgxTooltipTargetDirective],\n imports: [CommonModule],\n providers: [IgxOverlayService]\n }]\n }] });\n\n/**\n * Specify a particular date, time or AmPm part.\n */\nvar DatePart;\n(function (DatePart) {\n DatePart[\"Date\"] = \"date\";\n DatePart[\"Month\"] = \"month\";\n DatePart[\"Year\"] = \"year\";\n DatePart[\"Hours\"] = \"hours\";\n DatePart[\"Minutes\"] = \"minutes\";\n DatePart[\"Seconds\"] = \"seconds\";\n DatePart[\"AmPm\"] = \"ampm\";\n DatePart[\"Literal\"] = \"literal\";\n})(DatePart || (DatePart = {}));\n\nconst DATE_CHARS = ['h', 'H', 'm', 's', 'S', 't', 'T'];\nconst TIME_CHARS = ['d', 'D', 'M', 'y', 'Y'];\n/** @hidden */\nclass DateTimeUtil {\n /**\n * Parse a Date value from masked string input based on determined date parts\n *\n * @param inputData masked value to parse\n * @param dateTimeParts Date parts array for the mask\n */\n static parseValueFromMask(inputData, dateTimeParts, promptChar) {\n const parts = {};\n dateTimeParts.forEach(dp => {\n let value = parseInt(DateTimeUtil.getCleanVal(inputData, dp, promptChar), 10);\n if (!value) {\n value = dp.type === DatePart.Date || dp.type === DatePart.Month ? 1 : 0;\n }\n parts[dp.type] = value;\n });\n parts[DatePart.Month] -= 1;\n if (parts[DatePart.Month] < 0 || 11 < parts[DatePart.Month]) {\n return null;\n }\n // TODO: Century threshold\n if (parts[DatePart.Year] < 50) {\n parts[DatePart.Year] += 2000;\n }\n if (parts[DatePart.Date] > DateTimeUtil.daysInMonth(parts[DatePart.Year], parts[DatePart.Month])) {\n return null;\n }\n if (parts[DatePart.Hours] > 23 || parts[DatePart.Minutes] > 59 || parts[DatePart.Seconds] > 59) {\n return null;\n }\n const amPm = dateTimeParts.find(p => p.type === DatePart.AmPm);\n if (amPm) {\n parts[DatePart.Hours] %= 12;\n }\n if (amPm && DateTimeUtil.getCleanVal(inputData, amPm, promptChar).toLowerCase() === 'pm') {\n parts[DatePart.Hours] += 12;\n }\n return new Date(parts[DatePart.Year] || 2000, parts[DatePart.Month] || 0, parts[DatePart.Date] || 1, parts[DatePart.Hours] || 0, parts[DatePart.Minutes] || 0, parts[DatePart.Seconds] || 0);\n }\n /** Parse the mask into date/time and literal parts */\n static parseDateTimeFormat(mask, locale) {\n const format = mask || DateTimeUtil.getDefaultInputFormat(locale);\n const dateTimeParts = [];\n const formatArray = Array.from(format);\n let currentPart = null;\n let position = 0;\n for (let i = 0; i < formatArray.length; i++, position++) {\n const type = DateTimeUtil.determineDatePart(formatArray[i]);\n if (currentPart) {\n if (currentPart.type === type) {\n currentPart.format += formatArray[i];\n if (i < formatArray.length - 1) {\n continue;\n }\n }\n DateTimeUtil.addCurrentPart(currentPart, dateTimeParts);\n position = currentPart.end;\n }\n currentPart = {\n start: position,\n end: position + formatArray[i].length,\n type,\n format: formatArray[i]\n };\n }\n // make sure the last member of a format like H:m:s is not omitted\n if (!dateTimeParts.filter(p => p.format.includes(currentPart.format)).length) {\n DateTimeUtil.addCurrentPart(currentPart, dateTimeParts);\n }\n // formats like \"y\" or \"yyy\" are treated like \"yyyy\" while editing\n const yearPart = dateTimeParts.filter(p => p.type === DatePart.Year)[0];\n if (yearPart && yearPart.format !== 'yy') {\n yearPart.end += 4 - yearPart.format.length;\n yearPart.format = 'yyyy';\n }\n return dateTimeParts;\n }\n static getPartValue(value, datePartInfo, partLength) {\n let maskedValue;\n const datePart = datePartInfo.type;\n switch (datePart) {\n case DatePart.Date:\n maskedValue = value.getDate();\n break;\n case DatePart.Month:\n // months are zero based\n maskedValue = value.getMonth() + 1;\n break;\n case DatePart.Year:\n if (partLength === 2) {\n maskedValue = this.prependValue(parseInt(value.getFullYear().toString().slice(-2), 10), partLength, '0');\n }\n else {\n maskedValue = value.getFullYear();\n }\n break;\n case DatePart.Hours:\n if (datePartInfo.format.indexOf('h') !== -1) {\n maskedValue = this.prependValue(this.toTwelveHourFormat(value.getHours().toString()), partLength, '0');\n }\n else {\n maskedValue = value.getHours();\n }\n break;\n case DatePart.Minutes:\n maskedValue = value.getMinutes();\n break;\n case DatePart.Seconds:\n maskedValue = value.getSeconds();\n break;\n case DatePart.AmPm:\n maskedValue = value.getHours() >= 12 ? 'PM' : 'AM';\n break;\n }\n if (datePartInfo.type !== DatePart.AmPm) {\n return this.prependValue(maskedValue, partLength, '0');\n }\n return maskedValue;\n }\n /** Builds a date-time editor's default input format based on provided locale settings. */\n static getDefaultInputFormat(locale) {\n locale = locale || DateTimeUtil.DEFAULT_LOCALE;\n if (!Intl || !Intl.DateTimeFormat || !Intl.DateTimeFormat.prototype.formatToParts) {\n // TODO: fallback with Intl.format for IE?\n return DateTimeUtil.DEFAULT_INPUT_FORMAT;\n }\n const parts = DateTimeUtil.getDefaultLocaleMask(locale);\n parts.forEach(p => {\n if (p.type !== DatePart.Year && p.type !== DateTimeUtil.SEPARATOR) {\n p.formatType = \"2-digit\" /* FormatDesc.TwoDigits */;\n }\n });\n return DateTimeUtil.getMask(parts);\n }\n /** Tries to format a date using Angular's DatePipe. Fallbacks to `Intl` if no locale settings have been loaded. */\n static formatDate(value, format, locale, timezone) {\n let formattedDate;\n try {\n formattedDate = formatDate$1(value, format, locale, timezone);\n }\n catch {\n DateTimeUtil.logMissingLocaleSettings(locale);\n const formatter = new Intl.DateTimeFormat(locale);\n formattedDate = formatter.format(value);\n }\n return formattedDate;\n }\n /**\n * Returns the date format based on a provided locale.\n * Supports Angular's DatePipe format options such as `shortDate`, `longDate`.\n */\n static getLocaleDateFormat(locale, displayFormat) {\n const formatKeys = Object.keys(FormatWidth);\n const targetKey = formatKeys.find(k => k.toLowerCase() === displayFormat?.toLowerCase().replace('date', ''));\n if (!targetKey) {\n // if displayFormat is not shortDate, longDate, etc.\n // or if it is not set by the user\n return displayFormat;\n }\n let format;\n try {\n format = getLocaleDateFormat(locale, FormatWidth[targetKey]);\n }\n catch {\n DateTimeUtil.logMissingLocaleSettings(locale);\n format = DateTimeUtil.getDefaultInputFormat(locale);\n }\n return format;\n }\n /** Determines if a given character is `d/M/y` or `h/m/s`. */\n static isDateOrTimeChar(char) {\n return DATE_CHARS.indexOf(char) !== -1 || TIME_CHARS.indexOf(char) !== -1;\n }\n /** Spins the date portion in a date-time editor. */\n static spinDate(delta, newDate, spinLoop) {\n const maxDate = DateTimeUtil.daysInMonth(newDate.getFullYear(), newDate.getMonth());\n let date = newDate.getDate() + delta;\n if (date > maxDate) {\n date = spinLoop ? date % maxDate : maxDate;\n }\n else if (date < 1) {\n date = spinLoop ? maxDate + (date % maxDate) : 1;\n }\n newDate.setDate(date);\n }\n /** Spins the month portion in a date-time editor. */\n static spinMonth(delta, newDate, spinLoop) {\n const maxDate = DateTimeUtil.daysInMonth(newDate.getFullYear(), newDate.getMonth() + delta);\n if (newDate.getDate() > maxDate) {\n newDate.setDate(maxDate);\n }\n const maxMonth = 11;\n const minMonth = 0;\n let month = newDate.getMonth() + delta;\n if (month > maxMonth) {\n month = spinLoop ? (month % maxMonth) - 1 : maxMonth;\n }\n else if (month < minMonth) {\n month = spinLoop ? maxMonth + (month % maxMonth) + 1 : minMonth;\n }\n newDate.setMonth(month);\n }\n /** Spins the year portion in a date-time editor. */\n static spinYear(delta, newDate) {\n const maxDate = DateTimeUtil.daysInMonth(newDate.getFullYear() + delta, newDate.getMonth());\n if (newDate.getDate() > maxDate) {\n // clip to max to avoid leap year change shifting the entire value\n newDate.setDate(maxDate);\n }\n newDate.setFullYear(newDate.getFullYear() + delta);\n }\n /** Spins the hours portion in a date-time editor. */\n static spinHours(delta, newDate, spinLoop) {\n const maxHour = 23;\n const minHour = 0;\n let hours = newDate.getHours() + delta;\n if (hours > maxHour) {\n hours = spinLoop ? hours % maxHour - 1 : maxHour;\n }\n else if (hours < minHour) {\n hours = spinLoop ? maxHour + (hours % maxHour) + 1 : minHour;\n }\n newDate.setHours(hours);\n }\n /** Spins the minutes portion in a date-time editor. */\n static spinMinutes(delta, newDate, spinLoop) {\n const maxMinutes = 59;\n const minMinutes = 0;\n let minutes = newDate.getMinutes() + delta;\n if (minutes > maxMinutes) {\n minutes = spinLoop ? minutes % maxMinutes - 1 : maxMinutes;\n }\n else if (minutes < minMinutes) {\n minutes = spinLoop ? maxMinutes + (minutes % maxMinutes) + 1 : minMinutes;\n }\n newDate.setMinutes(minutes);\n }\n /** Spins the seconds portion in a date-time editor. */\n static spinSeconds(delta, newDate, spinLoop) {\n const maxSeconds = 59;\n const minSeconds = 0;\n let seconds = newDate.getSeconds() + delta;\n if (seconds > maxSeconds) {\n seconds = spinLoop ? seconds % maxSeconds - 1 : maxSeconds;\n }\n else if (seconds < minSeconds) {\n seconds = spinLoop ? maxSeconds + (seconds % maxSeconds) + 1 : minSeconds;\n }\n newDate.setSeconds(seconds);\n }\n /** Spins the AM/PM portion in a date-time editor. */\n static spinAmPm(newDate, currentDate, amPmFromMask) {\n switch (amPmFromMask) {\n case 'AM':\n newDate = new Date(newDate.setHours(newDate.getHours() + 12));\n break;\n case 'PM':\n newDate = new Date(newDate.setHours(newDate.getHours() - 12));\n break;\n }\n if (newDate.getDate() !== currentDate.getDate()) {\n return currentDate;\n }\n return newDate;\n }\n /**\n * Determines whether the provided value is greater than the provided max value.\n *\n * @param includeTime set to false if you want to exclude time portion of the two dates\n * @param includeDate set to false if you want to exclude the date portion of the two dates\n * @returns true if provided value is greater than provided maxValue\n */\n static greaterThanMaxValue(value, maxValue, includeTime = true, includeDate = true) {\n if (includeTime && includeDate) {\n return value.getTime() > maxValue.getTime();\n }\n const _value = new Date(value.getTime());\n const _maxValue = new Date(maxValue.getTime());\n if (!includeTime) {\n _value.setHours(0, 0, 0, 0);\n _maxValue.setHours(0, 0, 0, 0);\n }\n if (!includeDate) {\n _value.setFullYear(0, 0, 0);\n _maxValue.setFullYear(0, 0, 0);\n }\n return _value.getTime() > _maxValue.getTime();\n }\n /**\n * Determines whether the provided value is less than the provided min value.\n *\n * @param includeTime set to false if you want to exclude time portion of the two dates\n * @param includeDate set to false if you want to exclude the date portion of the two dates\n * @returns true if provided value is less than provided minValue\n */\n static lessThanMinValue(value, minValue, includeTime = true, includeDate = true) {\n if (includeTime && includeDate) {\n return value.getTime() < minValue.getTime();\n }\n const _value = new Date(value.getTime());\n const _minValue = new Date(minValue.getTime());\n if (!includeTime) {\n _value.setHours(0, 0, 0, 0);\n _minValue.setHours(0, 0, 0, 0);\n }\n if (!includeDate) {\n _value.setFullYear(0, 0, 0);\n _minValue.setFullYear(0, 0, 0);\n }\n return _value.getTime() < _minValue.getTime();\n }\n /**\n * Validates a value within a given min and max value range.\n *\n * @param value The value to validate\n * @param minValue The lowest possible value that `value` can take\n * @param maxValue The largest possible value that `value` can take\n */\n static validateMinMax(value, minValue, maxValue, includeTime = true, includeDate = true) {\n if (!value) {\n return null;\n }\n const errors = {};\n const min = DateTimeUtil.isValidDate(minValue) ? minValue : DateTimeUtil.parseIsoDate(minValue);\n const max = DateTimeUtil.isValidDate(maxValue) ? maxValue : DateTimeUtil.parseIsoDate(maxValue);\n if (min && value && DateTimeUtil.lessThanMinValue(value, min, includeTime, includeDate)) {\n Object.assign(errors, { minValue: true });\n }\n if (max && value && DateTimeUtil.greaterThanMaxValue(value, max, includeTime, includeDate)) {\n Object.assign(errors, { maxValue: true });\n }\n return errors;\n }\n /** Parse an ISO string to a Date */\n static parseIsoDate(value) {\n let regex = /^\\d{4}/g;\n const timeLiteral = 'T';\n if (regex.test(value)) {\n return new Date(value + `${value.indexOf(timeLiteral) === -1 ? 'T00:00:00' : ''}`);\n }\n regex = /^\\d{2}/g;\n if (regex.test(value)) {\n const dateNow = new Date().toISOString();\n // eslint-disable-next-line prefer-const\n let [datePart, _timePart] = dateNow.split(timeLiteral);\n return new Date(`${datePart}T${value}`);\n }\n return null;\n }\n /**\n * Returns whether the input is valid date\n *\n * @param value input to check\n * @returns true if provided input is a valid date\n */\n static isValidDate(value) {\n if (isDate(value)) {\n return !isNaN(value.getTime());\n }\n return false;\n }\n static addCurrentPart(currentPart, dateTimeParts) {\n DateTimeUtil.ensureLeadingZero(currentPart);\n currentPart.end = currentPart.start + currentPart.format.length;\n dateTimeParts.push(currentPart);\n }\n static daysInMonth(fullYear, month) {\n return new Date(fullYear, month + 1, 0).getDate();\n }\n static trimEmptyPlaceholders(value, promptChar) {\n const result = value.replace(new RegExp(promptChar || '_', 'g'), '');\n return result;\n }\n static getMask(dateStruct) {\n const mask = [];\n for (const part of dateStruct) {\n switch (part.formatType) {\n case \"numeric\" /* FormatDesc.Numeric */: {\n if (part.type === \"day\" /* DateParts.Day */) {\n mask.push('d');\n }\n else if (part.type === \"month\" /* DateParts.Month */) {\n mask.push('M');\n }\n else {\n mask.push('yyyy');\n }\n break;\n }\n case \"2-digit\" /* FormatDesc.TwoDigits */: {\n if (part.type === \"day\" /* DateParts.Day */) {\n mask.push('dd');\n }\n else if (part.type === \"month\" /* DateParts.Month */) {\n mask.push('MM');\n }\n else {\n mask.push('yy');\n }\n }\n }\n if (part.type === DateTimeUtil.SEPARATOR) {\n mask.push(part.value);\n }\n }\n return mask.join('');\n }\n static logMissingLocaleSettings(locale) {\n console.warn(`Missing locale data for the locale ${locale}. Please refer to https://angular.io/guide/i18n#i18n-pipes`);\n console.warn('Using default browser locale settings.');\n }\n static prependValue(value, partLength, prependChar) {\n return (prependChar + value.toString()).slice(-partLength);\n }\n static toTwelveHourFormat(value, promptChar = '_') {\n let hour = parseInt(value.replace(new RegExp(promptChar, 'g'), '0'), 10);\n if (hour > 12) {\n hour -= 12;\n }\n else if (hour === 0) {\n hour = 12;\n }\n return hour;\n }\n static ensureLeadingZero(part) {\n switch (part.type) {\n case DatePart.Date:\n case DatePart.Month:\n case DatePart.Hours:\n case DatePart.Minutes:\n case DatePart.Seconds:\n if (part.format.length === 1) {\n part.format = part.format.repeat(2);\n }\n break;\n }\n }\n static getCleanVal(inputData, datePart, promptChar) {\n return DateTimeUtil.trimEmptyPlaceholders(inputData.substring(datePart.start, datePart.end), promptChar);\n }\n static determineDatePart(char) {\n switch (char) {\n case 'd':\n case 'D':\n return DatePart.Date;\n case 'M':\n return DatePart.Month;\n case 'y':\n case 'Y':\n return DatePart.Year;\n case 'h':\n case 'H':\n return DatePart.Hours;\n case 'm':\n return DatePart.Minutes;\n case 's':\n case 'S':\n return DatePart.Seconds;\n case 't':\n case 'T':\n return DatePart.AmPm;\n default:\n return DatePart.Literal;\n }\n }\n static getDefaultLocaleMask(locale) {\n const dateStruct = [];\n const formatter = new Intl.DateTimeFormat(locale);\n const formatToParts = formatter.formatToParts(new Date());\n for (const part of formatToParts) {\n if (part.type === DateTimeUtil.SEPARATOR) {\n dateStruct.push({\n type: DateTimeUtil.SEPARATOR,\n value: part.value\n });\n }\n else {\n dateStruct.push({\n type: part.type\n });\n }\n }\n const formatterOptions = formatter.resolvedOptions();\n for (const part of dateStruct) {\n switch (part.type) {\n case \"day\" /* DateParts.Day */: {\n part.formatType = formatterOptions.day;\n break;\n }\n case \"month\" /* DateParts.Month */: {\n part.formatType = formatterOptions.month;\n break;\n }\n case \"year\" /* DateParts.Year */: {\n part.formatType = formatterOptions.year;\n break;\n }\n }\n }\n DateTimeUtil.fillDatePartsPositions(dateStruct);\n return dateStruct;\n }\n static fillDatePartsPositions(dateArray) {\n let currentPos = 0;\n for (const part of dateArray) {\n // Day|Month part positions\n if (part.type === \"day\" /* DateParts.Day */ || part.type === \"month\" /* DateParts.Month */) {\n // Offset 2 positions for number\n part.position = [currentPos, currentPos + 2];\n currentPos += 2;\n }\n else if (part.type === \"year\" /* DateParts.Year */) {\n // Year part positions\n switch (part.formatType) {\n case \"numeric\" /* FormatDesc.Numeric */: {\n // Offset 4 positions for full year\n part.position = [currentPos, currentPos + 4];\n currentPos += 4;\n break;\n }\n case \"2-digit\" /* FormatDesc.TwoDigits */: {\n // Offset 2 positions for short year\n part.position = [currentPos, currentPos + 2];\n currentPos += 2;\n break;\n }\n }\n }\n else if (part.type === DateTimeUtil.SEPARATOR) {\n // Separator positions\n part.position = [currentPos, currentPos + 1];\n currentPos++;\n }\n }\n }\n}\nDateTimeUtil.DEFAULT_INPUT_FORMAT = 'MM/dd/yyyy';\nDateTimeUtil.DEFAULT_TIME_INPUT_FORMAT = 'hh:mm tt';\nDateTimeUtil.SEPARATOR = 'literal';\nDateTimeUtil.DEFAULT_LOCALE = 'en';\n\n/* eslint-disable @angular-eslint/no-conflicting-lifecycle */\n/**\n * Date Time Editor provides a functionality to input, edit and format date and time.\n *\n * @igxModule IgxDateTimeEditorModule\n *\n * @igxParent IgxInputGroup\n *\n * @igxTheme igx-input-theme\n *\n * @igxKeywords date, time, editor\n *\n * @igxGroup Scheduling\n *\n * @remarks\n *\n * The Ignite UI Date Time Editor Directive makes it easy for developers to manipulate date/time user input.\n * It requires input in a specified or default input format which is visible in the input element as a placeholder.\n * It allows the input of only date (ex: 'dd/MM/yyyy'), only time (ex:'HH:mm tt') or both at once, if needed.\n * Supports display format that may differ from the input format.\n * Provides methods to increment and decrement any specific/targeted `DatePart`.\n *\n * @example\n * ```html\n * \n * \n * \n * ```\n */\nclass IgxDateTimeEditorDirective extends IgxMaskDirective {\n /**\n * Minimum value required for the editor to remain valid.\n *\n * @remarks\n * If a `string` value is passed, it must be in the defined input format.\n *\n * @example\n * ```html\n * \n * ```\n */\n get minValue() {\n return this._minValue;\n }\n set minValue(value) {\n this._minValue = value;\n this.onValidatorChange();\n }\n /**\n * Maximum value required for the editor to remain valid.\n *\n * @remarks\n * If a `string` value is passed in, it must be in the defined input format.\n *\n * @example\n * ```html\n * \n * ```\n */\n get maxValue() {\n return this._maxValue;\n }\n set maxValue(value) {\n this._maxValue = value;\n this.onValidatorChange();\n }\n /**\n * Expected user input format (and placeholder).\n *\n * @example\n * ```html\n * \n * ```\n */\n set inputFormat(value) {\n if (value) {\n this.setMask(value);\n this._inputFormat = value;\n }\n }\n get inputFormat() {\n return this._inputFormat || this._defaultInputFormat;\n }\n /**\n * Editor value.\n *\n * @example\n * ```html\n * \n * ```\n */\n set value(value) {\n this._value = value;\n this.setDateValue(value);\n this.onChangeCallback(value);\n this.updateMask();\n }\n get value() {\n return this._value;\n }\n get datePartDeltas() {\n return Object.assign({}, this._datePartDeltas, this.spinDelta);\n }\n get emptyMask() {\n return this.maskParser.applyMask(null, this.maskOptions);\n }\n get targetDatePart() {\n // V.K. May 16th, 2022 #11554 Get correct date part in shadow DOM\n if (this.document.activeElement === this.nativeElement ||\n this.document.activeElement?.shadowRoot?.activeElement === this.nativeElement) {\n return this._inputDateParts\n .find(p => p.start <= this.selectionStart && this.selectionStart <= p.end && p.type !== DatePart.Literal)?.type;\n }\n else {\n if (this._inputDateParts.some(p => p.type === DatePart.Date)) {\n return DatePart.Date;\n }\n else if (this._inputDateParts.some(p => p.type === DatePart.Hours)) {\n return DatePart.Hours;\n }\n }\n }\n get hasDateParts() {\n return this._inputDateParts.some(p => p.type === DatePart.Date\n || p.type === DatePart.Month\n || p.type === DatePart.Year);\n }\n get hasTimeParts() {\n return this._inputDateParts.some(p => p.type === DatePart.Hours\n || p.type === DatePart.Minutes\n || p.type === DatePart.Seconds);\n }\n get dateValue() {\n return this._dateValue;\n }\n constructor(renderer, elementRef, maskParser, platform, _document, _locale) {\n super(elementRef, maskParser, renderer, platform);\n this._document = _document;\n this._locale = _locale;\n /**\n * Specify if the currently spun date segment should loop over.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.spinLoop = true;\n /**\n * Emitted when the editor's value has changed.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.valueChange = new EventEmitter();\n /**\n * Emitted when the editor is not within a specified range or when the editor's value is in an invalid state.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.validationFailed = new EventEmitter();\n this._datePartDeltas = {\n date: 1,\n month: 1,\n year: 1,\n hours: 1,\n minutes: 1,\n seconds: 1\n };\n this.onTouchCallback = noop;\n this.onChangeCallback = noop;\n this.onValidatorChange = noop;\n this.document = this._document;\n this.locale = this.locale || this._locale;\n }\n onWheel(event) {\n if (!this._isFocused) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n if (event.deltaY > 0) {\n this.decrement();\n }\n else {\n this.increment();\n }\n }\n ngOnInit() {\n this.updateDefaultFormat();\n this.setMask(this.inputFormat);\n this.updateMask();\n }\n /** @hidden @internal */\n ngOnChanges(changes) {\n if (changes['locale'] && !changes['locale'].firstChange) {\n this.updateDefaultFormat();\n if (!this._inputFormat) {\n this.setMask(this.inputFormat);\n this.updateMask();\n }\n }\n if (changes['inputFormat'] && !changes['inputFormat'].firstChange) {\n this.updateMask();\n }\n }\n /** Clear the input element value. */\n clear() {\n this._onClear = true;\n this.updateValue(null);\n this.setSelectionRange(0, this.inputValue.length);\n this._onClear = false;\n }\n /**\n * Increment specified DatePart.\n *\n * @param datePart The optional DatePart to increment. Defaults to Date or Hours (when Date is absent from the inputFormat - ex:'HH:mm').\n * @param delta The optional delta to increment by. Overrides `spinDelta`.\n */\n increment(datePart, delta) {\n const targetPart = datePart || this.targetDatePart;\n if (!targetPart) {\n return;\n }\n const newValue = this.trySpinValue(targetPart, delta);\n this.updateValue(newValue);\n }\n /**\n * Decrement specified DatePart.\n *\n * @param datePart The optional DatePart to decrement. Defaults to Date or Hours (when Date is absent from the inputFormat - ex:'HH:mm').\n * @param delta The optional delta to decrement by. Overrides `spinDelta`.\n */\n decrement(datePart, delta) {\n const targetPart = datePart || this.targetDatePart;\n if (!targetPart) {\n return;\n }\n const newValue = this.trySpinValue(targetPart, delta, true);\n this.updateValue(newValue);\n }\n /** @hidden @internal */\n writeValue(value) {\n this._value = value;\n this.setDateValue(value);\n this.updateMask();\n }\n /** @hidden @internal */\n validate(control) {\n if (!control.value) {\n return null;\n }\n // InvalidDate handling\n if (isDate(control.value) && !DateTimeUtil.isValidDate(control.value)) {\n return { value: true };\n }\n let errors = {};\n const value = DateTimeUtil.isValidDate(control.value) ? control.value : DateTimeUtil.parseIsoDate(control.value);\n const minValueDate = DateTimeUtil.isValidDate(this.minValue) ? this.minValue : this.parseDate(this.minValue);\n const maxValueDate = DateTimeUtil.isValidDate(this.maxValue) ? this.maxValue : this.parseDate(this.maxValue);\n if (minValueDate || maxValueDate) {\n errors = DateTimeUtil.validateMinMax(value, minValueDate, maxValueDate, this.hasTimeParts, this.hasDateParts);\n }\n return Object.keys(errors).length > 0 ? errors : null;\n }\n /** @hidden @internal */\n registerOnValidatorChange(fn) {\n this.onValidatorChange = fn;\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this.onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this.onTouchCallback = fn;\n }\n /** @hidden @internal */\n setDisabledState(_isDisabled) { }\n /** @hidden @internal */\n onCompositionEnd() {\n super.onCompositionEnd();\n this.updateValue(this.parseDate(this.inputValue));\n this.updateMask();\n }\n /** @hidden @internal */\n onInputChanged(event) {\n super.onInputChanged(event);\n if (this._composing) {\n return;\n }\n if (this.inputIsComplete()) {\n const parsedDate = this.parseDate(this.inputValue);\n if (DateTimeUtil.isValidDate(parsedDate)) {\n this.updateValue(parsedDate);\n }\n else {\n const oldValue = this.value && new Date(this.dateValue.getTime());\n const args = { oldValue, newValue: parsedDate, userInput: this.inputValue };\n this.validationFailed.emit(args);\n if (DateTimeUtil.isValidDate(args.newValue)) {\n this.updateValue(args.newValue);\n }\n else {\n this.updateValue(null);\n }\n }\n }\n else {\n this.updateValue(null);\n }\n }\n /** @hidden @internal */\n onKeyDown(event) {\n if (this.nativeElement.readOnly) {\n return;\n }\n super.onKeyDown(event);\n const key = event.key;\n if (event.altKey) {\n return;\n }\n if (key === this.platform.KEYMAP.ARROW_DOWN || key === this.platform.KEYMAP.ARROW_UP) {\n this.spin(event);\n return;\n }\n if (event.ctrlKey && key === this.platform.KEYMAP.SEMICOLON) {\n this.updateValue(new Date());\n }\n this.moveCursor(event);\n }\n /** @hidden @internal */\n onFocus() {\n if (this.nativeElement.readOnly) {\n return;\n }\n this._isFocused = true;\n this.onTouchCallback();\n this.updateMask();\n super.onFocus();\n this.nativeElement.select();\n }\n /** @hidden @internal */\n onBlur(value) {\n this._isFocused = false;\n if (!this.inputIsComplete() && this.inputValue !== this.emptyMask) {\n this.updateValue(this.parseDate(this.inputValue));\n }\n else {\n this.updateMask();\n }\n // TODO: think of a better way to set displayValuePipe in mask directive\n if (this.displayValuePipe) {\n return;\n }\n super.onBlur(value);\n }\n // the date editor sets its own inputFormat as its placeholder if none is provided\n /** @hidden */\n setPlaceholder(_value) { }\n updateDefaultFormat() {\n this._defaultInputFormat = DateTimeUtil.getDefaultInputFormat(this.locale);\n }\n updateMask() {\n if (this._isFocused) {\n // store the cursor position as it will be moved during masking\n const cursor = this.selectionEnd;\n this.inputValue = this.getMaskedValue();\n this.setSelectionRange(cursor);\n }\n else {\n if (!this.dateValue || !DateTimeUtil.isValidDate(this.dateValue)) {\n this.inputValue = '';\n return;\n }\n if (this.displayValuePipe) {\n // TODO: remove when formatter func has been deleted\n this.inputValue = this.displayValuePipe.transform(this.value);\n return;\n }\n const format = this.displayFormat || this.inputFormat;\n if (format) {\n this.inputValue = DateTimeUtil.formatDate(this.dateValue, format.replace('tt', 'aa'), this.locale);\n }\n else {\n this.inputValue = this.dateValue.toLocaleString();\n }\n }\n }\n setMask(inputFormat) {\n const oldFormat = this._inputDateParts?.map(p => p.format).join('');\n this._inputDateParts = DateTimeUtil.parseDateTimeFormat(inputFormat);\n inputFormat = this._inputDateParts.map(p => p.format).join('');\n const mask = (inputFormat || DateTimeUtil.DEFAULT_INPUT_FORMAT)\n .replace(new RegExp(/(?=[^t])[\\w]/, 'g'), '0');\n this.mask = mask.indexOf('tt') !== -1 ? mask.replace(new RegExp('tt', 'g'), 'LL') : mask;\n const placeholder = this.nativeElement.placeholder;\n if (!placeholder || oldFormat === placeholder) {\n this.renderer.setAttribute(this.nativeElement, 'placeholder', inputFormat);\n }\n }\n parseDate(val) {\n if (!val) {\n return null;\n }\n return DateTimeUtil.parseValueFromMask(val, this._inputDateParts, this.promptChar);\n }\n getMaskedValue() {\n let mask = this.emptyMask;\n if (DateTimeUtil.isValidDate(this.value)) {\n for (const part of this._inputDateParts) {\n if (part.type === DatePart.Literal) {\n continue;\n }\n const targetValue = this.getPartValue(part, part.format.length);\n mask = this.maskParser.replaceInMask(mask, targetValue, this.maskOptions, part.start, part.end).value;\n }\n return mask;\n }\n if (!this.inputIsComplete() || !this._onClear) {\n return this.inputValue;\n }\n return mask;\n }\n valueInRange(value) {\n if (!value) {\n return false;\n }\n let errors = {};\n const minValueDate = DateTimeUtil.isValidDate(this.minValue) ? this.minValue : this.parseDate(this.minValue);\n const maxValueDate = DateTimeUtil.isValidDate(this.maxValue) ? this.maxValue : this.parseDate(this.maxValue);\n if (minValueDate || maxValueDate) {\n errors = DateTimeUtil.validateMinMax(value, this.minValue, this.maxValue, this.hasTimeParts, this.hasDateParts);\n }\n return Object.keys(errors).length === 0;\n }\n spinValue(datePart, delta) {\n if (!this.dateValue || !DateTimeUtil.isValidDate(this.dateValue)) {\n return null;\n }\n const newDate = new Date(this.dateValue.getTime());\n switch (datePart) {\n case DatePart.Date:\n DateTimeUtil.spinDate(delta, newDate, this.spinLoop);\n break;\n case DatePart.Month:\n DateTimeUtil.spinMonth(delta, newDate, this.spinLoop);\n break;\n case DatePart.Year:\n DateTimeUtil.spinYear(delta, newDate);\n break;\n case DatePart.Hours:\n DateTimeUtil.spinHours(delta, newDate, this.spinLoop);\n break;\n case DatePart.Minutes:\n DateTimeUtil.spinMinutes(delta, newDate, this.spinLoop);\n break;\n case DatePart.Seconds:\n DateTimeUtil.spinSeconds(delta, newDate, this.spinLoop);\n break;\n case DatePart.AmPm:\n const formatPart = this._inputDateParts.find(dp => dp.type === DatePart.AmPm);\n const amPmFromMask = this.inputValue.substring(formatPart.start, formatPart.end);\n return DateTimeUtil.spinAmPm(newDate, this.dateValue, amPmFromMask);\n }\n return newDate;\n }\n trySpinValue(datePart, delta, negative = false) {\n if (!delta) {\n // default to 1 if a delta is set to 0 or any other falsy value\n delta = this.datePartDeltas[datePart] || 1;\n }\n const spinValue = negative ? -Math.abs(delta) : Math.abs(delta);\n return this.spinValue(datePart, spinValue) || new Date();\n }\n setDateValue(value) {\n this._dateValue = DateTimeUtil.isValidDate(value)\n ? value\n : DateTimeUtil.parseIsoDate(value);\n }\n updateValue(newDate) {\n this._oldValue = this.dateValue;\n this.value = newDate;\n // TODO: should we emit events here?\n if (this.inputIsComplete() || this.inputValue === this.emptyMask) {\n this.valueChange.emit(this.dateValue);\n }\n if (this.dateValue && !this.valueInRange(this.dateValue)) {\n this.validationFailed.emit({ oldValue: this._oldValue, newValue: this.dateValue, userInput: this.inputValue });\n }\n }\n toTwelveHourFormat(value) {\n let hour = parseInt(value.replace(new RegExp(this.promptChar, 'g'), '0'), 10);\n if (hour > 12) {\n hour -= 12;\n }\n else if (hour === 0) {\n hour = 12;\n }\n return hour;\n }\n getPartValue(datePartInfo, partLength) {\n let maskedValue;\n const datePart = datePartInfo.type;\n switch (datePart) {\n case DatePart.Date:\n maskedValue = this.dateValue.getDate();\n break;\n case DatePart.Month:\n // months are zero based\n maskedValue = this.dateValue.getMonth() + 1;\n break;\n case DatePart.Year:\n if (partLength === 2) {\n maskedValue = this.prependValue(parseInt(this.dateValue.getFullYear().toString().slice(-2), 10), partLength, '0');\n }\n else {\n maskedValue = this.dateValue.getFullYear();\n }\n break;\n case DatePart.Hours:\n if (datePartInfo.format.indexOf('h') !== -1) {\n maskedValue = this.prependValue(this.toTwelveHourFormat(this.dateValue.getHours().toString()), partLength, '0');\n }\n else {\n maskedValue = this.dateValue.getHours();\n }\n break;\n case DatePart.Minutes:\n maskedValue = this.dateValue.getMinutes();\n break;\n case DatePart.Seconds:\n maskedValue = this.dateValue.getSeconds();\n break;\n case DatePart.AmPm:\n maskedValue = this.dateValue.getHours() >= 12 ? 'PM' : 'AM';\n break;\n }\n if (datePartInfo.type !== DatePart.AmPm) {\n return this.prependValue(maskedValue, partLength, '0');\n }\n return maskedValue;\n }\n prependValue(value, partLength, prependChar) {\n return (prependChar + value.toString()).slice(-partLength);\n }\n spin(event) {\n event.preventDefault();\n switch (event.key) {\n case this.platform.KEYMAP.ARROW_UP:\n this.increment();\n break;\n case this.platform.KEYMAP.ARROW_DOWN:\n this.decrement();\n break;\n }\n }\n inputIsComplete() {\n return this.inputValue.indexOf(this.promptChar) === -1;\n }\n moveCursor(event) {\n const value = event.target.value;\n switch (event.key) {\n case this.platform.KEYMAP.ARROW_LEFT:\n if (event.ctrlKey) {\n event.preventDefault();\n this.setSelectionRange(this.getNewPosition(value));\n }\n break;\n case this.platform.KEYMAP.ARROW_RIGHT:\n if (event.ctrlKey) {\n event.preventDefault();\n this.setSelectionRange(this.getNewPosition(value, 1));\n }\n break;\n }\n }\n /**\n * Move the cursor in a specific direction until it reaches a date/time separator.\n * Then return its index.\n *\n * @param value The string it operates on.\n * @param direction 0 is left, 1 is right. Default is 0.\n */\n getNewPosition(value, direction = 0) {\n const literals = this._inputDateParts.filter(p => p.type === DatePart.Literal);\n let cursorPos = this.selectionStart;\n if (!direction) {\n do {\n cursorPos = cursorPos > 0 ? --cursorPos : cursorPos;\n } while (!literals.some(l => l.end === cursorPos) && cursorPos > 0);\n return cursorPos;\n }\n else {\n do {\n cursorPos++;\n } while (!literals.some(l => l.start === cursorPos) && cursorPos < value.length);\n return cursorPos;\n }\n }\n}\nIgxDateTimeEditorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateTimeEditorDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: MaskParsingService }, { token: PlatformUtil }, { token: DOCUMENT }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDateTimeEditorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDateTimeEditorDirective, selector: \"[igxDateTimeEditor]\", inputs: { locale: \"locale\", minValue: \"minValue\", maxValue: \"maxValue\", spinLoop: \"spinLoop\", displayFormat: \"displayFormat\", inputFormat: [\"igxDateTimeEditor\", \"inputFormat\"], value: \"value\", spinDelta: \"spinDelta\" }, outputs: { valueChange: \"valueChange\", validationFailed: \"validationFailed\" }, host: { listeners: { \"wheel\": \"onWheel($event)\" } }, providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxDateTimeEditorDirective, multi: true },\n { provide: NG_VALIDATORS, useExisting: IgxDateTimeEditorDirective, multi: true }\n ], exportAs: [\"igxDateTimeEditor\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateTimeEditorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDateTimeEditor]',\n exportAs: 'igxDateTimeEditor',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxDateTimeEditorDirective, multi: true },\n { provide: NG_VALIDATORS, useExisting: IgxDateTimeEditorDirective, multi: true }\n ]\n }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: MaskParsingService }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, propDecorators: { locale: [{\n type: Input\n }], minValue: [{\n type: Input\n }], maxValue: [{\n type: Input\n }], spinLoop: [{\n type: Input\n }], displayFormat: [{\n type: Input\n }], inputFormat: [{\n type: Input,\n args: [`igxDateTimeEditor`]\n }], value: [{\n type: Input\n }], spinDelta: [{\n type: Input\n }], valueChange: [{\n type: Output\n }], validationFailed: [{\n type: Output\n }], onWheel: [{\n type: HostListener,\n args: ['wheel', ['$event']]\n }] } });\nclass IgxDateTimeEditorModule {\n}\nIgxDateTimeEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateTimeEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDateTimeEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateTimeEditorModule, declarations: [IgxDateTimeEditorDirective], exports: [IgxDateTimeEditorDirective] });\nIgxDateTimeEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateTimeEditorModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateTimeEditorModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxDateTimeEditorDirective],\n exports: [IgxDateTimeEditorDirective]\n }]\n }] });\n\nclass IgcFormControlDirective {\n constructor(elementRef, renderer) {\n this.elementRef = elementRef;\n this.renderer = renderer;\n /** @hidden @internal */\n this.onChange = () => { };\n /** @hidden @internal */\n this.onTouched = () => { };\n }\n /** @hidden @internal */\n onBlur() {\n this.onTouched();\n }\n /** @hidden @internal */\n listenForValueChange(value) {\n this.onChange(value);\n }\n /** @hidden @internal */\n writeValue(value) {\n if (value) {\n this.elementRef.nativeElement.value = value;\n }\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this.onChange = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', isDisabled);\n }\n}\nIgcFormControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgcFormControlDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nIgcFormControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgcFormControlDirective, selector: \"igc-rating[ngModel],igc-rating[formControlName]\", host: { listeners: { \"blur\": \"onBlur()\", \"igcChange\": \"listenForValueChange($event.detail)\" } }, providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => IgcFormControlDirective),\n multi: true\n }\n ], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgcFormControlDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igc-rating[ngModel],igc-rating[formControlName]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => IgcFormControlDirective),\n multi: true\n }\n ]\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onBlur: [{\n type: HostListener,\n args: ['blur']\n }], listenForValueChange: [{\n type: HostListener,\n args: ['igcChange', ['$event.detail']]\n }] } });\nclass IgcFormsModule {\n}\nIgcFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgcFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgcFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgcFormsModule, declarations: [IgcFormControlDirective], exports: [IgcFormControlDirective] });\nIgcFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgcFormsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgcFormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgcFormControlDirective],\n exports: [IgcFormControlDirective]\n }]\n }] });\n\n/**\n * Provides base filtering operations\n * Implementations should be Singleton\n *\n * @export\n */\nclass IgxFilteringOperand {\n constructor() {\n this.operations = [{\n name: 'null',\n isUnary: true,\n iconName: 'is-null',\n logic: (target) => target === null\n }, {\n name: 'notNull',\n isUnary: true,\n iconName: 'is-not-null',\n logic: (target) => target !== null\n }, {\n name: 'in',\n isUnary: false,\n iconName: 'is-in',\n hidden: true,\n logic: (target, searchVal) => this.findValueInSet(target, searchVal)\n }];\n }\n static instance() {\n return this._instance || (this._instance = new this());\n }\n /**\n * Returns an array of names of the conditions which are visible in the UI\n */\n conditionList() {\n return this.operations.filter(f => !f.hidden).map((element) => element.name);\n }\n /**\n * Returns an instance of the condition with the specified name.\n *\n * @param name The name of the condition.\n */\n condition(name) {\n return this.operations.find((element) => element.name === name);\n }\n /**\n * Adds a new condition to the filtering operations.\n *\n * @param operation The filtering operation.\n */\n append(operation) {\n this.operations.push(operation);\n }\n /**\n * @hidden\n */\n findValueInSet(target, searchVal) {\n return searchVal.has(target);\n }\n}\nIgxFilteringOperand._instance = null;\n/**\n * Provides filtering operations for booleans\n *\n * @export\n */\nclass IgxBooleanFilteringOperand extends IgxFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'all',\n isUnary: true,\n iconName: 'select-all',\n logic: (_target) => true\n }, {\n name: 'true',\n isUnary: true,\n iconName: 'is-true',\n logic: (target) => !!(target && target !== null && target !== undefined)\n }, {\n name: 'false',\n isUnary: true,\n iconName: 'is-false',\n logic: (target) => !target && target !== null && target !== undefined\n }, {\n name: 'empty',\n isUnary: true,\n iconName: 'is-empty',\n logic: (target) => target === null || target === undefined\n }, {\n name: 'notEmpty',\n isUnary: true,\n iconName: 'not-empty',\n logic: (target) => target !== null && target !== undefined\n }].concat(this.operations);\n }\n}\n/**\n * @internal\n * @hidden\n */\nclass IgxBaseDateTimeFilteringOperand extends IgxFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'empty',\n isUnary: true,\n iconName: 'is-empty',\n logic: (target) => target === null || target === undefined\n }, {\n name: 'notEmpty',\n isUnary: true,\n iconName: 'not-empty',\n logic: (target) => target !== null && target !== undefined\n }].concat(this.operations);\n }\n /**\n * Splits a Date object into parts\n *\n * @memberof IgxDateFilteringOperand\n */\n static getDateParts(date, dateFormat) {\n const res = {\n day: null,\n hours: null,\n milliseconds: null,\n minutes: null,\n month: null,\n seconds: null,\n year: null\n };\n if (!date || !dateFormat) {\n return res;\n }\n if (dateFormat.indexOf('y') >= 0) {\n res.year = date.getFullYear();\n }\n if (dateFormat.indexOf('M') >= 0) {\n res.month = date.getMonth();\n }\n if (dateFormat.indexOf('d') >= 0) {\n res.day = date.getDate();\n }\n if (dateFormat.indexOf('h') >= 0) {\n res.hours = date.getHours();\n }\n if (dateFormat.indexOf('m') >= 0) {\n res.minutes = date.getMinutes();\n }\n if (dateFormat.indexOf('s') >= 0) {\n res.seconds = date.getSeconds();\n }\n if (dateFormat.indexOf('f') >= 0) {\n res.milliseconds = date.getMilliseconds();\n }\n return res;\n }\n findValueInSet(target, searchVal) {\n if (!target) {\n return false;\n }\n return searchVal.has((target instanceof Date) ? target.toISOString() : target);\n }\n validateInputData(target) {\n if (!(target instanceof Date)) {\n throw new Error('Could not perform filtering on \\'date\\' column because the datasource object type is not \\'Date\\'.');\n }\n }\n}\n/**\n * Provides filtering operations for Dates\n *\n * @export\n */\nclass IgxDateFilteringOperand extends IgxBaseDateTimeFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'equals',\n isUnary: false,\n iconName: 'equals',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetp = IgxDateFilteringOperand.getDateParts(target, 'yMd');\n const searchp = IgxDateFilteringOperand.getDateParts(searchVal, 'yMd');\n return targetp.year === searchp.year &&\n targetp.month === searchp.month &&\n targetp.day === searchp.day;\n }\n }, {\n name: 'doesNotEqual',\n isUnary: false,\n iconName: 'not-equal',\n logic: (target, searchVal) => {\n if (!target) {\n return true;\n }\n this.validateInputData(target);\n const targetp = IgxDateFilteringOperand.getDateParts(target, 'yMd');\n const searchp = IgxDateFilteringOperand.getDateParts(searchVal, 'yMd');\n return targetp.year !== searchp.year ||\n targetp.month !== searchp.month ||\n targetp.day !== searchp.day;\n }\n }, {\n name: 'before',\n isUnary: false,\n iconName: 'is-before',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n return target < searchVal;\n }\n }, {\n name: 'after',\n isUnary: false,\n iconName: 'is-after',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n return target > searchVal;\n }\n }, {\n name: 'today',\n isUnary: true,\n iconName: 'today',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'yMd');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'yMd');\n return d.year === now.year &&\n d.month === now.month &&\n d.day === now.day;\n }\n }, {\n name: 'yesterday',\n isUnary: true,\n iconName: 'yesterday',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const td = IgxDateFilteringOperand.getDateParts(target, 'yMd');\n const y = ((d) => new Date(d.setDate(d.getDate() - 1)))(new Date());\n const yesterday = IgxDateFilteringOperand.getDateParts(y, 'yMd');\n return td.year === yesterday.year &&\n td.month === yesterday.month &&\n td.day === yesterday.day;\n }\n }, {\n name: 'thisMonth',\n isUnary: true,\n iconName: 'this-month',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'yM');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'yM');\n return d.year === now.year &&\n d.month === now.month;\n }\n }, {\n name: 'lastMonth',\n isUnary: true,\n iconName: 'last-month',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'yM');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'yM');\n if (!now.month) {\n now.month = 11;\n now.year -= 1;\n }\n else {\n now.month--;\n }\n return d.year === now.year &&\n d.month === now.month;\n }\n }, {\n name: 'nextMonth',\n isUnary: true,\n iconName: 'next-month',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'yM');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'yM');\n if (now.month === 11) {\n now.month = 0;\n now.year += 1;\n }\n else {\n now.month++;\n }\n return d.year === now.year &&\n d.month === now.month;\n }\n }, {\n name: 'thisYear',\n isUnary: true,\n iconName: 'this-year',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'y');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'y');\n return d.year === now.year;\n }\n }, {\n name: 'lastYear',\n isUnary: true,\n iconName: 'last-year',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'y');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'y');\n return d.year === now.year - 1;\n }\n }, {\n name: 'nextYear',\n isUnary: true,\n iconName: 'next-year',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateFilteringOperand.getDateParts(target, 'y');\n const now = IgxDateFilteringOperand.getDateParts(new Date(), 'y');\n return d.year === now.year + 1;\n }\n }].concat(this.operations);\n }\n}\nclass IgxDateTimeFilteringOperand extends IgxBaseDateTimeFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'equals',\n isUnary: false,\n iconName: 'equals',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetp = IgxDateTimeFilteringOperand.getDateParts(target, 'yMdhms');\n const searchp = IgxDateTimeFilteringOperand.getDateParts(searchVal, 'yMdhms');\n return targetp.year === searchp.year &&\n targetp.month === searchp.month &&\n targetp.day === searchp.day &&\n targetp.hours === searchp.hours &&\n targetp.minutes === searchp.minutes &&\n targetp.seconds === searchp.seconds;\n }\n }, {\n name: 'doesNotEqual',\n isUnary: false,\n iconName: 'not-equal',\n logic: (target, searchVal) => {\n if (!target) {\n return true;\n }\n this.validateInputData(target);\n const targetp = IgxDateTimeFilteringOperand.getDateParts(target, 'yMdhms');\n const searchp = IgxDateTimeFilteringOperand.getDateParts(searchVal, 'yMdhms');\n return targetp.year !== searchp.year ||\n targetp.month !== searchp.month ||\n targetp.day !== searchp.day ||\n targetp.hours !== searchp.hours ||\n targetp.minutes !== searchp.minutes ||\n targetp.seconds !== searchp.seconds;\n }\n }, {\n name: 'before',\n isUnary: false,\n iconName: 'is-before',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n return target < searchVal;\n }\n }, {\n name: 'after',\n isUnary: false,\n iconName: 'is-after',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n return target > searchVal;\n }\n }, {\n name: 'today',\n isUnary: true,\n iconName: 'today',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'yMd');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'yMd');\n return d.year === now.year &&\n d.month === now.month &&\n d.day === now.day;\n }\n }, {\n name: 'yesterday',\n isUnary: true,\n iconName: 'yesterday',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const td = IgxDateTimeFilteringOperand.getDateParts(target, 'yMd');\n const y = ((d) => new Date(d.setDate(d.getDate() - 1)))(new Date());\n const yesterday = IgxDateTimeFilteringOperand.getDateParts(y, 'yMd');\n return td.year === yesterday.year &&\n td.month === yesterday.month &&\n td.day === yesterday.day;\n }\n }, {\n name: 'thisMonth',\n isUnary: true,\n iconName: 'this-month',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'yM');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'yM');\n return d.year === now.year &&\n d.month === now.month;\n }\n }, {\n name: 'lastMonth',\n isUnary: true,\n iconName: 'last-month',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'yM');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'yM');\n if (!now.month) {\n now.month = 11;\n now.year -= 1;\n }\n else {\n now.month--;\n }\n return d.year === now.year &&\n d.month === now.month;\n }\n }, {\n name: 'nextMonth',\n isUnary: true,\n iconName: 'next-month',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'yM');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'yM');\n if (now.month === 11) {\n now.month = 0;\n now.year += 1;\n }\n else {\n now.month++;\n }\n return d.year === now.year &&\n d.month === now.month;\n }\n }, {\n name: 'thisYear',\n isUnary: true,\n iconName: 'this-year',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'y');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'y');\n return d.year === now.year;\n }\n }, {\n name: 'lastYear',\n isUnary: true,\n iconName: 'last-year',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'y');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'y');\n return d.year === now.year - 1;\n }\n }, {\n name: 'nextYear',\n isUnary: true,\n iconName: 'next-year',\n logic: (target) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const d = IgxDateTimeFilteringOperand.getDateParts(target, 'y');\n const now = IgxDateTimeFilteringOperand.getDateParts(new Date(), 'y');\n return d.year === now.year + 1;\n }\n }].concat(this.operations);\n }\n}\nclass IgxTimeFilteringOperand extends IgxBaseDateTimeFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'at',\n isUnary: false,\n iconName: 'equals',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetp = IgxTimeFilteringOperand.getDateParts(target, 'hms');\n const searchp = IgxTimeFilteringOperand.getDateParts(searchVal, 'hms');\n return targetp.hours === searchp.hours &&\n targetp.minutes === searchp.minutes &&\n targetp.seconds === searchp.seconds;\n }\n }, {\n name: 'not_at',\n isUnary: false,\n iconName: 'not-equal',\n logic: (target, searchVal) => {\n if (!target) {\n return true;\n }\n this.validateInputData(target);\n const targetp = IgxTimeFilteringOperand.getDateParts(target, 'hms');\n const searchp = IgxTimeFilteringOperand.getDateParts(searchVal, 'hms');\n return targetp.hours !== searchp.hours ||\n targetp.minutes !== searchp.minutes ||\n targetp.seconds !== searchp.seconds;\n }\n }, {\n name: 'before',\n isUnary: false,\n iconName: 'is-before',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetn = IgxTimeFilteringOperand.getDateParts(target, 'hms');\n const search = IgxTimeFilteringOperand.getDateParts(searchVal, 'hms');\n return targetn.hours < search.hours ? true : targetn.hours === search.hours && targetn.minutes < search.minutes ?\n true : targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds < search.seconds;\n }\n }, {\n name: 'after',\n isUnary: false,\n iconName: 'is-after',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetn = IgxTimeFilteringOperand.getDateParts(target, 'hms');\n const search = IgxTimeFilteringOperand.getDateParts(searchVal, 'hms');\n return targetn.hours > search.hours ? true : targetn.hours === search.hours && targetn.minutes > search.minutes ?\n true : targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds > search.seconds;\n }\n }, {\n name: 'at_before',\n isUnary: false,\n iconName: 'is-before',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetn = IgxTimeFilteringOperand.getDateParts(target, 'hms');\n const search = IgxTimeFilteringOperand.getDateParts(searchVal, 'hms');\n return (targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds === search.seconds) ||\n targetn.hours < search.hours ? true : targetn.hours === search.hours && targetn.minutes < search.minutes ?\n true : targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds < search.seconds;\n }\n }, {\n name: 'at_after',\n isUnary: false,\n iconName: 'is-after',\n logic: (target, searchVal) => {\n if (!target) {\n return false;\n }\n this.validateInputData(target);\n const targetn = IgxTimeFilteringOperand.getDateParts(target, 'hms');\n const search = IgxTimeFilteringOperand.getDateParts(searchVal, 'hms');\n return (targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds === search.seconds) ||\n targetn.hours > search.hours ? true : targetn.hours === search.hours && targetn.minutes > search.minutes ?\n true : targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds > search.seconds;\n }\n }].concat(this.operations);\n }\n findValueInSet(target, searchVal) {\n if (!target) {\n return false;\n }\n return searchVal.has(target.toLocaleTimeString());\n }\n}\n/**\n * Provides filtering operations for numbers\n *\n * @export\n */\nclass IgxNumberFilteringOperand extends IgxFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'equals',\n isUnary: false,\n iconName: 'equals',\n logic: (target, searchVal) => target === searchVal\n }, {\n name: 'doesNotEqual',\n isUnary: false,\n iconName: 'not-equal',\n logic: (target, searchVal) => target !== searchVal\n }, {\n name: 'greaterThan',\n isUnary: false,\n iconName: 'greater-than',\n logic: (target, searchVal) => target > searchVal\n }, {\n name: 'lessThan',\n isUnary: false,\n iconName: 'less-than',\n logic: (target, searchVal) => target < searchVal\n }, {\n name: 'greaterThanOrEqualTo',\n isUnary: false,\n iconName: 'greater-than-or-equal',\n logic: (target, searchVal) => target >= searchVal\n }, {\n name: 'lessThanOrEqualTo',\n isUnary: false,\n iconName: 'less-than-or-equal',\n logic: (target, searchVal) => target <= searchVal\n }, {\n name: 'empty',\n isUnary: true,\n iconName: 'is-empty',\n logic: (target) => target === null || target === undefined || isNaN(target)\n }, {\n name: 'notEmpty',\n isUnary: true,\n iconName: 'not-empty',\n logic: (target) => target !== null && target !== undefined && !isNaN(target)\n }].concat(this.operations);\n }\n}\n/**\n * Provides filtering operations for strings\n *\n * @export\n */\nclass IgxStringFilteringOperand extends IgxFilteringOperand {\n constructor() {\n super();\n this.operations = [{\n name: 'contains',\n isUnary: false,\n iconName: 'contains',\n logic: (target, searchVal, ignoreCase) => {\n const search = IgxStringFilteringOperand.applyIgnoreCase(searchVal, ignoreCase);\n target = IgxStringFilteringOperand.applyIgnoreCase(target, ignoreCase);\n return target.indexOf(search) !== -1;\n }\n }, {\n name: 'doesNotContain',\n isUnary: false,\n iconName: 'does-not-contain',\n logic: (target, searchVal, ignoreCase) => {\n const search = IgxStringFilteringOperand.applyIgnoreCase(searchVal, ignoreCase);\n target = IgxStringFilteringOperand.applyIgnoreCase(target, ignoreCase);\n return target.indexOf(search) === -1;\n }\n }, {\n name: 'startsWith',\n isUnary: false,\n iconName: 'starts-with',\n logic: (target, searchVal, ignoreCase) => {\n const search = IgxStringFilteringOperand.applyIgnoreCase(searchVal, ignoreCase);\n target = IgxStringFilteringOperand.applyIgnoreCase(target, ignoreCase);\n return target.startsWith(search);\n }\n }, {\n name: 'endsWith',\n isUnary: false,\n iconName: 'ends-with',\n logic: (target, searchVal, ignoreCase) => {\n const search = IgxStringFilteringOperand.applyIgnoreCase(searchVal, ignoreCase);\n target = IgxStringFilteringOperand.applyIgnoreCase(target, ignoreCase);\n return target.endsWith(search);\n }\n }, {\n name: 'equals',\n isUnary: false,\n iconName: 'equals',\n logic: (target, searchVal, ignoreCase) => {\n const search = IgxStringFilteringOperand.applyIgnoreCase(searchVal, ignoreCase);\n target = IgxStringFilteringOperand.applyIgnoreCase(target, ignoreCase);\n return target === search;\n }\n }, {\n name: 'doesNotEqual',\n isUnary: false,\n iconName: 'not-equal',\n logic: (target, searchVal, ignoreCase) => {\n const search = IgxStringFilteringOperand.applyIgnoreCase(searchVal, ignoreCase);\n target = IgxStringFilteringOperand.applyIgnoreCase(target, ignoreCase);\n return target !== search;\n }\n }, {\n name: 'empty',\n isUnary: true,\n iconName: 'is-empty',\n logic: (target) => target === null || target === undefined || target.length === 0\n }, {\n name: 'notEmpty',\n isUnary: true,\n iconName: 'not-empty',\n logic: (target) => target !== null && target !== undefined && target.length > 0\n }].concat(this.operations);\n }\n /**\n * Applies case sensitivity on strings if provided\n *\n * @memberof IgxStringFilteringOperand\n */\n static applyIgnoreCase(a, ignoreCase) {\n a = a ?? '';\n // bulletproof\n return ignoreCase ? ('' + a).toLowerCase() : a;\n }\n}\n\nconst clear = (el) => el === 0 || Boolean(el);\nconst first = (arr) => arr[0];\nconst last = (arr) => arr[arr.length - 1];\nclass IgxSummaryOperand {\n /**\n * Counts all the records in the data source.\n * If filtering is applied, counts only the filtered records.\n * ```typescript\n * IgxSummaryOperand.count(dataSource);\n * ```\n *\n * @memberof IgxSummaryOperand\n */\n static count(data) {\n return data.length;\n }\n /**\n * Executes the static `count` method and returns `IgxSummaryResult[]`.\n * ```typescript\n * interface IgxSummaryResult {\n * key: string;\n * label: string;\n * summaryResult: any;\n * }\n * ```\n * Can be overridden in the inherited classes to provide customization for the `summary`.\n * ```typescript\n * class CustomSummary extends IgxSummaryOperand {\n * constructor() {\n * super();\n * }\n * public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {\n * const result = [];\n * result.push({\n * key: \"test\",\n * label: \"Test\",\n * summaryResult: IgxSummaryOperand.count(data)\n * });\n * return result;\n * }\n * }\n * this.grid.getColumnByName('ColumnName').summaries = CustomSummary;\n * ```\n *\n * @memberof IgxSummaryOperand\n */\n operate(data = [], _allData = [], _fieldName, _groupRecord) {\n return [{\n key: 'count',\n label: 'Count',\n defaultFormatting: false,\n summaryResult: IgxSummaryOperand.count(data)\n }];\n }\n}\n// @dynamic\nclass IgxNumberSummaryOperand extends IgxSummaryOperand {\n /**\n * Returns the minimum numeric value in the provided data records.\n * If filtering is applied, returns the minimum value in the filtered data records.\n * ```typescript\n * IgxNumberSummaryOperand.min(data);\n * ```\n *\n * @memberof IgxNumberSummaryOperand\n */\n static min(data) {\n return data.length && data.filter(clear).length ? data.filter(clear).reduce((a, b) => Math.min(a, b)) : 0;\n }\n /**\n * Returns the maximum numeric value in the provided data records.\n * If filtering is applied, returns the maximum value in the filtered data records.\n * ```typescript\n * IgxNumberSummaryOperand.max(data);\n * ```\n *\n * @memberof IgxNumberSummaryOperand\n */\n static max(data) {\n return data.length && data.filter(clear).length ? data.filter(clear).reduce((a, b) => Math.max(a, b)) : 0;\n }\n /**\n * Returns the sum of the numeric values in the provided data records.\n * If filtering is applied, returns the sum of the numeric values in the data records.\n * ```typescript\n * IgxNumberSummaryOperand.sum(data);\n * ```\n *\n * @memberof IgxNumberSummaryOperand\n */\n static sum(data) {\n return data.length && data.filter(clear).length ? data.filter(clear).reduce((a, b) => +a + +b) : 0;\n }\n /**\n * Returns the average numeric value in the data provided data records.\n * If filtering is applied, returns the average numeric value in the filtered data records.\n * ```typescript\n * IgxSummaryOperand.average(data);\n * ```\n *\n * @memberof IgxNumberSummaryOperand\n */\n static average(data) {\n return data.length && data.filter(clear).length ? this.sum(data) / this.count(data) : 0;\n }\n /**\n * Executes the static methods and returns `IgxSummaryResult[]`.\n * ```typescript\n * interface IgxSummaryResult {\n * key: string;\n * label: string;\n * summaryResult: any;\n * }\n * ```\n * Can be overridden in the inherited classes to provide customization for the `summary`.\n * ```typescript\n * class CustomNumberSummary extends IgxNumberSummaryOperand {\n * constructor() {\n * super();\n * }\n * public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {\n * const result = super.operate(data, allData, fieldName, groupRecord);\n * result.push({\n * key: \"avg\",\n * label: \"Avg\",\n * summaryResult: IgxNumberSummaryOperand.average(data)\n * });\n * result.push({\n * key: 'mdn',\n * label: 'Median',\n * summaryResult: this.findMedian(data)\n * });\n * return result;\n * }\n * }\n * this.grid.getColumnByName('ColumnName').summaries = CustomNumberSummary;\n * ```\n *\n * @memberof IgxNumberSummaryOperand\n */\n operate(data = [], allData = [], fieldName, groupRecord) {\n const result = super.operate(data, allData, fieldName, groupRecord);\n result.push({\n key: 'min',\n label: 'Min',\n defaultFormatting: true,\n summaryResult: IgxNumberSummaryOperand.min(data)\n });\n result.push({\n key: 'max',\n label: 'Max',\n defaultFormatting: true,\n summaryResult: IgxNumberSummaryOperand.max(data)\n });\n result.push({\n key: 'sum',\n label: 'Sum',\n defaultFormatting: true,\n summaryResult: IgxNumberSummaryOperand.sum(data)\n });\n result.push({\n key: 'average',\n label: 'Avg',\n defaultFormatting: true,\n summaryResult: IgxNumberSummaryOperand.average(data)\n });\n return result;\n }\n}\n// @dynamic\nclass IgxDateSummaryOperand extends IgxSummaryOperand {\n /**\n * Returns the latest date value in the data records.\n * If filtering is applied, returns the latest date value in the filtered data records.\n * ```typescript\n * IgxDateSummaryOperand.latest(data);\n * ```\n *\n * @memberof IgxDateSummaryOperand\n */\n static latest(data) {\n return data.length && data.filter(clear).length ?\n first(data.filter(clear).sort((a, b) => new Date(b).valueOf() - new Date(a).valueOf())) : undefined;\n }\n /**\n * Returns the earliest date value in the data records.\n * If filtering is applied, returns the latest date value in the filtered data records.\n * ```typescript\n * IgxDateSummaryOperand.earliest(data);\n * ```\n *\n * @memberof IgxDateSummaryOperand\n */\n static earliest(data) {\n return data.length && data.filter(clear).length ?\n last(data.filter(clear).sort((a, b) => new Date(b).valueOf() - new Date(a).valueOf())) : undefined;\n }\n /**\n * Executes the static methods and returns `IgxSummaryResult[]`.\n * ```typescript\n * interface IgxSummaryResult {\n * key: string;\n * label: string;\n * summaryResult: any;\n * }\n * ```\n * Can be overridden in the inherited classes to provide customization for the `summary`.\n * ```typescript\n * class CustomDateSummary extends IgxDateSummaryOperand {\n * constructor() {\n * super();\n * }\n * public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {\n * const result = super.operate(data, allData, fieldName, groupRecord);\n * result.push({\n * key: \"deadline\",\n * label: \"Deadline Date\",\n * summaryResult: this.calculateDeadline(data);\n * });\n * return result;\n * }\n * }\n * this.grid.getColumnByName('ColumnName').summaries = CustomDateSummary;\n * ```\n *\n * @memberof IgxDateSummaryOperand\n */\n operate(data = [], allData = [], fieldName, groupRecord) {\n const result = super.operate(data, allData, fieldName, groupRecord);\n result.push({\n key: 'earliest',\n label: 'Earliest',\n defaultFormatting: true,\n summaryResult: IgxDateSummaryOperand.earliest(data)\n });\n result.push({\n key: 'latest',\n label: 'Latest',\n defaultFormatting: true,\n summaryResult: IgxDateSummaryOperand.latest(data)\n });\n return result;\n }\n}\n// @dynamic\nclass IgxTimeSummaryOperand extends IgxSummaryOperand {\n /**\n * Returns the latest time value in the data records. Compare only the time part of the date.\n * If filtering is applied, returns the latest time value in the filtered data records.\n * ```typescript\n * IgxTimeSummaryOperand.latestTime(data);\n * ```\n *\n * @memberof IgxTimeSummaryOperand\n */\n static latestTime(data) {\n return data.length && data.filter(clear).length ?\n first(data.filter(clear).map(v => new Date(v)).sort((a, b) => new Date().setHours(b.getHours(), b.getMinutes(), b.getSeconds()) -\n new Date().setHours(a.getHours(), a.getMinutes(), a.getSeconds()))) : undefined;\n }\n /**\n * Returns the earliest time value in the data records. Compare only the time part of the date.\n * If filtering is applied, returns the earliest time value in the filtered data records.\n * ```typescript\n * IgxTimeSummaryOperand.earliestTime(data);\n * ```\n *\n * @memberof IgxTimeSummaryOperand\n */\n static earliestTime(data) {\n return data.length && data.filter(clear).length ?\n last(data.filter(clear).map(v => new Date(v)).sort((a, b) => new Date().setHours(b.getHours(), b.getMinutes(), b.getSeconds()) -\n new Date().setHours(a.getHours(), a.getMinutes(), a.getSeconds()))) : undefined;\n }\n /**\n * @memberof IgxTimeSummaryOperand\n */\n operate(data = [], allData = [], fieldName, groupRecord) {\n const result = super.operate(data, allData, fieldName, groupRecord);\n result.push({\n key: 'earliest',\n label: 'Earliest',\n defaultFormatting: true,\n summaryResult: IgxTimeSummaryOperand.earliestTime(data)\n });\n result.push({\n key: 'latest',\n label: 'Latest',\n defaultFormatting: true,\n summaryResult: IgxTimeSummaryOperand.latestTime(data)\n });\n return result;\n }\n}\n\nclass IgxPivotAggregate {\n /**\n * Gets/Sets the resource strings.\n *\n * @remarks\n * By default it uses EN resources.\n */\n static set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n static get resourceStrings() {\n return this._resourceStrings;\n }\n /**\n * Gets array with default aggregator function for base aggregation.\n * ```typescript\n * IgxPivotAggregate.aggregators();\n * ```\n *\n * @memberof IgxPivotAggregate\n */\n static aggregators() {\n return [{\n key: 'COUNT',\n label: this.resourceStrings.igx_grid_pivot_aggregate_count,\n aggregator: IgxPivotAggregate.count\n }];\n }\n /**\n * Counts all the records in the data source.\n * If filtering is applied, counts only the filtered records.\n * ```typescript\n * IgxSummaryOperand.count(dataSource);\n * ```\n *\n * @memberof IgxPivotAggregate\n */\n static count(members) {\n return members.length;\n }\n}\nIgxPivotAggregate._resourceStrings = CurrentResourceStrings.GridResStrings;\nclass IgxPivotNumericAggregate extends IgxPivotAggregate {\n /**\n * Gets array with default aggregator function for numeric aggregation.\n * ```typescript\n * IgxPivotAggregate.aggregators();\n * ```\n *\n * @memberof IgxPivotAggregate\n */\n static aggregators() {\n let result = [];\n result = result.concat(super.aggregators());\n result.push({\n key: 'MIN',\n label: this.resourceStrings.igx_grid_pivot_aggregate_min,\n aggregator: IgxPivotNumericAggregate.min\n });\n result.push({\n key: 'MAX',\n label: this.resourceStrings.igx_grid_pivot_aggregate_max,\n aggregator: IgxPivotNumericAggregate.max\n });\n result.push({\n key: 'SUM',\n label: this.resourceStrings.igx_grid_pivot_aggregate_sum,\n aggregator: IgxPivotNumericAggregate.sum\n });\n result.push({\n key: 'AVG',\n label: this.resourceStrings.igx_grid_pivot_aggregate_avg,\n aggregator: IgxPivotNumericAggregate.average\n });\n return result;\n }\n /**\n * Returns the minimum numeric value in the provided data records.\n * If filtering is applied, returns the minimum value in the filtered data records.\n * ```typescript\n * IgxPivotNumericAggregate.min(members, data);\n * ```\n *\n * @memberof IgxPivotNumericAggregate\n */\n static min(members) {\n return IgxNumberSummaryOperand.min(members);\n }\n /**\n * Returns the maximum numeric value in the provided data records.\n * If filtering is applied, returns the maximum value in the filtered data records.\n * ```typescript\n * IgxPivotNumericAggregate.max(data);\n * ```\n *\n * @memberof IgxPivotNumericAggregate\n */\n static max(members) {\n return IgxNumberSummaryOperand.max(members);\n }\n /**\n * Returns the sum of the numeric values in the provided data records.\n * If filtering is applied, returns the sum of the numeric values in the data records.\n * ```typescript\n * IgxPivotNumericAggregate.sum(data);\n * ```\n *\n * @memberof IgxPivotNumericAggregate\n */\n static sum(members) {\n return IgxNumberSummaryOperand.sum(members);\n }\n /**\n * Returns the average numeric value in the data provided data records.\n * If filtering is applied, returns the average numeric value in the filtered data records.\n * ```typescript\n * IgxPivotNumericAggregate.average(data);\n * ```\n *\n * @memberof IgxPivotNumericAggregate\n */\n static average(members) {\n return IgxNumberSummaryOperand.average(members);\n }\n}\nclass IgxPivotDateAggregate extends IgxPivotAggregate {\n /**\n * Gets array with default aggregator function for date aggregation.\n * ```typescript\n * IgxPivotDateAggregate.aggregators();\n * ```\n *\n * @memberof IgxPivotAggregate\n */\n static aggregators() {\n let result = [];\n result = result.concat(super.aggregators());\n result.push({\n key: 'LATEST',\n label: this.resourceStrings.igx_grid_pivot_aggregate_date_latest,\n aggregator: IgxPivotDateAggregate.latest\n });\n result.push({\n key: 'EARLIEST',\n label: this.resourceStrings.igx_grid_pivot_aggregate_date_earliest,\n aggregator: IgxPivotDateAggregate.earliest\n });\n return result;\n }\n /**\n * Returns the latest date value in the data records.\n * If filtering is applied, returns the latest date value in the filtered data records.\n * ```typescript\n * IgxPivotDateAggregate.latest(data);\n * ```\n *\n * @memberof IgxPivotDateAggregate\n */\n static latest(members) {\n return IgxDateSummaryOperand.latest(members);\n }\n /**\n * Returns the earliest date value in the data records.\n * If filtering is applied, returns the latest date value in the filtered data records.\n * ```typescript\n * IgxPivotDateAggregate.earliest(data);\n * ```\n *\n * @memberof IgxPivotDateAggregate\n */\n static earliest(members) {\n return IgxDateSummaryOperand.earliest(members);\n }\n}\nclass IgxPivotTimeAggregate extends IgxPivotAggregate {\n /**\n * Gets array with default aggregator function for time aggregation.\n * ```typescript\n * IgxPivotTimeAggregate.aggregators();\n * ```\n *\n * @memberof IgxPivotAggregate\n */\n static aggregators() {\n let result = [];\n result = result.concat(super.aggregators());\n result.push({\n key: 'LATEST',\n label: this.resourceStrings.igx_grid_pivot_aggregate_time_latest,\n aggregator: IgxPivotTimeAggregate.latestTime\n });\n result.push({\n key: 'EARLIEST',\n label: this.resourceStrings.igx_grid_pivot_aggregate_time_earliest,\n aggregator: IgxPivotTimeAggregate.earliestTime\n });\n return result;\n }\n /**\n * Returns the latest time value in the data records. Compare only the time part of the date.\n * If filtering is applied, returns the latest time value in the filtered data records.\n * ```typescript\n * IgxPivotTimeAggregate.latestTime(data);\n * ```\n *\n * @memberof IgxPivotTimeAggregate\n */\n static latestTime(members) {\n return IgxTimeSummaryOperand.latestTime(members);\n }\n /**\n * Returns the earliest time value in the data records. Compare only the time part of the date.\n * If filtering is applied, returns the earliest time value in the filtered data records.\n * ```typescript\n * IgxPivotTimeAggregate.earliestTime(data);\n * ```\n *\n * @memberof IgxPivotTimeAggregate\n */\n static earliestTime(members) {\n return IgxTimeSummaryOperand.earliestTime(members);\n }\n}\n\n/**\n* Default pivot keys used for data processing in the pivot pipes.\n*/\nconst DEFAULT_PIVOT_KEYS = {\n aggregations: 'aggregations', records: 'records', children: 'children', level: 'level',\n rowDimensionSeparator: '_', columnDimensionSeparator: '-'\n};\n/** The dimension types - Row, Column or Filter. */\nvar PivotDimensionType;\n(function (PivotDimensionType) {\n PivotDimensionType[PivotDimensionType[\"Row\"] = 0] = \"Row\";\n PivotDimensionType[PivotDimensionType[\"Column\"] = 1] = \"Column\";\n PivotDimensionType[PivotDimensionType[\"Filter\"] = 2] = \"Filter\";\n})(PivotDimensionType || (PivotDimensionType = {}));\n\nclass PivotUtil {\n // go through all children and apply new dimension groups as child\n static processGroups(recs, dimension, pivotKeys) {\n for (const rec of recs) {\n // process existing children\n if (rec.children && rec.children.size > 0) {\n // process hierarchy in dept\n rec.children.forEach((values) => {\n this.processGroups(values, dimension, pivotKeys);\n });\n }\n // add children for current dimension\n const hierarchyFields = PivotUtil\n .getFieldsHierarchy(rec.records, [dimension], PivotDimensionType.Row, pivotKeys);\n const siblingData = PivotUtil\n .processHierarchy(hierarchyFields, pivotKeys, 0);\n rec.children.set(dimension.memberName, siblingData);\n }\n }\n static flattenGroups(data, dimension, expansionStates, defaultExpand, parent, parentRec) {\n for (let i = 0; i < data.length; i++) {\n const rec = data[i];\n const field = dimension.memberName;\n if (!field) {\n continue;\n }\n let recordsData = rec.children.get(field);\n if (!recordsData && parent) {\n // check parent\n recordsData = rec.children.get(parent.memberName);\n if (recordsData) {\n dimension = parent;\n }\n }\n if (parentRec) {\n parentRec.dimensionValues.forEach((value, key) => {\n if (parent.memberName !== key) {\n rec.dimensionValues.set(key, value);\n const dim = parentRec.dimensions.find(x => x.memberName === key);\n rec.dimensions.unshift(dim);\n }\n });\n }\n const expansionRowKey = PivotUtil.getRecordKey(rec, dimension);\n const isExpanded = expansionStates.get(expansionRowKey) === undefined ?\n defaultExpand :\n expansionStates.get(expansionRowKey);\n const shouldExpand = isExpanded || !dimension.childLevel || !rec.dimensionValues.get(dimension.memberName);\n if (shouldExpand && recordsData) {\n if (dimension.childLevel) {\n this.flattenGroups(recordsData, dimension.childLevel, expansionStates, defaultExpand, dimension, rec);\n }\n else {\n // copy parent values and dims in child\n recordsData.forEach(x => {\n rec.dimensionValues.forEach((value, key) => {\n if (dimension.memberName !== key) {\n x.dimensionValues.set(key, value);\n const dim = rec.dimensions.find(y => y.memberName === key);\n x.dimensions.unshift(dim);\n }\n });\n });\n }\n data.splice(i + 1, 0, ...recordsData);\n i += recordsData.length;\n }\n }\n }\n static assignLevels(dims) {\n for (const dim of dims) {\n let currDim = dim;\n let lvl = 0;\n while (currDim.childLevel) {\n currDim.level = lvl;\n currDim = currDim.childLevel;\n lvl++;\n }\n currDim.level = lvl;\n }\n }\n static getFieldsHierarchy(data, dimensions, dimensionType, pivotKeys) {\n const hierarchy = new Map();\n for (const rec of data) {\n const vals = dimensionType === PivotDimensionType.Column ?\n this.extractValuesForColumn(dimensions, rec, pivotKeys) :\n this.extractValuesForRow(dimensions, rec, pivotKeys);\n for (const [_key, val] of vals) { // this should go in depth also vals.children\n if (hierarchy.get(val.value) != null) {\n this.applyHierarchyChildren(hierarchy, val, rec, pivotKeys);\n }\n else {\n hierarchy.set(val.value, cloneValue(val));\n this.applyHierarchyChildren(hierarchy, val, rec, pivotKeys);\n }\n }\n }\n return hierarchy;\n }\n static sort(data, expressions, sorting = new IgxSorting()) {\n data.forEach(rec => {\n const children = rec.children;\n if (children) {\n children.forEach(x => {\n this.sort(x, expressions, sorting);\n });\n }\n });\n return DataUtil.sort(data, expressions, sorting);\n }\n static extractValueFromDimension(dim, recData) {\n return dim.memberFunction ? dim.memberFunction.call(null, recData) : recData[dim.memberName];\n }\n static getDimensionDepth(dim) {\n let lvl = 0;\n while (dim.childLevel) {\n lvl++;\n dim = dim.childLevel;\n }\n return lvl;\n }\n static extractValuesForRow(dims, recData, pivotKeys) {\n const values = new Map();\n for (const col of dims) {\n if (recData[pivotKeys.level] && recData[pivotKeys.level] > 0) {\n const childData = recData[pivotKeys.records];\n return this.getFieldsHierarchy(childData, [col], PivotDimensionType.Row, pivotKeys);\n }\n const value = this.extractValueFromDimension(col, recData);\n const objValue = {};\n objValue['value'] = value;\n objValue['dimension'] = col;\n if (col.childLevel) {\n const childValues = this.extractValuesForRow([col.childLevel], recData, pivotKeys);\n objValue[pivotKeys.children] = childValues;\n }\n values.set(value, objValue);\n }\n return values;\n }\n static extractValuesForColumn(dims, recData, pivotKeys, path = []) {\n const vals = new Map();\n let lvlCollection = vals;\n const flattenedDims = this.flatten(dims);\n for (const col of flattenedDims) {\n const value = this.extractValueFromDimension(col, recData);\n path.push(value);\n const newValue = path.join(pivotKeys.columnDimensionSeparator);\n const newObj = { value: newValue, expandable: col.expandable, children: null, dimension: col };\n if (!newObj.children) {\n newObj.children = new Map();\n }\n lvlCollection.set(newValue, newObj);\n lvlCollection = newObj.children;\n }\n return vals;\n }\n static flatten(arr, lvl = 0) {\n const newArr = arr.reduce((acc, item) => {\n item.level = lvl;\n acc.push(item);\n if (item.childLevel) {\n item.expandable = true;\n acc = acc.concat(this.flatten([item.childLevel], lvl + 1));\n }\n return acc;\n }, []);\n return newArr;\n }\n static applyAggregations(rec, hierarchies, values, pivotKeys) {\n if (hierarchies.size === 0) {\n // no column groups\n const aggregationResult = this.aggregate(rec.records, values);\n this.applyAggregationRecordData(aggregationResult, undefined, rec, pivotKeys);\n return;\n }\n hierarchies.forEach((hierarchy) => {\n const children = hierarchy[pivotKeys.children];\n if (children && children.size > 0) {\n this.applyAggregations(rec, children, values, pivotKeys);\n const childRecords = this.collectRecords(children, pivotKeys);\n hierarchy[pivotKeys.aggregations] = this.aggregate(childRecords, values);\n this.applyAggregationRecordData(hierarchy[pivotKeys.aggregations], hierarchy.value, rec, pivotKeys);\n }\n else if (hierarchy[pivotKeys.records]) {\n hierarchy[pivotKeys.aggregations] = this.aggregate(hierarchy[pivotKeys.records], values);\n this.applyAggregationRecordData(hierarchy[pivotKeys.aggregations], hierarchy.value, rec, pivotKeys);\n }\n });\n }\n static applyAggregationRecordData(aggregationData, groupName, rec, pivotKeys) {\n const aggregationKeys = Object.keys(aggregationData);\n if (aggregationKeys.length > 1) {\n aggregationKeys.forEach((key) => {\n const aggregationKey = groupName ? groupName + pivotKeys.columnDimensionSeparator + key : key;\n rec.aggregationValues.set(aggregationKey, aggregationData[key]);\n });\n }\n else if (aggregationKeys.length === 1) {\n const aggregationKey = aggregationKeys[0];\n rec.aggregationValues.set(groupName || aggregationKey, aggregationData[aggregationKey]);\n }\n }\n static aggregate(records, values) {\n const result = {};\n for (const pivotValue of values) {\n const aggregator = PivotUtil.getAggregatorForType(pivotValue.aggregate, pivotValue.dataType);\n if (!aggregator) {\n throw CurrentResourceStrings.GridResStrings.igx_grid_pivot_no_aggregator.replace(\"{0}\", pivotValue.member);\n }\n result[pivotValue.member] = aggregator(records.map(r => r[pivotValue.member]), records);\n }\n return result;\n }\n static getAggregatorForType(aggregate, dataType) {\n let aggregator = aggregate.aggregator;\n if (aggregate.aggregatorName) {\n let aggregators = IgxPivotNumericAggregate.aggregators();\n if (!dataType || dataType === 'date' || dataType === 'dateTime') {\n aggregators = aggregators.concat(IgxPivotDateAggregate.aggregators());\n }\n else if (dataType === 'time') {\n aggregators = aggregators.concat(IgxPivotTimeAggregate.aggregators());\n }\n aggregator = aggregators.find(x => x.key === aggregate.aggregatorName)?.aggregator;\n }\n return aggregator;\n }\n static processHierarchy(hierarchies, pivotKeys, level = 0, rootData = false) {\n const flatData = [];\n hierarchies.forEach((h, key) => {\n const field = h.dimension.memberName;\n const rec = {\n dimensionValues: new Map(),\n aggregationValues: new Map(),\n children: new Map(),\n dimensions: [h.dimension]\n };\n rec.dimensionValues.set(field, key);\n if (h[pivotKeys.records]) {\n rec.records = this.getDirectLeafs(h[pivotKeys.records]);\n }\n rec.level = level;\n flatData.push(rec);\n if (h[pivotKeys.children] && h[pivotKeys.children].size > 0) {\n const nestedData = this.processHierarchy(h[pivotKeys.children], pivotKeys, level + 1, rootData);\n rec.records = this.getDirectLeafs(nestedData);\n rec.children.set(field, nestedData);\n }\n });\n return flatData;\n }\n static getDirectLeafs(records) {\n let leafs = [];\n for (const rec of records) {\n if (rec.records) {\n const data = rec.records.filter(x => !x.records && leafs.indexOf(x) === -1);\n leafs = leafs.concat(data);\n }\n else {\n leafs.push(rec);\n }\n }\n return leafs;\n }\n static getRecordKey(rec, currentDim) {\n const parentFields = [];\n const currentDimIndex = rec.dimensions.findIndex(x => x.memberName === currentDim.memberName) + 1;\n const prevDims = rec.dimensions.slice(0, currentDimIndex);\n for (const prev of prevDims) {\n const prevValue = rec.dimensionValues.get(prev.memberName);\n parentFields.push(prevValue);\n }\n return parentFields.join('-');\n }\n static buildExpressionTree(config) {\n const allDimensions = (config?.rows || []).concat((config?.columns || [])).concat(config?.filters || []).filter(x => x !== null && x !== undefined);\n const enabledDimensions = allDimensions.filter(x => x && x.enabled);\n const expressionsTree = new FilteringExpressionsTree(FilteringLogic.And);\n // add expression trees from all filters\n PivotUtil.flatten(enabledDimensions).forEach((x) => {\n if (x.filter && x.filter.filteringOperands) {\n expressionsTree.filteringOperands.push(...x.filter.filteringOperands);\n }\n });\n return expressionsTree;\n }\n static collectRecords(children, pivotKeys) {\n let result = [];\n children.forEach(value => result = result.concat(value[pivotKeys.records]));\n return result;\n }\n static applyHierarchyChildren(hierarchy, val, rec, pivotKeys) {\n const recordsKey = pivotKeys.records;\n const childKey = pivotKeys.children;\n const childCollection = val[childKey];\n const hierarchyValue = hierarchy.get(val.value);\n if (Array.isArray(hierarchyValue[childKey])) {\n hierarchyValue[childKey] = new Map();\n }\n if (!childCollection || childCollection.size === 0) {\n const dim = hierarchyValue.dimension;\n const isValid = this.extractValueFromDimension(dim, rec) === val.value;\n if (isValid) {\n if (hierarchyValue[recordsKey]) {\n hierarchyValue[recordsKey].push(rec);\n }\n else {\n hierarchyValue[recordsKey] = [rec];\n }\n }\n }\n else {\n const hierarchyChild = hierarchyValue[childKey];\n for (const [_key, child] of childCollection) {\n let hierarchyChildValue = hierarchyChild.get(child.value);\n if (!hierarchyChildValue) {\n hierarchyChild.set(child.value, child);\n hierarchyChildValue = child;\n }\n if (hierarchyChildValue[recordsKey]) {\n const copy = Object.assign({}, rec);\n if (rec[recordsKey]) {\n // not all nested children are valid\n const nestedValue = hierarchyChildValue.value;\n const dimension = hierarchyChildValue.dimension;\n const validRecs = rec[recordsKey].filter(x => this.extractValueFromDimension(dimension, x) === nestedValue);\n copy[recordsKey] = validRecs;\n }\n hierarchyChildValue[recordsKey].push(copy);\n }\n else {\n hierarchyChildValue[recordsKey] = [rec];\n }\n if (child[childKey] && child[childKey].size > 0) {\n this.applyHierarchyChildren(hierarchyChild, child, rec, pivotKeys);\n }\n }\n }\n }\n static getAggregateList(val, grid) {\n if (!val.aggregateList) {\n let defaultAggr = this.getAggregatorsForValue(val, grid);\n const isDefault = defaultAggr.find((x) => x.key === val.aggregate.key);\n // resolve custom aggregations\n if (!isDefault && grid.data[0][val.member] !== undefined) {\n // if field exists, then we can apply default aggregations and add the custom one.\n defaultAggr.unshift(val.aggregate);\n }\n else if (!isDefault) {\n // otherwise this is a custom aggregation that is not compatible\n // with the defaults, since it operates on field that is not in the data\n // leave only the custom one.\n defaultAggr = [val.aggregate];\n }\n val.aggregateList = defaultAggr;\n }\n return val.aggregateList;\n }\n static getAggregatorsForValue(value, grid) {\n const dataType = value.dataType || grid.resolveDataTypes(grid.data[0][value.member]);\n switch (dataType) {\n case GridColumnDataType.Number:\n case GridColumnDataType.Currency:\n return IgxPivotNumericAggregate.aggregators();\n case GridColumnDataType.Date:\n case GridColumnDataType.DateTime:\n return IgxPivotDateAggregate.aggregators();\n case GridColumnDataType.Time:\n return IgxPivotTimeAggregate.aggregators();\n default:\n return IgxPivotAggregate.aggregators();\n }\n }\n}\n\nclass DefaultPivotGridRecordSortingStrategy extends DefaultSortingStrategy {\n static instance() {\n return this._instance || (this._instance = new this());\n }\n sort(data, fieldName, dir, ignoreCase, valueResolver, isDate, isTime, _grid) {\n const reverse = (dir === SortingDirection.Desc ? -1 : 1);\n const cmpFunc = (obj1, obj2) => this.compareObjects(obj1, obj2, fieldName, reverse, ignoreCase, this.getFieldValue, isDate, isTime);\n return this.arraySort(data, cmpFunc);\n }\n getFieldValue(obj, key, _isDate = false, _isTime = false) {\n return obj.aggregationValues.get(key);\n }\n}\nDefaultPivotGridRecordSortingStrategy._instance = null;\nclass DefaultPivotSortingStrategy extends DefaultSortingStrategy {\n static instance() {\n return this._instance || (this._instance = new this());\n }\n sort(data, fieldName, dir, ignoreCase, valueResolver, isDate, isTime, grid) {\n const key = fieldName;\n const allDimensions = grid.allDimensions;\n const enabledDimensions = allDimensions.filter(x => x && x.enabled);\n this.dimension = PivotUtil.flatten(enabledDimensions).find(x => x.memberName === key);\n const reverse = (dir === SortingDirection.Desc ? -1 : 1);\n const cmpFunc = (obj1, obj2) => this.compareObjects(obj1, obj2, key, reverse, ignoreCase, this.getFieldValue, isDate, isTime);\n return this.arraySort(data, cmpFunc);\n }\n getFieldValue(obj, key, _isDate = false, isTime = false) {\n let resolvedValue = PivotUtil.extractValueFromDimension(this.dimension, obj) || obj[0];\n const formatAsDate = this.dimension.dataType === GridColumnDataType.Date || this.dimension.dataType === GridColumnDataType.DateTime;\n if (formatAsDate) {\n const date = parseDate(resolvedValue);\n resolvedValue = isTime && date ?\n new Date().setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) : date;\n }\n return resolvedValue;\n }\n}\nDefaultPivotSortingStrategy._instance = null;\n\nclass NoopPivotDimensionsStrategy {\n static instance() {\n return this._instance || (this._instance = new NoopPivotDimensionsStrategy());\n }\n process(collection, _, __) {\n return collection;\n }\n}\nNoopPivotDimensionsStrategy._instance = null;\nclass PivotRowDimensionsStrategy {\n static instance() {\n return this._instance || (this._instance = new PivotRowDimensionsStrategy());\n }\n process(collection, rows, values, pivotKeys = DEFAULT_PIVOT_KEYS) {\n let hierarchies;\n let data;\n const prevRowDims = [];\n const currRows = cloneArray(rows, true);\n PivotUtil.assignLevels(currRows);\n if (currRows.length === 0) {\n hierarchies = PivotUtil.getFieldsHierarchy(collection, [{ memberName: '', enabled: true }], PivotDimensionType.Row, pivotKeys);\n // generate flat data from the hierarchies\n data = PivotUtil.processHierarchy(hierarchies, pivotKeys, 0, true);\n return data;\n }\n for (const row of currRows) {\n if (!data) {\n // build hierarchies - groups and subgroups\n hierarchies = PivotUtil.getFieldsHierarchy(collection, [row], PivotDimensionType.Row, pivotKeys);\n // generate flat data from the hierarchies\n data = PivotUtil.processHierarchy(hierarchies, pivotKeys, 0, true);\n prevRowDims.push(row);\n }\n else {\n PivotUtil.processGroups(data, row, pivotKeys);\n }\n }\n return data;\n }\n}\nPivotRowDimensionsStrategy._instance = null;\nclass PivotColumnDimensionsStrategy {\n static instance() {\n return this._instance || (this._instance = new PivotColumnDimensionsStrategy());\n }\n process(collection, columns, values, pivotKeys = DEFAULT_PIVOT_KEYS) {\n const res = this.processHierarchy(collection, columns, values, pivotKeys);\n return res;\n }\n processHierarchy(collection, columns, values, pivotKeys) {\n const result = [];\n collection.forEach(rec => {\n // apply aggregations based on the created groups and generate column fields based on the hierarchies\n this.groupColumns(rec, columns, values, pivotKeys);\n result.push(rec);\n });\n return result;\n }\n groupColumns(rec, columns, values, pivotKeys) {\n const children = rec.children;\n if (children && children.size > 0) {\n children.forEach((childRecs) => {\n if (childRecs) {\n childRecs.forEach(child => {\n this.groupColumns(child, columns, values, pivotKeys);\n });\n }\n });\n }\n this.applyAggregates(rec, columns, values, pivotKeys);\n }\n applyAggregates(rec, columns, values, pivotKeys) {\n const leafRecords = this.getLeafs(rec.records, pivotKeys);\n const hierarchy = PivotUtil.getFieldsHierarchy(leafRecords, columns, PivotDimensionType.Column, pivotKeys);\n PivotUtil.applyAggregations(rec, hierarchy, values, pivotKeys);\n }\n getLeafs(records, pivotKeys) {\n let leafs = [];\n for (const rec of records) {\n if (rec[pivotKeys.records]) {\n leafs = leafs.concat(this.getLeafs(rec[pivotKeys.records], pivotKeys));\n }\n else {\n leafs.push(rec);\n }\n }\n return leafs;\n }\n}\nPivotColumnDimensionsStrategy._instance = null;\nclass DimensionValuesFilteringStrategy extends FilteringStrategy {\n /**\n * Creates a new instance of FormattedValuesFilteringStrategy.\n *\n * @param fields An array of column field names that should be formatted.\n * If omitted the values of all columns which has formatter will be formatted.\n */\n constructor(fields) {\n super();\n this.fields = fields;\n }\n getFieldValue(rec, fieldName, _isDate = false, _isTime = false, grid) {\n const allDimensions = grid.allDimensions;\n const enabledDimensions = allDimensions.filter(x => x && x.enabled);\n const dim = PivotUtil.flatten(enabledDimensions).find(x => x.memberName === fieldName);\n const value = dim.childLevel ? this._getDimensionValueHierarchy(dim, rec).map(x => `[` + x + `]`).join('.') : PivotUtil.extractValueFromDimension(dim, rec);\n return value;\n }\n getFilterItems(column, tree) {\n const grid = column.grid;\n const enabledDimensions = grid.allDimensions.filter(x => x && x.enabled);\n let data = column.grid.gridAPI.filterDataByExpressions(tree);\n const dim = enabledDimensions.find(x => x.memberName === column.field);\n const allValuesHierarchy = PivotUtil.getFieldsHierarchy(data, [dim], PivotDimensionType.Column, grid.pivotKeys);\n const isNoop = grid.pivotConfiguration.columnStrategy instanceof NoopPivotDimensionsStrategy || grid.pivotConfiguration.rowStrategy instanceof NoopPivotDimensionsStrategy;\n const items = !isNoop ? this._getFilterItems(allValuesHierarchy, grid.pivotKeys) : [{ value: '' }];\n return Promise.resolve(items);\n }\n _getFilterItems(hierarchy, pivotKeys) {\n const items = [];\n hierarchy.forEach((value) => {\n const val = value.value;\n const path = val.split(pivotKeys.columnDimensionSeparator);\n const hierarchicalValue = path.length > 1 ? path.map(x => `[` + x + `]`).join('.') : val;\n const text = path[path.length - 1];\n items.push({\n value: hierarchicalValue,\n label: text,\n children: this._getFilterItems(value.children, pivotKeys)\n });\n });\n return items;\n }\n _getDimensionValueHierarchy(dim, rec) {\n let path = [];\n let value = PivotUtil.extractValueFromDimension(dim, rec);\n path.push(value);\n if (dim.childLevel) {\n const childVals = this._getDimensionValueHierarchy(dim.childLevel, rec);\n path = path.concat(childVals);\n }\n return path;\n }\n}\n\n/**\n * @hidden\n */\nclass GroupedRecords extends Array {\n}\n\nclass IgxGridActionButtonComponent {\n constructor() {\n /**\n * Event emitted when action button is clicked.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.actionClick = new EventEmitter();\n /**\n * Whether button action is rendered in menu and should container text label.\n */\n this.asMenuItem = false;\n }\n /** @hidden @internal */\n get containerClass() {\n return 'igx-action-strip__menu-button ' + (this.classNames || '');\n }\n /**\n * @hidden\n * @internal\n */\n handleClick(event) {\n this.actionClick.emit(event);\n }\n /**\n * @hidden @internal\n */\n preventEvent(event) {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n}\nIgxGridActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridActionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxGridActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridActionButtonComponent, selector: \"igx-grid-action-button\", inputs: { asMenuItem: \"asMenuItem\", iconName: \"iconName\", classNames: \"classNames\", iconSet: \"iconSet\", labelText: \"labelText\" }, outputs: { actionClick: \"actionClick\" }, viewQueries: [{ propertyName: \"container\", first: true, predicate: [\"container\"], descendants: true }, { propertyName: \"templateRef\", first: true, predicate: [\"menuItemTemplate\"], descendants: true }], ngImport: i0, template: \"\\n \\n\\n\\n\\n \\n
    \\n {{iconName}}\\n {{iconName}}\\n \\n
    \\n
    \\n
    \", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridActionButtonComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-action-button', template: \"\\n \\n\\n\\n\\n \\n
    \\n {{iconName}}\\n {{iconName}}\\n \\n
    \\n
    \\n
    \" }]\n }], propDecorators: { container: [{\n type: ViewChild,\n args: ['container']\n }], actionClick: [{\n type: Output\n }], templateRef: [{\n type: ViewChild,\n args: ['menuItemTemplate']\n }], asMenuItem: [{\n type: Input\n }], iconName: [{\n type: Input\n }], classNames: [{\n type: Input\n }], iconSet: [{\n type: Input\n }], labelText: [{\n type: Input\n }] } });\n\nconst LabelPosition = mkenum({\n BEFORE: 'before',\n AFTER: 'after'\n});\nlet nextId$1 = 0;\n/**\n * Allows users to make a binary choice for a certain condition.\n *\n * @igxModule IgxCheckboxModule\n *\n * @igxTheme igx-checkbox-theme\n *\n * @igxKeywords checkbox, label\n *\n * @igxGroup Data entry and display\n *\n * @remarks\n * The Ignite UI Checkbox is a selection control that allows users to make a binary choice for a certain condition.It behaves similarly\n * to the native browser checkbox.\n *\n * @example\n * ```html\n * \n * simple checkbox\n * \n * ```\n */\nclass IgxCheckboxComponent {\n /**\n * Returns reference to the `nativeElement` of the igx-checkbox.\n *\n * @example\n * ```typescript\n * let nativeElement = this.checkbox.nativeElement;\n * ```\n */\n get nativeElement() {\n return this.nativeCheckbox.nativeElement;\n }\n /**\n * Sets/gets whether the checkbox is required.\n * If not set, `required` will have value `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isRequired = this.checkbox.required;\n * ```\n */\n get required() {\n return this._required || this.nativeElement.hasAttribute('required');\n }\n set required(value) {\n this._required = (value === '') || value;\n }\n /**\n * Sets/gets whether the checkbox is checked.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isChecked = this.checkbox.checked;\n * ```\n */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n if (this._checked !== value) {\n this._checked = value;\n this._onChangeCallback(this._checked);\n }\n }\n /**\n * Sets/gets whether the checkbox is disabled.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isDisabled = this.checkbox.disabled;\n * ```\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = (value === '') || value;\n }\n /**\n * Sets/gets whether the checkbox is invalid.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isInvalid = this.checkbox.invalid;\n * ```\n */\n get invalid() {\n return this._invalid || false;\n }\n set invalid(value) {\n this._invalid = !!value;\n }\n constructor(cdr, renderer, ngControl) {\n this.cdr = cdr;\n this.renderer = renderer;\n this.ngControl = ngControl;\n /**\n * An event that is emitted after the checkbox state is changed.\n * Provides references to the `IgxCheckboxComponent` and the `checked` property as event arguments.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n this.change = new EventEmitter();\n /**\n * @hidden\n * @internal\n */\n this.destroy$ = new Subject();\n /**\n * Sets/gets the `id` of the checkbox component.\n * If not set, the `id` of the first checkbox component will be `\"igx-checkbox-0\"`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let checkboxId = this.checkbox.id;\n * ```\n */\n this.id = `igx-checkbox-${nextId$1++}`;\n /**\n * Sets/gets the id of the `label` element.\n * If not set, the id of the `label` in the first checkbox component will be `\"igx-checkbox-0-label\"`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let labelId = this.checkbox.labelId;\n * ```\n */\n this.labelId = `${this.id}-label`;\n /**\n * Sets/gets the value of the `tabindex` attribute.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let tabIndex = this.checkbox.tabindex;\n * ```\n */\n this.tabindex = null;\n /**\n * Sets/gets the position of the `label`.\n * If not set, the `labelPosition` will have value `\"after\"`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let labelPosition = this.checkbox.labelPosition;\n * ```\n */\n this.labelPosition = LabelPosition.AFTER;\n /**\n * Enables/Disables the ripple effect.\n * If not set, `disableRipple` will have value `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isRippleDisabled = this.checkbox.desableRipple;\n * ```\n */\n this.disableRipple = false;\n /**\n * Sets/gets the `aria-labelledby` attribute.\n * If not set, the `aria-labelledby` will be equal to the value of `labelId` attribute.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let ariaLabelledBy = this.checkbox.ariaLabelledBy;\n * ```\n */\n this.ariaLabelledBy = this.labelId;\n /**\n * Sets/gets the value of the `aria-label` attribute.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let ariaLabel = this.checkbox.ariaLabel;\n * ```\n */\n this.ariaLabel = null;\n /**\n * Returns the class of the checkbox component.\n *\n * @example\n * ```typescript\n * let class = this.checkbox.cssClass;\n * ```\n */\n this.cssClass = 'igx-checkbox';\n /**\n * Sets/gets whether the checkbox component is on focus.\n * Default value is `false`.\n *\n * @example\n * ```typescript\n * this.checkbox.focused = true;\n * ```\n * ```typescript\n * let isFocused = this.checkbox.focused;\n * ```\n */\n this.focused = false;\n /**\n * Sets/gets the checkbox indeterminate visual state.\n * Default value is `false`;\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isIndeterminate = this.checkbox.indeterminate;\n * ```\n */\n this.indeterminate = false;\n /**\n * Sets/gets whether the checkbox is readonly.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let readonly = this.checkbox.readonly;\n * ```\n */\n this.readonly = false;\n /**\n * Sets/gets whether the checkbox should disable all css transitions.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let disableTransitions = this.checkbox.disableTransitions;\n * ```\n */\n this.disableTransitions = false;\n /**\n * @hidden\n * @internal\n */\n this.inputId = `${this.id}-input`;\n /**\n * @hidden\n * @internal\n */\n this._checked = false;\n /**\n * @hidden\n * @internal\n */\n this._required = false;\n /**\n * @hidden\n * @internal\n */\n this._disabled = false;\n /**\n * @hidden\n * @internal\n */\n this._invalid = false;\n /**\n * @hidden\n */\n this._onTouchedCallback = noop;\n /**\n * @hidden\n */\n this._onChangeCallback = noop;\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n if (this.ngControl) {\n this.ngControl.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(this.updateValidityState.bind(this));\n if (this.ngControl.control.validator || this.ngControl.control.asyncValidator) {\n this._required = this.ngControl?.control?.hasValidator(Validators.required);\n this.cdr.detectChanges();\n }\n }\n }\n /** @hidden @internal */\n onKeyUp(event) {\n event.stopPropagation();\n this.focused = true;\n }\n /** @hidden @internal */\n _onCheckboxClick(event) {\n // Since the original checkbox is hidden and the label\n // is used for styling and to change the checked state of the checkbox,\n // we need to prevent the checkbox click event from bubbling up\n // as it gets triggered on label click\n // NOTE: The above is no longer valid, as the native checkbox is not labeled\n // by the SVG anymore.\n if (this.disabled || this.readonly) {\n // readonly prevents the component from changing state (see toggle() method).\n // However, the native checkbox can still be activated through user interaction (focus + space, label click)\n // Prevent the native change so the input remains in sync\n event.preventDefault();\n return;\n }\n this.nativeCheckbox.nativeElement.focus();\n this.indeterminate = false;\n this.checked = !this.checked;\n this.updateValidityState();\n // K.D. March 23, 2021 Emitting on click and not on the setter because otherwise every component\n // bound on change would have to perform self checks for weather the value has changed because\n // of the initial set on initialization\n this.change.emit({ checked: this._checked, checkbox: this });\n }\n /**\n * @hidden\n * @internal\n */\n get ariaChecked() {\n if (this.indeterminate) {\n return 'mixed';\n }\n else {\n return this.checked;\n }\n }\n /** @hidden @internal */\n _onCheckboxChange(event) {\n // We have to stop the original checkbox change event\n // from bubbling up since we emit our own change event\n event.stopPropagation();\n }\n /** @hidden @internal */\n onBlur() {\n this.focused = false;\n this._onTouchedCallback();\n this.updateValidityState();\n }\n /** @hidden @internal */\n writeValue(value) {\n this._checked = value;\n }\n /** @hidden @internal */\n get labelClass() {\n switch (this.labelPosition) {\n case LabelPosition.BEFORE:\n return `${this.cssClass}__label--before`;\n case LabelPosition.AFTER:\n default:\n return `${this.cssClass}__label`;\n }\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /** @hidden @internal */\n getEditElement() {\n return this.nativeCheckbox.nativeElement;\n }\n /**\n * @hidden\n * @internal\n */\n updateValidityState() {\n if (this.ngControl) {\n if (!this.disabled && !this.indeterminate && !this.readonly &&\n (this.ngControl.control.touched || this.ngControl.control.dirty)) {\n // the control is not disabled and is touched or dirty\n if (this.checked) {\n this._invalid = this.ngControl.invalid;\n }\n else {\n this._invalid = this.required ? true : false;\n }\n }\n else {\n // if the control is untouched, pristine, or disabled, its state is initial. This is when the user did not interact\n // with the checkbox or when the form/control is reset\n this._invalid = false;\n }\n }\n else {\n this.checkNativeValidity();\n }\n }\n /**\n * A function to assign a native validity property of a checkbox.\n * This should be used when there's no ngControl\n *\n * @hidden\n * @internal\n */\n checkNativeValidity() {\n if (!this.disabled && this._required && !this.checked && !this.indeterminate && !this.readonly) {\n this._invalid = true;\n }\n else {\n this._invalid = false;\n }\n }\n}\nIgxCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: { id: \"id\", labelId: \"labelId\", value: \"value\", name: \"name\", tabindex: \"tabindex\", labelPosition: \"labelPosition\", disableRipple: \"disableRipple\", required: \"required\", ariaLabelledBy: [\"aria-labelledby\", \"ariaLabelledBy\"], ariaLabel: [\"aria-label\", \"ariaLabel\"], indeterminate: \"indeterminate\", checked: \"checked\", disabled: \"disabled\", invalid: \"invalid\", readonly: \"readonly\", disableTransitions: \"disableTransitions\" }, outputs: { change: \"change\" }, host: { listeners: { \"keyup\": \"onKeyUp($event)\", \"click\": \"_onCheckboxClick($event)\", \"blur\": \"onBlur()\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-checkbox\": \"this.cssClass\", \"class.igx-checkbox--focused\": \"this.focused\", \"class.igx-checkbox--indeterminate\": \"this.indeterminate\", \"class.igx-checkbox--checked\": \"this.checked\", \"class.igx-checkbox--disabled\": \"this.disabled\", \"class.igx-checkbox--invalid\": \"this.invalid\", \"class.igx-checkbox--plain\": \"this.disableTransitions\" } }, providers: [{\n provide: EDITOR_PROVIDER,\n useExisting: IgxCheckboxComponent,\n multi: true\n }], viewQueries: [{ propertyName: \"nativeCheckbox\", first: true, predicate: [\"checkbox\"], descendants: true, static: true }, { propertyName: \"nativeLabel\", first: true, predicate: [\"label\"], descendants: true, static: true }, { propertyName: \"placeholderLabel\", first: true, predicate: [\"placeholderLabel\"], descendants: true, static: true }], ngImport: i0, template: \"\\n\\n\\n \\n \\n \\n \\n \\n\\n
    \\n\\n\\n\\n \\n\\n\", dependencies: [{ kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCheckboxComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-checkbox', providers: [{\n provide: EDITOR_PROVIDER,\n useExisting: IgxCheckboxComponent,\n multi: true\n }], preserveWhitespaces: false, template: \"\\n\\n\\n \\n \\n \\n \\n \\n\\n
    \\n\\n\\n\\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i5.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; }, propDecorators: { change: [{\n type: Output\n }], nativeCheckbox: [{\n type: ViewChild,\n args: ['checkbox', { static: true }]\n }], nativeLabel: [{\n type: ViewChild,\n args: ['label', { static: true }]\n }], placeholderLabel: [{\n type: ViewChild,\n args: ['placeholderLabel', { static: true }]\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], labelId: [{\n type: Input\n }], value: [{\n type: Input\n }], name: [{\n type: Input\n }], tabindex: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], disableRipple: [{\n type: Input\n }], required: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-checkbox']\n }], focused: [{\n type: HostBinding,\n args: ['class.igx-checkbox--focused']\n }], indeterminate: [{\n type: HostBinding,\n args: ['class.igx-checkbox--indeterminate']\n }, {\n type: Input\n }], checked: [{\n type: HostBinding,\n args: ['class.igx-checkbox--checked']\n }, {\n type: Input\n }], disabled: [{\n type: HostBinding,\n args: ['class.igx-checkbox--disabled']\n }, {\n type: Input\n }], invalid: [{\n type: HostBinding,\n args: ['class.igx-checkbox--invalid']\n }, {\n type: Input\n }], readonly: [{\n type: Input\n }], disableTransitions: [{\n type: HostBinding,\n args: ['class.igx-checkbox--plain']\n }, {\n type: Input\n }], onKeyUp: [{\n type: HostListener,\n args: ['keyup', ['$event']]\n }], _onCheckboxClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }] } });\n/**\n * @hidden\n */\nclass IgxCheckboxModule {\n}\nIgxCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCheckboxModule, declarations: [IgxCheckboxComponent], imports: [IgxRippleModule], exports: [IgxCheckboxComponent] });\nIgxCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCheckboxModule, imports: [IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCheckboxModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxCheckboxComponent],\n exports: [IgxCheckboxComponent],\n imports: [IgxRippleModule]\n }]\n }] });\n\nclass IgxEditRow {\n constructor(id, index, data, grid) {\n this.id = id;\n this.index = index;\n this.data = data;\n this.grid = grid;\n this.rowFormGroup = new FormGroup({});\n this.rowFormGroup = this.grid.validation.create(id, data);\n }\n createEditEventArgs(includeNewValue = true, event) {\n const args = {\n rowID: this.id,\n primaryKey: this.id,\n rowData: this.data,\n oldValue: this.data,\n cancel: false,\n owner: this.grid,\n isAddRow: false,\n valid: this.rowFormGroup.valid,\n event\n };\n if (includeNewValue) {\n args.newValue = this.newData ?? this.data;\n }\n return args;\n }\n createDoneEditEventArgs(cachedRowData, event) {\n const updatedData = this.grid.transactions.enabled ?\n this.grid.transactions.getAggregatedValue(this.id, true) : this.grid.gridAPI.getRowData(this.id);\n const rowData = updatedData ?? this.grid.gridAPI.getRowData(this.id);\n const args = {\n rowID: this.id,\n primaryKey: this.id,\n rowData,\n oldValue: cachedRowData,\n newValue: updatedData,\n owner: this.grid,\n isAddRow: false,\n valid: true,\n event\n };\n return args;\n }\n getClassName() {\n return this.constructor.name;\n }\n}\nclass IgxAddRow extends IgxEditRow {\n constructor(id, index, data, recordRef, grid) {\n super(id, index, data, grid);\n this.recordRef = recordRef;\n this.isAddRow = true;\n }\n createEditEventArgs(includeNewValue = true, event) {\n const args = super.createEditEventArgs(includeNewValue, event);\n args.oldValue = null;\n args.isAddRow = true;\n return args;\n }\n createDoneEditEventArgs(cachedRowData, event) {\n const args = super.createDoneEditEventArgs(null, event);\n args.isAddRow = true;\n return args;\n }\n}\nclass IgxCell {\n constructor(id, rowIndex, column, value, _editValue, rowData, grid) {\n this.id = id;\n this.rowIndex = rowIndex;\n this.column = column;\n this.value = value;\n this._editValue = _editValue;\n this.rowData = rowData;\n this.grid = grid;\n this.grid.validation.create(id.rowID, rowData);\n }\n get editValue() {\n const formControl = this.grid.validation.getFormControl(this.id.rowID, this.column.field);\n if (formControl) {\n return formControl.value;\n }\n }\n set editValue(value) {\n const formControl = this.grid.validation.getFormControl(this.id.rowID, this.column.field);\n if (this.grid.validationTrigger === 'change') {\n // in case trigger is change, mark as touched.\n formControl.setValue(value);\n formControl.markAsTouched();\n }\n else {\n this.pendingValue = value;\n }\n }\n castToNumber(value) {\n if (this.column.dataType === 'number' && !this.column.inlineEditorTemplate) {\n const v = parseFloat(value);\n return !isNaN(v) && isFinite(v) ? v : 0;\n }\n return value;\n }\n createEditEventArgs(includeNewValue = true, event) {\n const formControl = this.grid.validation.getFormControl(this.id.rowID, this.column.field);\n const args = {\n rowID: this.id.rowID,\n primaryKey: this.id.rowID,\n cellID: this.id,\n rowData: this.rowData,\n oldValue: this.value,\n cancel: false,\n column: this.column,\n owner: this.grid,\n valid: formControl ? formControl.valid : true,\n event\n };\n if (includeNewValue) {\n args.newValue = this.castToNumber(this.editValue);\n }\n return args;\n }\n createDoneEditEventArgs(value, event) {\n const updatedData = this.grid.transactions.enabled ?\n this.grid.transactions.getAggregatedValue(this.id.rowID, true) : this.rowData;\n const rowData = updatedData === null ? this.grid.gridAPI.getRowData(this.id.rowID) : updatedData;\n const formControl = this.grid.validation.getFormControl(this.id.rowID, this.column.field);\n const args = {\n rowID: this.id.rowID,\n primaryKey: this.id.rowID,\n cellID: this.id,\n // rowData - should be the updated/committed rowData - this effectively should be the newValue\n // the only case we use this.rowData directly, is when there is no rowEditing or transactions enabled\n rowData,\n oldValue: this.value,\n valid: formControl ? formControl.valid : true,\n newValue: value,\n column: this.column,\n owner: this.grid,\n event\n };\n return args;\n }\n}\nclass IgxCellCrudState {\n constructor() {\n this.cell = null;\n this.row = null;\n this.isInCompositionMode = false;\n }\n createCell(cell) {\n return this.cell = new IgxCell(cell.cellID || cell.id, cell.row.index, cell.column, cell.value, cell.value, cell.row.data, cell.grid);\n }\n createRow(cell) {\n return this.row = new IgxEditRow(cell.id.rowID, cell.rowIndex, cell.rowData, cell.grid);\n }\n sameRow(rowID) {\n return this.row && this.row.id === rowID;\n }\n sameCell(cell) {\n return (this.cell.id.rowID === cell.id.rowID &&\n this.cell.id.columnID === cell.id.columnID);\n }\n get cellInEditMode() {\n return !!this.cell;\n }\n beginCellEdit(event) {\n const args = this.cell.createEditEventArgs(false, event);\n this.grid.cellEditEnter.emit(args);\n if (args.cancel) {\n this.endCellEdit();\n }\n }\n cellEdit(event) {\n const args = this.cell.createEditEventArgs(true, event);\n this.grid.cellEdit.emit(args);\n return args;\n }\n updateCell(exit, event) {\n if (!this.cell) {\n return;\n }\n const formControl = this.grid.validation.getFormControl(this.cell.id.rowID, this.cell.column.field);\n if (this.grid.validationTrigger === 'blur' && this.cell.pendingValue !== undefined) {\n // in case trigger is blur, update value if there's a pending one and mark as touched.\n formControl.setValue(this.cell.pendingValue);\n formControl.markAsTouched();\n }\n if (this.grid.validationTrigger === 'blur') {\n this.grid.tbody.nativeElement.focus({ preventScroll: true });\n }\n let doneArgs;\n if (this.cell.column.dataType === 'date' && !isDate(this.cell.value)) {\n if (isEqual(DateTimeUtil.parseIsoDate(this.cell.value), this.cell.editValue)) {\n doneArgs = this.exitCellEdit(event);\n return doneArgs;\n }\n }\n if (isEqual(this.cell.value, this.cell.editValue)) {\n doneArgs = this.exitCellEdit(event);\n return doneArgs;\n }\n const args = this.cellEdit(event);\n if (args.cancel) {\n return args;\n }\n this.grid.gridAPI.update_cell(this.cell);\n doneArgs = this.cellEditDone(event, false);\n if (exit) {\n doneArgs = this.exitCellEdit(event);\n }\n return { ...args, ...doneArgs };\n }\n cellEditDone(event, addRow) {\n const newValue = this.cell.castToNumber(this.cell.editValue);\n const doneArgs = this.cell.createDoneEditEventArgs(newValue, event);\n this.grid.cellEditDone.emit(doneArgs);\n if (addRow) {\n doneArgs.rowData = this.row.data;\n }\n return doneArgs;\n }\n /** Exit cell edit mode */\n exitCellEdit(event) {\n if (!this.cell) {\n return;\n }\n const newValue = this.cell.castToNumber(this.cell.editValue);\n const args = this.cell?.createDoneEditEventArgs(newValue, event);\n this.cell.value = newValue;\n this.grid.cellEditExit.emit(args);\n this.endCellEdit();\n return args;\n }\n /** Clears cell editing state */\n endCellEdit() {\n this.cell = null;\n }\n /** Returns whether the targeted cell is in edit mode */\n targetInEdit(rowIndex, columnIndex) {\n if (!this.cell) {\n return false;\n }\n const res = this.cell.column.index === columnIndex && this.cell.rowIndex === rowIndex;\n return res;\n }\n}\nclass IgxRowCrudState extends IgxCellCrudState {\n constructor() {\n super(...arguments);\n this.closeRowEditingOverlay = new Subject();\n this._rowEditingBlocked = false;\n this._rowEditingStarted = false;\n }\n get primaryKey() {\n return this.grid.primaryKey;\n }\n get rowInEditMode() {\n const editRowState = this.row;\n return editRowState !== null ? this.grid.rowList.find(e => e.key === editRowState.id) : null;\n }\n get rowEditing() {\n return this.grid.rowEditable;\n }\n get nonEditable() {\n return this.grid.rowEditable && (this.grid.primaryKey === undefined || this.grid.primaryKey === null);\n }\n get rowEditingBlocked() {\n return this._rowEditingBlocked;\n }\n set rowEditingBlocked(val) {\n this._rowEditingBlocked = val;\n }\n /** Enters row edit mode */\n beginRowEdit(event) {\n if (!this.row || !(this.row.getClassName() === IgxEditRow.name)) {\n if (!this.row) {\n this.createRow(this.cell);\n }\n if (!this._rowEditingStarted) {\n const rowArgs = this.row.createEditEventArgs(false, event);\n this.grid.rowEditEnter.emit(rowArgs);\n if (rowArgs.cancel) {\n this.endEditMode();\n return true;\n }\n this._rowEditingStarted = true;\n }\n this.row.transactionState = this.grid.transactions.getAggregatedValue(this.row.id, true);\n this.grid.transactions.startPending();\n this.grid.openRowOverlay(this.row.id);\n }\n }\n rowEdit(event) {\n const args = this.row.createEditEventArgs(true, event);\n this.grid.rowEdit.emit(args);\n return args;\n }\n updateRow(commit, event) {\n if (!this.grid.rowEditable ||\n this.grid.rowEditingOverlay &&\n this.grid.rowEditingOverlay.collapsed || !this.row) {\n return {};\n }\n let args;\n if (commit) {\n this.row.newData = this.grid.transactions.getAggregatedValue(this.row.id, true);\n this.updateRowEditData(this.row, this.row.newData);\n args = this.rowEdit(event);\n if (args.cancel) {\n return args;\n }\n }\n args = this.endRowTransaction(commit, event);\n return args;\n }\n /**\n * @hidden @internal\n */\n endRowTransaction(commit, event) {\n this.row.newData = this.grid.transactions.getAggregatedValue(this.row.id, true);\n let rowEditArgs = this.row.createEditEventArgs(true, event);\n let nonCancelableArgs;\n if (!commit) {\n this.grid.transactions.endPending(false);\n const isAddRow = this.row && this.row.getClassName() === IgxAddRow.name;\n const id = this.row ? this.row.id : this.cell.id.rowID;\n if (isAddRow) {\n this.grid.validation.clear(id);\n }\n else {\n this.grid.validation.update(id, rowEditArgs.oldValue);\n }\n }\n else if (this.row.getClassName() === IgxEditRow.name) {\n rowEditArgs = this.grid.gridAPI.update_row(this.row, this.row.newData, event);\n nonCancelableArgs = this.rowEditDone(rowEditArgs.oldValue, event);\n }\n else {\n const rowAddArgs = this.row.createEditEventArgs(true, event);\n this.grid.rowAdd.emit(rowAddArgs);\n if (rowAddArgs.cancel) {\n return rowAddArgs;\n }\n this.grid.transactions.endPending(false);\n const parentId = this.getParentRowId();\n this.grid.gridAPI.addRowToData(this.row.newData ?? this.row.data, parentId);\n this.grid.triggerPipes();\n nonCancelableArgs = this.rowEditDone(null, event);\n }\n nonCancelableArgs = this.exitRowEdit(rowEditArgs.oldValue, event);\n return { ...nonCancelableArgs, ...rowEditArgs };\n }\n rowEditDone(cachedRowData, event) {\n const doneArgs = this.row.createDoneEditEventArgs(cachedRowData, event);\n this.grid.rowEditDone.emit(doneArgs);\n return doneArgs;\n }\n /** Exit row edit mode */\n exitRowEdit(cachedRowData, event) {\n const nonCancelableArgs = this.row.createDoneEditEventArgs(cachedRowData, event);\n this.grid.rowEditExit.emit(nonCancelableArgs);\n this.grid.closeRowEditingOverlay();\n this.endRowEdit();\n return nonCancelableArgs;\n }\n /** Clears row editing state */\n endRowEdit() {\n this.row = null;\n this.rowEditingBlocked = false;\n this._rowEditingStarted = false;\n }\n /** Clears cell and row editing state and closes row editing template if it is open */\n endEditMode() {\n this.endCellEdit();\n if (this.grid.rowEditable) {\n this.endRowEdit();\n this.grid.closeRowEditingOverlay();\n }\n }\n updateRowEditData(row, value) {\n const grid = this.grid;\n const rowInEditMode = grid.gridAPI.crudService.row;\n row.newData = value ?? rowInEditMode.transactionState;\n if (rowInEditMode && row.id === rowInEditMode.id) {\n // do not use spread operator here as it will copy everything over an empty object with no descriptors\n row.data = Object.assign(copyDescriptors(row.data), row.data, rowInEditMode.transactionState);\n // TODO: Workaround for updating a row in edit mode through the API\n }\n else if (this.grid.transactions.enabled) {\n const state = grid.transactions.getState(row.id);\n row.data = state ? Object.assign({}, row.data, state.value) : row.data;\n }\n }\n getParentRowId() {\n return null;\n }\n}\nclass IgxRowAddCrudState extends IgxRowCrudState {\n constructor() {\n super(...arguments);\n this.addRowParent = null;\n }\n /**\n * @hidden @internal\n */\n createAddRow(parentRow, asChild) {\n this.createAddRowParent(parentRow, asChild);\n const newRec = this.grid.getEmptyRecordObjectFor(parentRow);\n const addRowIndex = this.addRowParent.index + 1;\n return this.row = new IgxAddRow(newRec.rowID, addRowIndex, newRec.data, newRec.recordRef, this.grid);\n }\n /**\n * @hidden @internal\n */\n createAddRowParent(row, newRowAsChild) {\n const rowIndex = row ? row.index : -1;\n const rowId = row ? row.key : (rowIndex >= 0 ? this.grid.rowList.last.key : null);\n const isInPinnedArea = this.grid.isRecordPinnedByViewIndex(rowIndex);\n const pinIndex = this.grid.pinnedRecords.findIndex(x => x[this.primaryKey] === rowId);\n const unpinIndex = this.grid.getUnpinnedIndexById(rowId);\n this.addRowParent = {\n rowID: rowId,\n index: isInPinnedArea ? pinIndex : unpinIndex,\n asChild: newRowAsChild,\n isPinned: isInPinnedArea\n };\n }\n /**\n * @hidden @internal\n */\n endRowTransaction(commit, event) {\n const isAddRow = this.row && this.row.getClassName() === IgxAddRow.name;\n if (isAddRow) {\n this.grid.rowAdded.pipe(first$1()).subscribe((addRowArgs) => {\n const rowData = addRowArgs.data;\n const pinnedIndex = this.grid.pinnedRecords.findIndex(x => x[this.primaryKey] === rowData[this.primaryKey]);\n // A check whether the row is in the current view\n const viewIndex = pinnedIndex !== -1 ? pinnedIndex : this._findRecordIndexInView(rowData);\n const dataIndex = this.grid.filteredSortedData.findIndex(data => data[this.primaryKey] === rowData[this.primaryKey]);\n const isInView = viewIndex !== -1 && !this.grid.navigation.shouldPerformVerticalScroll(viewIndex, 0);\n const showIndex = isInView ? -1 : dataIndex;\n this.grid.showSnackbarFor(showIndex);\n });\n }\n const args = super.endRowTransaction(commit, event);\n if (args.cancel) {\n return args;\n }\n if (isAddRow) {\n this.endAddRow();\n if (commit) {\n // this.grid.rowAddedNotifier.next({ data: args.newValue, owner: this.grid });\n // this.grid.rowAdded.emit({ data: args.newValue, owner: this.grid });\n const rowAddedEventArgs = { data: args.newValue, owner: this.grid, primaryKey: args.newValue[this.grid.primaryKey] };\n this.grid.rowAddedNotifier.next(rowAddedEventArgs);\n this.grid.rowAdded.emit(rowAddedEventArgs);\n }\n }\n return args;\n }\n /**\n * @hidden @internal\n */\n endAddRow() {\n this.addRowParent = null;\n this.grid.triggerPipes();\n }\n /**\n * @hidden\n * @internal\n * TODO: consider changing modifier\n */\n _findRecordIndexInView(rec) {\n return this.grid.dataView.findIndex(data => data[this.primaryKey] === rec[this.primaryKey]);\n }\n getParentRowId() {\n if (this.addRowParent.asChild) {\n return this.addRowParent.asChild ? this.addRowParent.rowID : undefined;\n }\n else if (this.addRowParent.rowID !== null && this.addRowParent.rowID !== undefined) {\n const spawnedForRecord = this.grid.gridAPI.get_rec_by_id(this.addRowParent.rowID);\n return spawnedForRecord?.parent?.rowID;\n }\n }\n}\nclass IgxGridCRUDService extends IgxRowAddCrudState {\n enterEditMode(cell, event) {\n if (this.isInCompositionMode) {\n return;\n }\n if (this.nonEditable) {\n console.warn('The grid must have a `primaryKey` specified when using `rowEditable`!');\n return;\n }\n if (this.cellInEditMode) {\n // TODO: case solely for f2/enter nav that uses enterEditMode as toggle. Refactor.\n const canceled = this.endEdit(true, event);\n if (!canceled || !this.cell) {\n this.grid.tbody.nativeElement.focus();\n }\n }\n else {\n if (this.rowEditing) {\n // TODO rowData\n if (this.row && !this.sameRow(cell?.cellID?.rowID)) {\n this.rowEditingBlocked = this.endEdit(true, event);\n if (this.rowEditingBlocked) {\n return true;\n }\n this.rowEditingBlocked = false;\n this.endRowEdit();\n }\n this.createCell(cell);\n const canceled = this.beginRowEdit(event);\n if (!canceled) {\n this.beginCellEdit(event);\n }\n }\n else {\n this.createCell(cell);\n this.beginCellEdit(event);\n }\n }\n }\n /**\n * Enters add row mode by creating temporary dummy so the user can fill in new row cells.\n *\n * @param parentRow Parent row after which the Add Row UI will be rendered.\n * If `null` will show it at the bottom after all rows (or top if there are not rows).\n * @param asChild Specifies if the new row should be added as a child to a tree row.\n * @param event Base event that triggered the add row mode.\n */\n enterAddRowMode(parentRow, asChild, event) {\n if (!this.rowEditing && (this.grid.primaryKey === undefined || this.grid.primaryKey === null)) {\n console.warn('The grid must use row edit mode to perform row adding! Please set rowEditable to true.');\n return;\n }\n this.endEdit(true, event);\n if (parentRow != null && this.grid.expansionStates.get(parentRow.key)) {\n this.grid.collapseRow(parentRow.key);\n }\n this.createAddRow(parentRow, asChild);\n this.grid.transactions.startPending();\n if (this.addRowParent.isPinned) {\n // If parent is pinned, add the new row to pinned records\n this.grid._pinnedRecordIDs.splice(this.row.index, 0, this.row.id);\n }\n this.grid.triggerPipes();\n this.grid.notifyChanges(true);\n this.grid.navigateTo(this.row.index, -1);\n // when selecting the dummy row we need to adjust for top pinned rows\n const indexAdjust = this.grid.isRowPinningToTop ?\n (!this.addRowParent.isPinned ? this.grid.pinnedRows.length : 0) :\n (!this.addRowParent.isPinned ? 0 : this.grid.unpinnedRecords.length);\n // TODO: Type this without shoving a bunch of internal properties in the row type\n const dummyRow = this.grid.gridAPI.get_row_by_index(this.row.index + indexAdjust);\n dummyRow.triggerAddAnimation();\n dummyRow.cdr.detectChanges();\n dummyRow.addAnimationEnd.pipe(first$1()).subscribe(() => {\n const cell = dummyRow.cells.find(c => c.editable);\n if (cell) {\n this.grid.gridAPI.update_cell(this.cell);\n this.enterEditMode(cell, event);\n cell.activate();\n }\n });\n }\n /**\n * Finishes the row transactions on the current row.\n *\n * @remarks\n * If `commit === true`, passes them from the pending state to the data (or transaction service)\n * @example\n * ```html\n * \n * ```\n * @param commit\n */\n // TODO: Implement the same representation of the method without evt emission.\n endEdit(commit = true, event) {\n if (!this.row && !this.cell) {\n return;\n }\n let args;\n if (commit) {\n args = this.updateCell(true, event);\n if (args && args.cancel) {\n return args.cancel;\n }\n }\n else {\n // needede because this.cell is null after exitCellEdit\n // thus the next if is always false\n const cell = this.cell;\n this.exitCellEdit(event);\n if (!this.grid.rowEditable && cell) {\n const value = this.grid.transactions.getAggregatedValue(cell.id.rowID, true) || cell.rowData;\n this.grid.validation.update(cell.id.rowID, value);\n }\n }\n args = this.updateRow(commit, event);\n this.rowEditingBlocked = args.cancel;\n if (args.cancel) {\n return true;\n }\n const activeCell = this.grid.selectionService.activeElement;\n if (event && activeCell) {\n const rowIndex = activeCell.row;\n const visibleColIndex = activeCell.layout ? activeCell.layout.columnVisibleIndex : activeCell.column;\n this.grid.navigateTo(rowIndex, visibleColIndex);\n }\n return false;\n }\n}\nIgxGridCRUDService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCRUDService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxGridCRUDService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCRUDService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCRUDService, decorators: [{\n type: Injectable\n }] });\n\nconst IGX_GRID_BASE = new InjectionToken('IgxGridBaseToken');\nconst IGX_GRID_SERVICE_BASE = new InjectionToken('IgxGridServiceBaseToken');\n\nclass IgxGridSelectionService {\n /**\n * Returns the current selected ranges in the grid from both\n * keyboard and pointer interactions\n */\n get ranges() {\n // The last action was keyboard + shift selection -> add it\n this.addKeyboardRange();\n const ranges = Array.from(this._ranges).map(range => JSON.parse(range));\n // No ranges but we have a focused cell -> add it\n if (!ranges.length && this.activeElement && this.grid.isCellSelectable) {\n ranges.push(this.generateRange(this.activeElement));\n }\n return ranges;\n }\n get primaryButton() {\n return this.pointerState.primaryButton;\n }\n set primaryButton(value) {\n this.pointerState.primaryButton = value;\n }\n constructor(zone, platform) {\n this.zone = zone;\n this.platform = platform;\n this.dragMode = false;\n this.keyboardState = {};\n this.pointerState = {};\n this.columnsState = {};\n this.selection = new Map();\n this.temp = new Map();\n this.rowSelection = new Set();\n this.indeterminateRows = new Set();\n this.columnSelection = new Set();\n /**\n * @hidden @internal\n */\n this.selectedRowsChange = new Subject();\n /**\n * Toggled when a pointerdown event is triggered inside the grid body (cells).\n * When `false` the drag select behavior is disabled.\n */\n this.pointerEventInGridBody = false;\n this._ranges = new Set();\n this.pointerOriginHandler = (event) => {\n this.pointerEventInGridBody = false;\n document.body.removeEventListener('pointerup', this.pointerOriginHandler);\n const targetTagName = event.target.tagName.toLowerCase();\n if (targetTagName !== 'igx-grid-cell' && targetTagName !== 'igx-tree-grid-cell') {\n this.pointerUp(this._lastSelectedNode, this.grid.rangeSelected, true);\n }\n };\n this.initPointerState();\n this.initKeyboardState();\n this.initColumnsState();\n }\n /**\n * Resets the keyboard state\n */\n initKeyboardState() {\n this.keyboardState.node = null;\n this.keyboardState.shift = false;\n this.keyboardState.range = null;\n this.keyboardState.active = false;\n }\n /**\n * Resets the pointer state\n */\n initPointerState() {\n this.pointerState.node = null;\n this.pointerState.ctrl = false;\n this.pointerState.shift = false;\n this.pointerState.range = null;\n this.pointerState.primaryButton = true;\n }\n /**\n * Resets the columns state\n */\n initColumnsState() {\n this.columnsState.field = null;\n this.columnsState.range = [];\n }\n /**\n * Adds a single node.\n * Single clicks | Ctrl + single clicks on cells is the usual case.\n */\n add(node, addToRange = true) {\n if (this.selection.has(node.row)) {\n this.selection.get(node.row).add(node.column);\n }\n else {\n this.selection.set(node.row, new Set()).get(node.row).add(node.column);\n }\n if (addToRange) {\n this._ranges.add(JSON.stringify(this.generateRange(node)));\n }\n }\n /**\n * Adds the active keyboard range selection (if any) to the `ranges` meta.\n */\n addKeyboardRange() {\n if (this.keyboardState.range) {\n this._ranges.add(JSON.stringify(this.keyboardState.range));\n }\n }\n remove(node) {\n if (this.selection.has(node.row)) {\n this.selection.get(node.row).delete(node.column);\n }\n if (this.isActiveNode(node)) {\n this.activeElement = null;\n }\n this._ranges.delete(JSON.stringify(this.generateRange(node)));\n }\n isInMap(node) {\n return (this.selection.has(node.row) && this.selection.get(node.row).has(node.column)) ||\n (this.temp.has(node.row) && this.temp.get(node.row).has(node.column));\n }\n selected(node) {\n return (this.isActiveNode(node) && this.grid.isCellSelectable) || this.isInMap(node);\n }\n isActiveNode(node) {\n if (this.activeElement) {\n const isActive = this.activeElement.column === node.column && this.activeElement.row === node.row;\n if (this.grid.hasColumnLayouts) {\n const layout = this.activeElement.layout;\n return isActive && this.isActiveLayout(layout, node.layout);\n }\n return isActive;\n }\n return false;\n }\n isActiveLayout(current, target) {\n return current.columnVisibleIndex === target.columnVisibleIndex;\n }\n addRangeMeta(node, state) {\n this._ranges.add(JSON.stringify(this.generateRange(node, state)));\n }\n removeRangeMeta(node, state) {\n this._ranges.delete(JSON.stringify(this.generateRange(node, state)));\n }\n /**\n * Generates a new selection range from the given `node`.\n * If `state` is passed instead it will generate the range based on the passed `node`\n * and the start node of the `state`.\n */\n generateRange(node, state) {\n this._lastSelectedNode = node;\n if (!state) {\n return {\n rowStart: node.row,\n rowEnd: node.row,\n columnStart: node.column,\n columnEnd: node.column\n };\n }\n const { row, column } = state.node;\n const rowStart = Math.min(node.row, row);\n const rowEnd = Math.max(node.row, row);\n const columnStart = Math.min(node.column, column);\n const columnEnd = Math.max(node.column, column);\n return { rowStart, rowEnd, columnStart, columnEnd };\n }\n /**\n *\n */\n keyboardStateOnKeydown(node, shift, shiftTab) {\n this.keyboardState.active = true;\n this.initPointerState();\n this.keyboardState.shift = shift && !shiftTab;\n if (!this.grid.navigation.isDataRow(node.row)) {\n return;\n }\n // Kb navigation with shift and no previous node.\n // Clear the current selection init the start node.\n if (this.keyboardState.shift && !this.keyboardState.node) {\n this.clear();\n this.keyboardState.node = Object.assign({}, node);\n }\n }\n keyboardStateOnFocus(node, emitter, dom) {\n const kbState = this.keyboardState;\n // Focus triggered by keyboard navigation\n if (kbState.active) {\n if (this.platform.isChromium) {\n this._moveSelectionChrome(dom);\n }\n // Start generating a range if shift is hold\n if (kbState.shift) {\n this.dragSelect(node, kbState);\n kbState.range = this.generateRange(node, kbState);\n emitter.emit(this.generateRange(node, kbState));\n return;\n }\n this.initKeyboardState();\n this.clear();\n this.add(node);\n }\n }\n pointerDown(node, shift, ctrl) {\n this.addKeyboardRange();\n this.initKeyboardState();\n this.pointerState.ctrl = ctrl;\n this.pointerState.shift = shift;\n this.pointerEventInGridBody = true;\n document.body.addEventListener('pointerup', this.pointerOriginHandler);\n // No ctrl key pressed - no multiple selection\n if (!ctrl) {\n this.clear();\n }\n if (shift) {\n // No previously 'clicked' node. Use the last active node.\n if (!this.pointerState.node) {\n this.pointerState.node = this.activeElement || node;\n }\n this.pointerDownShiftKey(node);\n this.clearTextSelection();\n return;\n }\n this.removeRangeMeta(node);\n this.pointerState.node = node;\n }\n pointerDownShiftKey(node) {\n this.clear();\n this.selectRange(node, this.pointerState);\n }\n mergeMap(target, source) {\n const iterator = source.entries();\n let pair = iterator.next();\n let key;\n let value;\n while (!pair.done) {\n [key, value] = pair.value;\n if (target.has(key)) {\n const newValue = target.get(key);\n value.forEach(record => newValue.add(record));\n target.set(key, newValue);\n }\n else {\n target.set(key, value);\n }\n pair = iterator.next();\n }\n }\n pointerEnter(node, event) {\n // https://www.w3.org/TR/pointerevents/#the-button-property\n this.dragMode = (event.buttons === 1 && (event.button === -1 || event.button === 0)) && this.pointerEventInGridBody;\n if (!this.dragMode) {\n return false;\n }\n this.clearTextSelection();\n // If the users triggers a drag-like event by first clicking outside the grid cells\n // and then enters in the grid body we may not have a initial pointer starting node.\n // Assume the first pointerenter node is where we start.\n if (!this.pointerState.node) {\n this.pointerState.node = node;\n }\n if (this.pointerState.ctrl) {\n this.selectRange(node, this.pointerState, this.temp);\n }\n else {\n this.dragSelect(node, this.pointerState);\n }\n return true;\n }\n pointerUp(node, emitter, firedOutsideGrid) {\n if (this.dragMode || firedOutsideGrid) {\n this.restoreTextSelection();\n this.addRangeMeta(node, this.pointerState);\n this.mergeMap(this.selection, this.temp);\n this.zone.runTask(() => emitter.emit(this.generateRange(node, this.pointerState)));\n this.temp.clear();\n this.dragMode = false;\n return true;\n }\n if (this.pointerState.shift) {\n this.clearTextSelection();\n this.restoreTextSelection();\n this.addRangeMeta(node, this.pointerState);\n emitter.emit(this.generateRange(node, this.pointerState));\n return true;\n }\n if (this.pointerEventInGridBody && this.isActiveNode(node)) {\n this.add(node);\n }\n return false;\n }\n selectRange(node, state, collection = this.selection) {\n if (collection === this.temp) {\n collection.clear();\n }\n const { rowStart, rowEnd, columnStart, columnEnd } = this.generateRange(node, state);\n for (let i = rowStart; i <= rowEnd; i++) {\n for (let j = columnStart; j <= columnEnd; j++) {\n if (collection.has(i)) {\n collection.get(i).add(j);\n }\n else {\n collection.set(i, new Set()).get(i).add(j);\n }\n }\n }\n }\n dragSelect(node, state) {\n if (!this.pointerState.ctrl) {\n this.selection.clear();\n }\n this.selectRange(node, state);\n }\n clear(clearAcriveEl = false) {\n if (clearAcriveEl) {\n this.activeElement = null;\n }\n this.selection.clear();\n this.temp.clear();\n this._ranges.clear();\n }\n clearTextSelection() {\n const selection = window.getSelection();\n if (selection.rangeCount) {\n this._selectionRange = selection.getRangeAt(0);\n this._selectionRange.collapse(true);\n selection.removeAllRanges();\n }\n }\n restoreTextSelection() {\n const selection = window.getSelection();\n if (!selection.rangeCount) {\n selection.addRange(this._selectionRange || document.createRange());\n }\n }\n getSelectedRowsData() {\n if (this.grid.isPivot) {\n return this.grid.dataView.filter(r => {\n const keys = r.dimensions.map(d => PivotUtil.getRecordKey(r, d));\n return keys.some(k => this.isPivotRowSelected(k));\n });\n }\n if (this.rowSelection.size && this.grid.totalItemCount || this.grid.pagingMode === GridPagingMode.Remote) {\n if (!this.grid.primaryKey) {\n return Array.from(this.rowSelection);\n }\n const selection = [];\n this.rowSelection.forEach(rID => {\n const rData = this.grid.gridAPI.get_all_data(true).find(row => this.getRecordKey(row) === rID);\n const partialRowData = {};\n partialRowData[this.grid.primaryKey] = rID;\n selection.push(rData ? rData : partialRowData);\n });\n return selection;\n }\n return this.rowSelection.size ? this.grid.gridAPI.get_all_data(true).filter(row => this.rowSelection.has(this.getRecordKey(row))) : [];\n }\n /** Returns array of the selected row id's. */\n getSelectedRows() {\n return this.rowSelection.size ? Array.from(this.rowSelection.keys()) : [];\n }\n /** Returns array of the rows in indeterminate state. */\n getIndeterminateRows() {\n return this.indeterminateRows.size ? Array.from(this.indeterminateRows.keys()) : [];\n }\n /** Clears row selection, if filtering is applied clears only selected rows from filtered data. */\n clearRowSelection(event) {\n const selectedRows = this.getSelectedRowsData();\n const removedRec = this.isFilteringApplied() ?\n this.allData.filter(row => this.isRowSelected(this.getRecordKey(row))) : selectedRows;\n const newSelection = this.isFilteringApplied() ? selectedRows.filter(x => !removedRec.includes(x)) : [];\n this.emitRowSelectionEvent(newSelection, [], removedRec, event, selectedRows);\n }\n /** Select all rows, if filtering is applied select only from filtered data. */\n selectAllRows(event) {\n const addedRows = this.allData.filter((row) => !this.isRowSelected(this.getRecordKey(row)));\n const selectedRows = this.getSelectedRowsData();\n const newSelection = this.rowSelection.size ? selectedRows.concat(addedRows) : addedRows;\n this.indeterminateRows.clear();\n this.emitRowSelectionEvent(newSelection, addedRows, [], event, selectedRows);\n }\n /** Select the specified row and emit event. */\n selectRowById(rowID, clearPrevSelection, event) {\n if (!(this.grid.isRowSelectable || this.grid.isPivot) || this.isRowDeleted(rowID)) {\n return;\n }\n clearPrevSelection = !this.grid.isMultiRowSelectionEnabled || clearPrevSelection;\n if (this.grid.isPivot) {\n this.selectPivotRowById(rowID, clearPrevSelection, event);\n return;\n }\n const selectedRows = this.getSelectedRowsData();\n const newSelection = clearPrevSelection ? [this.getRowDataById(rowID)] : this.rowSelection.has(rowID) ?\n selectedRows : [...selectedRows, this.getRowDataById(rowID)];\n const removed = clearPrevSelection ? selectedRows : [];\n this.emitRowSelectionEvent(newSelection, [this.getRowDataById(rowID)], removed, event, selectedRows);\n }\n selectPivotRowById(rowID, clearPrevSelection, event) {\n const selectedRows = this.getSelectedRows();\n const newSelection = clearPrevSelection ? [rowID] : this.rowSelection.has(rowID) ? selectedRows : [...selectedRows, rowID];\n const added = this.getPivotRowsByIds([rowID]);\n const removed = this.getPivotRowsByIds(clearPrevSelection ? selectedRows : []);\n this.emitRowSelectionEventPivotGrid(selectedRows, newSelection, added, removed, event);\n }\n /** Deselect the specified row and emit event. */\n deselectRow(rowID, event) {\n if (!this.isRowSelected(rowID)) {\n return;\n }\n if (this.grid.isPivot) {\n this.deselectPivotRowByID(rowID, event);\n return;\n }\n const selectedRows = this.getSelectedRowsData();\n const newSelection = selectedRows.filter(r => this.getRecordKey(r) !== rowID);\n if (this.rowSelection.size && this.rowSelection.has(rowID)) {\n this.emitRowSelectionEvent(newSelection, [], [this.getRowDataById(rowID)], event, selectedRows);\n }\n }\n deselectPivotRowByID(rowID, event) {\n if (this.rowSelection.size && this.rowSelection.has(rowID)) {\n const currSelection = this.getSelectedRows();\n const newSelection = currSelection.filter(r => r !== rowID);\n const removed = this.getPivotRowsByIds([rowID]);\n this.emitRowSelectionEventPivotGrid(currSelection, newSelection, [], removed, event);\n }\n }\n emitRowSelectionEventPivotGrid(currSelection, newSelection, added, removed, event) {\n if (this.areEqualCollections(currSelection, newSelection)) {\n return;\n }\n const currSelectedRows = this.getSelectedRowsData();\n const args = {\n owner: this.grid,\n oldSelection: currSelectedRows,\n newSelection: this.getPivotRowsByIds(newSelection),\n added,\n removed,\n event,\n cancel: false,\n allRowsSelected: this.areAllRowSelected(newSelection)\n };\n this.grid.rowSelectionChanging.emit(args);\n if (args.cancel) {\n this.clearHeaderCBState();\n return;\n }\n this.selectRowsWithNoEvent(newSelection, true);\n }\n /** Select the specified rows and emit event. */\n selectRows(keys, clearPrevSelection, event) {\n if (!this.grid.isMultiRowSelectionEnabled) {\n return;\n }\n let rowsToSelect = keys.filter(x => !this.isRowDeleted(x) && !this.rowSelection.has(x));\n if (!rowsToSelect.length && !clearPrevSelection) {\n // no valid/additional rows to select and no clear\n return;\n }\n const selectedRows = this.getSelectedRowsData();\n rowsToSelect = this.grid.primaryKey ? rowsToSelect.map(r => this.getRowDataById(r)) : rowsToSelect;\n const newSelection = clearPrevSelection ? rowsToSelect : [...selectedRows, ...rowsToSelect];\n const keysAsSet = new Set(rowsToSelect);\n const removed = clearPrevSelection ? selectedRows.filter(x => !keysAsSet.has(x)) : [];\n this.emitRowSelectionEvent(newSelection, rowsToSelect, removed, event, selectedRows);\n }\n deselectRows(keys, event) {\n if (!this.rowSelection.size) {\n return;\n }\n let rowsToDeselect = keys.filter(x => this.rowSelection.has(x));\n if (!rowsToDeselect.length) {\n return;\n }\n const selectedRows = this.getSelectedRowsData();\n rowsToDeselect = this.grid.primaryKey ? rowsToDeselect.map(r => this.getRowDataById(r)) : rowsToDeselect;\n const keysAsSet = new Set(rowsToDeselect);\n const newSelection = selectedRows.filter(r => !keysAsSet.has(r));\n this.emitRowSelectionEvent(newSelection, [], rowsToDeselect, event, selectedRows);\n }\n /** Select specified rows. No event is emitted. */\n selectRowsWithNoEvent(rowIDs, clearPrevSelection) {\n if (clearPrevSelection) {\n this.rowSelection.clear();\n }\n rowIDs.forEach(rowID => this.rowSelection.add(rowID));\n this.clearHeaderCBState();\n this.selectedRowsChange.next();\n }\n /** Deselect specified rows. No event is emitted. */\n deselectRowsWithNoEvent(rowIDs) {\n this.clearHeaderCBState();\n rowIDs.forEach(rowID => this.rowSelection.delete(rowID));\n this.selectedRowsChange.next();\n }\n isRowSelected(rowID) {\n return this.rowSelection.size > 0 && this.rowSelection.has(rowID);\n }\n isPivotRowSelected(rowID) {\n let contains = false;\n this.rowSelection.forEach(x => {\n const correctRowId = rowID.replace(x, '');\n if (rowID.includes(x) && (correctRowId === '' || correctRowId.startsWith('_'))) {\n contains = true;\n return;\n }\n });\n return this.rowSelection.size > 0 && contains;\n }\n isRowInIndeterminateState(rowID) {\n return this.indeterminateRows.size > 0 && this.indeterminateRows.has(rowID);\n }\n /** Select range from last selected row to the current specified row. */\n selectMultipleRows(rowID, rowData, event) {\n this.clearHeaderCBState();\n if (!this.rowSelection.size || this.isRowDeleted(rowID)) {\n this.selectRowById(rowID);\n return;\n }\n const gridData = this.allData;\n const lastRowID = this.getSelectedRows()[this.rowSelection.size - 1];\n const currIndex = gridData.indexOf(this.getRowDataById(lastRowID));\n const newIndex = gridData.indexOf(rowData);\n const rows = gridData.slice(Math.min(currIndex, newIndex), Math.max(currIndex, newIndex) + 1);\n const currSelection = this.getSelectedRowsData();\n const added = rows.filter(r => !this.isRowSelected(this.getRecordKey(r)));\n const newSelection = currSelection.concat(added);\n this.emitRowSelectionEvent(newSelection, added, [], event, currSelection);\n }\n areAllRowSelected(newSelection) {\n if (!this.grid.data && !newSelection) {\n return false;\n }\n if (this.allRowsSelected !== undefined && !newSelection) {\n return this.allRowsSelected;\n }\n const selectedData = newSelection ? newSelection : [...this.rowSelection];\n const allData = this.getRowIDs(this.allData);\n const unSelectedRows = allData.filter(row => !selectedData.includes(row));\n return this.allRowsSelected = this.allData.length > 0 && unSelectedRows.length === 0;\n }\n hasSomeRowSelected() {\n const filteredData = this.isFilteringApplied() ?\n this.getRowIDs(this.grid.filteredData).some(rID => this.isRowSelected(rID)) : true;\n return this.rowSelection.size > 0 && filteredData && !this.areAllRowSelected();\n }\n get filteredSelectedRowIds() {\n return this.isFilteringApplied() ?\n this.getRowIDs(this.allData).filter(rowID => this.isRowSelected(rowID)) :\n this.getSelectedRows().filter(rowID => !this.isRowDeleted(rowID));\n }\n emitRowSelectionEvent(newSelection, added, removed, event, currSelection) {\n currSelection = currSelection ?? this.getSelectedRowsData();\n if (this.areEqualCollections(currSelection, newSelection)) {\n return;\n }\n const args = {\n owner: this.grid,\n oldSelection: currSelection,\n newSelection,\n added, removed,\n event, cancel: false,\n allRowsSelected: this.areAllRowSelected(newSelection.map(r => this.getRecordKey(r)))\n };\n this.grid.rowSelectionChanging.emit(args);\n if (args.cancel) {\n this.clearHeaderCBState();\n return;\n }\n this.selectRowsWithNoEvent(args.newSelection.map(r => this.getRecordKey(r)), true);\n }\n getPivotRowsByIds(ids) {\n return this.grid.dataView.filter(r => {\n const keys = r.dimensions.map(d => PivotUtil.getRecordKey(r, d));\n return new Set(ids.concat(keys)).size < ids.length + keys.length;\n });\n }\n getRowDataById(rowID) {\n if (!this.grid.primaryKey) {\n return rowID;\n }\n const rowIndex = this.getRowIDs(this.grid.gridAPI.get_all_data(true)).indexOf(rowID);\n return rowIndex < 0 ? rowID : this.grid.gridAPI.get_all_data(true)[rowIndex];\n }\n clearHeaderCBState() {\n this.allRowsSelected = undefined;\n }\n getRowIDs(data) {\n return this.grid.primaryKey && data.length ? data.map(rec => rec[this.grid.primaryKey]) : data;\n }\n getRecordKey(record) {\n return this.grid.primaryKey ? record[this.grid.primaryKey] : record;\n }\n /** Clear rowSelection and update checkbox state */\n clearAllSelectedRows() {\n this.rowSelection.clear();\n this.indeterminateRows.clear();\n this.clearHeaderCBState();\n this.selectedRowsChange.next();\n }\n /** Returns all data in the grid, with applied filtering and sorting and without deleted rows. */\n get allData() {\n let allData;\n if (this.isFilteringApplied() || this.grid.sortingExpressions.length) {\n allData = this.grid.pinnedRecordsCount ? this.grid._filteredSortedUnpinnedData : this.grid.filteredSortedData;\n }\n else {\n allData = this.grid.gridAPI.get_all_data(true);\n }\n return allData.filter(rData => !this.isRowDeleted(this.grid.gridAPI.get_row_id(rData)));\n }\n /** Returns array of the selected columns fields. */\n getSelectedColumns() {\n return this.columnSelection.size ? Array.from(this.columnSelection.keys()) : [];\n }\n isColumnSelected(field) {\n return this.columnSelection.size > 0 && this.columnSelection.has(field);\n }\n /** Select the specified column and emit event. */\n selectColumn(field, clearPrevSelection, selectColumnsRange, event) {\n const stateColumn = this.columnsState.field ? this.grid.getColumnByName(this.columnsState.field) : null;\n if (!event || !stateColumn || stateColumn.visibleIndex < 0 || !selectColumnsRange) {\n this.columnsState.field = field;\n this.columnsState.range = [];\n const newSelection = clearPrevSelection ? [field] : this.getSelectedColumns().indexOf(field) !== -1 ?\n this.getSelectedColumns() : [...this.getSelectedColumns(), field];\n const removed = clearPrevSelection ? this.getSelectedColumns().filter(colField => colField !== field) : [];\n const added = this.isColumnSelected(field) ? [] : [field];\n this.emitColumnSelectionEvent(newSelection, added, removed, event);\n }\n else if (selectColumnsRange) {\n this.selectColumnsRange(field, event);\n }\n }\n /** Select specified columns. And emit event. */\n selectColumns(fields, clearPrevSelection, selectColumnsRange, event) {\n const columns = fields.map(f => this.grid.getColumnByName(f)).sort((a, b) => a.visibleIndex - b.visibleIndex);\n const stateColumn = this.columnsState.field ? this.grid.getColumnByName(this.columnsState.field) : null;\n if (!stateColumn || stateColumn.visibleIndex < 0 || !selectColumnsRange) {\n this.columnsState.field = columns[0] ? columns[0].field : null;\n this.columnsState.range = [];\n const added = fields.filter(colField => !this.isColumnSelected(colField));\n const removed = clearPrevSelection ? this.getSelectedColumns().filter(colField => fields.indexOf(colField) === -1) : [];\n const newSelection = clearPrevSelection ? fields : this.getSelectedColumns().concat(added);\n this.emitColumnSelectionEvent(newSelection, added, removed, event);\n }\n else {\n const filedStart = stateColumn.visibleIndex >\n columns[columns.length - 1].visibleIndex ? columns[0].field : columns[columns.length - 1].field;\n this.selectColumnsRange(filedStart, event);\n }\n }\n /** Select range from last clicked column to the current specified column. */\n selectColumnsRange(field, event) {\n const currIndex = this.grid.getColumnByName(this.columnsState.field).visibleIndex;\n const newIndex = this.grid.columnToVisibleIndex(field);\n const columnsFields = this.grid.visibleColumns\n .filter(c => !c.columnGroup)\n .sort((a, b) => a.visibleIndex - b.visibleIndex)\n .slice(Math.min(currIndex, newIndex), Math.max(currIndex, newIndex) + 1)\n .filter(col => col.selectable).map(col => col.field);\n const removed = [];\n const oldAdded = [];\n const added = columnsFields.filter(colField => !this.isColumnSelected(colField));\n this.columnsState.range.forEach(f => {\n if (columnsFields.indexOf(f) === -1) {\n removed.push(f);\n }\n else {\n oldAdded.push(f);\n }\n });\n this.columnsState.range = columnsFields.filter(colField => !this.isColumnSelected(colField) || oldAdded.indexOf(colField) > -1);\n const newSelection = this.getSelectedColumns().concat(added).filter(c => removed.indexOf(c) === -1);\n this.emitColumnSelectionEvent(newSelection, added, removed, event);\n }\n /** Select specified columns. No event is emitted. */\n selectColumnsWithNoEvent(fields, clearPrevSelection) {\n if (clearPrevSelection) {\n this.columnSelection.clear();\n }\n fields.forEach(field => {\n this.columnSelection.add(field);\n });\n }\n /** Deselect the specified column and emit event. */\n deselectColumn(field, event) {\n this.initColumnsState();\n const newSelection = this.getSelectedColumns().filter(c => c !== field);\n this.emitColumnSelectionEvent(newSelection, [], [field], event);\n }\n /** Deselect specified columns. No event is emitted. */\n deselectColumnsWithNoEvent(fields) {\n fields.forEach(field => this.columnSelection.delete(field));\n }\n /** Deselect specified columns. And emit event. */\n deselectColumns(fields, event) {\n const removed = this.getSelectedColumns().filter(colField => fields.indexOf(colField) > -1);\n const newSelection = this.getSelectedColumns().filter(colField => fields.indexOf(colField) === -1);\n this.emitColumnSelectionEvent(newSelection, [], removed, event);\n }\n emitColumnSelectionEvent(newSelection, added, removed, event) {\n const currSelection = this.getSelectedColumns();\n if (this.areEqualCollections(currSelection, newSelection)) {\n return;\n }\n const args = {\n oldSelection: currSelection, newSelection,\n added, removed, event, cancel: false\n };\n this.grid.columnSelectionChanging.emit(args);\n if (args.cancel) {\n return;\n }\n this.selectColumnsWithNoEvent(args.newSelection, true);\n }\n /** Clear columnSelection */\n clearAllSelectedColumns() {\n this.columnSelection.clear();\n }\n areEqualCollections(first, second) {\n return first.length === second.length && new Set(first.concat(second)).size === first.length;\n }\n /**\n * (╯°□°)╯︵ ┻━┻\n * Chrome and Chromium don't care about the active\n * range after keyboard navigation, thus this.\n */\n _moveSelectionChrome(node) {\n const selection = window.getSelection();\n selection.removeAllRanges();\n const range = new Range();\n range.selectNode(node);\n range.collapse(true);\n selection.addRange(range);\n }\n isFilteringApplied() {\n return !FilteringExpressionsTree.empty(this.grid.filteringExpressionsTree) ||\n !FilteringExpressionsTree.empty(this.grid.advancedFilteringExpressionsTree);\n }\n isRowDeleted(rowID) {\n return this.grid.gridAPI.row_deleted_transaction(rowID);\n }\n}\nIgxGridSelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridSelectionService, deps: [{ token: i0.NgZone }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxGridSelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridSelectionService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridSelectionService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: PlatformUtil }]; } });\n\nclass IgxRowDirective {\n /**\n * The data passed to the row component.\n *\n * ```typescript\n * // get the row data for the first selected row\n * let selectedRowData = this.grid.selectedRows[0].data;\n * ```\n */\n get data() {\n if (this.inEditMode) {\n return mergeWith(this.grid.dataCloneStrategy.clone(this._data), this.grid.transactions.getAggregatedValue(this.key, false), (objValue, srcValue) => {\n if (Array.isArray(srcValue)) {\n return objValue = srcValue;\n }\n });\n }\n return this._data;\n }\n set data(v) {\n this._data = v;\n }\n /**\n * Sets whether the row is pinned.\n * Default value is `false`.\n * ```typescript\n * this.grid.selectedRows[0].pinned = true;\n * ```\n */\n set pinned(value) {\n if (value) {\n this.grid.pinRow(this.key);\n }\n else {\n this.grid.unpinRow(this.key);\n }\n }\n /**\n * Gets whether the row is pinned.\n * ```typescript\n * let isPinned = row.pinned;\n * ```\n */\n get pinned() {\n return this.grid.isRecordPinned(this.data);\n }\n /**\n * Gets the expanded state of the row.\n * ```typescript\n * let isExpanded = row.expanded;\n * ```\n */\n get expanded() {\n return this.grid.gridAPI.get_row_expansion_state(this.data);\n }\n /**\n * Expands/collapses the current row.\n *\n * ```typescript\n * this.grid.selectedRows[2].expanded = true;\n * ```\n */\n set expanded(val) {\n this.grid.gridAPI.set_row_expansion_state(this.key, val);\n }\n get addRowUI() {\n return !!this.grid.crudService.row &&\n this.grid.crudService.row.getClassName() === IgxAddRow.name &&\n this.grid.crudService.row.id === this.key;\n }\n get rowHeight() {\n let height = this.grid.rowHeight || 32;\n if (this.grid.hasColumnLayouts) {\n const maxRowSpan = this.grid.multiRowLayoutRowSize;\n height = height * maxRowSpan;\n }\n return this.addRowUI ? height : null;\n }\n get cellHeight() {\n return this.addRowUI && !this.inEditMode ? null : this.grid.rowHeight || 32;\n }\n get virtDirRow() {\n return this._virtDirRow ? this._virtDirRow.first : null;\n }\n /**\n * Gets the rendered cells in the row component.\n *\n * ```typescript\n * // get the cells of the third selected row\n * let selectedRowCells = this.grid.selectedRows[2].cells;\n * ```\n */\n get cells() {\n const res = new QueryList();\n if (!this._cells) {\n return res;\n }\n const cList = this._cells.filter((item) => item.nativeElement.parentElement !== null)\n .sort((item1, item2) => item1.column.visibleIndex - item2.column.visibleIndex);\n res.reset(cList);\n return res;\n }\n get dataRowIndex() {\n return this.index;\n }\n /**\n * @hidden\n */\n get selected() {\n return this.selectionService.isRowSelected(this.key);\n }\n set selected(value) {\n if (value) {\n this.selectionService.selectRowsWithNoEvent([this.key]);\n }\n else {\n this.selectionService.deselectRowsWithNoEvent([this.key]);\n }\n this.grid.cdr.markForCheck();\n }\n /**\n * @hidden\n */\n get columns() {\n return this.grid.visibleColumns;\n }\n /**\n * @hidden\n * @internal\n */\n get viewIndex() {\n if (this.grid.groupingExpressions.length) {\n return this.grid.filteredSortedData.indexOf(this.data);\n }\n return this.index + this.grid.page * this.grid.perPage;\n }\n /**\n * @hidden\n */\n get pinnedColumns() {\n return this.grid.pinnedColumns;\n }\n /**\n * @hidden\n */\n get isRoot() {\n return true;\n }\n /**\n * @hidden\n */\n get hasChildren() {\n return false;\n }\n /**\n * @hidden\n */\n get unpinnedColumns() {\n return this.grid.unpinnedColumns;\n }\n /**\n * @hidden\n */\n get showRowSelectors() {\n return this.grid.showRowSelectors;\n }\n /** @hidden */\n get dirty() {\n const row = this.grid.transactions.getState(this.key);\n if (row) {\n return row.type === TransactionType.ADD || row.type === TransactionType.UPDATE;\n }\n return false;\n }\n /**\n * @hidden\n */\n get rowDraggable() {\n return this.grid.rowDraggable;\n }\n /** @hidden */\n get added() {\n const row = this.grid.transactions.getState(this.key);\n if (row) {\n return row.type === TransactionType.ADD;\n }\n return false;\n }\n /** @hidden */\n get deleted() {\n return this.grid.gridAPI.row_deleted_transaction(this.key);\n }\n /**\n * @hidden\n */\n get dragging() {\n return this.grid.dragRowID === this.key;\n }\n // TODO: Refactor\n get inEditMode() {\n if (this.grid.rowEditable) {\n const editRowState = this.grid.crudService.row;\n return (editRowState && editRowState.id === this.key) || false;\n }\n else {\n return false;\n }\n }\n /**\n * Gets the ID of the row.\n * A row in the grid is identified either by:\n * - primaryKey data value,\n * - the whole data, if the primaryKey is omitted.\n *\n * ```typescript\n * let rowID = this.grid.selectedRows[2].key;\n * ```\n */\n get key() {\n const primaryKey = this.grid.primaryKey;\n if (this._data) {\n return primaryKey ? this._data[primaryKey] : this._data;\n }\n else {\n return undefined;\n }\n }\n /**\n * The native DOM element representing the row. Could be null in certain environments.\n *\n * ```typescript\n * // get the nativeElement of the second selected row\n * let selectedRowNativeElement = this.grid.selectedRows[1].nativeElement;\n * ```\n */\n get nativeElement() {\n return this.element.nativeElement;\n }\n constructor(grid, selectionService, element, cdr) {\n this.grid = grid;\n this.selectionService = selectionService;\n this.element = element;\n this.cdr = cdr;\n /**\n * @hidden\n */\n this.addAnimationEnd = new EventEmitter();\n /**\n * @hidden\n */\n this.role = 'row';\n /**\n * Sets whether this specific row has disabled functionality for editing and row selection.\n * Default value is `false`.\n * ```typescript\n * this.grid.selectedRows[0].pinned = true;\n * ```\n */\n this.disabled = false;\n /**\n * @hidden\n */\n this.focused = false;\n /**\n * @hidden\n * @internal\n */\n this.defaultCssClass = 'igx-grid__tr';\n /**\n * @hidden\n */\n this.triggerAddAnimationClass = false;\n this.destroy$ = new Subject();\n }\n /**\n * @hidden\n * @internal\n */\n onClick(event) {\n if (this.grid.rowSelection === 'none' || this.deleted || !this.grid.selectRowOnClick) {\n return;\n }\n if (event.shiftKey && this.grid.isMultiRowSelectionEnabled) {\n this.selectionService.selectMultipleRows(this.key, this.data, event);\n return;\n }\n // eslint-disable-next-line no-bitwise\n const clearSelection = !(+event.ctrlKey ^ +event.metaKey);\n if (this.selected && !clearSelection) {\n this.selectionService.deselectRow(this.key, event);\n }\n else {\n this.selectionService.selectRowById(this.key, clearSelection, event);\n }\n }\n /**\n * @hidden\n * @internal\n */\n showActionStrip() {\n if (this.grid.actionStrip) {\n this.grid.actionStrip.show(this);\n }\n }\n /**\n * @hidden\n * @internal\n */\n hideActionStrip() {\n if (this.grid.actionStrip && this.grid.actionStrip.hideOnRowLeave) {\n this.grid.actionStrip.hide();\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n // If the template of the row changes, the forOf in it is recreated and is not detected by the grid and rows can't be scrolled.\n this._virtDirRow.changes.pipe(takeUntil(this.destroy$)).subscribe(() => this.grid.resetHorizontalVirtualization());\n }\n /**\n * @hidden\n * @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden\n */\n onRowSelectorClick(event) {\n event.stopPropagation();\n if (event.shiftKey && this.grid.isMultiRowSelectionEnabled) {\n this.selectionService.selectMultipleRows(this.key, this.data, event);\n return;\n }\n if (this.selected) {\n this.selectionService.deselectRow(this.key, event);\n }\n else {\n this.selectionService.selectRowById(this.key, false, event);\n }\n }\n /**\n * Updates the specified row object and the data source record with the passed value.\n *\n * ```typescript\n * // update the second selected row's value\n * let newValue = \"Apple\";\n * this.grid.selectedRows[1].update(newValue);\n * ```\n */\n update(value) {\n const crudService = this.grid.crudService;\n if (crudService.cellInEditMode && crudService.cell.id.key === this.key) {\n this.grid.transactions.endPending(false);\n }\n const row = new IgxEditRow(this.key, this.index, this.data, this.grid);\n this.grid.gridAPI.update_row(row, value);\n this.cdr.markForCheck();\n }\n /**\n * Removes the specified row from the grid's data source.\n * This method emits `rowDeleted` event.\n *\n * ```typescript\n * // delete the third selected row from the grid\n * this.grid.selectedRows[2].delete();\n * ```\n */\n delete() {\n this.grid.deleteRowById(this.key);\n }\n isCellActive(visibleColumnIndex) {\n const node = this.grid.navigation.activeNode;\n return node ? node.row === this.index && node.column === visibleColumnIndex : false;\n }\n /**\n * Pins the specified row.\n * This method emits `rowPinning`\\`rowPinned` event.\n *\n * ```typescript\n * // pin the selected row from the grid\n * this.grid.selectedRows[0].pin();\n * ```\n */\n pin() {\n return this.grid.pinRow(this.key);\n }\n /**\n * Unpins the specified row.\n * This method emits `rowPinning`\\`rowPinned` event.\n *\n * ```typescript\n * // unpin the selected row from the grid\n * this.grid.selectedRows[0].unpin();\n * ```\n */\n unpin() {\n return this.grid.unpinRow(this.key);\n }\n /**\n * @hidden\n */\n get rowCheckboxAriaLabel() {\n return this.grid.primaryKey ?\n this.selected ? 'Deselect row with key ' + this.key : 'Select row with key ' + this.key :\n this.selected ? 'Deselect row' : 'Select row';\n }\n /**\n * @hidden\n */\n ngDoCheck() {\n this.cdr.markForCheck();\n }\n /**\n * @hidden\n */\n shouldDisplayPinnedChip(visibleColumnIndex) {\n return this.pinned && this.disabled && visibleColumnIndex === 0;\n }\n /**\n * Spawns the add row UI for the specific row.\n *\n * @example\n * ```typescript\n * const row = this.grid1.getRowByIndex(1);\n * row.beginAddRow();\n * ```\n */\n beginAddRow() {\n this.grid.crudService.enterAddRowMode(this);\n }\n /**\n * @hidden\n */\n triggerAddAnimation() {\n this.triggerAddAnimationClass = true;\n }\n /**\n * @hidden\n */\n animationEndHandler() {\n this.triggerAddAnimationClass = false;\n this.addAnimationEnd.emit(this);\n }\n /**\n * @hidden\n */\n get resolveDragIndicatorClasses() {\n const defaultDragIndicatorCssClass = 'igx-grid__drag-indicator';\n const dragIndicatorOff = this.grid.rowDragging && !this.dragging ? 'igx-grid__drag-indicator--off' : '';\n return `${defaultDragIndicatorCssClass} ${dragIndicatorOff}`;\n }\n}\nIgxRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDirective, deps: [{ token: IGX_GRID_BASE }, { token: IgxGridSelectionService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowDirective, selector: \"[igxRowBaseComponent]\", inputs: { data: \"data\", index: \"index\", disabled: \"disabled\", gridID: \"gridID\", selected: \"selected\" }, outputs: { addAnimationEnd: \"addAnimationEnd\" }, host: { listeners: { \"click\": \"onClick($event)\", \"mouseenter\": \"showActionStrip()\", \"mouseleave\": \"hideActionStrip()\" }, properties: { \"attr.role\": \"this.role\", \"attr.aria-disabled\": \"this.disabled\", \"class.igx-grid__tr--disabled\": \"this.disabled\", \"style.min-height.px\": \"this.rowHeight\", \"attr.data-rowIndex\": \"this.dataRowIndex\", \"attr.aria-selected\": \"this.selected\" } }, viewQueries: [{ propertyName: \"checkboxElement\", first: true, predicate: i0.forwardRef(function () { return IgxCheckboxComponent; }), descendants: true, read: IgxCheckboxComponent }, { propertyName: \"_virtDirRow\", predicate: [\"igxDirRef\"], descendants: true, read: IgxGridForOfDirective }, { propertyName: \"_cells\", predicate: [\"cell\"], descendants: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxRowBaseComponent]' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }, { type: IgxGridSelectionService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { addAnimationEnd: [{\n type: Output\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], data: [{\n type: Input\n }], index: [{\n type: Input\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.aria-disabled']\n }, {\n type: HostBinding,\n args: ['class.igx-grid__tr--disabled']\n }], rowHeight: [{\n type: HostBinding,\n args: ['style.min-height.px']\n }], gridID: [{\n type: Input\n }], _virtDirRow: [{\n type: ViewChildren,\n args: ['igxDirRef', { read: IgxGridForOfDirective }]\n }], checkboxElement: [{\n type: ViewChild,\n args: [forwardRef(() => IgxCheckboxComponent), { read: IgxCheckboxComponent }]\n }], _cells: [{\n type: ViewChildren,\n args: ['cell']\n }], dataRowIndex: [{\n type: HostBinding,\n args: ['attr.data-rowIndex']\n }], selected: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.aria-selected']\n }], onClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], showActionStrip: [{\n type: HostListener,\n args: ['mouseenter']\n }], hideActionStrip: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass IgxGridActionsBaseDirective {\n /**\n * @hidden\n * @internal\n */\n get grid() {\n return this.strip.context.grid;\n }\n /**\n * Getter to be used in template\n *\n * @hidden\n * @internal\n */\n get isRowContext() {\n return this.isRow(this.strip.context) && !this.strip.context.inEditMode;\n }\n constructor(iconService, differs) {\n this.iconService = iconService;\n this.differs = differs;\n /**\n * Gets/Sets if the action buttons will be rendered as menu items. When in menu, items will be rendered with text label.\n *\n * @example\n * ```html\n * \n * \n * ```\n */\n this.asMenuItems = false;\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n if (this.asMenuItems) {\n this.buttons.changes.subscribe(() => {\n this.strip.cdr.detectChanges();\n });\n }\n }\n /**\n * Check if the param is a row from a grid\n *\n * @hidden\n * @internal\n * @param context\n */\n isRow(context) {\n return context && context instanceof IgxRowDirective;\n }\n}\nIgxGridActionsBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridActionsBaseDirective, deps: [{ token: IgxIconService }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGridActionsBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridActionsBaseDirective, selector: \"[igxGridActionsBase]\", inputs: { asMenuItems: \"asMenuItems\" }, viewQueries: [{ propertyName: \"buttons\", predicate: IgxGridActionButtonComponent, descendants: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridActionsBaseDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGridActionsBase]'\n }]\n }], ctorParameters: function () { return [{ type: IgxIconService }, { type: i0.IterableDiffers }]; }, propDecorators: { buttons: [{\n type: ViewChildren,\n args: [IgxGridActionButtonComponent]\n }], asMenuItems: [{\n type: Input\n }] } });\n\nclass IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective {\n constructor() {\n super(...arguments);\n /**\n * Host `class.igx-action-strip` binding.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-action-strip__editing-actions';\n /**\n * An input to enable/disable action strip row editing button\n */\n this.editRow = true;\n /**\n * An input to enable/disable action strip row deleting button\n */\n this.deleteRow = true;\n /**\n * An input to enable/disable action strip child row adding button\n */\n this.addChild = false;\n this.isMessageShown = false;\n this._addRow = false;\n this.iconsRendered = false;\n }\n /**\n * An input to enable/disable action strip row adding button\n */\n set addRow(value) {\n this._addRow = value;\n }\n get addRow() {\n if (!this.iconsRendered) {\n this.registerIcons();\n this.iconsRendered = true;\n }\n return this._addRow;\n }\n /**\n * Getter if the row is disabled\n *\n * @hidden\n * @internal\n */\n get disabled() {\n if (!this.isRow(this.strip.context)) {\n return;\n }\n return this.strip.context.disabled;\n }\n /**\n * Getter if the row is root.\n *\n * @hidden\n * @internal\n */\n get isRootRow() {\n if (!this.isRow(this.strip.context)) {\n return false;\n }\n return this.strip.context.isRoot;\n }\n get hasChildren() {\n if (!this.isRow(this.strip.context)) {\n return false;\n }\n return this.strip.context.hasChildren;\n }\n /**\n * Enter row or cell edit mode depending the grid rowEditable option\n *\n * @example\n * ```typescript\n * this.gridEditingActions.startEdit();\n * ```\n */\n startEdit(event) {\n if (event) {\n event.stopPropagation();\n }\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const row = this.strip.context;\n const firstEditable = row.cells.filter(cell => cell.editable)[0];\n const grid = row.grid;\n if (!grid.hasEditableColumns) {\n this.isMessageShown = showMessage('The grid should be editable in order to use IgxGridEditingActionsComponent', this.isMessageShown);\n return;\n }\n // be sure row is in view\n if (grid.rowList.filter(r => r === row).length !== 0) {\n grid.gridAPI.crudService.enterEditMode(firstEditable, event);\n if (!grid.gridAPI.crudService.nonEditable) {\n firstEditable.activate(event);\n }\n }\n this.strip.hide();\n }\n /**\n * Delete a row according to the context\n *\n * @example\n * ```typescript\n * this.gridEditingActions.deleteRowHandler();\n * ```\n */\n deleteRowHandler(event) {\n if (event) {\n event.stopPropagation();\n }\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const context = this.strip.context;\n const grid = context.grid;\n grid.deleteRow(context.key);\n this.strip.hide();\n }\n addRowHandler(event, asChild) {\n if (event) {\n event.stopPropagation();\n }\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const context = this.strip.context;\n const grid = context.grid;\n if (!grid.rowEditable) {\n console.warn('The grid must use row edit mode to perform row adding! Please set rowEditable to true.');\n return;\n }\n grid.gridAPI.crudService.enterAddRowMode(context, asChild, event);\n this.strip.hide();\n }\n /**\n * @hidden\n * @internal\n */\n registerIcons() {\n this.iconService.addSvgIconFromText(addRow.name, addRow.value, 'imx-icons', true);\n this.iconService.addSvgIconFromText(addChild.name, addChild.value, 'imx-icons', true);\n }\n}\nIgxGridEditingActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridEditingActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxGridEditingActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridEditingActionsComponent, selector: \"igx-grid-editing-actions\", inputs: { addRow: \"addRow\", editRow: \"editRow\", deleteRow: \"deleteRow\", addChild: \"addChild\" }, host: { properties: { \"class.igx-action-strip__editing-actions\": \"this.cssClass\" } }, providers: [{ provide: IgxGridActionsBaseDirective, useExisting: IgxGridEditingActionsComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\\n \\n \\n \\n \\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxGridActionButtonComponent, selector: \"igx-grid-action-button\", inputs: [\"asMenuItem\", \"iconName\", \"classNames\", \"iconSet\", \"labelText\"], outputs: [\"actionClick\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridEditingActionsComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-editing-actions', providers: [{ provide: IgxGridActionsBaseDirective, useExisting: IgxGridEditingActionsComponent }], template: \"\\n\\n \\n \\n \\n \\n\\n\\n\" }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-action-strip__editing-actions']\n }], addRow: [{\n type: Input\n }], editRow: [{\n type: Input\n }], deleteRow: [{\n type: Input\n }], addChild: [{\n type: Input\n }] } });\n\nclass IgxGridPinningActionsComponent extends IgxGridActionsBaseDirective {\n constructor() {\n super(...arguments);\n /**\n * Host `class.igx-action-strip` binding.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-action-strip__pinning-actions';\n this.iconsRendered = false;\n }\n /**\n * Getter to know if the row is pinned\n *\n * @hidden\n * @internal\n */\n get pinned() {\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const context = this.strip.context;\n if (context && !this.iconsRendered) {\n this.registerSVGIcons();\n this.iconsRendered = true;\n }\n return context && context.pinned;\n }\n /**\n * Getter to know if the row is in pinned and ghost\n *\n * @hidden\n * @internal\n */\n get inPinnedArea() {\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const context = this.strip.context;\n return this.pinned && !context.disabled;\n }\n /**\n * Getter to know if the row pinning is set to top or bottom\n *\n * @hidden\n * @internal\n */\n get pinnedTop() {\n if (!this.isRow(this.strip.context)) {\n return;\n }\n return this.strip.context.grid.isRowPinningToTop;\n }\n /**\n * Pin the row according to the context.\n *\n * @example\n * ```typescript\n * this.gridPinningActions.pin();\n * ```\n */\n pin(event) {\n if (event) {\n event.stopPropagation();\n }\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const row = this.strip.context;\n const grid = row.grid;\n grid.pinRow(row.key, grid.pinnedRecords.length);\n this.strip.hide();\n }\n /**\n * Unpin the row according to the context.\n *\n * @example\n * ```typescript\n * this.gridPinningActions.unpin();\n * ```\n */\n unpin(event) {\n if (event) {\n event.stopPropagation();\n }\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const row = this.strip.context;\n const grid = row.grid;\n grid.unpinRow(row.key);\n this.strip.hide();\n }\n scrollToRow(event) {\n if (event) {\n event.stopPropagation();\n }\n const context = this.strip.context;\n const grid = context.grid;\n grid.scrollTo(context.data, 0);\n this.strip.hide();\n }\n registerSVGIcons() {\n if (!this.isRow(this.strip.context)) {\n return;\n }\n const context = this.strip.context;\n const grid = context.grid;\n if (grid) {\n this.iconService.addSvgIconFromText(pinLeft.name, pinLeft.value, 'imx-icons', true);\n this.iconService.addSvgIconFromText(unpinLeft.name, unpinLeft.value, 'imx-icons', true);\n this.iconService.addSvgIconFromText(jumpDown.name, jumpDown.value, 'imx-icons', true);\n this.iconService.addSvgIconFromText(jumpUp.name, jumpDown.value, 'imx-icons', true);\n }\n }\n}\nIgxGridPinningActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridPinningActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxGridPinningActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridPinningActionsComponent, selector: \"igx-grid-pinning-actions\", host: { properties: { \"class.igx-action-strip__pinning-actions\": \"this.cssClass\" } }, providers: [{ provide: IgxGridActionsBaseDirective, useExisting: IgxGridPinningActionsComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxGridActionButtonComponent, selector: \"igx-grid-action-button\", inputs: [\"asMenuItem\", \"iconName\", \"classNames\", \"iconSet\", \"labelText\"], outputs: [\"actionClick\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridPinningActionsComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-pinning-actions', providers: [{ provide: IgxGridActionsBaseDirective, useExisting: IgxGridPinningActionsComponent }], template: \"\\n \\n \\n \\n \\n\" }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-action-strip__pinning-actions']\n }] } });\n\nclass IgxActionStripMenuItemDirective {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n}\nIgxActionStripMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripMenuItemDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxActionStripMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxActionStripMenuItemDirective, selector: \"[igxActionStripMenuItem]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripMenuItemDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxActionStripMenuItem]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Action Strip provides templatable area for one or more actions.\n *\n * @igxModule IgxActionStripModule\n *\n * @igxTheme igx-action-strip-theme\n *\n * @igxKeywords action, strip, actionStrip, pinning, editing\n *\n * @igxGroup Data Entry & Display\n *\n * @remarks\n * The Ignite UI Action Strip is a container, overlaying its parent container,\n * and displaying action buttons with action applicable to the parent component the strip is instantiated or shown for.\n *\n * @example\n * ```html\n * \n * \n * \n */\nclass IgxActionStripComponent extends DisplayDensityBase {\n /**\n * An @Input property that set the visibility of the Action Strip.\n * Could be used to set if the Action Strip will be initially hidden.\n *\n * @example\n * ```html\n * \n * ```\n */\n set hidden(value) {\n this._hidden = value;\n }\n get hidden() {\n return this._hidden;\n }\n /**\n * Gets/Sets the resource strings.\n *\n * @remarks\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n get resourceStrings() {\n if (!this._resourceStrings) {\n this._resourceStrings = CurrentResourceStrings.ActionStripResourceStrings;\n }\n return this._resourceStrings;\n }\n /**\n * Hide or not the Action Strip based on if it is a menu.\n *\n * @hidden\n * @internal\n */\n get hideOnRowLeave() {\n if (this.menu.items.length === 0) {\n return true;\n }\n else if (this.menu.items.length > 0) {\n if (this.menu.collapsed) {\n return true;\n }\n else {\n return false;\n }\n }\n }\n constructor(_viewContainer, renderer, _displayDensityOptions, cdr) {\n super(_displayDensityOptions);\n this._viewContainer = _viewContainer;\n this.renderer = renderer;\n this._displayDensityOptions = _displayDensityOptions;\n this.cdr = cdr;\n /**\n * Getter for menu overlay settings\n *\n * @hidden\n * @internal\n */\n this.menuOverlaySettings = { scrollStrategy: new CloseScrollStrategy() };\n this._hidden = false;\n }\n /**\n * Menu Items list.\n *\n * @hidden\n * @internal\n */\n get menuItems() {\n const actions = [];\n this.actionButtons.forEach(button => {\n if (button.asMenuItems) {\n const children = button.buttons;\n if (children) {\n children.toArray().forEach(x => actions.push(x));\n }\n }\n });\n return [...this._menuItems.toArray(), ...actions];\n }\n /**\n * Getter for the 'display' property of the current `IgxActionStrip`\n */\n get display() {\n return this._hidden ? 'none' : 'flex';\n }\n /**\n * Host `attr.class` binding.\n */\n get hostClasses() {\n let hostClass = this.getComponentDensityClass('igx-action-strip');\n if (hostClass !== 'igx-action-strip') {\n // action strip requires the base class to be always present:\n hostClass = `igx-action-strip ${hostClass}`;\n }\n return hostClass;\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterContentInit() {\n this.actionButtons.forEach(button => {\n button.strip = this;\n });\n this.actionButtons.changes.subscribe(() => {\n this.actionButtons.forEach(button => {\n button.strip = this;\n });\n });\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n this.menu.selectionChanging.subscribe(($event) => {\n const newSelection = $event.newSelection.elementRef.nativeElement;\n let allButtons = [];\n this.actionButtons.forEach(actionButtons => {\n if (actionButtons.asMenuItems) {\n allButtons = [...allButtons, ...actionButtons.buttons.toArray()];\n }\n });\n const button = allButtons.find(x => newSelection.contains(x.container.nativeElement));\n if (button) {\n button.actionClick.emit();\n }\n });\n }\n /**\n * Showing the Action Strip and appending it the specified context element.\n *\n * @param context\n * @example\n * ```typescript\n * this.actionStrip.show(row);\n * ```\n */\n show(context) {\n this.hidden = false;\n if (!context) {\n return;\n }\n // when shown for different context make sure the menu won't stay opened\n if (this.context !== context) {\n this.closeMenu();\n }\n this.context = context;\n if (this.context && this.context.element) {\n this.renderer.appendChild(context.element.nativeElement, this._viewContainer.element.nativeElement);\n }\n this.cdr.detectChanges();\n }\n /**\n * Hiding the Action Strip and removing it from its current context element.\n *\n * @example\n * ```typescript\n * this.actionStrip.hide();\n * ```\n */\n hide() {\n this.hidden = true;\n this.closeMenu();\n if (this.context && this.context.element) {\n this.renderer.removeChild(this.context.element.nativeElement, this._viewContainer.element.nativeElement);\n }\n }\n /**\n * Close the menu if opened\n *\n * @hidden\n * @internal\n */\n closeMenu() {\n if (this.menu && !this.menu.collapsed) {\n this.menu.close();\n }\n }\n}\nIgxActionStripComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: DisplayDensityToken, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxActionStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxActionStripComponent, selector: \"igx-action-strip\", inputs: { context: \"context\", hidden: \"hidden\", resourceStrings: \"resourceStrings\" }, host: { properties: { \"style.display\": \"this.display\", \"class\": \"this.hostClasses\" } }, queries: [{ propertyName: \"_menuItems\", predicate: IgxActionStripMenuItemDirective }, { propertyName: \"actionButtons\", predicate: IgxGridActionsBaseDirective }], viewQueries: [{ propertyName: \"menu\", first: true, predicate: [\"dropdown\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n 0\\\">\\n \\n more_vert\\n \\n \\n \\n \\n
    \\n \\n
    \\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxDropDownComponent, selector: \"igx-drop-down\", inputs: [\"allowItemsFocus\", \"labelledBy\"], outputs: [\"opening\", \"opened\", \"closing\", \"closed\"] }, { kind: \"component\", type: IgxDropDownItemComponent, selector: \"igx-drop-down-item\" }, { kind: \"directive\", type: IgxDropDownItemNavigationDirective, selector: \"[igxDropDownItemNavigation]\", inputs: [\"igxDropDownItemNavigation\"] }, { kind: \"directive\", type: IgxToggleActionDirective, selector: \"[igxToggleAction]\", inputs: [\"overlaySettings\", \"igxToggleOutlet\", \"igxToggleAction\"], exportAs: [\"toggle-action\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-action-strip', template: \"
    \\n \\n 0\\\">\\n \\n more_vert\\n \\n \\n \\n \\n
    \\n \\n
    \\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { context: [{\n type: Input\n }], _menuItems: [{\n type: ContentChildren,\n args: [IgxActionStripMenuItemDirective]\n }], actionButtons: [{\n type: ContentChildren,\n args: [IgxGridActionsBaseDirective]\n }], hidden: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], menu: [{\n type: ViewChild,\n args: ['dropdown']\n }], display: [{\n type: HostBinding,\n args: ['style.display']\n }], hostClasses: [{\n type: HostBinding,\n args: ['class']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxActionStripModule {\n}\nIgxActionStripModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxActionStripModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripModule, declarations: [IgxActionStripComponent,\n IgxActionStripMenuItemDirective,\n IgxGridPinningActionsComponent,\n IgxGridEditingActionsComponent,\n IgxGridActionsBaseDirective,\n IgxGridActionButtonComponent], imports: [CommonModule, IgxDropDownModule, IgxToggleModule, IgxButtonModule, IgxIconModule, IgxRippleModule], exports: [IgxActionStripComponent,\n IgxActionStripMenuItemDirective,\n IgxGridPinningActionsComponent,\n IgxGridEditingActionsComponent,\n IgxGridActionsBaseDirective,\n IgxGridActionButtonComponent] });\nIgxActionStripModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripModule, imports: [CommonModule, IgxDropDownModule, IgxToggleModule, IgxButtonModule, IgxIconModule, IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxActionStripModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxActionStripComponent,\n IgxActionStripMenuItemDirective,\n IgxGridPinningActionsComponent,\n IgxGridEditingActionsComponent,\n IgxGridActionsBaseDirective,\n IgxGridActionButtonComponent\n ],\n exports: [\n IgxActionStripComponent,\n IgxActionStripMenuItemDirective,\n IgxGridPinningActionsComponent,\n IgxGridEditingActionsComponent,\n IgxGridActionsBaseDirective,\n IgxGridActionButtonComponent\n ],\n imports: [CommonModule, IgxDropDownModule, IgxToggleModule, IgxButtonModule, IgxIconModule, IgxRippleModule]\n }]\n }] });\n\nlet NEXT_ID$p = 0;\nconst IgxAvatarSize = mkenum({\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large'\n});\nconst IgxAvatarType = mkenum({\n INITIALS: 'initials',\n IMAGE: 'image',\n ICON: 'icon',\n CUSTOM: 'custom'\n});\n/**\n * Avatar provides a way to display an image, icon or initials to the user.\n *\n * @igxModule IgxAvatarModule\n *\n * @igxTheme igx-avatar-theme, igx-icon-theme\n *\n * @igxKeywords avatar, profile, picture, initials\n *\n * @igxGroup Layouts\n *\n * @remarks\n *\n * The Ignite UI Avatar provides an easy way to add an avatar icon to your application. This icon can be an\n * image, someone's initials or a material icon from the Google Material icon set.\n *\n * @example\n * ```html\n * \n * \n * ```\n */\nclass IgxAvatarComponent {\n /**\n * @deprecated in version 15.1.0.\n * Sets a circular shape to the avatar, if `[roundShape]` is set to `true`.\n * By default the shape of the avatar is a square.\n *\n * @example\n * ```html\n * \n * ```\n */\n /** @hidden @internal */\n get roundShape() {\n return this.shape === 'circle';\n }\n set roundShape(value) {\n this.shape = value === true ? 'circle' : 'square';\n }\n /** @hidden @internal */\n get isRounded() {\n return this.shape === 'rounded';\n }\n /**\n * Returns the size of the avatar.\n *\n * @example\n * ```typescript\n * let avatarSize = this.avatar.size;\n * ```\n */\n get size() {\n return this._size;\n }\n /**\n * Sets the size of the avatar.\n * By default, the size is `\"small\"`. It can be set to `\"medium\"` or `\"large\"`.\n *\n * @example\n * ```html\n * \n * ```\n */\n set size(value) {\n switch (value) {\n case 'small':\n case 'medium':\n case 'large':\n this._size = value;\n break;\n default:\n this._size = 'small';\n }\n }\n /** @hidden @internal */\n get _isSmallSize() {\n return this.size === 'small';\n }\n /** @hidden @internal */\n get _isMediumSize() {\n return this.size === 'medium';\n }\n /** @hidden @internal */\n get _isLargeSize() {\n return this.size === 'large';\n }\n /**\n * Returns the type of the avatar.\n *\n * @example\n * ```typescript\n * let avatarType = this.avatar.type;\n * ```\n */\n get type() {\n if (this.src) {\n return IgxAvatarType.IMAGE;\n }\n if (this.icon) {\n return IgxAvatarType.ICON;\n }\n if (this.initials) {\n return IgxAvatarType.INITIALS;\n }\n return IgxAvatarType.CUSTOM;\n }\n /** @hidden @internal */\n get _isImageType() {\n return this.type === IgxAvatarType.IMAGE;\n }\n /** @hidden @internal */\n get _isIconType() {\n return this.type === IgxAvatarType.ICON;\n }\n /** @hidden @internal */\n get _isInitialsType() {\n return this.type === IgxAvatarType.INITIALS;\n }\n /**\n * Returns the template of the avatar.\n *\n * @hidden\n * @internal\n */\n get template() {\n switch (this.type) {\n case IgxAvatarType.IMAGE:\n return this.imageTemplate;\n case IgxAvatarType.INITIALS:\n return this.initialsTemplate;\n case IgxAvatarType.ICON:\n return this.iconTemplate;\n default:\n return this.defaultTemplate;\n }\n }\n constructor(elementRef) {\n this.elementRef = elementRef;\n /**\n * Returns the `aria-label` attribute of the avatar.\n *\n * @example\n * ```typescript\n * let ariaLabel = this.avatar.ariaLabel;\n * ```\n *\n */\n this.ariaLabel = 'avatar';\n /**\n * Returns the `role` attribute of the avatar.\n *\n * @example\n * ```typescript\n * let avatarRole = this.avatar.role;\n * ```\n */\n this.role = 'img';\n /**\n * Host `class.igx-avatar` binding.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-avatar';\n /**\n * Sets the `id` of the avatar. If not set, the first avatar component will have `id` = `\"igx-avatar-0\"`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.id = `igx-avatar-${NEXT_ID$p++}`;\n /**\n * Sets square, rounded or circular shape to the avatar.\n * By default the shape of the avatar is square.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.shape = 'square';\n /**\n * @hidden\n * @internal\n */\n this._size = IgxAvatarSize.SMALL;\n }\n /**\n * Returns the css url of the image.\n *\n * @hidden\n * @internal\n */\n getSrcUrl() {\n return `url(${this.src})`;\n }\n /** @hidden @internal */\n ngOnInit() {\n this.roleDescription = this.getRole();\n }\n /** @hidden @internal */\n getRole() {\n switch (this.type) {\n case IgxAvatarType.IMAGE:\n return 'image avatar';\n case IgxAvatarType.ICON:\n return 'icon avatar';\n case IgxAvatarType.INITIALS:\n return 'initials avatar';\n default:\n return 'custom avatar';\n }\n }\n}\nIgxAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAvatarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxAvatarComponent, selector: \"igx-avatar\", inputs: { id: \"id\", roundShape: \"roundShape\", shape: \"shape\", color: \"color\", bgColor: \"bgColor\", initials: \"initials\", icon: \"icon\", src: \"src\", size: \"size\" }, host: { properties: { \"attr.aria-label\": \"this.ariaLabel\", \"attr.role\": \"this.role\", \"class.igx-avatar\": \"this.cssClass\", \"attr.aria-roledescription\": \"this.roleDescription\", \"attr.id\": \"this.id\", \"class.igx-avatar--circle\": \"this.roundShape\", \"class.igx-avatar--rounded\": \"this.isRounded\", \"style.color\": \"this.color\", \"style.background\": \"this.bgColor\", \"class.igx-avatar--small\": \"this._isSmallSize\", \"class.igx-avatar--medium\": \"this._isMediumSize\", \"class.igx-avatar--large\": \"this._isLargeSize\", \"class.igx-avatar--image\": \"this._isImageType\", \"class.igx-avatar--icon\": \"this._isIconType\", \"class.igx-avatar--initials\": \"this._isInitialsType\" } }, viewQueries: [{ propertyName: \"defaultTemplate\", first: true, predicate: [\"defaultTemplate\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"imageTemplate\", first: true, predicate: [\"imageTemplate\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"initialsTemplate\", first: true, predicate: [\"initialsTemplate\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"iconTemplate\", first: true, predicate: [\"iconTemplate\"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: \"\\n \\n\\n\\n\\n
    \\n
    \\n\\n\\n {{initials.substring(0, 2)}}\\n\\n\\n\\n {{icon}}\\n\\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAvatarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-avatar', template: \"\\n \\n\\n\\n\\n
    \\n
    \\n\\n\\n {{initials.substring(0, 2)}}\\n\\n\\n\\n {{icon}}\\n\\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { ariaLabel: [{\n type: HostBinding,\n args: ['attr.aria-label']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-avatar']\n }], roleDescription: [{\n type: HostBinding,\n args: ['attr.aria-roledescription']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], roundShape: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-avatar--circle']\n }], shape: [{\n type: Input\n }], isRounded: [{\n type: HostBinding,\n args: ['class.igx-avatar--rounded']\n }], color: [{\n type: HostBinding,\n args: ['style.color']\n }, {\n type: Input\n }], bgColor: [{\n type: HostBinding,\n args: ['style.background']\n }, {\n type: Input\n }], initials: [{\n type: Input\n }], icon: [{\n type: Input\n }], src: [{\n type: Input\n }], defaultTemplate: [{\n type: ViewChild,\n args: ['defaultTemplate', { read: TemplateRef, static: true }]\n }], imageTemplate: [{\n type: ViewChild,\n args: ['imageTemplate', { read: TemplateRef, static: true }]\n }], initialsTemplate: [{\n type: ViewChild,\n args: ['initialsTemplate', { read: TemplateRef, static: true }]\n }], iconTemplate: [{\n type: ViewChild,\n args: ['iconTemplate', { read: TemplateRef, static: true }]\n }], size: [{\n type: Input\n }], _isSmallSize: [{\n type: HostBinding,\n args: ['class.igx-avatar--small']\n }], _isMediumSize: [{\n type: HostBinding,\n args: ['class.igx-avatar--medium']\n }], _isLargeSize: [{\n type: HostBinding,\n args: ['class.igx-avatar--large']\n }], _isImageType: [{\n type: HostBinding,\n args: ['class.igx-avatar--image']\n }], _isIconType: [{\n type: HostBinding,\n args: ['class.igx-avatar--icon']\n }], _isInitialsType: [{\n type: HostBinding,\n args: ['class.igx-avatar--initials']\n }] } });\n/**\n * @hidden\n */\nclass IgxAvatarModule {\n}\nIgxAvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxAvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAvatarModule, declarations: [IgxAvatarComponent], imports: [CommonModule, IgxIconModule], exports: [IgxAvatarComponent] });\nIgxAvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAvatarModule, imports: [CommonModule, IgxIconModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAvatarModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxAvatarComponent],\n exports: [IgxAvatarComponent],\n imports: [CommonModule, IgxIconModule]\n }]\n }] });\n\n/** @hidden */\nconst IGX_EXPANSION_PANEL_COMPONENT = new InjectionToken('IgxExpansionPanelToken');\n\nclass IgxExpansionPanelBodyComponent {\n constructor(panel, element, cdr) {\n this.panel = panel;\n this.element = element;\n this.cdr = cdr;\n /**\n * @hidden\n */\n this.cssClass = `igx-expansion-panel__body`;\n /**\n * Gets/sets the `role` attribute of the panel body\n * Default is 'region';\n * Get\n * ```typescript\n * const currentRole = this.panel.body.role;\n * ```\n * Set\n * ```typescript\n * this.panel.body.role = 'content';\n * ```\n * ```html\n * \n * ```\n */\n this.role = 'region';\n this._labelledBy = '';\n this._label = '';\n }\n /**\n * Gets the `aria-label` attribute of the panel body\n * Defaults to the panel id with '-region' in the end;\n * Get\n * ```typescript\n * const currentLabel = this.panel.body.label;\n * ```\n */\n get label() {\n return this._label || this.panel.id + '-region';\n }\n /**\n * Sets the `aria-label` attribute of the panel body\n * ```typescript\n * this.panel.body.label = 'my-custom-label';\n * ```\n * ```html\n * \n * ```\n */\n set label(val) {\n this._label = val;\n }\n /**\n * Gets the `aria-labelledby` attribute of the panel body\n * Defaults to the panel header id;\n * Get\n * ```typescript\n * const currentLabel = this.panel.body.labelledBy;\n * ```\n */\n get labelledBy() {\n return this._labelledBy;\n }\n /**\n * Sets the `aria-labelledby` attribute of the panel body\n * ```typescript\n * this.panel.body.labelledBy = 'my-custom-id';\n * ```\n * ```html\n * \n * ```\n */\n set labelledBy(val) {\n this._labelledBy = val;\n }\n}\nIgxExpansionPanelBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelBodyComponent, deps: [{ token: IGX_EXPANSION_PANEL_COMPONENT }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxExpansionPanelBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExpansionPanelBodyComponent, selector: \"igx-expansion-panel-body\", inputs: { role: \"role\", label: \"label\", labelledBy: \"labelledBy\" }, host: { properties: { \"class.igx-expansion-panel__body\": \"this.cssClass\", \"attr.role\": \"this.role\", \"attr.aria-label\": \"this.label\", \"attr.aria-labelledby\": \"this.labelledBy\" } }, ngImport: i0, template: ``, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelBodyComponent, decorators: [{\n type: Component,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-expansion-panel-body',\n template: ``\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_EXPANSION_PANEL_COMPONENT]\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel__body']\n }], role: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.role']\n }], label: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.aria-label']\n }], labelledBy: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.aria-labelledby']\n }] } });\n\n/**\n * @hidden @internal\n */\nclass IgxExpansionPanelTitleDirective {\n constructor() {\n this.cssClass = `igx-expansion-panel__header-title`;\n }\n}\nIgxExpansionPanelTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExpansionPanelTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExpansionPanelTitleDirective, selector: \"igx-expansion-panel-title\", host: { properties: { \"class.igx-expansion-panel__header-title\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelTitleDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-expansion-panel-title'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel__header-title']\n }] } });\n/**\n * @hidden @internal\n */\nclass IgxExpansionPanelDescriptionDirective {\n constructor() {\n this.cssClass = `igx-expansion-panel__header-description`;\n }\n}\nIgxExpansionPanelDescriptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExpansionPanelDescriptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExpansionPanelDescriptionDirective, selector: \"igx-expansion-panel-description\", host: { properties: { \"class.igx-expansion-panel__header-description\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelDescriptionDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-expansion-panel-description'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel__header-description']\n }] } });\n/**\n * @hidden @internal\n */\nclass IgxExpansionPanelIconDirective {\n}\nIgxExpansionPanelIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExpansionPanelIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExpansionPanelIconDirective, selector: \"igx-expansion-panel-icon\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelIconDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-expansion-panel-icon'\n }]\n }] });\n\n/**\n * @hidden\n */\nconst ExpansionPanelHeaderIconPosition = mkenum({\n LEFT: 'left',\n NONE: 'none',\n RIGHT: 'right'\n});\nclass IgxExpansionPanelHeaderComponent {\n /**\n * Returns a reference to the `igx-expansion-panel-icon` element;\n * If `iconPosition` is `NONE` - return null;\n */\n get iconRef() {\n const renderedTemplate = this.customIconRef ?? this.defaultIconRef;\n return this.iconPosition !== ExpansionPanelHeaderIconPosition.NONE ? renderedTemplate : null;\n }\n /**\n * @hidden\n */\n set iconTemplate(val) {\n this._iconTemplate = val;\n }\n /**\n * @hidden\n */\n get iconTemplate() {\n return this._iconTemplate;\n }\n /**\n * @hidden\n */\n get controls() {\n return this.panel.id;\n }\n /**\n * @hidden @internal\n */\n get innerElement() {\n return this.elementRef.nativeElement.children[0];\n }\n /**\n * @hidden\n */\n get isExpanded() {\n return !this.panel.collapsed;\n }\n /**\n * Gets/sets the whether the header is disabled\n * When disabled, the header will not handle user events and will stop their propagation\n *\n * ```typescript\n * const isDisabled = this.panel.header.disabled;\n * ```\n * Set\n * ```typescript\n * this.panel.header.disabled = true;\n * ```\n * ```html\n * \n * ...\n * \n * ```\n */\n get disabled() {\n return this._disabled;\n }\n ;\n set disabled(val) {\n this._disabled = val;\n if (val) {\n // V.S. June 11th, 2021: #9696 TabIndex should be removed when panel is disabled\n delete this.tabIndex;\n }\n else {\n this.tabIndex = 0;\n }\n }\n ;\n constructor(panel, cdr, elementRef) {\n this.panel = panel;\n this.cdr = cdr;\n this.elementRef = elementRef;\n /**\n * Gets/sets the `aria-level` attribute of the header\n * Get\n * ```typescript\n * const currentAriaLevel = this.panel.header.lv;\n * ```\n * Set\n * ```typescript\n * this.panel.header.lv = '5';\n * ```\n * ```html\n * \n * ```\n */\n this.lv = '3';\n /**\n * Gets/sets the `role` attribute of the header\n * Get\n * ```typescript\n * const currentRole = this.panel.header.role;\n * ```\n * Set\n * ```typescript\n * this.panel.header.role = '5';\n * ```\n * ```html\n * \n * ```\n */\n this.role = 'heading';\n /**\n * Gets/sets the position of the expansion-panel-header expand/collapse icon\n * Accepts `left`, `right` or `none`\n * ```typescript\n * const currentIconPosition = this.panel.header.iconPosition;\n * ```\n * Set\n * ```typescript\n * this.panel.header.iconPosition = 'left';\n * ```\n * ```html\n * \n * ```\n */\n this.iconPosition = ExpansionPanelHeaderIconPosition.LEFT;\n /**\n * Emitted whenever a user interacts with the header host\n * ```typescript\n * handleInteraction(event: IExpansionPanelCancelableEventArgs) {\n * ...\n * }\n * ```\n * ```html\n * \n * ...\n * \n * ```\n */\n this.interaction = new EventEmitter();\n /**\n * @hidden\n */\n this.cssClass = 'igx-expansion-panel__header';\n /**\n * Sets/gets the `id` of the expansion panel header.\n * ```typescript\n * let panelHeaderId = this.panel.header.id;\n * ```\n *\n * @memberof IgxExpansionPanelComponent\n */\n this.id = '';\n /** @hidden @internal */\n this.tabIndex = 0;\n // properties section\n this._iconTemplate = false;\n this._disabled = false;\n this.id = `${this.panel.id}-header`;\n }\n /**\n * @hidden\n */\n onAction(evt) {\n if (this.disabled) {\n evt.stopPropagation();\n return;\n }\n const eventArgs = { event: evt, owner: this.panel, cancel: false };\n this.interaction.emit(eventArgs);\n if (eventArgs.cancel === true) {\n return;\n }\n this.panel.toggle(evt);\n evt.preventDefault();\n }\n /** @hidden @internal */\n openPanel(event) {\n if (event.altKey) {\n const eventArgs = { event, owner: this.panel, cancel: false };\n this.interaction.emit(eventArgs);\n if (eventArgs.cancel === true) {\n return;\n }\n this.panel.expand(event);\n }\n }\n /** @hidden @internal */\n closePanel(event) {\n if (event.altKey) {\n const eventArgs = { event, owner: this.panel, cancel: false };\n this.interaction.emit(eventArgs);\n if (eventArgs.cancel === true) {\n return;\n }\n this.panel.collapse(event);\n }\n }\n /**\n * @hidden\n */\n get iconPositionClass() {\n switch (this.iconPosition) {\n case (ExpansionPanelHeaderIconPosition.LEFT):\n return `igx-expansion-panel__header-icon--start`;\n case (ExpansionPanelHeaderIconPosition.RIGHT):\n return `igx-expansion-panel__header-icon--end`;\n case (ExpansionPanelHeaderIconPosition.NONE):\n return `igx-expansion-panel__header-icon--none`;\n default:\n return '';\n }\n }\n}\nIgxExpansionPanelHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelHeaderComponent, deps: [{ token: IGX_EXPANSION_PANEL_COMPONENT, host: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxExpansionPanelHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExpansionPanelHeaderComponent, selector: \"igx-expansion-panel-header\", inputs: { lv: \"lv\", role: \"role\", iconPosition: \"iconPosition\", disabled: \"disabled\" }, outputs: { interaction: \"interaction\" }, host: { listeners: { \"keydown.Enter\": \"onAction($event)\", \"keydown.Space\": \"onAction($event)\", \"keydown.Spacebar\": \"onAction($event)\", \"click\": \"onAction($event)\", \"keydown.Alt.ArrowDown\": \"openPanel($event)\", \"keydown.Alt.ArrowUp\": \"closePanel($event)\" }, properties: { \"attr.aria-level\": \"this.lv\", \"attr.role\": \"this.role\", \"class.igx-expansion-panel__header\": \"this.cssClass\", \"class.igx-expansion-panel__header--expanded\": \"this.isExpanded\", \"class.igx-expansion-panel--disabled\": \"this.disabled\" } }, queries: [{ propertyName: \"iconTemplate\", first: true, predicate: IgxExpansionPanelIconDirective, descendants: true }, { propertyName: \"customIconRef\", first: true, predicate: IgxExpansionPanelIconDirective, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: \"defaultIconRef\", first: true, predicate: IgxIconComponent, descendants: true, read: ElementRef }], ngImport: i0, template: \"
    \\n
    \\n \\n \\n
    \\n \\n
    \\n \\n \\n {{panel.collapsed? 'expand_more':'expand_less'}}\\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelHeaderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-expansion-panel-header', template: \"
    \\n
    \\n \\n \\n
    \\n \\n
    \\n \\n \\n {{panel.collapsed? 'expand_more':'expand_less'}}\\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Host\n }, {\n type: Inject,\n args: [IGX_EXPANSION_PANEL_COMPONENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { iconTemplate: [{\n type: ContentChild,\n args: [IgxExpansionPanelIconDirective]\n }], lv: [{\n type: HostBinding,\n args: ['attr.aria-level']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }], iconPosition: [{\n type: Input\n }], interaction: [{\n type: Output\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel__header']\n }], isExpanded: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel__header--expanded']\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-expansion-panel--disabled']\n }], customIconRef: [{\n type: ContentChild,\n args: [IgxExpansionPanelIconDirective, { read: ElementRef }]\n }], defaultIconRef: [{\n type: ViewChild,\n args: [IgxIconComponent, { read: ElementRef }]\n }], onAction: [{\n type: HostListener,\n args: ['keydown.Enter', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.Space', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.Spacebar', ['$event']]\n }, {\n type: HostListener,\n args: ['click', ['$event']]\n }], openPanel: [{\n type: HostListener,\n args: ['keydown.Alt.ArrowDown', ['$event']]\n }], closePanel: [{\n type: HostListener,\n args: ['keydown.Alt.ArrowUp', ['$event']]\n }] } });\n\n/** @hidden @internal */\nvar ANIMATION_TYPE;\n(function (ANIMATION_TYPE) {\n ANIMATION_TYPE[\"OPEN\"] = \"open\";\n ANIMATION_TYPE[\"CLOSE\"] = \"close\";\n})(ANIMATION_TYPE || (ANIMATION_TYPE = {}));\n/**@hidden @internal */\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nclass ToggleAnimationPlayer {\n get animationSettings() {\n return this._animationSettings;\n }\n set animationSettings(value) {\n this._animationSettings = value;\n }\n constructor(animationService) {\n this.animationService = animationService;\n /** @hidden @internal */\n this.openAnimationDone = new EventEmitter();\n /** @hidden @internal */\n this.closeAnimationDone = new EventEmitter();\n /** @hidden @internal */\n this.openAnimationStart = new EventEmitter();\n /** @hidden @internal */\n this.closeAnimationStart = new EventEmitter();\n /** @hidden @internal */\n this.openAnimationPlayer = null;\n /** @hidden @internal */\n this.closeAnimationPlayer = null;\n this.destroy$ = new Subject();\n this.players = new Map();\n this._animationSettings = {\n openAnimation: growVerIn,\n closeAnimation: growVerOut\n };\n this.closeInterrupted = false;\n this.openInterrupted = false;\n this._defaultClosedCallback = noop;\n this._defaultOpenedCallback = noop;\n this.onClosedCallback = this._defaultClosedCallback;\n this.onOpenedCallback = this._defaultOpenedCallback;\n }\n /** @hidden @internal */\n playOpenAnimation(targetElement, onDone) {\n this.startPlayer(ANIMATION_TYPE.OPEN, targetElement, onDone || this._defaultOpenedCallback);\n }\n /** @hidden @internal */\n playCloseAnimation(targetElement, onDone) {\n this.startPlayer(ANIMATION_TYPE.CLOSE, targetElement, onDone || this._defaultClosedCallback);\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n startPlayer(type, targetElement, callback) {\n if (!targetElement) { // if no element is passed, there is nothing to animate\n return;\n }\n let target = this.getPlayer(type);\n if (!target) {\n target = this.initializePlayer(type, targetElement, callback);\n }\n // V.S. Jun 28th, 2021 #9783: player will NOT be initialized w/ null settings\n // events will already be emitted\n if (!target || target.hasStarted()) {\n return;\n }\n const targetEmitter = type === ANIMATION_TYPE.OPEN ? this.openAnimationStart : this.closeAnimationStart;\n targetEmitter.emit();\n if (target) {\n target.play();\n }\n }\n initializePlayer(type, targetElement, callback) {\n const oppositeType = type === ANIMATION_TYPE.OPEN ? ANIMATION_TYPE.CLOSE : ANIMATION_TYPE.OPEN;\n // V.S. Jun 28th, 2021 #9783: Treat falsy animation settings as disabled animations\n const targetAnimationSettings = this.animationSettings || { closeAnimation: null, openAnimation: null };\n const animationSettings = type === ANIMATION_TYPE.OPEN ?\n targetAnimationSettings.openAnimation : targetAnimationSettings.closeAnimation;\n // V.S. Jun 28th, 2021 #9783: When no animation in target direction, emit start and done events and return\n if (!animationSettings) {\n this.setCallback(type, callback);\n const targetEmitter = type === ANIMATION_TYPE.OPEN ? this.openAnimationStart : this.closeAnimationStart;\n targetEmitter.emit();\n this.onDoneHandler(type);\n return;\n }\n const opposite = this.getPlayer(oppositeType);\n let oppositePosition = 1;\n if (opposite) {\n oppositePosition = opposite.position;\n this.cleanUpPlayer(oppositeType);\n }\n if (type === ANIMATION_TYPE.OPEN) {\n this.openAnimationPlayer = this.animationService.buildAnimation(animationSettings, targetElement.nativeElement);\n }\n else if (type === ANIMATION_TYPE.CLOSE) {\n this.closeAnimationPlayer = this.animationService.buildAnimation(animationSettings, targetElement.nativeElement);\n }\n const target = this.getPlayer(type);\n target.init();\n this.getPlayer(type).position = 1 - oppositePosition;\n this.setCallback(type, callback);\n target.animationEnd.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.onDoneHandler(type);\n });\n return target;\n }\n onDoneHandler(type) {\n const targetEmitter = type === ANIMATION_TYPE.OPEN ? this.openAnimationDone : this.closeAnimationDone;\n const targetCallback = type === ANIMATION_TYPE.OPEN ? this.onOpenedCallback : this.onClosedCallback;\n targetCallback();\n if (!(type === ANIMATION_TYPE.OPEN ? this.openInterrupted : this.closeInterrupted)) {\n targetEmitter.emit();\n }\n this.cleanUpPlayer(type);\n }\n setCallback(type, callback) {\n if (type === ANIMATION_TYPE.OPEN) {\n this.onOpenedCallback = callback;\n this.openInterrupted = false;\n }\n else if (type === ANIMATION_TYPE.CLOSE) {\n this.onClosedCallback = callback;\n this.closeInterrupted = false;\n }\n }\n cleanUpPlayer(target) {\n switch (target) {\n case ANIMATION_TYPE.CLOSE:\n if (this.closeAnimationPlayer != null) {\n this.closeAnimationPlayer.reset();\n this.closeAnimationPlayer.destroy();\n this.closeAnimationPlayer = null;\n }\n this.closeInterrupted = true;\n this.onClosedCallback = this._defaultClosedCallback;\n break;\n case ANIMATION_TYPE.OPEN:\n if (this.openAnimationPlayer != null) {\n this.openAnimationPlayer.reset();\n this.openAnimationPlayer.destroy();\n this.openAnimationPlayer = null;\n }\n this.openInterrupted = true;\n this.onOpenedCallback = this._defaultOpenedCallback;\n break;\n default:\n break;\n }\n }\n getPlayer(type) {\n switch (type) {\n case ANIMATION_TYPE.OPEN:\n return this.openAnimationPlayer;\n case ANIMATION_TYPE.CLOSE:\n return this.closeAnimationPlayer;\n default:\n return null;\n }\n }\n}\nToggleAnimationPlayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: ToggleAnimationPlayer, deps: [{ token: IgxAngularAnimationService }], target: i0.ɵɵFactoryTarget.Directive });\nToggleAnimationPlayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: ToggleAnimationPlayer, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: ToggleAnimationPlayer, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }]; } });\n\nlet NEXT_ID$o = 0;\nclass IgxExpansionPanelComponent extends ToggleAnimationPlayer {\n /**\n * Sets/gets the animation settings of the expansion panel component\n * Open and Close animation should be passed\n *\n * Get\n * ```typescript\n * const currentAnimations = this.panel.animationSettings;\n * ```\n * Set\n * ```typescript\n * import { slideInLeft, slideOutRight } from 'igniteui-angular';\n * ...\n * this.panel.animationsSettings = {\n * openAnimation: slideInLeft,\n * closeAnimation: slideOutRight\n * };\n * ```\n * or via template\n * ```typescript\n * import { slideInLeft, slideOutRight } from 'igniteui-angular';\n * ...\n * myCustomAnimationObject = {\n * openAnimation: slideInLeft,\n * closeAnimation: slideOutRight\n * };\n * ```html\n * \n * ...\n * \n * ```\n */\n get animationSettings() {\n return this._animationSettings;\n }\n set animationSettings(value) {\n this._animationSettings = value;\n }\n /**\n * @hidden @internal\n */\n get panelExpanded() {\n return !this.collapsed;\n }\n /**\n * @hidden\n */\n get headerId() {\n return this.header ? `${this.id}-header` : '';\n }\n /**\n * @hidden @internal\n */\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n constructor(animationService, cdr, elementRef) {\n super(animationService);\n this.cdr = cdr;\n this.elementRef = elementRef;\n /**\n * Sets/gets the `id` of the expansion panel component.\n * If not set, `id` will have value `\"igx-expansion-panel-0\"`;\n * ```html\n * \n * ```\n * ```typescript\n * let panelId = this.panel.id;\n * ```\n *\n * @memberof IgxExpansionPanelComponent\n */\n this.id = `igx-expansion-panel-${NEXT_ID$o++}`;\n /**\n * @hidden\n */\n this.cssClass = 'igx-expansion-panel';\n /**\n * @hidden\n */\n this.opened = false;\n /**\n * Gets/sets whether the component is collapsed (its content is hidden)\n * Get\n * ```typescript\n * const myPanelState: boolean = this.panel.collapsed;\n * ```\n * Set\n * ```html\n * this.panel.collapsed = true;\n * ```\n *\n * Two-way data binding:\n * ```html\n * \n * ```\n */\n this.collapsed = true;\n /**\n * @hidden\n */\n this.collapsedChange = new EventEmitter();\n /**\n * Emitted when the expansion panel starts collapsing\n * ```typescript\n * handleCollapsing(event: IExpansionPanelCancelableEventArgs)\n * ```\n * ```html\n * \n * ...\n * \n * ```\n */\n this.contentCollapsing = new EventEmitter();\n /**\n * Emitted when the expansion panel finishes collapsing\n * ```typescript\n * handleCollapsed(event: IExpansionPanelEventArgs)\n * ```\n * ```html\n * \n * ...\n * \n * ```\n */\n this.contentCollapsed = new EventEmitter();\n /**\n * Emitted when the expansion panel starts expanding\n * ```typescript\n * handleExpanding(event: IExpansionPanelCancelableEventArgs)\n * ```\n * ```html\n * \n * ...\n * \n * ```\n */\n this.contentExpanding = new EventEmitter();\n /**\n * Emitted when the expansion panel finishes expanding\n * ```typescript\n * handleExpanded(event: IExpansionPanelEventArgs)\n * ```\n * ```html\n * \n * ...\n * \n * ```\n */\n this.contentExpanded = new EventEmitter();\n }\n /** @hidden */\n ngAfterContentInit() {\n if (this.body && this.header) {\n // schedule at end of turn:\n Promise.resolve().then(() => {\n this.body.labelledBy = this.body.labelledBy || this.headerId;\n this.body.label = this.body.label || this.id + '-region';\n });\n }\n }\n /**\n * Collapses the panel\n *\n * ```html\n * \n * ...\n * \n * \n * ```\n */\n collapse(evt) {\n // If expansion panel is already collapsed or is collapsing, do nothing\n if (this.collapsed || this.closeAnimationPlayer) {\n return;\n }\n const args = { event: evt, panel: this, owner: this, cancel: false };\n this.contentCollapsing.emit(args);\n if (args.cancel === true) {\n return;\n }\n this.opened = false;\n this.playCloseAnimation(this.body?.element, () => {\n this.contentCollapsed.emit({ event: evt, owner: this });\n this.collapsed = true;\n this.collapsedChange.emit(true);\n this.cdr.markForCheck();\n });\n }\n /**\n * Expands the panel\n *\n * ```html\n * \n * ...\n * \n * \n * ```\n */\n expand(evt) {\n if (!this.collapsed) { // If the panel is already opened, do nothing\n return;\n }\n const args = { event: evt, panel: this, owner: this, cancel: false };\n this.contentExpanding.emit(args);\n if (args.cancel === true) {\n return;\n }\n this.collapsed = false;\n this.opened = true;\n this.collapsedChange.emit(false);\n this.cdr.detectChanges();\n this.playOpenAnimation(this.body?.element, () => {\n this.contentExpanded.emit({ event: evt, owner: this });\n });\n }\n /**\n * Toggles the panel\n *\n * ```html\n * \n * ...\n * \n * \n * ```\n */\n toggle(evt) {\n if (this.collapsed) {\n this.open(evt);\n }\n else {\n this.close(evt);\n }\n }\n open(evt) {\n this.expand(evt);\n }\n close(evt) {\n this.collapse(evt);\n }\n}\nIgxExpansionPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelComponent, deps: [{ token: IgxAngularAnimationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxExpansionPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExpansionPanelComponent, selector: \"igx-expansion-panel\", inputs: { animationSettings: \"animationSettings\", id: \"id\", collapsed: \"collapsed\" }, outputs: { collapsedChange: \"collapsedChange\", contentCollapsing: \"contentCollapsing\", contentCollapsed: \"contentCollapsed\", contentExpanding: \"contentExpanding\", contentExpanded: \"contentExpanded\" }, host: { properties: { \"attr.id\": \"this.id\", \"class.igx-expansion-panel\": \"this.cssClass\", \"class.igx-expansion-panel--expanded\": \"this.opened\", \"attr.aria-expanded\": \"this.panelExpanded\" } }, providers: [{ provide: IGX_EXPANSION_PANEL_COMPONENT, useExisting: IgxExpansionPanelComponent }], queries: [{ propertyName: \"body\", first: true, predicate: IgxExpansionPanelBodyComponent, descendants: true, read: IgxExpansionPanelBodyComponent }, { propertyName: \"header\", first: true, predicate: IgxExpansionPanelHeaderComponent, descendants: true, read: IgxExpansionPanelHeaderComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-expansion-panel', providers: [{ provide: IGX_EXPANSION_PANEL_COMPONENT, useExisting: IgxExpansionPanelComponent }], template: \"\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { animationSettings: [{\n type: Input\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel']\n }], opened: [{\n type: HostBinding,\n args: ['class.igx-expansion-panel--expanded']\n }], panelExpanded: [{\n type: HostBinding,\n args: ['attr.aria-expanded']\n }], collapsed: [{\n type: Input\n }], collapsedChange: [{\n type: Output\n }], contentCollapsing: [{\n type: Output\n }], contentCollapsed: [{\n type: Output\n }], contentExpanding: [{\n type: Output\n }], contentExpanded: [{\n type: Output\n }], body: [{\n type: ContentChild,\n args: [IgxExpansionPanelBodyComponent, { read: IgxExpansionPanelBodyComponent }]\n }], header: [{\n type: ContentChild,\n args: [IgxExpansionPanelHeaderComponent, { read: IgxExpansionPanelHeaderComponent }]\n }] } });\n\n/**\n * @hidden\n */\nclass IgxExpansionPanelModule {\n}\nIgxExpansionPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxExpansionPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelModule, declarations: [IgxExpansionPanelComponent,\n IgxExpansionPanelHeaderComponent,\n IgxExpansionPanelBodyComponent,\n IgxExpansionPanelDescriptionDirective,\n IgxExpansionPanelTitleDirective,\n IgxExpansionPanelIconDirective], imports: [CommonModule,\n IgxRippleModule,\n IgxIconModule,\n IgxButtonModule,\n IgxAvatarModule], exports: [IgxExpansionPanelComponent,\n IgxExpansionPanelHeaderComponent,\n IgxExpansionPanelBodyComponent,\n IgxExpansionPanelDescriptionDirective,\n IgxExpansionPanelTitleDirective,\n IgxExpansionPanelIconDirective] });\nIgxExpansionPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelModule, imports: [CommonModule,\n IgxRippleModule,\n IgxIconModule,\n IgxButtonModule,\n IgxAvatarModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExpansionPanelModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxExpansionPanelComponent,\n IgxExpansionPanelHeaderComponent,\n IgxExpansionPanelBodyComponent,\n IgxExpansionPanelDescriptionDirective,\n IgxExpansionPanelTitleDirective,\n IgxExpansionPanelIconDirective\n ],\n exports: [\n IgxExpansionPanelComponent,\n IgxExpansionPanelHeaderComponent,\n IgxExpansionPanelBodyComponent,\n IgxExpansionPanelDescriptionDirective,\n IgxExpansionPanelTitleDirective,\n IgxExpansionPanelIconDirective\n ],\n imports: [\n CommonModule,\n IgxRippleModule,\n IgxIconModule,\n IgxButtonModule,\n IgxAvatarModule\n ]\n }]\n }] });\n\nlet NEXT_ID$n = 0;\n/**\n * IgxAccordion is a container-based component that contains that can house multiple expansion panels.\n *\n * @igxModule IgxAccordionModule\n *\n * @igxKeywords accordion\n *\n * @igxGroup Layouts\n *\n * @remark\n * The Ignite UI for Angular Accordion component enables the user to navigate among multiple collapsing panels\n * displayed in a single container.\n * The accordion offers keyboard navigation and API to control the underlying panels' expansion state.\n *\n * @example\n * ```html\n * \n * \n * ...\n * \n * \n * ```\n */\nclass IgxAccordionComponent {\n /**\n * Get/Set the animation settings that panels should use when expanding/collpasing.\n *\n * ```html\n * \n * ```\n *\n * ```typescript\n * const customAnimationSettings: ToggleAnimationSettings = {\n * openAnimation: growVerIn,\n * closeAnimation: growVerOut\n * };\n *\n * this.accordion.animationSettings = customAnimationSettings;\n * ```\n */\n get animationSettings() {\n return this._animationSettings;\n }\n set animationSettings(value) {\n this._animationSettings = value;\n this.updatePanelsAnimation();\n }\n /**\n * Get/Set how the accordion handles the expansion of the projected expansion panels.\n * If set to `true`, only a single panel can be expanded at a time, collapsing all others\n *\n * ```html\n * \n * ...\n * \n * ```\n *\n * ```typescript\n * this.accordion.singleBranchExpand = false;\n * ```\n */\n get singleBranchExpand() {\n return this._singleBranchExpand;\n }\n set singleBranchExpand(val) {\n this._singleBranchExpand = val;\n if (val) {\n this.collapseAllExceptLast();\n }\n }\n /**\n * Get all panels.\n *\n * ```typescript\n * const panels: IgxExpansionPanelComponent[] = this.accordion.panels;\n * ```\n */\n get panels() {\n return this._panels?.toArray();\n }\n constructor(cdr) {\n this.cdr = cdr;\n /**\n * Get/Set the `id` of the accordion component.\n * Default value is `\"igx-accordion-0\"`;\n * ```html\n * \n * ```\n * ```typescript\n * const accordionId = this.accordion.id;\n * ```\n */\n this.id = `igx-accordion-${NEXT_ID$n++}`;\n /** @hidden @internal **/\n this.cssClass = 'igx-accordion';\n /** @hidden @internal **/\n this.displayStyle = 'block';\n /**\n * Emitted before a panel is expanded.\n *\n * @remarks\n * This event is cancelable.\n *\n * ```html\n * \n * \n * ```\n *\n *```typescript\n * public handlePanelExpanding(event: IExpansionPanelCancelableEventArgs){\n * const expandedPanel: IgxExpansionPanelComponent = event.panel;\n * if (expandedPanel.disabled) {\n * event.cancel = true;\n * }\n * }\n *```\n */\n this.panelExpanding = new EventEmitter();\n /**\n * Emitted after a panel has been expanded.\n *\n * ```html\n * \n * \n * ```\n *\n *```typescript\n * public handlePanelExpanded(event: IExpansionPanelCancelableEventArgs) {\n * const expandedPanel: IgxExpansionPanelComponent = event.panel;\n * console.log(\"Panel is expanded: \", expandedPanel.id);\n * }\n *```\n */\n this.panelExpanded = new EventEmitter();\n /**\n * Emitted before a panel is collapsed.\n *\n * @remarks\n * This event is cancelable.\n *\n * ```html\n * \n * \n * ```\n */\n this.panelCollapsing = new EventEmitter();\n /**\n * Emitted after a panel has been collapsed.\n *\n * ```html\n * \n * \n * ```\n */\n this.panelCollapsed = new EventEmitter();\n this._destroy$ = new Subject();\n this._unsubChildren$ = new Subject();\n this._singleBranchExpand = false;\n }\n /** @hidden @internal **/\n ngAfterContentInit() {\n this.updatePanelsAnimation();\n if (this.singleBranchExpand) {\n this.collapseAllExceptLast();\n }\n }\n /** @hidden @internal **/\n ngAfterViewInit() {\n this._expandedPanels = new Set(this._panels.filter(panel => !panel.collapsed));\n this._expandingPanels = new Set();\n this._panels.changes.pipe(takeUntil(this._destroy$)).subscribe(() => {\n this.subToChanges();\n });\n this.subToChanges();\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this._unsubChildren$.next();\n this._unsubChildren$.complete();\n this._destroy$.next();\n this._destroy$.complete();\n }\n /**\n * Expands all collapsed expansion panels.\n *\n * ```typescript\n * accordion.expandAll();\n * ```\n */\n expandAll() {\n if (this.singleBranchExpand) {\n for (let i = 0; i < this.panels.length - 1; i++) {\n this.panels[i].collapse();\n }\n this._panels.last.expand();\n return;\n }\n this.panels.forEach(panel => panel.expand());\n }\n /**\n * Collapses all expanded expansion panels.\n *\n * ```typescript\n * accordion.collapseAll();\n * ```\n */\n collapseAll() {\n this.panels.forEach(panel => panel.collapse());\n }\n collapseAllExceptLast() {\n const lastExpanded = this.panels?.filter(p => !p.collapsed && !p.header.disabled).pop();\n this.panels?.forEach((p) => {\n if (p !== lastExpanded && !p.header.disabled) {\n p.collapsed = true;\n }\n });\n this.cdr.detectChanges();\n }\n handleKeydown(event, panel) {\n const key = event.key.toLowerCase();\n if (!(ACCORDION_NAVIGATION_KEYS.has(key))) {\n return;\n }\n // TO DO: if we ever want to improve the performance of the accordion,\n // enabledPanels could be cached (by making a disabledChange emitter on the panel header)\n this._enabledPanels = this._panels.filter(p => !p.header.disabled);\n event.preventDefault();\n this.handleNavigation(event, panel);\n }\n handleNavigation(event, panel) {\n switch (event.key.toLowerCase()) {\n case 'home':\n this._enabledPanels[0].header.innerElement.focus();\n break;\n case 'end':\n this._enabledPanels[this._enabledPanels.length - 1].header.innerElement.focus();\n break;\n case 'arrowup':\n case 'up':\n this.handleUpDownArrow(true, event, panel);\n break;\n case 'arrowdown':\n case 'down':\n this.handleUpDownArrow(false, event, panel);\n break;\n }\n }\n handleUpDownArrow(isUp, event, panel) {\n if (!event.altKey) {\n const focusedPanel = panel;\n const next = this.getNextPanel(focusedPanel, isUp ? -1 : 1);\n if (next === focusedPanel) {\n return;\n }\n next.header.innerElement.focus();\n }\n if (event.altKey && event.shiftKey) {\n if (isUp) {\n this._enabledPanels.forEach(p => p.collapse());\n }\n else {\n if (this.singleBranchExpand) {\n for (let i = 0; i < this._enabledPanels.length - 1; i++) {\n this._enabledPanels[i].collapse();\n }\n this._enabledPanels[this._enabledPanels.length - 1].expand();\n return;\n }\n this._enabledPanels.forEach(p => p.expand());\n }\n }\n }\n getNextPanel(panel, dir = 1) {\n const panelIndex = this._enabledPanels.indexOf(panel);\n return this._enabledPanels[panelIndex + dir] || panel;\n }\n subToChanges() {\n this._unsubChildren$.next();\n this._panels.forEach(panel => {\n panel.contentExpanded.pipe(takeUntil(this._unsubChildren$)).subscribe((args) => {\n this._expandedPanels.add(args.owner);\n this._expandingPanels.delete(args.owner);\n const evArgs = { ...args, owner: this, panel: args.owner };\n this.panelExpanded.emit(evArgs);\n });\n panel.contentExpanding.pipe(takeUntil(this._unsubChildren$)).subscribe((args) => {\n if (args.cancel) {\n return;\n }\n const evArgs = { ...args, owner: this, panel: args.owner };\n this.panelExpanding.emit(evArgs);\n if (evArgs.cancel) {\n args.cancel = true;\n return;\n }\n if (this.singleBranchExpand) {\n this._expandedPanels.forEach(p => {\n if (!p.header.disabled) {\n p.collapse();\n }\n });\n this._expandingPanels.forEach(p => {\n if (!p.header.disabled) {\n if (!p.animationSettings.closeAnimation) {\n p.openAnimationPlayer?.reset();\n }\n if (!p.animationSettings.openAnimation) {\n p.closeAnimationPlayer?.reset();\n }\n p.collapse();\n }\n });\n this._expandingPanels.add(args.owner);\n }\n });\n panel.contentCollapsed.pipe(takeUntil(this._unsubChildren$)).subscribe((args) => {\n this._expandedPanels.delete(args.owner);\n this._expandingPanels.delete(args.owner);\n const evArgs = { ...args, owner: this, panel: args.owner };\n this.panelCollapsed.emit(evArgs);\n });\n panel.contentCollapsing.pipe(takeUntil(this._unsubChildren$)).subscribe((args) => {\n const evArgs = { ...args, owner: this, panel: args.owner };\n this.panelCollapsing.emit(evArgs);\n if (evArgs.cancel) {\n args.cancel = true;\n }\n });\n fromEvent(panel.header.innerElement, 'keydown')\n .pipe(takeUntil(this._unsubChildren$))\n .subscribe((e) => {\n this.handleKeydown(e, panel);\n });\n });\n }\n updatePanelsAnimation() {\n if (this.animationSettings !== undefined) {\n this.panels?.forEach(panel => panel.animationSettings = this.animationSettings);\n }\n }\n}\nIgxAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAccordionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxAccordionComponent, selector: \"igx-accordion\", inputs: { id: \"id\", animationSettings: \"animationSettings\", singleBranchExpand: \"singleBranchExpand\" }, outputs: { panelExpanding: \"panelExpanding\", panelExpanded: \"panelExpanded\", panelCollapsing: \"panelCollapsing\", panelCollapsed: \"panelCollapsed\" }, host: { properties: { \"attr.id\": \"this.id\", \"class.igx-accordion\": \"this.cssClass\", \"style.display\": \"this.displayStyle\" } }, queries: [{ propertyName: \"_panels\", predicate: IgxExpansionPanelComponent }], ngImport: i0, template: \"\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAccordionComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-accordion', template: \"\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-accordion']\n }], displayStyle: [{\n type: HostBinding,\n args: ['style.display']\n }], animationSettings: [{\n type: Input\n }], singleBranchExpand: [{\n type: Input\n }], panelExpanding: [{\n type: Output\n }], panelExpanded: [{\n type: Output\n }], panelCollapsing: [{\n type: Output\n }], panelCollapsed: [{\n type: Output\n }], _panels: [{\n type: ContentChildren,\n args: [IgxExpansionPanelComponent]\n }] } });\n\n/**\n * @hidden\n */\nclass IgxAccordionModule {\n}\nIgxAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAccordionModule, declarations: [IgxAccordionComponent], imports: [IgxExpansionPanelModule,\n CommonModule], exports: [IgxAccordionComponent,\n IgxExpansionPanelModule] });\nIgxAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAccordionModule, imports: [IgxExpansionPanelModule,\n CommonModule, IgxExpansionPanelModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAccordionModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxAccordionComponent\n ],\n imports: [\n IgxExpansionPanelModule,\n CommonModule,\n ],\n exports: [\n IgxAccordionComponent,\n IgxExpansionPanelModule\n ]\n }]\n }] });\n\nlet NEXT_ID$m = 0;\n/**\n * Determines the igxBadge type\n */\nconst IgxBadgeType = mkenum({\n PRIMARY: 'primary',\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error'\n});\n/**\n * Badge provides visual notifications used to decorate avatars, menus, etc.\n *\n * @igxModule IgxBadgeModule\n *\n * @igxTheme igx-badge-theme\n *\n * @igxKeywords badge, icon, notification\n *\n * @igxGroup Data Entry & Display\n *\n * @remarks\n * The Ignite UI Badge is used to decorate avatars, navigation menus, or other components in the\n * application when visual notification is needed. They are usually designed as icons with a predefined\n * style to communicate information, success, warnings, or errors.\n *\n * @example\n * ```html\n * \n * \n * \n */\nclass IgxBadgeComponent {\n constructor() {\n /**\n * Sets/gets the `id` of the badge.\n *\n * @remarks\n * If not set, the `id` will have value `\"igx-badge-0\"`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.id = `igx-badge-${NEXT_ID$m++}`;\n /**\n * Sets/gets the type of the badge.\n *\n * @remarks\n * Allowed values are `primary`, `info`, `success`, `warning`, `error`.\n * Providing an invalid value won't display a badge.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.type = IgxBadgeType.PRIMARY;\n /**\n * Sets/gets the value to be displayed inside the badge.\n *\n * @remarks\n * If an `icon` property is already set the `icon` will be displayed.\n * If neither a `value` nor an `icon` is set the content of the badge will be empty.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.value = '';\n /**\n * Sets/gets the role attribute value.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyBadge\", { read: IgxBadgeComponent })\n * public badge: IgxBadgeComponent;\n *\n * badge.role = 'status';\n * ```\n */\n this.role = 'status';\n /**\n * Sets/gets the the css class to use on the badge.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyBadge\", { read: IgxBadgeComponent })\n * public badge: IgxBadgeComponent;\n *\n * badge.cssClass = 'my-badge-class';\n * ```\n */\n this.cssClass = 'igx-badge';\n /**\n * Sets a square shape to the badge, if `shape` is set to `square`.\n * By default the shape of the badge is rounded.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.shape = 'rounded';\n /**\n * Sets/gets the aria-label attribute value.\n *\n * @example\n * ```typescript\n * @ViewChild(\"MyBadge\", { read: IgxBadgeComponent })\n * public badge: IgxBadgeComponent;\n *\n * badge.label = 'badge';\n * ```\n */\n this.label = 'badge';\n }\n /** @hidden @internal */\n get _squareShape() {\n return this.shape === 'square';\n }\n /**\n * Defines a human-readable, accessor, author-localized description for\n * the `type` and the `icon` or `value` of the element.\n *\n * @hidden\n * @internal\n */\n get roleDescription() {\n if (this.icon) {\n return this.type + ' type badge with icon type ' + this.icon;\n }\n else if (this.value || this.value === 0) {\n return this.type + ' badge type with value ' + this.value;\n }\n return this.type + ' badge type without value';\n }\n get infoClass() {\n return this.type === IgxBadgeType.INFO;\n }\n get successClass() {\n return this.type === IgxBadgeType.SUCCESS;\n }\n get warningClass() {\n return this.type === IgxBadgeType.WARNING;\n }\n get errorClass() {\n return this.type === IgxBadgeType.ERROR;\n }\n}\nIgxBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBadgeComponent, selector: \"igx-badge\", inputs: { id: \"id\", type: \"type\", value: \"value\", icon: \"icon\", shape: \"shape\" }, host: { properties: { \"attr.id\": \"this.id\", \"attr.role\": \"this.role\", \"class.igx-badge\": \"this.cssClass\", \"class.igx-badge--square\": \"this._squareShape\", \"attr.aria-label\": \"this.label\", \"attr.aria-roledescription\": \"this.roleDescription\", \"class.igx-badge--info\": \"this.infoClass\", \"class.igx-badge--success\": \"this.successClass\", \"class.igx-badge--warning\": \"this.warningClass\", \"class.igx-badge--error\": \"this.errorClass\" } }, ngImport: i0, template: \"{{value}}\\n{{icon}}\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBadgeComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-badge', template: \"{{value}}\\n{{icon}}\\n\" }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], type: [{\n type: Input\n }], value: [{\n type: Input\n }], icon: [{\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-badge']\n }], shape: [{\n type: Input\n }], _squareShape: [{\n type: HostBinding,\n args: ['class.igx-badge--square']\n }], label: [{\n type: HostBinding,\n args: ['attr.aria-label']\n }], roleDescription: [{\n type: HostBinding,\n args: ['attr.aria-roledescription']\n }], infoClass: [{\n type: HostBinding,\n args: ['class.igx-badge--info']\n }], successClass: [{\n type: HostBinding,\n args: ['class.igx-badge--success']\n }], warningClass: [{\n type: HostBinding,\n args: ['class.igx-badge--warning']\n }], errorClass: [{\n type: HostBinding,\n args: ['class.igx-badge--error']\n }] } });\n/**\n * @hidden\n */\nclass IgxBadgeModule {\n}\nIgxBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBadgeModule, declarations: [IgxBadgeComponent], imports: [CommonModule, IgxIconModule], exports: [IgxBadgeComponent] });\nIgxBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBadgeModule, imports: [CommonModule, IgxIconModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBadgeModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxBadgeComponent],\n exports: [IgxBadgeComponent],\n imports: [CommonModule, IgxIconModule]\n }]\n }] });\n\n/* eslint-disable @angular-eslint/directive-selector */\nclass IgxBannerActionsDirective {\n}\nIgxBannerActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxBannerActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBannerActionsDirective, selector: \"igx-banner-actions\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerActionsDirective, decorators: [{\n type: Directive,\n args: [{ selector: 'igx-banner-actions' }]\n }] });\n\n/**\n * **Ignite UI for Angular Banner** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/banner.html)\n *\n * The Ignite UI Banner provides a highly template-able and easy to use banner that can be shown in your application.\n *\n * Usage:\n *\n * ```html\n * \n * Our privacy settings have changed.\n * \n * \n * \n * \n * \n * ```\n */\nclass IgxBannerComponent {\n /** @hidden */\n get useDefaultTemplate() {\n return !this._bannerActionTemplate;\n }\n /**\n * Get the animation settings used by the banner open/close methods\n * ```typescript\n * let currentAnimations: ToggleAnimationSettings = banner.animationSettings\n * ```\n */\n get animationSettings() {\n return this._animationSettings ? this._animationSettings : this._expansionPanel.animationSettings;\n }\n /**\n * Gets/Sets the resource strings.\n *\n * @remarks\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n get resourceStrings() {\n if (!this._resourceStrings) {\n this._resourceStrings = CurrentResourceStrings.BannerResourceStrings;\n }\n return this._resourceStrings;\n }\n /**\n * Set the animation settings used by the banner open/close methods\n * ```typescript\n * import { slideInLeft, slideOutRight } from 'igniteui-angular';\n * ...\n * banner.animationSettings: ToggleAnimationSettings = { openAnimation: slideInLeft, closeAnimation: slideOutRight };\n * ```\n */\n set animationSettings(settings) {\n this._animationSettings = settings;\n }\n /**\n * Gets whether banner is collapsed\n *\n * ```typescript\n * const isCollapsed: boolean = banner.collapsed;\n * ```\n */\n get collapsed() {\n return this._expansionPanel.collapsed;\n }\n /**\n * Returns the native element of the banner component\n * ```typescript\n * const myBannerElement: HTMLElement = banner.element;\n * ```\n */\n get element() {\n return this.elementRef.nativeElement;\n }\n /**\n * @hidden\n */\n get displayStyle() {\n return this.collapsed ? '' : 'block';\n }\n constructor(elementRef) {\n this.elementRef = elementRef;\n /**\n * Fires after the banner shows up\n * ```typescript\n * public handleOpened(event) {\n * ...\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Fires before the banner shows up\n * ```typescript\n * public handleOpening(event) {\n * ...\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Fires after the banner hides\n * ```typescript\n * public handleClosed(event) {\n * ...\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.closed = new EventEmitter();\n /**\n * Fires before the banner hides\n * ```typescript\n * public handleClosing(event) {\n * ...\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.closing = new EventEmitter();\n this.cssClass = 'igx-banner-host';\n }\n /**\n * Opens the banner\n *\n * ```typescript\n * myBanner.open();\n * ```\n *\n * ```html\n * \n * ...\n * \n * \n * ```\n */\n open(event) {\n this._bannerEvent = { banner: this, owner: this, event };\n const openingArgs = {\n banner: this,\n owner: this,\n event,\n cancel: false\n };\n this.opening.emit(openingArgs);\n if (openingArgs.cancel) {\n return;\n }\n this._expansionPanel.open(event);\n }\n /**\n * Closes the banner\n *\n * ```typescript\n * myBanner.close();\n * ```\n *\n * ```html\n * \n * ...\n * \n * \n * ```\n */\n close(event) {\n this._bannerEvent = { banner: this, owner: this, event };\n const closingArgs = {\n banner: this,\n owner: this,\n event,\n cancel: false\n };\n this.closing.emit(closingArgs);\n if (closingArgs.cancel) {\n return;\n }\n this._expansionPanel.close(event);\n }\n /**\n * Toggles the banner\n *\n * ```typescript\n * myBanner.toggle();\n * ```\n *\n * ```html\n * \n * ...\n * \n * \n * ```\n */\n toggle(event) {\n if (this.collapsed) {\n this.open(event);\n }\n else {\n this.close(event);\n }\n }\n /** @hidden */\n onExpansionPanelOpen() {\n this.opened.emit(this._bannerEvent);\n }\n /** @hidden */\n onExpansionPanelClose() {\n this.closed.emit(this._bannerEvent);\n }\n}\nIgxBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBannerComponent, selector: \"igx-banner\", inputs: { animationSettings: \"animationSettings\", resourceStrings: \"resourceStrings\" }, outputs: { opened: \"opened\", opening: \"opening\", closed: \"closed\", closing: \"closing\" }, host: { properties: { \"class\": \"this.cssClass\", \"style.display\": \"this.displayStyle\" } }, queries: [{ propertyName: \"bannerIcon\", first: true, predicate: IgxIconComponent, descendants: true }, { propertyName: \"_bannerActionTemplate\", first: true, predicate: IgxBannerActionsDirective, descendants: true }], viewQueries: [{ propertyName: \"_expansionPanel\", first: true, predicate: [\"expansionPanel\"], descendants: true, static: true }], ngImport: i0, template: \"\\n \\n
    \\n
    \\n
    \\n \\n
    \\n \\n \\n \\n
    \\n
    \\n \\n \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxExpansionPanelComponent, selector: \"igx-expansion-panel\", inputs: [\"animationSettings\", \"id\", \"collapsed\"], outputs: [\"collapsedChange\", \"contentCollapsing\", \"contentCollapsed\", \"contentExpanding\", \"contentExpanded\"] }, { kind: \"component\", type: IgxExpansionPanelBodyComponent, selector: \"igx-expansion-panel-body\", inputs: [\"role\", \"label\", \"labelledBy\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-banner', template: \"\\n \\n
    \\n
    \\n
    \\n \\n
    \\n \\n \\n \\n
    \\n
    \\n \\n \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { bannerIcon: [{\n type: ContentChild,\n args: [IgxIconComponent]\n }], opened: [{\n type: Output\n }], opening: [{\n type: Output\n }], closed: [{\n type: Output\n }], closing: [{\n type: Output\n }], animationSettings: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class']\n }], displayStyle: [{\n type: HostBinding,\n args: ['style.display']\n }], _expansionPanel: [{\n type: ViewChild,\n args: ['expansionPanel', { static: true }]\n }], _bannerActionTemplate: [{\n type: ContentChild,\n args: [IgxBannerActionsDirective]\n }] } });\n/**\n * @hidden\n */\nclass IgxBannerModule {\n}\nIgxBannerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxBannerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerModule, declarations: [IgxBannerComponent, IgxBannerActionsDirective], imports: [CommonModule, IgxExpansionPanelModule, IgxIconModule, IgxButtonModule, IgxRippleModule], exports: [IgxBannerComponent, IgxBannerActionsDirective] });\nIgxBannerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerModule, imports: [CommonModule, IgxExpansionPanelModule, IgxIconModule, IgxButtonModule, IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBannerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxBannerComponent, IgxBannerActionsDirective],\n exports: [IgxBannerComponent, IgxBannerActionsDirective],\n imports: [CommonModule, IgxExpansionPanelModule, IgxIconModule, IgxButtonModule, IgxRippleModule]\n }]\n }] });\n\n/**\n * Determines the Button Group alignment\n */\nconst ButtonGroupAlignment = mkenum({\n horizontal: 'horizontal',\n vertical: 'vertical'\n});\nlet NEXT_ID$l = 0;\n/**\n * **Ignite UI for Angular Button Group** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/buttongroup.html)\n *\n * The Ignite UI Button Group displays a group of buttons either vertically or horizontally. The group supports\n * single, multiple and toggle selection.\n *\n * Example:\n * ```html\n * \n * \n * ```\n * The `fontOptions` value shown above is defined as:\n * ```typescript\n * this.fontOptions = [\n * { icon: 'format_bold', selected: false },\n * { icon: 'format_italic', selected: false },\n * { icon: 'format_underlined', selected: false }];\n * ```\n */\nclass IgxButtonGroupComponent extends DisplayDensityBase {\n /**\n * A collection containing all buttons inside the button group.\n */\n get buttons() {\n return [...this.viewButtons.toArray(), ...this.templateButtons.toArray()];\n }\n /**\n * Allows you to set a style using the `itemContentCssClass` input.\n * The value should be the CSS class name that will be applied to the button group.\n * ```typescript\n * public style1 = \"styleClass\";\n * //..\n * ```\n * ```html\n * \n * ```\n */\n set itemContentCssClass(value) {\n this._itemContentCssClass = value || this._itemContentCssClass;\n }\n /**\n * Returns the CSS class of the item content of the `IgxButtonGroup`.\n * ```typescript\n * @ViewChild(\"MyChild\")\n * public buttonG: IgxButtonGroupComponent;\n * ngAfterViewInit(){\n * let buttonSelect = this.buttonG.itemContentCssClass;\n * }\n * ```\n */\n get itemContentCssClass() {\n return this._itemContentCssClass;\n }\n /**\n * An @Input property that allows you to disable the `igx-buttongroup` component. By default it's false.\n * ```html\n * \n * ```\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n if (this._disabled !== value) {\n this._disabled = value;\n if (this.viewButtons && this.templateButtons) {\n this.buttons.forEach((b) => (b.disabled = this._disabled));\n }\n }\n }\n /**\n * Allows you to set the button group alignment.\n * Available options are `ButtonGroupAlignment.horizontal` (default) and `ButtonGroupAlignment.vertical`.\n * ```typescript\n * public alignment = ButtonGroupAlignment.vertical;\n * //..\n * ```\n * ```html\n * \n * ```\n */\n set alignment(value) {\n this._isVertical = value === ButtonGroupAlignment.vertical;\n }\n /**\n * Returns the alignment of the `igx-buttongroup`.\n * ```typescript\n * @ViewChild(\"MyChild\")\n * public buttonG: IgxButtonGroupComponent;\n * ngAfterViewInit(){\n * let buttonAlignment = this.buttonG.alignment;\n * }\n * ```\n */\n get alignment() {\n return this._isVertical ? ButtonGroupAlignment.vertical : ButtonGroupAlignment.horizontal;\n }\n /**\n * Returns true if the `igx-buttongroup` alignment is vertical.\n * Note that in order for the accessor to work correctly the property should be set explicitly.\n * ```html\n * \n * ```\n * ```typescript\n * //...\n * @ViewChild(\"MyChild\")\n * private buttonG: IgxButtonGroupComponent;\n * ngAfterViewInit(){\n * let orientation = this.buttonG.isVertical;\n * }\n * ```\n */\n get isVertical() {\n return this._isVertical;\n }\n constructor(_cdr, _renderer, _displayDensityOptions) {\n super(_displayDensityOptions);\n this._cdr = _cdr;\n this._renderer = _renderer;\n this._displayDensityOptions = _displayDensityOptions;\n /**\n * An @Input property that sets the value of the `id` attribute. If not set it will be automatically generated.\n * ```html\n * \n * ```\n */\n this.id = `igx-buttongroup-${NEXT_ID$l++}`;\n /**\n * @hidden\n */\n this.zIndex = 0;\n /**\n * An @Input property that enables selecting multiple buttons. By default, multi-selection is false.\n * ```html\n * \n * ```\n */\n this.multiSelection = false;\n /**\n * An @Ouput property that emits an event when a button is selected.\n * ```typescript\n * @ViewChild(\"toast\")\n * private toast: IgxToastComponent;\n * public selectedHandler(buttongroup) {\n * this.toast.open()\n * }\n * //...\n * ```\n * ```html\n * \n * You have made a selection!\n * ```\n */\n this.selected = new EventEmitter();\n /**\n * An @Ouput property that emits an event when a button is deselected.\n * ```typescript\n * @ViewChild(\"toast\")\n * private toast: IgxToastComponent;\n * public deselectedHandler(buttongroup){\n * this.toast.open()\n * }\n * //...\n * ```\n * ```html\n * #MyChild [multiSelection]=\"multi\" (deselected)=\"deselectedHandler($event)\">\n * You have deselected a button!\n * ```\n */\n this.deselected = new EventEmitter();\n /**\n * @hidden\n */\n this.selectedIndexes = [];\n this.buttonClickNotifier$ = new Subject();\n this.buttonSelectedNotifier$ = new Subject();\n this.queryListNotifier$ = new Subject();\n this._disabled = false;\n }\n /**\n * Gets the selected button/buttons.\n * ```typescript\n * @ViewChild(\"MyChild\")\n * private buttonG: IgxButtonGroupComponent;\n * ngAfterViewInit(){\n * let selectedButton = this.buttonG.selectedButtons;\n * }\n * ```\n */\n get selectedButtons() {\n return this.buttons.filter((_, i) => this.selectedIndexes.indexOf(i) !== -1);\n }\n /**\n * Selects a button by its index.\n * ```typescript\n * @ViewChild(\"MyChild\")\n * private buttonG: IgxButtonGroupComponent;\n * ngAfterViewInit(){\n * this.buttonG.selectButton(2);\n * this.cdr.detectChanges();\n * }\n * ```\n *\n * @memberOf {@link IgxButtonGroupComponent}\n */\n selectButton(index) {\n if (index >= this.buttons.length || index < 0) {\n return;\n }\n const button = this.buttons[index];\n button.select();\n }\n /**\n * @hidden\n * @internal\n */\n updateSelected(index) {\n const button = this.buttons[index];\n if (this.selectedIndexes.indexOf(index) === -1) {\n this.selectedIndexes.push(index);\n this.selected.emit({ button, index });\n }\n this._renderer.setAttribute(button.nativeElement, 'aria-pressed', 'true');\n this._renderer.addClass(button.nativeElement, 'igx-button-group__item--selected');\n const indexInViewButtons = this.viewButtons.toArray().indexOf(button);\n if (indexInViewButtons !== -1) {\n this.values[indexInViewButtons].selected = true;\n }\n // deselect other buttons if multiSelection is not enabled\n if (!this.multiSelection && this.selectedIndexes.length > 1) {\n this.buttons.forEach((_, i) => {\n if (i !== index && this.selectedIndexes.indexOf(i) !== -1) {\n this.deselectButton(i);\n }\n });\n }\n }\n /**\n * Deselects a button by its index.\n * ```typescript\n * @ViewChild(\"MyChild\")\n * private buttonG: IgxButtonGroupComponent;\n * ngAfterViewInit(){\n * this.buttonG.deselectButton(2);\n * this.cdr.detectChanges();\n * }\n * ```\n *\n * @memberOf {@link IgxButtonGroupComponent}\n */\n deselectButton(index) {\n if (index >= this.buttons.length || index < 0) {\n return;\n }\n const button = this.buttons[index];\n this.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);\n this._renderer.setAttribute(button.nativeElement, 'aria-pressed', 'false');\n this._renderer.removeClass(button.nativeElement, 'igx-button-group__item--selected');\n button.deselect();\n const indexInViewButtons = this.viewButtons.toArray().indexOf(button);\n if (indexInViewButtons !== -1) {\n this.values[indexInViewButtons].selected = false;\n }\n this.deselected.emit({ button, index });\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n this.templateButtons.forEach((button) => {\n if (!button.initialDensity) {\n button.displayDensity = this.displayDensity;\n }\n });\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n const initButtons = () => {\n // Cancel any existing buttonClick subscriptions\n this.buttonClickNotifier$.next();\n this.selectedIndexes.splice(0, this.selectedIndexes.length);\n // initial configuration\n this.buttons.forEach((button, index) => {\n const buttonElement = button.nativeElement;\n this._renderer.addClass(buttonElement, 'igx-button-group__item');\n if (this.disabled) {\n button.disabled = true;\n }\n if (button.selected) {\n this.updateSelected(index);\n }\n button.buttonClick.pipe(takeUntil(this.buttonClickNotifier$)).subscribe((_) => this._clickHandler(index));\n button.buttonSelected\n .pipe(takeUntil(this.buttonSelectedNotifier$))\n .subscribe((_) => this.updateSelected(index));\n });\n };\n this.viewButtons.changes.pipe(takeUntil(this.queryListNotifier$)).subscribe(() => initButtons());\n this.templateButtons.changes.pipe(takeUntil(this.queryListNotifier$)).subscribe(() => initButtons());\n initButtons();\n this._cdr.detectChanges();\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this.buttonClickNotifier$.next();\n this.buttonClickNotifier$.complete();\n this.buttonSelectedNotifier$.next();\n this.buttonSelectedNotifier$.complete();\n this.queryListNotifier$.next();\n this.queryListNotifier$.complete();\n }\n /**\n * @hidden\n */\n _clickHandler(i) {\n if (this.selectedIndexes.indexOf(i) === -1) {\n this.selectButton(i);\n }\n else {\n this.deselectButton(i);\n }\n }\n}\nIgxButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxButtonGroupComponent, selector: \"igx-buttongroup\", inputs: { id: \"id\", itemContentCssClass: \"itemContentCssClass\", multiSelection: \"multiSelection\", values: \"values\", disabled: \"disabled\", alignment: \"alignment\" }, outputs: { selected: \"selected\", deselected: \"deselected\" }, host: { properties: { \"attr.id\": \"this.id\", \"style.zIndex\": \"this.zIndex\" } }, queries: [{ propertyName: \"templateButtons\", predicate: IgxButtonDirective }], viewQueries: [{ propertyName: \"viewButtons\", predicate: IgxButtonDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonGroupComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-buttongroup', template: \"
    \\n \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], zIndex: [{\n type: HostBinding,\n args: ['style.zIndex']\n }], itemContentCssClass: [{\n type: Input\n }], multiSelection: [{\n type: Input\n }], values: [{\n type: Input\n }], disabled: [{\n type: Input\n }], alignment: [{\n type: Input\n }], selected: [{\n type: Output\n }], deselected: [{\n type: Output\n }], viewButtons: [{\n type: ViewChildren,\n args: [IgxButtonDirective]\n }], templateButtons: [{\n type: ContentChildren,\n args: [IgxButtonDirective]\n }] } });\n/**\n * @hidden\n */\nclass IgxButtonGroupModule {\n}\nIgxButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonGroupModule, declarations: [IgxButtonGroupComponent], imports: [IgxButtonModule, CommonModule, IgxRippleModule, IgxIconModule], exports: [IgxButtonGroupComponent] });\nIgxButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonGroupModule, imports: [IgxButtonModule, CommonModule, IgxRippleModule, IgxIconModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxButtonGroupModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxButtonGroupComponent],\n exports: [IgxButtonGroupComponent],\n imports: [IgxButtonModule, CommonModule, IgxRippleModule, IgxIconModule]\n }]\n }] });\n\nvar DateRangeType;\n(function (DateRangeType) {\n DateRangeType[DateRangeType[\"After\"] = 0] = \"After\";\n DateRangeType[DateRangeType[\"Before\"] = 1] = \"Before\";\n DateRangeType[DateRangeType[\"Between\"] = 2] = \"Between\";\n DateRangeType[DateRangeType[\"Specific\"] = 3] = \"Specific\";\n DateRangeType[DateRangeType[\"Weekdays\"] = 4] = \"Weekdays\";\n DateRangeType[DateRangeType[\"Weekends\"] = 5] = \"Weekends\";\n})(DateRangeType || (DateRangeType = {}));\n\n/**\n * @hidden\n */\nvar TimeDeltaInterval;\n(function (TimeDeltaInterval) {\n TimeDeltaInterval[\"Month\"] = \"month\";\n TimeDeltaInterval[\"Year\"] = \"year\";\n})(TimeDeltaInterval || (TimeDeltaInterval = {}));\nconst MDAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst FEBRUARY = 1;\nconst range = (start = 0, stop, step = 1) => {\n const res = [];\n const cur = (stop === undefined) ? 0 : start;\n const max = (stop === undefined) ? start : stop;\n for (let i = cur; step < 0 ? i > max : i < max; i += step) {\n res.push(i);\n }\n return res;\n};\n/**\n * Returns true for leap years, false for non-leap years.\n *\n * @export\n * @param year\n * @returns\n */\nconst isLeap = (year) => (year % 4 === 0) && ((year % 100 !== 0) || (year % 400 === 0));\nconst weekDay = (year, month, day) => new Date(year, month, day).getDay();\n/**\n * Return weekday and number of days for year, month.\n *\n * @export\n * @param year\n * @param month\n * @returns\n */\nconst monthRange = (year, month) => {\n if ((month < 0) || (month > 11)) {\n throw new Error('Invalid month specified');\n }\n const day = weekDay(year, month, 1);\n let nDays = MDAYS[month];\n if ((month === FEBRUARY) && (isLeap(year))) {\n nDays++;\n }\n return [day, nDays];\n};\nconst isDateInRanges = (date, ranges) => {\n date = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n const dateInMs = date.getTime();\n if (!ranges) {\n return false;\n }\n for (const descriptor of ranges) {\n const dRanges = descriptor.dateRange ? descriptor.dateRange.map(r => new Date(r.getFullYear(), r.getMonth(), r.getDate())) : undefined;\n switch (descriptor.type) {\n case (DateRangeType.After):\n if (dateInMs > dRanges[0].getTime()) {\n return true;\n }\n break;\n case (DateRangeType.Before):\n if (dateInMs < dRanges[0].getTime()) {\n return true;\n }\n break;\n case (DateRangeType.Between):\n const dRange = dRanges.map(d => d.getTime());\n const min = Math.min(dRange[0], dRange[1]);\n const max = Math.max(dRange[0], dRange[1]);\n if (dateInMs >= min && dateInMs <= max) {\n return true;\n }\n break;\n case (DateRangeType.Specific):\n const datesInMs = dRanges.map(d => d.getTime());\n for (const specificDateInMs of datesInMs) {\n if (dateInMs === specificDateInMs) {\n return true;\n }\n }\n break;\n case (DateRangeType.Weekdays):\n const day = date.getDay();\n if (day % 6 !== 0) {\n return true;\n }\n break;\n case (DateRangeType.Weekends):\n const weekday = date.getDay();\n if (weekday % 6 === 0) {\n return true;\n }\n break;\n default:\n return false;\n }\n }\n return false;\n};\nvar WEEKDAYS;\n(function (WEEKDAYS) {\n WEEKDAYS[WEEKDAYS[\"SUNDAY\"] = 0] = \"SUNDAY\";\n WEEKDAYS[WEEKDAYS[\"MONDAY\"] = 1] = \"MONDAY\";\n WEEKDAYS[WEEKDAYS[\"TUESDAY\"] = 2] = \"TUESDAY\";\n WEEKDAYS[WEEKDAYS[\"WEDNESDAY\"] = 3] = \"WEDNESDAY\";\n WEEKDAYS[WEEKDAYS[\"THURSDAY\"] = 4] = \"THURSDAY\";\n WEEKDAYS[WEEKDAYS[\"FRIDAY\"] = 5] = \"FRIDAY\";\n WEEKDAYS[WEEKDAYS[\"SATURDAY\"] = 6] = \"SATURDAY\";\n})(WEEKDAYS || (WEEKDAYS = {}));\nclass Calendar {\n constructor(firstWeekDay = WEEKDAYS.SUNDAY) {\n this._firstWeekDay = firstWeekDay;\n }\n get firstWeekDay() {\n return this._firstWeekDay % 7;\n }\n set firstWeekDay(value) {\n this._firstWeekDay = value;\n }\n /**\n * Returns an array of weekdays for one week starting\n * with the currently set `firstWeekDay`\n *\n * this.firstWeekDay = 0 (Sunday) --> [0, 1, 2, 3, 4, 5, 6]\n * this.firstWeekDay = 1 (Monday) --> [1, 2, 3, 4, 5, 6, 0]\n *\n * @returns\n *\n * @memberof Calendar\n */\n weekdays() {\n const res = [];\n for (const i of range(this.firstWeekDay, this.firstWeekDay + 7)) {\n res.push(i % 7);\n }\n return res;\n }\n /**\n * Returns the date values for one month. It will always iterate throught\n * complete weeks, so it will contain dates outside the specified month.\n *\n * @param year\n * @param month\n * @param boolean\n * @returns\n *\n * @memberof Calendar\n */\n monthdates(year, month, extraWeek = false) {\n let date = new Date(year, month, 1);\n let days = (date.getDay() - this.firstWeekDay) % 7;\n if (days < 0) {\n days = 7 - Math.abs(days);\n }\n date = this.timedelta(date, 'day', -days);\n const res = [];\n let value;\n while (true) {\n value = this.generateICalendarDate(date, year, month);\n res.push(value);\n date = this.timedelta(date, 'day', 1);\n if ((date.getMonth() !== month) && (date.getDay() === this.firstWeekDay)) {\n if (extraWeek && res.length <= 35) {\n for (const _ of range(0, 7)) {\n value = this.generateICalendarDate(date, year, month);\n res.push(value);\n date = this.timedelta(date, 'day', 1);\n }\n }\n break;\n }\n }\n return res;\n }\n /**\n * Returns a matrix (array of arrays) representing a month's calendar.\n * Each row represents a full week; week entries are ICalendarDate objects.\n *\n * @param year\n * @param month\n * @returns\n *\n * @memberof Calendar\n */\n monthdatescalendar(year, month, extraWeek = false) {\n const dates = this.monthdates(year, month, extraWeek);\n const res = [];\n for (const i of range(0, dates.length, 7)) {\n res.push(dates.slice(i, i + 7));\n }\n return res;\n }\n timedelta(date, interval, units) {\n const ret = new Date(date);\n const checkRollover = () => {\n if (ret.getDate() !== date.getDate()) {\n ret.setDate(0);\n }\n };\n switch (interval.toLowerCase()) {\n case 'year':\n ret.setFullYear(ret.getFullYear() + units);\n checkRollover();\n break;\n case 'quarter':\n ret.setMonth(ret.getMonth() + 3 * units);\n checkRollover();\n break;\n case 'month':\n ret.setMonth(ret.getMonth() + units);\n checkRollover();\n break;\n case 'week':\n ret.setDate(ret.getDate() + 7 * units);\n break;\n case 'day':\n ret.setDate(ret.getDate() + units);\n break;\n case 'hour':\n ret.setTime(ret.getTime() + units * 3600000);\n break;\n case 'minute':\n ret.setTime(ret.getTime() + units * 60000);\n break;\n case 'second':\n ret.setTime(ret.getTime() + units * 1000);\n break;\n default:\n throw new Error('Invalid interval specifier');\n }\n return ret;\n }\n formatToParts(date, locale, options, parts) {\n const formatter = new Intl.DateTimeFormat(locale, options);\n const result = {\n date,\n full: formatter.format(date)\n };\n if (formatter.formatToParts) {\n const formattedParts = formatter.formatToParts(date);\n const toType = (partType) => {\n const index = formattedParts.findIndex(({ type }) => type === partType);\n const o = { value: '', literal: '', combined: '' };\n if (partType === 'era' && index > -1) {\n o.value = formattedParts[index].value;\n return o;\n }\n else if (partType === 'era' && index === -1) {\n return o;\n }\n o.value = formattedParts[index].value;\n o.literal = formattedParts[index + 1] ? formattedParts[index + 1].value : '';\n o.combined = [o.value, o.literal].join('');\n return o;\n };\n for (const each of parts) {\n result[each] = toType(each);\n }\n }\n else {\n for (const each of parts) {\n result[each] = { value: '', literal: '', combined: '' };\n }\n }\n return result;\n }\n getFirstViewDate(date, interval, activeViewIdx) {\n return this.timedelta(date, interval, -activeViewIdx);\n }\n getDateByView(date, interval, activeViewIdx) {\n return this.timedelta(date, interval, activeViewIdx);\n }\n getNextMonth(date) {\n return this.timedelta(date, TimeDeltaInterval.Month, 1);\n }\n getPrevMonth(date) {\n return this.timedelta(date, TimeDeltaInterval.Month, -1);\n }\n getNextYear(date) {\n return this.timedelta(date, TimeDeltaInterval.Year, 1);\n }\n getPrevYear(date) {\n return this.timedelta(date, TimeDeltaInterval.Year, -1);\n }\n getWeekNumber(date) {\n const firstJan = new Date(date.getFullYear(), 0, 1).getTime();\n const today = new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();\n const dayInMilSeconds = 86400000;\n const dayOfYear = ((today - firstJan + 1) / dayInMilSeconds);\n return Math.ceil(dayOfYear / 7);\n }\n generateICalendarDate(date, year, month) {\n return {\n date,\n isCurrentMonth: date.getFullYear() === year && date.getMonth() === month,\n isNextMonth: this.isNextMonth(date, year, month),\n isPrevMonth: this.isPreviousMonth(date, year, month)\n };\n }\n isPreviousMonth(date, year, month) {\n if (date.getFullYear() === year) {\n return date.getMonth() < month;\n }\n return date.getFullYear() < year;\n }\n isNextMonth(date, year, month) {\n if (date.getFullYear() === year) {\n return date.getMonth() > month;\n }\n return date.getFullYear() > year;\n }\n}\n\n/**\n * Sets the selection type - single, multi or range.\n */\nconst CalendarSelection = mkenum({\n SINGLE: 'single',\n MULTI: 'multi',\n RANGE: 'range'\n});\nvar ScrollMonth;\n(function (ScrollMonth) {\n ScrollMonth[\"PREV\"] = \"prev\";\n ScrollMonth[\"NEXT\"] = \"next\";\n ScrollMonth[\"NONE\"] = \"none\";\n})(ScrollMonth || (ScrollMonth = {}));\n/** @hidden @internal */\nclass IgxCalendarBaseDirective {\n /**\n * An accessor that sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n if (!this._resourceStrings) {\n this._resourceStrings = CurrentResourceStrings.CalendarResStrings;\n }\n return this._resourceStrings;\n }\n /**\n * Gets the start day of the week.\n * Can return a numeric or an enum representation of the week day.\n * If not set, defaults to the first day of the week for the application locale.\n */\n get weekStart() {\n return this.calendarModel.firstWeekDay;\n }\n /**\n * Sets the start day of the week.\n * Can be assigned to a numeric value or to `WEEKDAYS` enum value.\n */\n set weekStart(value) {\n this._weekStart = value;\n this.calendarModel.firstWeekDay = value;\n }\n /**\n * Gets the `locale` of the calendar.\n * If not set, defaults to application's locale.\n */\n get locale() {\n return this._locale;\n }\n /**\n * Sets the `locale` of the calendar.\n * Expects a valid BCP 47 language tag.\n */\n set locale(value) {\n this._locale = value;\n // if value is not a valid BCP 47 tag, set it back to _localeId\n try {\n getLocaleFirstDayOfWeek(this._locale);\n }\n catch (e) {\n this._locale = this._localeId;\n }\n // changing locale runtime needs to update the `weekStart` too, if `weekStart` is not explicitly set\n if (this._weekStart === undefined) {\n this.calendarModel.firstWeekDay = getLocaleFirstDayOfWeek(this._locale);\n }\n this.initFormatters();\n }\n /**\n * Gets the date format options of the days view.\n */\n get formatOptions() {\n return this._formatOptions;\n }\n /**\n * Sets the date format options of the days view.\n * Default is { day: 'numeric', month: 'short', weekday: 'short', year: 'numeric' }\n */\n set formatOptions(formatOptions) {\n this._formatOptions = Object.assign(this._formatOptions, formatOptions);\n this.initFormatters();\n }\n /**\n * Gets whether the `day`, `month` and `year` should be rendered\n * according to the locale and formatOptions, if any.\n */\n get formatViews() {\n return this._formatViews;\n }\n /**\n * Gets whether the `day`, `month` and `year` should be rendered\n * according to the locale and formatOptions, if any.\n */\n set formatViews(formatViews) {\n this._formatViews = Object.assign(this._formatViews, formatViews);\n }\n /**\n *\n * Gets the selection type.\n * Default value is `\"single\"`.\n * Changing the type of selection resets the currently\n * selected values if any.\n */\n get selection() {\n return this._selection;\n }\n /**\n * Sets the selection.\n */\n set selection(value) {\n switch (value) {\n case CalendarSelection.SINGLE:\n this.selectedDates = null;\n break;\n case CalendarSelection.MULTI:\n case CalendarSelection.RANGE:\n this.selectedDates = [];\n break;\n default:\n throw new Error('Invalid selection value');\n }\n this._onChangeCallback(this.selectedDates);\n this.rangeStarted = false;\n this._selection = value;\n }\n /**\n * Gets the selected date(s).\n *\n * When selection is set to `single`, it returns\n * a single `Date` object.\n * Otherwise it is an array of `Date` objects.\n */\n get value() {\n return this.selectedDates;\n }\n /**\n * Sets the selected date(s).\n *\n * When selection is set to `single`, it accepts\n * a single `Date` object.\n * Otherwise it is an array of `Date` objects.\n */\n set value(value) {\n if (!value || !!value && value.length === 0) {\n this.selectedDatesWithoutFocus = new Date();\n return;\n }\n if (!this.selectedDatesWithoutFocus) {\n const valueDate = value[0] ? Math.min.apply(null, value) : value;\n const date = this.getDateOnly(new Date(valueDate)).setDate(1);\n this.viewDate = new Date(date);\n }\n this.selectDate(value);\n this.selectedDatesWithoutFocus = value;\n }\n /**\n * Gets the date that is presented.\n * By default it is the current date.\n */\n get viewDate() {\n return this._viewDate;\n }\n /**\n * Sets the date that will be presented in the default view when the component renders.\n */\n set viewDate(value) {\n if (Array.isArray(value)) {\n return;\n }\n const validDate = this.validateDate(value);\n if (this._viewDate) {\n this.selectedDatesWithoutFocus = validDate;\n }\n const date = this.getDateOnly(validDate).setDate(1);\n this._viewDate = new Date(date);\n }\n /**\n * Gets the disabled dates descriptors.\n */\n get disabledDates() {\n return this._disabledDates;\n }\n /**\n * Sets the disabled dates' descriptors.\n * ```typescript\n * @ViewChild(\"MyCalendar\")\n * public calendar: IgxCalendarComponent;\n * ngOnInit(){\n * this.calendar.disabledDates = [\n * {type: DateRangeType.Between, dateRange: [new Date(\"2020-1-1\"), new Date(\"2020-1-15\")]},\n * {type: DateRangeType.Weekends}];\n * }\n * ```\n */\n set disabledDates(value) {\n this._disabledDates = value;\n }\n /**\n * Gets the special dates descriptors.\n */\n get specialDates() {\n return this._specialDates;\n }\n /**\n * Sets the special dates' descriptors.\n * ```typescript\n * @ViewChild(\"MyCalendar\")\n * public calendar: IgxCalendarComponent;\n * ngOnInit(){\n * this.calendar.specialDates = [\n * {type: DateRangeType.Between, dateRange: [new Date(\"2020-1-1\"), new Date(\"2020-1-15\")]},\n * {type: DateRangeType.Weekends}];\n * }\n * ```\n */\n set specialDates(value) {\n this._specialDates = value;\n }\n /**\n * @hidden\n */\n constructor(platform, _localeId) {\n this.platform = platform;\n this._localeId = _localeId;\n /**\n * Sets/gets whether the outside dates (dates that are out of the current month) will be hidden.\n * Default value is `false`.\n * ```html\n * \n * ```\n * ```typescript\n * let hideOutsideDays = this.calendar.hideOutsideDays;\n * ```\n */\n this.hideOutsideDays = false;\n /**\n * Emits an event when a date is selected.\n * Provides reference the `selectedDates` property.\n */\n this.selected = new EventEmitter();\n /**\n * Emits an event when the month in view is changed.\n * ```html\n * \n * ```\n * ```typescript\n * public viewDateChanged(event: IViewDateChangeEventArgs) {\n * let viewDate = event.currentValue;\n * }\n * ```\n */\n this.viewDateChanged = new EventEmitter();\n /**\n * Emits an event when the active view is changed.\n * ```html\n * \n * ```\n * ```typescript\n * public activeViewChanged(event: CalendarView) {\n * let activeView = event;\n * }\n * ```\n */\n this.activeViewChanged = new EventEmitter();\n /**\n * @hidden\n */\n this.rangeStarted = false;\n /**\n * @hidden\n */\n this.monthScrollDirection = ScrollMonth.NONE;\n /**\n * @hidden\n */\n this.scrollMonth$ = new Subject();\n /**\n * @hidden\n */\n this.stopMonthScroll$ = new Subject();\n /**\n * @hidden\n */\n this.startMonthScroll$ = new Subject();\n /**\n * @hidden\n */\n this.shiftKey = false;\n /**\n * @hidden\n */\n this._onTouchedCallback = noop;\n /**\n * @hidden\n */\n this._onChangeCallback = noop;\n /**\n * @hidden\n */\n this._selection = CalendarSelection.SINGLE;\n /** @hidden @internal */\n this._resourceStrings = CurrentResourceStrings.CalendarResStrings;\n /**\n * @hidden\n */\n this._formatOptions = {\n day: 'numeric',\n month: 'short',\n weekday: 'short',\n year: 'numeric'\n };\n /**\n * @hidden\n */\n this._formatViews = {\n day: false,\n month: true,\n year: false\n };\n this.calendarModel = new Calendar();\n this.locale = _localeId;\n this.viewDate = this.viewDate ? this.viewDate : new Date();\n this.initFormatters();\n }\n /**\n * Multi/Range selection with shift key\n *\n * @hidden\n * @internal\n */\n onPointerdown(event) {\n this.shiftKey = event.button === 0 && event.shiftKey;\n }\n /**\n * Performs deselection of date/dates, when selection is multi\n * Usually performed by the selectMultiple method, but leads to bug when multiple months are in view\n *\n * @hidden\n */\n deselectMultipleInMonth(value) {\n // deselect multiple dates from last clicked to shift clicked date (excluding)\n if (this.shiftKey) {\n let start;\n let end;\n [start, end] = this.lastSelectedDate.getTime() < value.getTime()\n ? [this.lastSelectedDate, value]\n : [value, this.lastSelectedDate];\n this.selectedDates = this.selectedDates.filter((date) => date.getTime() < start.getTime() || date.getTime() > end.getTime());\n this.selectedDates.push(value);\n }\n else {\n // deselect a single date\n const valueDateOnly = this.getDateOnly(value);\n this.selectedDates = this.selectedDates.filter((date) => date.getTime() !== valueDateOnly.getTime());\n }\n }\n /**\n * @hidden\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * @hidden\n */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /**\n * @hidden\n */\n writeValue(value) {\n this.selectDate(value);\n }\n /**\n * Checks whether a date is disabled.\n *\n * @hidden\n */\n isDateDisabled(date) {\n if (this.disabledDates === null) {\n return false;\n }\n return isDateInRanges(date, this.disabledDates);\n }\n /**\n * Selects date(s) (based on the selection type).\n */\n selectDate(value) {\n if (value === null || value === undefined || (Array.isArray(value) && value.length === 0)) {\n return;\n }\n switch (this.selection) {\n case CalendarSelection.SINGLE:\n if (isDate(value) && !this.isDateDisabled(value)) {\n this.selectSingle(value);\n }\n break;\n case CalendarSelection.MULTI:\n this.selectMultiple(value);\n break;\n case CalendarSelection.RANGE:\n this.selectRange(value, true);\n break;\n }\n }\n /**\n * Deselects date(s) (based on the selection type).\n */\n deselectDate(value) {\n if (!this.selectedDates || this.selectedDates.length === 0) {\n return;\n }\n if (value === null || value === undefined) {\n this.selectedDates = this.selection === CalendarSelection.SINGLE ? null : [];\n this.rangeStarted = false;\n this._onChangeCallback(this.selectedDates);\n return;\n }\n switch (this.selection) {\n case CalendarSelection.SINGLE:\n this.deselectSingle(value);\n break;\n case CalendarSelection.MULTI:\n this.deselectMultiple(value);\n break;\n case CalendarSelection.RANGE:\n this.deselectRange(value);\n break;\n }\n }\n /**\n * @hidden\n */\n selectDateFromClient(value) {\n switch (this.selection) {\n case CalendarSelection.SINGLE:\n case CalendarSelection.MULTI:\n this.selectDate(value);\n break;\n case CalendarSelection.RANGE:\n this.selectRange(value, true);\n break;\n }\n }\n /**\n * @hidden\n */\n initFormatters() {\n this.formatterDay = new Intl.DateTimeFormat(this._locale, { day: this._formatOptions.day });\n this.formatterWeekday = new Intl.DateTimeFormat(this._locale, { weekday: this._formatOptions.weekday });\n this.formatterMonth = new Intl.DateTimeFormat(this._locale, { month: this._formatOptions.month });\n this.formatterYear = new Intl.DateTimeFormat(this._locale, { year: this._formatOptions.year });\n this.formatterMonthday = new Intl.DateTimeFormat(this._locale, { month: this._formatOptions.month, day: this._formatOptions.day });\n }\n /**\n * @hidden\n */\n getDateOnly(date) {\n const validDate = this.validateDate(date);\n return new Date(validDate.getFullYear(), validDate.getMonth(), validDate.getDate());\n }\n /**\n * @hidden\n */\n getDateOnlyInMs(date) {\n return this.getDateOnly(date).getTime();\n }\n /**\n * @hidden\n */\n generateDateRange(start, end) {\n const result = [];\n start = this.getDateOnly(start);\n end = this.getDateOnly(end);\n while (start.getTime() < end.getTime()) {\n start = this.calendarModel.timedelta(start, 'day', 1);\n result.push(start);\n }\n return result;\n }\n /**\n * Performs a single selection.\n *\n * @hidden\n */\n selectSingle(value) {\n this.selectedDates = this.getDateOnly(value);\n this._onChangeCallback(this.selectedDates);\n }\n /**\n * Performs a multiple selection\n *\n * @hidden\n */\n selectMultiple(value) {\n if (Array.isArray(value)) {\n const newDates = value.map(v => this.getDateOnly(v).getTime());\n const selDates = this.selectedDates.map(v => this.getDateOnly(v).getTime());\n if (JSON.stringify(newDates) === JSON.stringify(selDates)) {\n return;\n }\n this.selectedDates = Array.from(new Set([...newDates, ...selDates])).map(v => new Date(v));\n }\n else {\n let newSelection = [];\n if (this.shiftKey && this.lastSelectedDate) {\n [this._startDate, this._endDate] = this.lastSelectedDate.getTime() < value.getTime()\n ? [this.lastSelectedDate, value]\n : [value, this.lastSelectedDate];\n const unselectedDates = [this._startDate, ...this.generateDateRange(this._startDate, this._endDate)]\n .filter(date => !this.isDateDisabled(date)\n && this.selectedDates.every((d) => d.getTime() !== date.getTime()));\n // select all dates from last selected to shift clicked date\n if (this.selectedDates.some((date) => date.getTime() === this.lastSelectedDate.getTime())\n && unselectedDates.length) {\n newSelection = unselectedDates;\n }\n else {\n // delesect all dates from last clicked to shift clicked date (excluding)\n this.selectedDates = this.selectedDates.filter((date) => date.getTime() < this._startDate.getTime() || date.getTime() > this._endDate.getTime());\n this.selectedDates.push(value);\n this._deselectDate = true;\n }\n this._startDate = this._endDate = undefined;\n }\n else if (this.selectedDates.every((date) => date.getTime() !== value.getTime())) {\n newSelection.push(value);\n }\n else {\n this.selectedDates = this.selectedDates.filter((date) => date.getTime() !== value.getTime());\n this._deselectDate = true;\n }\n if (newSelection.length > 0) {\n this.selectedDates = this.selectedDates.concat(newSelection);\n this._deselectDate = false;\n }\n this.lastSelectedDate = value;\n }\n this.selectedDates = this.selectedDates.filter(d => !this.isDateDisabled(d));\n this.selectedDates.sort((a, b) => a.valueOf() - b.valueOf());\n this._onChangeCallback(this.selectedDates);\n }\n /**\n * @hidden\n */\n selectRange(value, excludeDisabledDates = false) {\n if (Array.isArray(value)) {\n value.sort((a, b) => a.valueOf() - b.valueOf());\n this._startDate = this.getDateOnly(value[0]);\n this._endDate = this.getDateOnly(value[value.length - 1]);\n }\n else {\n if (this.shiftKey && this.lastSelectedDate) {\n if (this.lastSelectedDate.getTime() === value.getTime()) {\n this.selectedDates = this.selectedDates.length === 1 ? [] : [value];\n this.rangeStarted = !!this.selectedDates.length;\n this._onChangeCallback(this.selectedDates);\n return;\n }\n // shortens the range when selecting a date inside of it\n if (this.selectedDates.some((date) => date.getTime() === value.getTime())) {\n this.lastSelectedDate.getTime() < value.getTime()\n ? this._startDate = value\n : this._endDate = value;\n }\n else {\n // extends the range when selecting a date outside of it\n // allows selection from last deselected to current selected date\n if (this.lastSelectedDate.getTime() < value.getTime()) {\n this._startDate = this._startDate ?? this.lastSelectedDate;\n this._endDate = value;\n }\n else {\n this._startDate = value;\n this._endDate = this._endDate ?? this.lastSelectedDate;\n }\n }\n this.rangeStarted = false;\n }\n else if (!this.rangeStarted) {\n this.rangeStarted = true;\n this.selectedDates = [value];\n this._startDate = this._endDate = undefined;\n }\n else {\n this.rangeStarted = false;\n if (this.selectedDates[0].getTime() === value.getTime()) {\n this.selectedDates = [];\n this._onChangeCallback(this.selectedDates);\n return;\n }\n [this._startDate, this._endDate] = this.lastSelectedDate.getTime() < value.getTime()\n ? [this.lastSelectedDate, value]\n : [value, this.lastSelectedDate];\n }\n this.lastSelectedDate = value;\n }\n if (this._startDate && this._endDate) {\n this.selectedDates = [this._startDate, ...this.generateDateRange(this._startDate, this._endDate)];\n }\n if (excludeDisabledDates) {\n this.selectedDates = this.selectedDates.filter(d => !this.isDateDisabled(d));\n }\n this._onChangeCallback(this.selectedDates);\n }\n /**\n * Performs a single deselection.\n *\n * @hidden\n */\n deselectSingle(value) {\n if (this.selectedDates !== null &&\n this.getDateOnlyInMs(value) === this.getDateOnlyInMs(this.selectedDates)) {\n this.selectedDates = null;\n this._onChangeCallback(this.selectedDates);\n }\n }\n /**\n * Performs a multiple deselection.\n *\n * @hidden\n */\n deselectMultiple(value) {\n value = value.filter(v => v !== null);\n const selectedDatesCount = this.selectedDates.length;\n const datesInMsToDeselect = new Set(value.map(v => this.getDateOnlyInMs(v)));\n for (let i = this.selectedDates.length - 1; i >= 0; i--) {\n if (datesInMsToDeselect.has(this.getDateOnlyInMs(this.selectedDates[i]))) {\n this.selectedDates.splice(i, 1);\n }\n }\n if (this.selectedDates.length !== selectedDatesCount) {\n this._onChangeCallback(this.selectedDates);\n }\n }\n /**\n * Performs a range deselection.\n *\n * @hidden\n */\n deselectRange(value) {\n value = value.filter(v => v !== null);\n if (value.length < 1) {\n return;\n }\n value.sort((a, b) => a.valueOf() - b.valueOf());\n const valueStart = this.getDateOnlyInMs(value[0]);\n const valueEnd = this.getDateOnlyInMs(value[value.length - 1]);\n this.selectedDates.sort((a, b) => a.valueOf() - b.valueOf());\n const selectedDatesStart = this.getDateOnlyInMs(this.selectedDates[0]);\n const selectedDatesEnd = this.getDateOnlyInMs(this.selectedDates[this.selectedDates.length - 1]);\n if (!(valueEnd < selectedDatesStart) && !(valueStart > selectedDatesEnd)) {\n this.selectedDates = [];\n this.rangeStarted = false;\n this._onChangeCallback(this.selectedDates);\n }\n }\n validateDate(value) {\n return DateTimeUtil.isValidDate(value) ? value : new Date();\n }\n}\nIgxCalendarBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarBaseDirective, deps: [{ token: PlatformUtil }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCalendarBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarBaseDirective, selector: \"[igxCalendarBase]\", inputs: { hideOutsideDays: \"hideOutsideDays\", resourceStrings: \"resourceStrings\", weekStart: \"weekStart\", locale: \"locale\", formatOptions: \"formatOptions\", formatViews: \"formatViews\", selection: \"selection\", value: \"value\", viewDate: \"viewDate\", disabledDates: \"disabledDates\", specialDates: \"specialDates\" }, outputs: { selected: \"selected\", viewDateChanged: \"viewDateChanged\", activeViewChanged: \"activeViewChanged\" }, host: { listeners: { \"pointerdown\": \"onPointerdown($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarBaseDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCalendarBase]',\n }]\n }], ctorParameters: function () { return [{ type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, propDecorators: { hideOutsideDays: [{\n type: Input\n }], selected: [{\n type: Output\n }], viewDateChanged: [{\n type: Output\n }], activeViewChanged: [{\n type: Output\n }], resourceStrings: [{\n type: Input\n }], weekStart: [{\n type: Input\n }], locale: [{\n type: Input\n }], formatOptions: [{\n type: Input\n }], formatViews: [{\n type: Input\n }], selection: [{\n type: Input\n }], value: [{\n type: Input\n }], viewDate: [{\n type: Input\n }], disabledDates: [{\n type: Input\n }], specialDates: [{\n type: Input\n }], onPointerdown: [{\n type: HostListener,\n args: ['pointerdown', ['$event']]\n }] } });\n\n/**\n * This file contains all the directives used by the @link IgxCalendarComponent.\n * Except for the directives which are used for templating the calendar itself\n * you should generally not use them directly.\n *\n * @preferred\n */\n/**\n * @hidden\n */\nclass IgxCalendarYearDirective {\n get currentCSS() {\n return this.isCurrentYear;\n }\n get role() {\n return this.isCurrentYear ? 'spinbutton' : null;\n }\n get valuenow() {\n return this.isCurrentYear ? this.date.getFullYear() : null;\n }\n get tabIndex() {\n return this.isCurrentYear ? 0 : -1;\n }\n get isCurrentYear() {\n return this.date.getFullYear() === this.value.getFullYear();\n }\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n constructor(elementRef) {\n this.elementRef = elementRef;\n this.yearSelection = new EventEmitter();\n }\n onClick() {\n this.yearSelection.emit(this.value);\n }\n}\nIgxCalendarYearDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarYearDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCalendarYearDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarYearDirective, selector: \"[igxCalendarYear]\", inputs: { value: [\"igxCalendarYear\", \"value\"], date: \"date\" }, outputs: { yearSelection: \"yearSelection\" }, host: { listeners: { \"click\": \"onClick()\" }, properties: { \"class.igx-calendar__year--current\": \"this.currentCSS\", \"attr.role\": \"this.role\", \"attr.aria-valuenow\": \"this.valuenow\", \"attr.tabindex\": \"this.tabIndex\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarYearDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCalendarYear]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { value: [{\n type: Input,\n args: ['igxCalendarYear']\n }], date: [{\n type: Input\n }], yearSelection: [{\n type: Output\n }], currentCSS: [{\n type: HostBinding,\n args: ['class.igx-calendar__year--current']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], valuenow: [{\n type: HostBinding,\n args: ['attr.aria-valuenow']\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }] } });\nclass IgxCalendarMonthDirective {\n get currentCSS() {\n return this.isCurrentMonth;\n }\n get isCurrentMonth() {\n return this.date.getMonth() === this.value.getMonth();\n }\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n constructor(elementRef) {\n this.elementRef = elementRef;\n this.monthSelection = new EventEmitter();\n }\n onClick() {\n const date = new Date(this.value.getFullYear(), this.value.getMonth(), this.date.getDate());\n this.monthSelection.emit(date);\n }\n}\nIgxCalendarMonthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarMonthDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCalendarMonthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarMonthDirective, selector: \"[igxCalendarMonth]\", inputs: { value: [\"igxCalendarMonth\", \"value\"], date: \"date\", index: \"index\" }, outputs: { monthSelection: \"monthSelection\" }, host: { listeners: { \"click\": \"onClick()\" }, properties: { \"class.igx-calendar__month--current\": \"this.currentCSS\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarMonthDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCalendarMonth]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { value: [{\n type: Input,\n args: ['igxCalendarMonth']\n }], date: [{\n type: Input\n }], index: [{\n type: Input\n }], monthSelection: [{\n type: Output\n }], currentCSS: [{\n type: HostBinding,\n args: ['class.igx-calendar__month--current']\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }] } });\n/**\n * @hidden\n */\nclass IgxCalendarHeaderTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxCalendarHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCalendarHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarHeaderTemplateDirective, selector: \"[igxCalendarHeader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarHeaderTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCalendarHeader]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * @hidden\n */\nclass IgxCalendarSubheaderTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxCalendarSubheaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarSubheaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCalendarSubheaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarSubheaderTemplateDirective, selector: \"[igxCalendarSubheader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarSubheaderTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCalendarSubheader]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * @hidden\n */\nclass IgxCalendarScrollMonthDirective {\n constructor(element, zone, platform) {\n this.element = element;\n this.zone = zone;\n this.platform = platform;\n /**\n * @hidden\n */\n this.destroy$ = new Subject();\n }\n /**\n * @hidden\n */\n onMouseDown() {\n this.startScroll();\n }\n /**\n * @hidden\n */\n onMouseUp(event) {\n this.stopScroll(event);\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n fromEvent(this.element.nativeElement, 'keyup').pipe(debounce(() => interval(100)), takeUntil(this.destroy$)).subscribe((event) => {\n this.stopScroll(event);\n });\n this.zone.runOutsideAngular(() => {\n fromEvent(this.element.nativeElement, 'keydown').pipe(tap((event) => {\n if (this.platform.isActivationKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n }\n }), debounce(() => interval(100)), takeUntil(this.destroy$)).subscribe((event) => {\n if (this.platform.isActivationKey(event)) {\n this.zone.run(() => this.startScroll(true));\n }\n });\n });\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\nIgxCalendarScrollMonthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarScrollMonthDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCalendarScrollMonthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarScrollMonthDirective, selector: \"[igxCalendarScrollMonth]\", inputs: { startScroll: \"startScroll\", stopScroll: \"stopScroll\" }, host: { listeners: { \"mousedown\": \"onMouseDown()\", \"mouseup\": \"onMouseUp($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarScrollMonthDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCalendarScrollMonth]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: PlatformUtil }]; }, propDecorators: { startScroll: [{\n type: Input\n }], stopScroll: [{\n type: Input\n }], onMouseDown: [{\n type: HostListener,\n args: ['mousedown']\n }], onMouseUp: [{\n type: HostListener,\n args: ['mouseup', ['$event']]\n }] } });\n\nconst IgxCalendarView = mkenum({\n Month: 'month',\n Year: 'year',\n Decade: 'decade'\n});\n/**\n * @hidden\n */\nvar CalendarView;\n(function (CalendarView) {\n CalendarView[CalendarView[\"DEFAULT\"] = 0] = \"DEFAULT\";\n CalendarView[CalendarView[\"YEAR\"] = 1] = \"YEAR\";\n CalendarView[CalendarView[\"DECADE\"] = 2] = \"DECADE\";\n})(CalendarView || (CalendarView = {}));\nclass IgxMonthPickerBaseDirective extends IgxCalendarBaseDirective {\n constructor() {\n super(...arguments);\n /**\n * Holds month view index we are operating on.\n */\n this.activeViewIdx = 0;\n /**\n * @hidden\n */\n this._activeView = IgxCalendarView.Month;\n }\n /**\n * Gets the current active view.\n * ```typescript\n * this.activeView = calendar.activeView;\n * ```\n */\n get activeView() {\n return this._activeView;\n }\n /**\n * Sets the current active view.\n * ```html\n * \n * ```\n * ```typescript\n * calendar.activeView = IgxCalendarView.YEAR;\n * ```\n */\n set activeView(val) {\n this._activeView = val;\n }\n /**\n * @hidden\n */\n get isDefaultView() {\n return this._activeView === CalendarView.DEFAULT || this._activeView === IgxCalendarView.Month;\n }\n /**\n * @hidden\n */\n get isDecadeView() {\n return this._activeView === CalendarView.DECADE || this._activeView === IgxCalendarView.Decade;\n }\n /**\n * @hidden\n */\n changeYear(event) {\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.getFirstViewDate(event, 'month', this.activeViewIdx);\n this.activeView = IgxCalendarView.Month;\n requestAnimationFrame(() => {\n if (this.yearsBtns && this.yearsBtns.length) {\n this.yearsBtns.find((e, idx) => idx === this.activeViewIdx).nativeElement.focus();\n }\n });\n }\n /**\n * @hidden\n */\n activeViewDecade(activeViewIdx = 0) {\n this.activeView = IgxCalendarView.Decade;\n this.activeViewIdx = activeViewIdx;\n }\n /**\n * @hidden\n */\n activeViewDecadeKB(event, activeViewIdx = 0) {\n if (this.platform.isActivationKey(event)) {\n event.preventDefault();\n this.activeViewDecade(activeViewIdx);\n }\n }\n /**\n * Returns the locale representation of the year in the year view if enabled,\n * otherwise returns the default `Date.getFullYear()` value.\n *\n * @hidden\n */\n formattedYear(value) {\n if (this.formatViews.year) {\n return this.formatterYear.format(value);\n }\n return `${value.getFullYear()}`;\n }\n}\nIgxMonthPickerBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthPickerBaseDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nIgxMonthPickerBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxMonthPickerBaseDirective, selector: \"[igxMonthPickerBase]\", inputs: { activeView: \"activeView\" }, viewQueries: [{ propertyName: \"yearsBtns\", predicate: [\"yearsBtn\"], descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthPickerBaseDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxMonthPickerBase]'\n }]\n }], propDecorators: { yearsBtns: [{\n type: ViewChildren,\n args: ['yearsBtn']\n }], activeView: [{\n type: Input\n }] } });\n\nlet NEXT_ID$k = 0;\nclass IgxMonthsViewComponent {\n /**\n * Gets/sets the selected date of the months view.\n * By default it is the current date.\n * ```html\n * \n * ```\n * ```typescript\n * let date = this.monthsView.date;\n * ```\n *\n * @memberof IgxMonthsViewComponent\n */\n set date(value) {\n if (!(value instanceof Date)) {\n return;\n }\n this._date = value;\n this.activeMonth = this.date.getMonth();\n }\n get date() {\n return this._date;\n }\n /**\n * Gets the month format option of the months view.\n * ```typescript\n * let monthFormat = this.monthsView.monthFormat.\n * ```\n */\n get monthFormat() {\n return this._monthFormat;\n }\n /**\n * Sets the month format option of the months view.\n * ```html\n * [monthFormat] = \"short'\"\n * ```\n *\n * @memberof IgxMonthsViewComponent\n */\n set monthFormat(value) {\n this._monthFormat = value;\n this.initMonthFormatter();\n }\n /**\n * Gets the `locale` of the months view.\n * Default value is `\"en\"`.\n * ```typescript\n * let locale = this.monthsView.locale;\n * ```\n *\n * @memberof IgxMonthsViewComponent\n */\n get locale() {\n return this._locale;\n }\n /**\n * Sets the `locale` of the months view.\n * Expects a valid BCP 47 language tag.\n * Default value is `\"en\"`.\n * ```html\n * \n * ```\n *\n * @memberof IgxMonthsViewComponent\n */\n set locale(value) {\n this._locale = value;\n this.initMonthFormatter();\n }\n /**\n * Returns an array of date objects which are then used to\n * properly render the month names.\n *\n * Used in the template of the component\n *\n * @hidden\n */\n get months() {\n let start = new Date(this.date.getFullYear(), 0, 1);\n const result = [];\n for (let i = 0; i < 12; i++) {\n result.push(start);\n start = this._calendarModel.timedelta(start, 'month', 1);\n }\n return result;\n }\n constructor(el) {\n this.el = el;\n /**\n * Sets/gets the `id` of the months view.\n * If not set, the `id` will have value `\"igx-months-view-0\"`.\n * ```html\n * \n * ```\n * ```typescript\n * let monthsViewId = this.monthsView.id;\n * ```\n *\n * @memberof IgxMonthsViewComponent\n */\n this.id = `igx-months-view-${NEXT_ID$k++}`;\n /**\n * Gets/sets whether the view should be rendered\n * according to the locale and monthFormat, if any.\n */\n this.formatView = true;\n /**\n * Emits an event when a selection is made in the months view.\n * Provides reference the `date` property in the `IgxMonthsViewComponent`.\n * ```html\n * \n * ```\n *\n * @memberof IgxMonthsViewComponent\n */\n this.selected = new EventEmitter();\n /**\n * The default css class applied to the component.\n *\n * @hidden\n */\n this.styleClass = true;\n this._date = new Date();\n /**\n * @hidden\n */\n this._locale = 'en';\n /**\n * @hidden\n */\n this._monthFormat = 'short';\n /**\n * @hidden\n */\n this._onTouchedCallback = noop;\n /**\n * @hidden\n */\n this._onChangeCallback = noop;\n this.initMonthFormatter();\n this._calendarModel = new Calendar();\n }\n /**\n * @hidden\n */\n onKeydownArrowUp(event) {\n event.preventDefault();\n event.stopPropagation();\n const node = this.monthsRef.find((date) => date.nativeElement === event.target);\n if (!node) {\n return;\n }\n const months = this.monthsRef.toArray();\n const nodeRect = node.nativeElement.getBoundingClientRect();\n for (let index = months.indexOf(node) - 1; index >= 0; index--) {\n const nextNodeRect = months[index].nativeElement.getBoundingClientRect();\n const tolerance = 6;\n if (nodeRect.top !== nextNodeRect.top && (nextNodeRect.left - nodeRect.left) < tolerance) {\n const month = months[index];\n month.nativeElement.focus();\n this.activeMonth = month.value.getMonth();\n break;\n }\n }\n }\n /**\n * @hidden\n */\n onKeydownArrowDown(event) {\n event.preventDefault();\n event.stopPropagation();\n const node = this.monthsRef.find((date) => date.nativeElement === event.target);\n if (!node) {\n return;\n }\n const months = this.monthsRef.toArray();\n const nodeRect = node.nativeElement.getBoundingClientRect();\n for (let index = months.indexOf(node) + 1; index < months.length; index++) {\n const nextNodeRect = months[index].nativeElement.getBoundingClientRect();\n const tolerance = 6;\n if (nextNodeRect.top !== nodeRect.top && (nodeRect.left - nextNodeRect.left) < tolerance) {\n const month = months[index];\n month.nativeElement.focus();\n this.activeMonth = month.value.getMonth();\n break;\n }\n }\n }\n /**\n * @hidden\n */\n onKeydownArrowRight(event) {\n event.preventDefault();\n event.stopPropagation();\n const node = this.monthsRef.find((date) => date.nativeElement === event.target);\n if (!node) {\n return;\n }\n const months = this.monthsRef.toArray();\n if (months.indexOf(node) + 1 < months.length) {\n const month = months[months.indexOf(node) + 1];\n this.activeMonth = month.value.getMonth();\n month.nativeElement.focus();\n }\n }\n /**\n * @hidden\n */\n onKeydownArrowLeft(event) {\n event.preventDefault();\n event.stopPropagation();\n const node = this.monthsRef.find((date) => date.nativeElement === event.target);\n if (!node) {\n return;\n }\n const months = this.monthsRef.toArray();\n if (months.indexOf(node) - 1 >= 0) {\n const month = months[months.indexOf(node) - 1];\n this.activeMonth = month.value.getMonth();\n month.nativeElement.focus();\n }\n }\n /**\n * @hidden\n */\n onKeydownHome(event) {\n event.preventDefault();\n event.stopPropagation();\n const month = this.monthsRef.toArray()[0];\n this.activeMonth = month.value.getMonth();\n month.nativeElement.focus();\n }\n /**\n * @hidden\n */\n onKeydownEnd(event) {\n event.preventDefault();\n event.stopPropagation();\n const months = this.monthsRef.toArray();\n const month = months[months.length - 1];\n this.activeMonth = month.value.getMonth();\n month.nativeElement.focus();\n }\n /**\n * @hidden\n */\n onKeydownEnter(event) {\n const value = this.monthsRef.find((date) => date.nativeElement === event.target).value;\n this.date = new Date(value.getFullYear(), value.getMonth(), this.date.getDate());\n this.activeMonth = this.date.getMonth();\n this.selected.emit(this.date);\n this._onChangeCallback(this.date);\n }\n resetActiveMonth() {\n this.activeMonth = this.date.getMonth();\n }\n /**\n * Returns the locale representation of the month in the months view.\n *\n * @hidden\n */\n formattedMonth(value) {\n if (this.formatView) {\n return this._formatterMonth.format(value);\n }\n return `${value.getMonth()}`;\n }\n /**\n * @hidden\n */\n selectMonth(event) {\n this.selected.emit(event);\n this.date = event;\n this.activeMonth = this.date.getMonth();\n this._onChangeCallback(this.date);\n }\n /**\n * @hidden\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * @hidden\n */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /**\n * @hidden\n */\n writeValue(value) {\n if (value) {\n this.date = value;\n }\n }\n /**\n * @hidden\n */\n monthTracker(index, item) {\n return `${item.getMonth()}}`;\n }\n /**\n * @hidden\n */\n initMonthFormatter() {\n this._formatterMonth = new Intl.DateTimeFormat(this._locale, { month: this.monthFormat });\n }\n}\nIgxMonthsViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthsViewComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxMonthsViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxMonthsViewComponent, selector: \"igx-months-view\", inputs: { id: \"id\", date: \"date\", monthFormat: \"monthFormat\", locale: \"locale\", formatView: \"formatView\" }, outputs: { selected: \"selected\" }, host: { listeners: { \"keydown.arrowup\": \"onKeydownArrowUp($event)\", \"keydown.arrowdown\": \"onKeydownArrowDown($event)\", \"keydown.arrowright\": \"onKeydownArrowRight($event)\", \"keydown.arrowleft\": \"onKeydownArrowLeft($event)\", \"keydown.home\": \"onKeydownHome($event)\", \"keydown.end\": \"onKeydownEnd($event)\", \"keydown.enter\": \"onKeydownEnter($event)\", \"focusout\": \"resetActiveMonth()\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-calendar\": \"this.styleClass\" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxMonthsViewComponent, multi: true }], viewQueries: [{ propertyName: \"monthsRef\", predicate: IgxCalendarMonthDirective, descendants: true, read: IgxCalendarMonthDirective }], ngImport: i0, template: \"
    \\n
    \\n \\n {{ formattedMonth(month) | titlecase }}\\n \\n
    \\n
    \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: IgxCalendarMonthDirective, selector: \"[igxCalendarMonth]\", inputs: [\"igxCalendarMonth\", \"date\", \"index\"], outputs: [\"monthSelection\"] }, { kind: \"pipe\", type: i1$1.TitleCasePipe, name: \"titlecase\" }, { kind: \"pipe\", type: i1$1.DatePipe, name: \"date\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthsViewComponent, decorators: [{\n type: Component,\n args: [{ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxMonthsViewComponent, multi: true }], selector: 'igx-months-view', template: \"
    \\n
    \\n \\n {{ formattedMonth(month) | titlecase }}\\n \\n
    \\n
    \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], date: [{\n type: Input\n }], monthFormat: [{\n type: Input\n }], locale: [{\n type: Input\n }], formatView: [{\n type: Input\n }], selected: [{\n type: Output\n }], styleClass: [{\n type: HostBinding,\n args: ['class.igx-calendar']\n }], monthsRef: [{\n type: ViewChildren,\n args: [IgxCalendarMonthDirective, { read: IgxCalendarMonthDirective }]\n }], onKeydownArrowUp: [{\n type: HostListener,\n args: ['keydown.arrowup', ['$event']]\n }], onKeydownArrowDown: [{\n type: HostListener,\n args: ['keydown.arrowdown', ['$event']]\n }], onKeydownArrowRight: [{\n type: HostListener,\n args: ['keydown.arrowright', ['$event']]\n }], onKeydownArrowLeft: [{\n type: HostListener,\n args: ['keydown.arrowleft', ['$event']]\n }], onKeydownHome: [{\n type: HostListener,\n args: ['keydown.home', ['$event']]\n }], onKeydownEnd: [{\n type: HostListener,\n args: ['keydown.end', ['$event']]\n }], onKeydownEnter: [{\n type: HostListener,\n args: ['keydown.enter', ['$event']]\n }], resetActiveMonth: [{\n type: HostListener,\n args: ['focusout']\n }] } });\n\nclass CalendarHammerConfig extends HammerGestureConfig {\n constructor() {\n super(...arguments);\n this.overrides = {\n pan: { direction: Hammer.DIRECTION_VERTICAL, threshold: 1 }\n };\n }\n}\nCalendarHammerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: CalendarHammerConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nCalendarHammerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: CalendarHammerConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: CalendarHammerConfig, decorators: [{\n type: Injectable\n }] });\nclass IgxYearsViewComponent {\n /**\n * Gets/sets the selected date of the years view.\n * By default it is the current date.\n * ```html\n * \n * ```\n * ```typescript\n * let date = this.yearsView.date;\n * ```\n *\n * @memberof IgxYearsViewComponent\n */\n get date() {\n return this._date;\n }\n set date(value) {\n if (!(value instanceof Date)) {\n return;\n }\n this._date = value;\n }\n /**\n * Gets the year format option of the years view.\n * ```typescript\n * let yearFormat = this.yearsView.yearFormat.\n * ```\n */\n get yearFormat() {\n return this._yearFormat;\n }\n /**\n * Sets the year format option of the years view.\n * ```html\n * \n * ```\n *\n * @memberof IgxYearsViewComponent\n */\n set yearFormat(value) {\n this._yearFormat = value;\n this.initYearFormatter();\n }\n /**\n * Gets the `locale` of the years view.\n * Default value is `\"en\"`.\n * ```typescript\n * let locale = this.yearsView.locale;\n * ```\n *\n * @memberof IgxYearsViewComponent\n */\n get locale() {\n return this._locale;\n }\n /**\n * Sets the `locale` of the years view.\n * Expects a valid BCP 47 language tag.\n * Default value is `\"en\"`.\n * ```html\n * \n * ```\n *\n * @memberof IgxYearsViewComponent\n */\n set locale(value) {\n this._locale = value;\n this.initYearFormatter();\n }\n /**\n * Returns an array of date objects which are then used to properly\n * render the years.\n *\n * Used in the template of the component.\n *\n * @hidden\n */\n get decade() {\n const result = [];\n const start = this.date.getFullYear() - 3;\n const end = this.date.getFullYear() + 4;\n for (const year of range(start, end)) {\n result.push(new Date(year, this.date.getMonth(), this.date.getDate()));\n }\n return result;\n }\n constructor(el) {\n this.el = el;\n /**\n * Emits an event when a selection is made in the years view.\n * Provides reference the `date` property in the `IgxYearsViewComponent`.\n * ```html\n * \n * ```\n *\n * @memberof IgxYearsViewComponent\n */\n this.selected = new EventEmitter();\n /**\n * The default css class applied to the component.\n *\n * @hidden\n */\n this.styleClass = true;\n /**\n * @hidden\n */\n this._locale = 'en';\n /**\n * @hidden\n */\n this._yearFormat = 'numeric';\n /**\n * @hidden\n */\n this._date = new Date();\n /**\n * @hidden\n */\n this._onTouchedCallback = noop;\n /**\n * @hidden\n */\n this._onChangeCallback = noop;\n this.initYearFormatter();\n this._calendarModel = new Calendar();\n }\n /**\n * @hidden\n */\n onKeydownArrowDown(event) {\n event.preventDefault();\n event.stopPropagation();\n this.generateYearRange(1);\n this.calendarDir.find(date => date.isCurrentYear).nativeElement.nextElementSibling.focus();\n }\n /**\n * @hidden\n */\n onKeydownArrowUp(event) {\n event.preventDefault();\n event.stopPropagation();\n this.generateYearRange(-1);\n this.calendarDir.find(date => date.isCurrentYear).nativeElement.previousElementSibling.focus();\n }\n /**\n * @hidden\n */\n onKeydownEnter() {\n this.selected.emit(this.date);\n this._onChangeCallback(this.date);\n }\n /**\n * Returns the locale representation of the year in the years view.\n *\n * @hidden\n */\n formattedYear(value) {\n if (this.formatView) {\n return this._formatterYear.format(value);\n }\n return `${value.getFullYear()}`;\n }\n /**\n * @hidden\n */\n selectYear(event) {\n this.date = event;\n this.selected.emit(this.date);\n this._onChangeCallback(this.date);\n }\n /**\n * @hidden\n */\n scroll(event) {\n event.preventDefault();\n event.stopPropagation();\n const delta = event.deltaY < 0 ? -1 : 1;\n this.generateYearRange(delta);\n }\n /**\n * @hidden\n */\n pan(event) {\n const delta = event.deltaY < 0 ? 1 : -1;\n this.generateYearRange(delta);\n }\n /**\n * @hidden\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * @hidden\n */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /**\n * @hidden\n */\n yearTracker(index, item) {\n return `${item.getFullYear()}}`;\n }\n /**\n * @hidden\n */\n writeValue(value) {\n if (value) {\n this.date = value;\n }\n }\n /**\n * @hidden\n */\n initYearFormatter() {\n this._formatterYear = new Intl.DateTimeFormat(this._locale, { year: this.yearFormat });\n }\n /**\n * @hidden\n */\n generateYearRange(delta) {\n const currentYear = new Date().getFullYear();\n if ((delta > 0 && this.date.getFullYear() - currentYear >= 95) ||\n (delta < 0 && currentYear - this.date.getFullYear() >= 95)) {\n return;\n }\n this.date = this._calendarModel.timedelta(this.date, 'year', delta);\n }\n}\nIgxYearsViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxYearsViewComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxYearsViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxYearsViewComponent, selector: \"igx-years-view\", inputs: { formatView: \"formatView\", date: \"date\", yearFormat: \"yearFormat\", locale: \"locale\" }, outputs: { selected: \"selected\" }, host: { listeners: { \"keydown.arrowdown\": \"onKeydownArrowDown($event)\", \"keydown.arrowup\": \"onKeydownArrowUp($event)\", \"keydown.enter\": \"onKeydownEnter()\" }, properties: { \"class.igx-calendar\": \"this.styleClass\" } }, providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxYearsViewComponent,\n multi: true\n },\n {\n provide: HAMMER_GESTURE_CONFIG,\n useClass: CalendarHammerConfig\n }\n ], viewQueries: [{ propertyName: \"calendarDir\", predicate: IgxCalendarYearDirective, descendants: true, read: IgxCalendarYearDirective }], ngImport: i0, template: \"
    \\n
    \\n \\n\\n {{ formattedYear(year) }}\\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: IgxCalendarYearDirective, selector: \"[igxCalendarYear]\", inputs: [\"igxCalendarYear\", \"date\"], outputs: [\"yearSelection\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxYearsViewComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxYearsViewComponent,\n multi: true\n },\n {\n provide: HAMMER_GESTURE_CONFIG,\n useClass: CalendarHammerConfig\n }\n ], selector: 'igx-years-view', template: \"
    \\n
    \\n \\n\\n {{ formattedYear(year) }}\\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { formatView: [{\n type: Input\n }], selected: [{\n type: Output\n }], styleClass: [{\n type: HostBinding,\n args: ['class.igx-calendar']\n }], calendarDir: [{\n type: ViewChildren,\n args: [IgxCalendarYearDirective, { read: IgxCalendarYearDirective }]\n }], date: [{\n type: Input\n }], yearFormat: [{\n type: Input\n }], locale: [{\n type: Input\n }], onKeydownArrowDown: [{\n type: HostListener,\n args: ['keydown.arrowdown', ['$event']]\n }], onKeydownArrowUp: [{\n type: HostListener,\n args: ['keydown.arrowup', ['$event']]\n }], onKeydownEnter: [{\n type: HostListener,\n args: ['keydown.enter']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxDayItemComponent {\n /**\n * Returns boolean indicating if the day is selected\n *\n */\n get selected() {\n return this._selected;\n }\n /**\n * Selects the day\n */\n set selected(value) {\n this._selected = value;\n }\n get isCurrentMonth() {\n return this.date.isCurrentMonth;\n }\n get isPreviousMonth() {\n return this.date.isPrevMonth;\n }\n get isNextMonth() {\n return this.date.isNextMonth;\n }\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n get isSelectedCSS() {\n return (!this.isDisabled && this.selected);\n }\n get isInactive() {\n return this.date.isNextMonth || this.date.isPrevMonth;\n }\n get isHidden() {\n return this.hideOutsideDays && this.isInactive;\n }\n get isToday() {\n const today = new Date(Date.now());\n const date = this.date.date;\n if (date.getDate() === today.getDate()) {\n this.nativeElement.setAttribute('aria-current', 'date');\n }\n return (date.getFullYear() === today.getFullYear() &&\n date.getMonth() === today.getMonth() &&\n date.getDate() === today.getDate());\n }\n get isWeekend() {\n const day = this.date.date.getDay();\n return day === 0 || day === 6;\n }\n get isDisabled() {\n if (this.disabledDates === null) {\n return false;\n }\n return isDateInRanges(this.date.date, this.disabledDates);\n }\n get isOutOfRange() {\n if (!this.outOfRangeDates) {\n return false;\n }\n return isDateInRanges(this.date.date, this.outOfRangeDates);\n }\n get isFocusable() {\n return this.isCurrentMonth && !this.isHidden && !this.isDisabled && !this.isOutOfRange;\n }\n get isWithinRangeCSS() {\n return !this.isSingleSelection && this.isWithinRange;\n }\n get isSpecial() {\n if (this.specialDates === null) {\n return false;\n }\n return isDateInRanges(this.date.date, this.specialDates);\n }\n get isDisabledCSS() {\n return this.isHidden || this.isDisabled || this.isOutOfRange;\n }\n get isSingleSelection() {\n return this.selection !== CalendarSelection.RANGE;\n }\n constructor(elementRef) {\n this.elementRef = elementRef;\n this.hideOutsideDays = false;\n this.isLastInRange = false;\n this.isFirstInRange = false;\n this.isWithinRange = false;\n this.dateSelection = new EventEmitter();\n this._selected = false;\n }\n onSelect(event) {\n event.stopPropagation();\n this.dateSelection.emit(this.date);\n }\n}\nIgxDayItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDayItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxDayItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDayItemComponent, selector: \"igx-day-item\", inputs: { date: \"date\", selection: \"selection\", selected: \"selected\", disabledDates: \"disabledDates\", outOfRangeDates: \"outOfRangeDates\", specialDates: \"specialDates\", hideOutsideDays: \"hideOutsideDays\", isLastInRange: \"isLastInRange\", isFirstInRange: \"isFirstInRange\", isWithinRange: \"isWithinRange\" }, outputs: { dateSelection: \"dateSelection\" }, host: { listeners: { \"click\": \"onSelect($event)\", \"keydown.enter\": \"onSelect($event)\" }, properties: { \"class.igx-calendar__date--last\": \"this.isLastInRange\", \"class.igx-calendar__date--first\": \"this.isFirstInRange\", \"class.igx-calendar__date--selected\": \"this.isSelectedCSS\", \"class.igx-calendar__date--inactive\": \"this.isInactive\", \"class.igx-calendar__date--hidden\": \"this.isHidden\", \"class.igx-calendar__date--current\": \"this.isToday\", \"class.igx-calendar__date--weekend\": \"this.isWeekend\", \"class.igx-calendar__date--range\": \"this.isWithinRangeCSS\", \"class.igx-calendar__date--special\": \"this.isSpecial\", \"class.igx-calendar__date--disabled\": \"this.isDisabledCSS\", \"class.igx-calendar__date--single\": \"this.isSingleSelection\" } }, ngImport: i0, template: \"\\n \\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDayItemComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-day-item', template: \"\\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { date: [{\n type: Input\n }], selection: [{\n type: Input\n }], selected: [{\n type: Input\n }], disabledDates: [{\n type: Input\n }], outOfRangeDates: [{\n type: Input\n }], specialDates: [{\n type: Input\n }], hideOutsideDays: [{\n type: Input\n }], isLastInRange: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-calendar__date--last']\n }], isFirstInRange: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-calendar__date--first']\n }], isWithinRange: [{\n type: Input\n }], dateSelection: [{\n type: Output\n }], isSelectedCSS: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--selected']\n }], isInactive: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--inactive']\n }], isHidden: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--hidden']\n }], isToday: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--current']\n }], isWeekend: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--weekend']\n }], isWithinRangeCSS: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--range']\n }], isSpecial: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--special']\n }], isDisabledCSS: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--disabled']\n }], isSingleSelection: [{\n type: HostBinding,\n args: ['class.igx-calendar__date--single']\n }], onSelect: [{\n type: HostListener,\n args: ['click', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.enter', ['$event']]\n }] } });\n\nvar Direction$1;\n(function (Direction) {\n Direction[\"Up\"] = \"ArrowUp\";\n Direction[\"Down\"] = \"ArrowDown\";\n Direction[\"Left\"] = \"ArrowLeft\";\n Direction[\"Right\"] = \"ArrowRight\";\n})(Direction$1 || (Direction$1 = {}));\nconst ARROW = 'Arrow';\n/** @hidden */\nclass IgxDaysViewNavigationService {\n /**\n * Implements kb navigation in all MoveDirections. nextDate and nextMonthView naming convention is used for both previous/next\n *\n * @hidden\n */\n focusNextDate(target, key, nextView = false) {\n if (target.childElementCount === 0) {\n target = target.parentElement;\n }\n if (key.indexOf('Arrow') === -1) {\n key = ARROW.concat(key);\n }\n const monthView = this.monthView;\n const node = monthView.dates.find((date) => date.nativeElement === target);\n let dates = monthView.dates.toArray();\n let day;\n let step;\n let i;\n let nextDate;\n const index = dates.indexOf(node);\n if (!node) {\n return;\n }\n // focus item in current month\n switch (key) {\n case Direction$1.Left: {\n step = -1;\n nextDate = this.timedelta(node.date.date, step);\n for (i = index; i > 0; i--) {\n day = nextView ? dates[i] : dates[i - 1];\n nextDate = day.date.date;\n if (day.date.isPrevMonth) {\n break;\n }\n if (day && day.isFocusable) {\n day.nativeElement.focus();\n return;\n }\n }\n break;\n }\n case Direction$1.Right: {\n step = 1;\n nextDate = this.timedelta(node.date.date, step);\n for (i = index; i < dates.length - 1; i++) {\n day = nextView ? dates[i] : dates[i + 1];\n nextDate = day.date.date;\n if (day.date.isNextMonth) {\n break;\n }\n if (day && day.isFocusable) {\n day.nativeElement.focus();\n return;\n }\n }\n break;\n }\n case Direction$1.Up: {\n step = -7;\n nextDate = this.timedelta(node.date.date, step);\n for (i = index; i - 7 > -1; i -= 7) {\n day = nextView ? dates[i] : dates[i - 7];\n nextDate = day.date.date;\n if (day.date.isPrevMonth) {\n break;\n }\n if (day && day.isFocusable) {\n day.nativeElement.focus();\n return;\n }\n }\n break;\n }\n case Direction$1.Down: {\n step = 7;\n nextDate = this.timedelta(node.date.date, step);\n for (i = index; i + 7 < 42; i += 7) {\n day = nextView ? dates[i] : dates[i + 7];\n nextDate = day.date.date;\n if (day.date.isNextMonth) {\n break;\n }\n if (day && day.isFocusable) {\n day.nativeElement.focus();\n return;\n }\n }\n break;\n }\n }\n // focus item in prev/next visible month\n const nextMonthView = step > 0 ? monthView.nextMonthView : monthView.prevMonthView;\n if (nextMonthView) {\n dates = nextMonthView.dates.toArray();\n day = dates.find((item) => item.date.date.getTime() === nextDate.getTime());\n if (day && day.isFocusable) {\n day.nativeElement.focus();\n return;\n }\n nextMonthView.daysNavService.focusNextDate(day.nativeElement, key);\n }\n // if iterating in the visible prev/next moths above found a day that is not focusable, ie is disabled, hidden, etc\n // then it is needed to recalculate the next day, which is going to be part of the prev/next months\n if (day && !day.isFocusable) {\n day = dates[i + step];\n if (!day) {\n nextDate = this.timedelta(node.date.date, step + i - index);\n }\n }\n // focus item in prev/next month, which is currently out of view\n let dayIsNextMonth; // determine what we need to check for next date - if it belongs to prev or next month\n if (day) {\n dayIsNextMonth = step > 0 ? day.date.isNextMonth : day.date.isPrevMonth;\n }\n if (monthView.changeDaysView && !nextMonthView && ((day && dayIsNextMonth) || !day)) {\n const monthAction = step > 0 ? ScrollMonth.NEXT : ScrollMonth.PREV;\n monthView.viewChanging.emit({ monthAction, key, nextDate });\n }\n }\n /**\n * Focuses first focusable day in the month. Will go to next visible month, if no day in the first month is focusable\n *\n * @hidden\n */\n focusHomeDate() {\n let monthView = this.monthView;\n while (!this.focusFirstDay(monthView) && monthView.nextMonthView) {\n monthView = monthView.nextMonthView;\n }\n }\n /**\n * Focuses last focusable day in the month. Will go to previous visible month, if no day in the first month is focusable\n *\n * @hidden\n */\n focusEndDate() {\n let monthView = this.monthView;\n while (!this.focusLastDay(monthView) && monthView.prevMonthView) {\n monthView = monthView.prevMonthView;\n }\n }\n timedelta(date, units) {\n const ret = new Date(date);\n ret.setDate(ret.getDate() + units);\n return ret;\n }\n focusFirstDay(monthView) {\n const dates = monthView.dates.filter(d => d.isCurrentMonth);\n for (const date of dates) {\n if (date.isFocusable) {\n date.nativeElement.focus();\n return true;\n }\n }\n return false;\n }\n focusLastDay(monthView) {\n const dates = monthView.dates.filter(d => d.isCurrentMonth);\n for (let i = dates.length - 1; i >= 0; i--) {\n if (dates[i].isFocusable) {\n dates[i].nativeElement.focus();\n return true;\n }\n }\n return false;\n }\n}\nIgxDaysViewNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDaysViewNavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxDaysViewNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDaysViewNavigationService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDaysViewNavigationService, decorators: [{\n type: Injectable\n }] });\n\nlet NEXT_ID$j = 0;\nclass IgxDaysViewComponent extends IgxCalendarBaseDirective {\n /**\n * @hidden\n * @internal\n */\n set activeDate(value) {\n this._activeDate = value;\n this.activeDateChange.emit(this._activeDate);\n }\n get activeDate() {\n return this._activeDate ? this._activeDate : this.viewDate.toLocaleDateString();\n }\n /**\n * @hidden\n */\n constructor(daysNavService, platform, _localeId) {\n super(platform, _localeId);\n this.daysNavService = daysNavService;\n /**\n * Sets/gets the `id` of the days view.\n * If not set, the `id` will have value `\"igx-days-view-0\"`.\n * ```html\n * \n * ```\n * ```typescript\n * let daysViewId = this.daysView.id;\n * ```\n */\n this.id = `igx-days-view-${NEXT_ID$j++}`;\n /**\n * @hidden\n */\n this.changeDaysView = false;\n /**\n * @hidden\n */\n this.dateSelection = new EventEmitter();\n /**\n * @hidden\n */\n this.viewChanging = new EventEmitter();\n /**\n * @hidden\n */\n this.activeDateChange = new EventEmitter();\n /**\n * @hidden\n */\n this.monthsViewBlur = new EventEmitter();\n /**\n * The default css class applied to the component.\n *\n * @hidden\n */\n this.styleClass = true;\n /** @hidden */\n this.shouldResetDate = true;\n }\n /**\n * @hidden\n * @internal\n */\n resetActiveMonth() {\n if (this.shouldResetDate) {\n const date = this.dates.find(day => day.selected && day.isCurrentMonth) ||\n this.dates.find(day => day.isToday && day.isCurrentMonth) ||\n this.dates.find(d => d.isFocusable);\n if (date) {\n this.activeDate = date.date.date.toLocaleDateString();\n }\n this.monthsViewBlur.emit();\n }\n this.shouldResetDate = true;\n }\n /**\n * @hidden\n * @internal\n */\n pointerDown() {\n this.shouldResetDate = false;\n }\n /**\n * @hidden\n */\n onKeydownArrow(event) {\n event.preventDefault();\n event.stopPropagation();\n this.shouldResetDate = false;\n this.daysNavService.focusNextDate(event.target, event.key);\n }\n /**\n * @hidden\n */\n onKeydownHome(event) {\n event.preventDefault();\n event.stopPropagation();\n this.shouldResetDate = false;\n this.getFirstMonthView().daysNavService.focusHomeDate();\n }\n /**\n * @hidden\n */\n onKeydownEnd(event) {\n event.preventDefault();\n event.stopPropagation();\n this.shouldResetDate = false;\n this.getLastMonthView().daysNavService.focusEndDate();\n }\n /**\n * @hidden\n */\n get getCalendarMonth() {\n return this.calendarModel.monthdatescalendar(this.viewDate.getFullYear(), this.viewDate.getMonth(), true);\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this.daysNavService.monthView = this;\n }\n /**\n * @hidden\n */\n ngDoCheck() {\n if (!this.changeDaysView && this.dates) {\n this.disableOutOfRangeDates();\n }\n }\n /**\n * @hidden\n * @internal\n */\n tabIndex(day) {\n return this.activeDate && this.activeDate === day.date.toLocaleDateString() && day.isCurrentMonth ? 0 : -1;\n }\n /**\n * Returns the week number by date\n *\n * @hidden\n */\n getWeekNumber(date) {\n return this.calendarModel.getWeekNumber(date);\n }\n /**\n * Returns the locale representation of the date in the days view.\n *\n * @hidden\n */\n formattedDate(value) {\n if (this.formatViews.day) {\n return this.formatterDay.format(value);\n }\n return `${value.getDate()}`;\n }\n /**\n * @hidden\n */\n generateWeekHeader() {\n const dayNames = [];\n const rv = this.calendarModel.monthdatescalendar(this.viewDate.getFullYear(), this.viewDate.getMonth())[0];\n for (const day of rv) {\n dayNames.push(this.formatterWeekday.format(day.date));\n }\n return dayNames;\n }\n /**\n * @hidden\n */\n rowTracker(index, item) {\n return `${item[index].date.getMonth()}${item[index].date.getDate()}`;\n }\n /**\n * @hidden\n */\n dateTracker(index, item) {\n return `${item.date.getMonth()}--${item.date.getDate()}`;\n }\n /**\n * @hidden\n */\n isCurrentMonth(value) {\n return this.viewDate.getMonth() === value.getMonth();\n }\n /**\n * @hidden\n */\n isCurrentYear(value) {\n return this.viewDate.getFullYear() === value.getFullYear();\n }\n /**\n * @hidden\n */\n isSelected(date) {\n let selectedDates;\n if (this.isDateDisabled(date.date) || !this.value ||\n (Array.isArray(this.value) && this.value.length === 0)) {\n return false;\n }\n if (this.selection === CalendarSelection.SINGLE) {\n selectedDates = this.value;\n return this.getDateOnly(selectedDates).getTime() === date.date.getTime();\n }\n selectedDates = this.value;\n if (this.selection === CalendarSelection.RANGE && selectedDates.length === 1) {\n return this.getDateOnly(selectedDates[0]).getTime() === date.date.getTime();\n }\n if (this.selection === CalendarSelection.MULTI) {\n const start = this.getDateOnly(selectedDates[0]);\n const end = this.getDateOnly(selectedDates[selectedDates.length - 1]);\n if (this.isWithinRange(date.date, false, start, end)) {\n const currentDate = selectedDates.find(element => element.getTime() === date.date.getTime());\n return !!currentDate;\n }\n else {\n return false;\n }\n }\n else {\n return this.isWithinRange(date.date, true);\n }\n }\n /**\n * @hidden\n */\n isLastInRange(date) {\n if (this.isSingleSelection || !this.value) {\n return false;\n }\n const dates = this.value;\n const lastDate = dates[dates.length - 1];\n return isEqual(lastDate, date.date);\n }\n /**\n * @hidden\n */\n isFirstInRange(date) {\n if (this.isSingleSelection || !this.value) {\n return false;\n }\n return isEqual(this.value[0], date.date);\n }\n /**\n * @hidden\n */\n isWithinRange(date, checkForRange, min, max) {\n if (checkForRange && !(Array.isArray(this.value) && this.value.length > 1)) {\n return false;\n }\n min = min ? min : this.value[0];\n max = max ? max : this.value[this.value.length - 1];\n return isDateInRanges(date, [\n {\n type: DateRangeType.Between,\n dateRange: [min, max]\n }\n ]);\n }\n /**\n * @hidden\n */\n focusActiveDate() {\n let date = this.dates.find((d) => d.selected);\n if (!date) {\n date = this.dates.find((d) => d.isToday);\n }\n if (date.isFocusable) {\n date.nativeElement.focus();\n }\n }\n /**\n * @hidden\n */\n selectDay(event) {\n this.selectDateFromClient(event.date);\n this.dateSelection.emit(event);\n this.selected.emit(this.selectedDates);\n }\n /**\n * @hidden\n */\n getFirstMonthView() {\n let monthView = this;\n while (monthView.prevMonthView) {\n monthView = monthView.prevMonthView;\n }\n return monthView;\n }\n /**\n * @hidden\n */\n disableOutOfRangeDates() {\n const dateRange = [];\n this.dates.toArray().forEach((date) => {\n if (!date.isCurrentMonth) {\n dateRange.push(date.date.date);\n }\n });\n this.outOfRangeDates = [{\n type: DateRangeType.Specific,\n dateRange\n }];\n }\n /**\n * @hidden\n */\n getLastMonthView() {\n let monthView = this;\n while (monthView.nextMonthView) {\n monthView = monthView.nextMonthView;\n }\n return monthView;\n }\n /**\n * @hidden\n */\n get isSingleSelection() {\n return this.selection !== CalendarSelection.RANGE;\n }\n}\nIgxDaysViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDaysViewComponent, deps: [{ token: IgxDaysViewNavigationService }, { token: PlatformUtil }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });\nIgxDaysViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDaysViewComponent, selector: \"igx-days-view\", inputs: { id: \"id\", changeDaysView: \"changeDaysView\", showWeekNumbers: \"showWeekNumbers\", activeDate: \"activeDate\" }, outputs: { dateSelection: \"dateSelection\", viewChanging: \"viewChanging\", activeDateChange: \"activeDateChange\", monthsViewBlur: \"monthsViewBlur\" }, host: { listeners: { \"focusout\": \"resetActiveMonth()\", \"keydown.pagedown\": \"pointerDown()\", \"keydown.pageup\": \"pointerDown()\", \"keydown.shift.pagedown\": \"pointerDown()\", \"keydown.shift.pageup\": \"pointerDown()\", \"pointerdown\": \"pointerDown()\", \"keydown.arrowleft\": \"onKeydownArrow($event)\", \"keydown.arrowright\": \"onKeydownArrow($event)\", \"keydown.arrowup\": \"onKeydownArrow($event)\", \"keydown.arrowdown\": \"onKeydownArrow($event)\", \"keydown.home\": \"onKeydownHome($event)\", \"keydown.end\": \"onKeydownEnd($event)\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-calendar\": \"this.styleClass\" } }, providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxDaysViewComponent\n },\n { provide: IgxDaysViewNavigationService, useClass: IgxDaysViewNavigationService }\n ], viewQueries: [{ propertyName: \"dates\", predicate: IgxDayItemComponent, descendants: true, read: IgxDayItemComponent }], usesInheritance: true, ngImport: i0, template: \"
    \\n
    \\n Wk\\n
    \\n \\n {{ dayName | titlecase }}\\n \\n
    \\n\\n
    \\n\\n
    \\n\\n \\n {{getWeekNumber(week[0].date)}}\\n \\n\\n
    \\n\\n \\n \\n {{ formattedDate(day.date) }}\\n \\n
    \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxDayItemComponent, selector: \"igx-day-item\", inputs: [\"date\", \"selection\", \"selected\", \"disabledDates\", \"outOfRangeDates\", \"specialDates\", \"hideOutsideDays\", \"isLastInRange\", \"isFirstInRange\", \"isWithinRange\"], outputs: [\"dateSelection\"] }, { kind: \"pipe\", type: i1$1.TitleCasePipe, name: \"titlecase\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDaysViewComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxDaysViewComponent\n },\n { provide: IgxDaysViewNavigationService, useClass: IgxDaysViewNavigationService }\n ], selector: 'igx-days-view', template: \"
    \\n
    \\n Wk\\n
    \\n \\n {{ dayName | titlecase }}\\n \\n
    \\n\\n
    \\n\\n
    \\n\\n \\n {{getWeekNumber(week[0].date)}}\\n \\n\\n
    \\n\\n \\n \\n {{ formattedDate(day.date) }}\\n \\n
    \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: IgxDaysViewNavigationService }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], changeDaysView: [{\n type: Input\n }], showWeekNumbers: [{\n type: Input\n }], activeDate: [{\n type: Input\n }], dateSelection: [{\n type: Output\n }], viewChanging: [{\n type: Output\n }], activeDateChange: [{\n type: Output\n }], monthsViewBlur: [{\n type: Output\n }], dates: [{\n type: ViewChildren,\n args: [IgxDayItemComponent, { read: IgxDayItemComponent }]\n }], styleClass: [{\n type: HostBinding,\n args: ['class.igx-calendar']\n }], resetActiveMonth: [{\n type: HostListener,\n args: ['focusout']\n }], pointerDown: [{\n type: HostListener,\n args: ['keydown.pagedown']\n }, {\n type: HostListener,\n args: ['keydown.pageup']\n }, {\n type: HostListener,\n args: ['keydown.shift.pagedown']\n }, {\n type: HostListener,\n args: ['keydown.shift.pageup']\n }, {\n type: HostListener,\n args: ['pointerdown']\n }], onKeydownArrow: [{\n type: HostListener,\n args: ['keydown.arrowleft', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.arrowright', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.arrowup', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.arrowdown', ['$event']]\n }], onKeydownHome: [{\n type: HostListener,\n args: ['keydown.home', ['$event']]\n }], onKeydownEnd: [{\n type: HostListener,\n args: ['keydown.end', ['$event']]\n }] } });\n\nclass IgxMonthViewSlotsCalendar {\n transform(monthViews) {\n return new Array(monthViews);\n }\n}\nIgxMonthViewSlotsCalendar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthViewSlotsCalendar, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxMonthViewSlotsCalendar.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthViewSlotsCalendar, name: \"IgxMonthViewSlots\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthViewSlotsCalendar, decorators: [{\n type: Pipe,\n args: [{\n name: 'IgxMonthViewSlots'\n }]\n }] });\nclass IgxGetViewDateCalendar {\n constructor() {\n this.calendar = new Calendar();\n }\n transform(index, viewDate, wholeDate = true) {\n const date = this.calendar.timedelta(viewDate, 'month', index);\n return wholeDate ? date : date.getMonth();\n }\n}\nIgxGetViewDateCalendar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGetViewDateCalendar, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGetViewDateCalendar.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGetViewDateCalendar, name: \"IgxGetViewDate\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGetViewDateCalendar, decorators: [{\n type: Pipe,\n args: [{\n name: 'IgxGetViewDate'\n }]\n }], ctorParameters: function () { return []; } });\n\nlet NEXT_ID$i = 0;\n/**\n * Calendar provides a way to display date information.\n *\n * @igxModule IgxCalendarModule\n *\n * @igxTheme igx-calendar-theme, igx-icon-theme\n *\n * @igxKeywords calendar, datepicker, schedule, date\n *\n * @igxGroup Scheduling\n *\n * @remarks\n * The Ignite UI Calendar provides an easy way to display a calendar and allow users to select dates using single, multiple\n * or range selection.\n *\n * @example:\n * ```html\n * \n * ```\n */\nclass IgxCalendarComponent extends IgxMonthPickerBaseDirective {\n constructor() {\n super(...arguments);\n /**\n * Sets/gets the `id` of the calendar.\n *\n * @remarks\n * If not set, the `id` will have value `\"igx-calendar-0\"`.\n *\n * @example\n * ```html\n * \n * ```\n * @memberof IgxCalendarComponent\n */\n this.id = `igx-calendar-${NEXT_ID$i++}`;\n /**\n * Sets/gets whether the calendar has header.\n * Default value is `true`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.hasHeader = true;\n /**\n * Sets/gets whether the calendar header will be in vertical position.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.vertical = false;\n /**\n * Show/hide week numbers\n *\n * @example\n * ```html\n * \n * ``\n */\n this.showWeekNumbers = false;\n /**\n * Apply the different states for the transitions of animateChange\n *\n * @hidden\n * @internal\n */\n this.animationAction = '';\n /**\n * The default css class applied to the component.\n *\n * @hidden\n * @internal\n */\n this.styleClass = true;\n /**\n * @hidden\n * @internal\n */\n this.activeDate = new Date().toLocaleDateString();\n /**\n * Denote if the calendar view was changed with the keyboard\n *\n * @hidden\n * @internal\n */\n this.isKeydownTrigger = false;\n /**\n * @hidden\n * @internal\n */\n this._monthsViewNumber = 1;\n /**\n * Continious navigation through the previous months\n *\n * @hidden\n * @internal\n */\n this.startPrevMonthScroll = (isKeydownTrigger = false) => {\n this.startMonthScroll$.next();\n this.monthScrollDirection = ScrollMonth.PREV;\n this.animationAction = ScrollMonth.PREV;\n this.previousMonth(isKeydownTrigger);\n };\n /**\n * Continious navigation through the next months\n *\n * @hidden\n * @internal\n */\n this.startNextMonthScroll = (isKeydownTrigger = false) => {\n this.startMonthScroll$.next();\n this.monthScrollDirection = ScrollMonth.NEXT;\n this.animationAction = ScrollMonth.NEXT;\n this.nextMonth(isKeydownTrigger);\n };\n /**\n * Stop continuous navigation\n *\n * @hidden\n * @internal\n */\n this.stopMonthScroll = (event) => {\n event.stopPropagation();\n // generally the scrolling is built on the calendar component\n // and all start/stop scrolling methods are called on the calendar\n // if we change below lines to call stopMonthScroll$ on the calendar instead of on the views,\n // strange bug is introduced --> after changing number of months, continuous scrolling on mouse click does not happen\n this.daysView.stopMonthScroll$.next(true);\n this.daysView.stopMonthScroll$.complete();\n if (this.monthScrollDirection === ScrollMonth.PREV) {\n this.prevMonthBtn.nativeElement.focus();\n }\n else if (this.monthScrollDirection === ScrollMonth.NEXT) {\n this.nextMonthBtn.nativeElement.focus();\n }\n if (this.platform.isActivationKey(event)) {\n this.resetActiveDate();\n }\n this.monthScrollDirection = ScrollMonth.NONE;\n };\n }\n /**\n * Sets/gets the number of month views displayed.\n * Default value is `1`.\n *\n * @example\n * ```html\n * \n * ```\n */\n get monthsViewNumber() {\n return this._monthsViewNumber;\n }\n set monthsViewNumber(val) {\n if (val < 1) {\n return;\n }\n this._monthsViewNumber = val;\n }\n /**\n * The default css class applied to the component.\n *\n * @hidden\n * @internal\n */\n get styleVerticalClass() {\n return this.vertical;\n }\n /**\n * Denote if the year view is active.\n *\n * @hidden\n * @internal\n */\n get isYearView() {\n return this.activeView === CalendarView.YEAR || this.activeView === IgxCalendarView.Year;\n }\n /**\n * Gets the header template.\n *\n * @example\n * ```typescript\n * let headerTemplate = this.calendar.headerTeamplate;\n * ```\n * @memberof IgxCalendarComponent\n */\n get headerTemplate() {\n if (this.headerTemplateDirective) {\n return this.headerTemplateDirective.template;\n }\n return null;\n }\n /**\n * Sets the header template.\n *\n * @example\n * ```html\n * \n * ```\n * @memberof IgxCalendarComponent\n */\n set headerTemplate(directive) {\n this.headerTemplateDirective = directive;\n }\n /**\n * Gets the subheader template.\n *\n * @example\n * ```typescript\n * let subheaderTemplate = this.calendar.subheaderTemplate;\n * ```\n */\n get subheaderTemplate() {\n if (this.subheaderTemplateDirective) {\n return this.subheaderTemplateDirective.template;\n }\n return null;\n }\n /**\n * Sets the subheader template.\n *\n * @example\n * ```html\n * \n * ```\n * @memberof IgxCalendarComponent\n */\n set subheaderTemplate(directive) {\n this.subheaderTemplateDirective = directive;\n }\n /**\n * Gets the context for the template marked with the `igxCalendarHeader` directive.\n *\n * @example\n * ```typescript\n * let headerContext = this.calendar.headerContext;\n * ```\n */\n get headerContext() {\n const date = this.headerDate;\n return this.generateContext(date);\n }\n /**\n * Gets the context for the template marked with either `igxCalendarSubHeaderMonth`\n * or `igxCalendarSubHeaderYear` directive.\n *\n * @example\n * ```typescript\n * let context = this.calendar.context;\n * ```\n */\n get context() {\n const date = this.viewDate;\n return this.generateContext(date);\n }\n /**\n * Date displayed in header\n *\n * @hidden\n * @internal\n */\n get headerDate() {\n return this.selectedDates ? this.selectedDates : new Date();\n }\n /**\n * Keyboard navigation of the calendar\n *\n * @hidden\n * @internal\n */\n onKeydownPageDown(event) {\n event.preventDefault();\n if (!this.isDefaultView) {\n return;\n }\n const isPageDown = event.key === 'PageDown';\n const step = isPageDown ? 1 : -1;\n let monthView = this.daysView;\n let activeDate;\n while (!activeDate && monthView) {\n activeDate = monthView.dates.find((date) => date.nativeElement === document.activeElement);\n monthView = monthView.nextMonthView;\n }\n if (activeDate) {\n this.nextDate = new Date(activeDate.date.date);\n let year = this.nextDate.getFullYear();\n let month = this.nextDate.getMonth() + step;\n if (isPageDown) {\n if (month > 11) {\n month = 0;\n year += step;\n }\n }\n else {\n if (month < 0) {\n month = 11;\n year += step;\n }\n }\n const range = monthRange(this.nextDate.getFullYear(), month);\n let day = this.nextDate.getDate();\n if (day > range[1]) {\n day = range[1];\n }\n this.nextDate.setDate(day);\n this.nextDate.setMonth(month);\n this.nextDate.setFullYear(year);\n this.callback = (next) => {\n monthView = this.daysView;\n let dayItem;\n while ((!dayItem && monthView) || (dayItem && !dayItem.isCurrentMonth)) {\n dayItem = monthView.dates.find((d) => d.date.date.getTime() === next.getTime());\n monthView = monthView.nextMonthView;\n }\n if (dayItem && dayItem.isFocusable) {\n dayItem.nativeElement.focus();\n }\n };\n }\n if (isPageDown) {\n if (event.repeat) {\n requestAnimationFrame(() => this.nextMonth(true));\n }\n else {\n this.nextMonth(true);\n }\n }\n else {\n if (event.repeat) {\n requestAnimationFrame(() => this.previousMonth(true));\n }\n else {\n this.previousMonth(true);\n }\n }\n }\n /**\n * Keyboard navigation of the calendar\n *\n * @hidden\n * @internal\n */\n onKeydownShiftPageUp(event) {\n event.preventDefault();\n if (!this.isDefaultView) {\n return;\n }\n const isPageDown = event.key === 'PageDown';\n const step = isPageDown ? 1 : -1;\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.timedelta(this.viewDate, 'year', step);\n this.animationAction = isPageDown ? ScrollMonth.NEXT : ScrollMonth.PREV;\n this.isKeydownTrigger = true;\n let monthView = this.daysView;\n let activeDate;\n while (!activeDate && monthView) {\n activeDate = monthView.dates.find((date) => date.nativeElement === document.activeElement);\n monthView = monthView.nextMonthView;\n }\n if (activeDate) {\n this.nextDate = new Date(activeDate.date.date);\n const year = this.nextDate.getFullYear() + step;\n const range = monthRange(year, this.nextDate.getMonth());\n let day = this.nextDate.getDate();\n if (day > range[1]) {\n day = range[1];\n }\n this.nextDate.setDate(day);\n this.nextDate.setFullYear(year);\n this.callback = (next) => {\n monthView = this.daysView;\n let dayItem;\n while ((!dayItem && monthView) || (dayItem && !dayItem.isCurrentMonth)) {\n dayItem = monthView.dates.find((d) => d.date.date.getTime() === next.getTime());\n monthView = monthView.nextMonthView;\n }\n if (dayItem && dayItem.isFocusable) {\n dayItem.nativeElement.focus();\n }\n };\n }\n }\n /**\n * Keyboard navigation of the calendar\n *\n * @hidden\n * @internal\n */\n onKeydownHome(event) {\n if (this.daysView) {\n this.daysView.onKeydownHome(event);\n }\n }\n /**\n * Keyboard navigation of the calendar\n *\n * @hidden\n * @internal\n */\n onKeydownEnd(event) {\n if (this.daysView) {\n this.daysView.onKeydownEnd(event);\n }\n }\n /**\n * Stop continuous navigation on mouseup event\n *\n * @hidden\n * @internal\n */\n onMouseUp(event) {\n if (this.monthScrollDirection !== ScrollMonth.NONE) {\n this.stopMonthScroll(event);\n }\n }\n ngAfterViewInit() {\n this.setSiblingMonths(this.monthViews);\n this._monthViewsChanges$ = this.monthViews.changes.subscribe(c => {\n this.setSiblingMonths(c);\n });\n this.startMonthScroll$.pipe(takeUntil(this.stopMonthScroll$), switchMap(() => this.scrollMonth$.pipe(skipLast(1), debounce(() => interval(300)), takeUntil(this.stopMonthScroll$)))).subscribe(() => {\n switch (this.monthScrollDirection) {\n case ScrollMonth.PREV:\n this.previousMonth();\n break;\n case ScrollMonth.NEXT:\n this.nextMonth();\n break;\n case ScrollMonth.NONE:\n default:\n break;\n }\n });\n }\n /**\n * Returns the locale representation of the month in the month view if enabled,\n * otherwise returns the default `Date.getMonth()` value.\n *\n * @hidden\n * @internal\n */\n formattedMonth(value) {\n if (this.formatViews.month) {\n return this.formatterMonth.format(value);\n }\n return `${value.getMonth()}`;\n }\n /**\n * Change to previous month\n *\n * @hidden\n * @internal\n */\n previousMonth(isKeydownTrigger = false) {\n if (isKeydownTrigger && this.animationAction === ScrollMonth.NEXT) {\n return;\n }\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.getPrevMonth(this.viewDate);\n this.animationAction = ScrollMonth.PREV;\n this.isKeydownTrigger = isKeydownTrigger;\n }\n suppressBlur() {\n this.monthViews?.forEach(d => d.shouldResetDate = false);\n if (this.daysView) {\n this.daysView.shouldResetDate = false;\n }\n }\n /**\n * Change to next month\n *\n * @hidden\n * @internal\n */\n nextMonth(isKeydownTrigger = false) {\n if (isKeydownTrigger && this.animationAction === 'prev') {\n return;\n }\n this.isKeydownTrigger = isKeydownTrigger;\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.getNextMonth(this.viewDate);\n this.animationAction = ScrollMonth.NEXT;\n }\n /**\n * @hidden\n * @internal\n */\n onActiveViewDecade(args, activeViewIdx) {\n super.activeViewDecade(activeViewIdx);\n requestAnimationFrame(() => {\n if (this.dacadeView) {\n this.dacadeView.date = args;\n this.dacadeView.calendarDir.find(date => date.isCurrentYear).nativeElement.focus();\n }\n });\n }\n /**\n * @hidden\n * @internal\n */\n onActiveViewDecadeKB(event, args, activeViewIdx) {\n super.activeViewDecadeKB(event, activeViewIdx);\n requestAnimationFrame(() => {\n if (this.dacadeView) {\n this.dacadeView.date = args;\n this.dacadeView.calendarDir.find(date => date.isCurrentYear).nativeElement.focus();\n }\n });\n }\n /**\n * @hidden\n * @internal\n */\n getFormattedDate() {\n const date = this.headerDate;\n return {\n monthday: this.formatterMonthday.format(date),\n weekday: this.formatterWeekday.format(date),\n };\n }\n /**\n * Handles invoked on date selection\n *\n * @hidden\n * @internal\n */\n childClicked(instance) {\n if (instance.isPrevMonth) {\n this.previousMonth();\n }\n if (instance.isNextMonth) {\n this.nextMonth();\n }\n // selectDateFromClient is called both here and in days-view.component\n // when multiple months are in view, 'shiftKey' and 'lastSelectedDate'\n // should be set before and after selectDateFromClient\n // in order all views to have the same values for these properties\n this.monthViews.forEach(m => {\n m.shiftKey = this.shiftKey;\n m.lastSelectedDate = this.lastSelectedDate;\n });\n this.selectDateFromClient(instance.date);\n if (this.selection === 'multi' && this._deselectDate) {\n this.deselectDateInMonthViews(instance.date);\n }\n this.selected.emit(this.selectedDates);\n this.monthViews.forEach(m => {\n m.shiftKey = this.shiftKey;\n m.lastSelectedDate = this.lastSelectedDate;\n });\n }\n /**\n * @hidden\n * @internal\n */\n viewChanging(args) {\n this.animationAction = args.monthAction;\n this.isKeydownTrigger = true;\n this.nextDate = args.nextDate;\n this.callback = (next) => {\n const day = this.daysView.dates.find((item) => item.date.date.getTime() === next.getTime());\n if (day) {\n this.daysView.daysNavService.focusNextDate(day.nativeElement, args.key, true);\n }\n };\n this.previousViewDate = this.viewDate;\n this.viewDate = this.nextDate;\n }\n /**\n * @hidden\n * @intenal\n */\n changeMonth(event) {\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.getFirstViewDate(event, 'month', this.activeViewIdx);\n this.activeView = IgxCalendarView.Month;\n requestAnimationFrame(() => {\n const elem = this.monthsBtns.find((e, idx) => idx === this.activeViewIdx);\n if (elem) {\n elem.nativeElement.focus();\n }\n });\n }\n /**\n * @hidden\n * @internal\n */\n onActiveViewYear(args, activeViewIdx) {\n this.activeView = IgxCalendarView.Year;\n this.activeViewIdx = activeViewIdx;\n requestAnimationFrame(() => {\n this.monthsView.date = args;\n this.focusMonth();\n });\n }\n /**\n * @hidden\n * @internal\n */\n onActiveViewYearKB(args, event, activeViewIdx) {\n if (this.platform.isActivationKey(event)) {\n event.preventDefault();\n this.onActiveViewYear(args, activeViewIdx);\n }\n }\n /**\n * Deselects date(s) (based on the selection type).\n *\n * @example\n * ```typescript\n * this.calendar.deselectDate(new Date(`2018-06-12`));\n * ````\n */\n deselectDate(value) {\n super.deselectDate(value);\n this.monthViews.forEach((view) => {\n view.selectedDates = this.selectedDates;\n view.rangeStarted = false;\n });\n this._onChangeCallback(this.selectedDates);\n }\n /**\n * @hidden\n * @internal\n */\n getViewDate(i) {\n const date = this.calendarModel.timedelta(this.viewDate, 'month', i);\n return date;\n }\n /**\n * Getter for the context object inside the calendar templates.\n *\n * @hidden\n * @internal\n */\n getContext(i) {\n const date = this.getViewDate(i);\n return this.generateContext(date, i);\n }\n /**\n * @hidden\n * @internal\n */\n animationDone(event) {\n if ((event.fromState === ScrollMonth.NONE && (event.toState === ScrollMonth.PREV || event.toState === ScrollMonth.NEXT)) ||\n (event.fromState === 'void' && event.toState === ScrollMonth.NONE)) {\n this.viewDateChanged.emit({ previousValue: this.previousViewDate, currentValue: this.viewDate });\n }\n if (!this.isKeydownTrigger) {\n this.resetActiveDate();\n }\n if (this.monthScrollDirection !== ScrollMonth.NONE) {\n this.scrollMonth$.next();\n }\n if (!this.isDefaultView) {\n return;\n }\n let monthView = this.daysView;\n let date = monthView.dates.find((d) => d.selected);\n while (!date && monthView.nextMonthView) {\n monthView = monthView.nextMonthView;\n date = monthView.dates.find((d) => d.selected);\n }\n if (date && date.isFocusable && !this.isKeydownTrigger) {\n setTimeout(() => {\n date.nativeElement.focus();\n }, parseInt(slideInRight.options.params.duration, 10));\n }\n else if (this.callback && (event.toState === ScrollMonth.NEXT || event.toState === ScrollMonth.PREV)) {\n this.callback(this.nextDate);\n }\n this.animationAction = ScrollMonth.NONE;\n }\n /**\n * @hidden\n * @internal\n */\n viewRendered(event) {\n if (event.fromState !== 'void') {\n this.activeViewChanged.emit(this.activeView);\n if (this.isDefaultView) {\n this.resetActiveDate();\n }\n }\n }\n /**\n * @hidden\n * @internal\n */\n resetActiveDate() {\n if (!this.monthViews) {\n return;\n }\n let dates = [];\n this.monthViews.map(mv => mv.dates).forEach(days => {\n dates = dates.concat(days.toArray());\n });\n const date = dates.find(day => day.selected && day.isCurrentMonth) || dates.find(day => day.isToday && day.isCurrentMonth)\n || dates.find(d => d.isFocusable);\n if (date) {\n this.activeDate = date.date.date.toLocaleDateString();\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngOnDestroy() {\n if (this._monthViewsChanges$) {\n this._monthViewsChanges$.unsubscribe();\n }\n }\n /**\n * @hidden\n * @internal\n */\n getPrevMonth(date) {\n return this.calendarModel.getPrevMonth(date);\n }\n /**\n * @hidden\n * @internal\n */\n getNextMonth(date, viewIndex) {\n return this.calendarModel.getDateByView(date, 'Month', viewIndex);\n }\n /**\n * Helper method building and returning the context object inside\n * the calendar templates.\n *\n * @hidden\n * @internal\n */\n generateContext(value, i) {\n const formatObject = {\n index: i,\n monthView: () => this.onActiveViewYear(value, i),\n yearView: () => this.onActiveViewDecade(value, i),\n ...this.calendarModel.formatToParts(value, this.locale, this.formatOptions, ['era', 'year', 'month', 'day', 'weekday'])\n };\n return { $implicit: formatObject };\n }\n /**\n * Helper method that sets references for prev/next months for each month in the view\n *\n * @hidden\n * @internal\n */\n setSiblingMonths(monthViews) {\n monthViews.forEach((item, index) => {\n const prevMonthView = this.getMonthView(index - 1);\n const nextMonthView = this.getMonthView(index + 1);\n item.nextMonthView = nextMonthView;\n item.prevMonthView = prevMonthView;\n });\n }\n /**\n * Helper method returning previous/next day views\n *\n * @hidden\n * @internal\n */\n getMonthView(index) {\n if (index === -1 || index === this.monthViews.length) {\n return null;\n }\n else {\n return this.monthViews.toArray()[index];\n }\n }\n /**\n * Helper method that does deselection for all month views when selection is \"multi\"\n * If not called, selection in other month views stays\n *\n * @hidden\n * @internal\n */\n deselectDateInMonthViews(value) {\n this.monthViews.forEach(m => {\n m.deselectMultipleInMonth(value);\n });\n }\n focusMonth() {\n const month = this.monthsView.monthsRef.find((e) => e.index === this.monthsView.date.getMonth());\n if (month) {\n month.nativeElement.focus();\n }\n }\n}\nIgxCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarComponent, selector: \"igx-calendar\", inputs: { id: \"id\", hasHeader: \"hasHeader\", vertical: \"vertical\", monthsViewNumber: \"monthsViewNumber\", showWeekNumbers: \"showWeekNumbers\", animationAction: \"animationAction\" }, host: { listeners: { \"keydown.pagedown\": \"onKeydownPageDown($event)\", \"keydown.pageup\": \"onKeydownPageDown($event)\", \"keydown.shift.pageup\": \"onKeydownShiftPageUp($event)\", \"keydown.shift.pagedown\": \"onKeydownShiftPageUp($event)\", \"keydown.home\": \"onKeydownHome($event)\", \"keydown.end\": \"onKeydownEnd($event)\", \"document:mouseup\": \"onMouseUp($event)\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-calendar--vertical\": \"this.styleVerticalClass\", \"class.igx-calendar\": \"this.styleClass\" } }, providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxCalendarComponent\n }\n ], queries: [{ propertyName: \"headerTemplateDirective\", first: true, predicate: i0.forwardRef(function () { return IgxCalendarHeaderTemplateDirective; }), descendants: true, read: IgxCalendarHeaderTemplateDirective, static: true }, { propertyName: \"subheaderTemplateDirective\", first: true, predicate: i0.forwardRef(function () { return IgxCalendarSubheaderTemplateDirective; }), descendants: true, read: IgxCalendarSubheaderTemplateDirective, static: true }], viewQueries: [{ propertyName: \"monthsView\", first: true, predicate: [\"months\"], descendants: true, read: IgxMonthsViewComponent }, { propertyName: \"dacadeView\", first: true, predicate: [\"decade\"], descendants: true, read: IgxYearsViewComponent }, { propertyName: \"daysView\", first: true, predicate: [\"days\"], descendants: true, read: IgxDaysViewComponent }, { propertyName: \"prevMonthBtn\", first: true, predicate: [\"prevMonthBtn\"], descendants: true }, { propertyName: \"nextMonthBtn\", first: true, predicate: [\"nextMonthBtn\"], descendants: true }, { propertyName: \"monthsBtns\", predicate: [\"monthsBtn\"], descendants: true }, { propertyName: \"monthViews\", predicate: [\"days\"], descendants: true, read: IgxDaysViewComponent }], usesInheritance: true, ngImport: i0, template: \"\\n {{ getFormattedDate().weekday }}, \\n {{ getFormattedDate().monthday }}\\n\\n\\n\\n \\n {{ monthsViewNumber > 1 ? (resourceStrings.igx_calendar_first_picker_of.replace('{0}', monthsViewNumber.toString()) + ' ' + (getViewDate(obj.index) | date: 'LLLL yyyy')) : resourceStrings.igx_calendar_selected_month_is + (getViewDate(obj.index) | date: 'LLLL yyyy')}}\\n \\n \\n {{ formattedMonth(getViewDate(obj.index)) }}\\n \\n\\n \\n {{ formattedYear(getViewDate(obj.index)) }}\\n \\n\\n\\n\\n\\n
    \\n {{ formattedYear(headerDate) }}\\n
    \\n\\n

    \\n \\n \\n

    \\n\\n\\n
    \\n
    \\n \\n \\n {{ monthsViewNumber && monthsViewNumber > 1 ? resourceStrings.igx_calendar_multi_selection.replace('{0}', monthsViewNumber.toString()) : resourceStrings.igx_calendar_singular_multi_selection}}\\n \\n \\n {{ monthsViewNumber && monthsViewNumber > 1 ? resourceStrings.igx_calendar_range_selection.replace('{0}', monthsViewNumber.toString()) : resourceStrings.igx_calendar_singular_range_selection}}\\n \\n \\n {{ monthsViewNumber && monthsViewNumber > 1 ? resourceStrings.igx_calendar_single_selection.replace('{0}', monthsViewNumber.toString()) : resourceStrings.igx_calendar_singular_single_selection}}\\n \\n \\n \\n keyboard_arrow_left\\n
    \\n
    \\n \\n \\n
    \\n \\n keyboard_arrow_right\\n \\n \\n\\n
    \\n \\n \\n
    \\n\\n\\n\\n\\n\\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxDaysViewComponent, selector: \"igx-days-view\", inputs: [\"id\", \"changeDaysView\", \"showWeekNumbers\", \"activeDate\"], outputs: [\"dateSelection\", \"viewChanging\", \"activeDateChange\", \"monthsViewBlur\"] }, { kind: \"directive\", type: IgxCalendarScrollMonthDirective, selector: \"[igxCalendarScrollMonth]\", inputs: [\"startScroll\", \"stopScroll\"] }, { kind: \"component\", type: IgxMonthsViewComponent, selector: \"igx-months-view\", inputs: [\"id\", \"date\", \"monthFormat\", \"locale\", \"formatView\"], outputs: [\"selected\"] }, { kind: \"component\", type: IgxYearsViewComponent, selector: \"igx-years-view\", inputs: [\"formatView\", \"date\", \"yearFormat\", \"locale\"], outputs: [\"selected\"] }, { kind: \"pipe\", type: i1$1.DatePipe, name: \"date\" }, { kind: \"pipe\", type: IgxMonthViewSlotsCalendar, name: \"IgxMonthViewSlots\" }, { kind: \"pipe\", type: IgxGetViewDateCalendar, name: \"IgxGetViewDate\" }], animations: [\n trigger('animateView', [\n transition('void => 0', useAnimation(fadeIn)),\n transition('void => *', useAnimation(scaleInCenter, {\n params: {\n duration: '.2s',\n fromScale: .9\n }\n }))\n ]),\n trigger('animateChange', [\n transition('* => prev', useAnimation(slideInLeft, {\n params: {\n fromPosition: 'translateX(-30%)'\n }\n })),\n transition('* => next', useAnimation(slideInRight, {\n params: {\n fromPosition: 'translateX(30%)'\n }\n }))\n ])\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxCalendarComponent\n }\n ], animations: [\n trigger('animateView', [\n transition('void => 0', useAnimation(fadeIn)),\n transition('void => *', useAnimation(scaleInCenter, {\n params: {\n duration: '.2s',\n fromScale: .9\n }\n }))\n ]),\n trigger('animateChange', [\n transition('* => prev', useAnimation(slideInLeft, {\n params: {\n fromPosition: 'translateX(-30%)'\n }\n })),\n transition('* => next', useAnimation(slideInRight, {\n params: {\n fromPosition: 'translateX(30%)'\n }\n }))\n ])\n ], selector: 'igx-calendar', template: \"\\n {{ getFormattedDate().weekday }}, \\n {{ getFormattedDate().monthday }}\\n\\n\\n\\n \\n {{ monthsViewNumber > 1 ? (resourceStrings.igx_calendar_first_picker_of.replace('{0}', monthsViewNumber.toString()) + ' ' + (getViewDate(obj.index) | date: 'LLLL yyyy')) : resourceStrings.igx_calendar_selected_month_is + (getViewDate(obj.index) | date: 'LLLL yyyy')}}\\n \\n \\n {{ formattedMonth(getViewDate(obj.index)) }}\\n \\n\\n \\n {{ formattedYear(getViewDate(obj.index)) }}\\n \\n\\n\\n\\n\\n
    \\n {{ formattedYear(headerDate) }}\\n
    \\n\\n

    \\n \\n \\n

    \\n\\n\\n
    \\n
    \\n \\n \\n {{ monthsViewNumber && monthsViewNumber > 1 ? resourceStrings.igx_calendar_multi_selection.replace('{0}', monthsViewNumber.toString()) : resourceStrings.igx_calendar_singular_multi_selection}}\\n \\n \\n {{ monthsViewNumber && monthsViewNumber > 1 ? resourceStrings.igx_calendar_range_selection.replace('{0}', monthsViewNumber.toString()) : resourceStrings.igx_calendar_singular_range_selection}}\\n \\n \\n {{ monthsViewNumber && monthsViewNumber > 1 ? resourceStrings.igx_calendar_single_selection.replace('{0}', monthsViewNumber.toString()) : resourceStrings.igx_calendar_singular_single_selection}}\\n \\n \\n \\n keyboard_arrow_left\\n
    \\n
    \\n \\n \\n
    \\n \\n keyboard_arrow_right\\n \\n \\n\\n
    \\n \\n \\n
    \\n\\n\\n\\n\\n\\n\\n\\n\" }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], hasHeader: [{\n type: Input\n }], vertical: [{\n type: Input\n }], monthsViewNumber: [{\n type: Input\n }], showWeekNumbers: [{\n type: Input\n }], animationAction: [{\n type: Input\n }], styleVerticalClass: [{\n type: HostBinding,\n args: ['class.igx-calendar--vertical']\n }], styleClass: [{\n type: HostBinding,\n args: ['class.igx-calendar']\n }], monthsView: [{\n type: ViewChild,\n args: ['months', { read: IgxMonthsViewComponent }]\n }], monthsBtns: [{\n type: ViewChildren,\n args: ['monthsBtn']\n }], dacadeView: [{\n type: ViewChild,\n args: ['decade', { read: IgxYearsViewComponent }]\n }], daysView: [{\n type: ViewChild,\n args: ['days', { read: IgxDaysViewComponent }]\n }], monthViews: [{\n type: ViewChildren,\n args: ['days', { read: IgxDaysViewComponent }]\n }], prevMonthBtn: [{\n type: ViewChild,\n args: ['prevMonthBtn']\n }], nextMonthBtn: [{\n type: ViewChild,\n args: ['nextMonthBtn']\n }], headerTemplateDirective: [{\n type: ContentChild,\n args: [forwardRef(() => IgxCalendarHeaderTemplateDirective), { read: IgxCalendarHeaderTemplateDirective, static: true }]\n }], subheaderTemplateDirective: [{\n type: ContentChild,\n args: [forwardRef(() => IgxCalendarSubheaderTemplateDirective), { read: IgxCalendarSubheaderTemplateDirective, static: true }]\n }], onKeydownPageDown: [{\n type: HostListener,\n args: ['keydown.pagedown', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.pageup', ['$event']]\n }], onKeydownShiftPageUp: [{\n type: HostListener,\n args: ['keydown.shift.pageup', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.shift.pagedown', ['$event']]\n }], onKeydownHome: [{\n type: HostListener,\n args: ['keydown.home', ['$event']]\n }], onKeydownEnd: [{\n type: HostListener,\n args: ['keydown.end', ['$event']]\n }], onMouseUp: [{\n type: HostListener,\n args: ['document:mouseup', ['$event']]\n }] } });\n\nlet NEXT_ID$h = 0;\nclass IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {\n constructor() {\n super(...arguments);\n /**\n * Sets/gets the `id` of the month picker.\n * If not set, the `id` will have value `\"igx-month-picker-0\"`.\n */\n this.id = `igx-month-picker-${NEXT_ID$h++}`;\n /**\n * The default css class applied to the component.\n *\n * @hidden\n */\n this.styleClass = true;\n /**\n * @hidden\n */\n this.yearAction = '';\n }\n /**\n * @hidden\n */\n previousYear(event) {\n event?.preventDefault();\n if (event && this.yearAction === 'next') {\n return;\n }\n this.yearAction = 'prev';\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.getPrevYear(this.viewDate);\n }\n /**\n * @hidden\n */\n nextYear(event) {\n event?.preventDefault();\n if (event && this.yearAction === 'prev') {\n return;\n }\n this.yearAction = 'next';\n this.previousViewDate = this.viewDate;\n this.viewDate = this.calendarModel.getNextYear(this.viewDate);\n }\n /**\n * @hidden\n */\n onKeydownHome(event) {\n if (this.monthsView) {\n this.monthsView.el.nativeElement.focus();\n this.monthsView.onKeydownHome(event);\n }\n }\n /**\n * @hidden\n */\n onKeydownEnd(event) {\n if (this.monthsView) {\n this.monthsView.el.nativeElement.focus();\n this.monthsView.onKeydownEnd(event);\n }\n }\n /**\n * @hidden\n */\n animationDone(event) {\n if ((event.fromState === 'void' && event.toState === '') ||\n (event.fromState === '' && (event.toState === ScrollMonth.PREV || event.toState === ScrollMonth.NEXT))) {\n this.viewDateChanged.emit({ previousValue: this.previousViewDate, currentValue: this.viewDate });\n }\n this.yearAction = '';\n }\n /**\n * @hidden\n */\n viewRendered(event) {\n if (event.fromState !== 'void') {\n this.activeViewChanged.emit(this.activeView);\n }\n }\n /**\n * @hidden\n */\n activeViewDecadeKB(event) {\n super.activeViewDecadeKB(event);\n if (event.key === this.platform.KEYMAP.ARROW_RIGHT) {\n this.nextYear(event);\n }\n if (event.key === this.platform.KEYMAP.ARROW_LEFT) {\n this.previousYear(event);\n }\n requestAnimationFrame(() => {\n if (this.dacadeView) {\n this.dacadeView.el.nativeElement.focus();\n }\n });\n }\n /**\n * @hidden\n */\n activeViewDecade() {\n super.activeViewDecade();\n requestAnimationFrame(() => {\n this.dacadeView.el.nativeElement.focus();\n });\n }\n /**\n * @hidden\n */\n changeYearKB(event, next = true) {\n if (this.platform.isActivationKey(event)) {\n event.stopPropagation();\n if (next) {\n this.nextYear();\n }\n else {\n this.previousYear();\n }\n }\n }\n /**\n * @hidden\n */\n selectYear(event) {\n this.previousViewDate = this.viewDate;\n this.viewDate = new Date(event.getFullYear(), event.getMonth(), event.getDate());\n this.activeView = IgxCalendarView.Month;\n requestAnimationFrame(() => {\n if (this.yearsBtn) {\n this.yearsBtn.nativeElement.focus();\n }\n });\n }\n /**\n * @hidden\n */\n selectMonth(event) {\n this.selectDate(event);\n this.selected.emit(this.selectedDates);\n }\n /**\n * Selects a date.\n * ```typescript\n * this.monthPicker.selectDate(new Date(`2018-06-12`));\n * ```\n */\n selectDate(value) {\n if (!value) {\n return new Date();\n }\n super.selectDate(value);\n this.viewDate = value;\n }\n /**\n * @hidden\n */\n writeValue(value) {\n if (value) {\n this.viewDate = this.selectedDates = value;\n }\n }\n /**\n * @hidden\n */\n getNextYear() {\n return this.calendarModel.getNextYear(this.viewDate).getFullYear();\n }\n /**\n * @hidden\n */\n getPreviousYear() {\n return this.calendarModel.getPrevYear(this.viewDate).getFullYear();\n }\n}\nIgxMonthPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxMonthPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxMonthPickerComponent, selector: \"igx-month-picker\", inputs: { id: \"id\" }, host: { listeners: { \"keydown.pageup\": \"previousYear($event)\", \"keydown.pagedown\": \"nextYear($event)\", \"keydown.home\": \"onKeydownHome($event)\", \"keydown.end\": \"onKeydownEnd($event)\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-calendar\": \"this.styleClass\" } }, providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxMonthPickerComponent\n }\n ], viewQueries: [{ propertyName: \"monthsView\", first: true, predicate: [\"months\"], descendants: true, read: IgxMonthsViewComponent }, { propertyName: \"dacadeView\", first: true, predicate: [\"decade\"], descendants: true, read: IgxYearsViewComponent }, { propertyName: \"daysView\", first: true, predicate: [\"days\"], descendants: true, read: IgxDaysViewComponent }, { propertyName: \"yearsBtn\", first: true, predicate: [\"yearsBtn\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n
    \\n \\n keyboard_arrow_left\\n
    \\n
    \\n \\n {{ formattedYear(viewDate) }}\\n \\n
    \\n \\n\\n keyboard_arrow_right\\n \\n \\n\\n \\n \\n\\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxMonthsViewComponent, selector: \"igx-months-view\", inputs: [\"id\", \"date\", \"monthFormat\", \"locale\", \"formatView\"], outputs: [\"selected\"] }, { kind: \"component\", type: IgxYearsViewComponent, selector: \"igx-years-view\", inputs: [\"formatView\", \"date\", \"yearFormat\", \"locale\"], outputs: [\"selected\"] }], animations: [\n trigger('animateView', [\n transition('void => 0', useAnimation(fadeIn)),\n transition('void => *', useAnimation(scaleInCenter, {\n params: {\n duration: '.2s',\n fromScale: .9\n }\n }))\n ]),\n trigger('animateChange', [\n transition('* => prev', useAnimation(slideInLeft, {\n params: {\n fromPosition: 'translateX(-30%)'\n }\n })),\n transition('* => next', useAnimation(slideInRight, {\n params: {\n fromPosition: 'translateX(30%)'\n }\n }))\n ])\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxMonthPickerComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxMonthPickerComponent\n }\n ], animations: [\n trigger('animateView', [\n transition('void => 0', useAnimation(fadeIn)),\n transition('void => *', useAnimation(scaleInCenter, {\n params: {\n duration: '.2s',\n fromScale: .9\n }\n }))\n ]),\n trigger('animateChange', [\n transition('* => prev', useAnimation(slideInLeft, {\n params: {\n fromPosition: 'translateX(-30%)'\n }\n })),\n transition('* => next', useAnimation(slideInRight, {\n params: {\n fromPosition: 'translateX(30%)'\n }\n }))\n ])\n ], selector: 'igx-month-picker', template: \"\\n\\n
    \\n \\n keyboard_arrow_left\\n
    \\n
    \\n \\n {{ formattedYear(viewDate) }}\\n \\n
    \\n \\n\\n keyboard_arrow_right\\n \\n \\n\\n \\n \\n\\n\\n\\n\" }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], styleClass: [{\n type: HostBinding,\n args: ['class.igx-calendar']\n }], monthsView: [{\n type: ViewChild,\n args: ['months', { read: IgxMonthsViewComponent }]\n }], dacadeView: [{\n type: ViewChild,\n args: ['decade', { read: IgxYearsViewComponent }]\n }], daysView: [{\n type: ViewChild,\n args: ['days', { read: IgxDaysViewComponent }]\n }], yearsBtn: [{\n type: ViewChild,\n args: ['yearsBtn']\n }], previousYear: [{\n type: HostListener,\n args: ['keydown.pageup', ['$event']]\n }], nextYear: [{\n type: HostListener,\n args: ['keydown.pagedown', ['$event']]\n }], onKeydownHome: [{\n type: HostListener,\n args: ['keydown.home', ['$event']]\n }], onKeydownEnd: [{\n type: HostListener,\n args: ['keydown.end', ['$event']]\n }] } });\n\n/**\n * @hidden\n */\nclass IgxCalendarModule {\n}\nIgxCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarModule, declarations: [IgxCalendarBaseDirective,\n IgxMonthPickerBaseDirective,\n IgxDayItemComponent,\n IgxDaysViewComponent,\n IgxCalendarComponent,\n IgxCalendarHeaderTemplateDirective,\n IgxCalendarMonthDirective,\n IgxCalendarYearDirective,\n IgxCalendarSubheaderTemplateDirective,\n IgxCalendarScrollMonthDirective,\n IgxMonthsViewComponent,\n IgxYearsViewComponent,\n IgxMonthPickerComponent,\n IgxMonthViewSlotsCalendar,\n IgxGetViewDateCalendar], imports: [CommonModule, FormsModule, IgxIconModule], exports: [IgxCalendarComponent,\n IgxDaysViewComponent,\n IgxMonthsViewComponent,\n IgxYearsViewComponent,\n IgxMonthPickerComponent,\n IgxCalendarHeaderTemplateDirective,\n IgxCalendarMonthDirective,\n IgxCalendarYearDirective,\n IgxCalendarSubheaderTemplateDirective] });\nIgxCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarModule, imports: [CommonModule, FormsModule, IgxIconModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxCalendarBaseDirective,\n IgxMonthPickerBaseDirective,\n IgxDayItemComponent,\n IgxDaysViewComponent,\n IgxCalendarComponent,\n IgxCalendarHeaderTemplateDirective,\n IgxCalendarMonthDirective,\n IgxCalendarYearDirective,\n IgxCalendarSubheaderTemplateDirective,\n IgxCalendarScrollMonthDirective,\n IgxMonthsViewComponent,\n IgxYearsViewComponent,\n IgxMonthPickerComponent,\n IgxMonthViewSlotsCalendar,\n IgxGetViewDateCalendar\n ],\n exports: [\n IgxCalendarComponent,\n IgxDaysViewComponent,\n IgxMonthsViewComponent,\n IgxYearsViewComponent,\n IgxMonthPickerComponent,\n IgxCalendarHeaderTemplateDirective,\n IgxCalendarMonthDirective,\n IgxCalendarYearDirective,\n IgxCalendarSubheaderTemplateDirective\n ],\n imports: [CommonModule, FormsModule, IgxIconModule]\n }]\n }] });\n\nlet NEXT_ID$g = 0;\n/**\n * IgxCardMedia is container for the card media section.\n * Use it to wrap images and videos.\n */\nclass IgxCardMediaDirective {\n constructor() {\n /** @hidden @internal */\n this.cssClass = 'igx-card__media';\n /**\n * An @Input property that sets the `width` and `min-width` style property\n * of the media container. If not provided it will be set to `auto`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.width = 'auto';\n /**\n * An @Input property that sets the `height` style property of the media container.\n * If not provided it will be set to `auto`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.height = 'auto';\n /**\n * An @Input property that sets the `role` attribute of the media container.\n */\n this.role = 'img';\n }\n}\nIgxCardMediaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardMediaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCardMediaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardMediaDirective, selector: \"igx-card-media\", inputs: { width: \"width\", height: \"height\", role: \"role\" }, host: { properties: { \"class.igx-card__media\": \"this.cssClass\", \"style.width\": \"this.width\", \"style.min-width\": \"this.width\", \"style.height\": \"this.height\", \"attr.role\": \"this.role\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardMediaDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-card-media'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-card__media']\n }], width: [{\n type: HostBinding,\n args: ['style.width']\n }, {\n type: HostBinding,\n args: ['style.min-width']\n }, {\n type: Input\n }], height: [{\n type: HostBinding,\n args: ['style.height']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }] } });\n/**\n * IgxCardHeader is container for the card header\n */\nclass IgxCardHeaderComponent {\n constructor() {\n /** @hidden @internal */\n this.cssClass = 'igx-card-header';\n /**\n * An @Input property that sets the layout style of the header.\n * By default the header elements(thumbnail and title/subtitle) are aligned horizontally.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.vertical = false;\n }\n}\nIgxCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardHeaderComponent, selector: \"igx-card-header\", inputs: { vertical: \"vertical\" }, host: { properties: { \"class.igx-card-header\": \"this.cssClass\", \"class.igx-card-header--vertical\": \"this.vertical\" } }, ngImport: i0, template: \"
    \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardHeaderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-card-header', template: \"
    \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n\\n\" }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-card-header']\n }], vertical: [{\n type: HostBinding,\n args: ['class.igx-card-header--vertical']\n }, {\n type: Input\n }] } });\n/**\n * IgxCardThumbnail is container for the card thumbnail section.\n * Use it to wrap anything you want to be used as a thumbnail.\n */\nclass IgxCardThumbnailDirective {\n}\nIgxCardThumbnailDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardThumbnailDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCardThumbnailDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardThumbnailDirective, selector: \"[igxCardThumbnail]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardThumbnailDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCardThumbnail]'\n }]\n }] });\n/**\n * igxCardHeaderTitle is used to denote the header title in a card.\n * Use it to tag text nodes.\n */\nclass IgxCardHeaderTitleDirective {\n constructor() {\n /** @hidden @internal */\n this.cssClass = 'igx-card__header__title';\n }\n}\nIgxCardHeaderTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardHeaderTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCardHeaderTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardHeaderTitleDirective, selector: \"[igxCardHeaderTitle]\", host: { properties: { \"class.igx-card-header__title\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardHeaderTitleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCardHeaderTitle]'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-card-header__title']\n }] } });\n/**\n * igxCardHeaderSubtitle is used to denote the header subtitle in a card.\n * Use it to tag text nodes.\n */\nclass IgxCardHeaderSubtitleDirective {\n constructor() {\n /** @hidden @internal */\n this.cssClass = 'igx-card-header__subtitle';\n }\n}\nIgxCardHeaderSubtitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardHeaderSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCardHeaderSubtitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardHeaderSubtitleDirective, selector: \"[igxCardHeaderSubtitle]\", host: { properties: { \"class.igx-card-header__subtitle\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardHeaderSubtitleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCardHeaderSubtitle]'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-card-header__subtitle']\n }] } });\n/**\n * IgxCardContent is container for the card content.\n */\nclass IgxCardContentDirective {\n constructor() {\n /** @hidden @internal */\n this.cssClass = 'igx-card-content';\n }\n}\nIgxCardContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCardContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardContentDirective, selector: \"igx-card-content\", host: { properties: { \"class.igx-card-content\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardContentDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-card-content'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-card-content']\n }] } });\n/**\n * IgxCardFooter is container for the card footer\n */\nclass IgxCardFooterDirective {\n constructor() {\n /**\n * An @Input property that sets the value of the `role` attribute of the card footer.\n * By default the value is set to `footer`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.role = 'footer';\n }\n}\nIgxCardFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCardFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardFooterDirective, selector: \"igx-card-footer\", inputs: { role: \"role\" }, host: { properties: { \"attr.role\": \"this.role\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardFooterDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'igx-card-footer'\n }]\n }], propDecorators: { role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }] } });\n/**\n * Card provides a way to display organized content in appealing way.\n *\n * @igxModule IgxCardModule\n *\n * @igxTheme igx-card-theme, igx-icon-theme, igx-button-theme\n *\n * @igxKeywords card, button, avatar, icon\n *\n * @igxGroup Layouts\n *\n * @remarks\n * The Ignite UI Card serves as a container that allows custom content to be organized in an appealing way. There are\n * five sections in a card that you can use to organize your content. These are header, media, content, actions, and footer.\n *\n * @example\n * ```html\n * \n * \n *

    {{title}}

    \n *
    {{subtitle}}
    \n *
    \n * \n * \n * \n * \n *
    \n * ```\n */\nconst IgxCardType = mkenum({\n ELEVATED: 'elevated',\n OUTLINED: 'outlined'\n});\nclass IgxCardComponent {\n constructor() {\n /**\n * Sets/gets the `id` of the card.\n * If not set, `id` will have value `\"igx-card-0\"`;\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let cardId = this.card.id;\n * ```\n */\n this.id = `igx-card-${NEXT_ID$g++}`;\n /**\n * An @Input property that sets the value of the `role` attribute of the card.\n * By default the value is set to `group`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.role = 'group';\n /**\n * An @Input property that sets the value of the `type` attribute of the card.\n * By default the value is set to `elevated`. You can make the card use the\n * outlined style by setting the value to `outlined`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.type = IgxCardType.ELEVATED;\n /**\n * An @Input property that sets the value of the `horizontal` attribute of the card.\n * Setting this to `true` will make the different card sections align horizontally,\n * essentially flipping the card to the side.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.horizontal = false;\n }\n /**\n * A getter which will return true if the card type is `outlined`.\n */\n get isOutlinedCard() {\n return this.type === IgxCardType.OUTLINED;\n }\n}\nIgxCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardComponent, selector: \"igx-card\", inputs: { id: \"id\", role: \"role\", type: \"type\", horizontal: \"horizontal\" }, host: { properties: { \"attr.id\": \"this.id\", \"attr.role\": \"this.role\", \"class.igx-card\": \"this.type\", \"class.igx-card--outlined\": \"this.isOutlinedCard\", \"class.igx-card--horizontal\": \"this.horizontal\" } }, ngImport: i0, template: \"\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-card', template: \"\\n\" }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }], type: [{\n type: HostBinding,\n args: ['class.igx-card']\n }, {\n type: Input\n }], isOutlinedCard: [{\n type: HostBinding,\n args: ['class.igx-card--outlined']\n }], horizontal: [{\n type: HostBinding,\n args: ['class.igx-card--horizontal']\n }, {\n type: Input\n }] } });\nconst IgxCardActionsLayout = mkenum({\n START: 'start',\n JUSTIFY: 'justify'\n});\n/**\n * IgxCardActions is container for the card actions.\n */\nclass IgxCardActionsComponent {\n /**\n * A getter that returns `true` when the layout has been\n * set to `justify`.\n */\n get isJustifyLayout() {\n return this.layout === IgxCardActionsLayout.JUSTIFY;\n }\n constructor(card) {\n this.card = card;\n /**\n * An @Input property that sets the layout style of the actions.\n * You can justify the elements slotted in the igx-card-action container\n * so that they are positioned equally from one another taking up all the\n * space available along the card actions axis.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.layout = IgxCardActionsLayout.START;\n /**\n * An @Input property that sets the vertical attribute of the actions.\n * When set to `true` the actions will be layed out vertically.\n */\n this.vertical = false;\n /**\n * @deprecated in version 15.1.0.\n *\n * An @Input property that reverses the order of the buttons in the actions area.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.reverse = false;\n this.isVerticalSet = false;\n }\n /**\n * @hidden\n * @internal\n */\n ngOnChanges(changes) {\n for (const prop in changes) {\n if (prop === 'vertical') {\n this.isVerticalSet = true;\n }\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngOnInit() {\n if (!this.isVerticalSet && this.card.horizontal) {\n this.vertical = true;\n }\n ;\n }\n}\nIgxCardActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardActionsComponent, deps: [{ token: IgxCardComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxCardActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCardActionsComponent, selector: \"igx-card-actions\", inputs: { layout: \"layout\", vertical: \"vertical\", reverse: \"reverse\" }, host: { properties: { \"class.igx-card-actions\": \"this.layout\", \"class.igx-card-actions--vertical\": \"this.vertical\", \"class.igx-card-actions--justify\": \"this.isJustifyLayout\", \"class.igx-card-actions--reverse\": \"this.reverse\" } }, usesOnChanges: true, ngImport: i0, template: \"
    \\n \\n
    \\n\\n\\n\\n
    \\n \\n
    \\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardActionsComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-card-actions', template: \"
    \\n \\n
    \\n\\n\\n\\n
    \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxCardComponent, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IgxCardComponent]\n }] }]; }, propDecorators: { layout: [{\n type: HostBinding,\n args: ['class.igx-card-actions']\n }, {\n type: Input\n }], vertical: [{\n type: HostBinding,\n args: ['class.igx-card-actions--vertical']\n }, {\n type: Input\n }], isJustifyLayout: [{\n type: HostBinding,\n args: ['class.igx-card-actions--justify']\n }], reverse: [{\n type: HostBinding,\n args: ['class.igx-card-actions--reverse']\n }, {\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxCardModule {\n}\nIgxCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardModule, declarations: [IgxCardComponent, IgxCardHeaderComponent, IgxCardMediaDirective, IgxCardContentDirective, IgxCardActionsComponent, IgxCardFooterDirective, IgxCardHeaderTitleDirective, IgxCardHeaderSubtitleDirective, IgxCardThumbnailDirective], imports: [CommonModule, IgxButtonModule], exports: [IgxCardComponent, IgxCardHeaderComponent, IgxCardMediaDirective, IgxCardContentDirective, IgxCardActionsComponent, IgxCardFooterDirective, IgxCardHeaderTitleDirective, IgxCardHeaderSubtitleDirective, IgxCardThumbnailDirective] });\nIgxCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardModule, imports: [CommonModule, IgxButtonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCardModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxCardComponent,\n IgxCardHeaderComponent,\n IgxCardMediaDirective,\n IgxCardContentDirective,\n IgxCardActionsComponent,\n IgxCardFooterDirective,\n IgxCardHeaderTitleDirective,\n IgxCardHeaderSubtitleDirective,\n IgxCardThumbnailDirective,\n ],\n exports: [\n IgxCardComponent,\n IgxCardHeaderComponent,\n IgxCardMediaDirective,\n IgxCardContentDirective,\n IgxCardActionsComponent,\n IgxCardFooterDirective,\n IgxCardHeaderTitleDirective,\n IgxCardHeaderSubtitleDirective,\n IgxCardThumbnailDirective,\n ],\n imports: [CommonModule, IgxButtonModule]\n }]\n }] });\n\nvar Direction;\n(function (Direction) {\n Direction[Direction[\"NONE\"] = 0] = \"NONE\";\n Direction[Direction[\"NEXT\"] = 1] = \"NEXT\";\n Direction[Direction[\"PREV\"] = 2] = \"PREV\";\n})(Direction || (Direction = {}));\nconst HorizontalAnimationType = mkenum({\n none: 'none',\n slide: 'slide',\n fade: 'fade'\n});\n/** @hidden */\nlet IgxCarouselComponentBase = class IgxCarouselComponentBase {\n constructor(animationService, cdr) {\n this.animationService = animationService;\n this.cdr = cdr;\n /** @hidden */\n this.animationType = HorizontalAnimationType.slide;\n /** @hidden @internal */\n this.enterAnimationDone = new EventEmitter();\n /** @hidden @internal */\n this.leaveAnimationDone = new EventEmitter();\n /** @hidden */\n this.defaultAnimationDuration = 320;\n /** @hidden */\n this.animationPosition = 0;\n /** @hidden */\n this.newDuration = 0;\n }\n /** @hidden */\n triggerAnimations() {\n if (this.animationType !== HorizontalAnimationType.none) {\n if (this.animationStarted(this.leaveAnimationPlayer) || this.animationStarted(this.enterAnimationPlayer)) {\n requestAnimationFrame(() => {\n this.resetAnimations();\n this.playAnimations();\n });\n }\n else {\n this.playAnimations();\n }\n }\n }\n /** @hidden */\n animationStarted(animation) {\n return animation && animation.hasStarted();\n }\n /** @hidden */\n playAnimations() {\n this.playLeaveAnimation();\n this.playEnterAnimation();\n }\n resetAnimations() {\n if (this.animationStarted(this.leaveAnimationPlayer)) {\n this.leaveAnimationPlayer.reset();\n this.leaveAnimationDone.emit();\n }\n if (this.animationStarted(this.enterAnimationPlayer)) {\n this.enterAnimationPlayer.reset();\n this.enterAnimationDone.emit();\n this.cdr.markForCheck();\n }\n }\n getAnimation() {\n let duration;\n if (this.newDuration) {\n duration = this.animationPosition ? this.animationPosition * this.newDuration : this.newDuration;\n }\n else {\n duration = this.animationPosition ? this.animationPosition * this.defaultAnimationDuration : this.defaultAnimationDuration;\n }\n switch (this.animationType) {\n case HorizontalAnimationType.slide:\n const trans = this.animationPosition ? this.animationPosition * 100 : 100;\n return {\n enterAnimation: useAnimation(slideInLeft, {\n params: {\n delay: '0s',\n duration: `${duration}ms`,\n endOpacity: 1,\n startOpacity: 1,\n fromPosition: `translateX(${this.currentItem.direction === 1 ? trans : -trans}%)`,\n toPosition: 'translateX(0%)'\n }\n }),\n leaveAnimation: useAnimation(slideInLeft, {\n params: {\n delay: '0s',\n duration: `${duration}ms`,\n endOpacity: 1,\n startOpacity: 1,\n fromPosition: `translateX(0%)`,\n toPosition: `translateX(${this.currentItem.direction === 1 ? -trans : trans}%)`,\n }\n })\n };\n case HorizontalAnimationType.fade:\n return {\n enterAnimation: useAnimation(fadeIn, { params: { duration: `${duration}ms`, startOpacity: `${this.animationPosition}` } }),\n leaveAnimation: null\n };\n }\n return {\n enterAnimation: null,\n leaveAnimation: null\n };\n }\n playEnterAnimation() {\n const animation = this.getAnimation().enterAnimation;\n if (!animation) {\n return;\n }\n this.enterAnimationPlayer = this.animationService.buildAnimation(animation, this.getCurrentElement());\n this.enterAnimationPlayer.animationEnd.subscribe(() => {\n // TODO: animation may never end. Find better way to clean up the player\n if (this.enterAnimationPlayer) {\n this.enterAnimationPlayer.reset();\n this.enterAnimationPlayer = null;\n }\n this.animationPosition = 0;\n this.newDuration = 0;\n this.previousItem.previous = false;\n this.enterAnimationDone.emit();\n this.cdr.markForCheck();\n });\n this.previousItem.previous = true;\n this.enterAnimationPlayer.play();\n }\n playLeaveAnimation() {\n const animation = this.getAnimation().leaveAnimation;\n if (!animation) {\n return;\n }\n this.leaveAnimationPlayer = this.animationService.buildAnimation(animation, this.getPreviousElement());\n this.leaveAnimationPlayer.animationEnd.subscribe(() => {\n // TODO: animation may never end. Find better way to clean up the player\n if (this.leaveAnimationPlayer) {\n this.leaveAnimationPlayer.reset();\n this.leaveAnimationPlayer = null;\n }\n this.animationPosition = 0;\n this.newDuration = 0;\n this.leaveAnimationDone.emit();\n });\n this.leaveAnimationPlayer.play();\n }\n};\nIgxCarouselComponentBase = __decorate([\n __param(0, Inject(IgxAngularAnimationService))\n], IgxCarouselComponentBase);\n\nclass IgxCarouselIndicatorDirective {\n}\nIgxCarouselIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCarouselIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCarouselIndicatorDirective, selector: \"[igxCarouselIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCarouselIndicator]'\n }]\n }] });\nclass IgxCarouselNextButtonDirective {\n}\nIgxCarouselNextButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselNextButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCarouselNextButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCarouselNextButtonDirective, selector: \"[igxCarouselNextButton]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselNextButtonDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCarouselNextButton]'\n }]\n }] });\nclass IgxCarouselPrevButtonDirective {\n}\nIgxCarouselPrevButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselPrevButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCarouselPrevButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCarouselPrevButtonDirective, selector: \"[igxCarouselPrevButton]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselPrevButtonDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCarouselPrevButton]'\n }]\n }] });\n\n/**\n * A slide component that usually holds an image and/or a caption text.\n * IgxSlideComponent is usually a child component of an IgxCarouselComponent.\n *\n * ```\n * \n * \n * \n * ```\n *\n * @export\n */\nclass IgxSlideComponent {\n /**\n * Returns the `tabIndex` of the slide component.\n * ```typescript\n * let tabIndex = this.carousel.tabIndex;\n * ```\n *\n * @memberof IgxSlideComponent\n */\n get tabIndex() {\n return this.active ? 0 : null;\n }\n /**\n * Gets/sets the `active` state of the slide.\n * ```html\n * \n * \n * \n * ```\n *\n * Two-way data binding.\n * ```html\n * \n * \n * \n * ```\n *\n * @memberof IgxSlideComponent\n */\n get active() {\n return this._active;\n }\n set active(value) {\n this._active = !!value;\n this.activeChange.emit(this._active);\n }\n constructor(elementRef) {\n this.elementRef = elementRef;\n /**\n * Returns the `role` of the slide component.\n * By default is set to `tabpanel`\n *\n * @memberof IgxSlideComponent\n */\n this.tab = 'tabpanel';\n /**\n * Returns the class of the slide component.\n * ```typescript\n * let class = this.slide.cssClass;\n * ```\n *\n * @memberof IgxSlideComponent\n */\n this.cssClass = 'igx-slide';\n this.previous = false;\n /**\n * @hidden\n */\n this.activeChange = new EventEmitter();\n this._active = false;\n this._destroy$ = new Subject();\n }\n /**\n * Returns a reference to the carousel element in the DOM.\n * ```typescript\n * let nativeElement = this.slide.nativeElement;\n * ```\n *\n * @memberof IgxSlideComponent\n */\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n /**\n * @hidden\n */\n get isDestroyed() {\n return this._destroy$;\n }\n ngAfterContentChecked() {\n this.id = `panel-${this.index}`;\n this.ariaLabelledBy = `tab-${this.index}-${this.total}`;\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this._destroy$.next(true);\n this._destroy$.complete();\n }\n}\nIgxSlideComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSlideComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxSlideComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSlideComponent, selector: \"igx-slide\", inputs: { index: \"index\", direction: \"direction\", total: \"total\", active: \"active\", previous: \"previous\" }, outputs: { activeChange: \"activeChange\" }, host: { properties: { \"attr.tabindex\": \"this.tabIndex\", \"attr.id\": \"this.id\", \"attr.role\": \"this.tab\", \"attr.aria-labelledby\": \"this.ariaLabelledBy\", \"class.igx-slide\": \"this.cssClass\", \"class.igx-slide--current\": \"this.active\", \"class.igx-slide--previous\": \"this.previous\" } }, ngImport: i0, template: \"\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSlideComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-slide', template: \"\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { index: [{\n type: Input\n }], direction: [{\n type: Input\n }], total: [{\n type: Input\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }], tab: [{\n type: HostBinding,\n args: ['attr.role']\n }], ariaLabelledBy: [{\n type: HostBinding,\n args: ['attr.aria-labelledby']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-slide']\n }], active: [{\n type: HostBinding,\n args: ['class.igx-slide--current']\n }, {\n type: Input\n }], previous: [{\n type: HostBinding,\n args: ['class.igx-slide--previous']\n }, {\n type: Input\n }], activeChange: [{\n type: Output\n }] } });\n\nlet NEXT_ID$f = 0;\nconst CarouselIndicatorsOrientation = mkenum({\n bottom: 'bottom',\n top: 'top'\n});\nclass CarouselHammerConfig extends HammerGestureConfig {\n constructor() {\n super(...arguments);\n this.overrides = {\n pan: { direction: Hammer.DIRECTION_HORIZONTAL }\n };\n }\n}\nCarouselHammerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: CarouselHammerConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nCarouselHammerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: CarouselHammerConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: CarouselHammerConfig, decorators: [{\n type: Injectable\n }] });\n/**\n * **Ignite UI for Angular Carousel** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/carousel.html)\n *\n * The Ignite UI Carousel is used to browse or navigate through a collection of slides. Slides can contain custom\n * content such as images or cards and be used for things such as on-boarding tutorials or page-based interfaces.\n * It can be used as a separate fullscreen element or inside another component.\n *\n * Example:\n * ```html\n * \n * \n *

    First Slide Header

    \n *

    First slide Content

    \n * \n * \n *

    Second Slide Header

    \n *

    Second Slide Content

    \n *
    \n * ```\n */\nclass IgxCarouselComponent extends IgxCarouselComponentBase {\n /** @hidden */\n get labelId() {\n return this.showIndicatorsLabel ? `${this.id}-label` : null;\n }\n /**\n * Gets the `touch-action` style of the `list item`.\n * ```typescript\n * let touchAction = this.listItem.touchAction;\n * ```\n */\n get touchAction() {\n return this.gesturesSupport ? 'pan-y' : 'auto';\n }\n /**\n * An accessor that sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n /** @hidden */\n get getIndicatorTemplate() {\n if (this.indicatorTemplate) {\n return this.indicatorTemplate;\n }\n return this.defaultIndicator;\n }\n /** @hidden */\n get getNextButtonTemplate() {\n if (this.nextButtonTemplate) {\n return this.nextButtonTemplate;\n }\n return this.defaultNextButton;\n }\n /** @hidden */\n get getPrevButtonTemplate() {\n if (this.prevButtonTemplate) {\n return this.prevButtonTemplate;\n }\n return this.defaultPrevButton;\n }\n /** @hidden */\n get indicatorsOrientationClass() {\n return `igx-carousel-indicators--${this.indicatorsOrientation}`;\n }\n /** @hidden */\n get showIndicators() {\n return this.total <= this.maximumIndicatorsCount && this.total > 0;\n }\n /** @hidden */\n get showIndicatorsLabel() {\n return this.total > this.maximumIndicatorsCount;\n }\n /** @hidden */\n get getCarouselLabel() {\n return `${this.current + 1} ${this.resourceStrings.igx_carousel_of} ${this.total}`;\n }\n /**\n * Returns the total number of `slides` in the carousel.\n * ```typescript\n * let slideCount = this.carousel.total;\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n get total() {\n return this.slides?.length;\n }\n /**\n * The index of the slide being currently shown.\n * ```typescript\n * let currentSlideNumber = this.carousel.current;\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n get current() {\n return !this.currentItem ? 0 : this.currentItem.index;\n }\n /**\n * Returns a boolean indicating if the carousel is playing.\n * ```typescript\n * let isPlaying = this.carousel.isPlaying;\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n get isPlaying() {\n return this.playing;\n }\n /**\n * Returns а boolean indicating if the carousel is destroyed.\n * ```typescript\n * let isDestroyed = this.carousel.isDestroyed;\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n get isDestroyed() {\n return this.destroyed;\n }\n /**\n * Returns a reference to the carousel element in the DOM.\n * ```typescript\n * let nativeElement = this.carousel.nativeElement;\n * ```\n *\n * @memberof IgxCarouselComponent\n */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /**\n * Returns the time `interval` in milliseconds before the slide changes.\n * ```typescript\n * let timeInterval = this.carousel.interval;\n * ```\n *\n * @memberof IgxCarouselComponent\n */\n get interval() {\n return this._interval;\n }\n /**\n * Sets the time `interval` in milliseconds before the slide changes.\n * If not set, the carousel will not change `slides` automatically.\n * ```html\n * \n * ```\n *\n * @memberof IgxCarouselComponent\n */\n set interval(value) {\n this._interval = +value;\n this.restartInterval();\n }\n constructor(cdr, element, iterableDiffers, animationService, platformUtil) {\n super(animationService, cdr);\n this.element = element;\n this.iterableDiffers = iterableDiffers;\n this.platformUtil = platformUtil;\n /**\n * Sets the `id` of the carousel.\n * If not set, the `id` of the first carousel component will be `\"igx-carousel-0\"`.\n * ```html\n * \n * ```\n *\n * @memberof IgxCarouselComponent\n */\n this.id = `igx-carousel-${NEXT_ID$f++}`;\n /**\n * Returns the `role` attribute of the carousel.\n * ```typescript\n * let carouselRole = this.carousel.role;\n * ```\n *\n * @memberof IgxCarouselComponent\n */\n this.role = 'region';\n /** @hidden */\n this.roleDescription = 'carousel';\n /**\n * Returns the class of the carousel component.\n * ```typescript\n * let class = this.carousel.cssClass;\n * ```\n *\n * @memberof IgxCarouselComponent\n */\n this.cssClass = 'igx-carousel';\n /**\n * Sets whether the carousel should `loop` back to the first slide after reaching the last slide.\n * Default value is `true`.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.loop = true;\n /**\n * Sets whether the carousel will `pause` the slide transitions on user interactions.\n * Default value is `true`.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.pause = true;\n /**\n * Controls whether the carousel should render the left/right `navigation` buttons.\n * Default value is `true`.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.navigation = true;\n /**\n * Controls whether the carousel should support keyboard navigation.\n * Default value is `true`.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.keyboardSupport = true;\n /**\n * Controls whether the carousel should support gestures.\n * Default value is `true`.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.gesturesSupport = true;\n /**\n * Controls the maximum indexes that can be shown.\n * Default value is `5`.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.maximumIndicatorsCount = 5;\n /**\n * Gets/sets the display mode of carousel indicators. It can be top or bottom.\n * Default value is `bottom`.\n * ```html\n * \n * \n * ```\n *\n * @memberOf IgxSlideComponent\n */\n this.indicatorsOrientation = CarouselIndicatorsOrientation.bottom;\n /**\n * Gets/sets the animation type of carousel.\n * Default value is `slide`.\n * ```html\n * \n * \n * ```\n *\n * @memberOf IgxSlideComponent\n */\n this.animationType = HorizontalAnimationType.slide;\n /**\n * The custom template, if any, that should be used when rendering carousel indicators\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.carousel.indicatorTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * brightness_7\n * brightness_5\n * \n * \n * ```\n */\n this.indicatorTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering carousel next button\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.carousel.nextButtonTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * \n * \n * \n * ```\n */\n this.nextButtonTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering carousel previous button\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.carousel.nextButtonTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * \n * \n * \n * ```\n */\n this.prevButtonTemplate = null;\n /**\n * An event that is emitted after a slide transition has happened.\n * Provides references to the `IgxCarouselComponent` and `IgxSlideComponent` as event arguments.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.slideChanged = new EventEmitter();\n /**\n * An event that is emitted after a slide has been added to the carousel.\n * Provides references to the `IgxCarouselComponent` and `IgxSlideComponent` as event arguments.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.slideAdded = new EventEmitter();\n /**\n * An event that is emitted after a slide has been removed from the carousel.\n * Provides references to the `IgxCarouselComponent` and `IgxSlideComponent` as event arguments.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.slideRemoved = new EventEmitter();\n /**\n * An event that is emitted after the carousel has been paused.\n * Provides a reference to the `IgxCarouselComponent` as an event argument.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.carouselPaused = new EventEmitter();\n /**\n * An event that is emitted after the carousel has resumed transitioning between `slides`.\n * Provides a reference to the `IgxCarouselComponent` as an event argument.\n * ```html\n * \n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n this.carouselPlaying = new EventEmitter();\n this._resourceStrings = CurrentResourceStrings.CarouselResStrings;\n this.destroy$ = new Subject();\n this.differ = null;\n this.differ = this.iterableDiffers.find([]).create(null);\n }\n /** @hidden */\n onKeydownArrowRight(event) {\n if (this.keyboardSupport) {\n event.preventDefault();\n this.next();\n this.focusSlideElement();\n }\n }\n /** @hidden */\n onKeydownArrowLeft(event) {\n if (this.keyboardSupport) {\n event.preventDefault();\n this.prev();\n this.focusSlideElement();\n }\n }\n /** @hidden */\n onTap(event) {\n // play pause only when tap on slide\n if (event.target && event.target.classList.contains('igx-slide')) {\n if (this.isPlaying) {\n if (this.pause) {\n this.stoppedByInteraction = true;\n }\n this.stop();\n }\n else if (this.stoppedByInteraction) {\n this.play();\n }\n }\n }\n /** @hidden */\n onKeydownHome(event) {\n if (this.keyboardSupport && this.slides.length > 0) {\n event.preventDefault();\n this.slides.first.active = true;\n this.focusSlideElement();\n }\n }\n /** @hidden */\n onKeydownEnd(event) {\n if (this.keyboardSupport && this.slides.length > 0) {\n event.preventDefault();\n this.slides.last.active = true;\n this.focusSlideElement();\n }\n }\n /** @hidden */\n onMouseEnter() {\n if (this.pause && this.isPlaying) {\n this.stoppedByInteraction = true;\n }\n this.stop();\n }\n /** @hidden */\n onMouseLeave() {\n if (this.stoppedByInteraction) {\n this.play();\n }\n }\n /** @hidden */\n onPanLeft(event) {\n this.pan(event);\n }\n /** @hidden */\n onPanRight(event) {\n this.pan(event);\n }\n /**\n * @hidden\n */\n onPanEnd(event) {\n if (!this.gesturesSupport) {\n return;\n }\n event.preventDefault();\n const slideWidth = this.currentItem.nativeElement.offsetWidth;\n const panOffset = (slideWidth / 1000);\n const deltaX = Math.abs(event.deltaX) + panOffset < slideWidth ? Math.abs(event.deltaX) : slideWidth - panOffset;\n const velocity = Math.abs(event.velocity);\n this.resetSlideStyles(this.currentItem);\n if (this.incomingSlide) {\n this.resetSlideStyles(this.incomingSlide);\n if (slideWidth / 2 < deltaX || velocity > 1) {\n this.incomingSlide.direction = event.deltaX < 0 ? Direction.NEXT : Direction.PREV;\n this.incomingSlide.previous = false;\n this.animationPosition = this.animationType === HorizontalAnimationType.fade ?\n deltaX / slideWidth : (slideWidth - deltaX) / slideWidth;\n if (velocity > 1) {\n this.newDuration = this.defaultAnimationDuration / velocity;\n }\n this.incomingSlide.active = true;\n }\n else {\n this.currentItem.direction = event.deltaX > 0 ? Direction.NEXT : Direction.PREV;\n this.previousItem = this.incomingSlide;\n this.previousItem.previous = true;\n this.animationPosition = this.animationType === HorizontalAnimationType.fade ?\n Math.abs((slideWidth - deltaX) / slideWidth) : deltaX / slideWidth;\n this.playAnimations();\n }\n }\n if (this.stoppedByInteraction) {\n this.play();\n }\n }\n /** @hidden */\n ngAfterContentInit() {\n this.slides.changes\n .pipe(takeUntil(this.destroy$))\n .subscribe((change) => this.initSlides(change));\n this.initSlides(this.slides);\n }\n /** @hidden */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n this.destroyed = true;\n if (this.lastInterval) {\n clearInterval(this.lastInterval);\n }\n }\n /**\n * Returns the slide corresponding to the provided `index` or null.\n * ```typescript\n * let slide1 = this.carousel.get(1);\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n get(index) {\n return this.slides.find((slide) => slide.index === index);\n }\n /**\n * Adds a new slide to the carousel.\n * ```typescript\n * this.carousel.add(newSlide);\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n add(slide) {\n const newSlides = this.slides.toArray();\n newSlides.push(slide);\n this.slides.reset(newSlides);\n this.slides.notifyOnChanges();\n }\n /**\n * Removes a slide from the carousel.\n * ```typescript\n * this.carousel.remove(slide);\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n remove(slide) {\n if (slide && slide === this.get(slide.index)) { // check if the requested slide for delete is present in the carousel\n const newSlides = this.slides.toArray();\n newSlides.splice(slide.index, 1);\n this.slides.reset(newSlides);\n this.slides.notifyOnChanges();\n }\n }\n /**\n * Kicks in a transition for a given slide with a given `direction`.\n * ```typescript\n * this.carousel.select(this.carousel.get(2), Direction.NEXT);\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n select(slide, direction = Direction.NONE) {\n if (slide && slide !== this.currentItem) {\n slide.direction = direction;\n slide.active = true;\n }\n }\n /**\n * Transitions to the next slide in the carousel.\n * ```typescript\n * this.carousel.next();\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n next() {\n const index = this.getNextIndex();\n if (index === 0 && !this.loop) {\n this.stop();\n return;\n }\n return this.select(this.get(index), Direction.NEXT);\n }\n /**\n * Transitions to the previous slide in the carousel.\n * ```typescript\n * this.carousel.prev();\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n prev() {\n const index = this.getPrevIndex();\n if (!this.loop && index === this.total - 1) {\n this.stop();\n return;\n }\n return this.select(this.get(index), Direction.PREV);\n }\n /**\n * Resumes playing of the carousel if in paused state.\n * No operation otherwise.\n * ```typescript\n * this.carousel.play();\n * }\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n play() {\n if (!this.playing) {\n this.playing = true;\n this.carouselPlaying.emit(this);\n this.restartInterval();\n this.stoppedByInteraction = false;\n }\n }\n /**\n * Stops slide transitions if the `pause` option is set to `true`.\n * No operation otherwise.\n * ```typescript\n * this.carousel.stop();\n * }\n * ```\n *\n * @memberOf IgxCarouselComponent\n */\n stop() {\n if (this.pause) {\n this.playing = false;\n this.carouselPaused.emit(this);\n this.resetInterval();\n }\n }\n getPreviousElement() {\n return this.previousItem.nativeElement;\n }\n getCurrentElement() {\n return this.currentItem.nativeElement;\n }\n resetInterval() {\n if (this.lastInterval) {\n clearInterval(this.lastInterval);\n this.lastInterval = null;\n }\n }\n restartInterval() {\n this.resetInterval();\n if (!isNaN(this.interval) && this.interval > 0 && this.platformUtil.isBrowser) {\n this.lastInterval = setInterval(() => {\n const tick = +this.interval;\n if (this.playing && this.total && !isNaN(tick) && tick > 0) {\n this.next();\n }\n else {\n this.stop();\n }\n }, this.interval);\n }\n }\n /** @hidden */\n get nextButtonDisabled() {\n return !this.loop && this.current === (this.total - 1);\n }\n /** @hidden */\n get prevButtonDisabled() {\n return !this.loop && this.current === 0;\n }\n getNextIndex() {\n return (this.current + 1) % this.total;\n }\n getPrevIndex() {\n return this.current - 1 < 0 ? this.total - 1 : this.current - 1;\n }\n resetSlideStyles(slide) {\n slide.nativeElement.style.transform = '';\n slide.nativeElement.style.opacity = '';\n }\n pan(event) {\n const slideWidth = this.currentItem.nativeElement.offsetWidth;\n const panOffset = (slideWidth / 1000);\n const deltaX = event.deltaX;\n const index = deltaX < 0 ? this.getNextIndex() : this.getPrevIndex();\n const offset = deltaX < 0 ? slideWidth + deltaX : -slideWidth + deltaX;\n if (!this.gesturesSupport || event.isFinal || Math.abs(deltaX) + panOffset >= slideWidth) {\n return;\n }\n if (!this.loop && ((this.current === 0 && deltaX > 0) || (this.current === this.total - 1 && deltaX < 0))) {\n this.incomingSlide = null;\n return;\n }\n event.preventDefault();\n if (this.isPlaying) {\n this.stoppedByInteraction = true;\n this.stop();\n }\n if (this.previousItem && this.previousItem.previous) {\n this.previousItem.previous = false;\n }\n this.finishAnimations();\n if (this.incomingSlide) {\n if (index !== this.incomingSlide.index) {\n this.resetSlideStyles(this.incomingSlide);\n this.incomingSlide.previous = false;\n this.incomingSlide = this.get(index);\n }\n }\n else {\n this.incomingSlide = this.get(index);\n }\n this.incomingSlide.previous = true;\n if (this.animationType === HorizontalAnimationType.fade) {\n this.currentItem.nativeElement.style.opacity = `${Math.abs(offset) / slideWidth}`;\n }\n else {\n this.currentItem.nativeElement.style.transform = `translateX(${deltaX}px)`;\n this.incomingSlide.nativeElement.style.transform = `translateX(${offset}px)`;\n }\n }\n unsubscriber(slide) {\n return merge(this.destroy$, slide.isDestroyed);\n }\n onSlideActivated(slide) {\n if (slide.active && slide !== this.currentItem) {\n if (slide.direction === Direction.NONE) {\n const newIndex = slide.index;\n slide.direction = newIndex > this.current ? Direction.NEXT : Direction.PREV;\n }\n if (this.currentItem) {\n if (this.previousItem && this.previousItem.previous) {\n this.previousItem.previous = false;\n }\n this.currentItem.direction = slide.direction;\n this.currentItem.active = false;\n this.previousItem = this.currentItem;\n this.currentItem = slide;\n this.triggerAnimations();\n }\n else {\n this.currentItem = slide;\n }\n this.slideChanged.emit({ carousel: this, slide });\n this.restartInterval();\n }\n }\n finishAnimations() {\n if (this.animationStarted(this.leaveAnimationPlayer)) {\n this.leaveAnimationPlayer.finish();\n }\n if (this.animationStarted(this.enterAnimationPlayer)) {\n this.enterAnimationPlayer.finish();\n }\n }\n initSlides(change) {\n const diff = this.differ.diff(change.toArray());\n if (diff) {\n this.slides.reduce((any, c, ind) => c.index = ind, 0); // reset slides indexes\n diff.forEachAddedItem((record) => {\n const slide = record.item;\n slide.total = this.total;\n this.slideAdded.emit({ carousel: this, slide });\n if (slide.active) {\n this.currentItem = slide;\n }\n slide.activeChange.pipe(takeUntil(this.unsubscriber(slide))).subscribe(() => this.onSlideActivated(slide));\n });\n diff.forEachRemovedItem((record) => {\n const slide = record.item;\n this.slideRemoved.emit({ carousel: this, slide });\n if (slide.active) {\n slide.active = false;\n this.currentItem = this.get(slide.index < this.total ? slide.index : this.total - 1);\n }\n });\n this.updateSlidesSelection();\n }\n }\n updateSlidesSelection() {\n if (this.platformUtil.isBrowser) {\n requestAnimationFrame(() => {\n if (this.currentItem) {\n this.currentItem.active = true;\n const activeSlides = this.slides.filter(slide => slide.active && slide.index !== this.currentItem.index);\n activeSlides.forEach(slide => slide.active = false);\n }\n else if (this.total) {\n this.slides.first.active = true;\n }\n this.play();\n });\n }\n }\n focusSlideElement() {\n if (this.leaveAnimationPlayer) {\n this.leaveAnimationPlayer.animationEnd\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.slides.find(s => s.active).nativeElement.focus();\n });\n }\n else {\n requestAnimationFrame(() => this.slides.find(s => s.active).nativeElement.focus());\n }\n }\n}\nIgxCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.IterableDiffers }, { token: IgxAngularAnimationService }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCarouselComponent, selector: \"igx-carousel\", inputs: { id: \"id\", loop: \"loop\", pause: \"pause\", navigation: \"navigation\", keyboardSupport: \"keyboardSupport\", gesturesSupport: \"gesturesSupport\", maximumIndicatorsCount: \"maximumIndicatorsCount\", indicatorsOrientation: \"indicatorsOrientation\", animationType: \"animationType\", resourceStrings: \"resourceStrings\", interval: \"interval\" }, outputs: { slideChanged: \"slideChanged\", slideAdded: \"slideAdded\", slideRemoved: \"slideRemoved\", carouselPaused: \"carouselPaused\", carouselPlaying: \"carouselPlaying\" }, host: { listeners: { \"keydown.arrowright\": \"onKeydownArrowRight($event)\", \"keydown.arrowleft\": \"onKeydownArrowLeft($event)\", \"tap\": \"onTap($event)\", \"keydown.home\": \"onKeydownHome($event)\", \"keydown.end\": \"onKeydownEnd($event)\", \"mouseenter\": \"onMouseEnter()\", \"mouseleave\": \"onMouseLeave()\", \"panleft\": \"onPanLeft($event)\", \"panright\": \"onPanRight($event)\", \"panend\": \"onPanEnd($event)\" }, properties: { \"attr.id\": \"this.id\", \"attr.role\": \"this.role\", \"attr.aria-roledescription\": \"this.roleDescription\", \"attr.aria-labelledby\": \"this.labelId\", \"class.igx-carousel\": \"this.cssClass\", \"style.touch-action\": \"this.touchAction\" } }, providers: [\n {\n provide: HAMMER_GESTURE_CONFIG,\n useClass: CarouselHammerConfig\n }\n ], queries: [{ propertyName: \"indicatorTemplate\", first: true, predicate: IgxCarouselIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"nextButtonTemplate\", first: true, predicate: IgxCarouselNextButtonDirective, descendants: true, read: TemplateRef }, { propertyName: \"prevButtonTemplate\", first: true, predicate: IgxCarouselPrevButtonDirective, descendants: true, read: TemplateRef }, { propertyName: \"slides\", predicate: IgxSlideComponent }], viewQueries: [{ propertyName: \"defaultIndicator\", first: true, predicate: [\"defaultIndicator\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultNextButton\", first: true, predicate: [\"defaultNextButton\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultPrevButton\", first: true, predicate: [\"defaultPrevButton\"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n
    \\n
    \\n
    \\n\\n\\n \\n arrow_forward\\n \\n\\n\\n\\n \\n arrow_back\\n \\n\\n\\n
    \\n \\n
    \\n\\n
    \\n {{getCarouselLabel}}\\n
    \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\", styles: [\":host{display:block;outline-style:none}\\n\"], dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n {\n provide: HAMMER_GESTURE_CONFIG,\n useClass: CarouselHammerConfig\n }\n ], selector: 'igx-carousel', template: \"\\n
    \\n
    \\n
    \\n\\n\\n \\n arrow_forward\\n \\n\\n\\n\\n \\n arrow_back\\n \\n\\n\\n
    \\n \\n
    \\n\\n
    \\n {{getCarouselLabel}}\\n
    \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\", styles: [\":host{display:block;outline-style:none}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: PlatformUtil }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], roleDescription: [{\n type: HostBinding,\n args: ['attr.aria-roledescription']\n }], labelId: [{\n type: HostBinding,\n args: ['attr.aria-labelledby']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-carousel']\n }], touchAction: [{\n type: HostBinding,\n args: ['style.touch-action']\n }], loop: [{\n type: Input\n }], pause: [{\n type: Input\n }], navigation: [{\n type: Input\n }], keyboardSupport: [{\n type: Input\n }], gesturesSupport: [{\n type: Input\n }], maximumIndicatorsCount: [{\n type: Input\n }], indicatorsOrientation: [{\n type: Input\n }], animationType: [{\n type: Input\n }], indicatorTemplate: [{\n type: ContentChild,\n args: [IgxCarouselIndicatorDirective, { read: TemplateRef, static: false }]\n }], nextButtonTemplate: [{\n type: ContentChild,\n args: [IgxCarouselNextButtonDirective, { read: TemplateRef, static: false }]\n }], prevButtonTemplate: [{\n type: ContentChild,\n args: [IgxCarouselPrevButtonDirective, { read: TemplateRef, static: false }]\n }], slides: [{\n type: ContentChildren,\n args: [IgxSlideComponent]\n }], slideChanged: [{\n type: Output\n }], slideAdded: [{\n type: Output\n }], slideRemoved: [{\n type: Output\n }], carouselPaused: [{\n type: Output\n }], carouselPlaying: [{\n type: Output\n }], defaultIndicator: [{\n type: ViewChild,\n args: ['defaultIndicator', { read: TemplateRef, static: true }]\n }], defaultNextButton: [{\n type: ViewChild,\n args: ['defaultNextButton', { read: TemplateRef, static: true }]\n }], defaultPrevButton: [{\n type: ViewChild,\n args: ['defaultPrevButton', { read: TemplateRef, static: true }]\n }], resourceStrings: [{\n type: Input\n }], interval: [{\n type: Input\n }], onKeydownArrowRight: [{\n type: HostListener,\n args: ['keydown.arrowright', ['$event']]\n }], onKeydownArrowLeft: [{\n type: HostListener,\n args: ['keydown.arrowleft', ['$event']]\n }], onTap: [{\n type: HostListener,\n args: ['tap', ['$event']]\n }], onKeydownHome: [{\n type: HostListener,\n args: ['keydown.home', ['$event']]\n }], onKeydownEnd: [{\n type: HostListener,\n args: ['keydown.end', ['$event']]\n }], onMouseEnter: [{\n type: HostListener,\n args: ['mouseenter']\n }], onMouseLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }], onPanLeft: [{\n type: HostListener,\n args: ['panleft', ['$event']]\n }], onPanRight: [{\n type: HostListener,\n args: ['panright', ['$event']]\n }], onPanEnd: [{\n type: HostListener,\n args: ['panend', ['$event']]\n }] } });\n/**\n * @hidden\n */\nclass IgxCarouselModule {\n}\nIgxCarouselModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselModule, declarations: [IgxCarouselComponent, IgxSlideComponent,\n IgxCarouselIndicatorDirective,\n IgxCarouselNextButtonDirective,\n IgxCarouselPrevButtonDirective], imports: [CommonModule, IgxIconModule], exports: [IgxCarouselComponent, IgxSlideComponent,\n IgxCarouselIndicatorDirective,\n IgxCarouselNextButtonDirective,\n IgxCarouselPrevButtonDirective] });\nIgxCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselModule, imports: [CommonModule, IgxIconModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCarouselModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxCarouselComponent,\n IgxSlideComponent,\n IgxCarouselIndicatorDirective,\n IgxCarouselNextButtonDirective,\n IgxCarouselPrevButtonDirective\n ],\n exports: [\n IgxCarouselComponent,\n IgxSlideComponent,\n IgxCarouselIndicatorDirective,\n IgxCarouselNextButtonDirective,\n IgxCarouselPrevButtonDirective\n ],\n imports: [CommonModule, IgxIconModule]\n }]\n }] });\n\nlet CHIP_ID = 0;\n/**\n * Chip is compact visual component that displays information in an obround.\n *\n * @igxModule IgxChipsModule\n *\n * @igxTheme igx-chip-theme\n *\n * @igxKeywords chip\n *\n * @igxGroup display\n *\n * @remarks\n * The Ignite UI Chip can be templated, deleted, and selected.\n * Multiple chips can be reordered and visually connected to each other.\n * Chips reside in a container called chips area which is responsible for managing the interactions between the chips.\n *\n * @example\n * ```html\n * \n * \n * \n * ```\n */\nclass IgxChipComponent extends DisplayDensityBase {\n /**\n * An @Input property that sets the value of `tabindex` attribute. If not provided it will use the element's tabindex if set.\n *\n * @example\n * ```html\n * \n * ```\n */\n set tabIndex(value) {\n this._tabIndex = value;\n }\n get tabIndex() {\n if (this._tabIndex !== null) {\n return this._tabIndex;\n }\n return !this.disabled ? 0 : null;\n }\n /**\n * Sets the `IgxChipComponent` selected state.\n *\n * @example\n * ```html\n * \n * ```\n *\n * Two-way data binding:\n * ```html\n * \n * ```\n */\n set selected(newValue) {\n this.changeSelection(newValue);\n }\n /**\n * Returns if the `IgxChipComponent` is selected.\n *\n * @example\n * ```typescript\n * @ViewChild('myChip')\n * public chip: IgxChipComponent;\n * selectedChip(){\n * let selectedChip = this.chip.selected;\n * }\n * ```\n */\n get selected() {\n return this._selected;\n }\n /**\n * An @Input property that sets the `IgxChipComponent` background color.\n * The `color` property supports string, rgb, hex.\n *\n * @example\n * ```html\n * \n * ```\n */\n set color(newColor) {\n this.chipArea.nativeElement.style.backgroundColor = newColor;\n }\n /**\n * Returns the background color of the `IgxChipComponent`.\n *\n * @example\n * ```typescript\n * @ViewChild('myChip')\n * public chip: IgxChipComponent;\n * ngAfterViewInit(){\n * let chipColor = this.chip.color;\n * }\n * ```\n */\n get color() {\n return this.chipArea.nativeElement.style.backgroundColor;\n }\n /**\n * An accessor that sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n /**\n * @hidden\n * @internal\n */\n get removeButtonTemplate() {\n return this.removeIcon || this.defaultRemoveIcon;\n }\n /**\n * @hidden\n * @internal\n */\n get selectIconTemplate() {\n return this.selectIcon || this.defaultSelectIcon;\n }\n /**\n * @hidden\n * @internal\n */\n get ghostClass() {\n return this.getComponentDensityClass('igx-chip__ghost');\n }\n /** @hidden @internal */\n get nativeElement() {\n return this.ref.nativeElement;\n }\n constructor(cdr, ref, renderer, _displayDensityOptions) {\n super(_displayDensityOptions);\n this.cdr = cdr;\n this.ref = ref;\n this.renderer = renderer;\n this._displayDensityOptions = _displayDensityOptions;\n /**\n * An @Input property that sets the value of `id` attribute. If not provided it will be automatically generated.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.id = `igx-chip-${CHIP_ID++}`;\n /**\n * Returns the `role` attribute of the chip.\n *\n * @example\n * ```typescript\n * let chipRole = this.chip.role;\n * ```\n */\n this.role = 'option';\n /**\n * An @Input property that defines if the `IgxChipComponent` can be dragged in order to change it's position.\n * By default it is set to false.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.draggable = false;\n /**\n * An @Input property that enables/disables the draggable element animation when the element is released.\n * By default it's set to true.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.animateOnRelease = true;\n /**\n * An @Input property that enables/disables the hiding of the base element that has been dragged.\n * By default it's set to true.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.hideBaseOnDrag = true;\n /**\n * An @Input property that defines if the `IgxChipComponent` should render remove button and throw remove events.\n * By default it is set to false.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.removable = false;\n /**\n * An @Input property that defines if the `IgxChipComponent` can be selected on click or through navigation,\n * By default it is set to false.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.selectable = false;\n /**\n * An @Input property that defines if the `IgxChipComponent` is disabled. When disabled it restricts user interactions\n * like focusing on click or tab, selection on click or Space, dragging.\n * By default it is set to false.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.disabled = false;\n /**\n * @hidden\n * @internal\n */\n this.selectedChange = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` moving starts.\n * Returns the moving `IgxChipComponent`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.moveStart = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` moving ends.\n * Returns the moved `IgxChipComponent`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.moveEnd = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` is removed.\n * Returns the removed `IgxChipComponent`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.remove = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` is clicked.\n * Returns the clicked `IgxChipComponent`, whether the event should be canceled.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.chipClick = new EventEmitter();\n /**\n * Emits event when the `IgxChipComponent` is selected/deselected.\n * Returns the selected chip reference, whether the event should be canceled, what is the next selection state and\n * when the event is triggered by interaction `originalEvent` is provided, otherwise `originalEvent` is `null`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.selectedChanging = new EventEmitter();\n /**\n * Emits event when the `IgxChipComponent` is selected/deselected and any related animations and transitions also end.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.selectedChanged = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` keyboard navigation is being used.\n * Returns the focused/selected `IgxChipComponent`, whether the event should be canceled,\n * if the `alt`, `shift` or `control` key is pressed and the pressed key name.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.keyDown = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` has entered the `IgxChipsAreaComponent`.\n * Returns the target `IgxChipComponent`, the drag `IgxChipComponent`, as well as\n * the original drop event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.dragEnter = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` has left the `IgxChipsAreaComponent`.\n * Returns the target `IgxChipComponent`, the drag `IgxChipComponent`, as well as\n * the original drop event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.dragLeave = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` is over the `IgxChipsAreaComponent`.\n * Returns the target `IgxChipComponent`, the drag `IgxChipComponent`, as well as\n * the original drop event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.dragOver = new EventEmitter();\n /**\n * Emits an event when the `IgxChipComponent` has been dropped in the `IgxChipsAreaComponent`.\n * Returns the target `IgxChipComponent`, the drag `IgxChipComponent`, as well as\n * the original drop event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.dragDrop = new EventEmitter();\n /**\n * @hidden\n * @internal\n */\n this.hideBaseElement = false;\n /**\n * @hidden\n * @internal\n */\n this.destroy$ = new Subject();\n this._tabIndex = null;\n this._selected = false;\n this._selectedItemClass = 'igx-chip__item--selected';\n this._movedWhileRemoving = false;\n this._resourceStrings = CurrentResourceStrings.ChipResStrings;\n }\n get hostClass() {\n const classes = [this.getComponentDensityClass('igx-chip')];\n // Add the base class first for each density\n if (!classes.includes('igx-chip')) {\n classes.unshift('igx-chip');\n }\n classes.push(this.disabled ? 'igx-chip--disabled' : '');\n return classes.join(' ').toString().trim();\n }\n /**\n * @hidden\n * @internal\n */\n keyEvent(event) {\n this.onChipKeyDown(event);\n }\n /**\n * @hidden\n * @internal\n */\n selectClass(condition) {\n const SELECT_CLASS = 'igx-chip__select';\n return {\n [SELECT_CLASS]: condition,\n [`${SELECT_CLASS}--hidden`]: !condition\n };\n }\n onSelectTransitionDone(event) {\n if (!!event.target.tagName) {\n // Trigger onSelectionDone on when `width` property is changed and the target is valid element(not comment).\n this.selectedChanged.emit({\n owner: this,\n originalEvent: event\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n onChipKeyDown(event) {\n const keyDownArgs = {\n originalEvent: event,\n owner: this,\n cancel: false\n };\n this.keyDown.emit(keyDownArgs);\n if (keyDownArgs.cancel) {\n return;\n }\n if ((event.key === 'Delete' || event.key === 'Del') && this.removable) {\n this.remove.emit({\n originalEvent: event,\n owner: this\n });\n }\n if ((event.key === ' ' || event.key === 'Spacebar') && this.selectable && !this.disabled) {\n this.changeSelection(!this.selected, event);\n }\n if (event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n /**\n * @hidden\n * @internal\n */\n onRemoveBtnKeyDown(event) {\n if (event.key === ' ' || event.key === 'Spacebar' || event.key === 'Enter') {\n this.remove.emit({\n originalEvent: event,\n owner: this\n });\n event.preventDefault();\n event.stopPropagation();\n }\n }\n onRemoveMouseDown(event) {\n event.stopPropagation();\n }\n /**\n * @hidden\n * @internal\n */\n onRemoveClick(event) {\n this.remove.emit({\n originalEvent: event,\n owner: this\n });\n }\n /**\n * @hidden\n * @internal\n */\n onRemoveTouchMove() {\n // We don't remove chip if user starting touch interacting on the remove button moves the chip\n this._movedWhileRemoving = true;\n }\n /**\n * @hidden\n * @internal\n */\n onRemoveTouchEnd(event) {\n if (!this._movedWhileRemoving) {\n this.onRemoveClick(event);\n }\n this._movedWhileRemoving = false;\n }\n /**\n * @hidden\n * @internal\n */\n // -----------------------------\n // Start chip igxDrag behavior\n onChipDragStart(event) {\n this.moveStart.emit({\n originalEvent: event,\n owner: this\n });\n event.cancel = !this.draggable || this.disabled;\n }\n /**\n * @hidden\n * @internal\n */\n onChipDragEnd() {\n if (this.animateOnRelease) {\n this.dragDirective.transitionToOrigin();\n }\n }\n /**\n * @hidden\n * @internal\n */\n onChipMoveEnd(event) {\n // moveEnd is triggered after return animation has finished. This happen when we drag and release the chip.\n this.moveEnd.emit({\n originalEvent: event,\n owner: this\n });\n if (this.selected) {\n this.chipArea.nativeElement.focus();\n }\n }\n /**\n * @hidden\n * @internal\n */\n onChipGhostCreate() {\n this.hideBaseElement = this.hideBaseOnDrag;\n }\n /**\n * @hidden\n * @internal\n */\n onChipGhostDestroy() {\n this.hideBaseElement = false;\n }\n /**\n * @hidden\n * @internal\n */\n onChipDragClicked(event) {\n const clickEventArgs = {\n originalEvent: event,\n owner: this,\n cancel: false\n };\n this.chipClick.emit(clickEventArgs);\n if (!clickEventArgs.cancel && this.selectable && !this.disabled) {\n this.changeSelection(!this.selected, event);\n }\n }\n // End chip igxDrag behavior\n /**\n * @hidden\n * @internal\n */\n // -----------------------------\n // Start chip igxDrop behavior\n onChipDragEnterHandler(event) {\n if (this.dragDirective === event.drag) {\n return;\n }\n const eventArgs = {\n owner: this,\n dragChip: event.drag.data?.chip,\n originalEvent: event\n };\n this.dragEnter.emit(eventArgs);\n }\n /**\n * @hidden\n * @internal\n */\n onChipDragLeaveHandler(event) {\n if (this.dragDirective === event.drag) {\n return;\n }\n const eventArgs = {\n owner: this,\n dragChip: event.drag.data?.chip,\n originalEvent: event\n };\n this.dragLeave.emit(eventArgs);\n }\n /**\n * @hidden\n * @internal\n */\n onChipDrop(event) {\n // Cancel the default drop logic\n event.cancel = true;\n if (this.dragDirective === event.drag) {\n return;\n }\n const eventArgs = {\n owner: this,\n dragChip: event.drag.data?.chip,\n originalEvent: event\n };\n this.dragDrop.emit(eventArgs);\n }\n /**\n * @hidden\n * @internal\n */\n onChipOverHandler(event) {\n if (this.dragDirective === event.drag) {\n return;\n }\n const eventArgs = {\n owner: this,\n dragChip: event.drag.data?.chip,\n originalEvent: event\n };\n this.dragOver.emit(eventArgs);\n }\n // End chip igxDrop behavior\n changeSelection(newValue, srcEvent = null) {\n const onSelectArgs = {\n originalEvent: srcEvent,\n owner: this,\n selected: false,\n cancel: false\n };\n fromEvent(this.selectContainer.nativeElement, 'transitionend')\n .pipe(filter(event => event.propertyName === 'width'), take(1))\n .subscribe(event => this.onSelectTransitionDone(event));\n if (newValue && !this._selected) {\n onSelectArgs.selected = true;\n this.selectedChanging.emit(onSelectArgs);\n if (!onSelectArgs.cancel) {\n this.renderer.addClass(this.chipArea.nativeElement, this._selectedItemClass);\n this._selected = newValue;\n this.selectedChange.emit(this._selected);\n }\n }\n else if (!newValue && this._selected) {\n this.selectedChanging.emit(onSelectArgs);\n if (!onSelectArgs.cancel) {\n this.renderer.removeClass(this.chipArea.nativeElement, this._selectedItemClass);\n this._selected = newValue;\n this.selectedChange.emit(this._selected);\n }\n }\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\nIgxChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxChipComponent, selector: \"igx-chip\", inputs: { id: \"id\", tabIndex: \"tabIndex\", data: \"data\", draggable: \"draggable\", animateOnRelease: \"animateOnRelease\", hideBaseOnDrag: \"hideBaseOnDrag\", removable: \"removable\", removeIcon: \"removeIcon\", selectable: \"selectable\", selectIcon: \"selectIcon\", disabled: \"disabled\", selected: \"selected\", color: \"color\", resourceStrings: \"resourceStrings\" }, outputs: { selectedChange: \"selectedChange\", moveStart: \"moveStart\", moveEnd: \"moveEnd\", remove: \"remove\", chipClick: \"chipClick\", selectedChanging: \"selectedChanging\", selectedChanged: \"selectedChanged\", keyDown: \"keyDown\", dragEnter: \"dragEnter\", dragLeave: \"dragLeave\", dragOver: \"dragOver\", dragDrop: \"dragDrop\" }, host: { listeners: { \"keydown\": \"keyEvent($event)\" }, properties: { \"attr.id\": \"this.id\", \"attr.role\": \"this.role\", \"attr.tabIndex\": \"this.tabIndex\", \"attr.aria-selected\": \"this.selected\", \"class\": \"this.hostClass\" } }, viewQueries: [{ propertyName: \"dragDirective\", first: true, predicate: [\"chipArea\"], descendants: true, read: IgxDragDirective, static: true }, { propertyName: \"chipArea\", first: true, predicate: [\"chipArea\"], descendants: true, read: ElementRef, static: true }, { propertyName: \"selectContainer\", first: true, predicate: [\"selectContainer\"], descendants: true, read: ElementRef, static: true }, { propertyName: \"defaultRemoveIcon\", first: true, predicate: [\"defaultRemoveIcon\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultSelectIcon\", first: true, predicate: [\"defaultSelectIcon\"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n\\n
    \\n \\n
    \\n\\n \\n\\n
    \\n \\n
    \\n\\n \\n\\n
    \\n \\n
    \\n
    \\n\\n\\n done\\n\\n\\n\\n cancel\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxDragDirective, selector: \"[igxDrag]\", inputs: [\"igxDrag\", \"dragTolerance\", \"dragDirection\", \"dragChannel\", \"ghost\", \"ghostClass\", \"ghostTemplate\", \"ghostHost\", \"scrollContainer\", \"ghostOffsetX\", \"ghostOffsetY\"], outputs: [\"dragStart\", \"dragMove\", \"dragEnd\", \"dragClick\", \"ghostCreate\", \"ghostDestroy\", \"transitioned\"], exportAs: [\"drag\"] }, { kind: \"directive\", type: IgxDropDirective, selector: \"[igxDrop]\", inputs: [\"igxDrop\", \"dropChannel\", \"dropStrategy\"], outputs: [\"enter\", \"over\", \"leave\", \"dropped\"], exportAs: [\"drop\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-chip', template: \"
    \\n\\n
    \\n \\n
    \\n\\n \\n\\n
    \\n \\n
    \\n\\n \\n\\n
    \\n \\n
    \\n
    \\n\\n\\n done\\n\\n\\n\\n cancel\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabIndex']\n }, {\n type: Input\n }], data: [{\n type: Input\n }], draggable: [{\n type: Input\n }], animateOnRelease: [{\n type: Input\n }], hideBaseOnDrag: [{\n type: Input\n }], removable: [{\n type: Input\n }], removeIcon: [{\n type: Input\n }], selectable: [{\n type: Input\n }], selectIcon: [{\n type: Input\n }], disabled: [{\n type: Input\n }], selected: [{\n type: HostBinding,\n args: ['attr.aria-selected']\n }, {\n type: Input\n }], selectedChange: [{\n type: Output\n }], color: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], moveStart: [{\n type: Output\n }], moveEnd: [{\n type: Output\n }], remove: [{\n type: Output\n }], chipClick: [{\n type: Output\n }], selectedChanging: [{\n type: Output\n }], selectedChanged: [{\n type: Output\n }], keyDown: [{\n type: Output\n }], dragEnter: [{\n type: Output\n }], dragLeave: [{\n type: Output\n }], dragOver: [{\n type: Output\n }], dragDrop: [{\n type: Output\n }], dragDirective: [{\n type: ViewChild,\n args: ['chipArea', { read: IgxDragDirective, static: true }]\n }], chipArea: [{\n type: ViewChild,\n args: ['chipArea', { read: ElementRef, static: true }]\n }], selectContainer: [{\n type: ViewChild,\n args: ['selectContainer', { read: ElementRef, static: true }]\n }], defaultRemoveIcon: [{\n type: ViewChild,\n args: ['defaultRemoveIcon', { read: TemplateRef, static: true }]\n }], defaultSelectIcon: [{\n type: ViewChild,\n args: ['defaultSelectIcon', { read: TemplateRef, static: true }]\n }], hostClass: [{\n type: HostBinding,\n args: ['class']\n }], keyEvent: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\n/**\n * The chip area allows you to perform more complex scenarios with chips that require interaction,\n * like dragging, selection, navigation, etc.\n *\n * @igxModule IgxChipsModule\n *\n * @igxTheme igx-chip-theme\n *\n * @igxKeywords chip area, chip\n *\n * @igxGroup display\n *\n * @example\n * ```html\n * \n * \n * {{chip.text}}\n * \n * \n * ```\n */\nclass IgxChipsAreaComponent {\n /** @hidden @internal */\n get _widthToRem() {\n return rem(this.width);\n }\n /** @hidden @internal */\n get _heightToRem() {\n return rem(this.height);\n }\n constructor(cdr, element, _iterableDiffers) {\n this.cdr = cdr;\n this.element = element;\n this._iterableDiffers = _iterableDiffers;\n /**\n * Returns the `role` attribute of the chips area.\n *\n * @example\n * ```typescript\n * let chipsAreaRole = this.chipsArea.role;\n * ```\n */\n this.role = 'listbox';\n /**\n * Returns the `aria-label` attribute of the chips area.\n *\n * @example\n * ```typescript\n * let ariaLabel = this.chipsArea.ariaLabel;\n * ```\n *\n */\n this.ariaLabel = 'chip area';\n /**\n * Emits an event when `IgxChipComponent`s in the `IgxChipsAreaComponent` should be reordered.\n * Returns an array of `IgxChipComponent`s.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.reorder = new EventEmitter();\n /**\n * Emits an event when an `IgxChipComponent` in the `IgxChipsAreaComponent` is selected/deselected.\n * Fired after the chips area is initialized if there are initially selected chips as well.\n * Returns an array of selected `IgxChipComponent`s and the `IgxChipAreaComponent`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.selectionChange = new EventEmitter();\n /**\n * Emits an event when an `IgxChipComponent` in the `IgxChipsAreaComponent` is moved.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.moveStart = new EventEmitter();\n /**\n * Emits an event after an `IgxChipComponent` in the `IgxChipsAreaComponent` is moved.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.moveEnd = new EventEmitter();\n this.destroy$ = new Subject();\n this.hostClass = 'igx-chip-area';\n this._differ = null;\n this._differ = this._iterableDiffers.find([]).create(null);\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n // If we have initially selected chips through their inputs, we need to get them, because we cannot listen to their events yet.\n if (this.chipsList.length) {\n const selectedChips = this.chipsList.filter((item) => item.selected);\n if (selectedChips.length) {\n this.selectionChange.emit({\n originalEvent: null,\n newSelection: selectedChips,\n owner: this\n });\n }\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngDoCheck() {\n if (this.chipsList) {\n const changes = this._differ.diff(this.chipsList.toArray());\n if (changes) {\n changes.forEachAddedItem((addedChip) => {\n addedChip.item.moveStart.pipe(takeUntil(addedChip.item.destroy$)).subscribe((args) => {\n this.onChipMoveStart(args);\n });\n addedChip.item.moveEnd.pipe(takeUntil(addedChip.item.destroy$)).subscribe((args) => {\n this.onChipMoveEnd(args);\n });\n addedChip.item.dragEnter.pipe(takeUntil(addedChip.item.destroy$)).subscribe((args) => {\n this.onChipDragEnter(args);\n });\n addedChip.item.keyDown.pipe(takeUntil(addedChip.item.destroy$)).subscribe((args) => {\n this.onChipKeyDown(args);\n });\n if (addedChip.item.selectable) {\n addedChip.item.selectedChanging.pipe(takeUntil(addedChip.item.destroy$)).subscribe((args) => {\n this.onChipSelectionChange(args);\n });\n }\n });\n this.modifiedChipsArray = this.chipsList.toArray();\n }\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden\n * @internal\n */\n onChipKeyDown(event) {\n let orderChanged = false;\n const chipsArray = this.chipsList.toArray();\n const dragChipIndex = chipsArray.findIndex((el) => el === event.owner);\n if (event.originalEvent.shiftKey === true) {\n if (event.originalEvent.key === 'ArrowLeft' || event.originalEvent.key === 'Left') {\n orderChanged = this.positionChipAtIndex(dragChipIndex, dragChipIndex - 1, false, event.originalEvent);\n if (orderChanged) {\n setTimeout(() => {\n this.chipsList.get(dragChipIndex - 1).nativeElement.focus();\n });\n }\n }\n else if (event.originalEvent.key === 'ArrowRight' || event.originalEvent.key === 'Right') {\n orderChanged = this.positionChipAtIndex(dragChipIndex, dragChipIndex + 1, true, event.originalEvent);\n }\n }\n else {\n if ((event.originalEvent.key === 'ArrowLeft' || event.originalEvent.key === 'Left') && dragChipIndex > 0) {\n chipsArray[dragChipIndex - 1].nativeElement.focus();\n }\n else if ((event.originalEvent.key === 'ArrowRight' || event.originalEvent.key === 'Right') &&\n dragChipIndex < chipsArray.length - 1) {\n chipsArray[dragChipIndex + 1].nativeElement.focus();\n }\n }\n }\n /**\n * @hidden\n * @internal\n */\n onChipMoveStart(event) {\n this.moveStart.emit({\n originalEvent: event.originalEvent,\n owner: this\n });\n }\n /**\n * @hidden\n * @internal\n */\n onChipMoveEnd(event) {\n this.moveEnd.emit({\n originalEvent: event.originalEvent,\n owner: this\n });\n }\n /**\n * @hidden\n * @internal\n */\n onChipDragEnter(event) {\n const dropChipIndex = this.chipsList.toArray().findIndex((el) => el === event.owner);\n const dragChipIndex = this.chipsList.toArray().findIndex((el) => el === event.dragChip);\n if (dragChipIndex < dropChipIndex) {\n // from the left to right\n this.positionChipAtIndex(dragChipIndex, dropChipIndex, true, event.originalEvent);\n }\n else {\n // from the right to left\n this.positionChipAtIndex(dragChipIndex, dropChipIndex, false, event.originalEvent);\n }\n }\n /**\n * @hidden\n * @internal\n */\n positionChipAtIndex(chipIndex, targetIndex, shiftRestLeft, originalEvent) {\n if (chipIndex < 0 || this.chipsList.length <= chipIndex ||\n targetIndex < 0 || this.chipsList.length <= targetIndex) {\n return false;\n }\n const chipsArray = this.chipsList.toArray();\n const result = [];\n for (let i = 0; i < chipsArray.length; i++) {\n if (shiftRestLeft) {\n if (chipIndex <= i && i < targetIndex) {\n result.push(chipsArray[i + 1]);\n }\n else if (i === targetIndex) {\n result.push(chipsArray[chipIndex]);\n }\n else {\n result.push(chipsArray[i]);\n }\n }\n else {\n if (targetIndex < i && i <= chipIndex) {\n result.push(chipsArray[i - 1]);\n }\n else if (i === targetIndex) {\n result.push(chipsArray[chipIndex]);\n }\n else {\n result.push(chipsArray[i]);\n }\n }\n }\n this.modifiedChipsArray = result;\n const eventData = {\n chipsArray: this.modifiedChipsArray,\n originalEvent,\n owner: this\n };\n this.reorder.emit(eventData);\n return true;\n }\n /**\n * @hidden\n * @internal\n */\n onChipSelectionChange(event) {\n let selectedChips = this.chipsList.filter((chip) => chip.selected);\n if (event.selected && !selectedChips.includes(event.owner)) {\n selectedChips.push(event.owner);\n }\n else if (!event.selected && selectedChips.includes(event.owner)) {\n selectedChips = selectedChips.filter((chip) => chip.id !== event.owner.id);\n }\n this.selectionChange.emit({\n originalEvent: event.originalEvent,\n newSelection: selectedChips,\n owner: this\n });\n }\n}\nIgxChipsAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipsAreaComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });\nIgxChipsAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxChipsAreaComponent, selector: \"igx-chips-area\", inputs: { width: \"width\", height: \"height\" }, outputs: { reorder: \"reorder\", selectionChange: \"selectionChange\", moveStart: \"moveStart\", moveEnd: \"moveEnd\" }, host: { properties: { \"attr.role\": \"this.role\", \"attr.aria-label\": \"this.ariaLabel\", \"style.width.rem\": \"this._widthToRem\", \"style.height.rem\": \"this._heightToRem\", \"class\": \"this.hostClass\" } }, queries: [{ propertyName: \"chipsList\", predicate: IgxChipComponent, descendants: true }], ngImport: i0, template: \"\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipsAreaComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-chips-area', template: \"\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.IterableDiffers }]; }, propDecorators: { role: [{\n type: HostBinding,\n args: ['attr.role']\n }], ariaLabel: [{\n type: HostBinding,\n args: ['attr.aria-label']\n }], width: [{\n type: Input\n }], _widthToRem: [{\n type: HostBinding,\n args: ['style.width.rem']\n }], height: [{\n type: Input\n }], _heightToRem: [{\n type: HostBinding,\n args: ['style.height.rem']\n }], reorder: [{\n type: Output\n }], selectionChange: [{\n type: Output\n }], moveStart: [{\n type: Output\n }], moveEnd: [{\n type: Output\n }], chipsList: [{\n type: ContentChildren,\n args: [IgxChipComponent, { descendants: true }]\n }], hostClass: [{\n type: HostBinding,\n args: ['class']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxChipsModule {\n}\nIgxChipsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxChipsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipsModule, declarations: [IgxChipsAreaComponent,\n IgxChipComponent], imports: [CommonModule,\n IgxRippleModule,\n IgxIconModule,\n IgxButtonModule,\n IgxAvatarModule,\n IgxDragDropModule,\n IgxPrefixModule,\n IgxSuffixModule], exports: [IgxChipsAreaComponent,\n IgxChipComponent,\n IgxPrefixDirective,\n IgxSuffixDirective] });\nIgxChipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipsModule, imports: [CommonModule,\n IgxRippleModule,\n IgxIconModule,\n IgxButtonModule,\n IgxAvatarModule,\n IgxDragDropModule,\n IgxPrefixModule,\n IgxSuffixModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChipsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxChipsAreaComponent,\n IgxChipComponent\n ],\n exports: [\n IgxChipsAreaComponent,\n IgxChipComponent,\n IgxPrefixDirective,\n IgxSuffixDirective\n ],\n imports: [\n CommonModule,\n IgxRippleModule,\n IgxIconModule,\n IgxButtonModule,\n IgxAvatarModule,\n IgxDragDropModule,\n IgxPrefixModule,\n IgxSuffixModule\n ]\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxComboAPIService {\n constructor() {\n this.disableTransitions = false;\n }\n get valueKey() {\n return this.combo.valueKey !== null && this.combo.valueKey !== undefined ? this.combo.valueKey : null;\n }\n get item_focusable() {\n return false;\n }\n get isRemote() {\n return this.combo.isRemote;\n }\n get comboID() {\n return this.combo.id;\n }\n register(combo) {\n this.combo = combo;\n }\n clear() {\n this.combo = null;\n }\n add_custom_item() {\n if (!this.combo) {\n return;\n }\n this.combo.addItemToCollection();\n }\n set_selected_item(itemID, event) {\n const selected = this.combo.isItemSelected(itemID);\n if (itemID === undefined) {\n return;\n }\n if (!selected) {\n this.combo.select([itemID], false, event);\n }\n else {\n this.combo.deselect([itemID], event);\n }\n }\n is_item_selected(itemID) {\n return this.combo.isItemSelected(itemID);\n }\n}\nIgxComboAPIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAPIService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxComboAPIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAPIService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAPIService, decorators: [{\n type: Injectable\n }] });\n\n/** @hidden */\nclass IgxComboItemComponent extends IgxDropDownItemComponent {\n /** @hidden @internal */\n get _itemHeightToRem() {\n return rem(this.itemHeight);\n }\n get ariaLabel() {\n const valueKey = this.comboAPI.valueKey;\n return (valueKey !== null && this.value != null) ? this.value[valueKey] : this.value;\n }\n /**\n * @hidden\n */\n get itemID() {\n const valueKey = this.comboAPI.valueKey;\n return valueKey !== null ? this.value[valueKey] : this.value;\n }\n /**\n * @hidden\n */\n get comboID() {\n return this.comboAPI.comboID;\n }\n /**\n * @hidden\n * @internal\n */\n get disableTransitions() {\n return this.comboAPI.disableTransitions;\n }\n constructor(comboAPI, dropDown, elementRef, selection) {\n super(dropDown, elementRef, null, selection);\n this.comboAPI = comboAPI;\n /**\n * Gets the height of a list item\n *\n * @hidden\n */\n this.itemHeight = '';\n }\n /**\n * @hidden\n */\n get selected() {\n return this.comboAPI.is_item_selected(this.itemID);\n }\n set selected(value) {\n if (this.isHeader) {\n return;\n }\n this._selected = value;\n }\n /**\n * @hidden\n */\n isVisible(direction) {\n const rect = this.element.nativeElement.getBoundingClientRect();\n const parentDiv = this.element.nativeElement.parentElement.parentElement.getBoundingClientRect();\n if (direction === Navigate.Down) {\n return rect.y + rect.height <= parentDiv.y + parentDiv.height;\n }\n return rect.y >= parentDiv.y;\n }\n clicked(event) {\n this.comboAPI.disableTransitions = false;\n if (!this.isSelectable) {\n return;\n }\n this.dropDown.navigateItem(this.index);\n this.comboAPI.set_selected_item(this.itemID, event);\n }\n /**\n * @hidden\n * @internal\n * The event that is prevented is the click on the checkbox label element.\n * That is the only visible element that a user can interact with.\n * The click propagates to the host and the preventDefault is to stop it from\n * switching focus to the input it's base on.\n * The toggle happens in an internal handler in the drop-down on the next task queue cycle.\n */\n disableCheck(event) {\n event.preventDefault();\n }\n}\nIgxComboItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboItemComponent, deps: [{ token: IgxComboAPIService }, { token: IGX_DROPDOWN_BASE }, { token: i0.ElementRef }, { token: IgxSelectionAPIService }], target: i0.ɵɵFactoryTarget.Component });\nIgxComboItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboItemComponent, selector: \"igx-combo-item\", inputs: { itemHeight: \"itemHeight\", ariaLabel: \"ariaLabel\", singleMode: \"singleMode\" }, host: { properties: { \"style.height.rem\": \"this._itemHeightToRem\", \"attr.aria-label\": \"this.ariaLabel\" } }, usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboItemComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-combo-item', template: \"\\n \\n \\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: IgxComboAPIService }, { type: undefined, decorators: [{\n type: Inject,\n args: [IGX_DROPDOWN_BASE]\n }] }, { type: i0.ElementRef }, { type: IgxSelectionAPIService, decorators: [{\n type: Inject,\n args: [IgxSelectionAPIService]\n }] }]; }, propDecorators: { itemHeight: [{\n type: Input\n }], _itemHeightToRem: [{\n type: HostBinding,\n args: ['style.height.rem']\n }], ariaLabel: [{\n type: HostBinding,\n args: ['attr.aria-label']\n }, {\n type: Input\n }], singleMode: [{\n type: Input\n }] } });\n\n/**\n * @hidden\n */\nclass IgxComboAddItemComponent extends IgxComboItemComponent {\n get selected() {\n return false;\n }\n set selected(value) {\n }\n clicked(event) {\n this.comboAPI.disableTransitions = false;\n this.comboAPI.add_custom_item();\n }\n}\nIgxComboAddItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAddItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxComboAddItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboAddItemComponent, selector: \"igx-combo-add-item\", providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAddItemComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-combo-add-item',\n template: '',\n providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent }]\n }]\n }] });\n\n/**\n * Allows a custom element to be added at the beginning of the combo list.\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n *
    Custom header
    \n * \n *
    \n *
    \n */\nclass IgxComboHeaderDirective {\n}\nIgxComboHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboHeaderDirective, selector: \"[igxComboHeader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboHeaderDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboHeader]' }]\n }] });\n/**\n * Allows a custom element to be added at the end of the combo list.\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n *
    Custom footer
    \n * \n *
    \n *
    \n */\nclass IgxComboFooterDirective {\n}\nIgxComboFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboFooterDirective, selector: \"[igxComboFooter]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboFooterDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboFooter]' }]\n }] });\n/**\n * Allows the combo's items to be modified with a custom template\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n *\t\n *\t\t
    \n *\t\t\tState: {{ display[key] }}\n *\t \t\tRegion: {{ display.region }}\n *\t \t
    \n *\t
    \n *
    \n */\nclass IgxComboItemDirective {\n}\nIgxComboItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboItemDirective, selector: \"[igxComboItem]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboItemDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboItem]' }]\n }] });\n/**\n * Defines the custom template that will be displayed when the combo's list is empty\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n *
    \n * There are no items to display\n *
    \n *
    \n *
    \n */\nclass IgxComboEmptyDirective {\n}\nIgxComboEmptyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboEmptyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboEmptyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboEmptyDirective, selector: \"[igxComboEmpty]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboEmptyDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboEmpty]' }]\n }] });\n/**\n * Defines the custom template that will be used when rendering header items for groups in the combo's list\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n *
    Group header for {{ item[key] }}
    \n *
    \n *
    \n */\nclass IgxComboHeaderItemDirective {\n}\nIgxComboHeaderItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboHeaderItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboHeaderItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboHeaderItemDirective, selector: \"[igxComboHeaderItem]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboHeaderItemDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboHeaderItem]' }]\n }] });\n/**\n * Defines the custom template that will be used to display the `ADD` button\n *\n * @remarks To show the `ADD` button, the `allowCustomValues` option must be enabled\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n * \n * \n * \n */\nclass IgxComboAddItemDirective {\n}\nIgxComboAddItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAddItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboAddItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboAddItemDirective, selector: \"[igxComboAddItem]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboAddItemDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboAddItem]' }]\n }] });\n/**\n * The custom template that will be used when rendering the combo's toggle button\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n * {{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}\n * \n * \n */\nclass IgxComboToggleIconDirective {\n}\nIgxComboToggleIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboToggleIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboToggleIconDirective, selector: \"[igxComboToggleIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboToggleIconDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboToggleIcon]' }]\n }] });\n/**\n * Defines the custom template that will be used when rendering the combo's clear icon\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @example\n * \n * \n * clear\n * \n * \n */\nclass IgxComboClearIconDirective {\n}\nIgxComboClearIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboClearIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboClearIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboClearIconDirective, selector: \"[igxComboClearIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboClearIconDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxComboClearIcon]' }]\n }] });\n\nconst IGX_COMBO_COMPONENT = new InjectionToken('IgxComboComponentToken');\nlet NEXT_ID$e = 0;\n/**\n * @hidden\n * The default number of items that should be in the combo's\n * drop-down list if no `[itemsMaxHeight]` is specified\n */\nconst itemsInContainer = 10; // TODO: make private readonly\n/** @hidden @internal */\nconst ItemHeights = {\n comfortable: 40,\n cosy: 32,\n compact: 28,\n};\n/** @hidden @internal */\nvar DataTypes;\n(function (DataTypes) {\n DataTypes[\"EMPTY\"] = \"empty\";\n DataTypes[\"PRIMITIVE\"] = \"primitive\";\n DataTypes[\"COMPLEX\"] = \"complex\";\n DataTypes[\"PRIMARYKEY\"] = \"valueKey\";\n})(DataTypes || (DataTypes = {}));\nvar IgxComboState;\n(function (IgxComboState) {\n /**\n * Combo with initial state.\n */\n IgxComboState[IgxComboState[\"INITIAL\"] = 0] = \"INITIAL\";\n /**\n * Combo with valid state.\n */\n IgxComboState[IgxComboState[\"VALID\"] = 1] = \"VALID\";\n /**\n * Combo with invalid state.\n */\n IgxComboState[IgxComboState[\"INVALID\"] = 2] = \"INVALID\";\n})(IgxComboState || (IgxComboState = {}));\nclass IgxComboBaseDirective extends DisplayDensityBase {\n /**\n * Configures the drop down list height\n *\n * ```typescript\n * // get\n * let myComboItemsMaxHeight = this.combo.itemsMaxHeight;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n get itemsMaxHeight() {\n if (this._itemsMaxHeight === null || this._itemsMaxHeight === undefined) {\n return this.itemHeight * itemsInContainer;\n }\n return this._itemsMaxHeight;\n }\n set itemsMaxHeight(val) {\n this._itemsMaxHeight = val;\n }\n /** @hidden */\n get itemsMaxHeightInRem() {\n return rem(this.itemsMaxHeight);\n }\n /**\n * Configures the drop down list item height\n *\n * ```typescript\n * // get\n * let myComboItemHeight = this.combo.itemHeight;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n get itemHeight() {\n if (this._itemHeight === null || this._itemHeight === undefined) {\n return ItemHeights[this.displayDensity];\n }\n return this._itemHeight;\n }\n set itemHeight(val) {\n this._itemHeight = val;\n }\n /**\n * Combo data source.\n *\n * ```html\n * \n * \n * ```\n */\n get data() {\n return this._data;\n }\n set data(val) {\n // igxFor directive ignores undefined values\n // if the combo uses simple data and filtering is applied\n // an error will occur due to the mismatch of the length of the data\n // this can occur during filtering for the igx-combo and\n // during filtering & selection for the igx-simple-combo\n // since the simple combo's input is both a container for the selection and a filter\n this._data = (val) ? val.filter(x => x !== undefined) : [];\n }\n set displayKey(val) {\n this._displayKey = val;\n }\n /**\n * Determines which column in the data source is used to determine the display value.\n *\n * ```typescript\n * // get\n * let myComboDisplayKey = this.combo.displayKey;\n *\n * // set\n * this.combo.displayKey = 'val';\n *\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n get displayKey() {\n return this._displayKey ? this._displayKey : this.valueKey;\n }\n /**\n * The item property by which items should be grouped inside the items list. Not usable if data is not of type Object[].\n *\n * ```html\n * \n * \n * ```\n */\n set groupKey(val) {\n this._groupKey = val;\n }\n /**\n * The item property by which items should be grouped inside the items list. Not usable if data is not of type Object[].\n *\n * ```typescript\n * // get\n * let currentGroupKey = this.combo.groupKey;\n * ```\n */\n get groupKey() {\n return this._groupKey;\n }\n /**\n * An @Input property that sets groups sorting order.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * public groupSortingDirection = SortingDirection.Asc;\n * ```\n */\n get groupSortingDirection() {\n return this._groupSortingDirection;\n }\n set groupSortingDirection(val) {\n this._groupSortingDirection = val;\n }\n /**\n * An @Input property that sets how the combo will be styled.\n * The allowed values are `line`, `box`, `border` and `search`. The default is `box`.\n * ```html\n * \n * ```\n */\n get type() {\n return this._type || this._inputGroupType || 'box';\n }\n set type(val) {\n this._type = val;\n }\n /**\n * Gets/Sets the resource strings.\n *\n * @remarks\n * By default it uses EN resources.\n */\n get resourceStrings() {\n if (!this._resourceStrings) {\n this._resourceStrings = CurrentResourceStrings.ComboResStrings;\n }\n return this._resourceStrings;\n }\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /** @hidden @internal */\n get searchValue() {\n return this._searchValue;\n }\n set searchValue(val) {\n this.filterValue = val;\n this._searchValue = val;\n }\n /** @hidden @internal */\n get isRemote() {\n return this.totalItemCount > 0 &&\n this.valueKey &&\n this.dataType === DataTypes.COMPLEX;\n }\n /** @hidden @internal */\n get dataType() {\n if (this.displayKey) {\n return DataTypes.COMPLEX;\n }\n return DataTypes.PRIMITIVE;\n }\n /**\n * Gets if control is valid, when used in a form\n *\n * ```typescript\n * // get\n * let valid = this.combo.valid;\n * ```\n */\n get valid() {\n return this._valid;\n }\n /**\n * Sets if control is valid, when used in a form\n *\n * ```typescript\n * // set\n * this.combo.valid = IgxComboState.INVALID;\n * ```\n */\n set valid(valid) {\n this._valid = valid;\n this.comboInput.valid = IgxInputState[IgxComboState[valid]];\n }\n /**\n * The text displayed in the combo input\n *\n * ```typescript\n * // get\n * let comboValue = this.combo.value;\n * ```\n */\n get value() {\n return this._value;\n }\n /**\n * Defines the current state of the virtualized data. It contains `startIndex` and `chunkSize`\n *\n * ```typescript\n * // get\n * let state = this.combo.virtualizationState;\n * ```\n */\n get virtualizationState() {\n return this.virtDir.state;\n }\n /**\n * Sets the current state of the virtualized data.\n *\n * ```typescript\n * // set\n * this.combo.virtualizationState(state);\n * ```\n */\n set virtualizationState(state) {\n this.virtDir.state = state;\n }\n /**\n * Gets drop down state.\n *\n * ```typescript\n * let state = this.combo.collapsed;\n * ```\n */\n get collapsed() {\n return this.dropdown.collapsed;\n }\n /**\n * Gets total count of the virtual data items, when using remote service.\n *\n * ```typescript\n * // get\n * let count = this.combo.totalItemCount;\n * ```\n */\n get totalItemCount() {\n return this.virtDir.totalItemCount;\n }\n /**\n * Sets total count of the virtual data items, when using remote service.\n *\n * ```typescript\n * // set\n * this.combo.totalItemCount(remoteService.count);\n * ```\n */\n set totalItemCount(count) {\n this.virtDir.totalItemCount = count;\n }\n /** @hidden @internal */\n get template() {\n this._dataType = this.dataType;\n if (this.itemTemplate) {\n return this.itemTemplate;\n }\n if (this._dataType === DataTypes.COMPLEX) {\n return this.complexTemplate;\n }\n return this.primitiveTemplate;\n }\n /**\n * Configures the way combo items will be filtered.\n *\n * ```typescript\n * // get\n * let myFilteringOptions = this.combo.filteringOptions;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n get filteringOptions() {\n return this._filteringOptions || this._defaultFilteringOptions;\n }\n set filteringOptions(value) {\n this._filteringOptions = value;\n }\n constructor(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {\n super(_displayDensityOptions);\n this.elementRef = elementRef;\n this.cdr = cdr;\n this.selectionService = selectionService;\n this.comboAPI = comboAPI;\n this._iconService = _iconService;\n this._displayDensityOptions = _displayDensityOptions;\n this._inputGroupType = _inputGroupType;\n this._injector = _injector;\n /**\n * Defines whether the caseSensitive icon should be shown in the search input\n *\n * ```typescript\n * // get\n * let myComboShowSearchCaseIcon = this.combo.showSearchCaseIcon;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.showSearchCaseIcon = false;\n /**\n * Set custom overlay settings that control how the combo's list of items is displayed.\n * Set:\n * ```html\n * \n * ```\n *\n * ```typescript\n * const customSettings = { positionStrategy: { settings: { target: myTarget } } };\n * combo.overlaySettings = customSettings;\n * ```\n * Get any custom overlay settings used by the combo:\n * ```typescript\n * const comboOverlaySettings: OverlaySettings = myCombo.overlaySettings;\n * ```\n */\n this.overlaySettings = null;\n /**\n * Gets/gets combo id.\n *\n * ```typescript\n * // get\n * let id = this.combo.id;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.id = `igx-combo-${NEXT_ID$e++}`;\n /**\n * Controls whether custom values can be added to the collection\n *\n * ```typescript\n * // get\n * let comboAllowsCustomValues = this.combo.allowCustomValues;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.allowCustomValues = false;\n /**\n * Determines which column in the data source is used to determine the value.\n *\n * ```typescript\n * // get\n * let myComboValueKey = this.combo.valueKey;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.valueKey = null;\n /** @hidden @internal */\n this.cssClass = 'igx-combo'; // Independent of display density for the time being\n /**\n * An @Input property that enabled/disables combo. The default is `false`.\n * ```html\n * \n * ```\n */\n this.disabled = false;\n /**\n * Emitted before the dropdown is opened\n *\n * ```html\n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Emitted after the dropdown is opened\n *\n * ```html\n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Emitted before the dropdown is closed\n *\n * ```html\n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Emitted after the dropdown is closed\n *\n * ```html\n * \n * ```\n */\n this.closed = new EventEmitter();\n /**\n * Emitted when an item is being added to the data collection\n *\n * ```html\n * \n * ```\n */\n this.addition = new EventEmitter();\n /**\n * Emitted when the value of the search input changes (e.g. typing, pasting, clear, etc.)\n *\n * ```html\n * \n * ```\n */\n this.searchInputUpdate = new EventEmitter();\n /**\n * Emitted when new chunk of data is loaded from the virtualization\n *\n * ```html\n * \n * ```\n */\n this.dataPreLoad = new EventEmitter();\n /**\n * The custom template, if any, that should be used when rendering ITEMS in the combo list\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.itemTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    \n *
    {{ item[key] }}
    \n *
    {{ item.cost }}
    \n *
    \n *
    \n *
    \n * ```\n */\n this.itemTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the HEADER for the combo items list\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.headerTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    \n * This is a custom header\n *
    \n *
    \n *
    \n * ```\n */\n this.headerTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the FOOTER for the combo items list\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.footerTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    \n * This is a custom footer\n *
    \n *
    \n *
    \n * ```\n */\n this.footerTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering HEADER ITEMS for groups in the combo list\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.headerItemTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    Group header for {{ item[key] }}
    \n *
    \n *
    \n * ```\n */\n this.headerItemTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.addItemTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * \n * \n * \n * ```\n */\n this.addItemTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the ADD BUTTON in the combo drop down\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.emptyTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    \n * There are no items to display\n *
    \n *
    \n *
    \n * ```\n */\n this.emptyTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the combo TOGGLE(open/close) button\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.toggleIconTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * {{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}\n * \n * \n * ```\n */\n this.toggleIconTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the combo CLEAR button\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.combo.clearIconTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * clear\n * \n * \n * ```\n */\n this.clearIconTemplate = null;\n /** @hidden @internal */\n this.searchInput = null;\n this.dropdownContainer = null;\n /** @hidden @internal */\n this.customValueFlag = true;\n /** @hidden @internal */\n this.filterValue = '';\n /** @hidden @internal */\n this.defaultFallbackGroup = 'Other';\n /** @hidden @internal */\n this.activeDescendant = '';\n this._data = [];\n this._value = '';\n this._groupKey = '';\n this._searchValue = '';\n this._filteredData = [];\n this._remoteSelection = {};\n this._valid = IgxComboState.INITIAL;\n this.ngControl = null;\n this.destroy$ = new Subject();\n this._onTouchedCallback = noop;\n this._onChangeCallback = noop;\n this._type = null;\n this._dataType = '';\n this._itemHeight = null;\n this._itemsMaxHeight = null;\n this._groupSortingDirection = SortingDirection.Asc;\n this._defaultFilteringOptions = { caseSensitive: false, filterable: true };\n this.onStatusChanged = () => {\n if ((this.ngControl.control.touched || this.ngControl.control.dirty) &&\n (this.ngControl.control.validator || this.ngControl.control.asyncValidator)) {\n if (!this.collapsed || this.inputGroup.isFocused) {\n this.valid = this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.VALID;\n }\n else {\n this.valid = this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.INITIAL;\n }\n }\n else {\n // B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526\n this.valid = IgxComboState.INITIAL;\n }\n this.manageRequiredAsterisk();\n };\n this.findMatch = (element) => {\n const value = this.displayKey ? element[this.displayKey] : element;\n const searchValue = this.searchValue || this.comboInput?.value;\n return value?.toString().trim().toLowerCase() === searchValue.trim().toLowerCase();\n };\n }\n ngAfterViewChecked() {\n const targetElement = this.inputGroup.element.nativeElement.querySelector('.igx-input-group__bundle');\n this._overlaySettings = {\n target: targetElement,\n scrollStrategy: new AbsoluteScrollStrategy(),\n positionStrategy: new AutoPositionStrategy(),\n modal: false,\n closeOnOutsideClick: true,\n excludeFromOutsideClick: [targetElement]\n };\n }\n /** @hidden @internal */\n ngAfterContentChecked() {\n if (this.inputGroup && this.prefixes?.length > 0) {\n this.inputGroup.prefixes = this.prefixes;\n }\n if (this.inputGroup && this.suffixes?.length > 0) {\n this.inputGroup.suffixes = this.suffixes;\n }\n }\n /** @hidden @internal */\n ngOnInit() {\n super.ngOnInit();\n this.ngControl = this._injector.get(NgControl, null);\n this.selectionService.set(this.id, new Set());\n this._iconService.addSvgIconFromText(caseSensitive.name, caseSensitive.value, 'imx-icons');\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.filteredData = [...this.data];\n if (this.ngControl) {\n this.ngControl.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(this.onStatusChanged);\n this.manageRequiredAsterisk();\n this.cdr.detectChanges();\n }\n this.virtDir.chunkPreload.pipe(takeUntil(this.destroy$)).subscribe((e) => {\n const eventArgs = Object.assign({}, e, { owner: this });\n this.dataPreLoad.emit(eventArgs);\n });\n }\n /** @hidden @internal */\n ngDoCheck() {\n if (this.data?.length && this.selection.length && !this._value) {\n this._value = this.createDisplayText(this.selection, []);\n }\n super.ngDoCheck();\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n this.comboAPI.clear();\n this.selectionService.clear(this.id);\n }\n /**\n * A method that opens/closes the combo.\n *\n * ```html\n * \n * \n * ```\n */\n toggle() {\n if (this.collapsed && this._value.length !== 0) {\n this.filterValue = '';\n this.cdr.detectChanges();\n }\n const overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);\n this.dropdown.toggle(overlaySettings);\n if (!this.collapsed) {\n this.setActiveDescendant();\n }\n }\n /**\n * A method that opens the combo.\n *\n * ```html\n * \n * \n * ```\n */\n open() {\n if (this.collapsed && this._value.length !== 0) {\n this.filterValue = '';\n this.cdr.detectChanges();\n }\n const overlaySettings = Object.assign({}, this._overlaySettings, this.overlaySettings);\n this.dropdown.open(overlaySettings);\n this.setActiveDescendant();\n }\n /**\n * A method that closes the combo.\n *\n * ```html\n * \n * \n * ```\n */\n close() {\n this.dropdown.close();\n }\n /**\n * Triggers change detection on the combo view\n */\n triggerCheck() {\n this.cdr.detectChanges();\n }\n /**\n * Get current selection state\n *\n * @returns Array of selected items\n * ```typescript\n * let mySelection = this.combo.selection;\n * ```\n */\n get selection() {\n const items = Array.from(this.selectionService.get(this.id));\n return items;\n }\n /**\n * Returns if the specified itemID is selected\n *\n * @hidden\n * @internal\n */\n isItemSelected(item) {\n return this.selectionService.is_item_selected(this.id, item);\n }\n /** @hidden @internal */\n get toggleIcon() {\n if (this.inputGroup.theme === 'material') {\n return this.dropdown.collapsed\n ? 'expand_more'\n : 'expand_less';\n }\n return this.dropdown.collapsed\n ? 'arrow_drop_down'\n : 'arrow_drop_up';\n }\n /** @hidden @internal */\n get clearIcon() {\n return this.inputGroup.theme === 'material'\n ? 'cancel'\n : 'clear';\n }\n /** @hidden @internal */\n addItemToCollection() {\n if (!this.searchValue) {\n return;\n }\n const addedItem = this.displayKey ? {\n [this.valueKey]: this.searchValue,\n [this.displayKey]: this.searchValue\n } : this.searchValue;\n if (this.groupKey) {\n Object.assign(addedItem, { [this.groupKey]: this.defaultFallbackGroup });\n }\n // expose shallow copy instead of this.data in event args so this.data can't be mutated\n const oldCollection = [...this.data];\n const newCollection = [...this.data, addedItem];\n const args = {\n oldCollection, addedItem, newCollection, owner: this, cancel: false\n };\n this.addition.emit(args);\n if (args.cancel) {\n return;\n }\n this.data.push(args.addedItem);\n // trigger re-render\n this.data = cloneArray(this.data);\n this.select(this.valueKey !== null && this.valueKey !== undefined ?\n [args.addedItem[this.valueKey]] : [args.addedItem], false);\n this.customValueFlag = false;\n this.searchInput?.nativeElement.focus();\n this.dropdown.focusedItem = null;\n this.virtDir.scrollTo(0);\n }\n /** @hidden @internal */\n isAddButtonVisible() {\n // This should always return a boolean value. If this.searchValue was '', it returns '' instead of false;\n return this.searchValue !== '' && this.customValueFlag;\n }\n /** @hidden @internal */\n handleInputChange(event) {\n if (event !== undefined) {\n const args = {\n searchText: typeof event === 'string' ? event : event.target.value,\n owner: this,\n cancel: false\n };\n this.searchInputUpdate.emit(args);\n if (args.cancel) {\n this.filterValue = null;\n }\n }\n this.checkMatch();\n }\n /**\n * Event handlers\n *\n * @hidden\n * @internal\n */\n handleOpening(e) {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.opening.emit(args);\n e.cancel = args.cancel;\n }\n /** @hidden @internal */\n handleClosing(e) {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.closing.emit(args);\n e.cancel = args.cancel;\n if (e.cancel) {\n return;\n }\n this.searchValue = '';\n if (!e.event) {\n this.comboInput?.nativeElement.focus();\n }\n }\n /** @hidden @internal */\n handleClosed() {\n this.closed.emit({ owner: this });\n }\n /** @hidden @internal */\n handleKeyDown(event) {\n if (event.key === 'ArrowUp' || event.key === 'Up') {\n event.preventDefault();\n event.stopPropagation();\n this.close();\n }\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /** @hidden @internal */\n onClick(event) {\n event.stopPropagation();\n event.preventDefault();\n if (!this.disabled) {\n this.toggle();\n }\n }\n /** @hidden @internal */\n onBlur() {\n if (this.collapsed) {\n this._onTouchedCallback();\n if (this.ngControl && this.ngControl.invalid) {\n this.valid = IgxComboState.INVALID;\n }\n else {\n this.valid = IgxComboState.INITIAL;\n }\n }\n }\n /** @hidden @internal */\n setActiveDescendant() {\n this.activeDescendant = this.dropdown.focusedItem?.id || '';\n }\n /** @hidden @internal */\n toggleCaseSensitive() {\n this.filteringOptions = Object.assign({}, this.filteringOptions, { caseSensitive: !this.filteringOptions.caseSensitive });\n }\n /** if there is a valueKey - map the keys to data items, else - just return the keys */\n convertKeysToItems(keys) {\n if (this.comboAPI.valueKey === null) {\n return keys;\n }\n // map keys vs. filter data to retain the order of the selected items\n return keys.map(key => isNaNvalue(key)\n ? this.data.find(entry => isNaNvalue(entry[this.valueKey]))\n : this.data.find(entry => entry[this.valueKey] === key))\n .filter(e => e !== undefined);\n }\n checkMatch() {\n const itemMatch = this.filteredData.some(this.findMatch);\n this.customValueFlag = this.allowCustomValues && !itemMatch;\n }\n manageRequiredAsterisk() {\n if (this.ngControl) {\n if (this.ngControl.control.validator) {\n // Run the validation with empty object to check if required is enabled.\n const error = this.ngControl.control.validator({});\n this.inputGroup.isRequired = error && error.required;\n }\n else {\n // P.M. 18 May 2022: IgxCombo's asterisk not removed when removing required validator dynamically in reactive form #11543\n this.inputGroup.isRequired = false;\n }\n }\n }\n /** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */\n registerRemoteEntries(ids, add = true) {\n if (add) {\n const selection = this.getValueDisplayPairs(ids);\n for (const entry of selection) {\n this._remoteSelection[entry[this.valueKey]] = entry[this.displayKey];\n }\n }\n else {\n for (const entry of ids) {\n delete this._remoteSelection[entry];\n }\n }\n }\n /**\n * For `id: any[]` returns a mapped `{ [combo.valueKey]: any, [combo.displayKey]: any }[]`\n */\n getValueDisplayPairs(ids) {\n return this.data.filter(entry => ids.indexOf(entry[this.valueKey]) > -1).map(e => ({\n [this.valueKey]: e[this.valueKey],\n [this.displayKey]: e[this.displayKey]\n }));\n }\n getRemoteSelection(newSelection, oldSelection) {\n if (!newSelection.length) {\n // If new selection is empty, clear all items\n this.registerRemoteEntries(oldSelection, false);\n return '';\n }\n const removedItems = oldSelection.filter(e => newSelection.indexOf(e) < 0);\n const addedItems = newSelection.filter(e => oldSelection.indexOf(e) < 0);\n this.registerRemoteEntries(addedItems);\n this.registerRemoteEntries(removedItems, false);\n return Object.keys(this._remoteSelection).map(e => this._remoteSelection[e]).join(', ');\n }\n get required() {\n if (this.ngControl && this.ngControl.control && this.ngControl.control.validator) {\n // Run the validation with empty object to check if required is enabled.\n const error = this.ngControl.control.validator({});\n return error && error.required;\n }\n return false;\n }\n}\nIgxComboBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxSelectionAPIService }, { token: IgxComboAPIService }, { token: IgxIconService }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }, { token: i0.Injector, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxComboBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboBaseDirective, inputs: { showSearchCaseIcon: \"showSearchCaseIcon\", overlaySettings: \"overlaySettings\", id: \"id\", width: \"width\", allowCustomValues: \"allowCustomValues\", itemsMaxHeight: \"itemsMaxHeight\", itemHeight: \"itemHeight\", itemsWidth: \"itemsWidth\", placeholder: \"placeholder\", data: \"data\", valueKey: \"valueKey\", displayKey: \"displayKey\", groupKey: \"groupKey\", groupSortingDirection: \"groupSortingDirection\", filterFunction: \"filterFunction\", ariaLabelledBy: \"ariaLabelledBy\", disabled: \"disabled\", type: \"type\", resourceStrings: \"resourceStrings\", filteringOptions: \"filteringOptions\" }, outputs: { opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\", addition: \"addition\", searchInputUpdate: \"searchInputUpdate\", dataPreLoad: \"dataPreLoad\" }, host: { properties: { \"attr.id\": \"this.id\", \"style.width\": \"this.width\", \"class.igx-combo\": \"this.cssClass\" } }, queries: [{ propertyName: \"itemTemplate\", first: true, predicate: IgxComboItemDirective, descendants: true, read: TemplateRef }, { propertyName: \"headerTemplate\", first: true, predicate: IgxComboHeaderDirective, descendants: true, read: TemplateRef }, { propertyName: \"footerTemplate\", first: true, predicate: IgxComboFooterDirective, descendants: true, read: TemplateRef }, { propertyName: \"headerItemTemplate\", first: true, predicate: IgxComboHeaderItemDirective, descendants: true, read: TemplateRef }, { propertyName: \"addItemTemplate\", first: true, predicate: IgxComboAddItemDirective, descendants: true, read: TemplateRef }, { propertyName: \"emptyTemplate\", first: true, predicate: IgxComboEmptyDirective, descendants: true, read: TemplateRef }, { propertyName: \"toggleIconTemplate\", first: true, predicate: IgxComboToggleIconDirective, descendants: true, read: TemplateRef }, { propertyName: \"clearIconTemplate\", first: true, predicate: IgxComboClearIconDirective, descendants: true, read: TemplateRef }, { propertyName: \"label\", first: true, predicate: i0.forwardRef(function () { return IgxLabelDirective; }), descendants: true, static: true }, { propertyName: \"prefixes\", predicate: IgxPrefixDirective, descendants: true }, { propertyName: \"suffixes\", predicate: IgxSuffixDirective, descendants: true }], viewQueries: [{ propertyName: \"inputGroup\", first: true, predicate: [\"inputGroup\"], descendants: true, read: IgxInputGroupComponent, static: true }, { propertyName: \"comboInput\", first: true, predicate: [\"comboInput\"], descendants: true, read: IgxInputDirective, static: true }, { propertyName: \"searchInput\", first: true, predicate: [\"searchInput\"], descendants: true }, { propertyName: \"virtualScrollContainer\", first: true, predicate: IgxForOfDirective, descendants: true, static: true }, { propertyName: \"virtDir\", first: true, predicate: IgxForOfDirective, descendants: true, read: IgxForOfDirective, static: true }, { propertyName: \"dropdownContainer\", first: true, predicate: [\"dropdownItemContainer\"], descendants: true, static: true }, { propertyName: \"primitiveTemplate\", first: true, predicate: [\"primitive\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"complexTemplate\", first: true, predicate: [\"complex\"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboBaseDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxSelectionAPIService }, { type: IgxComboAPIService }, { type: IgxIconService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }, { type: i0.Injector, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { showSearchCaseIcon: [{\n type: Input\n }], overlaySettings: [{\n type: Input\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], width: [{\n type: HostBinding,\n args: ['style.width']\n }, {\n type: Input\n }], allowCustomValues: [{\n type: Input\n }], itemsMaxHeight: [{\n type: Input\n }], itemHeight: [{\n type: Input\n }], itemsWidth: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], data: [{\n type: Input\n }], valueKey: [{\n type: Input\n }], displayKey: [{\n type: Input\n }], groupKey: [{\n type: Input\n }], groupSortingDirection: [{\n type: Input\n }], filterFunction: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-combo']\n }], disabled: [{\n type: Input\n }], type: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], addition: [{\n type: Output\n }], searchInputUpdate: [{\n type: Output\n }], dataPreLoad: [{\n type: Output\n }], itemTemplate: [{\n type: ContentChild,\n args: [IgxComboItemDirective, { read: TemplateRef }]\n }], headerTemplate: [{\n type: ContentChild,\n args: [IgxComboHeaderDirective, { read: TemplateRef }]\n }], footerTemplate: [{\n type: ContentChild,\n args: [IgxComboFooterDirective, { read: TemplateRef }]\n }], headerItemTemplate: [{\n type: ContentChild,\n args: [IgxComboHeaderItemDirective, { read: TemplateRef }]\n }], addItemTemplate: [{\n type: ContentChild,\n args: [IgxComboAddItemDirective, { read: TemplateRef }]\n }], emptyTemplate: [{\n type: ContentChild,\n args: [IgxComboEmptyDirective, { read: TemplateRef }]\n }], toggleIconTemplate: [{\n type: ContentChild,\n args: [IgxComboToggleIconDirective, { read: TemplateRef }]\n }], clearIconTemplate: [{\n type: ContentChild,\n args: [IgxComboClearIconDirective, { read: TemplateRef }]\n }], label: [{\n type: ContentChild,\n args: [forwardRef(() => IgxLabelDirective), { static: true }]\n }], inputGroup: [{\n type: ViewChild,\n args: ['inputGroup', { read: IgxInputGroupComponent, static: true }]\n }], comboInput: [{\n type: ViewChild,\n args: ['comboInput', { read: IgxInputDirective, static: true }]\n }], searchInput: [{\n type: ViewChild,\n args: ['searchInput']\n }], virtualScrollContainer: [{\n type: ViewChild,\n args: [IgxForOfDirective, { static: true }]\n }], virtDir: [{\n type: ViewChild,\n args: [IgxForOfDirective, { read: IgxForOfDirective, static: true }]\n }], dropdownContainer: [{\n type: ViewChild,\n args: ['dropdownItemContainer', { static: true }]\n }], primitiveTemplate: [{\n type: ViewChild,\n args: ['primitive', { read: TemplateRef, static: true }]\n }], complexTemplate: [{\n type: ViewChild,\n args: ['complex', { read: TemplateRef, static: true }]\n }], prefixes: [{\n type: ContentChildren,\n args: [IgxPrefixDirective, { descendants: true }]\n }], suffixes: [{\n type: ContentChildren,\n args: [IgxSuffixDirective, { descendants: true }]\n }], filteringOptions: [{\n type: Input\n }] } });\n\n/** @hidden */\nclass IgxComboDropDownComponent extends IgxDropDownComponent {\n /** @hidden @internal */\n get scrollContainer() {\n return this.virtDir.dc.location.nativeElement;\n }\n get isScrolledToLast() {\n const scrollTop = this.virtDir.scrollPosition;\n const scrollHeight = this.virtDir.getScroll().scrollHeight;\n return Math.floor(scrollTop + this.virtDir.igxForContainerSize) === scrollHeight;\n }\n get lastVisibleIndex() {\n return this.combo.totalItemCount ?\n Math.floor(this.combo.itemsMaxHeight / this.combo.itemHeight) :\n this.items.length - 1;\n }\n get sortedChildren() {\n if (this.children !== undefined) {\n return this.children.toArray()\n .sort((a, b) => a.index - b.index);\n }\n return null;\n }\n /**\n * Get all non-header items\n *\n * ```typescript\n * let myDropDownItems = this.dropdown.items;\n * ```\n */\n get items() {\n const items = [];\n if (this.children !== undefined) {\n const sortedChildren = this.sortedChildren;\n for (const child of sortedChildren) {\n if (!child.isHeader) {\n items.push(child);\n }\n }\n }\n return items;\n }\n constructor(elementRef, cdr, selection, combo, comboAPI, _displayDensityOptions) {\n super(elementRef, cdr, selection, _displayDensityOptions);\n this.combo = combo;\n this.comboAPI = comboAPI;\n /** @hidden @internal */\n this.singleMode = false;\n /**\n * @hidden\n * @internal\n */\n this.children = null;\n this.scrollHandler = () => {\n this.comboAPI.disableTransitions = true;\n };\n }\n /**\n * @hidden @internal\n */\n onFocus() {\n this.focusedItem = this._focusedItem || this.items[0];\n this.combo.setActiveDescendant();\n }\n /**\n * @hidden @internal\n */\n onBlur(_evt) {\n this.focusedItem = null;\n this.combo.setActiveDescendant();\n }\n /**\n * @hidden @internal\n */\n onToggleOpened() {\n this.opened.emit();\n }\n /**\n * @hidden\n */\n navigateFirst() {\n this.navigateItem(this.virtDir.igxForOf.findIndex(e => !e?.isHeader));\n this.combo.setActiveDescendant();\n }\n /**\n * @hidden\n */\n navigatePrev() {\n if (this._focusedItem && this._focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {\n this.combo.focusSearchInput(false);\n }\n else {\n super.navigatePrev();\n }\n this.combo.setActiveDescendant();\n }\n /**\n * @hidden\n */\n navigateNext() {\n const lastIndex = this.combo.totalItemCount ? this.combo.totalItemCount - 1 : this.virtDir.igxForOf.length - 1;\n if (this._focusedItem && this._focusedItem.index === lastIndex) {\n this.focusAddItemButton();\n }\n else {\n super.navigateNext();\n }\n this.combo.setActiveDescendant();\n }\n /**\n * @hidden @internal\n */\n selectItem(item) {\n if (item === null || item === undefined) {\n return;\n }\n this.comboAPI.set_selected_item(item.itemID);\n this._focusedItem = item;\n this.combo.setActiveDescendant();\n }\n /**\n * @hidden @internal\n */\n updateScrollPosition() {\n this.virtDir.getScroll().scrollTop = this._scrollPosition;\n }\n /**\n * @hidden @internal\n */\n onItemActionKey(key) {\n switch (key) {\n case DropDownActionKey.ENTER:\n this.handleEnter();\n break;\n case DropDownActionKey.SPACE:\n this.handleSpace();\n break;\n case DropDownActionKey.ESCAPE:\n this.close();\n }\n }\n ngAfterViewInit() {\n this.virtDir.getScroll().addEventListener('scroll', this.scrollHandler);\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.virtDir.getScroll().removeEventListener('scroll', this.scrollHandler);\n super.ngOnDestroy();\n }\n scrollToHiddenItem(_newItem) { }\n handleEnter() {\n if (this.isAddItemFocused()) {\n this.combo.addItemToCollection();\n return;\n }\n if (this.singleMode && this.focusedItem) {\n this.combo.select(this.focusedItem.itemID);\n }\n this.close();\n }\n handleSpace() {\n if (this.isAddItemFocused()) {\n return;\n }\n else {\n this.selectItem(this.focusedItem);\n }\n }\n isAddItemFocused() {\n return this.focusedItem instanceof IgxComboAddItemComponent;\n }\n focusAddItemButton() {\n if (this.combo.isAddButtonVisible()) {\n this.focusedItem = this.items[this.items.length - 1];\n }\n }\n}\nIgxComboDropDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboDropDownComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxSelectionAPIService }, { token: IGX_COMBO_COMPONENT }, { token: IgxComboAPIService }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxComboDropDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboDropDownComponent, selector: \"igx-combo-drop-down\", inputs: { singleMode: \"singleMode\" }, providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }], queries: [{ propertyName: \"children\", predicate: IgxComboItemComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n
    \\n \\n \\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboDropDownComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-combo-drop-down', providers: [{ provide: IGX_DROPDOWN_BASE, useExisting: IgxComboDropDownComponent }], template: \"
    \\n
    \\n \\n \\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxSelectionAPIService }, { type: undefined, decorators: [{\n type: Inject,\n args: [IGX_COMBO_COMPONENT]\n }] }, { type: IgxComboAPIService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { singleMode: [{\n type: Input\n }], children: [{\n type: ContentChildren,\n args: [IgxComboItemComponent, { descendants: true }]\n }] } });\n\n/** @hidden */\nclass IgxComboFilteringPipe {\n transform(collection, searchValue, displayKey, filteringOptions, filterFunction = defaultFilterFunction) {\n if (!collection) {\n return [];\n }\n if (!filteringOptions.filterable) {\n return collection;\n }\n filteringOptions.filteringKey = filteringOptions.filteringKey ?? displayKey;\n return filterFunction(collection, searchValue, filteringOptions);\n }\n}\nIgxComboFilteringPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboFilteringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxComboFilteringPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboFilteringPipe, name: \"comboFiltering\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboFilteringPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'comboFiltering' }]\n }] });\n/** @hidden */\nclass IgxComboGroupingPipe {\n constructor(combo) {\n this.combo = combo;\n }\n transform(collection, groupKey, valueKey, sortingDirection) {\n // TODO: should filteredData be changed here?\n this.combo.filteredData = collection;\n if ((!groupKey && groupKey !== 0) || !collection.length) {\n return collection;\n }\n const sorted = DataUtil.sort(cloneArray(collection), [{\n fieldName: groupKey,\n dir: sortingDirection,\n ignoreCase: true,\n strategy: DefaultSortingStrategy.instance()\n }]);\n const data = cloneArray(sorted);\n let inserts = 0;\n let currentHeader = null;\n for (let i = 0; i < sorted.length; i++) {\n let insertFlag = 0;\n if (currentHeader !== sorted[i][groupKey]) {\n currentHeader = sorted[i][groupKey];\n insertFlag = 1;\n }\n if (insertFlag) {\n data.splice(i + inserts, 0, {\n [valueKey]: currentHeader,\n [groupKey]: currentHeader,\n isHeader: true\n });\n inserts++;\n }\n }\n return data;\n }\n}\nIgxComboGroupingPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboGroupingPipe, deps: [{ token: IGX_COMBO_COMPONENT }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxComboGroupingPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboGroupingPipe, name: \"comboGrouping\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboGroupingPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'comboGrouping' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_COMBO_COMPONENT]\n }] }]; } });\nfunction defaultFilterFunction(collection, searchValue, filteringOptions) {\n if (!searchValue) {\n return collection;\n }\n const searchTerm = filteringOptions.caseSensitive ? searchValue : searchValue.toLowerCase();\n if (filteringOptions.filteringKey != null) {\n return collection.filter(e => filteringOptions.caseSensitive ?\n e[filteringOptions.filteringKey]?.includes(searchTerm) :\n e[filteringOptions.filteringKey]?.toString().toLowerCase().includes(searchTerm));\n }\n else {\n return collection.filter(e => filteringOptions.caseSensitive ?\n e?.includes(searchTerm) :\n e?.toString().toLowerCase().includes(searchTerm));\n }\n}\n\n/**\n * When called with sets A & B, returns A - B (as array);\n *\n * @hidden\n */\nconst diffInSets = (set1, set2) => {\n const results = [];\n set1.forEach(entry => {\n if (!set2.has(entry)) {\n results.push(entry);\n }\n });\n return results;\n};\n/**\n * Represents a drop-down list that provides editable functionalities, allowing users to choose an option from a predefined list.\n *\n * @igxModule IgxComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, combo selection\n * @igxGroup Grids & Lists\n *\n * @remarks\n * It provides the ability to filter items as well as perform selection with the provided data.\n * Additionally, it exposes keyboard navigation and custom styling capabilities.\n * @example\n * ```html\n * \n * \n * ```\n */\nclass IgxComboComponent extends IgxComboBaseDirective {\n /**\n * @deprecated in version 14.0.0. Use the IComboFilteringOptions.filterable\n *\n * An @Input property that enabled/disables filtering in the list. The default is `true`.\n * ```html\n * \n * ```\n */\n get filterable() {\n return this.filteringOptions.filterable;\n }\n set filterable(value) {\n this.filteringOptions = Object.assign({}, this.filteringOptions, { filterable: value });\n }\n /**\n * @hidden @internal\n */\n get inputEmpty() {\n return !this.value && !this.placeholder;\n }\n /** @hidden @internal */\n get filteredData() {\n return this.filteringOptions.filterable ? this._filteredData : this.data;\n }\n /** @hidden @internal */\n set filteredData(val) {\n this._filteredData = this.groupKey ? (val || []).filter((e) => e.isHeader !== true) : val;\n this.checkMatch();\n }\n constructor(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector) {\n super(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector);\n /**\n * An @Input property that controls whether the combo's search box\n * should be focused after the `opened` event is called\n * When `false`, the combo's list item container will be focused instead\n */\n this.autoFocusSearch = true;\n /**\n * Defines the placeholder value for the combo dropdown search field\n *\n * ```typescript\n * // get\n * let myComboSearchPlaceholder = this.combo.searchPlaceholder;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.searchPlaceholder = 'Enter a Search Term';\n /**\n * Emitted when item selection is changing, before the selection completes\n *\n * ```html\n * \n * ```\n */\n this.selectionChanging = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.filteringLogic = FilteringLogic.Or;\n this.stringFilters = IgxStringFilteringOperand;\n this.booleanFilters = IgxBooleanFilteringOperand;\n this._prevInputValue = '';\n this.comboAPI.register(this);\n }\n onArrowDown(event) {\n event.preventDefault();\n event.stopPropagation();\n this.open();\n }\n /** @hidden @internal */\n get displaySearchInput() {\n return this.filteringOptions.filterable || this.allowCustomValues;\n }\n /**\n * @hidden @internal\n */\n handleKeyUp(event) {\n // TODO: use PlatformUtil for keyboard navigation\n if (event.key === 'ArrowDown' || event.key === 'Down') {\n this.dropdown.focusedItem = this.dropdown.items[0];\n this.dropdownContainer.nativeElement.focus();\n }\n else if (event.key === 'Escape' || event.key === 'Esc') {\n this.toggle();\n }\n }\n /**\n * @hidden @internal\n */\n handleSelectAll(evt) {\n if (evt.checked) {\n this.selectAllItems();\n }\n else {\n this.deselectAllItems();\n }\n }\n /**\n * @hidden @internal\n */\n writeValue(value) {\n const selection = Array.isArray(value) ? value.filter(x => x !== undefined) : [];\n const oldSelection = this.selection;\n this.selectionService.select_items(this.id, selection, true);\n this.cdr.markForCheck();\n this._value = this.createDisplayText(this.selection, oldSelection);\n }\n /**\n * @hidden\n */\n getEditElement() {\n return this.comboInput.nativeElement;\n }\n /**\n * @hidden @internal\n */\n get context() {\n return {\n $implicit: this\n };\n }\n /**\n * @hidden @internal\n */\n handleClearItems(event) {\n if (this.disabled) {\n return;\n }\n this.deselectAllItems(true, event);\n if (this.collapsed) {\n this.getEditElement().focus();\n }\n else {\n this.focusSearchInput(true);\n }\n event.stopPropagation();\n }\n /**\n * Select defined items\n *\n * @param newItems new items to be selected\n * @param clearCurrentSelection if true clear previous selected items\n * ```typescript\n * this.combo.select([\"New York\", \"New Jersey\"]);\n * ```\n */\n select(newItems, clearCurrentSelection, event) {\n if (newItems) {\n const newSelection = this.selectionService.add_items(this.id, newItems, clearCurrentSelection);\n this.setSelection(newSelection, event);\n }\n }\n /**\n * Deselect defined items\n *\n * @param items items to deselected\n * ```typescript\n * this.combo.deselect([\"New York\", \"New Jersey\"]);\n * ```\n */\n deselect(items, event) {\n if (items) {\n const newSelection = this.selectionService.delete_items(this.id, items);\n this.setSelection(newSelection, event);\n }\n }\n /**\n * Select all (filtered) items\n *\n * @param ignoreFilter if set to true, selects all items, otherwise selects only the filtered ones.\n * ```typescript\n * this.combo.selectAllItems();\n * ```\n */\n selectAllItems(ignoreFilter, event) {\n const allVisible = this.selectionService.get_all_ids(ignoreFilter ? this.data : this.filteredData, this.valueKey);\n const newSelection = this.selectionService.add_items(this.id, allVisible);\n this.setSelection(newSelection, event);\n }\n /**\n * Deselect all (filtered) items\n *\n * @param ignoreFilter if set to true, deselects all items, otherwise deselects only the filtered ones.\n * ```typescript\n * this.combo.deselectAllItems();\n * ```\n */\n deselectAllItems(ignoreFilter, event) {\n let newSelection = this.selectionService.get_empty();\n if (this.filteredData.length !== this.data.length && !ignoreFilter) {\n newSelection = this.selectionService.delete_items(this.id, this.selectionService.get_all_ids(this.filteredData, this.valueKey));\n }\n this.setSelection(newSelection, event);\n }\n /**\n * Selects/Deselects a single item\n *\n * @param itemID the itemID of the specific item\n * @param select If the item should be selected (true) or deselected (false)\n *\n * Without specified valueKey;\n * ```typescript\n * this.combo.valueKey = null;\n * const items: { field: string, region: string}[] = data;\n * this.combo.setSelectedItem(items[0], true);\n * ```\n * With specified valueKey;\n * ```typescript\n * this.combo.valueKey = 'field';\n * const items: { field: string, region: string}[] = data;\n * this.combo.setSelectedItem('Connecticut', true);\n * ```\n */\n setSelectedItem(itemID, select = true, event) {\n if (itemID === undefined) {\n return;\n }\n if (select) {\n this.select([itemID], false, event);\n }\n else {\n this.deselect([itemID], event);\n }\n }\n /** @hidden @internal */\n handleOpened() {\n this.triggerCheck();\n // Disabling focus of the search input should happen only when drop down opens.\n // During keyboard navigation input should receive focus, even the autoFocusSearch is disabled.\n // That is why in such cases focusing of the dropdownContainer happens outside focusSearchInput method.\n if (this.autoFocusSearch) {\n this.focusSearchInput(true);\n }\n else {\n this.dropdownContainer.nativeElement.focus();\n }\n this.opened.emit({ owner: this });\n }\n /** @hidden @internal */\n focusSearchInput(opening) {\n if (this.displaySearchInput && this.searchInput) {\n this.searchInput.nativeElement.focus();\n }\n else {\n if (opening) {\n this.dropdownContainer.nativeElement.focus();\n }\n else {\n this.comboInput.nativeElement.focus();\n this.toggle();\n }\n }\n }\n setSelection(newSelection, event) {\n const removed = diffInSets(this.selectionService.get(this.id), newSelection);\n const added = diffInSets(newSelection, this.selectionService.get(this.id));\n const newSelectionAsArray = Array.from(newSelection);\n const oldSelectionAsArray = Array.from(this.selectionService.get(this.id) || []);\n const displayText = this.createDisplayText(newSelectionAsArray, oldSelectionAsArray);\n const args = {\n newSelection: newSelectionAsArray,\n oldSelection: oldSelectionAsArray,\n added,\n removed,\n event,\n owner: this,\n displayText,\n cancel: false\n };\n this.selectionChanging.emit(args);\n if (!args.cancel) {\n this.selectionService.select_items(this.id, args.newSelection, true);\n if (displayText !== args.displayText) {\n this._value = args.displayText;\n }\n else {\n this._value = this.createDisplayText(args.newSelection, args.oldSelection);\n }\n this._onChangeCallback(args.newSelection);\n }\n else if (this.isRemote) {\n this.registerRemoteEntries(args.added, false);\n }\n }\n createDisplayText(newSelection, oldSelection) {\n return this.isRemote\n ? this.getRemoteSelection(newSelection, oldSelection)\n : this.concatDisplayText(newSelection);\n }\n /** Returns a string that should be populated in the combo's text box */\n concatDisplayText(selection) {\n const value = this.displayKey !== null && this.displayKey !== undefined ?\n this.convertKeysToItems(selection).map(entry => entry[this.displayKey]).join(', ') :\n selection.join(', ');\n return value;\n }\n}\nIgxComboComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxSelectionAPIService }, { token: IgxComboAPIService }, { token: IgxIconService }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }, { token: i0.Injector, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxComboComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxComboComponent, selector: \"igx-combo\", inputs: { autoFocusSearch: \"autoFocusSearch\", filterable: \"filterable\", searchPlaceholder: \"searchPlaceholder\" }, outputs: { selectionChanging: \"selectionChanging\" }, host: { listeners: { \"keydown.ArrowDown\": \"onArrowDown($event)\", \"keydown.Alt.ArrowDown\": \"onArrowDown($event)\" } }, providers: [\n IgxComboAPIService,\n { provide: IGX_COMBO_COMPONENT, useExisting: IgxComboComponent },\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxComboComponent, multi: true }\n ], viewQueries: [{ propertyName: \"dropdown\", first: true, predicate: IgxComboDropDownComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {{ clearIcon }}\\n \\n \\n \\n \\n \\n \\n \\n {{ toggleIcon }}\\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 \\n \\n
    \\n \\n \\n \\n \\n
    \\n \\n \\n
    \\n\\n {{display[key]}}\\n\\n\\n {{display}}\\n\\n\\n {{resourceStrings.igx_combo_empty_message}}\\n\\n\\n \\n\\n\\n {{ item[key] }}\\n\\n\", dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgClass; }), selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgTemplateOutlet; }), selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.DefaultValueAccessor; }), selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.NgControlStatus; }), selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.NgModel; }), selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxButtonDirective; }), selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxDropDownItemNavigationDirective; }), selector: \"[igxDropDownItemNavigation]\", inputs: [\"igxDropDownItemNavigation\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxForOfDirective; }), selector: \"[igxFor][igxForOf]\", inputs: [\"igxForOf\", \"igxForSizePropName\", \"igxForScrollOrientation\", \"igxForScrollContainer\", \"igxForContainerSize\", \"igxForItemSize\", \"igxForTotalItemCount\", \"igxForTrackBy\"], outputs: [\"chunkLoad\", \"scrollbarVisibilityChanged\", \"contentSizeChange\", \"dataChanged\", \"beforeViewDestroyed\", \"chunkPreload\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxIconComponent; }), selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxInputGroupComponent; }), selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxInputDirective; }), selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxSuffixDirective; }), selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxRippleDirective; }), selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxComboAddItemComponent; }), selector: \"igx-combo-add-item\" }, { kind: \"component\", type: i0.forwardRef(function () { return IgxComboDropDownComponent; }), selector: \"igx-combo-drop-down\", inputs: [\"singleMode\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxComboItemComponent; }), selector: \"igx-combo-item\", inputs: [\"itemHeight\", \"ariaLabel\", \"singleMode\"] }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxComboFilteringPipe; }), name: \"comboFiltering\" }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxComboGroupingPipe; }), name: \"comboGrouping\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-combo', providers: [\n IgxComboAPIService,\n { provide: IGX_COMBO_COMPONENT, useExisting: IgxComboComponent },\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxComboComponent, multi: true }\n ], template: \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {{ clearIcon }}\\n \\n \\n \\n \\n \\n \\n \\n {{ toggleIcon }}\\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 \\n \\n
    \\n \\n \\n \\n \\n
    \\n \\n \\n
    \\n\\n {{display[key]}}\\n\\n\\n {{display}}\\n\\n\\n {{resourceStrings.igx_combo_empty_message}}\\n\\n\\n \\n\\n\\n {{ item[key] }}\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxSelectionAPIService }, { type: IgxComboAPIService }, { type: IgxIconService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }, { type: i0.Injector, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { autoFocusSearch: [{\n type: Input\n }], filterable: [{\n type: Input\n }], searchPlaceholder: [{\n type: Input\n }], selectionChanging: [{\n type: Output\n }], dropdown: [{\n type: ViewChild,\n args: [IgxComboDropDownComponent, { static: true }]\n }], onArrowDown: [{\n type: HostListener,\n args: ['keydown.ArrowDown', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.Alt.ArrowDown', ['$event']]\n }] } });\n/**\n * @hidden\n */\nclass IgxComboModule {\n}\nIgxComboModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxComboModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboModule, declarations: [IgxComboAddItemComponent,\n IgxComboAddItemDirective,\n IgxComboClearIconDirective, IgxComboComponent, IgxComboDropDownComponent,\n IgxComboEmptyDirective,\n IgxComboFilteringPipe,\n IgxComboFooterDirective,\n IgxComboGroupingPipe,\n IgxComboHeaderDirective,\n IgxComboHeaderItemDirective,\n IgxComboItemComponent,\n IgxComboItemDirective,\n IgxComboToggleIconDirective], imports: [CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxCheckboxModule,\n IgxDropDownModule,\n IgxForOfModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxRippleModule,\n IgxToggleModule,\n ReactiveFormsModule], exports: [IgxComboAddItemComponent,\n IgxComboAddItemDirective,\n IgxComboClearIconDirective, IgxComboComponent, IgxComboDropDownComponent,\n IgxComboEmptyDirective,\n IgxComboFilteringPipe,\n IgxComboFooterDirective,\n IgxComboGroupingPipe,\n IgxComboHeaderDirective,\n IgxComboHeaderItemDirective,\n IgxComboItemComponent,\n IgxComboItemDirective,\n IgxComboToggleIconDirective,\n IgxInputGroupModule] });\nIgxComboModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboModule, imports: [CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxCheckboxModule,\n IgxDropDownModule,\n IgxForOfModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxRippleModule,\n IgxToggleModule,\n ReactiveFormsModule, IgxInputGroupModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxComboModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxComboAddItemComponent,\n IgxComboAddItemDirective,\n IgxComboClearIconDirective,\n IgxComboComponent,\n IgxComboDropDownComponent,\n IgxComboEmptyDirective,\n IgxComboFilteringPipe,\n IgxComboFooterDirective,\n IgxComboGroupingPipe,\n IgxComboHeaderDirective,\n IgxComboHeaderItemDirective,\n IgxComboItemComponent,\n IgxComboItemDirective,\n IgxComboToggleIconDirective\n ],\n exports: [\n IgxComboAddItemComponent,\n IgxComboAddItemDirective,\n IgxComboClearIconDirective,\n IgxComboComponent,\n IgxComboDropDownComponent,\n IgxComboEmptyDirective,\n IgxComboFilteringPipe,\n IgxComboFooterDirective,\n IgxComboGroupingPipe,\n IgxComboHeaderDirective,\n IgxComboHeaderItemDirective,\n IgxComboItemComponent,\n IgxComboItemDirective,\n IgxComboToggleIconDirective,\n IgxInputGroupModule\n ],\n imports: [\n CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxCheckboxModule,\n IgxDropDownModule,\n IgxForOfModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxRippleModule,\n IgxToggleModule,\n ReactiveFormsModule\n ]\n }]\n }] });\n\n/**\n * Represents a drop-down list that provides filtering functionality, allowing users to choose a single option from a predefined list.\n *\n * @igxModule IgxSimpleComboModule\n * @igxTheme igx-combo-theme\n * @igxKeywords combobox, single combo selection\n * @igxGroup Grids & Lists\n *\n * @remarks\n * It provides the ability to filter items as well as perform single selection on the provided data.\n * Additionally, it exposes keyboard navigation and custom styling capabilities.\n * @example\n * ```html\n * \n * \n * ```\n */\nclass IgxSimpleComboComponent extends IgxComboBaseDirective {\n /** @hidden @internal */\n get filteredData() {\n return this._filteredData;\n }\n /** @hidden @internal */\n set filteredData(val) {\n this._filteredData = this.groupKey ? (val || []).filter((e) => e.isHeader !== true) : val;\n this.checkMatch();\n }\n /** @hidden @internal */\n get searchValue() {\n return this._searchValue;\n }\n set searchValue(val) {\n this._searchValue = val;\n }\n get selectedItem() {\n return this.selectionService.get(this.id).values().next().value;\n }\n constructor(elementRef, cdr, selectionService, comboAPI, _iconService, platformUtil, _displayDensityOptions, _inputGroupType, _injector) {\n super(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector);\n this.platformUtil = platformUtil;\n /**\n * Emitted when item selection is changing, before the selection completes\n *\n * ```html\n * \n * ```\n */\n this.selectionChanging = new EventEmitter();\n /** @hidden @internal */\n this.composing = false;\n this._updateInput = true;\n // stores the last filtered value - move to common?\n this._internalFilter = '';\n this._collapsing = false;\n this.findAllMatches = (element) => {\n const value = this.displayKey ? element[this.displayKey] : element;\n if (value === null || value === undefined || value === '') {\n // we can accept null, undefined and empty strings as empty display values\n return true;\n }\n const searchValue = this.searchValue || this.comboInput.value;\n return !!searchValue && value.toString().toLowerCase().includes(searchValue.toLowerCase());\n };\n this.comboAPI.register(this);\n }\n /** @hidden @internal */\n onArrowDown(event) {\n if (this.collapsed) {\n event.preventDefault();\n event.stopPropagation();\n this.open();\n }\n else {\n if (this.virtDir.igxForOf.length > 0 && !this.selectedItem) {\n this.dropdown.navigateNext();\n this.dropdownContainer.nativeElement.focus();\n }\n else if (this.allowCustomValues) {\n this.addItem?.element.nativeElement.focus();\n }\n }\n }\n /**\n * Select a defined item\n *\n * @param item the item to be selected\n * ```typescript\n * this.combo.select(\"New York\");\n * ```\n */\n select(item) {\n if (item !== undefined) {\n const newSelection = this.selectionService.add_items(this.id, item instanceof Array ? item : [item], true);\n this.setSelection(newSelection);\n }\n }\n /**\n * Deselect the currently selected item\n *\n * @param item the items to be deselected\n * ```typescript\n * this.combo.deselect(\"New York\");\n * ```\n */\n deselect() {\n this.clearSelection();\n }\n /** @hidden @internal */\n writeValue(value) {\n const oldSelection = this.selection;\n this.selectionService.select_items(this.id, this.isValid(value) ? [value] : [], true);\n this.cdr.markForCheck();\n this._value = this.createDisplayText(this.selection, oldSelection);\n this.filterValue = this._internalFilter = this._value?.toString();\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.virtDir.contentSizeChange.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.selection.length > 0) {\n const index = this.virtDir.igxForOf.findIndex(e => {\n let current = e ? e[this.valueKey] : undefined;\n if (this.valueKey === null || this.valueKey === undefined) {\n current = e;\n }\n return current === this.selection[0];\n });\n if (!this.isRemote) {\n // navigate to item only if we have local data\n // as with remote data this will fiddle with igxFor's scroll handler\n // and will trigger another chunk load which will break the visualization\n this.dropdown.navigateItem(index);\n }\n }\n });\n this.dropdown.opening.pipe(takeUntil(this.destroy$)).subscribe((args) => {\n if (args.cancel) {\n return;\n }\n this._collapsing = false;\n const filtered = this.filteredData.find(this.findAllMatches);\n if (filtered === undefined || filtered === null) {\n this.filterValue = this.searchValue = this.comboInput.value;\n return;\n }\n this.filterValue = this.searchValue = '';\n });\n this.dropdown.opened.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.composing) {\n this.comboInput.focus();\n }\n this._internalFilter = this.comboInput.value;\n });\n this.dropdown.closing.pipe(takeUntil(this.destroy$)).subscribe((args) => {\n if (args.cancel) {\n return;\n }\n if (this.getEditElement() && !args.event) {\n this._collapsing = true;\n }\n else {\n this.clearOnBlur();\n this._onTouchedCallback();\n }\n this.comboInput.focus();\n });\n this.dropdown.closed.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.filterValue = this._internalFilter = this.comboInput.value;\n });\n // in reactive form the control is not present initially\n // and sets the selection to an invalid value in writeValue method\n if (!this.isValid(this.selectedItem)) {\n this.selectionService.clear(this.id);\n this._value = '';\n }\n super.ngAfterViewInit();\n }\n /** @hidden @internal */\n handleInputChange(event) {\n if (event !== undefined) {\n this.filterValue = this._internalFilter = this.searchValue = typeof event === 'string' ? event : event.target.value;\n }\n this._onChangeCallback(this.searchValue);\n if (this.collapsed && this.comboInput.focused) {\n this.open();\n }\n if (!this.comboInput.value.trim() && this.selection.length) {\n // handle clearing of input by space\n this.clearSelection();\n this._onChangeCallback(null);\n this.filterValue = '';\n }\n if (this.selection.length) {\n this.selectionService.clear(this.id);\n }\n // when filtering the focused item should be the first item or the currently selected item\n if (!this.dropdown.focusedItem || this.dropdown.focusedItem.id !== this.dropdown.items[0].id) {\n this.dropdown.navigateFirst();\n }\n super.handleInputChange(event);\n this.composing = true;\n }\n /** @hidden @internal */\n handleInputClick() {\n if (this.collapsed) {\n this.open();\n this.comboInput.focus();\n }\n }\n /** @hidden @internal */\n handleKeyDown(event) {\n if (event.key === this.platformUtil.KEYMAP.ENTER) {\n const filtered = this.filteredData.find(this.findAllMatches);\n if (filtered === null || filtered === undefined) {\n return;\n }\n this.select(this.dropdown.focusedItem.itemID);\n event.preventDefault();\n event.stopPropagation();\n this.close();\n // manually trigger text selection as it will not be triggered during editing\n this.textSelection.trigger();\n this.filterValue = this.getElementVal(filtered);\n return;\n }\n if (event.key === this.platformUtil.KEYMAP.BACKSPACE\n || event.key === this.platformUtil.KEYMAP.DELETE) {\n this._updateInput = false;\n this.clearSelection(true);\n }\n if (!this.collapsed && event.key === this.platformUtil.KEYMAP.TAB) {\n this.clearOnBlur();\n this.close();\n }\n this.composing = false;\n super.handleKeyDown(event);\n }\n /** @hidden @internal */\n handleKeyUp(event) {\n if (event.key === this.platformUtil.KEYMAP.ARROW_DOWN) {\n const firstItem = this.selectionService.first_item(this.id);\n this.dropdown.focusedItem = firstItem && this.filteredData.length > 0\n ? this.dropdown.items.find(i => i.itemID === firstItem)\n : this.dropdown.items[0];\n this.dropdownContainer.nativeElement.focus();\n }\n }\n /** @hidden @internal */\n handleItemKeyDown(event) {\n if (event.key === this.platformUtil.KEYMAP.ARROW_UP && event.altKey) {\n this.close();\n this.comboInput.focus();\n return;\n }\n if (event.key === this.platformUtil.KEYMAP.ENTER) {\n this.comboInput.focus();\n }\n }\n /** @hidden @internal */\n handleItemClick() {\n this.close();\n this.comboInput.focus();\n }\n /** @hidden @internal */\n onBlur() {\n // when clicking the toggle button to close the combo and immediately clicking outside of it\n // the collapsed state is not modified as the dropdown is still not closed\n if (this.collapsed || this._collapsing) {\n this.clearOnBlur();\n }\n super.onBlur();\n }\n /** @hidden @internal */\n onFocus() {\n this._internalFilter = this.comboInput.value || '';\n }\n /** @hidden @internal */\n getEditElement() {\n return this.comboInput.nativeElement;\n }\n /** @hidden @internal */\n handleClear(event) {\n if (this.disabled) {\n return;\n }\n this.clearSelection(true);\n if (!this.collapsed) {\n this.focusSearchInput(true);\n }\n event.stopPropagation();\n this.comboInput.value = this.filterValue = this.searchValue = '';\n this.dropdown.focusedItem = null;\n this.composing = false;\n this.comboInput.focus();\n }\n /** @hidden @internal */\n handleOpened() {\n this.triggerCheck();\n if (!this.comboInput.focused) {\n this.dropdownContainer.nativeElement.focus();\n }\n this.opened.emit({ owner: this });\n }\n /** @hidden @internal */\n handleClosing(e) {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.closing.emit(args);\n e.cancel = args.cancel;\n if (e.cancel) {\n return;\n }\n this.composing = false;\n // explicitly update selection and trigger text selection so that we don't have to force CD\n this.textSelection.selected = true;\n this.textSelection.trigger();\n }\n /** @hidden @internal */\n focusSearchInput(opening) {\n if (opening) {\n this.dropdownContainer.nativeElement.focus();\n }\n else {\n this.comboInput.nativeElement.focus();\n }\n }\n /** @hidden @internal */\n onClick(event) {\n super.onClick(event);\n if (this.comboInput.value.length === 0) {\n this.virtDir.scrollTo(0);\n }\n }\n setSelection(newSelection) {\n const newSelectionAsArray = newSelection ? Array.from(newSelection) : [];\n const oldSelectionAsArray = Array.from(this.selectionService.get(this.id) || []);\n const displayText = this.createDisplayText(newSelectionAsArray, oldSelectionAsArray);\n const args = {\n newSelection: newSelectionAsArray[0],\n oldSelection: oldSelectionAsArray[0],\n displayText,\n owner: this,\n cancel: false\n };\n if (args.newSelection !== args.oldSelection) {\n this.selectionChanging.emit(args);\n }\n // TODO: refactor below code as it sets the selection and the display text\n if (!args.cancel) {\n let argsSelection = this.isValid(args.newSelection)\n ? args.newSelection\n : [];\n argsSelection = Array.isArray(argsSelection) ? argsSelection : [argsSelection];\n this.selectionService.select_items(this.id, argsSelection, true);\n if (this._updateInput) {\n this.comboInput.value = this._internalFilter = this._value = this.searchValue = displayText !== args.displayText\n ? args.displayText\n : this.createDisplayText(argsSelection, [args.oldSelection]);\n }\n this._onChangeCallback(args.newSelection);\n this._updateInput = true;\n }\n else if (this.isRemote) {\n this.registerRemoteEntries(newSelectionAsArray, false);\n }\n }\n createDisplayText(newSelection, oldSelection) {\n if (this.isRemote) {\n return this.getRemoteSelection(newSelection, oldSelection);\n }\n if (this.displayKey !== null\n && this.displayKey !== undefined\n && newSelection.length > 0) {\n return this.convertKeysToItems(newSelection).filter(e => e).map(e => e[this.displayKey])[0]?.toString() || '';\n }\n return newSelection[0]?.toString() || '';\n }\n getRemoteSelection(newSelection, oldSelection) {\n if (!newSelection.length) {\n this.registerRemoteEntries(oldSelection, false);\n return '';\n }\n this.registerRemoteEntries(oldSelection, false);\n this.registerRemoteEntries(newSelection);\n return Object.keys(this._remoteSelection).map(e => this._remoteSelection[e])[0];\n }\n /** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */\n registerRemoteEntries(ids, add = true) {\n const selection = this.getValueDisplayPairs(ids)[0];\n if (add && selection) {\n this._remoteSelection[selection[this.valueKey]] = selection[this.displayKey].toString();\n }\n else {\n delete this._remoteSelection[ids[0]];\n }\n }\n clearSelection(ignoreFilter) {\n let newSelection = this.selectionService.get_empty();\n if (this.filteredData.length !== this.data.length && !ignoreFilter) {\n newSelection = this.selectionService.delete_items(this.id, this.selectionService.get_all_ids(this.filteredData, this.valueKey));\n }\n this.setSelection(newSelection);\n }\n clearOnBlur() {\n if (this.isRemote) {\n const searchValue = this.searchValue || this.comboInput.value;\n const remoteValue = Object.keys(this._remoteSelection).map(e => this._remoteSelection[e])[0];\n if (remoteValue && searchValue !== remoteValue) {\n this.clear();\n }\n return;\n }\n const filtered = this.filteredData.find(this.findMatch);\n // selecting null in primitive data returns undefined as the search text is '', but the item is null\n if (filtered === undefined && this.selectedItem !== null || !this.selection.length) {\n this.clear();\n }\n }\n getElementVal(element) {\n const elementVal = this.displayKey ? element[this.displayKey] : element;\n return String(elementVal);\n }\n clear() {\n this.clearSelection(true);\n this.comboInput.value = this._internalFilter = this._value = this.searchValue = '';\n }\n isValid(value) {\n return this.required\n ? value !== null && value !== '' && value !== undefined\n : value !== undefined;\n }\n}\nIgxSimpleComboComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSimpleComboComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxSelectionAPIService }, { token: IgxComboAPIService }, { token: IgxIconService }, { token: PlatformUtil }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }, { token: i0.Injector, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxSimpleComboComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSimpleComboComponent, selector: \"igx-simple-combo\", outputs: { selectionChanging: \"selectionChanging\" }, host: { listeners: { \"keydown.ArrowDown\": \"onArrowDown($event)\", \"keydown.Alt.ArrowDown\": \"onArrowDown($event)\" } }, providers: [\n IgxComboAPIService,\n { provide: IGX_COMBO_COMPONENT, useExisting: IgxSimpleComboComponent },\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxSimpleComboComponent, multi: true }\n ], viewQueries: [{ propertyName: \"dropdown\", first: true, predicate: IgxComboDropDownComponent, descendants: true, static: true }, { propertyName: \"addItem\", first: true, predicate: IgxComboAddItemComponent, descendants: true }, { propertyName: \"textSelection\", first: true, predicate: IgxTextSelectionDirective, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"\\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 {{ clearIcon }}\\n \\n \\n\\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n {{ toggleIcon }}\\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
    \\n \\n \\n
    \\n\\n\\n {{display[key]}}\\n\\n\\n {{display}}\\n\\n\\n {{resourceStrings.igx_combo_empty_message}}\\n\\n\\n \\n\\n\\n {{ item[key] }}\\n\\n\", dependencies: [{ kind: \"component\", type: IgxComboAddItemComponent, selector: \"igx-combo-add-item\" }, { kind: \"component\", type: IgxComboDropDownComponent, selector: \"igx-combo-drop-down\", inputs: [\"singleMode\"] }, { kind: \"component\", type: IgxComboItemComponent, selector: \"igx-combo-item\", inputs: [\"itemHeight\", \"ariaLabel\", \"singleMode\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxForOfDirective, selector: \"[igxFor][igxForOf]\", inputs: [\"igxForOf\", \"igxForSizePropName\", \"igxForScrollOrientation\", \"igxForScrollContainer\", \"igxForContainerSize\", \"igxForItemSize\", \"igxForTotalItemCount\", \"igxForTrackBy\"], outputs: [\"chunkLoad\", \"scrollbarVisibilityChanged\", \"contentSizeChange\", \"dataChanged\", \"beforeViewDestroyed\", \"chunkPreload\"] }, { kind: \"directive\", type: IgxDropDownItemNavigationDirective, selector: \"[igxDropDownItemNavigation]\", inputs: [\"igxDropDownItemNavigation\"] }, { kind: \"directive\", type: IgxTextSelectionDirective, selector: \"[igxTextSelection]\", inputs: [\"igxTextSelection\"], exportAs: [\"igxTextSelection\"] }, { kind: \"pipe\", type: IgxComboFilteringPipe, name: \"comboFiltering\" }, { kind: \"pipe\", type: IgxComboGroupingPipe, name: \"comboGrouping\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSimpleComboComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-simple-combo', providers: [\n IgxComboAPIService,\n { provide: IGX_COMBO_COMPONENT, useExisting: IgxSimpleComboComponent },\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxSimpleComboComponent, multi: true }\n ], template: \"\\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 {{ clearIcon }}\\n \\n \\n\\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n {{ toggleIcon }}\\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
    \\n \\n \\n
    \\n\\n\\n {{display[key]}}\\n\\n\\n {{display}}\\n\\n\\n {{resourceStrings.igx_combo_empty_message}}\\n\\n\\n \\n\\n\\n {{ item[key] }}\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxSelectionAPIService }, { type: IgxComboAPIService }, { type: IgxIconService }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }, { type: i0.Injector, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { dropdown: [{\n type: ViewChild,\n args: [IgxComboDropDownComponent, { static: true }]\n }], addItem: [{\n type: ViewChild,\n args: [IgxComboAddItemComponent]\n }], selectionChanging: [{\n type: Output\n }], textSelection: [{\n type: ViewChild,\n args: [IgxTextSelectionDirective, { static: true }]\n }], onArrowDown: [{\n type: HostListener,\n args: ['keydown.ArrowDown', ['$event']]\n }, {\n type: HostListener,\n args: ['keydown.Alt.ArrowDown', ['$event']]\n }] } });\nclass IgxSimpleComboModule {\n}\nIgxSimpleComboModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSimpleComboModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSimpleComboModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSimpleComboModule, declarations: [IgxSimpleComboComponent], imports: [IgxComboModule, IgxRippleModule, CommonModule,\n IgxInputGroupModule, FormsModule, ReactiveFormsModule,\n IgxForOfModule, IgxToggleModule, IgxCheckboxModule,\n IgxDropDownModule, IgxButtonModule, IgxIconModule,\n IgxTextSelectionModule], exports: [IgxSimpleComboComponent, IgxComboModule] });\nIgxSimpleComboModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSimpleComboModule, imports: [IgxComboModule, IgxRippleModule, CommonModule,\n IgxInputGroupModule, FormsModule, ReactiveFormsModule,\n IgxForOfModule, IgxToggleModule, IgxCheckboxModule,\n IgxDropDownModule, IgxButtonModule, IgxIconModule,\n IgxTextSelectionModule, IgxComboModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSimpleComboModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxSimpleComboComponent],\n imports: [\n IgxComboModule, IgxRippleModule, CommonModule,\n IgxInputGroupModule, FormsModule, ReactiveFormsModule,\n IgxForOfModule, IgxToggleModule, IgxCheckboxModule,\n IgxDropDownModule, IgxButtonModule, IgxIconModule,\n IgxTextSelectionModule\n ],\n exports: [IgxSimpleComboComponent, IgxComboModule]\n }]\n }] });\n\n/** Header orientation in `dialog` mode. */\nconst PickerHeaderOrientation = mkenum({\n Horizontal: 'horizontal',\n Vertical: 'vertical'\n});\n/**\n * This enumeration is used to configure whether the date/time picker has an editable input with drop down\n * or is readonly - the date/time is selected only through a dialog.\n */\nconst PickerInteractionMode = mkenum({\n DropDown: 'dropdown',\n Dialog: 'dialog'\n});\n\n/** @hidden */\nclass IgxCalendarContainerComponent {\n constructor() {\n this.calendarClose = new EventEmitter();\n this.todaySelection = new EventEmitter();\n this.styleClass = 'igx-date-picker';\n this.vertical = false;\n this.mode = PickerInteractionMode.DropDown;\n }\n get dropdownCSS() {\n return this.mode === PickerInteractionMode.DropDown;\n }\n get verticalCSS() {\n return this.vertical && this.mode === PickerInteractionMode.Dialog;\n }\n onEscape(event) {\n event.preventDefault();\n this.calendarClose.emit();\n }\n get isReadonly() {\n return this.mode === PickerInteractionMode.Dialog;\n }\n}\nIgxCalendarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxCalendarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCalendarContainerComponent, selector: \"igx-calendar-container\", outputs: { calendarClose: \"calendarClose\", todaySelection: \"todaySelection\" }, host: { listeners: { \"keydown.alt.arrowup\": \"onEscape($event)\" }, properties: { \"class.igx-date-picker\": \"this.styleClass\", \"class.igx-date-picker--dropdown\": \"this.dropdownCSS\", \"class.igx-date-picker--vertical\": \"this.verticalCSS\" } }, viewQueries: [{ propertyName: \"calendar\", first: true, predicate: IgxCalendarComponent, descendants: true, static: true }], ngImport: i0, template: \"\\n
    \\n \\n \\n
    \\n
    \\n\\n\\n\\n\\n\", styles: [\":host{display:block}\\n\"], dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"component\", type: IgxCalendarComponent, selector: \"igx-calendar\", inputs: [\"id\", \"hasHeader\", \"vertical\", \"monthsViewNumber\", \"showWeekNumbers\", \"animationAction\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarContainerComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-calendar-container', template: \"\\n
    \\n \\n \\n
    \\n
    \\n\\n\\n\\n\\n\", styles: [\":host{display:block}\\n\"] }]\n }], propDecorators: { calendar: [{\n type: ViewChild,\n args: [IgxCalendarComponent, { static: true }]\n }], calendarClose: [{\n type: Output\n }], todaySelection: [{\n type: Output\n }], styleClass: [{\n type: HostBinding,\n args: ['class.igx-date-picker']\n }], dropdownCSS: [{\n type: HostBinding,\n args: ['class.igx-date-picker--dropdown']\n }], verticalCSS: [{\n type: HostBinding,\n args: ['class.igx-date-picker--vertical']\n }], onEscape: [{\n type: HostListener,\n args: ['keydown.alt.arrowup', ['$event']]\n }] } });\n/** @hidden */\nclass IgxCalendarContainerModule {\n}\nIgxCalendarContainerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarContainerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxCalendarContainerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarContainerModule, declarations: [IgxCalendarContainerComponent], imports: [CommonModule,\n IgxButtonModule,\n IgxRippleModule,\n IgxCalendarModule], exports: [IgxCalendarContainerComponent] });\nIgxCalendarContainerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarContainerModule, imports: [CommonModule,\n IgxButtonModule,\n IgxRippleModule,\n IgxCalendarModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCalendarContainerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxCalendarContainerComponent],\n imports: [\n CommonModule,\n IgxButtonModule,\n IgxRippleModule,\n IgxCalendarModule\n ],\n exports: [IgxCalendarContainerComponent]\n }]\n }] });\n\n/**\n * Templates the default toggle icon in the picker.\n *\n * @remarks Can be applied to IgxDatePickerComponent, IgxTimePickerComponent, IgxDateRangePickerComponent\n *\n * @example\n * ```html\n * \n * \n * calendar_view_day\n * \n * \n * ```\n */\nclass IgxPickerToggleComponent {\n constructor() {\n this.clicked = new EventEmitter();\n }\n onClick(event) {\n // do not focus input on click\n event.stopPropagation();\n this.clicked.emit();\n }\n}\nIgxPickerToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickerToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxPickerToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxPickerToggleComponent, selector: \"igx-picker-toggle\", outputs: { clicked: \"clicked\" }, host: { listeners: { \"click\": \"onClick($event)\" } }, ngImport: i0, template: ``, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickerToggleComponent, decorators: [{\n type: Component,\n args: [{\n template: ``,\n selector: 'igx-picker-toggle'\n }]\n }], propDecorators: { clicked: [{\n type: Output\n }], onClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }] } });\n/**\n * Templates the default clear icon in the picker.\n *\n * @remarks Can be applied to IgxDatePickerComponent, IgxTimePickerComponent, IgxDateRangePickerComponent\n *\n * @example\n * ```html\n * \n * \n * delete\n * \n * \n * ```\n */\nclass IgxPickerClearComponent extends IgxPickerToggleComponent {\n}\nIgxPickerClearComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickerClearComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxPickerClearComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxPickerClearComponent, selector: \"igx-picker-clear\", usesInheritance: true, ngImport: i0, template: ``, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickerClearComponent, decorators: [{\n type: Component,\n args: [{\n template: ``,\n selector: 'igx-picker-clear'\n }]\n }] });\n/**\n * IgxPickerActionsDirective can be used to re-template the dropdown/dialog action buttons.\n *\n * @remarks Can be applied to IgxDatePickerComponent, IgxTimePickerComponent, IgxDateRangePickerComponent\n *\n */\nclass IgxPickerActionsDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxPickerActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickerActionsDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxPickerActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxPickerActionsDirective, selector: \"[igxPickerActions]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickerActionsDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxPickerActions]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/** @hidden */\nclass IgxPickersCommonModule {\n}\nIgxPickersCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickersCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxPickersCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickersCommonModule, declarations: [IgxPickerToggleComponent, IgxPickerClearComponent, IgxPickerActionsDirective], imports: [CommonModule], exports: [IgxPickerToggleComponent, IgxPickerClearComponent, IgxPickerActionsDirective] });\nIgxPickersCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickersCommonModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPickersCommonModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxPickerToggleComponent,\n IgxPickerClearComponent,\n IgxPickerActionsDirective\n ],\n imports: [CommonModule],\n exports: [\n IgxPickerToggleComponent,\n IgxPickerClearComponent,\n IgxPickerActionsDirective\n ]\n }]\n }] });\n\nclass PickerBaseDirective extends DisplayDensityBase {\n /**\n * @example\n * ```html\n * \n * ```\n */\n /**\n * Gets the `locale` of the date-picker.\n * If not set, defaults to applciation's locale..\n */\n get locale() {\n return this._locale;\n }\n /**\n * Sets the `locale` of the date-picker.\n * Expects a valid BCP 47 language tag.\n */\n set locale(value) {\n this._locale = value;\n // if value is invalid, set it back to _localeId\n try {\n getLocaleFirstDayOfWeek(this._locale);\n }\n catch (e) {\n this._locale = this._localeId;\n }\n }\n /**\n * Gets the start day of the week.\n * Can return a numeric or an enum representation of the week day.\n * If not set, defaults to the first day of the week for the application locale.\n */\n get weekStart() {\n return this._weekStart ?? getLocaleFirstDayOfWeek(this._locale);\n }\n /**\n * Sets the start day of the week.\n * Can be assigned to a numeric value or to `WEEKDAYS` enum value.\n */\n set weekStart(value) {\n this._weekStart = value;\n }\n /**\n * Determines how the picker's input will be styled.\n *\n * @remarks\n * Default is `box`.\n *\n * @example\n * ```html\n * \n * ```\n */\n set type(val) {\n this._type = val;\n }\n get type() {\n return this._type || this._inputGroupType;\n }\n /**\n * Gets the picker's pop-up state.\n *\n * @example\n * ```typescript\n * const state = this.picker.collapsed;\n * ```\n */\n get collapsed() {\n return this._collapsed;\n }\n /** @hidden @internal */\n get isDropdown() {\n return this.mode === PickerInteractionMode.DropDown;\n }\n constructor(element, _localeId, _displayDensityOptions, _inputGroupType) {\n super(_displayDensityOptions || { displayDensity: 'comfortable' });\n this.element = element;\n this._localeId = _localeId;\n this._displayDensityOptions = _displayDensityOptions;\n this._inputGroupType = _inputGroupType;\n /**\n * Sets the `placeholder` of the picker's input.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.placeholder = '';\n /**\n * Can be `dropdown` with editable input field or `dialog` with readonly input field.\n *\n * @remarks\n * Default mode is `dropdown`\n *\n * @example\n * ```html\n * \n * ```\n */\n this.mode = PickerInteractionMode.DropDown;\n /**\n * Enables or disables the picker.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.disabled = false;\n /**\n * Emitted when the calendar has started opening, cancelable.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Emitted after the calendar has opened.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Emitted when the calendar has started closing, cancelable.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Emitted after the calendar has closed.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.closed = new EventEmitter();\n this._collapsed = true;\n this._destroy$ = new Subject();\n this.locale = this.locale || this._localeId;\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.subToIconsClicked(this.toggleComponents, () => this.open());\n this.toggleComponents.changes.pipe(takeUntil(this._destroy$))\n .subscribe(() => this.subToIconsClicked(this.toggleComponents, () => this.open()));\n }\n /** @hidden @internal */\n ngAfterContentChecked() {\n if (this.inputGroup && this.prefixes?.length > 0) {\n this.inputGroup.prefixes = this.prefixes;\n }\n if (this.inputGroup && this.suffixes?.length > 0) {\n this.inputGroup.suffixes = this.suffixes;\n }\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this._destroy$.next();\n this._destroy$.complete();\n }\n /** Subscribes to the click events of toggle/clear icons in a query */\n subToIconsClicked(components, next) {\n components.forEach(toggle => {\n toggle.clicked\n .pipe(takeUntil(merge(components.changes, this._destroy$)))\n .subscribe(next);\n });\n }\n ;\n}\nPickerBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: PickerBaseDirective, deps: [{ token: i0.ElementRef }, { token: LOCALE_ID }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nPickerBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: PickerBaseDirective, inputs: { inputFormat: \"inputFormat\", displayFormat: \"displayFormat\", placeholder: \"placeholder\", mode: \"mode\", overlaySettings: \"overlaySettings\", disabled: \"disabled\", locale: \"locale\", weekStart: \"weekStart\", outlet: \"outlet\", type: \"type\", tabIndex: \"tabIndex\" }, outputs: { opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\" }, queries: [{ propertyName: \"toggleComponents\", predicate: IgxPickerToggleComponent, descendants: true }, { propertyName: \"prefixes\", predicate: IgxPrefixDirective, descendants: true }, { propertyName: \"suffixes\", predicate: IgxSuffixDirective, descendants: true }], viewQueries: [{ propertyName: \"inputGroup\", first: true, predicate: IgxInputGroupComponent, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: PickerBaseDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }]; }, propDecorators: { inputFormat: [{\n type: Input\n }], displayFormat: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], mode: [{\n type: Input\n }], overlaySettings: [{\n type: Input\n }], disabled: [{\n type: Input\n }], locale: [{\n type: Input\n }], weekStart: [{\n type: Input\n }], outlet: [{\n type: Input\n }], type: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], toggleComponents: [{\n type: ContentChildren,\n args: [IgxPickerToggleComponent, { descendants: true }]\n }], prefixes: [{\n type: ContentChildren,\n args: [IgxPrefixDirective, { descendants: true }]\n }], suffixes: [{\n type: ContentChildren,\n args: [IgxSuffixDirective, { descendants: true }]\n }], inputGroup: [{\n type: ViewChild,\n args: [IgxInputGroupComponent]\n }] } });\n\nlet NEXT_ID$d = 0;\n/**\n * Date Picker displays a popup calendar that lets users select a single date.\n *\n * @igxModule IgxDatePickerModule\n * @igxTheme igx-calendar-theme, igx-icon-theme\n * @igxGroup Scheduling\n * @igxKeywords datepicker, calendar, schedule, date\n * @example\n * ```html\n * \n * ```\n */\nclass IgxDatePickerComponent extends PickerBaseDirective {\n /**\n * Gets/Sets the disabled dates descriptors.\n *\n * @example\n * ```typescript\n * let disabledDates = this.datepicker.disabledDates;\n * this.datePicker.disabledDates = [ {type: DateRangeType.Weekends}, ...];\n * ```\n */\n get disabledDates() {\n return this._disabledDates;\n }\n set disabledDates(value) {\n this._disabledDates = value;\n this._onValidatorChange();\n }\n /**\n * Gets/Sets the special dates descriptors.\n *\n * @example\n * ```typescript\n * let specialDates = this.datepicker.specialDates;\n * this.datePicker.specialDates = [ {type: DateRangeType.Weekends}, ... ];\n * ```\n */\n get specialDates() {\n return this._specialDates;\n }\n set specialDates(value) {\n this._specialDates = value;\n }\n //#endregion\n /**\n * Gets/Sets the selected date.\n *\n * @example\n * ```html\n * \n * ```\n */\n get value() {\n return this._value;\n }\n set value(date) {\n this._value = date;\n this.setDateValue(date);\n if (this.dateTimeEditor.value !== date) {\n this.dateTimeEditor.value = this._dateValue;\n }\n this.valueChange.emit(this.dateValue);\n this._onChangeCallback(this.dateValue);\n }\n /**\n * The minimum value the picker will accept.\n *\n * @example\n * \n */\n set minValue(value) {\n this._minValue = value;\n this._onValidatorChange();\n }\n get minValue() {\n return this._minValue;\n }\n /**\n * The maximum value the picker will accept.\n *\n * @example\n * \n */\n set maxValue(value) {\n this._maxValue = value;\n this._onValidatorChange();\n }\n get maxValue() {\n return this._maxValue;\n }\n get dialogOverlaySettings() {\n return Object.assign({}, this._dialogOverlaySettings, this.overlaySettings);\n }\n get dropDownOverlaySettings() {\n return Object.assign({}, this._dropDownOverlaySettings, this.overlaySettings);\n }\n get inputGroupElement() {\n return this.inputGroup?.element.nativeElement;\n }\n get dateValue() {\n return this._dateValue;\n }\n get pickerFormatViews() {\n return Object.assign({}, this._defFormatViews, this.formatViews);\n }\n get pickerCalendarFormat() {\n return Object.assign({}, this._calendarFormat, this.calendarFormat);\n }\n constructor(element, _localeId, _overlayService, _injector, _renderer, platform, cdr, _displayDensityOptions, _inputGroupType) {\n super(element, _localeId, _displayDensityOptions, _inputGroupType);\n this._overlayService = _overlayService;\n this._injector = _injector;\n this._renderer = _renderer;\n this.platform = platform;\n this.cdr = cdr;\n /**\n * Gets/Sets the number of month views displayed.\n *\n * @remarks\n * Default value is `1`.\n *\n * @example\n * ```html\n * \n * ```\n * @example\n * ```typescript\n * let monthViewsDisplayed = this.datePicker.displayMonthsCount;\n * ```\n */\n this.displayMonthsCount = 1;\n /**\n * Gets/Sets the orientation of the `IgxDatePickerComponent` header.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.headerOrientation = PickerHeaderOrientation.Horizontal;\n /**\n * Specify if the currently spun date segment should loop over.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.spinLoop = true;\n /**\n * Gets/Sets the value of `id` attribute.\n *\n * @remarks If not provided it will be automatically generated.\n * @example\n * ```html\n * \n * ```\n */\n this.id = `igx-date-picker-${NEXT_ID$d++}`;\n /** @hidden @internal */\n this.readOnly = false;\n /**\n * Emitted when the picker's value changes.\n *\n * @remarks\n * Used for `two-way` bindings.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.valueChange = new EventEmitter();\n /**\n * Emitted when the user types/spins invalid date in the date-picker editor.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.validationFailed = new EventEmitter();\n /** @hidden @internal */\n this.displayValue = { transform: (date) => this.formatter(date) };\n this._resourceStrings = CurrentResourceStrings.DatePickerResourceStrings;\n this._ngControl = null;\n this._specialDates = null;\n this._disabledDates = null;\n this._overlaySubFilter = [\n filter(x => x.id === this._overlayId),\n takeUntil(this._destroy$)\n ];\n this._dropDownOverlaySettings = {\n target: this.inputGroupElement,\n closeOnOutsideClick: true,\n modal: false,\n closeOnEscape: true,\n scrollStrategy: new AbsoluteScrollStrategy(),\n positionStrategy: new AutoPositionStrategy({\n openAnimation: fadeIn,\n closeAnimation: fadeOut\n })\n };\n this._dialogOverlaySettings = {\n closeOnOutsideClick: true,\n modal: true,\n closeOnEscape: true\n };\n this._calendarFormat = {\n day: 'numeric',\n month: 'short',\n weekday: 'short',\n year: 'numeric'\n };\n this._defFormatViews = {\n day: false,\n month: true,\n year: false\n };\n this._onChangeCallback = noop;\n this._onTouchedCallback = noop;\n this._onValidatorChange = noop;\n this.onStatusChanged = () => {\n this.disabled = this._ngControl.disabled;\n this.updateValidity();\n this.inputGroup.isRequired = this.required;\n };\n this.locale = this.locale || this._localeId;\n }\n /** @hidden @internal */\n get required() {\n if (this._ngControl && this._ngControl.control && this._ngControl.control.validator) {\n // Run the validation with empty object to check if required is enabled.\n const error = this._ngControl.control.validator({});\n return error && error.required;\n }\n return false;\n }\n /** @hidden @internal */\n get pickerResourceStrings() {\n return Object.assign({}, this._resourceStrings, this.resourceStrings);\n }\n /** @hidden @internal */\n onKeyDown(event) {\n switch (event.key) {\n case this.platform.KEYMAP.ARROW_UP:\n if (event.altKey) {\n this.close();\n }\n break;\n case this.platform.KEYMAP.ARROW_DOWN:\n if (event.altKey) {\n this.open();\n }\n break;\n case this.platform.KEYMAP.SPACE:\n event.preventDefault();\n this.open();\n break;\n }\n }\n /**\n * Opens the picker's dropdown or dialog.\n *\n * @example\n * ```html\n * \n *\n * \n * ```\n */\n open(settings) {\n if (!this.collapsed || this.disabled) {\n return;\n }\n const overlaySettings = Object.assign({}, this.isDropdown\n ? this.dropDownOverlaySettings\n : this.dialogOverlaySettings, settings);\n if (this.isDropdown && this.inputGroupElement) {\n overlaySettings.target = this.inputGroupElement;\n }\n if (this.outlet) {\n overlaySettings.outlet = this.outlet;\n }\n this._overlayId = this._overlayService\n .attach(IgxCalendarContainerComponent, this.viewContainerRef, overlaySettings);\n this._overlayService.show(this._overlayId);\n }\n /**\n * Toggles the picker's dropdown or dialog\n *\n * @example\n * ```html\n * \n *\n * \n * ```\n */\n toggle(settings) {\n if (this.collapsed) {\n this.open(settings);\n }\n else {\n this.close();\n }\n }\n /**\n * Closes the picker's dropdown or dialog.\n *\n * @example\n * ```html\n * \n *\n * \n * ```\n */\n close() {\n if (!this.collapsed) {\n this._overlayService.hide(this._overlayId);\n }\n }\n /**\n * Selects a date.\n *\n * @remarks Updates the value in the input field.\n *\n * @example\n * ```typescript\n * this.datePicker.select(date);\n * ```\n * @param date passed date that has to be set to the calendar.\n */\n select(value) {\n this.value = value;\n }\n /**\n * Selects today's date and closes the picker.\n *\n * @example\n * ```html\n * \n *\n * \n * ```\n * */\n selectToday() {\n const today = new Date();\n today.setHours(0);\n today.setMinutes(0);\n today.setSeconds(0);\n today.setMilliseconds(0);\n this.select(today);\n this.close();\n }\n /**\n * Clears the input field and the picker's value.\n *\n * @example\n * ```typescript\n * this.datePicker.clear();\n * ```\n */\n clear() {\n if (!this.disabled) {\n this._calendar?.deselectDate();\n this.dateTimeEditor.clear();\n }\n }\n /**\n * Increment a specified `DatePart`.\n *\n * @param datePart The optional DatePart to increment. Defaults to Date.\n * @param delta The optional delta to increment by. Overrides `spinDelta`.\n * @example\n * ```typescript\n * this.datePicker.increment(DatePart.Date);\n * ```\n */\n increment(datePart, delta) {\n this.dateTimeEditor.increment(datePart, delta);\n }\n /**\n * Decrement a specified `DatePart`\n *\n * @param datePart The optional DatePart to decrement. Defaults to Date.\n * @param delta The optional delta to decrement by. Overrides `spinDelta`.\n * @example\n * ```typescript\n * this.datePicker.decrement(DatePart.Date);\n * ```\n */\n decrement(datePart, delta) {\n this.dateTimeEditor.decrement(datePart, delta);\n }\n //#region Control Value Accessor\n /** @hidden @internal */\n writeValue(value) {\n this._value = value;\n this.setDateValue(value);\n if (this.dateTimeEditor.value !== value) {\n this.dateTimeEditor.value = this._dateValue;\n }\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n //#endregion\n //#region Validator\n /** @hidden @internal */\n registerOnValidatorChange(fn) {\n this._onValidatorChange = fn;\n }\n /** @hidden @internal */\n validate(control) {\n if (!control.value) {\n return null;\n }\n // InvalidDate handling\n if (isDate(control.value) && !DateTimeUtil.isValidDate(control.value)) {\n return { value: true };\n }\n const errors = {};\n const value = DateTimeUtil.isValidDate(control.value) ? control.value : DateTimeUtil.parseIsoDate(control.value);\n if (value && this.disabledDates && isDateInRanges(value, this.disabledDates)) {\n Object.assign(errors, { dateIsDisabled: true });\n }\n Object.assign(errors, DateTimeUtil.validateMinMax(value, this.minValue, this.maxValue, false));\n return Object.keys(errors).length > 0 ? errors : null;\n }\n //#endregion\n /** @hidden @internal */\n ngOnInit() {\n this._ngControl = this._injector.get(NgControl, null);\n this.locale = this.locale || this._localeId;\n super.ngOnInit();\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.subscribeToClick();\n this.subscribeToOverlayEvents();\n this.subscribeToDateEditorEvents();\n this.subToIconsClicked(this.clearComponents, () => this.clear());\n this.clearComponents.changes.pipe(takeUntil(this._destroy$))\n .subscribe(() => this.subToIconsClicked(this.clearComponents, () => this.clear()));\n this._dropDownOverlaySettings.excludeFromOutsideClick = [this.inputGroup.element.nativeElement];\n fromEvent(this.inputDirective.nativeElement, 'blur')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (this.collapsed) {\n this._onTouchedCallback();\n this.updateValidity();\n }\n });\n if (this._ngControl) {\n this._statusChanges$ =\n this._ngControl.statusChanges.subscribe(this.onStatusChanged.bind(this));\n if (this._ngControl.control.validator) {\n this.inputGroup.isRequired = this.required;\n this.cdr.detectChanges();\n }\n }\n }\n /** @hidden @internal */\n ngAfterViewChecked() {\n if (this.labelDirective) {\n this._renderer.setAttribute(this.inputDirective.nativeElement, 'aria-labelledby', this.labelDirective.id);\n }\n }\n /** @hidden @internal */\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._statusChanges$) {\n this._statusChanges$.unsubscribe();\n }\n if (this._overlayId) {\n this._overlayService.detach(this._overlayId);\n delete this._overlayId;\n }\n }\n /** @hidden @internal */\n getEditElement() {\n return this.inputDirective.nativeElement;\n }\n subscribeToClick() {\n fromEvent(this.getEditElement(), 'click')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.isDropdown) {\n this.toggle();\n }\n });\n }\n setDateValue(value) {\n if (isDate(value) && isNaN(value.getTime())) {\n this._dateValue = value;\n return;\n }\n this._dateValue = DateTimeUtil.isValidDate(value) ? value : DateTimeUtil.parseIsoDate(value);\n }\n updateValidity() {\n // B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526\n if (this._ngControl && !this.disabled && this.isTouchedOrDirty) {\n if (this.inputGroup.isFocused) {\n this.inputDirective.valid = this._ngControl.valid\n ? IgxInputState.VALID\n : IgxInputState.INVALID;\n }\n else {\n this.inputDirective.valid = this._ngControl.valid\n ? IgxInputState.INITIAL\n : IgxInputState.INVALID;\n }\n }\n else {\n this.inputDirective.valid = IgxInputState.INITIAL;\n }\n }\n get isTouchedOrDirty() {\n return (this._ngControl.control.touched || this._ngControl.control.dirty)\n && (!!this._ngControl.control.validator || !!this._ngControl.control.asyncValidator);\n }\n handleSelection(date) {\n if (this.dateValue && DateTimeUtil.isValidDate(this.dateValue)) {\n date.setHours(this.dateValue.getHours());\n date.setMinutes(this.dateValue.getMinutes());\n date.setSeconds(this.dateValue.getSeconds());\n date.setMilliseconds(this.dateValue.getMilliseconds());\n }\n this.value = date;\n this._calendar.viewDate = date;\n this.close();\n }\n subscribeToDateEditorEvents() {\n this.dateTimeEditor.valueChange.pipe(takeUntil(this._destroy$)).subscribe(val => {\n this.value = val;\n });\n this.dateTimeEditor.validationFailed.pipe(takeUntil(this._destroy$)).subscribe((event) => {\n this.validationFailed.emit({\n owner: this,\n prevValue: event.oldValue,\n currentValue: this.value\n });\n });\n }\n subscribeToOverlayEvents() {\n this._overlayService.opening.pipe(...this._overlaySubFilter).subscribe((e) => {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.opening.emit(args);\n e.cancel = args.cancel;\n if (args.cancel) {\n this._overlayService.detach(this._overlayId);\n return;\n }\n this._initializeCalendarContainer(e.componentRef.instance);\n this._collapsed = false;\n });\n this._overlayService.opened.pipe(...this._overlaySubFilter).subscribe(() => {\n this.opened.emit({ owner: this });\n if (this._calendar?.daysView?.selectedDates) {\n this._calendar?.daysView?.focusActiveDate();\n return;\n }\n if (this._targetViewDate) {\n this._targetViewDate.setHours(0, 0, 0, 0);\n this._calendar?.daysView?.dates\n .find(d => d.date.date.getTime() === this._targetViewDate.getTime())?.nativeElement.focus();\n }\n });\n this._overlayService.closing.pipe(...this._overlaySubFilter).subscribe((e) => {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.closing.emit(args);\n e.cancel = args.cancel;\n if (args.cancel) {\n return;\n }\n // do not focus the input if clicking outside in dropdown mode\n if (this.getEditElement() && !(args.event && this.isDropdown)) {\n this.inputDirective.focus();\n }\n else {\n this._onTouchedCallback();\n this.updateValidity();\n }\n });\n this._overlayService.closed.pipe(...this._overlaySubFilter).subscribe(() => {\n this.closed.emit({ owner: this });\n this._overlayService.detach(this._overlayId);\n this._collapsed = true;\n this._overlayId = null;\n });\n }\n getMinMaxDates() {\n const minValue = DateTimeUtil.isValidDate(this.minValue) ? this.minValue : DateTimeUtil.parseIsoDate(this.minValue);\n const maxValue = DateTimeUtil.isValidDate(this.maxValue) ? this.maxValue : DateTimeUtil.parseIsoDate(this.maxValue);\n return { minValue, maxValue };\n }\n setDisabledDates() {\n this._calendar.disabledDates = this.disabledDates ? [...this.disabledDates] : [];\n const { minValue, maxValue } = this.getMinMaxDates();\n if (minValue) {\n this._calendar.disabledDates.push({ type: DateRangeType.Before, dateRange: [minValue] });\n }\n if (maxValue) {\n this._calendar.disabledDates.push({ type: DateRangeType.After, dateRange: [maxValue] });\n }\n }\n _initializeCalendarContainer(componentInstance) {\n this._calendar = componentInstance.calendar;\n const isVertical = this.headerOrientation === PickerHeaderOrientation.Vertical;\n this._calendar.hasHeader = !this.isDropdown;\n this._calendar.formatOptions = this.pickerCalendarFormat;\n this._calendar.formatViews = this.pickerFormatViews;\n this._calendar.locale = this.locale;\n this._calendar.vertical = isVertical;\n this._calendar.weekStart = this.weekStart;\n this._calendar.specialDates = this.specialDates;\n this._calendar.headerTemplate = this.headerTemplate;\n this._calendar.subheaderTemplate = this.subheaderTemplate;\n this._calendar.hideOutsideDays = this.hideOutsideDays;\n this._calendar.monthsViewNumber = this.displayMonthsCount;\n this._calendar.showWeekNumbers = this.showWeekNumbers;\n this._calendar.selected.pipe(takeUntil(this._destroy$)).subscribe((ev) => this.handleSelection(ev));\n this.setDisabledDates();\n if (DateTimeUtil.isValidDate(this.dateValue)) {\n // calendar will throw if the picker's value is InvalidDate #9208\n this._calendar.value = this.dateValue;\n }\n this.setCalendarViewDate();\n componentInstance.mode = this.mode;\n componentInstance.vertical = isVertical;\n componentInstance.closeButtonLabel = this.cancelButtonLabel;\n componentInstance.todayButtonLabel = this.todayButtonLabel;\n componentInstance.pickerActions = this.pickerActions;\n componentInstance.calendarClose.pipe(takeUntil(this._destroy$)).subscribe(() => this.close());\n componentInstance.todaySelection.pipe(takeUntil(this._destroy$)).subscribe(() => this.selectToday());\n }\n setCalendarViewDate() {\n const { minValue, maxValue } = this.getMinMaxDates();\n this._dateValue = this.dateValue || new Date();\n if (minValue && DateTimeUtil.lessThanMinValue(this.dateValue, minValue)) {\n this._calendar.viewDate = this._targetViewDate = minValue;\n return;\n }\n if (maxValue && DateTimeUtil.greaterThanMaxValue(this.dateValue, maxValue)) {\n this._calendar.viewDate = this._targetViewDate = maxValue;\n return;\n }\n this._calendar.viewDate = this._targetViewDate = this.dateValue;\n }\n}\nIgxDatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: LOCALE_ID }, { token: IgxOverlayService }, { token: i0.Injector }, { token: i0.Renderer2 }, { token: PlatformUtil }, { token: i0.ChangeDetectorRef }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxDatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDatePickerComponent, selector: \"igx-date-picker\", inputs: { hideOutsideDays: \"hideOutsideDays\", displayMonthsCount: \"displayMonthsCount\", showWeekNumbers: \"showWeekNumbers\", formatter: \"formatter\", headerOrientation: \"headerOrientation\", todayButtonLabel: \"todayButtonLabel\", cancelButtonLabel: \"cancelButtonLabel\", spinLoop: \"spinLoop\", spinDelta: \"spinDelta\", outlet: \"outlet\", id: \"id\", formatViews: \"formatViews\", disabledDates: \"disabledDates\", specialDates: \"specialDates\", calendarFormat: \"calendarFormat\", value: \"value\", minValue: \"minValue\", maxValue: \"maxValue\", resourceStrings: \"resourceStrings\", readOnly: \"readOnly\" }, outputs: { valueChange: \"valueChange\", validationFailed: \"validationFailed\" }, host: { listeners: { \"keydown\": \"onKeyDown($event)\" }, properties: { \"attr.id\": \"this.id\" } }, providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxDatePickerComponent, multi: true },\n { provide: NG_VALIDATORS, useExisting: IgxDatePickerComponent, multi: true }\n ], queries: [{ propertyName: \"label\", first: true, predicate: IgxLabelDirective, descendants: true }, { propertyName: \"headerTemplate\", first: true, predicate: IgxCalendarHeaderTemplateDirective, descendants: true }, { propertyName: \"subheaderTemplate\", first: true, predicate: IgxCalendarSubheaderTemplateDirective, descendants: true }, { propertyName: \"pickerActions\", first: true, predicate: IgxPickerActionsDirective, descendants: true }, { propertyName: \"clearComponents\", predicate: IgxPickerClearComponent }], viewQueries: [{ propertyName: \"dateTimeEditor\", first: true, predicate: IgxDateTimeEditorDirective, descendants: true, static: true }, { propertyName: \"viewContainerRef\", first: true, predicate: IgxInputGroupComponent, descendants: true, read: ViewContainerRef }, { propertyName: \"labelDirective\", first: true, predicate: IgxLabelDirective, descendants: true }, { propertyName: \"inputDirective\", first: true, predicate: IgxInputDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n today\\n \\n\\n \\n\\n \\n clear\\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\", styles: [\":host{display:block}\\n\"], dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"directive\", type: IgxTextSelectionDirective, selector: \"[igxTextSelection]\", inputs: [\"igxTextSelection\"], exportAs: [\"igxTextSelection\"] }, { kind: \"directive\", type: IgxDateTimeEditorDirective, selector: \"[igxDateTimeEditor]\", inputs: [\"locale\", \"minValue\", \"maxValue\", \"spinLoop\", \"displayFormat\", \"igxDateTimeEditor\", \"value\", \"spinDelta\"], outputs: [\"valueChange\", \"validationFailed\"], exportAs: [\"igxDateTimeEditor\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDatePickerComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxDatePickerComponent, multi: true },\n { provide: NG_VALIDATORS, useExisting: IgxDatePickerComponent, multi: true }\n ], selector: 'igx-date-picker', template: \"\\n \\n today\\n \\n\\n \\n\\n \\n clear\\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\", styles: [\":host{display:block}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: i0.Injector }, { type: i0.Renderer2 }, { type: PlatformUtil }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }]; }, propDecorators: { hideOutsideDays: [{\n type: Input\n }], displayMonthsCount: [{\n type: Input\n }], showWeekNumbers: [{\n type: Input\n }], formatter: [{\n type: Input\n }], headerOrientation: [{\n type: Input\n }], todayButtonLabel: [{\n type: Input\n }], cancelButtonLabel: [{\n type: Input\n }], spinLoop: [{\n type: Input\n }], spinDelta: [{\n type: Input\n }], outlet: [{\n type: Input\n }], id: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.id']\n }], formatViews: [{\n type: Input\n }], disabledDates: [{\n type: Input\n }], specialDates: [{\n type: Input\n }], calendarFormat: [{\n type: Input\n }], value: [{\n type: Input\n }], minValue: [{\n type: Input\n }], maxValue: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], readOnly: [{\n type: Input\n }], valueChange: [{\n type: Output\n }], validationFailed: [{\n type: Output\n }], clearComponents: [{\n type: ContentChildren,\n args: [IgxPickerClearComponent]\n }], label: [{\n type: ContentChild,\n args: [IgxLabelDirective]\n }], headerTemplate: [{\n type: ContentChild,\n args: [IgxCalendarHeaderTemplateDirective]\n }], dateTimeEditor: [{\n type: ViewChild,\n args: [IgxDateTimeEditorDirective, { static: true }]\n }], viewContainerRef: [{\n type: ViewChild,\n args: [IgxInputGroupComponent, { read: ViewContainerRef }]\n }], labelDirective: [{\n type: ViewChild,\n args: [IgxLabelDirective]\n }], inputDirective: [{\n type: ViewChild,\n args: [IgxInputDirective]\n }], subheaderTemplate: [{\n type: ContentChild,\n args: [IgxCalendarSubheaderTemplateDirective]\n }], pickerActions: [{\n type: ContentChild,\n args: [IgxPickerActionsDirective]\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\n/** @hidden */\nclass IgxDatePickerModule {\n}\nIgxDatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDatePickerModule, declarations: [IgxDatePickerComponent], imports: [FormsModule,\n CommonModule,\n IgxIconModule,\n IgxMaskModule,\n IgxCalendarModule,\n IgxInputGroupModule,\n IgxPickersCommonModule,\n IgxTextSelectionModule,\n IgxDateTimeEditorModule,\n IgxCalendarContainerModule], exports: [IgxDatePickerComponent,\n IgxPickersCommonModule,\n IgxInputGroupModule] });\nIgxDatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDatePickerModule, imports: [FormsModule,\n CommonModule,\n IgxIconModule,\n IgxMaskModule,\n IgxCalendarModule,\n IgxInputGroupModule,\n IgxPickersCommonModule,\n IgxTextSelectionModule,\n IgxDateTimeEditorModule,\n IgxCalendarContainerModule, IgxPickersCommonModule,\n IgxInputGroupModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDatePickerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxDatePickerComponent\n ],\n exports: [\n IgxDatePickerComponent,\n IgxPickersCommonModule,\n IgxInputGroupModule\n ],\n imports: [\n FormsModule,\n CommonModule,\n IgxIconModule,\n IgxMaskModule,\n IgxCalendarModule,\n IgxInputGroupModule,\n IgxPickersCommonModule,\n IgxTextSelectionModule,\n IgxDateTimeEditorModule,\n IgxCalendarContainerModule,\n ]\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxDialogTitleDirective {\n constructor() {\n this.defaultStyle = true;\n }\n}\nIgxDialogTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxDialogTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDialogTitleDirective, selector: \"igx-dialog-title,[igxDialogTitle]\", host: { properties: { \"class.igx-dialog__window-title\": \"this.defaultStyle\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogTitleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-dialog-title,[igxDialogTitle]'\n }]\n }], propDecorators: { defaultStyle: [{\n type: HostBinding,\n args: ['class.igx-dialog__window-title']\n }] } });\n/**\n * @hidden\n */\nclass IgxDialogActionsDirective {\n constructor() {\n this.defaultClass = true;\n }\n}\nIgxDialogActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxDialogActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDialogActionsDirective, selector: \"igx-dialog-actions,[igxDialogActions]\", host: { properties: { \"class.igx-dialog__window-actions\": \"this.defaultClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogActionsDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-dialog-actions,[igxDialogActions]'\n }]\n }], propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-dialog__window-actions']\n }] } });\n\nlet DIALOG_ID = 0;\n/**\n * **Ignite UI for Angular Dialog Window** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/dialog.html)\n *\n * The Ignite UI Dialog Window presents a dialog window to the user which can simply display messages or display\n * more complicated visuals such as a user sign-in form. It also provides a right and left button\n * which can be used for custom actions.\n *\n * Example:\n * ```html\n * \n * \n *
    \n * \n * \n * \n * \n *
    \n *
    \n * \n * \n * \n * \n *
    \n *
    \n * ```\n */\nclass IgxDialogComponent {\n /**\n * Controls whether the dialog should be shown as modal. Defaults to `true`\n * ```html\n * \n * ```\n */\n get isModal() {\n return this._isModal;\n }\n set isModal(val) {\n this._overlayDefaultSettings.modal = val;\n this._isModal = val;\n }\n /**\n * Controls whether the dialog should close when `Esc` key is pressed. Defaults to `true`\n * ```html\n * \n * ```\n */\n get closeOnEscape() {\n return this._closeOnEscape;\n }\n set closeOnEscape(val) {\n this._overlayDefaultSettings.closeOnEscape = val;\n this._closeOnEscape = val;\n }\n /**\n * An @Input property that allows you to enable the \"close on click outside the dialog\". By default it's disabled.\n * ```html\n * \n * \n * ```\n */\n get closeOnOutsideSelect() {\n return this._closeOnOutsideSelect;\n }\n set closeOnOutsideSelect(val) {\n this._overlayDefaultSettings.closeOnOutsideClick = val;\n this._closeOnOutsideSelect = val;\n }\n /**\n * Get the position and animation settings used by the dialog.\n * ```typescript\n * @ViewChild('alert', { static: true }) public alert: IgxDialogComponent;\n * let currentPosition: PositionSettings = this.alert.positionSettings\n * ```\n */\n get positionSettings() {\n return this._positionSettings;\n }\n /**\n * Set the position and animation settings used by the dialog.\n * ```typescript\n * import { slideInLeft, slideOutRight } from 'igniteui-angular';\n * ...\n * @ViewChild('alert', { static: true }) public alert: IgxDialogComponent;\n * public newPositionSettings: PositionSettings = {\n * openAnimation: useAnimation(slideInTop, { params: { duration: '2000ms' } }),\n * closeAnimation: useAnimation(slideOutBottom, { params: { duration: '2000ms'} }),\n * horizontalDirection: HorizontalAlignment.Left,\n * verticalDirection: VerticalAlignment.Middle,\n * horizontalStartPoint: HorizontalAlignment.Left,\n * verticalStartPoint: VerticalAlignment.Middle,\n * minSize: { height: 100, width: 100 }\n * };\n * this.alert.positionSettings = this.newPositionSettings;\n * ```\n */\n set positionSettings(settings) {\n this._positionSettings = settings;\n this._overlayDefaultSettings.positionStrategy = new GlobalPositionStrategy(this._positionSettings);\n }\n /**\n * @hidden\n */\n get element() {\n return this.elementRef.nativeElement;\n }\n /**\n * Returns the value of state. Possible state values are \"open\" or \"close\".\n * ```typescript\n * @ViewChild(\"MyDialog\")\n * public dialog: IgxDialogComponent;\n * ngAfterViewInit() {\n * let dialogState = this.dialog.state;\n * }\n * ```\n */\n get state() {\n return this.isOpen ? 'open' : 'close';\n }\n /**\n * State of the dialog.\n *\n * ```typescript\n * // get\n * let dialogIsOpen = this.dialog.isOpen;\n * ```\n *\n * ```html\n * \n * \n * ```\n *\n * Two-way data binding.\n * ```html\n * \n * \n * ```\n */\n get isOpen() {\n return !this.toggleRef.collapsed;\n }\n set isOpen(value) {\n if (value !== this.isOpen) {\n this.isOpenChange.emit(value);\n if (value) {\n requestAnimationFrame(() => {\n this.open();\n });\n }\n else {\n this.close();\n }\n }\n }\n get isCollapsed() {\n return this.toggleRef.collapsed;\n }\n /**\n * Returns the value of the role of the dialog. The valid values are `dialog`, `alertdialog`, `alert`.\n * ```typescript\n * @ViewChild(\"MyDialog\")\n * public dialog: IgxDialogComponent;\n * ngAfterViewInit() {\n * let dialogRole = this.dialog.role;\n * }\n * ```\n */\n get role() {\n if (this.leftButtonLabel !== '' && this.rightButtonLabel !== '') {\n return 'dialog';\n }\n else if (this.leftButtonLabel !== '' ||\n this.rightButtonLabel !== '') {\n return 'alertdialog';\n }\n else {\n return 'alert';\n }\n }\n /**\n * Returns the value of the title id.\n * ```typescript\n * @ViewChild(\"MyDialog\")\n * public dialog: IgxDialogComponent;\n * ngAfterViewInit() {\n * let dialogTitle = this.dialog.titleId;\n * }\n * ```\n */\n get titleId() {\n return this._titleId;\n }\n constructor(elementRef, navService) {\n this.elementRef = elementRef;\n this.navService = navService;\n /**\n * An @Input property that sets the value of the `id` attribute. If not provided it will be automatically generated.\n * ```html\n * \n * \n * ```\n */\n this.id = `igx-dialog-${DIALOG_ID++}`;\n /**\n * An @Input property to set whether the Tab key focus is trapped within the dialog when opened.\n * Defaults to `true`.\n * ```html\n * \n * ```\n */\n this.focusTrap = true;\n /**\n * An @Input property controlling the `title` of the dialog.\n * ```html\n * \n * ```\n */\n this.title = '';\n /**\n * An @Input property controlling the `message` of the dialog.\n * ```html\n * \n * ```\n */\n this.message = '';\n /**\n * An @Input property to set the `label` of the left button of the dialog.\n * ```html\n * \n * ```\n */\n this.leftButtonLabel = '';\n /**\n * An @Input property to set the left button `type`. The types are `flat`, `raised` and `fab`.\n * The `flat` type button is a rectangle and doesn't have a shadow.
    \n * The `raised` type button is also a rectangle but has a shadow.
    \n * The `fab` type button is a circle with a shadow.
    \n * The default value is `flat`.\n * ```html\n * \n * ```\n */\n this.leftButtonType = 'flat';\n /**\n * An @Input property to set the left button color. The property accepts all valid CSS color property values.\n * ```html\n * \n * ```\n */\n this.leftButtonColor = '';\n /**\n * An @Input property to set the left button `background-color`. The property accepts all valid CSS color property values.\n * ```html\n * \n * ```\n */\n this.leftButtonBackgroundColor = '';\n /**\n * An @Input property to set the left button `ripple`. The `ripple` animates a click/tap to a component as a series of fading waves.\n * The property accepts all valid CSS color property values.\n * ```html\n * \n * ```\n */\n this.leftButtonRipple = '';\n /**\n * An @Input property to set the `label` of the right button of the dialog.\n * ```html\n * \n * ```\n */\n this.rightButtonLabel = '';\n /**\n * An @Input property to set the right button `type`. The types are `flat`, `raised` and `fab`.\n * The `flat` type button is a rectangle and doesn't have a shadow.
    \n * The `raised` type button is also a rectangle but has a shadow.
    \n * The `fab` type button is a circle with a shadow.
    \n * The default value is `flat`.\n * ```html\n * \n * ```\n */\n this.rightButtonType = 'flat';\n /**\n * An @Input property to set the right button `color`. The property accepts all valid CSS color property values.\n * ```html\n * \n * ```\n */\n this.rightButtonColor = '';\n /**\n * An @Input property to set the right button `background-color`. The property accepts all valid CSS color property values.\n * ```html\n * \n * ```\n */\n this.rightButtonBackgroundColor = '';\n /**\n * An @Input property to set the right button `ripple`.\n * ```html\n * \n * ```\n */\n this.rightButtonRipple = '';\n /**\n * The default `tabindex` attribute for the component\n *\n * @hidden\n */\n this.tabindex = -1;\n /**\n * An event that is emitted before the dialog is opened.\n * ```html\n * \n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * An event that is emitted after the dialog is opened.\n * ```html\n * \n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * An event that is emitted before the dialog is closed.\n * ```html\n * \n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * An event that is emitted after the dialog is closed.\n * ```html\n * \n * \n * ```\n */\n this.closed = new EventEmitter();\n /**\n * An event that is emitted when the left button is clicked.\n * ```html\n * \n * \n * ```\n */\n this.leftButtonSelect = new EventEmitter();\n /**\n * An event that is emitted when the right button is clicked.\n * ```html\n * \n * \n * ```\n */\n this.rightButtonSelect = new EventEmitter();\n /**\n * @hidden\n */\n this.isOpenChange = new EventEmitter();\n this.destroy$ = new Subject();\n this._positionSettings = {\n openAnimation: fadeIn,\n closeAnimation: fadeOut\n };\n this._closeOnOutsideSelect = false;\n this._closeOnEscape = true;\n this._isModal = true;\n this._titleId = IgxDialogComponent.NEXT_ID++ + '_title';\n this._overlayDefaultSettings = {\n positionStrategy: new GlobalPositionStrategy(this._positionSettings),\n scrollStrategy: new NoOpScrollStrategy(),\n modal: this.isModal,\n closeOnEscape: this._closeOnEscape,\n closeOnOutsideClick: this.closeOnOutsideSelect\n };\n }\n ngAfterContentInit() {\n this.toggleRef.closing.pipe(takeUntil(this.destroy$)).subscribe((eventArgs) => this.emitCloseFromDialog(eventArgs));\n this.toggleRef.closed.pipe(takeUntil(this.destroy$)).subscribe((eventArgs) => this.emitClosedFromDialog(eventArgs));\n this.toggleRef.opened.pipe(takeUntil(this.destroy$)).subscribe((eventArgs) => this.emitOpenedFromDialog(eventArgs));\n }\n /**\n * A method that opens the dialog.\n *\n * @memberOf {@link IgxDialogComponent}\n * ```html\n * \n * \n * ```\n */\n open(overlaySettings = this._overlayDefaultSettings) {\n const eventArgs = { dialog: this, event: null, cancel: false };\n this.opening.emit(eventArgs);\n if (!eventArgs.cancel) {\n this.toggleRef.open(overlaySettings);\n this.isOpenChange.emit(true);\n if (!this.leftButtonLabel && !this.rightButtonLabel) {\n this.toggleRef.element.focus();\n }\n }\n }\n /**\n * A method that that closes the dialog.\n *\n * @memberOf {@link IgxDialogComponent}\n * ```html\n * \n * \n * ```\n */\n close() {\n // `closing` will emit from `toggleRef.closing` subscription\n this.toggleRef.close();\n }\n /**\n * A method that opens/closes the dialog.\n *\n * @memberOf {@link IgxDialogComponent}\n * ```html\n * \n * \n * ```\n */\n toggle() {\n if (this.isOpen) {\n this.close();\n }\n else {\n this.open();\n }\n }\n /**\n * @hidden\n */\n onDialogSelected(event) {\n event.stopPropagation();\n if (this.isOpen &&\n this.closeOnOutsideSelect &&\n event.target.classList.contains(IgxDialogComponent.DIALOG_CLASS)) {\n this.close();\n }\n }\n /**\n * @hidden\n */\n onInternalLeftButtonSelect(event) {\n this.leftButtonSelect.emit({ dialog: this, event });\n }\n /**\n * @hidden\n */\n onInternalRightButtonSelect(event) {\n this.rightButtonSelect.emit({ dialog: this, event });\n }\n /**\n * @hidden\n */\n ngOnInit() {\n if (this.navService && this.id) {\n this.navService.add(this.id, this);\n }\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n if (this.navService && this.id) {\n this.navService.remove(this.id);\n }\n }\n emitCloseFromDialog(eventArgs) {\n const dialogEventsArgs = { dialog: this, event: eventArgs.event, cancel: eventArgs.cancel };\n this.closing.emit(dialogEventsArgs);\n eventArgs.cancel = dialogEventsArgs.cancel;\n if (!eventArgs.cancel) {\n this.isOpenChange.emit(false);\n }\n }\n emitClosedFromDialog(eventArgs) {\n this.closed.emit({ dialog: this, event: eventArgs.event });\n }\n emitOpenedFromDialog(eventArgs) {\n this.opened.emit({ dialog: this, event: eventArgs.event });\n }\n}\nIgxDialogComponent.NEXT_ID = 1;\nIgxDialogComponent.DIALOG_CLASS = 'igx-dialog';\nIgxDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogComponent, deps: [{ token: i0.ElementRef }, { token: IgxNavigationService, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDialogComponent, selector: \"igx-dialog\", inputs: { id: \"id\", isModal: \"isModal\", closeOnEscape: \"closeOnEscape\", focusTrap: \"focusTrap\", title: \"title\", message: \"message\", leftButtonLabel: \"leftButtonLabel\", leftButtonType: \"leftButtonType\", leftButtonColor: \"leftButtonColor\", leftButtonBackgroundColor: \"leftButtonBackgroundColor\", leftButtonRipple: \"leftButtonRipple\", rightButtonLabel: \"rightButtonLabel\", rightButtonType: \"rightButtonType\", rightButtonColor: \"rightButtonColor\", rightButtonBackgroundColor: \"rightButtonBackgroundColor\", rightButtonRipple: \"rightButtonRipple\", closeOnOutsideSelect: \"closeOnOutsideSelect\", positionSettings: \"positionSettings\", isOpen: \"isOpen\", role: \"role\", titleId: \"titleId\" }, outputs: { opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\", leftButtonSelect: \"leftButtonSelect\", rightButtonSelect: \"rightButtonSelect\", isOpenChange: \"isOpenChange\" }, host: { properties: { \"attr.id\": \"this.id\", \"attr.tabindex\": \"this.tabindex\", \"class.igx-dialog--hidden\": \"this.isCollapsed\" } }, viewQueries: [{ propertyName: \"toggleRef\", first: true, predicate: IgxToggleDirective, descendants: true, static: true }], ngImport: i0, template: \"
    \\n
    \\n\\n
    \\n {{ title }}\\n
    \\n \\n\\n
    \\n {{ message }}\\n \\n
    \\n\\n
    \\n \\n \\n
    \\n \\n\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"directive\", type: IgxFocusDirective, selector: \"[igxFocus]\", inputs: [\"igxFocus\"], exportAs: [\"igxFocus\"] }, { kind: \"directive\", type: IgxFocusTrapDirective, selector: \"[igxFocusTrap]\", inputs: [\"igxFocusTrap\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-dialog', template: \"
    \\n
    \\n\\n
    \\n {{ title }}\\n
    \\n \\n\\n
    \\n {{ message }}\\n \\n
    \\n\\n
    \\n \\n \\n
    \\n \\n\\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { toggleRef: [{\n type: ViewChild,\n args: [IgxToggleDirective, { static: true }]\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], isModal: [{\n type: Input\n }], closeOnEscape: [{\n type: Input\n }], focusTrap: [{\n type: Input\n }], title: [{\n type: Input\n }], message: [{\n type: Input\n }], leftButtonLabel: [{\n type: Input\n }], leftButtonType: [{\n type: Input\n }], leftButtonColor: [{\n type: Input\n }], leftButtonBackgroundColor: [{\n type: Input\n }], leftButtonRipple: [{\n type: Input\n }], rightButtonLabel: [{\n type: Input\n }], rightButtonType: [{\n type: Input\n }], rightButtonColor: [{\n type: Input\n }], rightButtonBackgroundColor: [{\n type: Input\n }], rightButtonRipple: [{\n type: Input\n }], closeOnOutsideSelect: [{\n type: Input\n }], positionSettings: [{\n type: Input\n }], tabindex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], leftButtonSelect: [{\n type: Output\n }], rightButtonSelect: [{\n type: Output\n }], isOpenChange: [{\n type: Output\n }], isOpen: [{\n type: Input\n }], isCollapsed: [{\n type: HostBinding,\n args: ['class.igx-dialog--hidden']\n }], role: [{\n type: Input\n }], titleId: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxDialogModule {\n}\nIgxDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogModule, declarations: [IgxDialogComponent, IgxDialogTitleDirective, IgxDialogActionsDirective], imports: [CommonModule, IgxToggleModule, IgxButtonModule, IgxRippleModule, IgxFocusModule, IgxFocusTrapModule], exports: [IgxDialogComponent, IgxDialogTitleDirective, IgxDialogActionsDirective] });\nIgxDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogModule, imports: [CommonModule, IgxToggleModule, IgxButtonModule, IgxRippleModule, IgxFocusModule, IgxFocusTrapModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDialogModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxDialogComponent, IgxDialogTitleDirective, IgxDialogActionsDirective],\n exports: [IgxDialogComponent, IgxDialogTitleDirective, IgxDialogActionsDirective],\n imports: [CommonModule, IgxToggleModule, IgxButtonModule, IgxRippleModule, IgxFocusModule, IgxFocusTrapModule]\n }]\n }] });\n\nclass BaseFilteringComponent {\n constructor(cdr, element, platform) {\n this.cdr = cdr;\n this.element = element;\n this.platform = platform;\n }\n}\nBaseFilteringComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseFilteringComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nBaseFilteringComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: BaseFilteringComponent, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseFilteringComponent, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: PlatformUtil }]; } });\n\n/**\n * A component used for presenting Excel style clear filters UI.\n */\nclass IgxExcelStyleClearFiltersComponent {\n constructor(esf, platform) {\n this.esf = esf;\n this.platform = platform;\n }\n /**\n * @hidden @internal\n */\n clearFilterClass() {\n if (this.esf.column.filteringExpressionsTree) {\n return 'igx-excel-filter__actions-clear';\n }\n return 'igx-excel-filter__actions-clear--disabled';\n }\n /**\n * @hidden @internal\n */\n clearFilter() {\n this.esf.grid.filteringService.clearFilter(this.esf.column.field);\n this.selectAllFilterItems();\n }\n /**\n * @hidden @internal\n */\n onClearFilterKeyDown(eventArgs) {\n if (eventArgs.key === this.platform.KEYMAP.ENTER) {\n this.clearFilter();\n }\n }\n selectAllFilterItems() {\n this.esf.listData.forEach(filterListItem => {\n filterListItem.isSelected = true;\n filterListItem.indeterminate = false;\n });\n this.esf.detectChanges();\n }\n}\nIgxExcelStyleClearFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleClearFiltersComponent, deps: [{ token: BaseFilteringComponent }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleClearFiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleClearFiltersComponent, selector: \"igx-excel-style-clear-filters\", ngImport: i0, template: \"
    \\n {{ esf.grid.resourceStrings.igx_grid_excel_filter_clear }}\\n clear\\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleClearFiltersComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-clear-filters', template: \"
    \\n {{ esf.grid.resourceStrings.igx_grid_excel_filter_clear }}\\n clear\\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }, { type: PlatformUtil }]; } });\n\nclass IgxSelectItemComponent extends IgxDropDownItemComponent {\n /**\n * An @Input property that gets/sets the item's text to be displayed in the select component's input when the item is selected.\n *\n * ```typescript\n * //get\n * let mySelectedItem = this.dropDown.selectedItem;\n * let selectedItemText = mySelectedItem.text;\n * ```\n *\n * ```html\n * // set\n * \n * ```\n */\n get text() {\n return this._text;\n }\n set text(text) {\n this._text = text;\n }\n /** @hidden @internal */\n get itemText() {\n if (this._text !== undefined) {\n return this._text;\n }\n // If text @Input is undefined, try extract a meaningful item text out of the item template\n return this.elementRef.nativeElement.textContent.trim();\n }\n /**\n * Sets/Gets if the item is the currently selected one in the select\n *\n * ```typescript\n * let mySelectedItem = this.select.selectedItem;\n * let isMyItemSelected = mySelectedItem.selected; // true\n * ```\n */\n get selected() {\n return !this.isHeader && !this.disabled && this.selection.is_item_selected(this.dropDown.id, this);\n }\n set selected(value) {\n if (value && !this.isHeader && !this.disabled) {\n this.dropDown.selectItem(this);\n }\n }\n}\nIgxSelectItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxSelectItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectItemComponent, selector: \"igx-select-item\", inputs: { text: \"text\" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectItemComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-select-item',\n template: ''\n }]\n }], propDecorators: { text: [{\n type: Input\n }] } });\n\n/** @hidden @internal */\nlet SelectPositioningStrategy = class SelectPositioningStrategy extends BaseFitPositionStrategy {\n constructor(select, settings, platform) {\n super();\n this.select = select;\n this.platform = platform;\n this._selectDefaultSettings = {\n horizontalDirection: HorizontalAlignment.Right,\n verticalDirection: VerticalAlignment.Bottom,\n horizontalStartPoint: HorizontalAlignment.Left,\n verticalStartPoint: VerticalAlignment.Top,\n openAnimation: fadeIn,\n closeAnimation: fadeOut\n };\n // Global variables required for cases of !initialCall (page scroll/overlay repositionAll)\n this.global_yOffset = 0;\n this.global_xOffset = 0;\n this.global_styles = {};\n this.settings = Object.assign({}, this._selectDefaultSettings, settings);\n }\n /**\n * Position the element based on the PositionStrategy implementing this interface.\n *\n * @param contentElement The HTML element to be positioned\n * @param size Size of the element\n * @param document reference to the Document object\n * @param initialCall should be true if this is the initial call to the method\n * @param target attaching target for the component to show\n * ```typescript\n * settings.positionStrategy.position(content, size, document, true);\n * ```\n */\n position(contentElement, size, document, initialCall, target) {\n const targetElement = target || this.settings.target;\n const rects = super.calculateElementRectangles(contentElement, targetElement);\n // selectFit obj, to be used for both cases of initialCall and !initialCall(page scroll/overlay repositionAll)\n const selectFit = {\n verticalOffset: this.global_yOffset,\n horizontalOffset: this.global_xOffset,\n targetRect: rects.targetRect,\n contentElementRect: rects.elementRect,\n styles: this.global_styles,\n scrollContainer: this.select.scrollContainer,\n scrollContainerRect: this.select.scrollContainer.getBoundingClientRect()\n };\n if (initialCall) {\n this.select.scrollContainer.scrollTop = 0;\n // Fill in the required selectFit object properties.\n selectFit.viewPortRect = Util.getViewportRect(document);\n selectFit.itemElement = this.getInteractionItemElement();\n selectFit.itemRect = selectFit.itemElement.getBoundingClientRect();\n // Calculate input and selected item elements style related variables\n selectFit.styles = this.calculateStyles(selectFit, targetElement);\n selectFit.scrollAmount = this.calculateScrollAmount(selectFit);\n // Calculate how much to offset the overlay container.\n this.calculateYoffset(selectFit);\n this.calculateXoffset(selectFit);\n super.updateViewPortFit(selectFit);\n // container does not fit in viewPort and is out on Top or Bottom\n if (selectFit.fitVertical.back < 0 || selectFit.fitVertical.forward < 0) {\n this.fitInViewport(contentElement, selectFit);\n }\n // Calculate scrollTop independently of the dropdown, as we cover all `igsSelect` specific positioning and\n // scrolling to selected item scenarios here.\n this.select.scrollContainer.scrollTop = selectFit.scrollAmount;\n }\n this.setStyles(contentElement, selectFit);\n }\n /**\n * Obtain the selected item if there is such one or otherwise use the first one\n */\n getInteractionItemElement() {\n let itemElement;\n if (this.select.selectedItem) {\n itemElement = this.select.selectedItem.element.nativeElement;\n }\n else {\n itemElement = this.select.getFirstItemElement();\n }\n return itemElement;\n }\n /**\n * Position the items outer container so selected item text is positioned over input text and if header\n * And/OR footer - both header/footer are visible\n *\n * @param selectFit selectFit to use for computation.\n */\n fitInViewport(contentElement, selectFit) {\n const footer = selectFit.scrollContainerRect.bottom - selectFit.contentElementRect.bottom;\n const header = selectFit.scrollContainerRect.top - selectFit.contentElementRect.top;\n const lastItemFitSize = selectFit.targetRect.bottom + selectFit.styles.itemTextToInputTextDiff - footer;\n const firstItemFitSize = selectFit.targetRect.top - selectFit.styles.itemTextToInputTextDiff - header;\n // out of viewPort on Top\n if (selectFit.fitVertical.back < 0) {\n const possibleScrollAmount = selectFit.scrollContainer.scrollHeight -\n selectFit.scrollContainerRect.height - selectFit.scrollAmount;\n if (possibleScrollAmount + selectFit.fitVertical.back > 0 && firstItemFitSize > selectFit.viewPortRect.top) {\n selectFit.scrollAmount -= selectFit.fitVertical.back;\n selectFit.verticalOffset -= selectFit.fitVertical.back;\n this.global_yOffset = selectFit.verticalOffset;\n }\n else {\n selectFit.verticalOffset = 0;\n this.global_yOffset = 0;\n }\n // out of viewPort on Bottom\n }\n else if (selectFit.fitVertical.forward < 0) {\n if (selectFit.scrollAmount + selectFit.fitVertical.forward > 0 && lastItemFitSize < selectFit.viewPortRect.bottom) {\n selectFit.scrollAmount += selectFit.fitVertical.forward;\n selectFit.verticalOffset += selectFit.fitVertical.forward;\n this.global_yOffset = selectFit.verticalOffset;\n }\n else {\n selectFit.verticalOffset = -selectFit.contentElementRect.height + selectFit.targetRect.height;\n this.global_yOffset = selectFit.verticalOffset;\n }\n }\n }\n /**\n * Sets element's style which effectively positions the provided element\n *\n * @param element Element to position\n * @param selectFit selectFit to use for computation.\n * @param initialCall should be true if this is the initial call to the position method calling setStyles\n */\n setStyles(contentElement, selectFit) {\n super.setStyle(contentElement, selectFit.targetRect, selectFit.contentElementRect, selectFit);\n contentElement.style.width = `${selectFit.styles.contentElementNewWidth}px`; // manage container based on paddings?\n this.global_styles.contentElementNewWidth = selectFit.styles.contentElementNewWidth;\n }\n /**\n * Calculate selected item scroll position.\n */\n calculateScrollAmount(selectFit) {\n const itemElementRect = selectFit.itemRect;\n const scrollContainer = selectFit.scrollContainer;\n const scrollContainerRect = selectFit.scrollContainerRect;\n const scrollDelta = scrollContainerRect.top - itemElementRect.top;\n let scrollPosition = scrollContainer.scrollTop - scrollDelta;\n const dropDownHeight = scrollContainer.clientHeight;\n scrollPosition -= dropDownHeight / 2;\n scrollPosition += itemElementRect.height / 2;\n return Math.round(Math.min(Math.max(0, scrollPosition), scrollContainer.scrollHeight - scrollContainerRect.height));\n }\n /**\n * Calculate the necessary input and selected item styles to be used for positioning item text over input text.\n * Calculate & Set default items container width.\n *\n * @param selectFit selectFit to use for computation.\n */\n calculateStyles(selectFit, target) {\n const styles = {};\n const inputElementStyles = window.getComputedStyle(target);\n const itemElementStyles = window.getComputedStyle(selectFit.itemElement);\n const numericInputFontSize = parseFloat(inputElementStyles.fontSize);\n const numericInputPaddingTop = parseFloat(inputElementStyles.paddingTop);\n const numericInputPaddingBottom = parseFloat(inputElementStyles.paddingBottom);\n const numericItemFontSize = parseFloat(itemElementStyles.fontSize);\n const inputTextToInputTop = ((selectFit.targetRect.bottom - numericInputPaddingBottom)\n - (selectFit.targetRect.top + numericInputPaddingTop) - numericInputFontSize) / 2;\n const itemTextToItemTop = (selectFit.itemRect.height - numericItemFontSize) / 2;\n styles.itemTextToInputTextDiff = Math.round(itemTextToItemTop - inputTextToInputTop - numericInputPaddingTop);\n const numericLeftPadding = parseFloat(itemElementStyles.paddingLeft);\n const numericTextIndent = parseFloat(itemElementStyles.textIndent);\n styles.itemTextPadding = numericLeftPadding;\n styles.itemTextIndent = numericTextIndent;\n // 24 is the input's toggle ddl icon width\n styles.contentElementNewWidth = selectFit.targetRect.width + 24 + numericLeftPadding * 2;\n return styles;\n }\n /**\n * Calculate how much to offset the overlay container for Y-axis.\n */\n calculateYoffset(selectFit) {\n selectFit.verticalOffset = -(selectFit.itemRect.top - selectFit.contentElementRect.top +\n selectFit.styles.itemTextToInputTextDiff - selectFit.scrollAmount);\n this.global_yOffset = selectFit.verticalOffset;\n }\n /**\n * Calculate how much to offset the overlay container for X-axis.\n */\n calculateXoffset(selectFit) {\n selectFit.horizontalOffset = selectFit.styles.itemTextIndent - selectFit.styles.itemTextPadding;\n this.global_xOffset = selectFit.horizontalOffset;\n }\n};\nSelectPositioningStrategy = __decorate([\n __param(2, Optional())\n], SelectPositioningStrategy);\n\n/** @hidden @internal */\nclass IgxSelectItemNavigationDirective extends IgxDropDownItemNavigationDirective {\n get target() {\n return this._target;\n }\n set target(target) {\n this._target = target ? target : this.dropdown;\n }\n constructor() {\n super(null);\n this._target = null;\n /* eslint-disable @typescript-eslint/member-ordering */\n this.inputStream = '';\n this.clearStream$ = Subscription.EMPTY;\n }\n /** Captures keydown events and calls the appropriate handlers on the target component */\n handleKeyDown(event) {\n if (!event) {\n return;\n }\n const key = event.key.toLowerCase();\n if (event.altKey && (key === 'arrowdown' || key === 'arrowup' || key === 'down' || key === 'up')) {\n this.target.toggle();\n return;\n }\n if (this.target.collapsed) {\n switch (key) {\n case 'space':\n case 'spacebar':\n case ' ':\n case 'enter':\n event.preventDefault();\n this.target.open();\n return;\n case 'arrowdown':\n case 'down':\n this.target.navigateNext();\n this.target.selectItem(this.target.focusedItem);\n event.preventDefault();\n return;\n case 'arrowup':\n case 'up':\n this.target.navigatePrev();\n this.target.selectItem(this.target.focusedItem);\n event.preventDefault();\n return;\n default:\n break;\n }\n }\n else if (key === 'tab' || event.shiftKey && key === 'tab') {\n this.target.close();\n }\n super.handleKeyDown(event);\n this.captureKey(event);\n }\n captureKey(event) {\n // relying only on key, available on all major browsers:\n // https://caniuse.com/#feat=keyboardevent-key (IE/Edge quirk doesn't affect letter typing)\n if (!event || !event.key || event.key.length > 1 || event.key === ' ' || event.key === 'spacebar') {\n // ignore longer keys ('Alt', 'ArrowDown', etc) AND spacebar (used of open/close)\n return;\n }\n this.clearStream$.unsubscribe();\n this.clearStream$ = timer(500).subscribe(() => {\n this.inputStream = '';\n });\n this.inputStream += event.key;\n const focusedItem = this.target.focusedItem;\n // select the item\n if (focusedItem && this.inputStream.length > 1 && focusedItem.itemText.toLowerCase().startsWith(this.inputStream.toLowerCase())) {\n return;\n }\n this.activateItemByText(this.inputStream);\n }\n activateItemByText(text) {\n const items = this.target.items;\n // ^ this is focused OR selected if the dd is closed\n let nextItem = this.findNextItem(items, text);\n // If there is no such an item starting with the current text input stream AND the last Char in the input stream\n // is the same as the first one, find next item starting with the same first Char.\n // Covers cases of holding down the same key Ex: \"pppppp\" that iterates trough list items starting with \"p\".\n if (!nextItem && text.charAt(0) === text.charAt(text.length - 1)) {\n text = text.slice(0, 1);\n nextItem = this.findNextItem(items, text);\n }\n // If there is no other item to be found, do not change the active item.\n if (!nextItem) {\n return;\n }\n if (this.target.collapsed) {\n this.target.selectItem(nextItem);\n }\n this.target.navigateItem(items.indexOf(nextItem));\n }\n ngOnDestroy() {\n this.clearStream$.unsubscribe();\n }\n findNextItem(items, text) {\n const activeItemIndex = items.indexOf(this.target.focusedItem) || 0;\n // Match next item in ddl items and wrap around if needed\n return items.slice(activeItemIndex + 1).find(x => !x.disabled && (x.itemText.toLowerCase().startsWith(text.toLowerCase()))) ||\n items.slice(0, activeItemIndex).find(x => !x.disabled && (x.itemText.toLowerCase().startsWith(text.toLowerCase())));\n }\n}\nIgxSelectItemNavigationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectItemNavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSelectItemNavigationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectItemNavigationDirective, selector: \"[igxSelectItemNavigation]\", inputs: { target: [\"igxSelectItemNavigation\", \"target\"] }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectItemNavigationDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSelectItemNavigation]'\n }]\n }], ctorParameters: function () { return []; }, propDecorators: { target: [{\n type: Input,\n args: ['igxSelectItemNavigation']\n }] } });\n\n/** @hidden @internal */\nclass IgxSelectToggleIconDirective {\n}\nIgxSelectToggleIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSelectToggleIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectToggleIconDirective, selector: \"[igxSelectToggleIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectToggleIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSelectToggleIcon]'\n }]\n }] });\n/** @hidden @internal */\nclass IgxSelectHeaderDirective {\n}\nIgxSelectHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSelectHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectHeaderDirective, selector: \"[igxSelectHeader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectHeaderDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSelectHeader]'\n }]\n }] });\n/** @hidden @internal */\nclass IgxSelectFooterDirective {\n}\nIgxSelectFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSelectFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectFooterDirective, selector: \"[igxSelectFooter]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectFooterDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSelectFooter]'\n }]\n }] });\n/**\n * **Ignite UI for Angular Select** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/select)\n *\n * The `igxSelect` provides an input with dropdown list allowing selection of a single item.\n *\n * Example:\n * ```html\n * \n * \n * \n * {{ item.field }}\n * \n * \n * ```\n */\nclass IgxSelectComponent extends IgxDropDownComponent {\n /**\n * An @Input property that gets/sets the component value.\n *\n * ```typescript\n * // get\n * let selectValue = this.select.value;\n * ```\n *\n * ```typescript\n * // set\n * this.select.value = 'London';\n * ```\n * ```html\n * \n * ```\n */\n get value() {\n return this._value;\n }\n set value(v) {\n if (this._value === v) {\n return;\n }\n this._value = v;\n this.setSelection(this.items.find(x => x.value === this.value));\n }\n /**\n * An @Input property that sets how the select will be styled.\n * The allowed values are `line`, `box` and `border`. The input-group default is `line`.\n * ```html\n * \n * ```\n */\n get type() {\n return this._type || this._inputGroupType || 'line';\n }\n set type(val) {\n this._type = val;\n }\n /** @hidden @internal */\n get selectionValue() {\n const selectedItem = this.selectedItem;\n return selectedItem ? selectedItem.itemText : '';\n }\n /** @hidden @internal */\n get selectedItem() {\n return this.selection.first_item(this.id);\n }\n constructor(elementRef, cdr, selection, overlayService, _displayDensityOptions, _inputGroupType, _injector) {\n super(elementRef, cdr, selection, _displayDensityOptions);\n this.overlayService = overlayService;\n this._inputGroupType = _inputGroupType;\n this._injector = _injector;\n /**\n * An @Input property that disables the `IgxSelectComponent`.\n * ```html\n * \n * ```\n */\n this.disabled = false;\n /** @hidden @internal */\n this.maxHeight = '256px';\n /**\n * Emitted before the dropdown is opened\n *\n * ```html\n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Emitted after the dropdown is opened\n *\n * ```html\n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Emitted before the dropdown is closed\n *\n * ```html\n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Emitted after the dropdown is closed\n *\n * ```html\n * \n * ```\n */\n this.closed = new EventEmitter();\n /**\n * The custom template, if any, that should be used when rendering the select TOGGLE(open/close) button\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.select.toggleIconTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n * {{ collapsed ? 'remove_circle' : 'remove_circle_outline'}}\n * \n * \n * ```\n */\n this.toggleIconTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the HEADER for the select items list\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.select.headerTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    \n * This is a custom header\n *
    \n *
    \n *
    \n * ```\n */\n this.headerTemplate = null;\n /**\n * The custom template, if any, that should be used when rendering the FOOTER for the select items list\n *\n * ```typescript\n * // Set in typescript\n * const myCustomTemplate: TemplateRef = myComponent.customTemplate;\n * myComponent.select.footerTemplate = myCustomTemplate;\n * ```\n * ```html\n * \n * \n * ...\n * \n *
    \n * This is a custom footer\n *
    \n *
    \n *
    \n * ```\n */\n this.footerTemplate = null;\n /** @hidden @internal do not use the drop-down container class */\n this.cssClass = false;\n /** @hidden @internal */\n this.allowItemsFocus = false;\n this.ngControl = null;\n this._type = null;\n this._onChangeCallback = noop;\n this._onTouchedCallback = noop;\n //#region ControlValueAccessor\n /** @hidden @internal */\n this.writeValue = (value) => {\n this.value = value;\n };\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n //#endregion\n /** @hidden @internal */\n getEditElement() {\n return this.input.nativeElement;\n }\n /** @hidden @internal */\n selectItem(newSelection, event) {\n const oldSelection = this.selectedItem ?? {};\n if (newSelection === null || newSelection.disabled || newSelection.isHeader) {\n return;\n }\n if (newSelection === oldSelection) {\n this.toggleDirective.close();\n return;\n }\n const args = { oldSelection, newSelection, cancel: false, owner: this };\n this.selectionChanging.emit(args);\n if (args.cancel) {\n return;\n }\n this.setSelection(newSelection);\n this._value = newSelection.value;\n if (event) {\n this.toggleDirective.close();\n }\n this.cdr.detectChanges();\n this._onChangeCallback(this.value);\n }\n /** @hidden @internal */\n getFirstItemElement() {\n return this.children.first.element.nativeElement;\n }\n /**\n * Opens the select\n *\n * ```typescript\n * this.select.open();\n * ```\n */\n open(overlaySettings) {\n if (this.disabled || this.items.length === 0) {\n return;\n }\n if (!this.selectedItem) {\n this.navigateFirst();\n }\n super.open(Object.assign({}, this._overlayDefaults, this.overlaySettings, overlaySettings));\n }\n inputGroupClick(event, overlaySettings) {\n const targetElement = event.target;\n if (this.hintElement && targetElement.contains(this.hintElement.nativeElement)) {\n return;\n }\n this.toggle(Object.assign({}, this._overlayDefaults, this.overlaySettings, overlaySettings));\n }\n /** @hidden @internal */\n ngAfterContentInit() {\n this._overlayDefaults = {\n target: this.getEditElement(),\n modal: false,\n positionStrategy: new SelectPositioningStrategy(this),\n scrollStrategy: new AbsoluteScrollStrategy(),\n excludeFromOutsideClick: [this.inputGroup.element.nativeElement]\n };\n const changes$ = this.children.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.setSelection(this.items.find(x => x.value === this.value));\n this.cdr.detectChanges();\n });\n Promise.resolve().then(() => {\n if (!changes$.closed) {\n this.children.notifyOnChanges();\n }\n });\n }\n /**\n * Event handlers\n *\n * @hidden @internal\n */\n handleOpening(e) {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.opening.emit(args);\n e.cancel = args.cancel;\n if (args.cancel) {\n return;\n }\n }\n /** @hidden @internal */\n onToggleContentAppended(event) {\n const info = this.overlayService.getOverlayById(event.id);\n if (info?.settings?.positionStrategy instanceof SelectPositioningStrategy) {\n return;\n }\n super.onToggleContentAppended(event);\n }\n /** @hidden @internal */\n handleOpened() {\n this.updateItemFocus();\n this.opened.emit({ owner: this });\n }\n /** @hidden @internal */\n handleClosing(e) {\n const args = { owner: this, event: e.event, cancel: e.cancel };\n this.closing.emit(args);\n e.cancel = args.cancel;\n }\n /** @hidden @internal */\n handleClosed() {\n this.focusItem(false);\n this.closed.emit({ owner: this });\n }\n /** @hidden @internal */\n onBlur() {\n this._onTouchedCallback();\n if (this.ngControl && this.ngControl.invalid) {\n this.input.valid = IgxInputState.INVALID;\n }\n else {\n this.input.valid = IgxInputState.INITIAL;\n }\n }\n /** @hidden @internal */\n onFocus() {\n this._onTouchedCallback();\n }\n /**\n * @hidden @internal\n */\n ngOnInit() {\n this.ngControl = this._injector.get(NgControl, null);\n super.ngOnInit();\n }\n /**\n * @hidden @internal\n */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n if (this.ngControl) {\n this.ngControl.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(this.onStatusChanged.bind(this));\n this.manageRequiredAsterisk();\n }\n this.cdr.detectChanges();\n }\n /** @hidden @internal */\n ngAfterContentChecked() {\n if (this.inputGroup && this.prefixes?.length > 0) {\n this.inputGroup.prefixes = this.prefixes;\n }\n if (this.inputGroup && this.suffixes?.length > 0) {\n this.inputGroup.suffixes = this.suffixes;\n }\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n this.selection.clear(this.id);\n }\n /**\n * @hidden @internal\n * Prevent input blur - closing the items container on Header/Footer Template click.\n */\n mousedownHandler(event) {\n event.preventDefault();\n }\n onStatusChanged() {\n if ((this.ngControl.control.touched || this.ngControl.control.dirty) &&\n (this.ngControl.control.validator || this.ngControl.control.asyncValidator)) {\n if (this.inputGroup.isFocused) {\n this.input.valid = this.ngControl.invalid ? IgxInputState.INVALID : IgxInputState.VALID;\n }\n else {\n this.input.valid = this.ngControl.invalid ? IgxInputState.INVALID : IgxInputState.INITIAL;\n }\n }\n else {\n // B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526\n this.input.valid = IgxInputState.INITIAL;\n }\n this.manageRequiredAsterisk();\n }\n navigate(direction, currentIndex) {\n if (this.collapsed && this.selectedItem) {\n this.navigateItem(this.selectedItem.itemIndex);\n }\n super.navigate(direction, currentIndex);\n }\n manageRequiredAsterisk() {\n const hasRequiredHTMLAttribute = this.elementRef.nativeElement.hasAttribute('required');\n if (this.ngControl && this.ngControl.control.validator) {\n // Run the validation with empty object to check if required is enabled.\n const error = this.ngControl.control.validator({});\n this.inputGroup.isRequired = error && error.required;\n this.cdr.markForCheck();\n // If validator is dynamically cleared and no required HTML attribute is set,\n // reset label's required class(asterisk) and IgxInputState #6896\n }\n else if (this.inputGroup.isRequired && this.ngControl && !this.ngControl.control.validator && !hasRequiredHTMLAttribute) {\n this.input.valid = IgxInputState.INITIAL;\n this.inputGroup.isRequired = false;\n this.cdr.markForCheck();\n }\n }\n setSelection(item) {\n if (item && item.value !== undefined && item.value !== null) {\n this.selection.set(this.id, new Set([item]));\n }\n else {\n this.selection.clear(this.id);\n }\n }\n}\nIgxSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxSelectionAPIService }, { token: IgxOverlayService }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });\nIgxSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectComponent, selector: \"igx-select\", inputs: { placeholder: \"placeholder\", disabled: \"disabled\", overlaySettings: \"overlaySettings\", value: \"value\", type: \"type\" }, outputs: { opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\" }, host: { properties: { \"style.maxHeight\": \"this.maxHeight\" } }, providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxSelectComponent, multi: true },\n { provide: IGX_DROPDOWN_BASE, useExisting: IgxSelectComponent }\n ], queries: [{ propertyName: \"label\", first: true, predicate: i0.forwardRef(function () { return IgxLabelDirective; }), descendants: true, static: true }, { propertyName: \"toggleIconTemplate\", first: true, predicate: IgxSelectToggleIconDirective, descendants: true, read: TemplateRef }, { propertyName: \"headerTemplate\", first: true, predicate: IgxSelectHeaderDirective, descendants: true, read: TemplateRef }, { propertyName: \"footerTemplate\", first: true, predicate: IgxSelectFooterDirective, descendants: true, read: TemplateRef }, { propertyName: \"hintElement\", first: true, predicate: IgxHintDirective, descendants: true, read: ElementRef }, { propertyName: \"children\", predicate: i0.forwardRef(function () { return IgxSelectItemComponent; }), descendants: true }, { propertyName: \"prefixes\", predicate: IgxPrefixDirective, descendants: true }, { propertyName: \"suffixes\", predicate: IgxSuffixDirective, descendants: true }], viewQueries: [{ propertyName: \"inputGroup\", first: true, predicate: [\"inputGroup\"], descendants: true, read: IgxInputGroupComponent, static: true }, { propertyName: \"input\", first: true, predicate: [\"input\"], descendants: true, read: IgxInputDirective, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {{ inputGroup.theme === 'material' ? collapsed ? 'expand_more' : 'expand_less' : collapsed ? 'arrow_drop_down' : 'arrow_drop_up' }}\\n \\n \\n \\n \\n \\n\\n
    \\n\\n
    \\n \\n
    \\n\\n \\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n
    \\n\", styles: [\":host{display:block}\\n\"], dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: IgxSelectItemNavigationDirective, selector: \"[igxSelectItemNavigation]\", inputs: [\"igxSelectItemNavigation\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-select', providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxSelectComponent, multi: true },\n { provide: IGX_DROPDOWN_BASE, useExisting: IgxSelectComponent }\n ], template: \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {{ inputGroup.theme === 'material' ? collapsed ? 'expand_more' : 'expand_less' : collapsed ? 'arrow_drop_down' : 'arrow_drop_up' }}\\n \\n \\n \\n \\n \\n\\n
    \\n\\n
    \\n \\n
    \\n\\n \\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n
    \\n\", styles: [\":host{display:block}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxSelectionAPIService }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }, { type: i0.Injector }]; }, propDecorators: { inputGroup: [{\n type: ViewChild,\n args: ['inputGroup', { read: IgxInputGroupComponent, static: true }]\n }], input: [{\n type: ViewChild,\n args: ['input', { read: IgxInputDirective, static: true }]\n }], children: [{\n type: ContentChildren,\n args: [forwardRef(() => IgxSelectItemComponent), { descendants: true }]\n }], prefixes: [{\n type: ContentChildren,\n args: [IgxPrefixDirective, { descendants: true }]\n }], suffixes: [{\n type: ContentChildren,\n args: [IgxSuffixDirective, { descendants: true }]\n }], label: [{\n type: ContentChild,\n args: [forwardRef(() => IgxLabelDirective), { static: true }]\n }], placeholder: [{\n type: Input\n }], disabled: [{\n type: Input\n }], overlaySettings: [{\n type: Input\n }], maxHeight: [{\n type: HostBinding,\n args: ['style.maxHeight']\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], toggleIconTemplate: [{\n type: ContentChild,\n args: [IgxSelectToggleIconDirective, { read: TemplateRef }]\n }], headerTemplate: [{\n type: ContentChild,\n args: [IgxSelectHeaderDirective, { read: TemplateRef, static: false }]\n }], footerTemplate: [{\n type: ContentChild,\n args: [IgxSelectFooterDirective, { read: TemplateRef, static: false }]\n }], hintElement: [{\n type: ContentChild,\n args: [IgxHintDirective, { read: ElementRef }]\n }], value: [{\n type: Input\n }], type: [{\n type: Input\n }] } });\n\n/**\n * @hidden\n */\nclass IgxExcelStyleDefaultExpressionComponent {\n get isLast() {\n return this.expressionsList[this.expressionsList.length - 1] === this.expressionUI;\n }\n get isSingle() {\n return this.expressionsList.length === 1;\n }\n get conditionsPlaceholder() {\n return this.grid.resourceStrings['igx_grid_filter_condition_placeholder'];\n }\n get inputValuePlaceholder() {\n return this.grid.resourceStrings['igx_grid_filter_row_placeholder'];\n }\n get type() {\n switch (this.column.dataType) {\n case GridColumnDataType.Number:\n case GridColumnDataType.Currency:\n case GridColumnDataType.Percent:\n return 'number';\n default:\n return 'text';\n }\n }\n constructor(cdr, platform) {\n this.cdr = cdr;\n this.platform = platform;\n this.expressionRemoved = new EventEmitter();\n this.logicOperatorChanged = new EventEmitter();\n this.dropDownOverlaySettings = {\n scrollStrategy: new AbsoluteScrollStrategy(),\n modal: false,\n closeOnOutsideClick: true\n };\n }\n get conditions() {\n return this.column.filters.conditionList();\n }\n get inputValuesElement() {\n return this.inputValuesDirective.nativeElement;\n }\n ngAfterViewInit() {\n this.dropDownOverlaySettings.outlet = this.overlayOutlet;\n this.dropDownOverlaySettings.target = this.dropdownConditions.inputGroup.element.nativeElement;\n this.dropDownOverlaySettings.excludeFromOutsideClick = [this.dropdownConditions.inputGroup.element.nativeElement];\n this.dropDownOverlaySettings.positionStrategy = new ConnectedPositioningStrategy();\n }\n focus() {\n // use requestAnimationFrame to focus the values input because when initializing the component\n // datepicker's input group is not yet fully initialized\n requestAnimationFrame(() => this.inputValuesElement.focus());\n }\n translateCondition(value) {\n return this.grid.resourceStrings[`igx_grid_filter_${this.getCondition(value).name}`] || value;\n }\n getIconName() {\n if (this.column.dataType === GridColumnDataType.Boolean && this.expressionUI.expression.condition === null) {\n return this.getCondition(this.conditions[0]).iconName;\n }\n else if (!this.expressionUI.expression.condition) {\n return 'filter_list';\n }\n else {\n return this.expressionUI.expression.condition.iconName;\n }\n }\n isConditionSelected(conditionName) {\n return this.expressionUI.expression.condition && this.expressionUI.expression.condition.name === conditionName;\n }\n onConditionsChanged(eventArgs) {\n const value = eventArgs.newSelection.value;\n this.expressionUI.expression.condition = this.getCondition(value);\n this.focus();\n }\n getCondition(value) {\n return this.column.filters.condition(value);\n }\n getConditionFriendlyName(name) {\n return this.grid.resourceStrings[`igx_grid_filter_${name}`] || name;\n }\n onValuesInput(eventArgs) {\n this.expressionUI.expression.searchVal = DataUtil.parseValue(this.column.dataType, eventArgs.target.value);\n }\n onLogicOperatorButtonClicked(eventArgs, buttonIndex) {\n if (this.logicOperatorButtonGroup.selectedButtons.length === 0) {\n eventArgs.stopPropagation();\n this.logicOperatorButtonGroup.selectButton(buttonIndex);\n }\n else {\n this.logicOperatorChanged.emit({\n target: this.expressionUI,\n newValue: buttonIndex\n });\n }\n }\n onLogicOperatorKeyDown(eventArgs, buttonIndex) {\n if (eventArgs.key === this.platform.KEYMAP.ENTER) {\n this.logicOperatorButtonGroup.selectButton(buttonIndex);\n this.logicOperatorChanged.emit({\n target: this.expressionUI,\n newValue: buttonIndex\n });\n }\n }\n onRemoveButtonClick() {\n this.expressionRemoved.emit(this.expressionUI);\n }\n onOutletPointerDown(event) {\n event.preventDefault();\n }\n}\nIgxExcelStyleDefaultExpressionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleDefaultExpressionComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleDefaultExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleDefaultExpressionComponent, selector: \"igx-excel-style-default-expression\", inputs: { column: \"column\", expressionUI: \"expressionUI\", expressionsList: \"expressionsList\", grid: \"grid\", displayDensity: \"displayDensity\" }, outputs: { expressionRemoved: \"expressionRemoved\", logicOperatorChanged: \"logicOperatorChanged\" }, viewQueries: [{ propertyName: \"overlayOutlet\", first: true, predicate: [\"overlayOutlet\"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: \"dropdownConditions\", first: true, predicate: [\"dropdownConditions\"], descendants: true, read: IgxSelectComponent, static: true }, { propertyName: \"logicOperatorButtonGroup\", first: true, predicate: [\"logicOperatorButtonGroup\"], descendants: true, read: IgxButtonGroupComponent }, { propertyName: \"inputValuesDirective\", first: true, predicate: [\"inputValues\"], descendants: true, read: IgxInputDirective, static: true }], ngImport: i0, template: \"\\n \\n \\n filter_list\\n \\n \\n
    \\n \\n {{translateCondition(condition)}}\\n
    \\n
    \\n
    \\n\\n\\n \\n\\n\\n\\n\\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\\n \\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\\n \\n\\n\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxButtonGroupComponent, selector: \"igx-buttongroup\", inputs: [\"id\", \"itemContentCssClass\", \"multiSelection\", \"values\", \"disabled\", \"alignment\"], outputs: [\"selected\", \"deselected\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxOverlayOutletDirective, selector: \"[igxOverlayOutlet]\", exportAs: [\"overlay-outlet\"] }, { kind: \"component\", type: IgxSelectComponent, selector: \"igx-select\", inputs: [\"placeholder\", \"disabled\", \"overlaySettings\", \"value\", \"type\"], outputs: [\"opening\", \"opened\", \"closing\", \"closed\"] }, { kind: \"component\", type: IgxSelectItemComponent, selector: \"igx-select-item\", inputs: [\"text\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleDefaultExpressionComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-default-expression', template: \"\\n \\n \\n filter_list\\n \\n \\n
    \\n \\n {{translateCondition(condition)}}\\n
    \\n
    \\n
    \\n\\n\\n \\n\\n\\n\\n\\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\\n \\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\\n \\n\\n\\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: PlatformUtil }]; }, propDecorators: { column: [{\n type: Input\n }], expressionUI: [{\n type: Input\n }], expressionsList: [{\n type: Input\n }], grid: [{\n type: Input\n }], displayDensity: [{\n type: Input\n }], expressionRemoved: [{\n type: Output\n }], logicOperatorChanged: [{\n type: Output\n }], overlayOutlet: [{\n type: ViewChild,\n args: ['overlayOutlet', { read: IgxOverlayOutletDirective, static: true }]\n }], dropdownConditions: [{\n type: ViewChild,\n args: ['dropdownConditions', { read: IgxSelectComponent, static: true }]\n }], logicOperatorButtonGroup: [{\n type: ViewChild,\n args: ['logicOperatorButtonGroup', { read: IgxButtonGroupComponent }]\n }], inputValuesDirective: [{\n type: ViewChild,\n args: ['inputValues', { read: IgxInputDirective, static: true }]\n }] } });\n\nconst EVENT_SUFFIX = 'precise';\n/**\n * Touch gestures manager based on Hammer.js\n * Use with caution, this will track references for single manager per element. Very TBD. Much TODO.\n *\n * @hidden\n */\nclass HammerGesturesManager {\n constructor(_zone, doc, platformUtil) {\n this._zone = _zone;\n this.doc = doc;\n this.platformUtil = platformUtil;\n /**\n * Event option defaults for each recognizer, see http://hammerjs.github.io/api/ for API listing.\n */\n this.hammerOptions = {};\n this._hammerManagers = [];\n this.platformBrowser = this.platformUtil.isBrowser;\n if (this.platformBrowser) {\n this.hammerOptions = {\n // D.P. #447 Force TouchInput due to PointerEventInput bug (https://github.com/hammerjs/hammer.js/issues/1065)\n // see https://github.com/IgniteUI/igniteui-angular/issues/447#issuecomment-324601803\n inputClass: Hammer.TouchInput,\n recognizers: [\n [Hammer.Pan, { threshold: 0 }],\n [Hammer.Swipe, { direction: Hammer.DIRECTION_HORIZONTAL }],\n [Hammer.Tap],\n [Hammer.Tap, { event: 'doubletap', taps: 2 }, ['tap']]\n ]\n };\n }\n }\n supports(eventName) {\n return eventName.toLowerCase().endsWith('.' + EVENT_SUFFIX);\n }\n /**\n * Add listener extended with options for Hammer.js. Will use defaults if none are provided.\n * Modeling after other event plugins for easy future modifications.\n */\n addEventListener(element, eventName, eventHandler, options = null) {\n if (!this.platformBrowser) {\n return;\n }\n // Creating the manager bind events, must be done outside of angular\n return this._zone.runOutsideAngular(() => {\n let mc = this.getManagerForElement(element);\n if (mc === null) {\n // new Hammer is a shortcut for Manager with defaults\n mc = new Hammer(element, Object.assign(this.hammerOptions, options));\n this.addManagerForElement(element, mc);\n }\n const handler = (eventObj) => this._zone.run(() => eventHandler(eventObj));\n mc.on(eventName, handler);\n return () => mc.off(eventName, handler);\n });\n }\n /**\n * Add listener extended with options for Hammer.js. Will use defaults if none are provided.\n * Modeling after other event plugins for easy future modifications.\n *\n * @param target Can be one of either window, body or document(fallback default).\n */\n addGlobalEventListener(target, eventName, eventHandler) {\n if (!this.platformBrowser) {\n return;\n }\n const element = this.getGlobalEventTarget(target);\n // Creating the manager bind events, must be done outside of angular\n return this.addEventListener(element, eventName, eventHandler);\n }\n /**\n * Exposes [Dom]Adapter.getGlobalEventTarget to get global event targets.\n * Supported: window, document, body. Defaults to document for invalid args.\n *\n * @param target Target name\n */\n getGlobalEventTarget(target) {\n return ɵgetDOM().getGlobalEventTarget(this.doc, target);\n }\n /**\n * Set HammerManager options.\n *\n * @param element The DOM element used to create the manager on.\n *\n * ### Example\n *\n * ```ts\n * manager.setManagerOption(myElem, \"pan\", { pointers: 1 });\n * ```\n */\n setManagerOption(element, event, options) {\n const manager = this.getManagerForElement(element);\n manager.get(event).set(options);\n }\n /**\n * Add an element and manager map to the internal collection.\n *\n * @param element The DOM element used to create the manager on.\n */\n addManagerForElement(element, manager) {\n this._hammerManagers.push({ element, manager });\n }\n /**\n * Get HammerManager for the element or null\n *\n * @param element The DOM element used to create the manager on.\n */\n getManagerForElement(element) {\n const result = this._hammerManagers.filter(value => value.element === element);\n return result.length ? result[0].manager : null;\n }\n /**\n * Destroys the HammerManager for the element, removing event listeners in the process.\n *\n * @param element The DOM element used to create the manager on.\n */\n removeManagerForElement(element) {\n let index = null;\n for (let i = 0; i < this._hammerManagers.length; i++) {\n if (element === this._hammerManagers[i].element) {\n index = i;\n break;\n }\n }\n if (index !== null) {\n const item = this._hammerManagers.splice(index, 1)[0];\n // destroy also\n item.manager.destroy();\n }\n }\n /** Destroys all internally tracked HammerManagers, removing event listeners in the process. */\n destroy() {\n for (const item of this._hammerManagers) {\n item.manager.destroy();\n }\n this._hammerManagers = [];\n }\n}\nHammerGesturesManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: HammerGesturesManager, deps: [{ token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGesturesManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: HammerGesturesManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: HammerGesturesManager, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: PlatformUtil }]; } });\n\n/** @hidden */\nconst IGX_TIME_PICKER_COMPONENT = 'IgxTimePickerComponentToken';\n\n/**\n * This file contains all the directives used by the @link IgxTimePickerComponent.\n * You should generally not use them directly.\n *\n * @preferred\n */\n/** @hidden */\nclass IgxItemListDirective {\n constructor(timePicker, elementRef, touchManager) {\n this.timePicker = timePicker;\n this.elementRef = elementRef;\n this.touchManager = touchManager;\n this.tabindex = 0;\n this.onPanMove = (event) => {\n const delta = event.deltaY < 0 ? -1 : event.deltaY > 0 ? 1 : 0;\n if (delta !== 0) {\n this.nextItem(delta);\n }\n };\n }\n get defaultCSS() {\n return true;\n }\n get hourCSS() {\n return this.type === 'hourList';\n }\n get minuteCSS() {\n return this.type === 'minuteList';\n }\n get secondsCSS() {\n return this.type === 'secondsList';\n }\n get ampmCSS() {\n return this.type === 'ampmList';\n }\n onFocus() {\n this.isActive = true;\n }\n onBlur() {\n this.isActive = false;\n }\n /**\n * @hidden\n */\n onKeydownArrowDown(event) {\n event.preventDefault();\n this.nextItem(1);\n }\n /**\n * @hidden\n */\n onKeydownArrowUp(event) {\n event.preventDefault();\n this.nextItem(-1);\n }\n /**\n * @hidden\n */\n onKeydownArrowRight(event) {\n event.preventDefault();\n const listName = event.target.className;\n if (listName.indexOf('hourList') !== -1 && this.timePicker.minuteList) {\n this.timePicker.minuteList.nativeElement.focus();\n }\n else if ((listName.indexOf('hourList') !== -1 || listName.indexOf('minuteList') !== -1) && this.timePicker.secondsList) {\n this.timePicker.secondsList.nativeElement.focus();\n }\n else if ((listName.indexOf('hourList') !== -1 || listName.indexOf('minuteList') !== -1 ||\n listName.indexOf('secondsList') !== -1) && this.timePicker.ampmList) {\n this.timePicker.ampmList.nativeElement.focus();\n }\n }\n /**\n * @hidden\n */\n onKeydownArrowLeft(event) {\n event.preventDefault();\n const listName = event.target.className;\n if (listName.indexOf('ampmList') !== -1 && this.timePicker.secondsList) {\n this.timePicker.secondsList.nativeElement.focus();\n }\n else if (listName.indexOf('secondsList') !== -1 && this.timePicker.secondsList\n && listName.indexOf('minutesList') && this.timePicker.minuteList) {\n this.timePicker.minuteList.nativeElement.focus();\n }\n else if (listName.indexOf('ampmList') !== -1 && this.timePicker.minuteList) {\n this.timePicker.minuteList.nativeElement.focus();\n }\n else if ((listName.indexOf('ampmList') !== -1 || listName.indexOf('secondsList') !== -1 ||\n listName.indexOf('minuteList') !== -1) && this.timePicker.hourList) {\n this.timePicker.hourList.nativeElement.focus();\n }\n }\n /**\n * @hidden\n */\n onKeydownEnter(event) {\n event.preventDefault();\n this.timePicker.okButtonClick();\n }\n /**\n * @hidden\n */\n onKeydownEscape(event) {\n event.preventDefault();\n this.timePicker.cancelButtonClick();\n }\n /**\n * @hidden\n */\n onHover() {\n this.elementRef.nativeElement.focus();\n }\n /**\n * @hidden\n */\n onScroll(event) {\n event.preventDefault();\n event.stopPropagation();\n const delta = event.deltaY;\n if (delta !== 0) {\n this.nextItem(delta);\n }\n }\n /**\n * @hidden @internal\n */\n ngOnInit() {\n const hammerOptions = { recognizers: [[Hammer.Pan, { direction: Hammer.DIRECTION_VERTICAL, threshold: 10 }]] };\n this.touchManager.addEventListener(this.elementRef.nativeElement, 'pan', this.onPanMove, hammerOptions);\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.touchManager.destroy();\n }\n nextItem(delta) {\n switch (this.type) {\n case 'hourList': {\n this.timePicker.nextHour(delta);\n break;\n }\n case 'minuteList': {\n this.timePicker.nextMinute(delta);\n break;\n }\n case 'secondsList': {\n this.timePicker.nextSeconds(delta);\n break;\n }\n case 'ampmList': {\n this.timePicker.nextAmPm(delta);\n break;\n }\n }\n }\n}\nIgxItemListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxItemListDirective, deps: [{ token: IGX_TIME_PICKER_COMPONENT }, { token: i0.ElementRef }, { token: HammerGesturesManager }], target: i0.ɵɵFactoryTarget.Directive });\nIgxItemListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxItemListDirective, selector: \"[igxItemList]\", inputs: { type: [\"igxItemList\", \"type\"] }, host: { listeners: { \"focus\": \"onFocus()\", \"blur\": \"onBlur()\", \"keydown.arrowdown\": \"onKeydownArrowDown($event)\", \"keydown.arrowup\": \"onKeydownArrowUp($event)\", \"keydown.arrowright\": \"onKeydownArrowRight($event)\", \"keydown.arrowleft\": \"onKeydownArrowLeft($event)\", \"keydown.enter\": \"onKeydownEnter($event)\", \"keydown.escape\": \"onKeydownEscape($event)\", \"mouseover\": \"onHover()\", \"wheel\": \"onScroll($event)\" }, properties: { \"attr.tabindex\": \"this.tabindex\", \"class.igx-time-picker__column\": \"this.defaultCSS\", \"class.igx-time-picker__hourList\": \"this.hourCSS\", \"class.igx-time-picker__minuteList\": \"this.minuteCSS\", \"class.igx-time-picker__secondsList\": \"this.secondsCSS\", \"class.igx-time-picker__ampmList\": \"this.ampmCSS\" } }, providers: [HammerGesturesManager], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxItemListDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxItemList]',\n providers: [HammerGesturesManager]\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_TIME_PICKER_COMPONENT]\n }] }, { type: i0.ElementRef }, { type: HammerGesturesManager }]; }, propDecorators: { tabindex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], type: [{\n type: Input,\n args: ['igxItemList']\n }], defaultCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__column']\n }], hourCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__hourList']\n }], minuteCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__minuteList']\n }], secondsCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__secondsList']\n }], ampmCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__ampmList']\n }], onFocus: [{\n type: HostListener,\n args: ['focus']\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }], onKeydownArrowDown: [{\n type: HostListener,\n args: ['keydown.arrowdown', ['$event']]\n }], onKeydownArrowUp: [{\n type: HostListener,\n args: ['keydown.arrowup', ['$event']]\n }], onKeydownArrowRight: [{\n type: HostListener,\n args: ['keydown.arrowright', ['$event']]\n }], onKeydownArrowLeft: [{\n type: HostListener,\n args: ['keydown.arrowleft', ['$event']]\n }], onKeydownEnter: [{\n type: HostListener,\n args: ['keydown.enter', ['$event']]\n }], onKeydownEscape: [{\n type: HostListener,\n args: ['keydown.escape', ['$event']]\n }], onHover: [{\n type: HostListener,\n args: ['mouseover']\n }], onScroll: [{\n type: HostListener,\n args: ['wheel', ['$event']]\n }] } });\n/**\n * @hidden\n */\nclass IgxTimeItemDirective {\n get defaultCSS() {\n return true;\n }\n get selectedCSS() {\n return this.isSelectedTime;\n }\n get activeCSS() {\n return this.isSelectedTime && this.itemList.isActive;\n }\n get isSelectedTime() {\n const currentValue = this.value.length < 2 ? `0${this.value}` : this.value;\n const dateType = this.itemList.type;\n const inputDateParts = DateTimeUtil.parseDateTimeFormat(this.timePicker.inputFormat);\n switch (dateType) {\n case 'hourList':\n const hourPart = inputDateParts.find(element => element.type === 'hours');\n return DateTimeUtil.getPartValue(this.timePicker.selectedDate, hourPart, hourPart.format.length) === currentValue;\n case 'minuteList':\n const minutePart = inputDateParts.find(element => element.type === 'minutes');\n return DateTimeUtil.getPartValue(this.timePicker.selectedDate, minutePart, minutePart.format.length) === currentValue;\n case 'secondsList':\n const secondsPart = inputDateParts.find(element => element.type === 'seconds');\n return DateTimeUtil.getPartValue(this.timePicker.selectedDate, secondsPart, secondsPart.format.length) === currentValue;\n case 'ampmList':\n const ampmPart = inputDateParts.find(element => element.format === 'tt');\n return DateTimeUtil.getPartValue(this.timePicker.selectedDate, ampmPart, ampmPart.format.length) === this.value;\n }\n }\n get minValue() {\n const dateType = this.itemList.type;\n const inputDateParts = DateTimeUtil.parseDateTimeFormat(this.timePicker.inputFormat);\n switch (dateType) {\n case 'hourList':\n return this.getHourPart(this.timePicker.minDropdownValue);\n case 'minuteList':\n if (this.timePicker.selectedDate.getHours() === this.timePicker.minDropdownValue.getHours()) {\n const minutePart = inputDateParts.find(element => element.type === 'minutes');\n return DateTimeUtil.getPartValue(this.timePicker.minDropdownValue, minutePart, minutePart.format.length);\n }\n return '00';\n case 'secondsList':\n const date = new Date(this.timePicker.selectedDate);\n const min = new Date(this.timePicker.minDropdownValue);\n date.setSeconds(0);\n min.setSeconds(0);\n if (date.getTime() === min.getTime()) {\n const secondsPart = inputDateParts.find(element => element.type === 'seconds');\n return DateTimeUtil.getPartValue(this.timePicker.minDropdownValue, secondsPart, secondsPart.format.length);\n }\n return '00';\n case 'ampmList':\n const ampmPart = inputDateParts.find(element => element.format === 'tt');\n return DateTimeUtil.getPartValue(this.timePicker.minDropdownValue, ampmPart, ampmPart.format.length);\n }\n }\n get maxValue() {\n const dateType = this.itemList.type;\n const inputDateParts = DateTimeUtil.parseDateTimeFormat(this.timePicker.inputFormat);\n switch (dateType) {\n case 'hourList':\n return this.getHourPart(this.timePicker.maxDropdownValue);\n case 'minuteList':\n if (this.timePicker.selectedDate.getHours() === this.timePicker.maxDropdownValue.getHours()) {\n const minutePart = inputDateParts.find(element => element.type === 'minutes');\n return DateTimeUtil.getPartValue(this.timePicker.maxDropdownValue, minutePart, minutePart.format.length);\n }\n else {\n const currentTime = new Date(this.timePicker.selectedDate);\n const minDelta = this.timePicker.itemsDelta.minutes;\n const remainder = 60 % minDelta;\n const delta = remainder === 0 ? 60 - minDelta : 60 - remainder;\n currentTime.setMinutes(delta);\n const minutePart = inputDateParts.find(element => element.type === 'minutes');\n return DateTimeUtil.getPartValue(currentTime, minutePart, minutePart.format.length);\n }\n case 'secondsList':\n const date = new Date(this.timePicker.selectedDate);\n const max = new Date(this.timePicker.maxDropdownValue);\n date.setSeconds(0);\n max.setSeconds(0);\n if (date.getTime() === max.getTime()) {\n const secondsPart = inputDateParts.find(element => element.type === 'seconds');\n return DateTimeUtil.getPartValue(this.timePicker.maxDropdownValue, secondsPart, secondsPart.format.length);\n }\n else {\n const secDelta = this.timePicker.itemsDelta.seconds;\n const remainder = 60 % secDelta;\n const delta = remainder === 0 ? 60 - secDelta : 60 - remainder;\n date.setSeconds(delta);\n const secondsPart = inputDateParts.find(element => element.type === 'seconds');\n return DateTimeUtil.getPartValue(date, secondsPart, secondsPart.format.length);\n }\n case 'ampmList':\n const ampmPart = inputDateParts.find(element => element.format === 'tt');\n return DateTimeUtil.getPartValue(this.timePicker.maxDropdownValue, ampmPart, ampmPart.format.length);\n }\n }\n get hourValue() {\n return this.getHourPart(this.timePicker.selectedDate);\n }\n constructor(timePicker, itemList) {\n this.timePicker = timePicker;\n this.itemList = itemList;\n }\n onClick(item) {\n if (item !== '') {\n const dateType = this.itemList.type;\n this.timePicker.onItemClick(item, dateType);\n }\n }\n getHourPart(date) {\n const inputDateParts = DateTimeUtil.parseDateTimeFormat(this.timePicker.inputFormat);\n const hourPart = inputDateParts.find(element => element.type === 'hours');\n const ampmPart = inputDateParts.find(element => element.format === 'tt');\n const hour = DateTimeUtil.getPartValue(date, hourPart, hourPart.format.length);\n if (ampmPart) {\n const ampm = DateTimeUtil.getPartValue(date, ampmPart, ampmPart.format.length);\n return `${hour} ${ampm}`;\n }\n return hour;\n }\n}\nIgxTimeItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimeItemDirective, deps: [{ token: IGX_TIME_PICKER_COMPONENT }, { token: IgxItemListDirective }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTimeItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTimeItemDirective, selector: \"[igxTimeItem]\", inputs: { value: [\"igxTimeItem\", \"value\"] }, host: { listeners: { \"click\": \"onClick(value)\" }, properties: { \"class.igx-time-picker__item\": \"this.defaultCSS\", \"class.igx-time-picker__item--selected\": \"this.selectedCSS\", \"class.igx-time-picker__item--active\": \"this.activeCSS\" } }, exportAs: [\"timeItem\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimeItemDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxTimeItem]',\n exportAs: 'timeItem'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_TIME_PICKER_COMPONENT]\n }] }, { type: IgxItemListDirective }]; }, propDecorators: { value: [{\n type: Input,\n args: ['igxTimeItem']\n }], defaultCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__item']\n }], selectedCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__item--selected']\n }], activeCSS: [{\n type: HostBinding,\n args: ['class.igx-time-picker__item--active']\n }], onClick: [{\n type: HostListener,\n args: ['click', ['value']]\n }] } });\n/**\n * This directive should be used to mark which ng-template will be used from IgxTimePicker when re-templating its input group.\n */\nclass IgxTimePickerTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxTimePickerTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTimePickerTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTimePickerTemplateDirective, selector: \"[igxTimePickerTemplate]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxTimePickerTemplate]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * This directive can be used to add custom action buttons to the dropdown/dialog.\n */\nclass IgxTimePickerActionsDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxTimePickerActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerActionsDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTimePickerActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTimePickerActionsDirective, selector: \"[igxTimePickerActions]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerActionsDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxTimePickerActions]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nconst ITEMS_COUNT = 7;\nclass TimeFormatPipe {\n constructor(timePicker) {\n this.timePicker = timePicker;\n }\n transform(value) {\n const format = this.timePicker.inputFormat.replace('tt', 'aa');\n const datePipe = new DatePipe(this.timePicker.locale);\n return datePipe.transform(value, format);\n }\n}\nTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: TimeFormatPipe, deps: [{ token: IGX_TIME_PICKER_COMPONENT }], target: i0.ɵɵFactoryTarget.Pipe });\nTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: TimeFormatPipe, name: \"timeFormatPipe\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: TimeFormatPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'timeFormatPipe'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_TIME_PICKER_COMPONENT]\n }] }]; } });\nclass TimeItemPipe {\n constructor(timePicker) {\n this.timePicker = timePicker;\n }\n transform(_collection, timePart, selectedDate, min, max) {\n let list;\n let part;\n switch (timePart) {\n case 'hour':\n list = this.generateHours(min, max);\n const hours = this.timePicker.isTwelveHourFormat ? this.toTwelveHourFormat(selectedDate.getHours())\n : selectedDate.getHours();\n list = this.scrollListItem(hours, list);\n part = DatePart.Hours;\n break;\n case 'minutes':\n list = this.generateMinutes(selectedDate, min, max);\n list = this.scrollListItem(selectedDate.getMinutes(), list);\n part = DatePart.Minutes;\n break;\n case 'seconds':\n list = this.generateSeconds(selectedDate, min, max);\n list = this.scrollListItem(selectedDate.getSeconds(), list);\n part = DatePart.Seconds;\n break;\n case 'ampm':\n list = this.generateAmPm(min, max);\n const selectedAmPm = this.timePicker.getPartValue(selectedDate, 'ampm');\n list = this.scrollListItem(selectedAmPm, list);\n part = DatePart.AmPm;\n break;\n }\n return this.getListView(list, part);\n }\n getListView(view, dateType) {\n for (let i = 0; i < view.length; i++) {\n view[i] = this.getItemView(view[i], dateType);\n }\n return view;\n }\n getItemView(item, dateType) {\n if (item === null) {\n item = '';\n }\n else if (dateType && typeof (item) !== 'string') {\n const leadZeroHour = (item < 10 && (this.timePicker.inputFormat.indexOf('hh') !== -1\n || this.timePicker.inputFormat.indexOf('HH') !== -1));\n const leadZeroMinute = (item < 10 && this.timePicker.inputFormat.indexOf('mm') !== -1);\n const leadZeroSeconds = (item < 10 && this.timePicker.inputFormat.indexOf('ss') !== -1);\n const leadZero = {\n hours: leadZeroHour,\n minutes: leadZeroMinute,\n seconds: leadZeroSeconds\n }[dateType];\n item = (leadZero) ? '0' + item : `${item}`;\n }\n return item;\n }\n scrollListItem(item, items) {\n const itemsCount = items.length;\n let view;\n if (items) {\n const index = items.indexOf(item);\n if (index < 3) {\n view = items.slice(itemsCount - (3 - index), itemsCount);\n view = view.concat(items.slice(0, index + 4));\n }\n else if (index + 4 > itemsCount) {\n view = items.slice(index - 3, itemsCount);\n view = view.concat(items.slice(0, index + 4 - itemsCount));\n }\n else {\n view = items.slice(index - 3, index + 4);\n }\n }\n return view;\n }\n generateHours(min, max) {\n const hourItems = [];\n let hoursCount = this.timePicker.isTwelveHourFormat ? 13 : 24;\n hoursCount /= this.timePicker.itemsDelta.hours;\n const minHours = min.getHours();\n const maxHours = max.getHours();\n if (hoursCount > 1) {\n for (let hourIndex = 0; hourIndex < 24; hourIndex++) {\n let hours = hourIndex * this.timePicker.itemsDelta.hours;\n if (hours >= minHours && hours <= maxHours) {\n hours = this.timePicker.isTwelveHourFormat ? this.toTwelveHourFormat(hours) : hours;\n if (!hourItems.find((element => element === hours))) {\n hourItems.push(hours);\n }\n }\n }\n }\n else {\n hourItems.push(0);\n }\n if (hourItems.length < ITEMS_COUNT || hoursCount < ITEMS_COUNT || !this.timePicker.spinLoop) {\n const index = !this.timePicker.spinLoop || (hourItems.length < ITEMS_COUNT && hoursCount < ITEMS_COUNT) ? 6 : 3;\n for (let i = 0; i < index; i++) {\n hourItems.push(null);\n }\n }\n return hourItems;\n }\n generateMinutes(time, min, max) {\n const minuteItems = [];\n const minuteItemsCount = 60 / this.timePicker.itemsDelta.minutes;\n time = new Date(time);\n for (let i = 0; i < minuteItemsCount; i++) {\n const minutes = i * this.timePicker.itemsDelta.minutes;\n time.setMinutes(minutes);\n if (time >= min && time <= max) {\n minuteItems.push(i * this.timePicker.itemsDelta.minutes);\n }\n }\n if (minuteItems.length < ITEMS_COUNT || minuteItemsCount < ITEMS_COUNT || !this.timePicker.spinLoop) {\n const index = !this.timePicker.spinLoop || (minuteItems.length < ITEMS_COUNT && minuteItemsCount < ITEMS_COUNT) ? 6 : 3;\n for (let i = 0; i < index; i++) {\n minuteItems.push(null);\n }\n }\n return minuteItems;\n }\n generateSeconds(time, min, max) {\n const secondsItems = [];\n const secondsItemsCount = 60 / this.timePicker.itemsDelta.seconds;\n time = new Date(time);\n for (let i = 0; i < secondsItemsCount; i++) {\n const seconds = i * this.timePicker.itemsDelta.seconds;\n time.setSeconds(seconds);\n if (time.getTime() >= min.getTime()\n && time.getTime() <= max.getTime()) {\n secondsItems.push(i * this.timePicker.itemsDelta.seconds);\n }\n }\n if (secondsItems.length < ITEMS_COUNT || secondsItemsCount < ITEMS_COUNT || !this.timePicker.spinLoop) {\n const index = !this.timePicker.spinLoop || (secondsItems.length < ITEMS_COUNT && secondsItemsCount < ITEMS_COUNT) ? 6 : 3;\n for (let i = 0; i < index; i++) {\n secondsItems.push(null);\n }\n }\n return secondsItems;\n }\n generateAmPm(min, max) {\n const ampmItems = [];\n const minHour = min.getHours();\n const maxHour = max.getHours();\n if (minHour < 12) {\n ampmItems.push('AM');\n }\n if (minHour >= 12 || maxHour >= 12) {\n ampmItems.push('PM');\n }\n for (let i = 0; i < 5; i++) {\n ampmItems.push(null);\n }\n return ampmItems;\n }\n toTwelveHourFormat(hour) {\n if (hour > 12) {\n hour -= 12;\n }\n else if (hour === 0) {\n hour = 12;\n }\n return hour;\n }\n}\nTimeItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: TimeItemPipe, deps: [{ token: IGX_TIME_PICKER_COMPONENT }], target: i0.ɵɵFactoryTarget.Pipe });\nTimeItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: TimeItemPipe, name: \"timeItemPipe\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: TimeItemPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'timeItemPipe'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_TIME_PICKER_COMPONENT]\n }] }]; } });\n\nlet NEXT_ID$c = 0;\nclass IgxTimePickerComponent extends PickerBaseDirective {\n /**\n * The minimum value the picker will accept.\n *\n * @remarks\n * If a `string` value is passed in, it must be in ISO format.\n *\n * @example\n * ```html\n * \n * ```\n */\n set minValue(value) {\n this._minValue = value;\n const date = this.parseToDate(value);\n if (date) {\n this._dateMinValue = new Date();\n this._dateMinValue.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n this.minDropdownValue = this.setMinMaxDropdownValue('min', this._dateMinValue);\n }\n this.setSelectedValue(this._selectedDate);\n this._onValidatorChange();\n }\n get minValue() {\n return this._minValue;\n }\n /**\n * Gets if the dropdown/dialog is collapsed\n *\n * ```typescript\n * let isCollapsed = this.timePicker.collapsed;\n * ```\n */\n get collapsed() {\n return this.toggleRef?.collapsed;\n }\n /**\n * The maximum value the picker will accept.\n *\n * @remarks\n * If a `string` value is passed in, it must be in ISO format.\n *\n * @example\n * ```html\n * \n * ```\n */\n set maxValue(value) {\n this._maxValue = value;\n const date = this.parseToDate(value);\n if (date) {\n this._dateMaxValue = new Date();\n this._dateMaxValue.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n this.maxDropdownValue = this.setMinMaxDropdownValue('max', this._dateMaxValue);\n }\n this.setSelectedValue(this._selectedDate);\n this._onValidatorChange();\n }\n get maxValue() {\n return this._maxValue;\n }\n /** @hidden */\n get showClearButton() {\n if (this.clearComponents.length) {\n return false;\n }\n if (DateTimeUtil.isValidDate(this.value)) {\n // TODO: Update w/ clear behavior\n return this.value.getHours() !== 0 || this.value.getMinutes() !== 0 || this.value.getSeconds() !== 0;\n }\n return !!this.dateTimeEditor.value;\n }\n /** @hidden */\n get showHoursList() {\n return this.inputFormat.indexOf('h') !== -1 || this.inputFormat.indexOf('H') !== -1;\n }\n /** @hidden */\n get showMinutesList() {\n return this.inputFormat.indexOf('m') !== -1;\n }\n /** @hidden */\n get showSecondsList() {\n return this.inputFormat.indexOf('s') !== -1;\n }\n /** @hidden */\n get showAmPmList() {\n return this.inputFormat.indexOf('t') !== -1 || this.inputFormat.indexOf('a') !== -1;\n }\n /** @hidden */\n get isTwelveHourFormat() {\n return this.inputFormat.indexOf('h') !== -1;\n }\n /** @hidden @internal */\n get isVertical() {\n return this.headerOrientation === PickerHeaderOrientation.Vertical;\n }\n /** @hidden @internal */\n get selectedDate() {\n return this._selectedDate;\n }\n /** @hidden @internal */\n get minDateValue() {\n if (!this._dateMinValue) {\n const minDate = new Date();\n minDate.setHours(0, 0, 0, 0);\n return minDate;\n }\n return this._dateMinValue;\n }\n /** @hidden @internal */\n get maxDateValue() {\n if (!this._dateMaxValue) {\n const maxDate = new Date();\n maxDate.setHours(23, 59, 59, 999);\n return maxDate;\n }\n return this._dateMaxValue;\n }\n get required() {\n if (this._ngControl && this._ngControl.control && this._ngControl.control.validator) {\n // Run the validation with empty object to check if required is enabled.\n const error = this._ngControl.control.validator({});\n return !!(error && error.required);\n }\n return false;\n }\n get dialogOverlaySettings() {\n return Object.assign({}, this._defaultDialogOverlaySettings, this.overlaySettings);\n }\n get dropDownOverlaySettings() {\n return Object.assign({}, this._defaultDropDownOverlaySettings, this.overlaySettings);\n }\n /**\n * The currently selected value / time from the drop-down/dialog\n *\n * @remarks\n * The current value is of type `Date`\n *\n * @example\n * ```typescript\n * const newValue: Date = new Date(2000, 2, 2, 10, 15, 15);\n * this.timePicker.value = newValue;\n * ```\n */\n get value() {\n return this._value;\n }\n /**\n * An accessor that allows you to set a time using the `value` input.\n * ```html\n * public date: Date = new Date(Date.now());\n * //...\n * \n * ```\n */\n set value(value) {\n const oldValue = this._value;\n this._value = value;\n const date = this.parseToDate(value);\n if (date) {\n this._dateValue = new Date();\n this._dateValue.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n this.setSelectedValue(this._dateValue);\n }\n else {\n this._dateValue = null;\n this.setSelectedValue(null);\n }\n if (this.dateTimeEditor) {\n this.dateTimeEditor.value = date;\n }\n this.emitValueChange(oldValue, this._value);\n this._onChangeCallback(this._value);\n }\n /**\n * An accessor that sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n /**\n * An @Input property that renders OK button with custom text. By default `okButtonLabel` is set to OK.\n * ```html\n * \n * ```\n */\n set okButtonLabel(value) {\n this._okButtonLabel = value;\n }\n /**\n * An accessor that returns the label of ok button.\n */\n get okButtonLabel() {\n if (this._okButtonLabel === null) {\n return this.resourceStrings.igx_time_picker_ok;\n }\n return this._okButtonLabel;\n }\n /**\n * An @Input property that renders cancel button with custom text.\n * By default `cancelButtonLabel` is set to Cancel.\n * ```html\n * \n * ```\n */\n set cancelButtonLabel(value) {\n this._cancelButtonLabel = value;\n }\n /**\n * An accessor that returns the label of cancel button.\n */\n get cancelButtonLabel() {\n if (this._cancelButtonLabel === null) {\n return this.resourceStrings.igx_time_picker_cancel;\n }\n return this._cancelButtonLabel;\n }\n /**\n * Delta values used to increment or decrement each editor date part on spin actions and\n * to display time portions in the dropdown/dialog.\n * By default `itemsDelta` is set to `{hour: 1, minute: 1, second: 1}`\n * ```html\n * \n * ```\n */\n set itemsDelta(value) {\n Object.assign(this._itemsDelta, value);\n }\n get itemsDelta() {\n return this._itemsDelta;\n }\n constructor(element, _localeId, _displayDensityOptions, _inputGroupType, _injector, platform, cdr) {\n super(element, _localeId, _displayDensityOptions, _inputGroupType);\n this._injector = _injector;\n this.platform = platform;\n this.cdr = cdr;\n /**\n * An @Input property that sets the value of the `id` attribute.\n * ```html\n * \n * ```\n */\n this.id = `igx-time-picker-${NEXT_ID$c++}`;\n /**\n * The expected user input format and placeholder.\n *\n * @remarks\n * Default is `hh:mm tt`\n *\n * @example\n * ```html\n * \n * ```\n */\n this.inputFormat = DateTimeUtil.DEFAULT_TIME_INPUT_FORMAT;\n /**\n * Gets/Sets the interaction mode - dialog or drop down.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.mode = PickerInteractionMode.DropDown;\n /**\n * An @Input property that determines the spin behavior. By default `spinLoop` is set to true.\n * The seconds, minutes and hour spinning will wrap around by default.\n * ```html\n * \n * ```\n */\n this.spinLoop = true;\n /**\n * Sets the orientation of the picker's header.\n *\n * @remarks\n * Available in dialog mode only. Default value is `horizontal`.\n *\n * ```html\n * \n * ```\n */\n this.headerOrientation = PickerHeaderOrientation.Horizontal;\n /** @hidden @internal */\n this.readOnly = false;\n /**\n * Emitted after a selection has been done.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.selected = new EventEmitter();\n /**\n * Emitted when the picker's value changes.\n *\n * @remarks\n * Used for `two-way` bindings.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.valueChange = new EventEmitter();\n /**\n * Emitted when the user types/spins invalid time in the time-picker editor.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.validationFailed = new EventEmitter();\n /** @hidden */\n this.cleared = false;\n /** @hidden */\n this.isNotEmpty = false;\n /** @hidden @internal */\n this.displayValue = { transform: (date) => this.formatter(date) };\n /** @hidden @internal */\n this.hourItems = [];\n /** @hidden @internal */\n this.minuteItems = [];\n /** @hidden @internal */\n this.secondsItems = [];\n /** @hidden @internal */\n this.ampmItems = [];\n this._resourceStrings = CurrentResourceStrings.TimePickerResStrings;\n this._okButtonLabel = null;\n this._cancelButtonLabel = null;\n this._itemsDelta = { hours: 1, minutes: 1, seconds: 1 };\n this._ngControl = null;\n this._onChangeCallback = noop;\n this._onTouchedCallback = noop;\n this._onValidatorChange = noop;\n this._defaultDialogOverlaySettings = {\n closeOnOutsideClick: true,\n modal: true,\n closeOnEscape: true,\n outlet: this.outlet\n };\n this._defaultDropDownOverlaySettings = {\n target: this.element.nativeElement,\n modal: false,\n closeOnOutsideClick: true,\n scrollStrategy: new AbsoluteScrollStrategy(),\n positionStrategy: new AutoPositionStrategy(),\n outlet: this.outlet\n };\n this.locale = this.locale || this._localeId;\n }\n /** @hidden @internal */\n onKeyDown(event) {\n switch (event.key) {\n case this.platform.KEYMAP.ARROW_UP:\n if (event.altKey && this.isDropdown) {\n this.close();\n }\n break;\n case this.platform.KEYMAP.ARROW_DOWN:\n if (event.altKey && this.isDropdown) {\n this.open();\n }\n break;\n case this.platform.KEYMAP.ESCAPE:\n this.cancelButtonClick();\n break;\n case this.platform.KEYMAP.SPACE:\n this.open();\n event.preventDefault();\n break;\n }\n }\n /** @hidden @internal */\n getPartValue(value, type) {\n const inputDateParts = DateTimeUtil.parseDateTimeFormat(this.inputFormat);\n const part = inputDateParts.find(element => element.type === type);\n return DateTimeUtil.getPartValue(value, part, part.format.length);\n }\n /** @hidden @internal */\n toISOString(value) {\n return value.toLocaleTimeString('en-GB', {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n });\n }\n // #region ControlValueAccessor\n /** @hidden @internal */\n writeValue(value) {\n this._value = value;\n const date = this.parseToDate(value);\n if (date) {\n this._dateValue = new Date();\n this._dateValue.setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n this.setSelectedValue(this._dateValue);\n }\n else {\n this.setSelectedValue(null);\n }\n if (this.dateTimeEditor) {\n this.dateTimeEditor.value = date;\n }\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden @internal */\n registerOnValidatorChange(fn) {\n this._onValidatorChange = fn;\n }\n /** @hidden @internal */\n validate(control) {\n if (!control.value) {\n return null;\n }\n // InvalidDate handling\n if (isDate(control.value) && !DateTimeUtil.isValidDate(control.value)) {\n return { value: true };\n }\n const errors = {};\n const value = DateTimeUtil.isValidDate(control.value) ? control.value : DateTimeUtil.parseIsoDate(control.value);\n Object.assign(errors, DateTimeUtil.validateMinMax(value, this.minValue, this.maxValue, true, false));\n return Object.keys(errors).length > 0 ? errors : null;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n //#endregion\n /** @hidden */\n ngOnInit() {\n this._ngControl = this._injector.get(NgControl, null);\n this.minDropdownValue = this.setMinMaxDropdownValue('min', this.minDateValue);\n this.maxDropdownValue = this.setMinMaxDropdownValue('max', this.maxDateValue);\n this.setSelectedValue(this._dateValue);\n super.ngOnInit();\n }\n /** @hidden */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.subscribeToDateEditorEvents();\n this.subscribeToToggleDirectiveEvents();\n this._defaultDropDownOverlaySettings.excludeFromOutsideClick = [this._inputGroup.element.nativeElement];\n fromEvent(this.inputDirective.nativeElement, 'blur')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (this.collapsed) {\n this.updateValidityOnBlur();\n }\n });\n this.subToIconsClicked(this.clearComponents, () => this.clear());\n this.clearComponents.changes.pipe(takeUntil(this._destroy$))\n .subscribe(() => this.subToIconsClicked(this.clearComponents, () => this.clear()));\n if (this._ngControl) {\n this._statusChanges$ = this._ngControl.statusChanges.subscribe(this.onStatusChanged.bind(this));\n this._inputGroup.isRequired = this.required;\n this.cdr.detectChanges();\n }\n }\n /** @hidden */\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._statusChanges$) {\n this._statusChanges$.unsubscribe();\n }\n }\n /** @hidden */\n getEditElement() {\n return this.dateTimeEditor.nativeElement;\n }\n /**\n * Opens the picker's dialog UI.\n *\n * @param settings OverlaySettings - the overlay settings to use for positioning the drop down or dialog container according to\n * ```html\n * \n * \n * ```\n */\n open(settings) {\n if (this.disabled || !this.toggleRef.collapsed) {\n return;\n }\n this.setSelectedValue(this._dateValue);\n const overlaySettings = Object.assign({}, this.isDropdown\n ? this.dropDownOverlaySettings\n : this.dialogOverlaySettings, settings);\n this.toggleRef.open(overlaySettings);\n }\n /**\n * Closes the dropdown/dialog.\n * ```html\n * \n * ```\n * ```typescript\n * @ViewChild('timePicker', { read: IgxTimePickerComponent }) picker: IgxTimePickerComponent;\n * picker.close();\n * ```\n */\n close() {\n this.toggleRef.close();\n }\n toggle(settings) {\n if (this.toggleRef.collapsed) {\n this.open(settings);\n }\n else {\n this.close();\n }\n }\n /**\n * Clears the time picker value if it is a `string` or resets the time to `00:00:00` if the value is a Date object.\n *\n * @example\n * ```typescript\n * this.timePicker.clear();\n * ```\n */\n clear() {\n if (this.disabled) {\n return;\n }\n if (!this.toggleRef.collapsed) {\n this.close();\n }\n if (DateTimeUtil.isValidDate(this.value)) {\n const oldValue = new Date(this.value);\n this.value.setHours(0, 0, 0);\n if (this.value.getTime() !== oldValue.getTime()) {\n this.emitValueChange(oldValue, this.value);\n this._dateValue.setHours(0, 0, 0);\n this.dateTimeEditor.value = new Date(this.value);\n this.setSelectedValue(this._dateValue);\n }\n }\n else {\n this.value = null;\n }\n }\n /**\n * Selects time from the igxTimePicker.\n *\n * @example\n * ```typescript\n * this.timePicker.select(date);\n *\n * @param date Date object containing the time to be selected.\n */\n select(date) {\n this.value = date;\n }\n /**\n * Increment a specified `DatePart`.\n *\n * @param datePart The optional DatePart to increment. Defaults to Hour.\n * @param delta The optional delta to increment by. Overrides `itemsDelta`.\n * @example\n * ```typescript\n * this.timePicker.increment(DatePart.Hours);\n * ```\n */\n increment(datePart, delta) {\n this.dateTimeEditor.increment(datePart, delta);\n }\n /**\n * Decrement a specified `DatePart`\n *\n * @param datePart The optional DatePart to decrement. Defaults to Hour.\n * @param delta The optional delta to decrement by. Overrides `itemsDelta`.\n * @example\n * ```typescript\n * this.timePicker.decrement(DatePart.Seconds);\n * ```\n */\n decrement(datePart, delta) {\n this.dateTimeEditor.decrement(datePart, delta);\n }\n /** @hidden @internal */\n cancelButtonClick() {\n this.setSelectedValue(this._dateValue);\n this.dateTimeEditor.value = this.parseToDate(this.value);\n this.close();\n }\n /** @hidden @internal */\n okButtonClick() {\n this.updateValue(this._selectedDate);\n this.close();\n }\n /** @hidden @internal */\n onItemClick(item, dateType) {\n let date = new Date(this._selectedDate);\n switch (dateType) {\n case 'hourList':\n let ampm;\n const selectedHour = parseInt(item, 10);\n let hours = selectedHour;\n if (this.showAmPmList) {\n ampm = this.getPartValue(date, 'ampm');\n hours = this.toTwentyFourHourFormat(hours, ampm);\n const minHours = this.minDropdownValue?.getHours() || 0;\n const maxHours = this.maxDropdownValue?.getHours() || 24;\n if (hours < minHours || hours > maxHours) {\n hours = hours < 12 ? hours + 12 : hours - 12;\n }\n }\n date.setHours(hours);\n date = this.validateDropdownValue(date);\n if (this.valueInRange(date, this.minDropdownValue, this.maxDropdownValue)) {\n this.setSelectedValue(date);\n }\n break;\n case 'minuteList': {\n const minutes = parseInt(item, 10);\n date.setMinutes(minutes);\n date = this.validateDropdownValue(date);\n this.setSelectedValue(date);\n break;\n }\n case 'secondsList': {\n const seconds = parseInt(item, 10);\n date.setSeconds(seconds);\n if (this.valueInRange(date, this.minDropdownValue, this.maxDropdownValue)) {\n this.setSelectedValue(date);\n }\n break;\n }\n case 'ampmList': {\n let hour = this._selectedDate.getHours();\n hour = item === 'AM' ? hour - 12 : hour + 12;\n date.setHours(hour);\n date = this.validateDropdownValue(date, true);\n this.setSelectedValue(date);\n break;\n }\n }\n this.updateEditorValue();\n }\n /** @hidden @internal */\n nextHour(delta) {\n delta = delta > 0 ? 1 : -1;\n const previousDate = new Date(this._selectedDate);\n const minHours = this.minDropdownValue?.getHours();\n const maxHours = this.maxDropdownValue?.getHours();\n const previousHours = previousDate.getHours();\n let hours = previousHours + delta * this.itemsDelta.hours;\n if ((previousHours === maxHours && delta > 0) || (previousHours === minHours && delta < 0)) {\n hours = !this.spinLoop ? previousHours : delta > 0 ? minHours : maxHours;\n }\n this._selectedDate.setHours(hours);\n this._selectedDate = this.validateDropdownValue(this._selectedDate);\n this._selectedDate = new Date(this._selectedDate);\n this.updateEditorValue();\n }\n /** @hidden @internal */\n nextMinute(delta) {\n delta = delta > 0 ? 1 : -1;\n const minHours = this.minDropdownValue.getHours();\n const maxHours = this.maxDropdownValue.getHours();\n const hours = this._selectedDate.getHours();\n let minutes = this._selectedDate.getMinutes();\n const minMinutes = hours === minHours ? this.minDropdownValue.getMinutes() : 0;\n const maxMinutes = hours === maxHours ? this.maxDropdownValue.getMinutes() :\n 60 % this.itemsDelta.minutes > 0 ? 60 - (60 % this.itemsDelta.minutes) :\n 60 - this.itemsDelta.minutes;\n if ((delta < 0 && minutes === minMinutes) || (delta > 0 && minutes === maxMinutes)) {\n minutes = this.spinLoop && minutes === minMinutes ? maxMinutes : this.spinLoop && minutes === maxMinutes ? minMinutes : minutes;\n }\n else {\n minutes = minutes + delta * this.itemsDelta.minutes;\n }\n this._selectedDate.setMinutes(minutes);\n this._selectedDate = this.validateDropdownValue(this._selectedDate);\n this._selectedDate = new Date(this._selectedDate);\n this.updateEditorValue();\n }\n /** @hidden @internal */\n nextSeconds(delta) {\n delta = delta > 0 ? 1 : -1;\n const minHours = this.minDropdownValue.getHours();\n const maxHours = this.maxDropdownValue.getHours();\n const hours = this._selectedDate.getHours();\n const minutes = this._selectedDate.getMinutes();\n const minMinutes = this.minDropdownValue.getMinutes();\n const maxMinutes = this.maxDropdownValue.getMinutes();\n let seconds = this._selectedDate.getSeconds();\n const minSeconds = (hours === minHours && minutes === minMinutes) ? this.minDropdownValue.getSeconds() : 0;\n const maxSeconds = (hours === maxHours && minutes === maxMinutes) ? this.maxDropdownValue.getSeconds() :\n 60 % this.itemsDelta.seconds > 0 ? 60 - (60 % this.itemsDelta.seconds) :\n 60 - this.itemsDelta.seconds;\n if ((delta < 0 && seconds === minSeconds) || (delta > 0 && seconds === maxSeconds)) {\n seconds = this.spinLoop && seconds === minSeconds ? maxSeconds : this.spinLoop && seconds === maxSeconds ? minSeconds : seconds;\n }\n else {\n seconds = seconds + delta * this.itemsDelta.seconds;\n }\n this._selectedDate.setSeconds(seconds);\n this._selectedDate = this.validateDropdownValue(this._selectedDate);\n this._selectedDate = new Date(this._selectedDate);\n this.updateEditorValue();\n }\n /** @hidden @internal */\n nextAmPm(delta) {\n const ampm = this.getPartValue(this._selectedDate, 'ampm');\n if (!delta || (ampm === 'AM' && delta > 0) || (ampm === 'PM' && delta < 0)) {\n let hours = this._selectedDate.getHours();\n const sign = hours < 12 ? 1 : -1;\n hours = hours + sign * 12;\n this._selectedDate.setHours(hours);\n this._selectedDate = this.validateDropdownValue(this._selectedDate, true);\n this._selectedDate = new Date(this._selectedDate);\n this.updateEditorValue();\n }\n }\n /** @hidden @internal */\n setSelectedValue(value) {\n this._selectedDate = value ? new Date(value) : null;\n if (!DateTimeUtil.isValidDate(this._selectedDate)) {\n this._selectedDate = new Date(this.minDropdownValue);\n return;\n }\n if (this.minValue && DateTimeUtil.lessThanMinValue(this._selectedDate, this.minDropdownValue, true, false)) {\n this._selectedDate = new Date(this.minDropdownValue);\n return;\n }\n if (this.maxValue && DateTimeUtil.greaterThanMaxValue(this._selectedDate, this.maxDropdownValue, true, false)) {\n this._selectedDate = new Date(this.maxDropdownValue);\n return;\n }\n if (this._selectedDate.getHours() % this.itemsDelta.hours > 0) {\n this._selectedDate.setHours(this._selectedDate.getHours() + this.itemsDelta.hours - this._selectedDate.getHours() % this.itemsDelta.hours, 0, 0);\n }\n if (this._selectedDate.getMinutes() % this.itemsDelta.minutes > 0) {\n this._selectedDate.setHours(this._selectedDate.getHours(), this._selectedDate.getMinutes() + this.itemsDelta.minutes - this._selectedDate.getMinutes() % this.itemsDelta.minutes, 0);\n }\n if (this._selectedDate.getSeconds() % this.itemsDelta.seconds > 0) {\n this._selectedDate.setSeconds(this._selectedDate.getSeconds() + this.itemsDelta.seconds - this._selectedDate.getSeconds() % this.itemsDelta.seconds);\n }\n }\n onStatusChanged() {\n if ((this._ngControl.control.touched || this._ngControl.control.dirty) &&\n (this._ngControl.control.validator || this._ngControl.control.asyncValidator) &&\n !this._ngControl.disabled) {\n if (this._inputGroup.isFocused) {\n this.inputDirective.valid = this._ngControl.valid ? IgxInputState.VALID : IgxInputState.INVALID;\n }\n else {\n this.inputDirective.valid = this._ngControl.valid ? IgxInputState.INITIAL : IgxInputState.INVALID;\n }\n }\n else {\n // B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526\n this.inputDirective.valid = IgxInputState.INITIAL;\n }\n if (this._inputGroup && this._inputGroup.isRequired !== this.required) {\n this._inputGroup.isRequired = this.required;\n }\n }\n setMinMaxDropdownValue(type, time) {\n let delta;\n const sign = type === 'min' ? 1 : -1;\n const hours = time.getHours();\n let minutes = time.getMinutes();\n let seconds = time.getSeconds();\n if (this.showHoursList && hours % this.itemsDelta.hours > 0) {\n delta = type === 'min' ? this.itemsDelta.hours - hours % this.itemsDelta.hours\n : hours % this.itemsDelta.hours;\n minutes = type === 'min' ? 0\n : 60 % this.itemsDelta.minutes > 0 ? 60 - 60 % this.itemsDelta.minutes\n : 60 - this.itemsDelta.minutes;\n seconds = type === 'min' ? 0\n : 60 % this.itemsDelta.seconds > 0 ? 60 - 60 % this.itemsDelta.seconds\n : 60 - this.itemsDelta.seconds;\n time.setHours(hours + sign * delta, minutes, seconds);\n }\n else if (this.showMinutesList && minutes % this.itemsDelta.minutes > 0) {\n delta = type === 'min' ? this.itemsDelta.minutes - minutes % this.itemsDelta.minutes\n : minutes % this.itemsDelta.minutes;\n seconds = type === 'min' ? 0\n : 60 % this.itemsDelta.seconds > 0 ? 60 - 60 % this.itemsDelta.seconds\n : 60 - this.itemsDelta.seconds;\n time.setHours(hours, minutes + sign * delta, seconds);\n }\n else if (this.showSecondsList && seconds % this.itemsDelta.seconds > 0) {\n delta = type === 'min' ? this.itemsDelta.seconds - seconds % this.itemsDelta.seconds\n : seconds % this.itemsDelta.seconds;\n time.setHours(hours, minutes, seconds + sign * delta);\n }\n return time;\n }\n initializeContainer() {\n requestAnimationFrame(() => {\n if (this.hourList) {\n this.hourList.nativeElement.focus();\n }\n else if (this.minuteList) {\n this.minuteList.nativeElement.focus();\n }\n else if (this.secondsList) {\n this.secondsList.nativeElement.focus();\n }\n });\n }\n validateDropdownValue(date, isAmPm = false) {\n if (date > this.maxDropdownValue) {\n if (isAmPm && date.getHours() !== this.maxDropdownValue.getHours()) {\n date.setHours(12);\n }\n else {\n date = new Date(this.maxDropdownValue);\n }\n }\n if (date < this.minDropdownValue) {\n date = new Date(this.minDropdownValue);\n }\n return date;\n }\n emitValueChange(oldValue, newValue) {\n if (!isEqual(oldValue, newValue)) {\n this.valueChange.emit(newValue);\n }\n }\n emitValidationFailedEvent(previousValue) {\n const args = {\n owner: this,\n previousValue,\n currentValue: this.value\n };\n this.validationFailed.emit(args);\n }\n updateValidityOnBlur() {\n this._onTouchedCallback();\n if (this._ngControl) {\n if (!this._ngControl.valid) {\n this.inputDirective.valid = IgxInputState.INVALID;\n }\n else {\n this.inputDirective.valid = IgxInputState.INITIAL;\n }\n }\n }\n valueInRange(value, minValue, maxValue) {\n if (minValue && DateTimeUtil.lessThanMinValue(value, minValue, true, false)) {\n return false;\n }\n if (maxValue && DateTimeUtil.greaterThanMaxValue(value, maxValue, true, false)) {\n return false;\n }\n return true;\n }\n parseToDate(value) {\n return DateTimeUtil.isValidDate(value) ? value : DateTimeUtil.parseIsoDate(value);\n }\n toTwentyFourHourFormat(hour, ampm) {\n if (ampm === 'PM' && hour < 12) {\n hour += 12;\n }\n else if (ampm === 'AM' && hour === 12) {\n hour = 0;\n }\n return hour;\n }\n updateValue(newValue) {\n if (!this.value) {\n this.value = newValue ? new Date(newValue) : newValue;\n }\n else if (isDate(this.value)) {\n const date = new Date(this.value);\n date.setHours(newValue?.getHours() || 0, newValue?.getMinutes() || 0, newValue?.getSeconds() || 0);\n this.value = date;\n }\n else {\n this.value = newValue ? this.toISOString(newValue) : newValue;\n }\n }\n updateEditorValue() {\n const date = this.dateTimeEditor.value ? new Date(this.dateTimeEditor.value) : new Date();\n date.setHours(this._selectedDate.getHours(), this._selectedDate.getMinutes(), this._selectedDate.getSeconds());\n this.dateTimeEditor.value = date;\n }\n subscribeToDateEditorEvents() {\n this.dateTimeEditor.valueChange.pipe(\n // internal date editor directive is only used w/ Date object values:\n takeUntil(this._destroy$)).subscribe((date) => {\n this.updateValue(date);\n });\n this.dateTimeEditor.validationFailed.pipe(takeUntil(this._destroy$)).subscribe((event) => {\n this.emitValidationFailedEvent(event.oldValue);\n });\n }\n subscribeToToggleDirectiveEvents() {\n if (this.toggleRef) {\n if (this._inputGroup) {\n this.toggleRef.element.style.width = this._inputGroup.element.nativeElement.getBoundingClientRect().width + 'px';\n }\n this.toggleRef.opening.pipe(takeUntil(this._destroy$)).subscribe((e) => {\n const args = { owner: this, event: e.event, cancel: false };\n this.opening.emit(args);\n e.cancel = args.cancel;\n if (args.cancel) {\n return;\n }\n this.initializeContainer();\n });\n this.toggleRef.opened.pipe(takeUntil(this._destroy$)).subscribe(() => {\n this.opened.emit({ owner: this });\n });\n this.toggleRef.closed.pipe(takeUntil(this._destroy$)).subscribe(() => {\n this.closed.emit({ owner: this });\n });\n this.toggleRef.closing.pipe(takeUntil(this._destroy$)).subscribe((e) => {\n const args = { owner: this, event: e.event, cancel: false };\n this.closing.emit(args);\n e.cancel = args.cancel;\n if (args.cancel) {\n return;\n }\n const value = this.parseToDate(this.value);\n if (this.dateTimeEditor.value?.getTime() !== value?.getTime()) {\n this.updateValue(this._selectedDate);\n }\n // Do not focus the input if clicking outside in dropdown mode\n const input = this.getEditElement();\n if (input && !(e.event && this.isDropdown)) {\n input.focus();\n }\n else {\n this.updateValidityOnBlur();\n }\n });\n }\n }\n}\nIgxTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerComponent, deps: [{ token: i0.ElementRef }, { token: LOCALE_ID }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }, { token: i0.Injector }, { token: PlatformUtil }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTimePickerComponent, selector: \"igx-time-picker\", inputs: { id: \"id\", displayFormat: \"displayFormat\", inputFormat: \"inputFormat\", mode: \"mode\", minValue: \"minValue\", maxValue: \"maxValue\", spinLoop: \"spinLoop\", formatter: \"formatter\", headerOrientation: \"headerOrientation\", readOnly: \"readOnly\", value: \"value\", resourceStrings: \"resourceStrings\", okButtonLabel: \"okButtonLabel\", cancelButtonLabel: \"cancelButtonLabel\", itemsDelta: \"itemsDelta\" }, outputs: { selected: \"selected\", valueChange: \"valueChange\", validationFailed: \"validationFailed\" }, host: { listeners: { \"keydown\": \"onKeyDown($event)\" }, properties: { \"attr.id\": \"this.id\" } }, providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxTimePickerComponent,\n multi: true\n },\n {\n provide: IGX_TIME_PICKER_COMPONENT,\n useExisting: IgxTimePickerComponent\n },\n {\n provide: NG_VALIDATORS,\n useExisting: IgxTimePickerComponent,\n multi: true\n }\n ], queries: [{ propertyName: \"label\", first: true, predicate: IgxLabelDirective, descendants: true }, { propertyName: \"timePickerActionsDirective\", first: true, predicate: IgxTimePickerActionsDirective, descendants: true }, { propertyName: \"clearComponents\", predicate: IgxPickerClearComponent }], viewQueries: [{ propertyName: \"hourList\", first: true, predicate: [\"hourList\"], descendants: true }, { propertyName: \"minuteList\", first: true, predicate: [\"minuteList\"], descendants: true }, { propertyName: \"secondsList\", first: true, predicate: [\"secondsList\"], descendants: true }, { propertyName: \"ampmList\", first: true, predicate: [\"ampmList\"], descendants: true }, { propertyName: \"inputDirective\", first: true, predicate: IgxInputDirective, descendants: true, read: IgxInputDirective }, { propertyName: \"_inputGroup\", first: true, predicate: IgxInputGroupComponent, descendants: true }, { propertyName: \"dateTimeEditor\", first: true, predicate: IgxDateTimeEditorDirective, descendants: true, static: true }, { propertyName: \"toggleRef\", first: true, predicate: IgxToggleDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n\\n \\n access_time\\n \\n\\n \\n \\n \\n \\n \\n \\n\\n \\n clear\\n \\n\\n \\n \\n \\n \\n \\n \\n\\n\\n\\n
    \\n \\n \\n
    \\n
    \\n\\n
    \\n
    \\n

    \\n {{ this.selectedDate | timeFormatPipe }}\\n

    \\n
    \\n
    \\n
    \\n
    \\n {{ hour }}\\n
    \\n
    \\n {{ minute }}\\n
    \\n
    \\n {{ seconds }}\\n
    \\n
    \\n {{ ampm }}\\n
    \\n
    \\n \\n \\n
    \\n
    \\n\", styles: [\":host{display:block}\\n\"], dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgClass; }), selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgTemplateOutlet; }), selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxDateTimeEditorDirective; }), selector: \"[igxDateTimeEditor]\", inputs: [\"locale\", \"minValue\", \"maxValue\", \"spinLoop\", \"displayFormat\", \"igxDateTimeEditor\", \"value\", \"spinDelta\"], outputs: [\"valueChange\", \"validationFailed\"], exportAs: [\"igxDateTimeEditor\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxInputGroupComponent; }), selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxInputDirective; }), selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxPrefixDirective; }), selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxSuffixDirective; }), selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxButtonDirective; }), selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxIconComponent; }), selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxToggleDirective; }), selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxTextSelectionDirective; }), selector: \"[igxTextSelection]\", inputs: [\"igxTextSelection\"], exportAs: [\"igxTextSelection\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxItemListDirective; }), selector: \"[igxItemList]\", inputs: [\"igxItemList\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxTimeItemDirective; }), selector: \"[igxTimeItem]\", inputs: [\"igxTimeItem\"], exportAs: [\"timeItem\"] }, { kind: \"pipe\", type: i0.forwardRef(function () { return TimeFormatPipe; }), name: \"timeFormatPipe\" }, { kind: \"pipe\", type: i0.forwardRef(function () { return TimeItemPipe; }), name: \"timeItemPipe\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerComponent, decorators: [{\n type: Component,\n args: [{ providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IgxTimePickerComponent,\n multi: true\n },\n {\n provide: IGX_TIME_PICKER_COMPONENT,\n useExisting: IgxTimePickerComponent\n },\n {\n provide: NG_VALIDATORS,\n useExisting: IgxTimePickerComponent,\n multi: true\n }\n ], selector: 'igx-time-picker', template: \"\\n \\n\\n \\n access_time\\n \\n\\n \\n \\n \\n \\n \\n \\n\\n \\n clear\\n \\n\\n \\n \\n \\n \\n \\n \\n\\n\\n\\n
    \\n \\n \\n
    \\n
    \\n\\n
    \\n
    \\n

    \\n {{ this.selectedDate | timeFormatPipe }}\\n

    \\n
    \\n
    \\n
    \\n
    \\n {{ hour }}\\n
    \\n
    \\n {{ minute }}\\n
    \\n
    \\n {{ seconds }}\\n
    \\n
    \\n {{ ampm }}\\n
    \\n
    \\n \\n \\n
    \\n
    \\n\", styles: [\":host{display:block}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }, { type: i0.Injector }, { type: PlatformUtil }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], displayFormat: [{\n type: Input\n }], inputFormat: [{\n type: Input\n }], mode: [{\n type: Input\n }], minValue: [{\n type: Input\n }], maxValue: [{\n type: Input\n }], spinLoop: [{\n type: Input\n }], formatter: [{\n type: Input\n }], headerOrientation: [{\n type: Input\n }], readOnly: [{\n type: Input\n }], selected: [{\n type: Output\n }], valueChange: [{\n type: Output\n }], validationFailed: [{\n type: Output\n }], hourList: [{\n type: ViewChild,\n args: ['hourList']\n }], minuteList: [{\n type: ViewChild,\n args: ['minuteList']\n }], secondsList: [{\n type: ViewChild,\n args: ['secondsList']\n }], ampmList: [{\n type: ViewChild,\n args: ['ampmList']\n }], clearComponents: [{\n type: ContentChildren,\n args: [IgxPickerClearComponent]\n }], label: [{\n type: ContentChild,\n args: [IgxLabelDirective]\n }], timePickerActionsDirective: [{\n type: ContentChild,\n args: [IgxTimePickerActionsDirective]\n }], inputDirective: [{\n type: ViewChild,\n args: [IgxInputDirective, { read: IgxInputDirective }]\n }], _inputGroup: [{\n type: ViewChild,\n args: [IgxInputGroupComponent]\n }], dateTimeEditor: [{\n type: ViewChild,\n args: [IgxDateTimeEditorDirective, { static: true }]\n }], toggleRef: [{\n type: ViewChild,\n args: [IgxToggleDirective]\n }], value: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], okButtonLabel: [{\n type: Input\n }], cancelButtonLabel: [{\n type: Input\n }], itemsDelta: [{\n type: Input\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n/**\n * @hidden\n */\nclass IgxTimePickerModule {\n}\nIgxTimePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTimePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerModule, declarations: [IgxTimePickerComponent, IgxItemListDirective,\n IgxTimeItemDirective,\n IgxTimePickerTemplateDirective,\n IgxTimePickerActionsDirective,\n TimeFormatPipe,\n TimeItemPipe], imports: [CommonModule,\n IgxDateTimeEditorModule,\n IgxInputGroupModule,\n IgxIconModule,\n IgxButtonModule,\n IgxMaskModule,\n IgxToggleModule,\n IgxTextSelectionModule], exports: [IgxTimePickerComponent, IgxTimePickerTemplateDirective,\n IgxTimePickerActionsDirective,\n IgxPickersCommonModule,\n IgxInputGroupModule] });\nIgxTimePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerModule, imports: [CommonModule,\n IgxDateTimeEditorModule,\n IgxInputGroupModule,\n IgxIconModule,\n IgxButtonModule,\n IgxMaskModule,\n IgxToggleModule,\n IgxTextSelectionModule, IgxPickersCommonModule,\n IgxInputGroupModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTimePickerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxTimePickerComponent,\n IgxItemListDirective,\n IgxTimeItemDirective,\n IgxTimePickerTemplateDirective,\n IgxTimePickerActionsDirective,\n TimeFormatPipe,\n TimeItemPipe\n ],\n exports: [\n IgxTimePickerComponent,\n IgxTimePickerTemplateDirective,\n IgxTimePickerActionsDirective,\n IgxPickersCommonModule,\n IgxInputGroupModule\n ],\n imports: [\n CommonModule,\n IgxDateTimeEditorModule,\n IgxInputGroupModule,\n IgxIconModule,\n IgxButtonModule,\n IgxMaskModule,\n IgxToggleModule,\n IgxTextSelectionModule\n ],\n providers: []\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxExcelStyleDateExpressionComponent extends IgxExcelStyleDefaultExpressionComponent {\n get inputValuesElement() {\n return this.picker?.getEditElement() || this.input?.nativeElement;\n }\n get inputDatePlaceholder() {\n return this.grid.resourceStrings['igx_grid_filter_row_date_placeholder'];\n }\n get inputTimePlaceholder() {\n return this.grid.resourceStrings['igx_grid_filter_row_time_placeholder'];\n }\n get weekStart() {\n return getLocaleFirstDayOfWeek(this.grid.locale);\n }\n}\nIgxExcelStyleDateExpressionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleDateExpressionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleDateExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleDateExpressionComponent, selector: \"igx-excel-style-date-expression\", viewQueries: [{ propertyName: \"input\", first: true, predicate: [\"input\"], descendants: true, read: IgxInputDirective }, { propertyName: \"picker\", first: true, predicate: [\"picker\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n filter_list\\n \\n \\n \\n {{translateCondition(condition)}}\\n \\n\\n\\n\\n \\n \\n \\n\\n\\n\\n \\n \\n \\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\\n \\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\\n \\n\\n\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i5.DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i5.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i5.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxButtonGroupComponent, selector: \"igx-buttongroup\", inputs: [\"id\", \"itemContentCssClass\", \"multiSelection\", \"values\", \"disabled\", \"alignment\"], outputs: [\"selected\", \"deselected\"] }, { kind: \"component\", type: IgxDatePickerComponent, selector: \"igx-date-picker\", inputs: [\"hideOutsideDays\", \"displayMonthsCount\", \"showWeekNumbers\", \"formatter\", \"headerOrientation\", \"todayButtonLabel\", \"cancelButtonLabel\", \"spinLoop\", \"spinDelta\", \"outlet\", \"id\", \"formatViews\", \"disabledDates\", \"specialDates\", \"calendarFormat\", \"value\", \"minValue\", \"maxValue\", \"resourceStrings\", \"readOnly\"], outputs: [\"valueChange\", \"validationFailed\"] }, { kind: \"component\", type: IgxPickerToggleComponent, selector: \"igx-picker-toggle\", outputs: [\"clicked\"] }, { kind: \"component\", type: IgxPickerClearComponent, selector: \"igx-picker-clear\" }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxTimePickerComponent, selector: \"igx-time-picker\", inputs: [\"id\", \"displayFormat\", \"inputFormat\", \"mode\", \"minValue\", \"maxValue\", \"spinLoop\", \"formatter\", \"headerOrientation\", \"readOnly\", \"value\", \"resourceStrings\", \"okButtonLabel\", \"cancelButtonLabel\", \"itemsDelta\"], outputs: [\"selected\", \"valueChange\", \"validationFailed\"] }, { kind: \"directive\", type: IgxOverlayOutletDirective, selector: \"[igxOverlayOutlet]\", exportAs: [\"overlay-outlet\"] }, { kind: \"component\", type: IgxSelectComponent, selector: \"igx-select\", inputs: [\"placeholder\", \"disabled\", \"overlaySettings\", \"value\", \"type\"], outputs: [\"opening\", \"opened\", \"closing\", \"closed\"] }, { kind: \"component\", type: IgxSelectItemComponent, selector: \"igx-select-item\", inputs: [\"text\"] }, { kind: \"directive\", type: IgxDateTimeEditorDirective, selector: \"[igxDateTimeEditor]\", inputs: [\"locale\", \"minValue\", \"maxValue\", \"spinLoop\", \"displayFormat\", \"igxDateTimeEditor\", \"value\", \"spinDelta\"], outputs: [\"valueChange\", \"validationFailed\"], exportAs: [\"igxDateTimeEditor\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleDateExpressionComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-date-expression', template: \"\\n \\n \\n filter_list\\n \\n \\n \\n {{translateCondition(condition)}}\\n \\n\\n\\n\\n \\n \\n \\n\\n\\n\\n \\n \\n \\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\\n \\n\\n \\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\\n \\n\\n\\n
    \\n
    \\n\" }]\n }], propDecorators: { input: [{\n type: ViewChild,\n args: ['input', { read: IgxInputDirective, static: false }]\n }], picker: [{\n type: ViewChild,\n args: ['picker']\n }] } });\n\n/**\n * @hidden @internal\n */\nclass FilterListItem {\n constructor() {\n this.isSpecial = false;\n this.isBlanks = false;\n }\n}\n/**\n * @hidden\n */\nclass ExpressionUI {\n constructor() {\n this.isSelected = false;\n this.isVisible = true;\n }\n}\nfunction generateExpressionsList(expressions, operator, expressionsUIs) {\n generateExpressionsListRecursive(expressions, operator, expressionsUIs);\n // The beforeOperator of the first expression and the afterOperator of the last expression should be null\n if (expressionsUIs.length) {\n expressionsUIs[expressionsUIs.length - 1].afterOperator = null;\n }\n}\nfunction generateExpressionsListRecursive(expressions, operator, expressionsUIs) {\n if (!expressions) {\n return;\n }\n if (expressions instanceof FilteringExpressionsTree) {\n const expressionsTree = expressions;\n for (const operand of expressionsTree.filteringOperands) {\n generateExpressionsListRecursive(operand, expressionsTree.operator, expressionsUIs);\n }\n if (expressionsUIs.length) {\n expressionsUIs[expressionsUIs.length - 1].afterOperator = operator;\n }\n }\n else {\n const exprUI = new ExpressionUI();\n exprUI.expression = expressions;\n exprUI.afterOperator = operator;\n const prevExprUI = expressionsUIs[expressionsUIs.length - 1];\n if (prevExprUI) {\n exprUI.beforeOperator = prevExprUI.afterOperator;\n }\n expressionsUIs.push(exprUI);\n }\n}\n\n/**\n * @hidden\n */\nclass IgxExcelStyleCustomDialogComponent {\n constructor(overlayService, cdr, platform) {\n this.overlayService = overlayService;\n this.cdr = cdr;\n this.platform = platform;\n this.expressionsList = new Array();\n this._customDialogPositionSettings = {\n verticalDirection: VerticalAlignment.Middle,\n horizontalDirection: HorizontalAlignment.Center,\n horizontalStartPoint: HorizontalAlignment.Center,\n verticalStartPoint: VerticalAlignment.Middle\n };\n this._customDialogOverlaySettings = {\n closeOnOutsideClick: true,\n modal: false,\n positionStrategy: new AutoPositionStrategy(this._customDialogPositionSettings),\n scrollStrategy: new AbsoluteScrollStrategy()\n };\n }\n ngAfterViewInit() {\n this._customDialogOverlaySettings.outlet = this.grid.outlet;\n }\n get template() {\n if (this.column.dataType === GridColumnDataType.Date) {\n return this.dateExpressionTemplate;\n }\n return this.defaultExpressionTemplate;\n }\n get grid() {\n return this.filteringService.grid;\n }\n onCustomDialogOpening() {\n if (this.selectedOperator) {\n this.createInitialExpressionUIElement();\n }\n }\n onCustomDialogOpened() {\n if (this.expressionComponents.first) {\n this.expressionComponents.first.focus();\n }\n }\n open(esf) {\n this._customDialogOverlaySettings.target =\n this.overlayComponentId ?\n this.grid.rootGrid ? this.grid.rootGrid.nativeElement : this.grid.nativeElement :\n esf;\n this.toggle.open(this._customDialogOverlaySettings);\n this.overlayComponentId = this.toggle.overlayId;\n }\n onClearButtonClick() {\n this.filteringService.clearFilter(this.column.field);\n this.createInitialExpressionUIElement();\n this.cdr.detectChanges();\n }\n closeDialog() {\n if (this.overlayComponentId) {\n this.overlayService.hide(this.overlayComponentId);\n this.overlayComponentId = null;\n }\n else {\n this.toggle.close();\n }\n }\n onApplyButtonClick() {\n this.expressionsList = this.expressionsList.filter(element => element.expression.condition &&\n (element.expression.searchVal || element.expression.searchVal === 0 || element.expression.condition.isUnary));\n if (this.expressionsList.length > 0) {\n this.expressionsList[0].beforeOperator = null;\n this.expressionsList[this.expressionsList.length - 1].afterOperator = null;\n }\n this.filteringService.filterInternal(this.column.field, this.expressionsList);\n this.closeDialog();\n }\n onAddButtonClick() {\n const exprUI = new ExpressionUI();\n exprUI.expression = {\n condition: null,\n fieldName: this.column.field,\n ignoreCase: this.column.filteringIgnoreCase,\n searchVal: null\n };\n this.expressionsList[this.expressionsList.length - 1].afterOperator = FilteringLogic.And;\n exprUI.beforeOperator = this.expressionsList[this.expressionsList.length - 1].afterOperator;\n this.expressionsList.push(exprUI);\n this.markChildrenForCheck();\n this.scrollToBottom();\n }\n onExpressionRemoved(event) {\n const indexToRemove = this.expressionsList.indexOf(event);\n if (indexToRemove === 0 && this.expressionsList.length > 1) {\n this.expressionsList[1].beforeOperator = null;\n }\n else if (indexToRemove === this.expressionsList.length - 1) {\n this.expressionsList[indexToRemove - 1].afterOperator = null;\n }\n else {\n this.expressionsList[indexToRemove - 1].afterOperator = this.expressionsList[indexToRemove + 1].beforeOperator;\n this.expressionsList[0].beforeOperator = null;\n this.expressionsList[this.expressionsList.length - 1].afterOperator = null;\n }\n this.expressionsList.splice(indexToRemove, 1);\n this.cdr.detectChanges();\n this.markChildrenForCheck();\n }\n onLogicOperatorChanged(event) {\n const index = this.expressionsList.indexOf(event.target);\n event.target.afterOperator = event.newValue;\n if (index + 1 < this.expressionsList.length) {\n this.expressionsList[index + 1].beforeOperator = event.newValue;\n }\n }\n onKeyDown(eventArgs) {\n eventArgs.stopPropagation();\n }\n onApplyButtonKeyDown(eventArgs) {\n if (eventArgs.key === this.platform.KEYMAP.TAB && !eventArgs.shiftKey) {\n eventArgs.stopPropagation();\n eventArgs.preventDefault();\n }\n }\n createCondition(conditionName) {\n switch (this.column.dataType) {\n case GridColumnDataType.Boolean:\n return IgxBooleanFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.Number:\n case GridColumnDataType.Currency:\n case GridColumnDataType.Percent:\n return IgxNumberFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.Date:\n return IgxDateFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.Time:\n return IgxTimeFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.DateTime:\n return IgxDateTimeFilteringOperand.instance().condition(conditionName);\n default:\n return IgxStringFilteringOperand.instance().condition(conditionName);\n }\n }\n markChildrenForCheck() {\n this.expressionComponents.forEach(x => x.cdr.markForCheck());\n this.expressionDateComponents.forEach(x => x.cdr.markForCheck());\n }\n createInitialExpressionUIElement() {\n this.expressionsList = [];\n const firstExprUI = new ExpressionUI();\n firstExprUI.expression = {\n condition: this.createCondition(this.selectedOperator),\n fieldName: this.column.field,\n ignoreCase: this.column.filteringIgnoreCase,\n searchVal: null\n };\n firstExprUI.afterOperator = FilteringLogic.And;\n this.expressionsList.push(firstExprUI);\n const secondExprUI = new ExpressionUI();\n secondExprUI.expression = {\n condition: null,\n fieldName: this.column.field,\n ignoreCase: this.column.filteringIgnoreCase,\n searchVal: null\n };\n secondExprUI.beforeOperator = FilteringLogic.And;\n this.expressionsList.push(secondExprUI);\n }\n scrollToBottom() {\n requestAnimationFrame(() => {\n this.expressionsContainer.nativeElement.scrollTop = this.expressionsContainer.nativeElement.scrollHeight;\n });\n }\n}\nIgxExcelStyleCustomDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleCustomDialogComponent, deps: [{ token: IgxOverlayService }, { token: i0.ChangeDetectorRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleCustomDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleCustomDialogComponent, selector: \"igx-excel-style-custom-dialog\", inputs: { expressionsList: \"expressionsList\", column: \"column\", selectedOperator: \"selectedOperator\", filteringService: \"filteringService\", overlayComponentId: \"overlayComponentId\", displayDensity: \"displayDensity\" }, viewQueries: [{ propertyName: \"toggle\", first: true, predicate: [\"toggle\"], descendants: true, read: IgxToggleDirective, static: true }, { propertyName: \"defaultExpressionTemplate\", first: true, predicate: [\"defaultExpressionTemplate\"], descendants: true, read: TemplateRef }, { propertyName: \"dateExpressionTemplate\", first: true, predicate: [\"dateExpressionTemplate\"], descendants: true, read: TemplateRef }, { propertyName: \"expressionsContainer\", first: true, predicate: [\"expressionsContainer\"], descendants: true, static: true }, { propertyName: \"expressionComponents\", predicate: IgxExcelStyleDefaultExpressionComponent, descendants: true }, { propertyName: \"expressionDateComponents\", predicate: IgxExcelStyleDateExpressionComponent, descendants: true }], ngImport: i0, template: \"
    \\n
    \\n

    \\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_header }}{{ column.header || column.field }}\\n

    \\n
    \\n\\n
    \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n\\n \\n
    \\n\\n
    \\n
    \\n \\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_clear }}\\n \\n
    \\n
    \\n \\n {{ grid.resourceStrings.igx_grid_excel_cancel }}\\n \\n
    \\n
    \\n \\n {{ grid.resourceStrings.igx_grid_excel_apply }}\\n \\n
    \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"component\", type: IgxExcelStyleDefaultExpressionComponent, selector: \"igx-excel-style-default-expression\", inputs: [\"column\", \"expressionUI\", \"expressionsList\", \"grid\", \"displayDensity\"], outputs: [\"expressionRemoved\", \"logicOperatorChanged\"] }, { kind: \"component\", type: IgxExcelStyleDateExpressionComponent, selector: \"igx-excel-style-date-expression\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleCustomDialogComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-custom-dialog', template: \"
    \\n
    \\n

    \\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_header }}{{ column.header || column.field }}\\n

    \\n
    \\n\\n
    \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n\\n \\n
    \\n\\n
    \\n
    \\n \\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_clear }}\\n \\n
    \\n
    \\n \\n {{ grid.resourceStrings.igx_grid_excel_cancel }}\\n \\n
    \\n
    \\n \\n {{ grid.resourceStrings.igx_grid_excel_apply }}\\n \\n
    \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxOverlayService }, { type: i0.ChangeDetectorRef }, { type: PlatformUtil }]; }, propDecorators: { expressionsList: [{\n type: Input\n }], column: [{\n type: Input\n }], selectedOperator: [{\n type: Input\n }], filteringService: [{\n type: Input\n }], overlayComponentId: [{\n type: Input\n }], displayDensity: [{\n type: Input\n }], toggle: [{\n type: ViewChild,\n args: ['toggle', { read: IgxToggleDirective, static: true }]\n }], defaultExpressionTemplate: [{\n type: ViewChild,\n args: ['defaultExpressionTemplate', { read: TemplateRef }]\n }], dateExpressionTemplate: [{\n type: ViewChild,\n args: ['dateExpressionTemplate', { read: TemplateRef }]\n }], expressionsContainer: [{\n type: ViewChild,\n args: ['expressionsContainer', { static: true }]\n }], expressionComponents: [{\n type: ViewChildren,\n args: [IgxExcelStyleDefaultExpressionComponent]\n }], expressionDateComponents: [{\n type: ViewChildren,\n args: [IgxExcelStyleDateExpressionComponent]\n }] } });\n\n/**\n * A component used for presenting Excel style conditional filter UI.\n */\nclass IgxExcelStyleConditionalFilterComponent {\n constructor(esf, platform) {\n this.esf = esf;\n this.platform = platform;\n this.shouldOpenSubMenu = true;\n this.destroy$ = new Subject();\n this._subMenuPositionSettings = {\n verticalStartPoint: VerticalAlignment.Top\n };\n this._subMenuOverlaySettings = {\n closeOnOutsideClick: true,\n modal: false,\n positionStrategy: new AutoPositionStrategy(this._subMenuPositionSettings),\n scrollStrategy: new AbsoluteScrollStrategy()\n };\n this.esf.columnChange.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.esf.grid) {\n this.shouldOpenSubMenu = true;\n this._subMenuOverlaySettings.outlet = this.esf.grid.outlet;\n }\n });\n if (this.esf.grid) {\n this._subMenuOverlaySettings.outlet = this.esf.grid.outlet;\n }\n }\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden @internal\n */\n onTextFilterKeyDown(eventArgs) {\n if (eventArgs.key === this.platform.KEYMAP.ENTER) {\n this.onTextFilterClick(eventArgs);\n }\n }\n /**\n * @hidden @internal\n */\n onTextFilterClick(eventArgs) {\n if (this.shouldOpenSubMenu) {\n this._subMenuOverlaySettings.target = eventArgs.currentTarget;\n const gridRect = this.esf.grid.nativeElement.getBoundingClientRect();\n const dropdownRect = this.esf.mainDropdown.nativeElement.getBoundingClientRect();\n let x = dropdownRect.left + dropdownRect.width;\n let x1 = gridRect.left + gridRect.width;\n x += window.pageXOffset;\n x1 += window.pageXOffset;\n if (Math.abs(x - x1) < 200) {\n this._subMenuOverlaySettings.positionStrategy.settings.horizontalDirection = HorizontalAlignment.Left;\n this._subMenuOverlaySettings.positionStrategy.settings.horizontalStartPoint = HorizontalAlignment.Left;\n }\n else {\n this._subMenuOverlaySettings.positionStrategy.settings.horizontalDirection = HorizontalAlignment.Right;\n this._subMenuOverlaySettings.positionStrategy.settings.horizontalStartPoint = HorizontalAlignment.Right;\n }\n this.subMenu.open(this._subMenuOverlaySettings);\n this.shouldOpenSubMenu = false;\n }\n }\n /**\n * @hidden @internal\n */\n getCondition(value) {\n return this.esf.column.filters.condition(value);\n }\n /**\n * @hidden @internal\n */\n translateCondition(value) {\n return this.esf.grid.resourceStrings[`igx_grid_filter_${this.getCondition(value).name}`] || value;\n }\n /**\n * @hidden @internal\n */\n onSubMenuSelection(eventArgs) {\n if (this.esf.expressionsList && this.esf.expressionsList.length &&\n this.esf.expressionsList[0].expression.condition.name !== 'in') {\n this.customDialog.expressionsList = this.esf.expressionsList;\n }\n this.customDialog.selectedOperator = eventArgs.newSelection.value;\n eventArgs.cancel = true;\n if (this.esf.overlayComponentId) {\n this.esf.hide();\n }\n this.subMenu.close();\n this.customDialog.open(this.esf.mainDropdown.nativeElement);\n }\n /**\n * @hidden @internal\n */\n onSubMenuClosed() {\n requestAnimationFrame(() => {\n this.shouldOpenSubMenu = true;\n });\n }\n /**\n * @hidden @internal\n */\n showCustomFilterItem() {\n const exprTree = this.esf.column.filteringExpressionsTree;\n return exprTree && exprTree.filteringOperands && exprTree.filteringOperands.length &&\n !(exprTree.filteringOperands[0].condition &&\n exprTree.filteringOperands[0].condition.name === 'in');\n }\n /**\n * @hidden @internal\n */\n get subMenuText() {\n switch (this.esf.column.dataType) {\n case GridColumnDataType.Boolean:\n return this.esf.grid.resourceStrings.igx_grid_excel_boolean_filter;\n case GridColumnDataType.Number:\n case GridColumnDataType.Percent:\n return this.esf.grid.resourceStrings.igx_grid_excel_number_filter;\n case GridColumnDataType.Date:\n case GridColumnDataType.DateTime:\n case GridColumnDataType.Time:\n return this.esf.grid.resourceStrings.igx_grid_excel_date_filter;\n case GridColumnDataType.Currency:\n return this.esf.grid.resourceStrings.igx_grid_excel_currency_filter;\n default:\n return this.esf.grid.resourceStrings.igx_grid_excel_text_filter;\n }\n }\n /**\n * @hidden @internal\n */\n get conditions() {\n return this.esf.column.filters.conditionList();\n }\n}\nIgxExcelStyleConditionalFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleConditionalFilterComponent, deps: [{ token: BaseFilteringComponent }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleConditionalFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleConditionalFilterComponent, selector: \"igx-excel-style-conditional-filter\", viewQueries: [{ propertyName: \"customDialog\", first: true, predicate: [\"customDialog\"], descendants: true, read: IgxExcelStyleCustomDialogComponent }, { propertyName: \"subMenu\", first: true, predicate: [\"subMenu\"], descendants: true, read: IgxDropDownComponent }], ngImport: i0, template: \"\\n
    \\n {{ subMenuText }}\\n keyboard_arrow_right\\n
    \\n\\n \\n
    \\n \\n
    \\n \\n {{ translateCondition(condition) }}\\n
    \\n \\n \\n
    \\n filter_list\\n {{ esf.grid.resourceStrings.igx_grid_excel_custom_filter }}\\n
    \\n
    \\n
    \\n \\n\\n \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxDropDownComponent, selector: \"igx-drop-down\", inputs: [\"allowItemsFocus\", \"labelledBy\"], outputs: [\"opening\", \"opened\", \"closing\", \"closed\"] }, { kind: \"component\", type: IgxDropDownItemComponent, selector: \"igx-drop-down-item\" }, { kind: \"directive\", type: IgxDropDownItemNavigationDirective, selector: \"[igxDropDownItemNavigation]\", inputs: [\"igxDropDownItemNavigation\"] }, { kind: \"component\", type: IgxExcelStyleCustomDialogComponent, selector: \"igx-excel-style-custom-dialog\", inputs: [\"expressionsList\", \"column\", \"selectedOperator\", \"filteringService\", \"overlayComponentId\", \"displayDensity\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleConditionalFilterComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-conditional-filter', template: \"\\n
    \\n {{ subMenuText }}\\n keyboard_arrow_right\\n
    \\n\\n \\n
    \\n \\n
    \\n \\n {{ translateCondition(condition) }}\\n
    \\n \\n \\n
    \\n filter_list\\n {{ esf.grid.resourceStrings.igx_grid_excel_custom_filter }}\\n
    \\n
    \\n
    \\n \\n\\n \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }, { type: PlatformUtil }]; }, propDecorators: { customDialog: [{\n type: ViewChild,\n args: ['customDialog', { read: IgxExcelStyleCustomDialogComponent }]\n }], subMenu: [{\n type: ViewChild,\n args: ['subMenu', { read: IgxDropDownComponent }]\n }] } });\n\n/**\n * A component used for presenting Excel style header UI.\n */\nclass IgxExcelStyleHeaderComponent {\n constructor(esf) {\n this.esf = esf;\n }\n}\nIgxExcelStyleHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleHeaderComponent, deps: [{ token: BaseFilteringComponent }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleHeaderComponent, selector: \"igx-excel-style-header\", inputs: { showPinning: \"showPinning\", showSelecting: \"showSelecting\", showHiding: \"showHiding\" }, ngImport: i0, template: \"
    \\n

    {{ esf.column.header || esf.column.field }}

    \\n
    \\n \\n \\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleHeaderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-header', template: \"
    \\n

    {{ esf.column.header || esf.column.field }}

    \\n
    \\n \\n \\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }]; }, propDecorators: { showPinning: [{\n type: Input\n }], showSelecting: [{\n type: Input\n }], showHiding: [{\n type: Input\n }] } });\n\n/**\n * A component used for presenting Excel style column hiding UI.\n */\nclass IgxExcelStyleHidingComponent {\n constructor(esf) {\n this.esf = esf;\n }\n}\nIgxExcelStyleHidingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleHidingComponent, deps: [{ token: BaseFilteringComponent }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleHidingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleHidingComponent, selector: \"igx-excel-style-hiding\", ngImport: i0, template: \"
    \\n {{ esf.column.hidden ? esf.grid.resourceStrings.igx_grid_excel_show : esf.grid.resourceStrings.igx_grid_excel_hide }}\\n {{ esf.column.hidden ? 'visibility' : 'visibility_off' }}\\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleHidingComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-hiding', template: \"
    \\n {{ esf.column.hidden ? esf.grid.resourceStrings.igx_grid_excel_show : esf.grid.resourceStrings.igx_grid_excel_hide }}\\n {{ esf.column.hidden ? 'visibility' : 'visibility_off' }}\\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }]; } });\n\n/**\n * A component used for presenting Excel style column moving UI.\n */\nclass IgxExcelStyleMovingComponent {\n constructor(esf) {\n this.esf = esf;\n /**\n * @hidden @internal\n */\n this.defaultClass = true;\n }\n get visibleColumns() {\n return this.esf.grid.visibleColumns.filter(col => !col.columnGroup);\n }\n /**\n * @hidden @internal\n */\n get canNotMoveLeft() {\n return this.esf.column.visibleIndex === 0 ||\n (this.esf.grid.unpinnedColumns.indexOf(this.esf.column) === 0 && this.esf.column.disablePinning) ||\n (this.esf.column.level !== 0 && !this.findColumn(0, this.visibleColumns));\n }\n /**\n * @hidden @internal\n */\n get canNotMoveRight() {\n return this.esf.column.visibleIndex === this.visibleColumns.length - 1 ||\n (this.esf.column.level !== 0 && !this.findColumn(1, this.visibleColumns));\n }\n /**\n * @hidden @internal\n */\n onMoveButtonClicked(moveDirection) {\n let targetColumn;\n if (this.esf.column.pinned) {\n if (this.esf.column.isLastPinned && moveDirection === 1 && this.esf.grid.isPinningToStart) {\n targetColumn = this.esf.grid.unpinnedColumns[0];\n moveDirection = 0;\n }\n else if (this.esf.column.isFirstPinned && moveDirection === 0 && !this.esf.grid.isPinningToStart) {\n targetColumn = this.esf.grid.unpinnedColumns[this.esf.grid.unpinnedColumns.length - 1];\n moveDirection = 1;\n }\n else {\n targetColumn = this.findColumn(moveDirection, this.esf.grid.pinnedColumns);\n }\n }\n else if (this.esf.grid.unpinnedColumns.indexOf(this.esf.column) === 0 && moveDirection === 0 &&\n this.esf.grid.isPinningToStart) {\n targetColumn = this.esf.grid.pinnedColumns[this.esf.grid.pinnedColumns.length - 1];\n if (targetColumn.parent) {\n targetColumn = targetColumn.topLevelParent;\n }\n moveDirection = 1;\n }\n else if (this.esf.grid.unpinnedColumns.indexOf(this.esf.column) === this.esf.grid.unpinnedColumns.length - 1 &&\n moveDirection === 1 && !this.esf.grid.isPinningToStart) {\n targetColumn = this.esf.grid.pinnedColumns[0];\n moveDirection = 0;\n }\n else {\n targetColumn = this.findColumn(moveDirection, this.esf.grid.unpinnedColumns);\n }\n this.esf.grid.moveColumn(this.esf.column, targetColumn, moveDirection);\n }\n findColumn(moveDirection, columns) {\n let index = columns.indexOf(this.esf.column);\n if (moveDirection === 0) {\n while (index > 0) {\n index--;\n if (columns[index].level === this.esf.column.level && columns[index].parent === this.esf.column.parent) {\n return columns[index];\n }\n }\n return columns[0];\n }\n else {\n while (index < columns.length - 1) {\n index++;\n if (columns[index].level === this.esf.column.level && columns[index].parent === this.esf.column.parent) {\n return columns[index];\n }\n }\n }\n }\n}\nIgxExcelStyleMovingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleMovingComponent, deps: [{ token: BaseFilteringComponent }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleMovingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleMovingComponent, selector: \"igx-excel-style-moving\", host: { properties: { \"class.igx-excel-filter__move\": \"this.defaultClass\" } }, ngImport: i0, template: \"\\n
    \\n {{ esf.grid.resourceStrings.igx_grid_excel_filter_moving_header }}\\n
    \\n\\n \\n \\n\\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxButtonGroupComponent, selector: \"igx-buttongroup\", inputs: [\"id\", \"itemContentCssClass\", \"multiSelection\", \"values\", \"disabled\", \"alignment\"], outputs: [\"selected\", \"deselected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleMovingComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-moving', template: \"\\n
    \\n {{ esf.grid.resourceStrings.igx_grid_excel_filter_moving_header }}\\n
    \\n\\n \\n \\n\\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }]; }, propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-excel-filter__move']\n }] } });\n\n/**\n * A component used for presenting Excel style column pinning UI.\n */\nclass IgxExcelStylePinningComponent {\n constructor(esf) {\n this.esf = esf;\n }\n}\nIgxExcelStylePinningComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStylePinningComponent, deps: [{ token: BaseFilteringComponent }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStylePinningComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStylePinningComponent, selector: \"igx-excel-style-pinning\", ngImport: i0, template: \"
    \\n {{ esf.column.pinned ? esf.grid.resourceStrings.igx_grid_excel_unpin : esf.grid.resourceStrings.igx_grid_excel_pin }}\\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStylePinningComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-pinning', template: \"
    \\n {{ esf.column.pinned ? esf.grid.resourceStrings.igx_grid_excel_unpin : esf.grid.resourceStrings.igx_grid_excel_pin }}\\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }]; } });\n\n/** @hidden */\nclass IgxListBaseDirective extends DisplayDensityBase {\n constructor(_displayDensityOptions) {\n super(_displayDensityOptions);\n this._displayDensityOptions = _displayDensityOptions;\n }\n}\nIgxListBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListBaseDirective, deps: [{ token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxListBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListBaseDirective, selector: \"[igxListBase]\", usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListBaseDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxListBase]'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; } });\nvar IgxListPanState;\n(function (IgxListPanState) {\n IgxListPanState[IgxListPanState[\"NONE\"] = 0] = \"NONE\";\n IgxListPanState[IgxListPanState[\"LEFT\"] = 1] = \"LEFT\";\n IgxListPanState[IgxListPanState[\"RIGHT\"] = 2] = \"RIGHT\";\n})(IgxListPanState || (IgxListPanState = {}));\nclass IgxEmptyListTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxEmptyListTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxEmptyListTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxEmptyListTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxEmptyListTemplateDirective, selector: \"[igxEmptyList]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxEmptyListTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxEmptyList]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxDataLoadingTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxDataLoadingTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDataLoadingTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxDataLoadingTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDataLoadingTemplateDirective, selector: \"[igxDataLoading]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDataLoadingTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDataLoading]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxListItemLeftPanningTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxListItemLeftPanningTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListItemLeftPanningTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxListItemLeftPanningTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListItemLeftPanningTemplateDirective, selector: \"[igxListItemLeftPanning]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListItemLeftPanningTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxListItemLeftPanning]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxListItemRightPanningTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxListItemRightPanningTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListItemRightPanningTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxListItemRightPanningTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListItemRightPanningTemplateDirective, selector: \"[igxListItemRightPanning]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListItemRightPanningTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxListItemRightPanning]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/**\n * The Ignite UI List Item component is a container intended for row items in the Ignite UI for Angular List component.\n *\n * Example:\n * ```html\n * \n * Contacts\n * \n * {{ contact.name }}\n * {{ contact.phone }}\n * \n * \n * ```\n */\nclass IgxListItemComponent {\n /**\n * Gets the `panState` of a `list item`.\n * ```typescript\n * let itemPanState = this.listItem.panState;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get panState() {\n return this._panState;\n }\n /**\n * Gets the `index` of a `list item`.\n * ```typescript\n * let itemIndex = this.listItem.index;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get index() {\n return this._index !== null ? this._index : this.list.children.toArray().indexOf(this);\n }\n /**\n * Sets the `index` of the `list item`.\n * ```typescript\n * this.listItem.index = index;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n set index(value) {\n this._index = value;\n }\n /**\n * Returns an element reference to the list item.\n * ```typescript\n * let listItemElement = this.listItem.element.\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get element() {\n return this.elementRef.nativeElement;\n }\n /**\n * Returns a reference container which contains the list item's content.\n * ```typescript\n * let listItemContainer = this.listItem.contentElement.\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get contentElement() {\n const candidates = this.element.getElementsByClassName('igx-list__item-content');\n return (candidates && candidates.length > 0) ? candidates[0] : null;\n }\n /**\n * Returns the `context` object which represents the `template context` binding into the `list item container`\n * by providing the `$implicit` declaration which is the `IgxListItemComponent` itself.\n * ```typescript\n * let listItemComponent = this.listItem.context;\n * ```\n */\n get context() {\n return {\n $implicit: this\n };\n }\n /**\n * Gets the width of a `list item`.\n * ```typescript\n * let itemWidth = this.listItem.width;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get width() {\n if (this.element) {\n return this.element.offsetWidth;\n }\n }\n /**\n * Gets the maximum left position of the `list item`.\n * ```typescript\n * let maxLeft = this.listItem.maxLeft;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get maxLeft() {\n return -this.width;\n }\n /**\n * Gets the maximum right position of the `list item`.\n * ```typescript\n * let maxRight = this.listItem.maxRight;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get maxRight() {\n return this.width;\n }\n /** @hidden @internal */\n get offsetWidthInRem() {\n return rem(this.element.offsetWidth);\n }\n /** @hidden @internal */\n get offsetHeightInRem() {\n return rem(this.element.offsetHeight);\n }\n constructor(list, elementRef, _renderer) {\n this.list = list;\n this.elementRef = elementRef;\n this._renderer = _renderer;\n /**\n * Sets/gets whether the `list item` is hidden.\n * By default the `hidden` value is `false`.\n * ```html\n * Hidden Item\n * ```\n * ```typescript\n * let isHidden = this.listItem.hidden;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n this.hidden = false;\n /**\n * Gets the `touch-action` style of the `list item`.\n * ```typescript\n * let touchAction = this.listItem.touchAction;\n * ```\n */\n this.touchAction = 'pan-y';\n /**\n * @hidden\n */\n this._panState = IgxListPanState.NONE;\n /**\n * @hidden\n */\n this.panOffset = 0;\n /**\n * @hidden\n */\n this._index = null;\n /**\n * @hidden\n */\n this.lastPanDir = IgxListPanState.NONE;\n }\n /**\n * Gets the `role` attribute of the `list item`.\n * ```typescript\n * let itemRole = this.listItem.role;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get role() {\n return this.isHeader ? 'separator' : 'listitem';\n }\n /**\n * Indicates whether `list item` should have header style.\n * ```typescript\n * let headerStyle = this.listItem.headerStyle;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get headerStyle() {\n return this.isHeader;\n }\n /**\n * Applies the inner style of the `list item` if the item is not counted as header.\n * ```typescript\n * let innerStyle = this.listItem.innerStyle;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get innerStyle() {\n return !this.isHeader;\n }\n /**\n * Returns string value which describes the display mode of the `list item`.\n * ```typescript\n * let isHidden = this.listItem.display;\n * ```\n *\n * @memberof IgxListItemComponent\n */\n get display() {\n return this.hidden ? 'none' : '';\n }\n /**\n * @hidden\n */\n clicked(evt) {\n this.list.itemClicked.emit({ item: this, event: evt, direction: this.lastPanDir });\n this.lastPanDir = IgxListPanState.NONE;\n }\n /**\n * @hidden\n */\n panStart() {\n if (this.isTrue(this.isHeader)) {\n return;\n }\n if (!this.isTrue(this.list.allowLeftPanning) && !this.isTrue(this.list.allowRightPanning)) {\n return;\n }\n this.list.startPan.emit({ item: this, direction: this.lastPanDir, keepitem: false });\n }\n /**\n * @hidden\n */\n panCancel() {\n this.resetPanPosition();\n this.list.endPan.emit({ item: this, direction: this.lastPanDir, keepItem: false });\n }\n /**\n * @hidden\n */\n panMove(ev) {\n if (this.isTrue(this.isHeader)) {\n return;\n }\n if (!this.isTrue(this.list.allowLeftPanning) && !this.isTrue(this.list.allowRightPanning)) {\n return;\n }\n const isPanningToLeft = ev.deltaX < 0;\n if (isPanningToLeft && this.isTrue(this.list.allowLeftPanning)) {\n this.showLeftPanTemplate();\n this.setContentElementLeft(Math.max(this.maxLeft, ev.deltaX));\n }\n else if (!isPanningToLeft && this.isTrue(this.list.allowRightPanning)) {\n this.showRightPanTemplate();\n this.setContentElementLeft(Math.min(this.maxRight, ev.deltaX));\n }\n }\n /**\n * @hidden\n */\n panEnd() {\n if (this.isTrue(this.isHeader)) {\n return;\n }\n if (!this.isTrue(this.list.allowLeftPanning) && !this.isTrue(this.list.allowRightPanning)) {\n return;\n }\n // the translation offset of the current list item content\n const relativeOffset = this.panOffset;\n const widthTriggeringGrip = this.width * this.list.panEndTriggeringThreshold;\n if (relativeOffset === 0) {\n return; // no panning has occured\n }\n const dir = relativeOffset > 0 ? IgxListPanState.RIGHT : IgxListPanState.LEFT;\n this.lastPanDir = dir;\n const args = { item: this, direction: dir, keepItem: false };\n this.list.endPan.emit(args);\n const oldPanState = this._panState;\n if (Math.abs(relativeOffset) < widthTriggeringGrip) {\n this.resetPanPosition();\n this.list.resetPan.emit(this);\n return;\n }\n if (dir === IgxListPanState.LEFT) {\n this.list.leftPan.emit(args);\n }\n else {\n this.list.rightPan.emit(args);\n }\n if (args.keepItem === true) {\n this.setContentElementLeft(0);\n this._panState = IgxListPanState.NONE;\n }\n else {\n if (dir === IgxListPanState.LEFT) {\n this.setContentElementLeft(this.maxLeft);\n this._panState = IgxListPanState.LEFT;\n }\n else {\n this.setContentElementLeft(this.maxRight);\n this._panState = IgxListPanState.RIGHT;\n }\n }\n if (oldPanState !== this._panState) {\n const args2 = { oldState: oldPanState, newState: this._panState, item: this };\n this.list.panStateChange.emit(args2);\n }\n this.hideLeftAndRightPanTemplates();\n }\n /**\n * @hidden\n */\n showLeftPanTemplate() {\n this.setLeftAndRightTemplatesVisibility('visible', 'hidden');\n }\n /**\n * @hidden\n */\n showRightPanTemplate() {\n this.setLeftAndRightTemplatesVisibility('hidden', 'visible');\n }\n /**\n * @hidden\n */\n hideLeftAndRightPanTemplates() {\n setTimeout(() => {\n this.setLeftAndRightTemplatesVisibility('hidden', 'hidden');\n }, 500);\n }\n /**\n * @hidden\n */\n setLeftAndRightTemplatesVisibility(leftVisibility, rightVisibility) {\n if (this.leftPanningTemplateElement && this.leftPanningTemplateElement.nativeElement) {\n this.leftPanningTemplateElement.nativeElement.style.visibility = leftVisibility;\n }\n if (this.rightPanningTemplateElement && this.rightPanningTemplateElement.nativeElement) {\n this.rightPanningTemplateElement.nativeElement.style.visibility = rightVisibility;\n }\n }\n /**\n * @hidden\n */\n setContentElementLeft(value) {\n this.panOffset = value;\n this.contentElement.style.transform = 'translateX(' + value + 'px)';\n }\n /**\n * @hidden\n */\n isTrue(value) {\n if (typeof (value) === 'boolean') {\n return value;\n }\n else {\n return value === 'true';\n }\n }\n /**\n * @hidden\n */\n resetPanPosition() {\n this.setContentElementLeft(0);\n this._panState = IgxListPanState.NONE;\n this.hideLeftAndRightPanTemplates();\n }\n}\nIgxListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListItemComponent, deps: [{ token: IgxListBaseDirective }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });\nIgxListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListItemComponent, selector: \"igx-list-item\", inputs: { isHeader: \"isHeader\", hidden: \"hidden\", index: \"index\" }, host: { listeners: { \"click\": \"clicked($event)\", \"panstart\": \"panStart()\", \"pancancel\": \"panCancel()\", \"panmove\": \"panMove($event)\", \"panend\": \"panEnd()\" }, properties: { \"attr.aria-label\": \"this.ariaLabel\", \"style.touch-action\": \"this.touchAction\", \"attr.role\": \"this.role\", \"class.igx-list__header\": \"this.headerStyle\", \"class.igx-list__item-base\": \"this.innerStyle\", \"style.display\": \"this.display\" } }, providers: [HammerGesturesManager], viewQueries: [{ propertyName: \"leftPanningTemplateElement\", first: true, predicate: [\"leftPanningTmpl\"], descendants: true }, { propertyName: \"rightPanningTemplateElement\", first: true, predicate: [\"rightPanningTmpl\"], descendants: true }], ngImport: i0, template: \"\\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\\n\\n \\n\\n\\n\\n
    \\n \\n \\n \\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListItemComponent, decorators: [{\n type: Component,\n args: [{ providers: [HammerGesturesManager], selector: 'igx-list-item', changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\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\\n\\n \\n\\n\\n\\n
    \\n \\n \\n \\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxListBaseDirective }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { leftPanningTemplateElement: [{\n type: ViewChild,\n args: ['leftPanningTmpl']\n }], rightPanningTemplateElement: [{\n type: ViewChild,\n args: ['rightPanningTmpl']\n }], isHeader: [{\n type: Input\n }], hidden: [{\n type: Input\n }], ariaLabel: [{\n type: HostBinding,\n args: ['attr.aria-label']\n }], touchAction: [{\n type: HostBinding,\n args: ['style.touch-action']\n }], index: [{\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], headerStyle: [{\n type: HostBinding,\n args: ['class.igx-list__header']\n }], innerStyle: [{\n type: HostBinding,\n args: ['class.igx-list__item-base']\n }], display: [{\n type: HostBinding,\n args: ['style.display']\n }], clicked: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], panStart: [{\n type: HostListener,\n args: ['panstart']\n }], panCancel: [{\n type: HostListener,\n args: ['pancancel']\n }], panMove: [{\n type: HostListener,\n args: ['panmove', ['$event']]\n }], panEnd: [{\n type: HostListener,\n args: ['panend']\n }] } });\n\nlet NEXT_ID$b = 0;\n/**\n * igxListThumbnail is container for the List media\n * Use it to wrap anything you want to be used as a thumbnail.\n */\nclass IgxListThumbnailDirective {\n}\nIgxListThumbnailDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListThumbnailDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxListThumbnailDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListThumbnailDirective, selector: \"[igxListThumbnail]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListThumbnailDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[igxListThumbnail]'\n }]\n }] });\n/**\n * igxListAction is container for the List action\n * Use it to wrap anything you want to be used as a list action: icon, checkbox...\n */\nclass IgxListActionDirective {\n}\nIgxListActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxListActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListActionDirective, selector: \"[igxListAction]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListActionDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[igxListAction]'\n }]\n }] });\n/**\n * igxListLine is container for the List text content\n * Use it to wrap anything you want to be used as a plane text.\n */\nclass IgxListLineDirective {\n}\nIgxListLineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListLineDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxListLineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListLineDirective, selector: \"[igxListLine]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListLineDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[igxListLine]'\n }]\n }] });\n/**\n * igxListLineTitle is a directive that add class to the target element\n * Use it to make anything to look like list Title.\n */\nclass IgxListLineTitleDirective {\n constructor() {\n this.cssClass = 'igx-list__item-line-title';\n }\n}\nIgxListLineTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListLineTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxListLineTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListLineTitleDirective, selector: \"[igxListLineTitle]\", host: { properties: { \"class.igx-list__item-line-title\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListLineTitleDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[igxListLineTitle]'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-list__item-line-title']\n }] } });\n/**\n * igxListLineSubTitle is a directive that add class to the target element\n * Use it to make anything to look like list Subtitle.\n */\nclass IgxListLineSubTitleDirective {\n constructor() {\n this.cssClass = 'igx-list__item-line-subtitle';\n }\n}\nIgxListLineSubTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListLineSubTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxListLineSubTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListLineSubTitleDirective, selector: \"[igxListLineSubTitle]\", host: { properties: { \"class.igx-list__item-line-subtitle\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListLineSubTitleDirective, decorators: [{\n type: Directive,\n args: [{\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[igxListLineSubTitle]'\n }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-list__item-line-subtitle']\n }] } });\n/**\n * Displays a collection of data items in a templatable list format\n *\n * @igxModule IgxListModule\n *\n * @igxTheme igx-list-theme\n *\n * @igxKeywords list, data\n *\n * @igxGroup Grids & Lists\n *\n * @remarks\n * The Ignite UI List displays rows of items and supports one or more header items as well as search and filtering\n * of list items. Each list item is completely templatable and will support any valid HTML or Angular component.\n *\n * @example\n * ```html\n * \n * Contacts\n * \n * {{ contact.name }}\n * {{ contact.phone }}\n * \n * \n * ```\n */\nclass IgxListComponent extends IgxListBaseDirective {\n /**\n * Sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * Returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n constructor(element, _displayDensityOptions) {\n super(_displayDensityOptions);\n this.element = element;\n /**\n * Provides a threshold after which the item's panning will be completed automatically.\n *\n * @remarks\n * By default this property is set to 0.5 which is 50% of the list item's width.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.panEndTriggeringThreshold = 0.5;\n /**\n * Sets/gets the `id` of the list.\n *\n * @remarks\n * If not set, the `id` of the first list component will be `\"igx-list-0\"`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let listId = this.list.id;\n * ```\n */\n this.id = `igx-list-${NEXT_ID$b++}`;\n /**\n * Sets/gets whether the left panning of an item is allowed.\n *\n * @remarks\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isLeftPanningAllowed = this.list.allowLeftPanning;\n * ```\n */\n this.allowLeftPanning = false;\n /**\n * Sets/gets whether the right panning of an item is allowed.\n *\n * @remarks\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isRightPanningAllowed = this.list.allowRightPanning;\n * ```\n */\n this.allowRightPanning = false;\n /**\n * Sets/gets whether the list is currently loading data.\n *\n * @remarks\n * Set it to display the dataLoadingTemplate while data is being retrieved.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isLoading = this.list.isLoading;\n * ```\n */\n this.isLoading = false;\n /**\n * Event emitted when a left pan gesture is executed on a list item.\n *\n * @remarks\n * Provides a reference to an object of type `IListItemPanningEventArgs` as an event argument.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.leftPan = new EventEmitter();\n /**\n * Event emitted when a right pan gesture is executed on a list item.\n *\n * @remarks\n * Provides a reference to an object of type `IListItemPanningEventArgs` as an event argument.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.rightPan = new EventEmitter();\n /**\n * Event emitted when a pan gesture is started.\n *\n * @remarks\n * Provides a reference to an object of type `IListItemPanningEventArgs` as an event argument.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.startPan = new EventEmitter();\n /**\n * Event emitted when a pan gesture is completed or canceled.\n *\n * @remarks\n * Provides a reference to an object of type `IListItemPanningEventArgs` as an event argument.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.endPan = new EventEmitter();\n /**\n * Event emitted when a pan item is returned to its original position.\n *\n * @remarks\n * Provides a reference to an object of type `IgxListComponent` as an event argument.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.resetPan = new EventEmitter();\n /**\n *\n * Event emitted when a pan gesture is executed on a list item.\n *\n * @remarks\n * Provides references to the `IgxListItemComponent` and `IgxListPanState` as event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.panStateChange = new EventEmitter();\n /**\n * Event emitted when a list item is clicked.\n *\n * @remarks\n * Provides references to the `IgxListItemComponent` and `Event` as event arguments.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.itemClicked = new EventEmitter();\n this._resourceStrings = CurrentResourceStrings.ListResStrings;\n }\n /**\n * @hidden\n * @internal\n */\n get sortedChildren() {\n if (this.children !== undefined) {\n return this.children.toArray()\n .sort((a, b) => a.index - b.index);\n }\n return null;\n }\n /**\n * Gets the `role` attribute value.\n *\n * @example\n * ```typescript\n * let listRole = this.list.role;\n * ```\n */\n get role() {\n return 'list';\n }\n /**\n * Gets a boolean indicating if the list is empty.\n *\n * @example\n * ```typescript\n * let isEmpty = this.list.isListEmpty;\n * ```\n */\n get isListEmpty() {\n return !this.children || this.children.length === 0;\n }\n /**\n * @hidden\n * @internal\n */\n get cssClass() {\n return !this.isListEmpty && this.displayDensity === DisplayDensity.comfortable;\n }\n /**\n * @hidden\n * @internal\n */\n get cssClassCompact() {\n return !this.isListEmpty && this.displayDensity === DisplayDensity.compact;\n }\n /**\n * @hidden\n * @internal\n */\n get cssClassCosy() {\n return !this.isListEmpty && this.displayDensity === DisplayDensity.cosy;\n }\n /**\n * Gets the list `items` excluding the header ones.\n *\n * @example\n * ```typescript\n * let listItems: IgxListItemComponent[] = this.list.items;\n * ```\n */\n get items() {\n const items = [];\n if (this.children !== undefined) {\n for (const child of this.sortedChildren) {\n if (!child.isHeader) {\n items.push(child);\n }\n }\n }\n return items;\n }\n /**\n * Gets the header list `items`.\n *\n * @example\n * ```typescript\n * let listHeaders: IgxListItemComponent[] = this.list.headers;\n * ```\n */\n get headers() {\n const headers = [];\n if (this.children !== undefined) {\n for (const child of this.children.toArray()) {\n if (child.isHeader) {\n headers.push(child);\n }\n }\n }\n return headers;\n }\n /**\n * Gets the `context` object of the template binding.\n *\n * @remark\n * Gets the `context` object which represents the `template context` binding into the `list container`\n * by providing the `$implicit` declaration which is the `IgxListComponent` itself.\n *\n * @example\n * ```typescript\n * let listComponent = this.list.context;\n * ```\n */\n get context() {\n return {\n $implicit: this\n };\n }\n /**\n * Gets a `TemplateRef` to the currently used template.\n *\n * @example\n * ```typescript\n * let listTemplate = this.list.template;\n * ```\n */\n get template() {\n if (this.isLoading) {\n return this.dataLoadingTemplate ? this.dataLoadingTemplate.template : this.defaultDataLoadingTemplate;\n }\n else {\n return this.emptyListTemplate ? this.emptyListTemplate.template : this.defaultEmptyListTemplate;\n }\n }\n}\nIgxListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListComponent, deps: [{ token: i0.ElementRef }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxListComponent, selector: \"igx-list\", inputs: { panEndTriggeringThreshold: \"panEndTriggeringThreshold\", id: \"id\", allowLeftPanning: \"allowLeftPanning\", allowRightPanning: \"allowRightPanning\", isLoading: \"isLoading\", resourceStrings: \"resourceStrings\" }, outputs: { leftPan: \"leftPan\", rightPan: \"rightPan\", startPan: \"startPan\", endPan: \"endPan\", resetPan: \"resetPan\", panStateChange: \"panStateChange\", itemClicked: \"itemClicked\" }, host: { properties: { \"attr.id\": \"this.id\", \"attr.role\": \"this.role\", \"class.igx-list--empty\": \"this.isListEmpty\", \"class.igx-list\": \"this.cssClass\", \"class.igx-list--compact\": \"this.cssClassCompact\", \"class.igx-list--cosy\": \"this.cssClassCosy\" } }, providers: [{ provide: IgxListBaseDirective, useExisting: IgxListComponent }], queries: [{ propertyName: \"emptyListTemplate\", first: true, predicate: IgxEmptyListTemplateDirective, descendants: true, read: IgxEmptyListTemplateDirective }, { propertyName: \"dataLoadingTemplate\", first: true, predicate: IgxDataLoadingTemplateDirective, descendants: true, read: IgxDataLoadingTemplateDirective }, { propertyName: \"listItemLeftPanningTemplate\", first: true, predicate: IgxListItemLeftPanningTemplateDirective, descendants: true, read: IgxListItemLeftPanningTemplateDirective }, { propertyName: \"listItemRightPanningTemplate\", first: true, predicate: IgxListItemRightPanningTemplateDirective, descendants: true, read: IgxListItemRightPanningTemplateDirective }, { propertyName: \"children\", predicate: i0.forwardRef(function () { return IgxListItemComponent; }), descendants: true }], viewQueries: [{ propertyName: \"defaultEmptyListTemplate\", first: true, predicate: [\"defaultEmptyList\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultDataLoadingTemplate\", first: true, predicate: [\"defaultDataLoading\"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n\\n
    \\n {{resourceStrings.igx_list_no_items}}\\n
    \\n
    \\n\\n\\n
    \\n {{resourceStrings.igx_list_loading}}\\n
    \\n
    \\n\\n\\n \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-list', providers: [{ provide: IgxListBaseDirective, useExisting: IgxListComponent }], template: \"\\n\\n\\n
    \\n {{resourceStrings.igx_list_no_items}}\\n
    \\n
    \\n\\n\\n
    \\n {{resourceStrings.igx_list_loading}}\\n
    \\n
    \\n\\n\\n \\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { children: [{\n type: ContentChildren,\n args: [forwardRef(() => IgxListItemComponent), { descendants: true }]\n }], emptyListTemplate: [{\n type: ContentChild,\n args: [IgxEmptyListTemplateDirective, { read: IgxEmptyListTemplateDirective }]\n }], dataLoadingTemplate: [{\n type: ContentChild,\n args: [IgxDataLoadingTemplateDirective, { read: IgxDataLoadingTemplateDirective }]\n }], listItemLeftPanningTemplate: [{\n type: ContentChild,\n args: [IgxListItemLeftPanningTemplateDirective, { read: IgxListItemLeftPanningTemplateDirective }]\n }], listItemRightPanningTemplate: [{\n type: ContentChild,\n args: [IgxListItemRightPanningTemplateDirective, { read: IgxListItemRightPanningTemplateDirective }]\n }], panEndTriggeringThreshold: [{\n type: Input\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], allowLeftPanning: [{\n type: Input\n }], allowRightPanning: [{\n type: Input\n }], isLoading: [{\n type: Input\n }], leftPan: [{\n type: Output\n }], rightPan: [{\n type: Output\n }], startPan: [{\n type: Output\n }], endPan: [{\n type: Output\n }], resetPan: [{\n type: Output\n }], panStateChange: [{\n type: Output\n }], itemClicked: [{\n type: Output\n }], defaultEmptyListTemplate: [{\n type: ViewChild,\n args: ['defaultEmptyList', { read: TemplateRef, static: true }]\n }], defaultDataLoadingTemplate: [{\n type: ViewChild,\n args: ['defaultDataLoading', { read: TemplateRef, static: true }]\n }], resourceStrings: [{\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], isListEmpty: [{\n type: HostBinding,\n args: ['class.igx-list--empty']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-list']\n }], cssClassCompact: [{\n type: HostBinding,\n args: ['class.igx-list--compact']\n }], cssClassCosy: [{\n type: HostBinding,\n args: ['class.igx-list--cosy']\n }] } });\n/**\n * @hidden\n */\nclass IgxListModule {\n}\nIgxListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListModule, declarations: [IgxListBaseDirective, IgxListComponent, IgxListItemComponent, IgxListThumbnailDirective, IgxListActionDirective, IgxListLineDirective, IgxListLineTitleDirective, IgxListLineSubTitleDirective, IgxDataLoadingTemplateDirective,\n IgxEmptyListTemplateDirective,\n IgxListItemLeftPanningTemplateDirective,\n IgxListItemRightPanningTemplateDirective], imports: [CommonModule,\n IgxRippleModule], exports: [IgxListComponent, IgxListItemComponent, IgxListThumbnailDirective, IgxListActionDirective, IgxListLineDirective, IgxListLineTitleDirective, IgxListLineSubTitleDirective, IgxDataLoadingTemplateDirective,\n IgxEmptyListTemplateDirective,\n IgxListItemLeftPanningTemplateDirective,\n IgxListItemRightPanningTemplateDirective] });\nIgxListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListModule, imports: [CommonModule,\n IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxListModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxListBaseDirective,\n IgxListComponent,\n IgxListItemComponent,\n IgxListThumbnailDirective,\n IgxListActionDirective,\n IgxListLineDirective,\n IgxListLineTitleDirective,\n IgxListLineSubTitleDirective,\n IgxDataLoadingTemplateDirective,\n IgxEmptyListTemplateDirective,\n IgxListItemLeftPanningTemplateDirective,\n IgxListItemRightPanningTemplateDirective\n ],\n exports: [\n IgxListComponent,\n IgxListItemComponent,\n IgxListThumbnailDirective,\n IgxListActionDirective,\n IgxListLineDirective,\n IgxListLineTitleDirective,\n IgxListLineSubTitleDirective,\n IgxDataLoadingTemplateDirective,\n IgxEmptyListTemplateDirective,\n IgxListItemLeftPanningTemplateDirective,\n IgxListItemRightPanningTemplateDirective\n ],\n imports: [\n CommonModule,\n IgxRippleModule\n ]\n }]\n }] });\n\nclass IgxProcessBarTextTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxProcessBarTextTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProcessBarTextTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxProcessBarTextTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxProcessBarTextTemplateDirective, selector: \"[igxProcessBarText]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProcessBarTextTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxProcessBarText]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxProgressBarGradientDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxProgressBarGradientDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProgressBarGradientDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxProgressBarGradientDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxProgressBarGradientDirective, selector: \"[igxProgressBarGradient]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProgressBarGradientDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxProgressBarGradient]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nconst ONE_PERCENT = 0.01;\nconst MIN_VALUE = 0;\nconst IgxTextAlign = mkenum({\n START: 'start',\n CENTER: 'center',\n END: 'end'\n});\nconst IgxProgressType = mkenum({\n ERROR: 'error',\n INFO: 'info',\n WARNING: 'warning',\n SUCCESS: 'success'\n});\n/**\n * @hidden\n */\nclass BaseProgressDirective {\n constructor() {\n /**\n * An event, which is triggered after a progress is changed.\n * ```typescript\n * public progressChange(event) {\n * alert(\"Progress made!\");\n * }\n * //...\n * ```\n * ```html\n * \n * \n * ```\n */\n this.progressChanged = new EventEmitter();\n /**\n * Sets/Gets progressbar in indeterminate. By default it is set to false.\n * ```html\n * \n * \n * ```\n */\n this.indeterminate = false;\n /**\n * Sets/Gets progressbar animation duration. By default it is 2000ms.\n * ```html\n * \n * ```\n */\n this.animationDuration = 2000;\n this._initValue = 0;\n this._contentInit = false;\n this._max = 100;\n this._value = MIN_VALUE;\n this._newVal = MIN_VALUE;\n this._animate = true;\n this._internalState = {\n oldVal: 0,\n newVal: 0\n };\n }\n /**\n * Returns the value which update the progress indicator of the `progress bar`.\n * ```typescript\n * @ViewChild(\"MyProgressBar\")\n * public progressBar: IgxLinearProgressBarComponent | IgxCircularBarComponent;\n * public stepValue(event) {\n * let step = this.progressBar.step;\n * alert(step);\n * }\n * ```\n */\n get step() {\n if (this._step) {\n return this._step;\n }\n return this._max * ONE_PERCENT;\n }\n /**\n * Sets the value by which progress indicator is updated. By default it is 1.\n * ```html\n * \n * \n * ```\n */\n set step(val) {\n const step = Number(val);\n if (step > this.max) {\n return;\n }\n this._step = step;\n }\n /**\n * Animating the progress. By default it is set to true.\n * ```html\n * \n * \n * ```\n */\n set animate(animate) {\n this._animate = animate;\n if (animate) {\n this.animationDuration = 2000;\n }\n else {\n this.animationDuration = 0;\n }\n }\n /**\n * Returns whether the `progress bar` has animation true/false.\n * ```typescript\n * @ViewChild(\"MyProgressBar\")\n * public progressBar: IgxLinearProgressBarComponent | IgxCircularBarComponent;\n * public animationStatus(event) {\n * let animationStatus = this.progressBar.animate;\n * alert(animationStatus);\n * }\n * ```\n */\n get animate() {\n return this._animate;\n }\n /**\n * Set maximum value that can be passed. By default it is set to 100.\n * ```html\n * \n * \n * ```\n */\n set max(maxNum) {\n if (maxNum < MIN_VALUE || this._max === maxNum ||\n (this._animation && this._animation.playState !== 'finished')) {\n return;\n }\n this._internalState.newVal = Math.round(toValue(toPercent(this.value, maxNum), maxNum));\n this._value = this._internalState.oldVal = Math.round(toValue(this.valueInPercent, maxNum));\n this._max = maxNum;\n this.triggerProgressTransition(this._internalState.oldVal, this._internalState.newVal, true);\n }\n /**\n * Returns the the maximum progress value of the `progress bar`.\n * ```typescript\n * @ViewChild(\"MyProgressBar\")\n * public progressBar: IgxLinearProgressBarComponent | IgxCircularBarComponent;\n * public maxValue(event) {\n * let max = this.progressBar.max;\n * alert(max);\n * }\n * ```\n */\n get max() {\n return this._max;\n }\n /**\n * Returns the `IgxLinearProgressBarComponent`/`IgxCircularProgressBarComponent` value in percentage.\n * ```typescript\n * @ViewChild(\"MyProgressBar\")\n * public progressBar: IgxLinearProgressBarComponent; // IgxCircularProgressBarComponent\n * public valuePercent(event){\n * let percentValue = this.progressBar.valueInPercent;\n * alert(percentValue);\n * }\n * ```\n */\n get valueInPercent() {\n const val = toPercent(this._value, this._max);\n return val;\n }\n /**\n * Returns value that indicates the current `IgxLinearProgressBarComponent` position.\n * ```typescript\n * @ViewChild(\"MyProgressBar\")\n * public progressBar: IgxLinearProgressBarComponent;\n * public getValue(event) {\n * let value = this.progressBar.value;\n * alert(value);\n * }\n * ```\n */\n get value() {\n return this._value;\n }\n /**\n * Set value that indicates the current `IgxLinearProgressBarComponent` position.\n * ```html\n * \n * ```\n */\n set value(val) {\n if (this._animation && this._animation.playState !== 'finished' || val < 0) {\n return;\n }\n const valInRange = valueInRange(val, this.max);\n if (isNaN(valInRange) || this._value === val || this.indeterminate) {\n return;\n }\n if (this._contentInit) {\n this.triggerProgressTransition(this._value, valInRange);\n }\n else {\n this._initValue = valInRange;\n }\n }\n triggerProgressTransition(oldVal, newVal, maxUpdate = false) {\n if (oldVal === newVal) {\n return;\n }\n const changedValues = {\n currentValue: newVal,\n previousValue: oldVal\n };\n const stepDirection = this.directionFlow(oldVal, newVal);\n if (this._animate) {\n const newToPercent = toPercent(newVal, this.max);\n const oldToPercent = toPercent(oldVal, this.max);\n const duration = this.animationDuration / Math.abs(newToPercent - oldToPercent) / (this._step ? this._step : 1);\n this.runAnimation(newVal);\n this._interval = setInterval(() => this.increase(newVal, stepDirection), duration);\n }\n else {\n this.updateProgress(newVal);\n }\n if (maxUpdate) {\n return;\n }\n this.progressChanged.emit(changedValues);\n }\n /**\n * @hidden\n */\n increase(newValue, step) {\n const targetValue = toPercent(newValue, this._max);\n this._value = valueInRange(this._value, this._max) + step;\n if ((step > 0 && this.valueInPercent >= targetValue) || (step < 0 && this.valueInPercent <= targetValue)) {\n if (this._value !== newValue) {\n this._value = newValue;\n }\n return clearInterval(this._interval);\n }\n }\n /**\n * @hidden\n */\n directionFlow(currentValue, prevValue) {\n return currentValue < prevValue ? this.step : -this.step;\n }\n /**\n * @hidden\n * @param step\n */\n updateProgress(val) {\n this._value = valueInRange(val, this._max);\n // this.valueInPercent = toPercent(val, this._max);\n this.runAnimation(val);\n }\n}\nBaseProgressDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseProgressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nBaseProgressDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: BaseProgressDirective, inputs: { indeterminate: \"indeterminate\", animationDuration: \"animationDuration\", step: \"step\", animate: \"animate\", max: \"max\", value: \"value\" }, outputs: { progressChanged: \"progressChanged\" }, host: { properties: { \"attr.aria-valuemax\": \"this.max\", \"attr.aria-valuenow\": \"this.value\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseProgressDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return []; }, propDecorators: { progressChanged: [{\n type: Output\n }], indeterminate: [{\n type: Input\n }], animationDuration: [{\n type: Input\n }], step: [{\n type: Input\n }], animate: [{\n type: Input\n }], max: [{\n type: HostBinding,\n args: ['attr.aria-valuemax']\n }, {\n type: Input\n }], value: [{\n type: HostBinding,\n args: ['attr.aria-valuenow']\n }, {\n type: Input\n }] } });\nlet NEXT_LINEAR_ID = 0;\nlet NEXT_CIRCULAR_ID = 0;\nlet NEXT_GRADIENT_ID = 0;\nclass IgxLinearProgressBarComponent extends BaseProgressDirective {\n constructor() {\n super(...arguments);\n this.valueMin = 0;\n this.cssClass = 'igx-linear-bar';\n /**\n * Set `IgxLinearProgressBarComponent` to have striped style. By default it is set to false.\n * ```html\n * \n * ```\n */\n this.striped = false;\n /**\n * An @Input property that sets the value of the `role` attribute. If not provided it will be automatically set to `progressbar`.\n * ```html\n * \n * ```\n */\n this.role = 'progressbar';\n /**\n * An @Input property that sets the value of `id` attribute. If not provided it will be automatically generated.\n * ```html\n * \n * ```\n */\n this.id = `igx-linear-bar-${NEXT_LINEAR_ID++}`;\n /**\n * Set the position that defines where the text is aligned.\n * Possible options - `IgxTextAlign.START` (default), `IgxTextAlign.CENTER`, `IgxTextAlign.END`.\n * ```typescript\n * public positionCenter: IgxTextAlign;\n * public ngOnInit() {\n * this.positionCenter = IgxTextAlign.CENTER;\n * }\n * //...\n * ```\n * ```html\n * \n * ```\n */\n this.textAlign = IgxTextAlign.START;\n /**\n * Set the text to be visible. By default it is set to true.\n * ```html\n * \n * ```\n */\n this.textVisibility = true;\n /**\n * Set the position that defines if the text should be aligned above the progress line. By default is set to false.\n * ```html\n * \n * ```\n */\n this.textTop = false;\n /**\n * Set type of the `IgxLinearProgressBarComponent`. Possible options - `default`, `success`, `info`, `warning`, and `error`.\n * ```html\n * \n * ```\n */\n this.type = 'default';\n this.animationState = {\n width: '0%'\n };\n }\n /**\n * @hidden\n * ```\n */\n get isIndeterminate() {\n return this.indeterminate;\n }\n /**\n * @hidden\n */\n get error() {\n return this.type === IgxProgressType.ERROR;\n }\n /**\n * @hidden\n */\n get info() {\n return this.type === IgxProgressType.INFO;\n }\n /**\n * @hidden\n */\n get warning() {\n return this.type === IgxProgressType.WARNING;\n }\n /**\n * @hidden\n */\n get success() {\n return this.type === IgxProgressType.SUCCESS;\n }\n ngAfterContentInit() {\n this.triggerProgressTransition(MIN_VALUE, this._initValue);\n this._contentInit = true;\n }\n runAnimation(value) {\n if (this._animation && this._animation.playState !== 'finished') {\n return;\n }\n const valueInPercent = this.max <= 0 ? 0 : toPercent(value, this.max);\n const FRAMES = [];\n FRAMES[0] = {\n ...this.animationState\n };\n this.animationState.width = valueInPercent + '%';\n FRAMES[1] = {\n ...this.animationState\n };\n this._animation = this._progressIndicator.nativeElement.animate(FRAMES, {\n easing: 'ease-out',\n fill: 'forwards',\n duration: this.animationDuration\n });\n }\n}\nIgxLinearProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLinearProgressBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxLinearProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxLinearProgressBarComponent, selector: \"igx-linear-bar\", inputs: { striped: \"striped\", role: \"role\", id: \"id\", textAlign: \"textAlign\", textVisibility: \"textVisibility\", textTop: \"textTop\", text: \"text\", type: \"type\" }, host: { properties: { \"attr.aria-valuemin\": \"this.valueMin\", \"class.igx-linear-bar\": \"this.cssClass\", \"class.igx-linear-bar--striped\": \"this.striped\", \"class.igx-linear-bar--indeterminate\": \"this.isIndeterminate\", \"attr.role\": \"this.role\", \"attr.id\": \"this.id\", \"class.igx-linear-bar--danger\": \"this.error\", \"class.igx-linear-bar--info\": \"this.info\", \"class.igx-linear-bar--warning\": \"this.warning\", \"class.igx-linear-bar--success\": \"this.success\" } }, viewQueries: [{ propertyName: \"_progressIndicator\", first: true, predicate: [\"indicator\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n
    \\n
    \\n
    \\n\\n\\n {{text ? text : valueInPercent + '%'}}\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxLinearProgressBarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-linear-bar', template: \"
    \\n
    \\n
    \\n
    \\n\\n\\n {{text ? text : valueInPercent + '%'}}\\n\\n\" }]\n }], propDecorators: { valueMin: [{\n type: HostBinding,\n args: ['attr.aria-valuemin']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-linear-bar']\n }], striped: [{\n type: HostBinding,\n args: ['class.igx-linear-bar--striped']\n }, {\n type: Input\n }], isIndeterminate: [{\n type: HostBinding,\n args: ['class.igx-linear-bar--indeterminate']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], textAlign: [{\n type: Input\n }], textVisibility: [{\n type: Input\n }], textTop: [{\n type: Input\n }], text: [{\n type: Input\n }], type: [{\n type: Input\n }], _progressIndicator: [{\n type: ViewChild,\n args: ['indicator', { static: true }]\n }], error: [{\n type: HostBinding,\n args: ['class.igx-linear-bar--danger']\n }], info: [{\n type: HostBinding,\n args: ['class.igx-linear-bar--info']\n }], warning: [{\n type: HostBinding,\n args: ['class.igx-linear-bar--warning']\n }], success: [{\n type: HostBinding,\n args: ['class.igx-linear-bar--success']\n }] } });\nclass IgxCircularProgressBarComponent extends BaseProgressDirective {\n /**\n * @hidden\n */\n get isIndeterminate() {\n return this.indeterminate;\n }\n /**\n * @hidden\n */\n get context() {\n return {\n $implicit: { value: this.value, valueInPercent: this.valueInPercent, max: this.max }\n };\n }\n constructor(renderer, _directionality) {\n super();\n this.renderer = renderer;\n this._directionality = _directionality;\n /** @hidden */\n this.cssClass = 'igx-circular-bar';\n /**\n * An @Input property that sets the value of `id` attribute. If not provided it will be automatically generated.\n * ```html\n * \n * ```\n */\n this.id = `igx-circular-bar-${NEXT_CIRCULAR_ID++}`;\n /**\n * Sets the text visibility. By default it is set to true.\n * ```html\n * \n * ```\n */\n this.textVisibility = true;\n /**\n * @hidden\n */\n this.gradientId = `igx-circular-gradient-${NEXT_GRADIENT_ID++}`;\n this._circleRadius = 46;\n this._circumference = 2 * Math.PI * this._circleRadius;\n this.STROKE_OPACITY_DVIDER = 100;\n this.STROKE_OPACITY_ADDITION = .2;\n this.animationState = {\n strokeDashoffset: 289,\n strokeOpacity: 1\n };\n }\n ngAfterContentInit() {\n this.triggerProgressTransition(MIN_VALUE, this._initValue);\n this._contentInit = true;\n }\n ngAfterViewInit() {\n this.renderer.setStyle(this._svgCircle.nativeElement, 'stroke', `url(#${this.gradientId})`);\n }\n /**\n * @hidden\n */\n get textContent() {\n return this.text;\n }\n runAnimation(value) {\n if (this._animation && this._animation.playState !== 'finished') {\n return;\n }\n const valueInPercent = this.max <= 0 ? 0 : toPercent(value, this.max);\n const FRAMES = [];\n FRAMES[0] = { ...this.animationState };\n this.animationState.strokeDashoffset = this.getProgress(valueInPercent);\n this.animationState.strokeOpacity = toPercent(value, this.max) / this.STROKE_OPACITY_DVIDER + this.STROKE_OPACITY_ADDITION;\n FRAMES[1] = {\n ...this.animationState\n };\n this._animation = this._svgCircle.nativeElement.animate(FRAMES, {\n easing: 'ease-out',\n fill: 'forwards',\n duration: this.animationDuration\n });\n }\n getProgress(percentage) {\n return this._directionality.rtl ?\n this._circumference + (percentage * this._circumference / 100) :\n this._circumference - (percentage * this._circumference / 100);\n }\n}\nIgxCircularProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCircularProgressBarComponent, deps: [{ token: i0.Renderer2 }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Component });\nIgxCircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCircularProgressBarComponent, selector: \"igx-circular-bar\", inputs: { id: \"id\", isIndeterminate: \"isIndeterminate\", textVisibility: \"textVisibility\", text: \"text\" }, host: { properties: { \"class.igx-circular-bar\": \"this.cssClass\", \"attr.id\": \"this.id\", \"class.igx-circular-bar--indeterminate\": \"this.isIndeterminate\" } }, queries: [{ propertyName: \"textTemplate\", first: true, predicate: IgxProcessBarTextTemplateDirective, descendants: true, read: IgxProcessBarTextTemplateDirective }, { propertyName: \"gradientTemplate\", first: true, predicate: IgxProgressBarGradientDirective, descendants: true, read: IgxProgressBarGradientDirective }], viewQueries: [{ propertyName: \"_svgCircle\", first: true, predicate: [\"circle\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n\\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n\\n\\n\\n \\n \\n\\n\\n\\n {{textContent ? textContent: valueInPercent + '%'}}\\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCircularProgressBarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-circular-bar', template: \"\\n \\n \\n\\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n\\n\\n\\n \\n \\n\\n\\n\\n {{textContent ? textContent: valueInPercent + '%'}}\\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: IgxDirectionality }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-circular-bar']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], isIndeterminate: [{\n type: HostBinding,\n args: ['class.igx-circular-bar--indeterminate']\n }, {\n type: Input\n }], textVisibility: [{\n type: Input\n }], text: [{\n type: Input\n }], textTemplate: [{\n type: ContentChild,\n args: [IgxProcessBarTextTemplateDirective, { read: IgxProcessBarTextTemplateDirective }]\n }], gradientTemplate: [{\n type: ContentChild,\n args: [IgxProgressBarGradientDirective, { read: IgxProgressBarGradientDirective }]\n }], _svgCircle: [{\n type: ViewChild,\n args: ['circle', { static: true }]\n }] } });\nconst valueInRange = (value, max, min = 0) => Math.max(Math.min(value, max), min);\nconst toPercent = (value, max) => !max ? 0 : Math.floor(100 * value / max);\nconst toValue = (value, max) => max * value / 100;\n/**\n * @hidden\n */\nclass IgxProgressBarModule {\n}\nIgxProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProgressBarModule, declarations: [IgxLinearProgressBarComponent, IgxCircularProgressBarComponent, IgxProcessBarTextTemplateDirective,\n IgxProgressBarGradientDirective], imports: [CommonModule], exports: [IgxLinearProgressBarComponent, IgxCircularProgressBarComponent, IgxProcessBarTextTemplateDirective,\n IgxProgressBarGradientDirective] });\nIgxProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProgressBarModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxProgressBarModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxLinearProgressBarComponent,\n IgxCircularProgressBarComponent,\n IgxProcessBarTextTemplateDirective,\n IgxProgressBarGradientDirective,\n ],\n exports: [\n IgxLinearProgressBarComponent,\n IgxCircularProgressBarComponent,\n IgxProcessBarTextTemplateDirective,\n IgxProgressBarGradientDirective,\n ],\n imports: [CommonModule]\n }]\n }] });\n\n// Enums\nconst IgxTreeSelectionType = mkenum({\n None: 'None',\n BiState: 'BiState',\n Cascading: 'Cascading'\n});\n// Token\nconst IGX_TREE_COMPONENT = new InjectionToken('IgxTreeToken');\nconst IGX_TREE_NODE_COMPONENT = new InjectionToken('IgxTreeNodeToken');\n\n/** @hidden @internal */\nclass IgxTreeService {\n constructor() {\n this.expandedNodes = new Set();\n this.collapsingNodes = new Set();\n this.siblingComparer = (data, node) => node !== data && node.level === data.level;\n }\n /**\n * Adds the node to the `expandedNodes` set and fires the nodes change event\n *\n * @param node target node\n * @param uiTrigger is the event triggered by a ui interraction (so we know if we should animate)\n * @returns void\n */\n expand(node, uiTrigger) {\n this.collapsingNodes.delete(node);\n if (!this.expandedNodes.has(node)) {\n node.expandedChange.emit(true);\n }\n else {\n return;\n }\n this.expandedNodes.add(node);\n if (this.tree.singleBranchExpand) {\n this.tree.findNodes(node, this.siblingComparer)?.forEach(e => {\n if (uiTrigger) {\n e.collapse();\n }\n else {\n e.expanded = false;\n }\n });\n }\n }\n /**\n * Adds a node to the `collapsing` collection\n *\n * @param node target node\n */\n collapsing(node) {\n this.collapsingNodes.add(node);\n }\n /**\n * Removes the node from the 'expandedNodes' set and emits the node's change event\n *\n * @param node target node\n * @returns void\n */\n collapse(node) {\n if (this.expandedNodes.has(node)) {\n node.expandedChange.emit(false);\n }\n this.collapsingNodes.delete(node);\n this.expandedNodes.delete(node);\n }\n isExpanded(node) {\n return this.expandedNodes.has(node);\n }\n register(tree) {\n this.tree = tree;\n }\n}\nIgxTreeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxTreeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeService, decorators: [{\n type: Injectable\n }] });\n\n;\n/** @hidden @internal */\nclass IgxTreeSelectionService {\n constructor() {\n this.nodeSelection = new Set();\n this.indeterminateNodes = new Set();\n }\n register(tree) {\n this.tree = tree;\n }\n /** Select range from last selected node to the current specified node. */\n selectMultipleNodes(node, event) {\n if (!this.nodeSelection.size) {\n this.selectNode(node);\n return;\n }\n const lastSelectedNodeIndex = this.tree.nodes.toArray().indexOf(this.getSelectedNodes()[this.nodeSelection.size - 1]);\n const currentNodeIndex = this.tree.nodes.toArray().indexOf(node);\n const nodes = this.tree.nodes.toArray().slice(Math.min(currentNodeIndex, lastSelectedNodeIndex), Math.max(currentNodeIndex, lastSelectedNodeIndex) + 1);\n const added = nodes.filter(_node => !this.isNodeSelected(_node));\n const newSelection = this.getSelectedNodes().concat(added);\n this.emitNodeSelectionEvent(newSelection, added, [], event);\n }\n /** Select the specified node and emit event. */\n selectNode(node, event) {\n if (this.tree.selection === IgxTreeSelectionType.None) {\n return;\n }\n this.emitNodeSelectionEvent([...this.getSelectedNodes(), node], [node], [], event);\n }\n /** Deselect the specified node and emit event. */\n deselectNode(node, event) {\n const newSelection = this.getSelectedNodes().filter(r => r !== node);\n this.emitNodeSelectionEvent(newSelection, [], [node], event);\n }\n /** Clears node selection */\n clearNodesSelection() {\n this.nodeSelection.clear();\n this.indeterminateNodes.clear();\n }\n isNodeSelected(node) {\n return this.nodeSelection.has(node);\n }\n isNodeIndeterminate(node) {\n return this.indeterminateNodes.has(node);\n }\n /** Select specified nodes. No event is emitted. */\n selectNodesWithNoEvent(nodes, clearPrevSelection = false, shouldEmit = true) {\n if (this.tree && this.tree.selection === IgxTreeSelectionType.Cascading) {\n this.cascadeSelectNodesWithNoEvent(nodes, clearPrevSelection);\n return;\n }\n const oldSelection = this.getSelectedNodes();\n if (clearPrevSelection) {\n this.nodeSelection.clear();\n }\n nodes.forEach(node => this.nodeSelection.add(node));\n if (shouldEmit) {\n this.emitSelectedChangeEvent(oldSelection);\n }\n }\n /** Deselect specified nodes. No event is emitted. */\n deselectNodesWithNoEvent(nodes, shouldEmit = true) {\n const oldSelection = this.getSelectedNodes();\n if (!nodes) {\n this.nodeSelection.clear();\n }\n else if (this.tree && this.tree.selection === IgxTreeSelectionType.Cascading) {\n this.cascadeDeselectNodesWithNoEvent(nodes);\n }\n else {\n nodes.forEach(node => this.nodeSelection.delete(node));\n }\n if (shouldEmit) {\n this.emitSelectedChangeEvent(oldSelection);\n }\n }\n /** Called on `node.ngOnDestroy` to ensure state is correct after node is removed */\n ensureStateOnNodeDelete(node) {\n if (this.tree?.selection !== IgxTreeSelectionType.Cascading) {\n return;\n }\n requestAnimationFrame(() => {\n if (this.isNodeSelected(node)) {\n // node is destroyed, do not emit event\n this.deselectNodesWithNoEvent([node], false);\n }\n else {\n if (!node.parentNode) {\n return;\n }\n const assitantLeafNode = node.parentNode?.allChildren.find(e => !e._children?.length);\n if (!assitantLeafNode) {\n return;\n }\n this.retriggerNodeState(assitantLeafNode);\n }\n });\n }\n /** Retriggers a node's selection state */\n retriggerNodeState(node) {\n if (node.selected) {\n this.nodeSelection.delete(node);\n this.selectNodesWithNoEvent([node], false, false);\n }\n else {\n this.nodeSelection.add(node);\n this.deselectNodesWithNoEvent([node], false);\n }\n }\n /** Returns array of the selected nodes. */\n getSelectedNodes() {\n return this.nodeSelection.size ? Array.from(this.nodeSelection) : [];\n }\n /** Returns array of the nodes in indeterminate state. */\n getIndeterminateNodes() {\n return this.indeterminateNodes.size ? Array.from(this.indeterminateNodes) : [];\n }\n emitNodeSelectionEvent(newSelection, added, removed, event) {\n if (this.tree.selection === IgxTreeSelectionType.Cascading) {\n this.emitCascadeNodeSelectionEvent(newSelection, added, removed, event);\n return;\n }\n const currSelection = this.getSelectedNodes();\n if (this.areEqualCollections(currSelection, newSelection)) {\n return;\n }\n const args = {\n oldSelection: currSelection, newSelection,\n added, removed, event, cancel: false, owner: this.tree\n };\n this.tree.nodeSelection.emit(args);\n if (args.cancel) {\n return;\n }\n this.selectNodesWithNoEvent(args.newSelection, true);\n }\n areEqualCollections(first, second) {\n return first.length === second.length && new Set(first.concat(second)).size === first.length;\n }\n cascadeSelectNodesWithNoEvent(nodes, clearPrevSelection = false) {\n const oldSelection = this.getSelectedNodes();\n if (clearPrevSelection) {\n this.indeterminateNodes.clear();\n this.nodeSelection.clear();\n this.calculateNodesNewSelectionState({ added: nodes, removed: [] });\n }\n else {\n const newSelection = [...oldSelection, ...nodes];\n const args = { oldSelection, newSelection };\n // retrieve only the rows without their parents/children which has to be added to the selection\n this.populateAddRemoveArgs(args);\n this.calculateNodesNewSelectionState(args);\n }\n this.nodeSelection = new Set(this.nodesToBeSelected);\n this.indeterminateNodes = new Set(this.nodesToBeIndeterminate);\n this.emitSelectedChangeEvent(oldSelection);\n }\n cascadeDeselectNodesWithNoEvent(nodes) {\n const args = { added: [], removed: nodes };\n this.calculateNodesNewSelectionState(args);\n this.nodeSelection = new Set(this.nodesToBeSelected);\n this.indeterminateNodes = new Set(this.nodesToBeIndeterminate);\n }\n /**\n * populates the nodesToBeSelected and nodesToBeIndeterminate sets\n * with the nodes which will be eventually in selected/indeterminate state\n */\n calculateNodesNewSelectionState(args) {\n this.nodesToBeSelected = new Set(args.oldSelection ? args.oldSelection : this.getSelectedNodes());\n this.nodesToBeIndeterminate = new Set(this.getIndeterminateNodes());\n this.cascadeSelectionState(args.removed, false);\n this.cascadeSelectionState(args.added, true);\n }\n /** Ensures proper selection state for all predescessors and descendants during a selection event */\n cascadeSelectionState(nodes, selected) {\n if (!nodes || nodes.length === 0) {\n return;\n }\n if (nodes && nodes.length > 0) {\n const nodeCollection = this.getCascadingNodeCollection(nodes);\n nodeCollection.nodes.forEach(node => {\n if (selected) {\n this.nodesToBeSelected.add(node);\n }\n else {\n this.nodesToBeSelected.delete(node);\n }\n this.nodesToBeIndeterminate.delete(node);\n });\n Array.from(nodeCollection.parents).forEach((parent) => {\n this.handleParentSelectionState(parent);\n });\n }\n }\n emitCascadeNodeSelectionEvent(newSelection, added, removed, event) {\n const currSelection = this.getSelectedNodes();\n if (this.areEqualCollections(currSelection, newSelection)) {\n return;\n }\n const args = {\n oldSelection: currSelection, newSelection,\n added, removed, event, cancel: false, owner: this.tree\n };\n this.calculateNodesNewSelectionState(args);\n args.newSelection = Array.from(this.nodesToBeSelected);\n // retrieve nodes/parents/children which has been added/removed from the selection\n this.populateAddRemoveArgs(args);\n this.tree.nodeSelection.emit(args);\n if (args.cancel) {\n return;\n }\n // if args.newSelection hasn't been modified\n if (this.areEqualCollections(Array.from(this.nodesToBeSelected), args.newSelection)) {\n this.nodeSelection = new Set(this.nodesToBeSelected);\n this.indeterminateNodes = new Set(this.nodesToBeIndeterminate);\n this.emitSelectedChangeEvent(currSelection);\n }\n else {\n // select the nodes within the modified args.newSelection with no event\n this.cascadeSelectNodesWithNoEvent(args.newSelection, true);\n }\n }\n /**\n * recursively handle the selection state of the direct and indirect parents\n */\n handleParentSelectionState(node) {\n if (!node) {\n return;\n }\n this.handleNodeSelectionState(node);\n if (node.parentNode) {\n this.handleParentSelectionState(node.parentNode);\n }\n }\n /**\n * Handle the selection state of a given node based the selection states of its direct children\n */\n handleNodeSelectionState(node) {\n const nodesArray = (node && node._children) ? node._children.toArray() : [];\n if (nodesArray.length) {\n if (nodesArray.every(n => this.nodesToBeSelected.has(n))) {\n this.nodesToBeSelected.add(node);\n this.nodesToBeIndeterminate.delete(node);\n }\n else if (nodesArray.some(n => this.nodesToBeSelected.has(n) || this.nodesToBeIndeterminate.has(n))) {\n this.nodesToBeIndeterminate.add(node);\n this.nodesToBeSelected.delete(node);\n }\n else {\n this.nodesToBeIndeterminate.delete(node);\n this.nodesToBeSelected.delete(node);\n }\n }\n else {\n // if the children of the node has been deleted and the node was selected do not change its state\n if (this.isNodeSelected(node)) {\n this.nodesToBeSelected.add(node);\n }\n else {\n this.nodesToBeSelected.delete(node);\n }\n this.nodesToBeIndeterminate.delete(node);\n }\n }\n /**\n * Get a collection of all nodes affected by the change event\n *\n * @param nodesToBeProcessed set of the nodes to be selected/deselected\n * @returns a collection of all affected nodes and all their parents\n */\n getCascadingNodeCollection(nodes) {\n const collection = {\n parents: new Set(),\n nodes: new Set(nodes)\n };\n Array.from(collection.nodes).forEach((node) => {\n const nodeAndAllChildren = node.allChildren?.toArray() || [];\n nodeAndAllChildren.forEach(n => {\n collection.nodes.add(n);\n });\n if (node && node.parentNode) {\n collection.parents.add(node.parentNode);\n }\n });\n return collection;\n }\n /**\n * retrieve the nodes which should be added/removed to/from the old selection\n */\n populateAddRemoveArgs(args) {\n args.removed = args.oldSelection.filter(x => args.newSelection.indexOf(x) < 0);\n args.added = args.newSelection.filter(x => args.oldSelection.indexOf(x) < 0);\n }\n /** Emits the `selectedChange` event for each node affected by the selection */\n emitSelectedChangeEvent(oldSelection) {\n this.getSelectedNodes().forEach(n => {\n if (oldSelection.indexOf(n) < 0) {\n n.selectedChange.emit(true);\n }\n });\n oldSelection.forEach(n => {\n if (!this.nodeSelection.has(n)) {\n n.selectedChange.emit(false);\n }\n });\n }\n}\nIgxTreeSelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxTreeSelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeSelectionService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeSelectionService, decorators: [{\n type: Injectable\n }] });\n\n/** @hidden @internal */\nclass IgxTreeNavigationService {\n constructor(treeService, selectionService) {\n this.treeService = treeService;\n this.selectionService = selectionService;\n this._focusedNode = null;\n this._lastFocusedNode = null;\n this._activeNode = null;\n this._visibleChildren = [];\n this._invisibleChildren = new Set();\n this._disabledChildren = new Set();\n this._cacheChange = new Subject();\n this._cacheChange.subscribe(() => {\n this._visibleChildren =\n this.tree?.nodes ?\n this.tree.nodes.filter(e => !(this._invisibleChildren.has(e) || this._disabledChildren.has(e))) :\n [];\n });\n }\n register(tree) {\n this.tree = tree;\n }\n get focusedNode() {\n return this._focusedNode;\n }\n set focusedNode(value) {\n if (this._focusedNode === value) {\n return;\n }\n this._lastFocusedNode = this._focusedNode;\n if (this._lastFocusedNode) {\n this._lastFocusedNode.tabIndex = -1;\n }\n this._focusedNode = value;\n if (this._focusedNode !== null) {\n this._focusedNode.tabIndex = 0;\n this._focusedNode.header.nativeElement.focus();\n }\n }\n get activeNode() {\n return this._activeNode;\n }\n set activeNode(value) {\n if (this._activeNode === value) {\n return;\n }\n this._activeNode = value;\n this.tree.activeNodeChanged.emit(this._activeNode);\n }\n get visibleChildren() {\n return this._visibleChildren;\n }\n update_disabled_cache(node) {\n if (node.disabled) {\n this._disabledChildren.add(node);\n }\n else {\n this._disabledChildren.delete(node);\n }\n this._cacheChange.next();\n }\n init_invisible_cache() {\n this.tree.nodes.filter(e => e.level === 0).forEach(node => {\n this.update_visible_cache(node, node.expanded, false);\n });\n this._cacheChange.next();\n }\n update_visible_cache(node, expanded, shouldEmit = true) {\n if (expanded) {\n node._children.forEach(child => {\n this._invisibleChildren.delete(child);\n this.update_visible_cache(child, child.expanded, false);\n });\n }\n else {\n node.allChildren.forEach(c => this._invisibleChildren.add(c));\n }\n if (shouldEmit) {\n this._cacheChange.next();\n }\n }\n /**\n * Sets the node as focused (and active)\n *\n * @param node target node\n * @param isActive if true, sets the node as active\n */\n setFocusedAndActiveNode(node, isActive = true) {\n if (isActive) {\n this.activeNode = node;\n }\n this.focusedNode = node;\n }\n /** Handler for keydown events. Used in tree.component.ts */\n handleKeydown(event) {\n const key = event.key.toLowerCase();\n if (!this.focusedNode) {\n return;\n }\n if (!(NAVIGATION_KEYS.has(key) || key === '*')) {\n if (key === 'enter') {\n this.activeNode = this.focusedNode;\n }\n return;\n }\n event.preventDefault();\n if (event.repeat) {\n setTimeout(() => this.handleNavigation(event), 1);\n }\n else {\n this.handleNavigation(event);\n }\n }\n ngOnDestroy() {\n this._cacheChange.next();\n this._cacheChange.complete();\n }\n handleNavigation(event) {\n switch (event.key.toLowerCase()) {\n case 'home':\n this.setFocusedAndActiveNode(this.visibleChildren[0]);\n break;\n case 'end':\n this.setFocusedAndActiveNode(this.visibleChildren[this.visibleChildren.length - 1]);\n break;\n case 'arrowleft':\n case 'left':\n this.handleArrowLeft();\n break;\n case 'arrowright':\n case 'right':\n this.handleArrowRight();\n break;\n case 'arrowup':\n case 'up':\n this.handleUpDownArrow(true, event);\n break;\n case 'arrowdown':\n case 'down':\n this.handleUpDownArrow(false, event);\n break;\n case '*':\n this.handleAsterisk();\n break;\n case ' ':\n case 'spacebar':\n case 'space':\n this.handleSpace(event.shiftKey);\n break;\n default:\n return;\n }\n }\n handleArrowLeft() {\n if (this.focusedNode.expanded && !this.treeService.collapsingNodes.has(this.focusedNode) && this.focusedNode._children?.length) {\n this.activeNode = this.focusedNode;\n this.focusedNode.collapse();\n }\n else {\n const parentNode = this.focusedNode.parentNode;\n if (parentNode && !parentNode.disabled) {\n this.setFocusedAndActiveNode(parentNode);\n }\n }\n }\n handleArrowRight() {\n if (this.focusedNode._children.length > 0) {\n if (!this.focusedNode.expanded) {\n this.activeNode = this.focusedNode;\n this.focusedNode.expand();\n }\n else {\n if (this.treeService.collapsingNodes.has(this.focusedNode)) {\n this.focusedNode.expand();\n return;\n }\n const firstChild = this.focusedNode._children.find(node => !node.disabled);\n if (firstChild) {\n this.setFocusedAndActiveNode(firstChild);\n }\n }\n }\n }\n handleUpDownArrow(isUp, event) {\n const next = this.getVisibleNode(this.focusedNode, isUp ? -1 : 1);\n if (next === this.focusedNode) {\n return;\n }\n if (event.ctrlKey) {\n this.setFocusedAndActiveNode(next, false);\n }\n else {\n this.setFocusedAndActiveNode(next);\n }\n }\n handleAsterisk() {\n const nodes = this.focusedNode.parentNode ? this.focusedNode.parentNode._children : this.tree.rootNodes;\n nodes?.forEach(node => {\n if (!node.disabled && (!node.expanded || this.treeService.collapsingNodes.has(node))) {\n node.expand();\n }\n });\n }\n handleSpace(shiftKey = false) {\n if (this.tree.selection === IgxTreeSelectionType.None) {\n return;\n }\n this.activeNode = this.focusedNode;\n if (shiftKey) {\n this.selectionService.selectMultipleNodes(this.focusedNode);\n return;\n }\n if (this.focusedNode.selected) {\n this.selectionService.deselectNode(this.focusedNode);\n }\n else {\n this.selectionService.selectNode(this.focusedNode);\n }\n }\n /** Gets the next visible node in the given direction - 1 -> next, -1 -> previous */\n getVisibleNode(node, dir = 1) {\n const nodeIndex = this.visibleChildren.indexOf(node);\n return this.visibleChildren[nodeIndex + dir] || node;\n }\n}\nIgxTreeNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNavigationService, deps: [{ token: IgxTreeService }, { token: IgxTreeSelectionService }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxTreeNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNavigationService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNavigationService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: IgxTreeService }, { type: IgxTreeSelectionService }]; } });\n\n// TODO: Implement aria functionality\n/**\n * @hidden @internal\n * Used for links (`a` tags) in the body of an `igx-tree-node`. Handles aria and event dispatch.\n */\nclass IgxTreeNodeLinkDirective {\n /**\n * The node's parent. Should be used only when the link is defined\n * in `` tag outside of its parent, as Angular DI will not properly provide a reference\n *\n * ```html\n * \n * \n * \n * \n * \n * ...\n * \n * \n * {{ data.label }}\n * \n * \n * ```\n */\n set parentNode(val) {\n if (val) {\n this._parentNode = val;\n this._parentNode.addLinkChild(this);\n }\n }\n get parentNode() {\n return this._parentNode;\n }\n /** A pointer to the parent node */\n get target() {\n return this.node || this.parentNode;\n }\n constructor(node, navService, elementRef) {\n this.node = node;\n this.navService = navService;\n this.elementRef = elementRef;\n this.role = 'treeitem';\n this._parentNode = null;\n }\n /** @hidden @internal */\n get tabIndex() {\n return this.navService.focusedNode === this.target ? (this.target?.disabled ? -1 : 0) : -1;\n }\n /**\n * @hidden @internal\n * Clear the node's focused state\n */\n handleBlur() {\n this.target.isFocused = false;\n }\n /**\n * @hidden @internal\n * Set the node as focused\n */\n handleFocus() {\n if (this.target && !this.target.disabled) {\n if (this.navService.focusedNode !== this.target) {\n this.navService.focusedNode = this.target;\n }\n this.target.isFocused = true;\n }\n }\n ngOnDestroy() {\n this.target.removeLinkChild(this);\n }\n}\nIgxTreeNodeLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNodeLinkDirective, deps: [{ token: IGX_TREE_NODE_COMPONENT, optional: true }, { token: IgxTreeNavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTreeNodeLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeNodeLinkDirective, selector: \"[igxTreeNodeLink]\", inputs: { parentNode: [\"igxTreeNodeLink\", \"parentNode\"] }, host: { listeners: { \"blur\": \"handleBlur()\", \"focus\": \"handleFocus()\" }, properties: { \"attr.role\": \"this.role\", \"attr.tabindex\": \"this.tabIndex\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNodeLinkDirective, decorators: [{\n type: Directive,\n args: [{\n selector: `[igxTreeNodeLink]`\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_TREE_NODE_COMPONENT]\n }] }, { type: IgxTreeNavigationService }, { type: i0.ElementRef }]; }, propDecorators: { role: [{\n type: HostBinding,\n args: ['attr.role']\n }], parentNode: [{\n type: Input,\n args: ['igxTreeNodeLink']\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], handleBlur: [{\n type: HostListener,\n args: ['blur']\n }], handleFocus: [{\n type: HostListener,\n args: ['focus']\n }] } });\n/**\n *\n * The tree node component represents a child node of the tree component or another tree node.\n * Usage:\n *\n * ```html\n * \n * ...\n * \n * {{ data.FirstName }} {{ data.LastName }}\n * \n * ...\n * \n * ```\n */\nclass IgxTreeNodeComponent extends ToggleAnimationPlayer {\n // TO DO: return different tab index depending on anchor child\n /** @hidden @internal */\n set tabIndex(val) {\n this._tabIndex = val;\n }\n /** @hidden @internal */\n get tabIndex() {\n if (this.disabled) {\n return -1;\n }\n if (this._tabIndex === null) {\n if (this.navService.focusedNode === null) {\n return this.hasLinkChildren ? -1 : 0;\n }\n return -1;\n }\n return this.hasLinkChildren ? -1 : this._tabIndex;\n }\n /** @hidden @internal */\n get animationSettings() {\n return this.tree.animationSettings;\n }\n /**\n * Gets/Sets the resource strings.\n *\n * @remarks\n * Uses EN resources by default.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n if (!this._resourceStrings) {\n this._resourceStrings = CurrentResourceStrings.TreeResStrings;\n }\n return this._resourceStrings;\n }\n /**\n * Gets/Sets the active state of the node\n *\n * @param value: boolean\n */\n set active(value) {\n if (value) {\n this.navService.activeNode = this;\n this.tree.activeNodeBindingChange.emit(this);\n }\n }\n get active() {\n return this.navService.activeNode === this;\n }\n /** @hidden @internal */\n get focused() {\n return this.isFocused &&\n this.navService.focusedNode === this;\n }\n /**\n * Retrieves the full path to the node incuding itself\n *\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * const path: IgxTreeNode[] = node.path;\n * ```\n */\n get path() {\n return this.parentNode?.path ? [...this.parentNode.path, this] : [this];\n }\n // TODO: bind to disabled state when node is dragged\n /**\n * Gets/Sets the disabled state of the node\n *\n * @param value: boolean\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n if (value !== this._disabled) {\n this._disabled = value;\n this.tree.disabledChange.emit(this);\n }\n }\n /** @hidden @internal */\n get role() {\n return this.hasLinkChildren ? 'none' : 'treeitem';\n }\n ;\n /**\n * Return the child nodes of the node (if any)\n *\n * @remark\n * Returns `null` if node does not have children\n *\n * @example\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * const children: IgxTreeNode[] = node.children;\n * ```\n */\n get children() {\n return this._children?.length ? this._children.toArray() : null;\n }\n get hasLinkChildren() {\n return this.linkChildren?.length > 0 || this.registeredChildren?.length > 0;\n }\n /** @hidden @internal */\n get isCompact() {\n return this.tree?.displayDensity === DisplayDensity.compact;\n }\n /** @hidden @internal */\n get isCosy() {\n return this.tree?.displayDensity === DisplayDensity.cosy;\n }\n constructor(tree, selectionService, treeService, navService, cdr, animationService, element, parentNode) {\n super(animationService);\n this.tree = tree;\n this.selectionService = selectionService;\n this.treeService = treeService;\n this.navService = navService;\n this.cdr = cdr;\n this.element = element;\n this.parentNode = parentNode;\n /**\n * To be used for load-on-demand scenarios in order to specify whether the node is loading data.\n *\n * @remarks\n * Loading nodes do not render children.\n */\n this.loading = false;\n /**\n * Emitted when the node's `selected` property changes.\n *\n * ```html\n * \n * \n * \n * \n * ```\n *\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * node.selectedChange.pipe(takeUntil(this.destroy$)).subscribe((e: boolean) => console.log(\"Node selection changed to \", e))\n * ```\n */\n this.selectedChange = new EventEmitter();\n /**\n * Emitted when the node's `expanded` property changes.\n *\n * ```html\n * \n * \n * \n * \n * ```\n *\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * node.expandedChange.pipe(takeUntil(this.destroy$)).subscribe((e: boolean) => console.log(\"Node expansion state changed to \", e))\n * ```\n */\n this.expandedChange = new EventEmitter();\n /** @hidden @internal */\n this.cssClass = 'igx-tree-node';\n /** @hidden @internal */\n this.registeredChildren = [];\n /** @hidden @internal */\n this._resourceStrings = CurrentResourceStrings.TreeResStrings;\n this._tabIndex = null;\n this._disabled = false;\n }\n /**\n * @hidden @internal\n */\n get showSelectors() {\n return this.tree.selection !== IgxTreeSelectionType.None;\n }\n /**\n * @hidden @internal\n */\n get indeterminate() {\n return this.selectionService.isNodeIndeterminate(this);\n }\n /** The depth of the node, relative to the root\n *\n * ```html\n * \n * ...\n * \n * My level is {{ node.level }}\n * \n * \n * ```\n *\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[12])[0];\n * const level: number = node.level;\n * ```\n */\n get level() {\n return this.parentNode ? this.parentNode.level + 1 : 0;\n }\n /** Get/set whether the node is selected. Supporst two-way binding.\n *\n * ```html\n * \n * ...\n * \n * {{ node.label }}\n * \n * \n * ```\n *\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * const selected = node.selected;\n * node.selected = true;\n * ```\n */\n get selected() {\n return this.selectionService.isNodeSelected(this);\n }\n set selected(val) {\n if (!(this.tree?.nodes && this.tree.nodes.find((e) => e === this)) && val) {\n this.tree.forceSelect.push(this);\n return;\n }\n if (val && !this.selectionService.isNodeSelected(this)) {\n this.selectionService.selectNodesWithNoEvent([this]);\n }\n if (!val && this.selectionService.isNodeSelected(this)) {\n this.selectionService.deselectNodesWithNoEvent([this]);\n }\n }\n /** Get/set whether the node is expanded\n *\n * ```html\n * \n * ...\n * \n * {{ node.label }}\n * \n * \n * ```\n *\n * ```typescript\n * const node: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * const expanded = node.expanded;\n * node.expanded = true;\n * ```\n */\n get expanded() {\n return this.treeService.isExpanded(this);\n }\n set expanded(val) {\n if (val) {\n this.treeService.expand(this, false);\n }\n else {\n this.treeService.collapse(this);\n }\n }\n /** @hidden @internal */\n get expandIndicatorTemplate() {\n return this.tree?.expandIndicator ? this.tree.expandIndicator : this._defaultExpandIndicatorTemplate;\n }\n /**\n * The native DOM element representing the node. Could be null in certain environments.\n *\n * ```typescript\n * // get the nativeElement of the second node\n * const node: IgxTreeNode = this.tree.nodes.first();\n * const nodeElement: HTMLElement = node.nativeElement;\n * ```\n */\n /** @hidden @internal */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /** @hidden @internal */\n ngOnInit() {\n this.openAnimationDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.tree.nodeExpanded.emit({ owner: this.tree, node: this });\n });\n this.closeAnimationDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.tree.nodeCollapsed.emit({ owner: this.tree, node: this });\n this.treeService.collapse(this);\n this.cdr.markForCheck();\n });\n }\n /**\n * @hidden @internal\n * Sets the focus to the node's child, if present\n * Sets the node as the tree service's focusedNode\n * Marks the node as the current active element\n */\n handleFocus() {\n if (this.disabled) {\n return;\n }\n if (this.navService.focusedNode !== this) {\n this.navService.focusedNode = this;\n }\n this.isFocused = true;\n if (this.linkChildren?.length) {\n this.linkChildren.first.nativeElement.focus();\n return;\n }\n if (this.registeredChildren.length) {\n this.registeredChildren[0].elementRef.nativeElement.focus();\n return;\n }\n }\n /**\n * @hidden @internal\n * Clear the node's focused status\n */\n clearFocus() {\n this.isFocused = false;\n }\n /**\n * @hidden @internal\n */\n onSelectorClick(event) {\n // event.stopPropagation();\n event.preventDefault();\n // this.navService.handleFocusedAndActiveNode(this);\n if (event.shiftKey) {\n this.selectionService.selectMultipleNodes(this, event);\n return;\n }\n if (this.selected) {\n this.selectionService.deselectNode(this, event);\n }\n else {\n this.selectionService.selectNode(this, event);\n }\n }\n /**\n * Toggles the node expansion state, triggering animation\n *\n * ```html\n * \n * My Node\n * \n * \n * ```\n *\n * ```typescript\n * const myNode: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * myNode.toggle();\n * ```\n */\n toggle() {\n if (this.expanded) {\n this.collapse();\n }\n else {\n this.expand();\n }\n }\n /** @hidden @internal */\n indicatorClick() {\n this.toggle();\n this.navService.setFocusedAndActiveNode(this);\n }\n /**\n * @hidden @internal\n */\n onPointerDown(event) {\n event.stopPropagation();\n this.navService.setFocusedAndActiveNode(this);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this.selectionService.ensureStateOnNodeDelete(this);\n }\n /**\n * Expands the node, triggering animation\n *\n * ```html\n * \n * My Node\n * \n * \n * ```\n *\n * ```typescript\n * const myNode: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * myNode.expand();\n * ```\n */\n expand() {\n if (this.expanded && !this.treeService.collapsingNodes.has(this)) {\n return;\n }\n const args = {\n owner: this.tree,\n node: this,\n cancel: false\n };\n this.tree.nodeExpanding.emit(args);\n if (!args.cancel) {\n this.treeService.expand(this, true);\n this.cdr.detectChanges();\n this.playOpenAnimation(this.childrenContainer);\n }\n }\n /**\n * Collapses the node, triggering animation\n *\n * ```html\n * \n * My Node\n * \n * \n * ```\n *\n * ```typescript\n * const myNode: IgxTreeNode = this.tree.findNodes(data[0])[0];\n * myNode.collapse();\n * ```\n */\n collapse() {\n if (!this.expanded || this.treeService.collapsingNodes.has(this)) {\n return;\n }\n const args = {\n owner: this.tree,\n node: this,\n cancel: false\n };\n this.tree.nodeCollapsing.emit(args);\n if (!args.cancel) {\n this.treeService.collapsing(this);\n this.playCloseAnimation(this.childrenContainer);\n }\n }\n /** @hidden @internal */\n addLinkChild(link) {\n this._tabIndex = -1;\n this.registeredChildren.push(link);\n }\n ;\n /** @hidden @internal */\n removeLinkChild(link) {\n const index = this.registeredChildren.indexOf(link);\n if (index !== -1) {\n this.registeredChildren.splice(index, 1);\n }\n }\n}\nIgxTreeNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNodeComponent, deps: [{ token: IGX_TREE_COMPONENT }, { token: IgxTreeSelectionService }, { token: IgxTreeService }, { token: IgxTreeNavigationService }, { token: i0.ChangeDetectorRef }, { token: IgxAngularAnimationService }, { token: i0.ElementRef }, { token: IGX_TREE_NODE_COMPONENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeNodeComponent, selector: \"igx-tree-node\", inputs: { data: \"data\", loading: \"loading\", resourceStrings: \"resourceStrings\", active: \"active\", disabled: \"disabled\", selected: \"selected\", expanded: \"expanded\" }, outputs: { selectedChange: \"selectedChange\", expandedChange: \"expandedChange\" }, host: { properties: { \"class.igx-tree-node--disabled\": \"this.disabled\", \"class.igx-tree-node\": \"this.cssClass\", \"attr.role\": \"this.role\" } }, providers: [\n { provide: IGX_TREE_NODE_COMPONENT, useExisting: IgxTreeNodeComponent }\n ], queries: [{ propertyName: \"linkChildren\", predicate: IgxTreeNodeLinkDirective, read: ElementRef }, { propertyName: \"_children\", predicate: IGX_TREE_NODE_COMPONENT, read: IGX_TREE_NODE_COMPONENT }, { propertyName: \"allChildren\", predicate: IGX_TREE_NODE_COMPONENT, descendants: true, read: IGX_TREE_NODE_COMPONENT }], viewQueries: [{ propertyName: \"header\", first: true, predicate: [\"ghostTemplate\"], descendants: true, read: ElementRef }, { propertyName: \"_defaultExpandIndicatorTemplate\", first: true, predicate: [\"defaultIndicator\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"childrenContainer\", first: true, predicate: [\"childrenContainer\"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: \"\\n \\n\\n\\n\\n\\n\\n\\n
    \\n \\n
    \\n\\n\\n\\n \\n {{ expanded ? \\\"keyboard_arrow_down\\\" : \\\"keyboard_arrow_right\\\" }}\\n \\n\\n\\n\\n\\n \\n \\n\\n\\n\\n
    \\n
    \\n \\n
    \\n\\n \\n \\n \\n \\n \\n \\n \\t\\n \\t\\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\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxCircularProgressBarComponent, selector: \"igx-circular-bar\", inputs: [\"id\", \"isIndeterminate\", \"textVisibility\", \"text\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeNodeComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tree-node', providers: [\n { provide: IGX_TREE_NODE_COMPONENT, useExisting: IgxTreeNodeComponent }\n ], template: \"\\n \\n\\n\\n\\n\\n\\n\\n
    \\n \\n
    \\n\\n\\n\\n \\n {{ expanded ? \\\"keyboard_arrow_down\\\" : \\\"keyboard_arrow_right\\\" }}\\n \\n\\n\\n\\n\\n \\n \\n\\n\\n\\n
    \\n
    \\n \\n
    \\n\\n \\n \\n \\n \\n \\n \\n \\t\\n \\t\\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 }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_TREE_COMPONENT]\n }] }, { type: IgxTreeSelectionService }, { type: IgxTreeService }, { type: IgxTreeNavigationService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [IGX_TREE_NODE_COMPONENT]\n }] }]; }, propDecorators: { data: [{\n type: Input\n }], loading: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], active: [{\n type: Input\n }], selectedChange: [{\n type: Output\n }], expandedChange: [{\n type: Output\n }], disabled: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-tree-node--disabled']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-tree-node']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], linkChildren: [{\n type: ContentChildren,\n args: [IgxTreeNodeLinkDirective, { read: ElementRef }]\n }], _children: [{\n type: ContentChildren,\n args: [IGX_TREE_NODE_COMPONENT, { read: IGX_TREE_NODE_COMPONENT }]\n }], allChildren: [{\n type: ContentChildren,\n args: [IGX_TREE_NODE_COMPONENT, { read: IGX_TREE_NODE_COMPONENT, descendants: true }]\n }], header: [{\n type: ViewChild,\n args: ['ghostTemplate', { read: ElementRef }]\n }], _defaultExpandIndicatorTemplate: [{\n type: ViewChild,\n args: ['defaultIndicator', { read: TemplateRef, static: true }]\n }], childrenContainer: [{\n type: ViewChild,\n args: ['childrenContainer', { read: ElementRef }]\n }], selected: [{\n type: Input\n }], expanded: [{\n type: Input\n }] } });\n\n/**\n * @hidden @internal\n * Used for templating the select marker of the tree\n */\nclass IgxTreeSelectMarkerDirective {\n}\nIgxTreeSelectMarkerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeSelectMarkerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxTreeSelectMarkerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeSelectMarkerDirective, selector: \"[igxTreeSelectMarker]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeSelectMarkerDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxTreeSelectMarker]'\n }]\n }] });\n/**\n * @hidden @internal\n * Used for templating the expand indicator of the tree\n */\nclass IgxTreeExpandIndicatorDirective {\n}\nIgxTreeExpandIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeExpandIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxTreeExpandIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeExpandIndicatorDirective, selector: \"[igxTreeExpandIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeExpandIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxTreeExpandIndicator]'\n }]\n }] });\n/**\n * IgxTreeComponent allows a developer to show a set of nodes in a hierarchical fashion.\n *\n * @igxModule IgxTreeModule\n * @igxKeywords tree\n * @igxTheme igx-tree-theme\n * @igxGroup Grids & Lists\n *\n * @remark\n * The Angular Tree Component allows users to represent hierarchical data in a tree-view structure,\n * maintaining parent-child relationships, as well as to define static tree-view structure without a corresponding data model.\n * Its primary purpose is to allow end-users to visualize and navigate within hierarchical data structures.\n * The Ignite UI for Angular Tree Component also provides load on demand capabilities, item activation,\n * bi-state and cascading selection of items through built-in checkboxes, built-in keyboard navigation and more.\n *\n * @example\n * ```html\n * \n * \n * I am a parent node 1\n * \n * I am a child node 1\n * \n * ...\n * \n *\t ...\n * \n * ```\n */\nclass IgxTreeComponent extends DisplayDensityBase {\n /**\n * Gets/Sets tree selection mode\n *\n * @remarks\n * By default the tree selection mode is 'None'\n * @param selectionMode: IgxTreeSelectionType\n */\n get selection() {\n return this._selection;\n }\n set selection(selectionMode) {\n this._selection = selectionMode;\n this.selectionService.clearNodesSelection();\n }\n /**\n * Returns all **root level** nodes\n *\n * ```typescript\n * const tree: IgxTree = this.tree;\n * const rootNodes: IgxTreeNodeComponent[] = tree.rootNodes;\n * ```\n */\n get rootNodes() {\n return this.nodes?.filter(node => node.level === 0);\n }\n constructor(navService, selectionService, treeService, element, _displayDensityOptions) {\n super(_displayDensityOptions);\n this.navService = navService;\n this.selectionService = selectionService;\n this.treeService = treeService;\n this.element = element;\n this._displayDensityOptions = _displayDensityOptions;\n this.cssClass = 'igx-tree';\n /** Get/Set how the tree should handle branch expansion.\n * If set to `true`, only a single branch can be expanded at a time, collapsing all others\n *\n * ```html\n * \n * ...\n * \n * ```\n *\n * ```typescript\n * const tree: IgxTree = this.tree;\n * this.tree.singleBranchExpand = false;\n * ```\n */\n this.singleBranchExpand = false;\n /** Get/Set the animation settings that branches should use when expanding/collpasing.\n *\n * ```html\n * \n * \n * ```\n *\n * ```typescript\n * const animationSettings: ToggleAnimationSettings = {\n * openAnimation: growVerIn,\n * closeAnimation: growVerOut\n * };\n *\n * this.tree.animationSettings = animationSettings;\n * ```\n */\n this.animationSettings = {\n openAnimation: growVerIn,\n closeAnimation: growVerOut\n };\n /** Emitted when the node selection is changed through interaction\n *\n * ```html\n * \n * \n * ```\n *\n *```typescript\n * public handleNodeSelection(event: ITreeNodeSelectionEvent) {\n * const newSelection: IgxTreeNode[] = event.newSelection;\n * const added: IgxTreeNode[] = event.added;\n * console.log(\"New selection will be: \", newSelection);\n * console.log(\"Added nodes: \", event.added);\n * }\n *```\n */\n this.nodeSelection = new EventEmitter();\n /** Emitted when a node is expanding, before it finishes\n *\n * ```html\n * \n * \n * ```\n *\n *```typescript\n * public handleNodeExpanding(event: ITreeNodeTogglingEventArgs) {\n * const expandedNode: IgxTreeNode = event.node;\n * if (expandedNode.disabled) {\n * event.cancel = true;\n * }\n * }\n *```\n */\n this.nodeExpanding = new EventEmitter();\n /** Emitted when a node is expanded, after it finishes\n *\n * ```html\n * \n * \n * ```\n *\n *```typescript\n * public handleNodeExpanded(event: ITreeNodeToggledEventArgs) {\n * const expandedNode: IgxTreeNode = event.node;\n * console.log(\"Node is expanded: \", expandedNode.data);\n * }\n *```\n */\n this.nodeExpanded = new EventEmitter();\n /** Emitted when a node is collapsing, before it finishes\n *\n * ```html\n * \n * \n * ```\n *\n *```typescript\n * public handleNodeCollapsing(event: ITreeNodeTogglingEventArgs) {\n * const collapsedNode: IgxTreeNode = event.node;\n * if (collapsedNode.alwaysOpen) {\n * event.cancel = true;\n * }\n * }\n *```\n */\n this.nodeCollapsing = new EventEmitter();\n /** Emitted when a node is collapsed, after it finishes\n *\n * @example\n * ```html\n * \n * \n * ```\n * ```typescript\n * public handleNodeCollapsed(event: ITreeNodeToggledEventArgs) {\n * const collapsedNode: IgxTreeNode = event.node;\n * console.log(\"Node is collapsed: \", collapsedNode.data);\n * }\n * ```\n */\n this.nodeCollapsed = new EventEmitter();\n /**\n * Emitted when the active node is changed.\n *\n * @example\n * ```\n * \n * ```\n */\n this.activeNodeChanged = new EventEmitter();\n /** @hidden @internal */\n this.disabledChange = new EventEmitter();\n /**\n * Emitted when the active node is set through API\n *\n * @hidden @internal\n */\n this.activeNodeBindingChange = new EventEmitter();\n /** @hidden @internal */\n this.forceSelect = [];\n this._selection = IgxTreeSelectionType.None;\n this.destroy$ = new Subject();\n this.unsubChildren$ = new Subject();\n this._comparer = (data, node) => node.data === data;\n this.selectionService.register(this);\n this.treeService.register(this);\n this.navService.register(this);\n }\n /** @hidden @internal */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /**\n * Expands all of the passed nodes.\n * If no nodes are passed, expands ALL nodes\n *\n * @param nodes nodes to be expanded\n *\n * ```typescript\n * const targetNodes: IgxTreeNode = this.tree.findNodes(true, (_data: any, node: IgxTreeNode) => node.data.expandable);\n * tree.expandAll(nodes);\n * ```\n */\n expandAll(nodes) {\n nodes = nodes || this.nodes.toArray();\n nodes.forEach(e => e.expanded = true);\n }\n /**\n * Collapses all of the passed nodes.\n * If no nodes are passed, collapses ALL nodes\n *\n * @param nodes nodes to be collapsed\n *\n * ```typescript\n * const targetNodes: IgxTreeNode = this.tree.findNodes(true, (_data: any, node: IgxTreeNode) => node.data.collapsible);\n * tree.collapseAll(nodes);\n * ```\n */\n collapseAll(nodes) {\n nodes = nodes || this.nodes.toArray();\n nodes.forEach(e => e.expanded = false);\n }\n /**\n * Deselect all nodes if the nodes collection is empty. Otherwise, deselect the nodes in the nodes collection.\n *\n * @example\n * ```typescript\n * const arr = [\n * this.tree.nodes.toArray()[0],\n * this.tree.nodes.toArray()[1]\n * ];\n * this.tree.deselectAll(arr);\n * ```\n * @param nodes: IgxTreeNodeComponent[]\n */\n deselectAll(nodes) {\n this.selectionService.deselectNodesWithNoEvent(nodes);\n }\n /**\n * Returns all of the nodes that match the passed searchTerm.\n * Accepts a custom comparer function for evaluating the search term against the nodes.\n *\n * @remark\n * Default search compares the passed `searchTerm` against the node's `data` Input.\n * When using `findNodes` w/o a `comparer`, make sure all nodes have `data` passed.\n *\n * @param searchTerm The data of the searched node\n * @param comparer A custom comparer function that evaluates the passed `searchTerm` against all nodes.\n * @returns Array of nodes that match the search. `null` if no nodes are found.\n *\n * ```html\n * \n * \n * {{ node.label }}\n * \n * \n * ```\n *\n * ```typescript\n * public data: DataEntry[] = FETCHED_DATA;\n * ...\n * const matchedNodes: IgxTreeNode[] = this.tree.findNodes(searchTerm: data[5]);\n * ```\n *\n * Using a custom comparer\n * ```typescript\n * public data: DataEntry[] = FETCHED_DATA;\n * ...\n * const comparer: IgxTreeSearchResolver = (data: any, node: IgxTreeNode) {\n * return node.data.index % 2 === 0;\n * }\n * const evenIndexNodes: IgxTreeNode[] = this.tree.findNodes(null, comparer);\n * ```\n */\n findNodes(searchTerm, comparer) {\n const compareFunc = comparer || this._comparer;\n const results = this.nodes.filter(node => compareFunc(searchTerm, node));\n return results?.length === 0 ? null : results;\n }\n /** @hidden @internal */\n handleKeydown(event) {\n this.navService.handleKeydown(event);\n }\n /** @hidden @internal */\n ngOnInit() {\n super.ngOnInit();\n this.disabledChange.pipe(takeUntil(this.destroy$)).subscribe((e) => {\n this.navService.update_disabled_cache(e);\n });\n this.activeNodeBindingChange.pipe(takeUntil(this.destroy$)).subscribe((node) => {\n this.expandToNode(this.navService.activeNode);\n this.scrollNodeIntoView(node?.header?.nativeElement);\n });\n this.densityChanged.pipe(takeUntil(this.destroy$)).subscribe(() => {\n requestAnimationFrame(() => {\n this.scrollNodeIntoView(this.navService.activeNode?.header.nativeElement);\n });\n });\n this.subToCollapsing();\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.nodes.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.subToChanges();\n });\n this.scrollNodeIntoView(this.navService.activeNode?.header?.nativeElement);\n this.subToChanges();\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this.unsubChildren$.next();\n this.unsubChildren$.complete();\n this.destroy$.next();\n this.destroy$.complete();\n }\n expandToNode(node) {\n if (node && node.parentNode) {\n node.path.forEach(n => {\n if (n !== node && !n.expanded) {\n n.expanded = true;\n }\n });\n }\n }\n subToCollapsing() {\n this.nodeCollapsing.pipe(takeUntil(this.destroy$)).subscribe(event => {\n if (event.cancel) {\n return;\n }\n this.navService.update_visible_cache(event.node, false);\n });\n this.nodeExpanding.pipe(takeUntil(this.destroy$)).subscribe(event => {\n if (event.cancel) {\n return;\n }\n this.navService.update_visible_cache(event.node, true);\n });\n }\n subToChanges() {\n this.unsubChildren$.next();\n const toBeSelected = [...this.forceSelect];\n requestAnimationFrame(() => {\n this.selectionService.selectNodesWithNoEvent(toBeSelected);\n });\n this.forceSelect = [];\n this.nodes.forEach(node => {\n node.expandedChange.pipe(takeUntil(this.unsubChildren$)).subscribe(nodeState => {\n this.navService.update_visible_cache(node, nodeState);\n });\n node.closeAnimationDone.pipe(takeUntil(this.unsubChildren$)).subscribe(() => {\n const targetElement = this.navService.focusedNode?.header.nativeElement;\n this.scrollNodeIntoView(targetElement);\n });\n node.openAnimationDone.pipe(takeUntil(this.unsubChildren$)).subscribe(() => {\n const targetElement = this.navService.focusedNode?.header.nativeElement;\n this.scrollNodeIntoView(targetElement);\n });\n });\n this.navService.init_invisible_cache();\n }\n scrollNodeIntoView(el) {\n if (!el) {\n return;\n }\n const nodeRect = el.getBoundingClientRect();\n const treeRect = this.nativeElement.getBoundingClientRect();\n const topOffset = treeRect.top > nodeRect.top ? nodeRect.top - treeRect.top : 0;\n const bottomOffset = treeRect.bottom < nodeRect.bottom ? nodeRect.bottom - treeRect.bottom : 0;\n const shouldScroll = !!topOffset || !!bottomOffset;\n if (shouldScroll && this.nativeElement.scrollHeight > this.nativeElement.clientHeight) {\n // this.nativeElement.scrollTop = nodeRect.y - treeRect.y - nodeRect.height;\n this.nativeElement.scrollTop =\n this.nativeElement.scrollTop + bottomOffset + topOffset + (topOffset ? -1 : +1) * nodeRect.height;\n }\n }\n}\nIgxTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeComponent, deps: [{ token: IgxTreeNavigationService }, { token: IgxTreeSelectionService }, { token: IgxTreeService }, { token: i0.ElementRef }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeComponent, selector: \"igx-tree\", inputs: { selection: \"selection\", singleBranchExpand: \"singleBranchExpand\", animationSettings: \"animationSettings\" }, outputs: { nodeSelection: \"nodeSelection\", nodeExpanding: \"nodeExpanding\", nodeExpanded: \"nodeExpanded\", nodeCollapsing: \"nodeCollapsing\", nodeCollapsed: \"nodeCollapsed\", activeNodeChanged: \"activeNodeChanged\" }, host: { properties: { \"class.igx-tree\": \"this.cssClass\" } }, providers: [\n IgxTreeService,\n IgxTreeSelectionService,\n IgxTreeNavigationService,\n { provide: IGX_TREE_COMPONENT, useExisting: IgxTreeComponent },\n ], queries: [{ propertyName: \"expandIndicator\", first: true, predicate: IgxTreeExpandIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"nodes\", predicate: IgxTreeNodeComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n
    \\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tree', providers: [\n IgxTreeService,\n IgxTreeSelectionService,\n IgxTreeNavigationService,\n { provide: IGX_TREE_COMPONENT, useExisting: IgxTreeComponent },\n ], template: \"
    \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxTreeNavigationService }, { type: IgxTreeSelectionService }, { type: IgxTreeService }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-tree']\n }], selection: [{\n type: Input\n }], singleBranchExpand: [{\n type: Input\n }], animationSettings: [{\n type: Input\n }], nodeSelection: [{\n type: Output\n }], nodeExpanding: [{\n type: Output\n }], nodeExpanded: [{\n type: Output\n }], nodeCollapsing: [{\n type: Output\n }], nodeCollapsed: [{\n type: Output\n }], activeNodeChanged: [{\n type: Output\n }], expandIndicator: [{\n type: ContentChild,\n args: [IgxTreeExpandIndicatorDirective, { read: TemplateRef }]\n }], nodes: [{\n type: ContentChildren,\n args: [IgxTreeNodeComponent, { descendants: true }]\n }] } });\n/**\n * @hidden\n *\n * NgModule defining the components and directives needed for `igx-tree`\n */\nclass IgxTreeModule {\n}\nIgxTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeModule, declarations: [IgxTreeSelectMarkerDirective, IgxTreeExpandIndicatorDirective, IgxTreeNodeLinkDirective, IgxTreeComponent, IgxTreeNodeComponent], imports: [CommonModule,\n FormsModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxCheckboxModule,\n IgxProgressBarModule], exports: [IgxTreeSelectMarkerDirective, IgxTreeExpandIndicatorDirective, IgxTreeNodeLinkDirective, IgxTreeComponent, IgxTreeNodeComponent,\n IgxIconModule,\n IgxInputGroupModule,\n IgxCheckboxModule,\n IgxExpansionPanelModule] });\nIgxTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeModule, imports: [CommonModule,\n FormsModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxCheckboxModule,\n IgxProgressBarModule, IgxIconModule,\n IgxInputGroupModule,\n IgxCheckboxModule,\n IgxExpansionPanelModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxTreeSelectMarkerDirective,\n IgxTreeExpandIndicatorDirective,\n IgxTreeNodeLinkDirective,\n IgxTreeComponent,\n IgxTreeNodeComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxCheckboxModule,\n IgxProgressBarModule\n ],\n exports: [\n IgxTreeSelectMarkerDirective,\n IgxTreeExpandIndicatorDirective,\n IgxTreeNodeLinkDirective,\n IgxTreeComponent,\n IgxTreeNodeComponent,\n IgxIconModule,\n IgxInputGroupModule,\n IgxCheckboxModule,\n IgxExpansionPanelModule\n ]\n }]\n }] });\n\nclass IgxExcelStyleLoadingValuesTemplateDirective {\n static ngTemplateContextGuard(_dir, ctx) {\n return true;\n }\n ;\n constructor(template) {\n this.template = template;\n }\n}\nIgxExcelStyleLoadingValuesTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleLoadingValuesTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxExcelStyleLoadingValuesTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleLoadingValuesTemplateDirective, selector: \"[igxExcelStyleLoading]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleLoadingValuesTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxExcelStyleLoading]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * A component used for presenting Excel style search UI.\n */\nclass IgxExcelStyleSearchComponent {\n /**\n * @hidden @internal\n */\n get selectAllItem() {\n if (!this._selectAllItem) {\n const selectAllItem = {\n isSelected: false,\n isFiltered: false,\n indeterminate: false,\n isSpecial: true,\n isBlanks: false,\n value: this.esf.grid.resourceStrings.igx_grid_excel_select_all,\n label: this.esf.grid.resourceStrings.igx_grid_excel_select_all\n };\n this._selectAllItem = selectAllItem;\n }\n return this._selectAllItem;\n }\n /**\n * @hidden @internal\n */\n get addToCurrentFilterItem() {\n if (!this._addToCurrentFilterItem) {\n const addToCurrentFilterItem = {\n isSelected: false,\n isFiltered: false,\n indeterminate: false,\n isSpecial: true,\n isBlanks: false,\n value: this.esf.grid.resourceStrings.igx_grid_excel_add_to_filter,\n label: this.esf.grid.resourceStrings.igx_grid_excel_add_to_filter\n };\n this._addToCurrentFilterItem = addToCurrentFilterItem;\n }\n return this._addToCurrentFilterItem;\n }\n /**\n * @hidden @internal\n */\n get isLoading() {\n return this._isLoading;\n }\n /**\n * @hidden @internal\n */\n set isLoading(value) {\n this._isLoading = value;\n if (!this.cdr.destroyed) {\n this.cdr.detectChanges();\n }\n }\n /**\n * @hidden @internal\n */\n get valuesLoadingTemplate() {\n if (this.esf.grid?.excelStyleLoadingValuesTemplateDirective) {\n return this.esf.grid.excelStyleLoadingValuesTemplateDirective.template;\n }\n else {\n return this.defaultExcelStyleLoadingValuesTemplate;\n }\n }\n constructor(cdr, esf, platform) {\n this.cdr = cdr;\n this.esf = esf;\n this.platform = platform;\n /**\n * @hidden @internal\n */\n this.defaultClass = true;\n /**\n * @hidden @internal\n */\n this.displayedListData = [];\n this.destroy$ = new Subject();\n /**\n * @hidden @internal\n */\n this.refreshSize = () => {\n if (this.virtDir) {\n this.virtDir.igxForContainerSize = this.containerSize;\n this.virtDir.igxForItemSize = this.itemSize;\n this.virtDir.recalcUpdateSizes();\n this.cdr.detectChanges();\n }\n };\n esf.loadingStart.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.displayedListData = [];\n this.isLoading = true;\n });\n esf.loadingEnd.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.refreshSize();\n this.isLoading = false;\n });\n esf.initialized.pipe(takeUntil(this.destroy$)).subscribe(() => {\n requestAnimationFrame(() => {\n this.refreshSize();\n this.searchInput.nativeElement.focus();\n });\n });\n esf.columnChange.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.virtDir?.resetScrollPosition();\n });\n esf.listDataLoaded.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this._selectAllItem = this.esf.listData[0];\n if (this.isHierarchical() && this.esf.listData[0].isSpecial) {\n this.esf.listData.splice(0, 1);\n }\n if (this.searchValue) {\n this.clearInput();\n }\n else {\n this.filterListData();\n }\n this.cdr.detectChanges();\n requestAnimationFrame(() => {\n this.refreshSize();\n this.searchInput.nativeElement.focus();\n });\n });\n }\n ngAfterViewInit() {\n requestAnimationFrame(this.refreshSize);\n }\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden @internal\n */\n clearInput() {\n this.searchValue = null;\n this.filterListData();\n }\n /**\n * @hidden @internal\n */\n onCheckboxChange(eventArgs) {\n const selectedIndex = this.displayedListData.indexOf(eventArgs.checkbox.value);\n const selectAllBtn = this.displayedListData[0];\n if (selectedIndex === 0) {\n this.displayedListData.forEach(element => {\n if (element === this.addToCurrentFilterItem) {\n return;\n }\n element.isSelected = eventArgs.checked;\n });\n selectAllBtn.indeterminate = false;\n }\n else {\n eventArgs.checkbox.value.isSelected = eventArgs.checked;\n const indexToStartSlicing = this.displayedListData.indexOf(this.addToCurrentFilterItem) > -1 ? 2 : 1;\n const slicedArray = this.displayedListData.slice(indexToStartSlicing, this.displayedListData.length);\n if (!slicedArray.find(el => el.isSelected === false)) {\n selectAllBtn.indeterminate = false;\n selectAllBtn.isSelected = true;\n }\n else if (!slicedArray.find(el => el.isSelected === true)) {\n selectAllBtn.indeterminate = false;\n selectAllBtn.isSelected = false;\n }\n else {\n selectAllBtn.indeterminate = true;\n }\n }\n eventArgs.checkbox.nativeCheckbox.nativeElement.blur();\n }\n /**\n * @hidden @internal\n */\n onSelectAllCheckboxChange(eventArgs) {\n this._selectAllItem.isSelected = eventArgs.checked;\n this._selectAllItem.indeterminate = false;\n const treeNodes = this.tree.nodes;\n treeNodes.forEach(node => node.data.isSelected = eventArgs.checked);\n }\n /**\n * @hidden @internal\n */\n onNodeSelectionChange(eventArgs) {\n eventArgs.added.forEach(node => {\n node.data.isSelected = true;\n });\n eventArgs.removed.forEach(node => {\n node.data.isSelected = false;\n });\n this._hierarchicalSelectedItems = eventArgs.newSelection.map(item => item.data);\n const selectAllBtn = this.selectAllItem;\n if (this._hierarchicalSelectedItems.length === 0) {\n selectAllBtn.indeterminate = false;\n selectAllBtn.isSelected = false;\n }\n else if (this._hierarchicalSelectedItems.length === this.tree.nodes.length) {\n selectAllBtn.indeterminate = false;\n selectAllBtn.isSelected = true;\n }\n else {\n selectAllBtn.indeterminate = true;\n selectAllBtn.isSelected = false;\n }\n }\n /**\n * @hidden @internal\n */\n get itemSize() {\n let itemSize = '40px';\n switch (this.esf.displayDensity) {\n case DisplayDensity.cosy:\n itemSize = '32px';\n break;\n case DisplayDensity.compact:\n itemSize = '24px';\n break;\n default: break;\n }\n return itemSize;\n }\n /**\n * @hidden @internal\n */\n get containerSize() {\n if (this.esf.listData.length) {\n return this.list?.element.nativeElement.offsetHeight;\n }\n // GE Nov 1st, 2021 #10355 Return a numeric value, so the chunk size is calculated properly.\n // If we skip this branch, on applying the filter the _calculateChunkSize() method off the ForOfDirective receives\n // an igxForContainerSize = undefined, thus assigns the chunkSize to the igxForOf.length which leads to performance issues.\n return 0;\n }\n /**\n * @hidden @internal\n */\n get applyButtonDisabled() {\n return (this._selectAllItem && !this._selectAllItem.isSelected && !this._selectAllItem.indeterminate) ||\n (this.displayedListData && this.displayedListData.length === 0);\n }\n /**\n * @hidden @internal\n */\n onInputKeyDown(event) {\n switch (event.key) {\n case this.platform.KEYMAP.ENTER:\n event.preventDefault();\n this.applyFilter();\n return;\n case this.platform.KEYMAP.ESCAPE:\n if (this.searchValue) {\n event.stopPropagation();\n this.clearInput();\n }\n return;\n }\n }\n /**\n * @hidden @internal\n */\n filterListData() {\n if (this.esf.column?.dataType === GridColumnDataType.Number ||\n this.esf.column?.dataType === GridColumnDataType.Currency ||\n this.esf.column?.dataType === GridColumnDataType.Percent) {\n this.rejectNonNumericalEntries();\n }\n if (!this.esf.listData || !this.esf.listData.length) {\n this.displayedListData = [];\n return;\n }\n let selectAllBtn;\n if (this._selectAllItem) {\n selectAllBtn = this._selectAllItem;\n }\n else {\n selectAllBtn = this.esf.listData[0];\n }\n if (!this.searchValue) {\n let anyFiltered = this.esf.listData.some(i => i.isFiltered);\n let anyUnfiltered = this.esf.listData.some(i => !i.isFiltered);\n selectAllBtn.indeterminate = anyFiltered && anyUnfiltered;\n if (this.isHierarchical() && this.tree) {\n this._hierarchicalSelectedItems = this.tree.nodes.map(n => n.data).filter(item => item.isFiltered);\n }\n this.esf.listData.forEach(i => i.isSelected = i.isFiltered);\n if (this.displayedListData !== this.esf.listData) {\n this.displayedListData = this.esf.listData;\n if (this.isHierarchical()) {\n this.cdr.detectChanges();\n this.tree.nodes.forEach(n => {\n const item = n.data;\n n.selected = item.isSelected || item.isFiltered;\n anyFiltered = anyFiltered || n.selected;\n anyUnfiltered = anyUnfiltered || !n.selected;\n });\n selectAllBtn.indeterminate = anyFiltered && anyUnfiltered;\n }\n }\n selectAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all;\n this.cdr.detectChanges();\n return;\n }\n const searchVal = this.searchValue.toLowerCase();\n if (this.isHierarchical()) {\n this._hierarchicalSelectedItems = [];\n this.esf.listData.forEach(i => i.isSelected = false);\n const matchedData = cloneHierarchicalArray(this.esf.listData, 'children');\n this.displayedListData = this.hierarchicalSelectMatches(matchedData, searchVal);\n this.cdr.detectChanges();\n this.tree.nodes.forEach(n => {\n n.selected = true;\n if (n.data.label.toString().toLowerCase().indexOf(searchVal) > -1) {\n this.expandAllParentNodes(n);\n }\n });\n }\n else {\n this.displayedListData = this.esf.listData.filter((it, i) => (i === 0 && it.isSpecial) ||\n (it.label !== null && it.label !== undefined) &&\n !it.isBlanks &&\n it.label.toString().toLowerCase().indexOf(searchVal) > -1);\n this.esf.listData.forEach(i => i.isSelected = false);\n this.displayedListData.forEach(i => i.isSelected = true);\n this.displayedListData.splice(1, 0, this.addToCurrentFilterItem);\n if (this.displayedListData.length === 2) {\n this.displayedListData = [];\n }\n }\n selectAllBtn.indeterminate = false;\n selectAllBtn.isSelected = true;\n selectAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all_search_results;\n this.cdr.detectChanges();\n }\n /**\n * @hidden @internal\n */\n applyFilter() {\n const filterTree = new FilteringExpressionsTree(FilteringLogic.Or, this.esf.column.field);\n let selectedItems = [];\n if (this.isHierarchical()) {\n if (this.addToCurrentFilterCheckbox && this.addToCurrentFilterCheckbox.checked) {\n this.addFilteredToSelectedItems(this.esf.listData);\n }\n selectedItems = this._hierarchicalSelectedItems;\n }\n else {\n const item = this.displayedListData[1];\n const addToCurrentFilterOptionVisible = item === this.addToCurrentFilterItem;\n selectedItems = addToCurrentFilterOptionVisible && item.isSelected ?\n this.esf.listData.slice(1, this.esf.listData.length).filter(el => el.isSelected || el.isFiltered) :\n this.esf.listData.slice(1, this.esf.listData.length).filter(el => el.isSelected);\n }\n let unselectedItem;\n if (this.isHierarchical()) {\n unselectedItem = this.esf.listData.find(el => el.isSelected === false);\n }\n else {\n unselectedItem = this.esf.listData.slice(1, this.esf.listData.length).find(el => el.isSelected === false);\n }\n if (unselectedItem) {\n if (selectedItems.length <= IgxExcelStyleSearchComponent.filterOptimizationThreshold) {\n selectedItems.forEach(element => {\n let condition = null;\n if (element.value !== null && element.value !== undefined) {\n if (this.esf.column.dataType === GridColumnDataType.Boolean) {\n condition = this.createCondition(element.value.toString());\n }\n else {\n const filterCondition = this.esf.column.dataType === GridColumnDataType.Time ? 'at' : 'equals';\n condition = this.createCondition(filterCondition);\n }\n }\n else {\n condition = this.createCondition('empty');\n }\n filterTree.filteringOperands.push({\n condition,\n fieldName: this.esf.column.field,\n ignoreCase: this.esf.column.filteringIgnoreCase,\n searchVal: element.value\n });\n });\n }\n else {\n const blanksItemIndex = selectedItems.findIndex(e => e.value === null || e.value === undefined);\n let blanksItem;\n if (blanksItemIndex >= 0) {\n blanksItem = selectedItems[blanksItemIndex];\n selectedItems.splice(blanksItemIndex, 1);\n }\n filterTree.filteringOperands.push({\n condition: this.createCondition('in'),\n fieldName: this.esf.column.field,\n ignoreCase: this.esf.column.filteringIgnoreCase,\n searchVal: new Set(this.esf.column.dataType === GridColumnDataType.Date ||\n this.esf.column.dataType === GridColumnDataType.DateTime ?\n selectedItems.map(d => d.value.toISOString()) : this.esf.column.dataType === GridColumnDataType.Time ?\n selectedItems.map(e => e.value.toLocaleTimeString()) :\n selectedItems.map(e => e.value))\n });\n if (blanksItem) {\n filterTree.filteringOperands.push({\n condition: this.createCondition('empty'),\n fieldName: this.esf.column.field,\n ignoreCase: this.esf.column.filteringIgnoreCase,\n searchVal: blanksItem.value\n });\n }\n }\n const grid = this.esf.grid;\n const col = this.esf.column;\n grid.filteringService.filterInternal(col.field, filterTree);\n this.esf.expressionsList = new Array();\n grid.filteringService.generateExpressionsList(col.filteringExpressionsTree, grid.filteringLogic, this.esf.expressionsList);\n }\n else {\n this.esf.grid.filteringService.clearFilter(this.esf.column.field);\n }\n this.esf.closeDropdown();\n }\n /**\n * @hidden @internal\n */\n isHierarchical() {\n return this.esf.isHierarchical;\n }\n /**\n * @hidden @internal\n */\n isTreeEmpty() {\n return this.esf.isHierarchical && this.displayedListData.length === 0;\n }\n hierarchicalSelectMatches(data, searchVal) {\n data.forEach(element => {\n element.indeterminate = false;\n element.isSelected = false;\n const node = this.tree.nodes.filter(n => n.data.label === element.label)[0];\n if (node) {\n node.expanded = false;\n }\n if (element.label.toString().toLowerCase().indexOf(searchVal) > -1) {\n element.isSelected = true;\n this.hierarchicalSelectAllChildren(element);\n this._hierarchicalSelectedItems.push(element);\n }\n else if (element.children.length > 0) {\n element.children = this.hierarchicalSelectMatches(element.children, searchVal);\n if (element.children.length > 0) {\n element.isSelected = true;\n if (node) {\n node.expanded = true;\n }\n }\n }\n });\n return data.filter(element => element.isSelected === true);\n }\n hierarchicalSelectAllChildren(element) {\n element.children.forEach(child => {\n child.indeterminate = false;\n child.isSelected = true;\n this._hierarchicalSelectedItems.push(child);\n if (child.children) {\n this.hierarchicalSelectAllChildren(child);\n }\n });\n }\n expandAllParentNodes(node) {\n if (node.parentNode) {\n node.parentNode.expanded = true;\n this.expandAllParentNodes(node.parentNode);\n }\n }\n addFilteredToSelectedItems(records) {\n records.forEach(record => {\n if (record.children) {\n this.addFilteredToSelectedItems(record.children);\n }\n if (record.isFiltered && this._hierarchicalSelectedItems.indexOf(record) < 0) {\n this._hierarchicalSelectedItems.push(record);\n }\n });\n }\n createCondition(conditionName) {\n switch (this.esf.column.dataType) {\n case GridColumnDataType.Boolean:\n return IgxBooleanFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.Number:\n case GridColumnDataType.Currency:\n case GridColumnDataType.Percent:\n return IgxNumberFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.Date:\n return IgxDateFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.Time:\n return IgxTimeFilteringOperand.instance().condition(conditionName);\n case GridColumnDataType.DateTime:\n return IgxDateTimeFilteringOperand.instance().condition(conditionName);\n default:\n return IgxStringFilteringOperand.instance().condition(conditionName);\n }\n }\n /**\n * @hidden @internal\n */\n rejectNonNumericalEntries() {\n const regExp = /[^0-9\\.,eE\\-]/g;\n if (this.searchValue && regExp.test(this.searchValue)) {\n this.searchInput.value = this.searchValue.replace(regExp, '');\n this.searchValue = this.searchInput.value;\n }\n }\n}\nIgxExcelStyleSearchComponent.filterOptimizationThreshold = 2;\nIgxExcelStyleSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleSearchComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: BaseFilteringComponent }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleSearchComponent, selector: \"igx-excel-style-search\", host: { properties: { \"class.igx-excel-filter__menu-main\": \"this.defaultClass\" } }, viewQueries: [{ propertyName: \"searchInput\", first: true, predicate: [\"input\"], descendants: true, read: IgxInputDirective, static: true }, { propertyName: \"list\", first: true, predicate: [\"list\"], descendants: true, read: IgxListComponent }, { propertyName: \"selectAllCheckbox\", first: true, predicate: [\"selectAllCheckbox\"], descendants: true, read: IgxCheckboxComponent }, { propertyName: \"addToCurrentFilterCheckbox\", first: true, predicate: [\"addToCurrentFilterCheckbox\"], descendants: true, read: IgxCheckboxComponent }, { propertyName: \"tree\", first: true, predicate: [\"tree\"], descendants: true, read: IgxTreeComponent }, { propertyName: \"virtDir\", first: true, predicate: IgxForOfDirective, descendants: true, static: true }, { propertyName: \"defaultExcelStyleLoadingValuesTemplate\", first: true, predicate: [\"defaultExcelStyleLoadingValuesTemplate\"], descendants: true, read: TemplateRef }], ngImport: i0, template: \"\\n search\\n \\n \\n clear\\n \\n
    \\n\\n\\n
    \\n \\n \\n {{ item.label }}\\n \\n \\n
    \\n\\n \\n
    \\n \\n \\n
    \\n
    \\n\\n \\n \\n \\n
    \\n\\n
    \\n
    \\n
    \\n \\n {{ selectAllItem.label }}\\n \\n
    \\n
    \\n \\n\\n {{ addToCurrentFilterItem.label }}\\n \\n
    \\n
    \\n\\n \\n \\n
    {{item.label}}
    \\n \\n
    {{childLevel1.label}}
    \\n \\n
    {{childLevel2.label}}
    \\n \\n
    {{childLevel3.label}}
    \\n \\n
    {{childLevel4.label}}
    \\n \\n
    {{childLevel5.label}}
    \\n \\n
    {{childLevel6.label}}
    \\n \\n
    {{childLevel7.label}}
    \\n \\n
    {{childLevel8.label}}
    \\n \\n
    {{childLevel9.label}}
    \\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 {{esf.grid?.resourceStrings.igx_grid_excel_no_matches}}\\n
    \\n
    \\n\\n\\n \\n \\n\\n\\n
    \\n
    \\n \\n {{ esf.grid?.resourceStrings.igx_grid_excel_cancel }}\\n \\n
    \\n
    \\n \\n {{ esf.grid?.resourceStrings.igx_grid_excel_apply }}\\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i5.DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i5.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i5.NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxForOfDirective, selector: \"[igxFor][igxForOf]\", inputs: [\"igxForOf\", \"igxForSizePropName\", \"igxForScrollOrientation\", \"igxForScrollContainer\", \"igxForContainerSize\", \"igxForItemSize\", \"igxForTotalItemCount\", \"igxForTrackBy\"], outputs: [\"chunkLoad\", \"scrollbarVisibilityChanged\", \"contentSizeChange\", \"dataChanged\", \"beforeViewDestroyed\", \"chunkPreload\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxListComponent, selector: \"igx-list\", inputs: [\"panEndTriggeringThreshold\", \"id\", \"allowLeftPanning\", \"allowRightPanning\", \"isLoading\", \"resourceStrings\"], outputs: [\"leftPan\", \"rightPan\", \"startPan\", \"endPan\", \"resetPan\", \"panStateChange\", \"itemClicked\"] }, { kind: \"component\", type: IgxListItemComponent, selector: \"igx-list-item\", inputs: [\"isHeader\", \"hidden\", \"index\"] }, { kind: \"directive\", type: IgxDataLoadingTemplateDirective, selector: \"[igxDataLoading]\" }, { kind: \"directive\", type: IgxEmptyListTemplateDirective, selector: \"[igxEmptyList]\" }, { kind: \"component\", type: IgxCircularProgressBarComponent, selector: \"igx-circular-bar\", inputs: [\"id\", \"isIndeterminate\", \"textVisibility\", \"text\"] }, { kind: \"component\", type: IgxTreeComponent, selector: \"igx-tree\", inputs: [\"selection\", \"singleBranchExpand\", \"animationSettings\"], outputs: [\"nodeSelection\", \"nodeExpanding\", \"nodeExpanded\", \"nodeCollapsing\", \"nodeCollapsed\", \"activeNodeChanged\"] }, { kind: \"component\", type: IgxTreeNodeComponent, selector: \"igx-tree-node\", inputs: [\"data\", \"loading\", \"resourceStrings\", \"active\", \"disabled\", \"selected\", \"expanded\"], outputs: [\"selectedChange\", \"expandedChange\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleSearchComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-search', template: \"\\n search\\n \\n \\n clear\\n \\n\\n\\n\\n
    \\n \\n \\n {{ item.label }}\\n \\n \\n
    \\n\\n \\n
    \\n \\n \\n
    \\n
    \\n\\n \\n \\n \\n
    \\n\\n
    \\n
    \\n
    \\n \\n {{ selectAllItem.label }}\\n \\n
    \\n
    \\n \\n\\n {{ addToCurrentFilterItem.label }}\\n \\n
    \\n
    \\n\\n \\n \\n
    {{item.label}}
    \\n \\n
    {{childLevel1.label}}
    \\n \\n
    {{childLevel2.label}}
    \\n \\n
    {{childLevel3.label}}
    \\n \\n
    {{childLevel4.label}}
    \\n \\n
    {{childLevel5.label}}
    \\n \\n
    {{childLevel6.label}}
    \\n \\n
    {{childLevel7.label}}
    \\n \\n
    {{childLevel8.label}}
    \\n \\n
    {{childLevel9.label}}
    \\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 {{esf.grid?.resourceStrings.igx_grid_excel_no_matches}}\\n
    \\n
    \\n\\n\\n \\n \\n\\n\\n
    \\n
    \\n \\n {{ esf.grid?.resourceStrings.igx_grid_excel_cancel }}\\n \\n
    \\n
    \\n \\n {{ esf.grid?.resourceStrings.igx_grid_excel_apply }}\\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: BaseFilteringComponent }, { type: PlatformUtil }]; }, propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-excel-filter__menu-main']\n }], searchInput: [{\n type: ViewChild,\n args: ['input', { read: IgxInputDirective, static: true }]\n }], list: [{\n type: ViewChild,\n args: ['list', { read: IgxListComponent, static: false }]\n }], selectAllCheckbox: [{\n type: ViewChild,\n args: ['selectAllCheckbox', { read: IgxCheckboxComponent, static: false }]\n }], addToCurrentFilterCheckbox: [{\n type: ViewChild,\n args: ['addToCurrentFilterCheckbox', { read: IgxCheckboxComponent, static: false }]\n }], tree: [{\n type: ViewChild,\n args: ['tree', { read: IgxTreeComponent, static: false }]\n }], virtDir: [{\n type: ViewChild,\n args: [IgxForOfDirective, { static: true }]\n }], defaultExcelStyleLoadingValuesTemplate: [{\n type: ViewChild,\n args: ['defaultExcelStyleLoadingValuesTemplate', { read: TemplateRef }]\n }] } });\n\n/**\n * A component used for presenting Excel style conditional filter UI.\n */\nclass IgxExcelStyleSelectingComponent {\n constructor(esf) {\n this.esf = esf;\n }\n}\nIgxExcelStyleSelectingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleSelectingComponent, deps: [{ token: BaseFilteringComponent }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleSelectingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleSelectingComponent, selector: \"igx-excel-style-selecting\", ngImport: i0, template: \"
    \\n {{esf.grid.resourceStrings.igx_grid_excel_select }}\\n done\\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleSelectingComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-selecting', template: \"
    \\n {{esf.grid.resourceStrings.igx_grid_excel_select }}\\n done\\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }]; } });\n\n/**\n * A component used for presenting Excel style column sorting UI.\n */\nclass IgxExcelStyleSortingComponent {\n constructor(esf, cdr) {\n this.esf = esf;\n this.cdr = cdr;\n /**\n * @hidden @internal\n */\n this.defaultClass = true;\n this.destroy$ = new Subject();\n this.esf.sortingChanged.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.updateSelectedButtons(this.esf.column.field);\n });\n }\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden @internal\n */\n onSortButtonClicked(sortDirection) {\n if (this.sortButtonGroup.selectedIndexes.length === 0) {\n if (this.esf.grid.isColumnGrouped(this.esf.column.field)) {\n this.sortButtonGroup.selectButton(sortDirection - 1);\n }\n else {\n this.esf.grid.clearSort(this.esf.column.field);\n }\n }\n else {\n this.esf.grid.sort({ fieldName: this.esf.column.field, dir: sortDirection, ignoreCase: true });\n }\n }\n updateSelectedButtons(fieldName) {\n const sortIndex = this.esf.grid.sortingExpressions.findIndex(s => s.fieldName === fieldName);\n this.cdr.detectChanges();\n this.sortButtonGroup.buttons.forEach((b, i) => {\n this.sortButtonGroup.deselectButton(i);\n });\n if (sortIndex !== -1) {\n const sortDirection = this.esf.grid.sortingExpressions[sortIndex].dir;\n this.sortButtonGroup.selectButton(sortDirection - 1);\n }\n }\n}\nIgxExcelStyleSortingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleSortingComponent, deps: [{ token: BaseFilteringComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxExcelStyleSortingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleSortingComponent, selector: \"igx-excel-style-sorting\", host: { properties: { \"class.igx-excel-filter__sort\": \"this.defaultClass\" } }, viewQueries: [{ propertyName: \"sortButtonGroup\", first: true, predicate: [\"sortButtonGroup\"], descendants: true, read: IgxButtonGroupComponent }], ngImport: i0, template: \"\\n
    \\n {{ esf.grid.resourceStrings.igx_grid_excel_filter_sorting_header }}\\n
    \\n\\n \\n\\n \\n\\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxButtonGroupComponent, selector: \"igx-buttongroup\", inputs: [\"id\", \"itemContentCssClass\", \"multiSelection\", \"values\", \"disabled\", \"alignment\"], outputs: [\"selected\", \"deselected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleSortingComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-excel-style-sorting', template: \"\\n
    \\n {{ esf.grid.resourceStrings.igx_grid_excel_filter_sorting_header }}\\n
    \\n\\n \\n\\n \\n\\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: BaseFilteringComponent }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-excel-filter__sort']\n }], sortButtonGroup: [{\n type: ViewChild,\n args: ['sortButtonGroup', { read: IgxButtonGroupComponent }]\n }] } });\n\nclass IgxExcelStyleColumnOperationsTemplateDirective {\n}\nIgxExcelStyleColumnOperationsTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleColumnOperationsTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExcelStyleColumnOperationsTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleColumnOperationsTemplateDirective, selector: \"igx-excel-style-column-operations,[igxExcelStyleColumnOperations]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleColumnOperationsTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-excel-style-column-operations,[igxExcelStyleColumnOperations]'\n }]\n }] });\nclass IgxExcelStyleFilterOperationsTemplateDirective {\n}\nIgxExcelStyleFilterOperationsTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleFilterOperationsTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExcelStyleFilterOperationsTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleFilterOperationsTemplateDirective, selector: \"igx-excel-style-filter-operations,[igxExcelStyleFilterOperations]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleFilterOperationsTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-excel-style-filter-operations,[igxExcelStyleFilterOperations]'\n }]\n }] });\n/**\n * A component used for presenting Excel style filtering UI for a specific column.\n * It is used internally in the Grid, but could also be hosted in a container outside of it.\n *\n * Example:\n * ```html\n * \n * \n * ```\n */\nclass IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent {\n /**\n * An @Input property that sets the column.\n */\n set column(value) {\n this._column = value;\n this.listData = new Array();\n this.columnChange.emit(this._column);\n this.subscriptions?.unsubscribe();\n if (this._column) {\n this.grid.filteringService.registerSVGIcons();\n this.init();\n this.sortingChanged.emit();\n this.subscriptions = this.grid.columnPin.subscribe(() => {\n requestAnimationFrame(() => {\n if (!this.cdr.destroyed) {\n this.cdr.detectChanges();\n }\n });\n });\n this.subscriptions.add(this.grid.columnVisibilityChanged.subscribe(() => this.detectChanges()));\n this.subscriptions.add(this.grid.sortingExpressionsChange.subscribe(() => this.sortingChanged.emit()));\n this.subscriptions.add(this.grid.filteringExpressionsTreeChange.subscribe(() => this.init()));\n this.subscriptions.add(this.grid.densityChanged.subscribe(() => this.detectChanges()));\n this.subscriptions.add(this.grid.columnMovingEnd.subscribe(() => this.cdr.markForCheck()));\n }\n }\n /**\n * Returns the current column.\n */\n get column() {\n return this._column;\n }\n /**\n * Gets the minimum height.\n */\n get minHeight() {\n if (this._minHeight || this._minHeight === 0) {\n return this._minHeight;\n }\n if (!this.inline) {\n let minHeight = 645;\n switch (this.displayDensity) {\n case DisplayDensity.cosy:\n minHeight = 465;\n break;\n case DisplayDensity.compact:\n minHeight = 330;\n break;\n default: break;\n }\n return `${minHeight}px`;\n }\n }\n /**\n * Sets the minimum height.\n */\n set minHeight(value) {\n this._minHeight = value;\n }\n /**\n * Gets the maximum height.\n */\n get maxHeight() {\n if (this._maxHeight) {\n return this._maxHeight;\n }\n if (!this.inline) {\n let maxHeight = 775;\n switch (this.displayDensity) {\n case DisplayDensity.cosy:\n maxHeight = 565;\n break;\n case DisplayDensity.compact:\n maxHeight = 405;\n break;\n default: break;\n }\n return `${maxHeight}px`;\n }\n }\n /**\n * Sets the maximum height.\n */\n set maxHeight(value) {\n this._maxHeight = value;\n }\n /**\n * @hidden @internal\n */\n get grid() {\n return this.column?.grid ?? this.gridAPI;\n }\n /**\n * @hidden @internal\n */\n get displayDensity() {\n return this.grid?.displayDensity;\n }\n constructor(cdr, element, platform, gridAPI) {\n super(cdr, element, platform);\n this.gridAPI = gridAPI;\n /**\n * @hidden @internal\n */\n this.defaultClass = true;\n /**\n * @hidden @internal\n */\n this.inline = true;\n /**\n * @hidden @internal\n */\n this.loadingStart = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.loadingEnd = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.initialized = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.sortingChanged = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.columnChange = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.listDataLoaded = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.expressionsList = new Array();\n /**\n * @hidden @internal\n */\n this.listData = new Array();\n /**\n * @hidden @internal\n */\n this.uniqueValues = [];\n /**\n * @hidden @internal\n */\n this.isHierarchical = false;\n this.containsNullOrEmpty = false;\n this.selectAllSelected = true;\n this.selectAllIndeterminate = false;\n this.filterValues = new Set();\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.subscriptions?.unsubscribe();\n delete this.overlayComponentId;\n }\n /**\n * @hidden @internal\n */\n initialize(column, overlayService) {\n this.inline = false;\n this.column = column;\n this.overlayService = overlayService;\n if (this._originalDisplay) {\n this.element.nativeElement.style.display = this._originalDisplay;\n }\n this.initialized.emit();\n this.subscriptions.add(this.grid.columnMoving.subscribe(() => this.closeDropdown()));\n }\n /**\n * @hidden @internal\n */\n onPin() {\n this.closeDropdown();\n this.column.pinned = !this.column.pinned;\n }\n /**\n * @hidden @internal\n */\n onSelect() {\n if (!this.column.selected) {\n this.grid.selectionService.selectColumn(this.column.field, this.grid.columnSelection === GridSelectionMode.single);\n }\n else {\n this.grid.selectionService.deselectColumn(this.column.field);\n }\n this.grid.notifyChanges();\n }\n /**\n * @hidden @internal\n */\n columnSelectable() {\n return this.grid?.columnSelection !== GridSelectionMode.none && this.column?.selectable;\n }\n /**\n * @hidden @internal\n */\n onHideToggle() {\n this.column.toggleVisibility();\n this.closeDropdown();\n }\n /**\n * @hidden @internal\n */\n cancel() {\n if (!this.overlayComponentId) {\n this.init();\n }\n this.closeDropdown();\n }\n /**\n * @hidden @internal\n */\n closeDropdown() {\n if (this.overlayComponentId) {\n this.overlayService.hide(this.overlayComponentId);\n this.overlayComponentId = null;\n }\n }\n /**\n * @hidden @internal\n */\n onKeyDown(eventArgs) {\n if (this.platform.isFilteringKeyCombo(eventArgs)) {\n eventArgs.preventDefault();\n this.closeDropdown();\n }\n eventArgs.stopPropagation();\n }\n /**\n * @hidden @internal\n */\n hide() {\n this._originalDisplay = document.defaultView.getComputedStyle(this.element.nativeElement).display;\n this.element.nativeElement.style.display = 'none';\n }\n /**\n * @hidden @internal\n */\n detectChanges() {\n this.cdr.detectChanges();\n }\n init() {\n this.expressionsList = new Array();\n generateExpressionsList(this.column.filteringExpressionsTree, this.grid.filteringLogic, this.expressionsList);\n this.populateColumnData();\n }\n areExpressionsSelectable() {\n if (this.expressionsList.length === 1 &&\n (this.expressionsList[0].expression.condition.name === 'equals' ||\n this.expressionsList[0].expression.condition.name === 'at' ||\n this.expressionsList[0].expression.condition.name === 'true' ||\n this.expressionsList[0].expression.condition.name === 'false' ||\n this.expressionsList[0].expression.condition.name === 'empty' ||\n this.expressionsList[0].expression.condition.name === 'in')) {\n return true;\n }\n const selectableExpressionsCount = this.expressionsList.filter(exp => (exp.beforeOperator === 1 || exp.afterOperator === 1) &&\n (exp.expression.condition.name === 'equals' ||\n exp.expression.condition.name === 'at' ||\n exp.expression.condition.name === 'true' ||\n exp.expression.condition.name === 'false' ||\n exp.expression.condition.name === 'empty' ||\n exp.expression.condition.name === 'in')).length;\n return selectableExpressionsCount === this.expressionsList.length;\n }\n populateColumnData() {\n this.cdr.detectChanges();\n if (this.grid.uniqueColumnValuesStrategy) {\n this.renderColumnValuesRemotely();\n }\n else {\n this.renderColumnValuesFromData();\n }\n }\n renderColumnValuesRemotely() {\n this.loadingStart.emit();\n const expressionsTree = this.getColumnFilterExpressionsTree();\n const prevColumn = this.column;\n this.grid.uniqueColumnValuesStrategy(this.column, expressionsTree, (values) => {\n if (!this.column || this.column !== prevColumn) {\n return;\n }\n const items = values.map(v => ({\n value: v\n }));\n this.uniqueValues = this.column.sortStrategy.sort(items, 'value', SortingDirection.Asc, this.column.sortingIgnoreCase, (obj, key) => {\n let resolvedValue = obj[key];\n if (this.column.dataType === GridColumnDataType.Time) {\n resolvedValue = new Date().setHours(resolvedValue.getHours(), resolvedValue.getMinutes(), resolvedValue.getSeconds(), resolvedValue.getMilliseconds());\n }\n return resolvedValue;\n });\n this.renderValues();\n this.loadingEnd.emit();\n });\n }\n renderColumnValuesFromData() {\n this.loadingStart.emit();\n const expressionsTree = this.getColumnFilterExpressionsTree();\n const promise = this.grid.filterStrategy.getFilterItems(this.column, expressionsTree);\n promise.then((items) => {\n this.isHierarchical = items.length > 0 && items.some(i => i.children && i.children.length > 0);\n this.uniqueValues = items;\n this.renderValues();\n this.loadingEnd.emit();\n this.sortingChanged.emit();\n });\n }\n renderValues() {\n this.filterValues = this.generateFilterValues(this.column.dataType === GridColumnDataType.Date || this.column.dataType === GridColumnDataType.DateTime);\n this.generateListData();\n }\n generateFilterValues(isDateColumn = false) {\n let filterValues;\n if (isDateColumn) {\n filterValues = new Set(this.expressionsList.reduce((arr, e) => {\n if (e.expression.condition.name === 'in') {\n return [...arr, ...Array.from(e.expression.searchVal.values()).map(v => new Date(v).toISOString())];\n }\n return [...arr, ...[e.expression.searchVal ? e.expression.searchVal.toISOString() : e.expression.searchVal]];\n }, []));\n }\n else if (this.column.dataType === GridColumnDataType.Time) {\n filterValues = new Set(this.expressionsList.reduce((arr, e) => {\n if (e.expression.condition.name === 'in') {\n return [...arr, ...Array.from(e.expression.searchVal.values()).map(v => typeof v === 'string' ? v : new Date(v).toLocaleTimeString())];\n }\n return [...arr, ...[e.expression.searchVal ? e.expression.searchVal.toLocaleTimeString() : e.expression.searchVal]];\n }, []));\n }\n else {\n filterValues = new Set(this.expressionsList.reduce((arr, e) => {\n if (e.expression.condition.name === 'in') {\n return [...arr, ...Array.from(e.expression.searchVal.values())];\n }\n return [...arr, ...[e.expression.searchVal]];\n }, []));\n }\n return filterValues;\n }\n generateListData() {\n this.listData = new Array();\n const shouldUpdateSelection = this.areExpressionsSelectable();\n if (this.column.dataType === GridColumnDataType.Boolean) {\n this.addBooleanItems();\n }\n else {\n this.addItems(shouldUpdateSelection);\n }\n if (!this.isHierarchical && this.containsNullOrEmpty) {\n const blanksItem = this.generateBlanksItem(shouldUpdateSelection);\n this.listData.unshift(blanksItem);\n }\n if (this.listData.length > 0) {\n this.addSelectAllItem();\n }\n if (!this.cdr.destroyed) {\n this.cdr.detectChanges();\n }\n this.listDataLoaded.emit();\n }\n getColumnFilterExpressionsTree() {\n const gridExpressionsTree = this.grid.filteringExpressionsTree;\n const expressionsTree = new FilteringExpressionsTree(gridExpressionsTree.operator, gridExpressionsTree.fieldName);\n for (const operand of gridExpressionsTree.filteringOperands) {\n if (operand instanceof FilteringExpressionsTree) {\n const columnExprTree = operand;\n if (columnExprTree.fieldName === this.column.field) {\n continue;\n }\n }\n expressionsTree.filteringOperands.push(operand);\n }\n return expressionsTree;\n }\n addBooleanItems() {\n this.selectAllSelected = true;\n this.selectAllIndeterminate = false;\n this.uniqueValues.forEach(element => {\n const value = element.value;\n const filterListItem = new FilterListItem();\n if (value !== undefined && value !== null && value !== '') {\n if (this.column.filteringExpressionsTree) {\n if (value === true && this.expressionsList.find(exp => exp.expression.condition.name === 'true')) {\n filterListItem.isSelected = true;\n filterListItem.isFiltered = true;\n this.selectAllIndeterminate = true;\n }\n else if (value === false && this.expressionsList.find(exp => exp.expression.condition.name === 'false')) {\n filterListItem.isSelected = true;\n filterListItem.isFiltered = true;\n this.selectAllIndeterminate = true;\n }\n else {\n filterListItem.isSelected = false;\n filterListItem.isFiltered = false;\n }\n }\n else {\n filterListItem.isSelected = true;\n filterListItem.isFiltered = true;\n }\n filterListItem.value = value;\n filterListItem.label = value ?\n this.grid.resourceStrings.igx_grid_filter_true :\n this.grid.resourceStrings.igx_grid_filter_false;\n filterListItem.indeterminate = false;\n this.listData.push(filterListItem);\n }\n else {\n this.containsNullOrEmpty = true;\n }\n });\n }\n addItems(shouldUpdateSelection) {\n this.selectAllSelected = true;\n this.selectAllIndeterminate = false;\n this.containsNullOrEmpty = false;\n this.listData = this.generateFilterListItems(this.uniqueValues, shouldUpdateSelection);\n this.containsNullOrEmpty = this.uniqueValues.length > this.listData.length;\n }\n generateFilterListItems(values, shouldUpdateSelection, parent) {\n let filterListItems = [];\n values?.forEach(element => {\n const value = element.value;\n const hasValue = value !== undefined && value !== null && value !== '';\n if (hasValue) {\n const filterListItem = new FilterListItem();\n filterListItem.parent = parent;\n filterListItem.value = value;\n filterListItem.label = element.label !== undefined ?\n element.label :\n this.getFilterItemLabel(value);\n filterListItem.indeterminate = false;\n filterListItem.isSelected = true;\n filterListItem.isFiltered = true;\n if (this.column.filteringExpressionsTree) {\n filterListItem.isSelected = false;\n filterListItem.isFiltered = false;\n if (shouldUpdateSelection) {\n const exprValue = this.getExpressionValue(value);\n if (this.filterValues.has(exprValue)) {\n filterListItem.isSelected = true;\n filterListItem.isFiltered = true;\n }\n this.selectAllIndeterminate = true;\n }\n else {\n this.selectAllSelected = false;\n }\n }\n filterListItem.children = this.generateFilterListItems(element.children ?? element.value?.children, shouldUpdateSelection, filterListItem);\n filterListItems.push(filterListItem);\n }\n });\n return filterListItems;\n }\n addSelectAllItem() {\n const selectAll = new FilterListItem();\n selectAll.isSelected = this.selectAllSelected;\n selectAll.value = this.grid.resourceStrings.igx_grid_excel_select_all;\n selectAll.label = this.grid.resourceStrings.igx_grid_excel_select_all;\n selectAll.indeterminate = this.selectAllIndeterminate;\n selectAll.isSpecial = true;\n selectAll.isFiltered = this.selectAllSelected;\n this.listData.unshift(selectAll);\n }\n generateBlanksItem(shouldUpdateSelection) {\n const blanks = new FilterListItem();\n if (this.column.filteringExpressionsTree) {\n if (shouldUpdateSelection) {\n if (this.filterValues.has(null)) {\n blanks.isSelected = true;\n blanks.isFiltered = true;\n }\n else {\n blanks.isSelected = false;\n blanks.isFiltered = false;\n }\n }\n }\n else {\n blanks.isSelected = true;\n blanks.isFiltered = true;\n }\n blanks.value = null;\n blanks.label = this.grid.resourceStrings.igx_grid_excel_blanks;\n blanks.indeterminate = false;\n blanks.isSpecial = true;\n blanks.isBlanks = true;\n return blanks;\n }\n getFilterItemLabel(value, applyFormatter = true, data) {\n if (this.column.formatter) {\n if (applyFormatter) {\n return this.column.formatter(value, data);\n }\n return value;\n }\n const { display, format, digitsInfo, currencyCode, timezone } = this.column.pipeArgs;\n const locale = this.grid.locale;\n switch (this.column.dataType) {\n case GridColumnDataType.Date:\n case GridColumnDataType.DateTime:\n case GridColumnDataType.Time:\n return formatDate(value, format, locale, timezone);\n case GridColumnDataType.Currency:\n return formatCurrency(value, currencyCode || getLocaleCurrencyCode(locale), display, digitsInfo, locale);\n case GridColumnDataType.Number:\n return formatNumber(value, locale, digitsInfo);\n case GridColumnDataType.Percent:\n return formatPercent(value, locale, digitsInfo);\n default:\n return value;\n }\n }\n getExpressionValue(value) {\n if (this.column.dataType === GridColumnDataType.Date) {\n value = value ? new Date(value).toISOString() : value;\n }\n else if (this.column.dataType === GridColumnDataType.DateTime) {\n value = value ? new Date(value).toISOString() : value;\n }\n else if (this.column.dataType === GridColumnDataType.Time) {\n value = value ? new Date(value).toLocaleTimeString() : value;\n }\n return value;\n }\n}\nIgxGridExcelStyleFilteringComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridExcelStyleFilteringComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: PlatformUtil }, { token: IGX_GRID_BASE, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxGridExcelStyleFilteringComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridExcelStyleFilteringComponent, selector: \"igx-grid-excel-style-filtering\", inputs: { column: \"column\", minHeight: \"minHeight\", maxHeight: \"maxHeight\" }, outputs: { loadingStart: \"loadingStart\", loadingEnd: \"loadingEnd\", initialized: \"initialized\", sortingChanged: \"sortingChanged\", columnChange: \"columnChange\", listDataLoaded: \"listDataLoaded\" }, host: { properties: { \"class.igx-excel-filter\": \"this.defaultClass\", \"class.igx-excel-filter--inline\": \"this.inline\", \"style.max-height\": \"this.maxHeight\" } }, providers: [{ provide: BaseFilteringComponent, useExisting: forwardRef(() => IgxGridExcelStyleFilteringComponent) }], queries: [{ propertyName: \"excelColumnOperationsDirective\", first: true, predicate: IgxExcelStyleColumnOperationsTemplateDirective, descendants: true, read: IgxExcelStyleColumnOperationsTemplateDirective }, { propertyName: \"excelFilterOperationsDirective\", first: true, predicate: IgxExcelStyleFilterOperationsTemplateDirective, descendants: true, read: IgxExcelStyleFilterOperationsTemplateDirective }], viewQueries: [{ propertyName: \"mainDropdown\", first: true, predicate: [\"mainDropdown\"], descendants: true, read: ElementRef }, { propertyName: \"defaultExcelColumnOperations\", first: true, predicate: [\"defaultExcelColumnOperations\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultExcelFilterOperations\", first: true, predicate: [\"defaultExcelFilterOperations\"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: \"\\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\\n \\n \\n \\n \\n\\n \\n \\n \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxExcelStyleHeaderComponent, selector: \"igx-excel-style-header\", inputs: [\"showPinning\", \"showSelecting\", \"showHiding\"] }, { kind: \"component\", type: IgxExcelStyleSortingComponent, selector: \"igx-excel-style-sorting\" }, { kind: \"component\", type: IgxExcelStylePinningComponent, selector: \"igx-excel-style-pinning\" }, { kind: \"component\", type: IgxExcelStyleHidingComponent, selector: \"igx-excel-style-hiding\" }, { kind: \"component\", type: IgxExcelStyleSelectingComponent, selector: \"igx-excel-style-selecting\" }, { kind: \"component\", type: IgxExcelStyleClearFiltersComponent, selector: \"igx-excel-style-clear-filters\" }, { kind: \"component\", type: IgxExcelStyleConditionalFilterComponent, selector: \"igx-excel-style-conditional-filter\" }, { kind: \"component\", type: IgxExcelStyleMovingComponent, selector: \"igx-excel-style-moving\" }, { kind: \"component\", type: IgxExcelStyleSearchComponent, selector: \"igx-excel-style-search\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridExcelStyleFilteringComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: BaseFilteringComponent, useExisting: forwardRef(() => IgxGridExcelStyleFilteringComponent) }], selector: 'igx-grid-excel-style-filtering', template: \"\\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\\n \\n \\n \\n \\n\\n \\n \\n \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Host\n }, {\n type: Optional\n }, {\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; }, propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-excel-filter']\n }], inline: [{\n type: HostBinding,\n args: ['class.igx-excel-filter--inline']\n }], loadingStart: [{\n type: Output\n }], loadingEnd: [{\n type: Output\n }], initialized: [{\n type: Output\n }], sortingChanged: [{\n type: Output\n }], columnChange: [{\n type: Output\n }], listDataLoaded: [{\n type: Output\n }], mainDropdown: [{\n type: ViewChild,\n args: ['mainDropdown', { read: ElementRef }]\n }], excelColumnOperationsDirective: [{\n type: ContentChild,\n args: [IgxExcelStyleColumnOperationsTemplateDirective, { read: IgxExcelStyleColumnOperationsTemplateDirective }]\n }], excelFilterOperationsDirective: [{\n type: ContentChild,\n args: [IgxExcelStyleFilterOperationsTemplateDirective, { read: IgxExcelStyleFilterOperationsTemplateDirective }]\n }], defaultExcelColumnOperations: [{\n type: ViewChild,\n args: ['defaultExcelColumnOperations', { read: TemplateRef, static: true }]\n }], defaultExcelFilterOperations: [{\n type: ViewChild,\n args: ['defaultExcelFilterOperations', { read: TemplateRef, static: true }]\n }], column: [{\n type: Input\n }], minHeight: [{\n type: Input\n }], maxHeight: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['style.max-height']\n }] } });\n\n/**\n * This enumeration is used to configure whether the drop position is set before or after\n * the target.\n */\nvar DropPosition;\n(function (DropPosition) {\n DropPosition[DropPosition[\"BeforeDropTarget\"] = 0] = \"BeforeDropTarget\";\n DropPosition[DropPosition[\"AfterDropTarget\"] = 1] = \"AfterDropTarget\";\n})(DropPosition || (DropPosition = {}));\n/**\n * @hidden\n * @internal\n */\nclass IgxColumnMovingService {\n}\nIgxColumnMovingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnMovingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxColumnMovingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnMovingService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnMovingService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @hidden\n */\nclass GridBaseAPIService {\n constructor(crudService, cms) {\n this.crudService = crudService;\n this.cms = cms;\n this.destroyMap = new Map();\n }\n get_column_by_name(name) {\n return this.grid.columns.find((col) => col.field === name);\n }\n get_summary_data() {\n const grid = this.grid;\n let data = grid.filteredData;\n if (data && grid.hasPinnedRecords) {\n data = grid._filteredUnpinnedData;\n }\n if (!data) {\n if (grid.transactions.enabled) {\n data = DataUtil.mergeTransactions(cloneArray(grid.data), grid.transactions.getAggregatedChanges(true), grid.primaryKey, grid.dataCloneStrategy);\n const deletedRows = grid.transactions.getTransactionLog().filter(t => t.type === TransactionType.DELETE).map(t => t.id);\n deletedRows.forEach(rowID => {\n const tempData = grid.primaryKey ? data.map(rec => rec[grid.primaryKey]) : data;\n const index = tempData.indexOf(rowID);\n if (index !== -1) {\n data.splice(index, 1);\n }\n });\n }\n else {\n data = grid.data;\n }\n }\n return data;\n }\n /**\n * @hidden\n * @internal\n */\n getRowData(rowID) {\n const data = this.get_all_data(this.grid.transactions.enabled);\n const index = this.get_row_index_in_data(rowID, data);\n return data[index];\n }\n get_row_index_in_data(rowID, dataCollection) {\n const grid = this.grid;\n if (!grid) {\n return -1;\n }\n const data = dataCollection ?? this.get_all_data(grid.transactions.enabled);\n return grid.primaryKey ? data.findIndex(record => record.recordRef ? record.recordRef[grid.primaryKey] === rowID\n : record[grid.primaryKey] === rowID) : data.indexOf(rowID);\n }\n get_row_by_key(rowSelector) {\n if (!this.grid) {\n return null;\n }\n const primaryKey = this.grid.primaryKey;\n if (primaryKey !== undefined && primaryKey !== null) {\n return this.grid.dataRowList.find((row) => row.data[primaryKey] === rowSelector);\n }\n else {\n return this.grid.dataRowList.find((row) => row.data === rowSelector);\n }\n }\n get_row_by_index(rowIndex) {\n return this.grid.rowList.find((row) => row.index === rowIndex);\n }\n /**\n * Gets the rowID of the record at the specified data view index\n *\n * @param index\n * @param dataCollection\n */\n get_rec_id_by_index(index, dataCollection) {\n dataCollection = dataCollection || this.grid.data;\n if (index >= 0 && index < dataCollection.length) {\n const rec = dataCollection[index];\n return this.grid.primaryKey ? rec[this.grid.primaryKey] : rec;\n }\n return null;\n }\n get_cell_by_key(rowSelector, field) {\n const row = this.get_row_by_key(rowSelector);\n if (row && row.cells) {\n return row.cells.find((cell) => cell.column.field === field);\n }\n }\n get_cell_by_index(rowIndex, columnID) {\n const row = this.get_row_by_index(rowIndex);\n const hasCells = row && row.cells;\n if (hasCells && typeof columnID === 'number') {\n return row.cells.find((cell) => cell.column.index === columnID);\n }\n if (hasCells && typeof columnID === 'string') {\n return row.cells.find((cell) => cell.column.field === columnID);\n }\n }\n get_cell_by_visible_index(rowIndex, columnIndex) {\n const row = this.get_row_by_index(rowIndex);\n if (row && row.cells) {\n return row.cells.find((cell) => cell.visibleColumnIndex === columnIndex);\n }\n }\n update_cell(cell) {\n if (!cell) {\n return;\n }\n const args = cell.createEditEventArgs(true);\n this.grid.summaryService.clearSummaryCache(args);\n const data = this.getRowData(cell.id.rowID);\n const newRowData = reverseMapper(cell.column.field, args.newValue);\n this.updateData(this.grid, cell.id.rowID, data, cell.rowData, newRowData);\n if (!this.grid.crudService.row) {\n this.grid.validation.update(cell.id.rowID, newRowData);\n }\n if (this.grid.primaryKey === cell.column.field) {\n if (this.grid.pinnedRecords.length > 0) {\n const rowIndex = this.grid.pinnedRecords.indexOf(cell.rowData);\n if (rowIndex !== -1) {\n const previousRowId = cell.value;\n const rowType = this.grid.getRowByIndex(cell.rowIndex);\n this.unpin_row(previousRowId, rowType);\n this.pin_row(args.newValue, rowIndex, rowType);\n }\n }\n if (this.grid.selectionService.isRowSelected(cell.id.rowID)) {\n this.grid.selectionService.deselectRow(cell.id.rowID);\n this.grid.selectionService.selectRowById(args.newValue);\n }\n if (this.grid.hasSummarizedColumns) {\n this.grid.summaryService.removeSummaries(cell.id.rowID);\n }\n }\n if (!this.grid.rowEditable || !this.crudService.row ||\n this.crudService.row.id !== cell.id.rowID || !this.grid.transactions.enabled) {\n this.grid.summaryService.clearSummaryCache(args);\n this.grid.pipeTrigger++;\n }\n return args;\n }\n // TODO: CRUD refactor to not emit editing evts.\n update_row(row, value, event) {\n const grid = this.grid;\n const selected = grid.selectionService.isRowSelected(row.id);\n const rowInEditMode = this.crudService.row;\n const data = this.get_all_data(grid.transactions.enabled);\n const index = this.get_row_index_in_data(row.id, data);\n const hasSummarized = grid.hasSummarizedColumns;\n this.crudService.updateRowEditData(row, value);\n const args = row.createEditEventArgs(true, event);\n // If no valid row is found\n if (index === -1) {\n return args;\n }\n if (rowInEditMode) {\n const hasChanges = grid.transactions.getState(args.rowID, true);\n grid.transactions.endPending(false);\n if (!hasChanges) {\n return args;\n }\n }\n if (!args.newValue) {\n return args;\n }\n if (hasSummarized) {\n grid.summaryService.removeSummaries(args.rowID);\n }\n this.updateData(grid, row.id, data[index], args.oldValue, args.newValue);\n this.grid.validation.update(row.id, args.newValue);\n const newId = grid.primaryKey ? args.newValue[grid.primaryKey] : args.newValue;\n if (selected) {\n grid.selectionService.deselectRow(row.id);\n grid.selectionService.selectRowById(newId);\n }\n // make sure selection is handled prior to updating the row.id\n row.id = newId;\n if (hasSummarized) {\n grid.summaryService.removeSummaries(newId);\n }\n grid.pipeTrigger++;\n return args;\n }\n sort(expression) {\n if (expression.dir === SortingDirection.None) {\n this.remove_grouping_expression(expression.fieldName);\n }\n const sortingState = cloneArray(this.grid.sortingExpressions);\n this.prepare_sorting_expression([sortingState], expression);\n this.grid.sortingExpressions = sortingState;\n }\n sort_decoupled(expression) {\n if (expression.dir === SortingDirection.None) {\n this.remove_grouping_expression(expression.fieldName);\n }\n const groupingState = cloneArray(this.grid.groupingExpressions);\n this.prepare_grouping_expression([groupingState], expression);\n this.grid.groupingExpressions = groupingState;\n }\n sort_multiple(expressions) {\n const sortingState = cloneArray(this.grid.sortingExpressions);\n for (const each of expressions) {\n if (each.dir === SortingDirection.None) {\n this.remove_grouping_expression(each.fieldName);\n }\n this.prepare_sorting_expression([sortingState], each);\n }\n this.grid.sortingExpressions = sortingState;\n }\n sort_groupBy_multiple(expressions) {\n const groupingState = cloneArray(this.grid.groupingExpressions);\n for (const each of expressions) {\n if (each.dir === SortingDirection.None) {\n this.remove_grouping_expression(each.fieldName);\n }\n this.prepare_grouping_expression([groupingState], each);\n }\n }\n clear_sort(fieldName) {\n const sortingState = this.grid.sortingExpressions;\n const index = sortingState.findIndex((expr) => expr.fieldName === fieldName);\n if (index > -1) {\n sortingState.splice(index, 1);\n this.grid.sortingExpressions = sortingState;\n }\n }\n clear_groupby(_name) {\n }\n should_apply_number_style(column) {\n return column.dataType === GridColumnDataType.Number;\n }\n get_data() {\n const grid = this.grid;\n const data = grid.data ? grid.data : [];\n return data;\n }\n get_all_data(includeTransactions = false) {\n const grid = this.grid;\n let data = grid && grid.data ? grid.data : [];\n data = includeTransactions ? grid.dataWithAddedInTransactionRows : data;\n return data;\n }\n get_filtered_data() {\n return this.grid.filteredData;\n }\n addRowToData(rowData, _parentID) {\n // Add row goes to transactions and if rowEditable is properly implemented, added rows will go to pending transactions\n // If there is a row in edit - > commit and close\n const grid = this.grid;\n const rowId = grid.primaryKey ? rowData[grid.primaryKey] : rowData;\n if (grid.transactions.enabled) {\n const transaction = { id: rowId, type: TransactionType.ADD, newValue: rowData };\n grid.transactions.add(transaction);\n }\n else {\n grid.data.push(rowData);\n }\n grid.validation.markAsTouched(rowId);\n grid.validation.update(rowId, rowData);\n }\n deleteRowFromData(rowID, index) {\n // if there is a row (index !== 0) delete it\n // if there is a row in ADD or UPDATE state change it's state to DELETE\n const grid = this.grid;\n if (index !== -1) {\n if (grid.transactions.enabled) {\n const transaction = { id: rowID, type: TransactionType.DELETE, newValue: null };\n grid.transactions.add(transaction, grid.data[index]);\n }\n else {\n grid.data.splice(index, 1);\n }\n }\n else {\n const state = grid.transactions.getState(rowID);\n grid.transactions.add({ id: rowID, type: TransactionType.DELETE, newValue: null }, state && state.recordRef);\n }\n grid.validation.clear(rowID);\n }\n deleteRowById(rowId) {\n let index;\n const grid = this.grid;\n const data = this.get_all_data();\n if (grid.primaryKey) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n index = data.map((record) => record[grid.primaryKey]).indexOf(rowId);\n }\n else {\n index = data.indexOf(rowId);\n }\n const state = grid.transactions.getState(rowId);\n const hasRowInNonDeletedState = state && state.type !== TransactionType.DELETE;\n // if there is a row (index !== -1) and the we have cell in edit mode on same row exit edit mode\n // if there is no row (index === -1), but there is a row in ADD or UPDATE state do as above\n // Otherwise just exit - there is nothing to delete\n if (index !== -1 || hasRowInNonDeletedState) {\n // Always exit edit when row is deleted\n this.crudService.endEdit(true);\n }\n else {\n return;\n }\n const record = data[index];\n const key = record ? record[grid.primaryKey] : undefined;\n grid.rowDeletedNotifier.next({ data: record, owner: grid, primaryKey: key });\n this.deleteRowFromData(rowId, index);\n if (grid.selectionService.isRowSelected(rowId)) {\n grid.selectionService.deselectRowsWithNoEvent([rowId]);\n }\n else {\n grid.selectionService.clearHeaderCBState();\n }\n grid.pipeTrigger++;\n grid.notifyChanges();\n // Data needs to be recalculated if transactions are in place\n // If no transactions, `data` will be a reference to the grid getter, otherwise it will be stale\n const dataAfterDelete = grid.transactions.enabled ? grid.dataWithAddedInTransactionRows : data;\n grid.refreshSearch();\n if (dataAfterDelete.length % grid.perPage === 0 && dataAfterDelete.length / grid.perPage - 1 < grid.page && grid.page !== 0) {\n grid.page--;\n }\n return record;\n }\n get_row_id(rowData) {\n return this.grid.primaryKey ? rowData[this.grid.primaryKey] : rowData;\n }\n row_deleted_transaction(rowID) {\n const grid = this.grid;\n if (!grid) {\n return false;\n }\n if (!grid.transactions.enabled) {\n return false;\n }\n const state = grid.transactions.getState(rowID);\n if (state) {\n return state.type === TransactionType.DELETE;\n }\n return false;\n }\n get_row_expansion_state(record) {\n const grid = this.grid;\n const states = grid.expansionStates;\n const rowID = grid.primaryKey ? record[grid.primaryKey] : record;\n const expanded = states.get(rowID);\n if (expanded !== undefined) {\n return expanded;\n }\n else {\n return grid.getDefaultExpandState(record);\n }\n }\n set_row_expansion_state(rowID, expanded, event) {\n const grid = this.grid;\n const expandedStates = grid.expansionStates;\n if (!this.allow_expansion_state_change(rowID, expanded)) {\n return;\n }\n const args = {\n rowID,\n expanded,\n event,\n cancel: false\n };\n grid.rowToggle.emit(args);\n if (args.cancel) {\n return;\n }\n expandedStates.set(rowID, expanded);\n grid.expansionStates = expandedStates;\n // K.D. 28 Feb, 2022 #10634 Don't trigger endEdit/commit upon row expansion state change\n // this.crudService.endEdit(false);\n }\n get_rec_by_id(rowID) {\n return this.grid.primaryKey ? this.getRowData(rowID) : rowID;\n }\n /**\n * Returns the index of the record in the data view by pk or -1 if not found or primaryKey is not set.\n *\n * @param pk\n * @param dataCollection\n */\n get_rec_index_by_id(pk, dataCollection) {\n dataCollection = dataCollection || this.grid.data;\n return this.grid.primaryKey ? dataCollection.findIndex(rec => rec[this.grid.primaryKey] === pk) : -1;\n }\n allow_expansion_state_change(rowID, expanded) {\n return this.grid.expansionStates.get(rowID) !== expanded;\n }\n prepare_sorting_expression(stateCollections, expression) {\n if (expression.dir === SortingDirection.None) {\n stateCollections.forEach(state => {\n state.splice(state.findIndex((expr) => expr.fieldName === expression.fieldName), 1);\n });\n return;\n }\n /**\n * We need to make sure the states in each collection with same fields point to the same object reference.\n * If the different state collections provided have different sizes we need to get the largest one.\n * That way we can get the state reference from the largest one that has the same fieldName as the expression to prepare.\n */\n let maxCollection = stateCollections[0];\n for (let i = 1; i < stateCollections.length; i++) {\n if (maxCollection.length < stateCollections[i].length) {\n maxCollection = stateCollections[i];\n }\n }\n const maxExpr = maxCollection.find((expr) => expr.fieldName === expression.fieldName);\n stateCollections.forEach(collection => {\n const myExpr = collection.find((expr) => expr.fieldName === expression.fieldName);\n if (!myExpr && !maxExpr) {\n // Expression with this fieldName is missing from the current and the max collection.\n collection.push(expression);\n }\n else if (!myExpr && maxExpr) {\n // Expression with this fieldName is missing from the current and but the max collection has.\n collection.push(maxExpr);\n Object.assign(maxExpr, expression);\n }\n else {\n // The current collection has the expression so just update it.\n Object.assign(myExpr, expression);\n }\n });\n }\n prepare_grouping_expression(stateCollections, expression) {\n if (expression.dir === SortingDirection.None) {\n stateCollections.forEach(state => {\n state.splice(state.findIndex((expr) => expr.fieldName === expression.fieldName), 1);\n });\n return;\n }\n /**\n * We need to make sure the states in each collection with same fields point to the same object reference.\n * If the different state collections provided have different sizes we need to get the largest one.\n * That way we can get the state reference from the largest one that has the same fieldName as the expression to prepare.\n */\n let maxCollection = stateCollections[0];\n for (let i = 1; i < stateCollections.length; i++) {\n if (maxCollection.length < stateCollections[i].length) {\n maxCollection = stateCollections[i];\n }\n }\n const maxExpr = maxCollection.find((expr) => expr.fieldName === expression.fieldName);\n stateCollections.forEach(collection => {\n const myExpr = collection.find((expr) => expr.fieldName === expression.fieldName);\n if (!myExpr && !maxExpr) {\n // Expression with this fieldName is missing from the current and the max collection.\n collection.push(expression);\n }\n else if (!myExpr && maxExpr) {\n // Expression with this fieldName is missing from the current and but the max collection has.\n collection.push(maxExpr);\n Object.assign(maxExpr, expression);\n }\n else {\n // The current collection has the expression so just update it.\n Object.assign(myExpr, expression);\n }\n });\n }\n remove_grouping_expression(_fieldName) {\n }\n filterDataByExpressions(expressionsTree) {\n let data = this.get_all_data();\n if (expressionsTree.filteringOperands.length) {\n const state = { expressionsTree, strategy: this.grid.filterStrategy };\n data = FilterUtil.filter(cloneArray(data), state, this.grid);\n }\n return data;\n }\n sortDataByExpressions(data, expressions) {\n return DataUtil.sort(cloneArray(data), expressions, this.grid.sortStrategy, this.grid);\n }\n pin_row(rowID, index, row) {\n const grid = this.grid;\n if (grid._pinnedRecordIDs.indexOf(rowID) !== -1) {\n return;\n }\n const eventArgs = this.get_pin_row_event_args(rowID, index, row, true);\n grid.rowPinning.emit(eventArgs);\n if (eventArgs.cancel) {\n return;\n }\n const insertIndex = typeof eventArgs.insertAtIndex === 'number' ? eventArgs.insertAtIndex : grid._pinnedRecordIDs.length;\n grid._pinnedRecordIDs.splice(insertIndex, 0, rowID);\n }\n unpin_row(rowID, row) {\n const grid = this.grid;\n const index = grid._pinnedRecordIDs.indexOf(rowID);\n if (index === -1) {\n return;\n }\n const eventArgs = this.get_pin_row_event_args(rowID, null, row, false);\n grid.rowPinning.emit(eventArgs);\n if (eventArgs.cancel) {\n return;\n }\n grid._pinnedRecordIDs.splice(index, 1);\n }\n get_pin_row_event_args(rowID, index, row, pinned) {\n const eventArgs = {\n isPinned: pinned ? true : false,\n rowID,\n row,\n cancel: false\n };\n if (typeof index === 'number') {\n eventArgs.insertAtIndex = index <= this.grid.pinnedRecords.length ? index : this.grid.pinnedRecords.length;\n }\n return eventArgs;\n }\n /**\n * Updates related row of provided grid's data source with provided new row value\n *\n * @param grid Grid to update data for\n * @param rowID ID of the row to update\n * @param rowValueInDataSource Initial value of the row as it is in data source\n * @param rowCurrentValue Current value of the row as it is with applied previous transactions\n * @param rowNewValue New value of the row\n */\n updateData(grid, rowID, rowValueInDataSource, rowCurrentValue, rowNewValue) {\n if (grid.transactions.enabled) {\n const transaction = {\n id: rowID,\n type: TransactionType.UPDATE,\n newValue: rowNewValue\n };\n grid.transactions.add(transaction, rowCurrentValue);\n }\n else {\n mergeObjects(rowValueInDataSource, rowNewValue);\n }\n }\n update_row_in_array(value, rowID, index) {\n const grid = this.grid;\n grid.data[index] = value;\n }\n getSortStrategyPerColumn(fieldName) {\n return this.get_column_by_name(fieldName) ?\n this.get_column_by_name(fieldName).sortStrategy : undefined;\n }\n}\nGridBaseAPIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: GridBaseAPIService, deps: [{ token: IgxGridCRUDService }, { token: IgxColumnMovingService }], target: i0.ɵɵFactoryTarget.Injectable });\nGridBaseAPIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: GridBaseAPIService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: GridBaseAPIService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: IgxGridCRUDService }, { type: IgxColumnMovingService }]; } });\n\n/**\n * @hidden\n */\nfunction WatchChanges() {\n return (target, key, propDesc) => {\n const privateKey = '_' + key.toString();\n propDesc = propDesc || {\n configurable: true,\n enumerable: true,\n };\n propDesc.get = propDesc.get || (function () {\n return this[privateKey];\n });\n const originalSetter = propDesc.set || (function (val) {\n this[privateKey] = val;\n });\n propDesc.set = function (val) {\n const init = this._init;\n const oldValue = this[key];\n if (val !== oldValue || (typeof val === 'object' && val === oldValue)) {\n originalSetter.call(this, val);\n if (this.ngOnChanges && !init) {\n // in case wacthed prop changes trigger ngOnChanges manually\n const changes = {\n [key]: new SimpleChange(oldValue, val, false)\n };\n this.ngOnChanges(changes);\n }\n }\n };\n return propDesc;\n };\n}\nfunction WatchColumnChanges() {\n return (target, key, propDesc) => {\n const privateKey = '_' + key.toString();\n propDesc = propDesc || {\n configurable: true,\n enumerable: true,\n };\n propDesc.get = propDesc.get || (function () {\n return this[privateKey];\n });\n const originalSetter = propDesc.set || (function (val) {\n this[privateKey] = val;\n });\n propDesc.set = function (val) {\n const oldValue = this[key];\n originalSetter.call(this, val);\n if (val !== oldValue || (typeof val === 'object' && val === oldValue)) {\n if (this.columnChange) {\n this.columnChange.emit();\n }\n }\n };\n return propDesc;\n };\n}\nfunction notifyChanges(repaint = false) {\n return (_, key, propDesc) => {\n const privateKey = `__${key}`;\n propDesc = propDesc || {\n enumerable: true,\n configurable: true\n };\n const originalSetter = propDesc ? propDesc.set : null;\n propDesc.get = propDesc.get || (function () {\n return this[privateKey];\n });\n propDesc.set = function (newValue) {\n if (originalSetter) {\n originalSetter.call(this, newValue);\n if (this.grid) {\n this.grid.notifyChanges(repaint && !this.grid.isPivot);\n }\n }\n else {\n if (newValue === this[key]) {\n return;\n }\n this[privateKey] = newValue;\n if (this.grid) {\n this.grid.notifyChanges(repaint && !this.grid.isPivot);\n }\n }\n };\n return propDesc;\n };\n}\n\nclass IgxFilterCellTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxFilterCellTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterCellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxFilterCellTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxFilterCellTemplateDirective, selector: \"[igxFilterCellTemplate]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterCellTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxFilterCellTemplate]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxCellTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxCellTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCellTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCellTemplateDirective, selector: \"[igxCell]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCell]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxCellValidationErrorDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxCellValidationErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellValidationErrorDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCellValidationErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCellValidationErrorDirective, selector: \"[igxCellValidationError]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellValidationErrorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCellValidationError]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxCellHeaderTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxCellHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCellHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCellHeaderTemplateDirective, selector: \"[igxHeader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellHeaderTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxHeader]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * @hidden\n */\nclass IgxCellFooterTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxCellFooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellFooterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCellFooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCellFooterTemplateDirective, selector: \"[igxFooter]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellFooterTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxFooter]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxCellEditorTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxCellEditorTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellEditorTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCellEditorTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCellEditorTemplateDirective, selector: \"[igxCellEditor]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCellEditorTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCellEditor]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxCollapsibleIndicatorTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxCollapsibleIndicatorTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCollapsibleIndicatorTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxCollapsibleIndicatorTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCollapsibleIndicatorTemplateDirective, selector: \"[igxCollapsibleIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCollapsibleIndicatorTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxCollapsibleIndicator]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxSummaryTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxSummaryTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxSummaryTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSummaryTemplateDirective, selector: \"[igxSummary]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSummary]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nclass IgxGridCell {\n /**\n * @hidden\n */\n constructor(grid, row, column) {\n this.grid = grid;\n if (typeof row === 'number') {\n this._rowIndex = row;\n }\n else {\n this._row = row;\n this._rowIndex = row.index;\n }\n if (typeof column === 'string') {\n this._columnField = column;\n }\n else {\n this._column = column;\n }\n }\n /**\n * Returns the row containing the cell.\n * ```typescript\n * let row = this.cell.row;\n * ```\n *\n * @memberof IgxGridCell\n */\n get row() {\n return this._row || this.grid.createRow(this._rowIndex);\n }\n /**\n * Returns the column of the cell.\n * ```typescript\n * let column = this.cell.column;\n * ```\n *\n * @memberof IgxGridCell\n */\n get column() {\n return this._column || this.grid.getColumnByName(this._columnField);\n }\n /**\n * Gets the current edit value while a cell is in edit mode.\n * ```typescript\n * let editValue = this.cell.editValue;\n * ```\n *\n * @memberof IgxGridCell\n */\n get editValue() {\n if (this.isCellInEditMode()) {\n return this.grid.crudService.cell.editValue;\n }\n }\n /**\n * Gets the validation status and errors, if any.\n * ```typescript\n * let validation = this.cell.validation;\n * let errors = validation.errors;\n * ```\n */\n get validation() {\n const form = this.grid.validation.getFormControl(this.row.key, this.column.field);\n return { status: form?.status || 'VALID', errors: form?.errors };\n }\n /**\n * Sets the current edit value while a cell is in edit mode.\n * Only for cell editing mode.\n * ```typescript\n * this.cell.editValue = value;\n * ```\n *\n * @memberof IgxGridCell\n */\n set editValue(value) {\n if (this.isCellInEditMode()) {\n this.grid.crudService.cell.editValue = value;\n }\n }\n /**\n * Returns whether the cell is editable..\n *\n * @memberof IgxGridCell\n */\n get editable() {\n return this.column.editable && !this.row?.disabled;\n }\n /**\n * Gets the width of the cell.\n * ```typescript\n * let cellWidth = this.cell.width;\n * ```\n *\n * @memberof IgxGridCell\n */\n get width() {\n return this.column.width;\n }\n /**\n * Returns the cell value.\n *\n * @memberof IgxGridCell\n */\n get value() {\n // will return undefined for a column layout, because getCellByColumnVisibleIndex may return the column layout at that index.\n // getCellByColumnVisibleIndex is deprecated and will be removed in future version\n return this.column.field ?\n this.column.hasNestedPath ? resolveNestedPath(this.row?.data, this.column.field) : this.row?.data[this.column.field]\n : undefined;\n }\n /**\n * Updates the cell value.\n *\n * @memberof IgxGridCell\n */\n set value(val) {\n this.update(val);\n }\n /**\n * Gets the cell id.\n * A cell in the grid is identified by:\n * - rowID - primaryKey data value or the whole rowData, if the primaryKey is omitted.\n * - rowIndex - the row index\n * - columnID - column index\n *\n * ```typescript\n * let cellID = cell.id;\n * ```\n *\n * @memberof IgxGridCell\n */\n get id() {\n const primaryKey = this.grid.primaryKey;\n const rowID = primaryKey ? this.row?.data[primaryKey] : this.row?.data;\n return { rowID, columnID: this.column.index, rowIndex: this._rowIndex || this.row?.index };\n }\n /**\n * Returns if the row is currently in edit mode.\n *\n * @memberof IgxGridCell\n */\n get editMode() {\n return this.isCellInEditMode();\n }\n /**\n * Starts/ends edit mode for the cell.\n *\n * ```typescript\n * cell.editMode = !cell.editMode;\n * ```\n *\n * @memberof IgxGridCell\n */\n set editMode(value) {\n const isInEditMode = this.isCellInEditMode();\n if (!this.row || this.row?.deleted || isInEditMode === value) {\n return;\n }\n if (this.editable && value) {\n this.endEdit();\n // TODO possibly define similar method in gridAPI, which does not emit event\n this.grid.crudService.enterEditMode(this);\n }\n else {\n this.grid.crudService.endCellEdit();\n }\n this.grid.notifyChanges();\n }\n /**\n * Gets whether the cell is selected.\n * ```typescript\n * let isSelected = this.cell.selected;\n * ```\n *\n *\n * @memberof IgxGridCell\n */\n get selected() {\n return this.grid.selectionService.selected(this.selectionNode);\n }\n /**\n * Selects/deselects the cell.\n * ```typescript\n * this.cell.selected = true.\n * ```\n *\n *\n * @memberof IgxGridCell\n */\n set selected(val) {\n const node = this.selectionNode;\n if (val) {\n this.grid.selectionService.add(node);\n }\n else {\n this.grid.selectionService.remove(node);\n }\n this.grid.notifyChanges();\n }\n get active() {\n const node = this.grid.navigation.activeNode;\n return node ? node.row === this.row?.index && node.column === this.column.visibleIndex : false;\n }\n /**\n * Updates the cell value.\n *\n * ```typescript\n * cell.update(newValue);\n * ```\n *\n * @memberof IgxGridCell\n */\n update(val) {\n if (this.row?.deleted) {\n return;\n }\n this.endEdit();\n const cell = this.isCellInEditMode() ? this.grid.crudService.cell : this.grid.crudService.createCell(this);\n cell.editValue = val;\n this.grid.gridAPI.update_cell(cell);\n this.grid.crudService.endCellEdit();\n this.grid.notifyChanges();\n }\n get selectionNode() {\n return {\n row: this.row?.index,\n column: this.column.columnLayoutChild ? this.column.parent.visibleIndex : this.column.visibleIndex,\n layout: this.column.columnLayoutChild ? {\n rowStart: this.column.rowStart,\n colStart: this.column.colStart,\n rowEnd: this.column.rowEnd,\n colEnd: this.column.colEnd,\n columnVisibleIndex: this.column.visibleIndex\n } : null\n };\n }\n isCellInEditMode() {\n if (this.grid.crudService.cellInEditMode) {\n const cellInEditMode = this.grid.crudService.cell.id;\n const isCurrentCell = cellInEditMode.rowID === this.id.rowID &&\n cellInEditMode.rowIndex === this.id.rowIndex &&\n cellInEditMode.columnID === this.id.columnID;\n return isCurrentCell;\n }\n return false;\n }\n endEdit() {\n if (!this.isCellInEditMode()) {\n this.grid.gridAPI.update_cell(this.grid.crudService.cell);\n this.grid.crudService.endCellEdit();\n }\n }\n}\n\nconst DEFAULT_DATE_FORMAT = 'mediumDate';\nconst DEFAULT_TIME_FORMAT$1 = 'mediumTime';\nconst DEFAULT_DATE_TIME_FORMAT$1 = 'medium';\nconst DEFAULT_DIGITS_INFO = '1.0-3';\n/**\n * **Ignite UI for Angular Column** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid#columns-configuration)\n *\n * The Ignite UI Column is used within an `igx-grid` element to define what data the column will show. Features such as sorting,\n * filtering & editing are enabled at the column level. You can also provide a template containing custom content inside\n * the column using `ng-template` which will be used for all cells within the column.\n */\nclass IgxColumnComponent {\n /**\n * Sets/gets the `field` value.\n * ```typescript\n * let columnField = this.column.field;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set field(value) {\n this._field = value;\n this.hasNestedPath = value?.includes('.');\n }\n get field() {\n return this._field;\n }\n /**\n * Returns if the column is selectable.\n * ```typescript\n * let columnSelectable = this.column.selectable;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get selectable() {\n return this._selectable;\n }\n /**\n * Sets if the column is selectable.\n * Default value is `true`.\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set selectable(value) {\n this._selectable = value;\n }\n /**\n * Gets whether the column is editable.\n * Default value is `false`.\n * ```typescript\n * let isEditable = this.column.editable;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get editable() {\n // Updating the primary key when grid has transactions (incl. row edit)\n // should not be allowed, as that can corrupt transaction state.\n const rowEditable = this.grid && this.grid.rowEditable;\n const hasTransactions = this.grid && this.grid.transactions.enabled;\n if (this.isPrimaryColumn && (rowEditable || hasTransactions)) {\n return false;\n }\n if (this._editable !== undefined) {\n return this._editable;\n }\n else {\n return rowEditable;\n }\n }\n /**\n * Sets whether the column is editable.\n * ```typescript\n * this.column.editable = true;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set editable(editable) {\n this._editable = editable;\n }\n /**\n * Gets a value indicating whether the summary for the column is enabled.\n * ```typescript\n * let hasSummary = this.column.hasSummary;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get hasSummary() {\n return this._hasSummary;\n }\n /**\n * Sets a value indicating whether the summary for the column is enabled.\n * Default value is `false`.\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set hasSummary(value) {\n this._hasSummary = value;\n if (this.grid) {\n this.grid.summaryService.resetSummaryHeight();\n }\n }\n /**\n * Gets whether the column is hidden.\n * ```typescript\n * let isHidden = this.column.hidden;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get hidden() {\n return this._hidden;\n }\n /**\n * Sets the column hidden property.\n * Default value is `false`.\n * ```html\n * \n * ```\n *\n * Two-way data binding.\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set hidden(value) {\n if (this._hidden !== value) {\n this._hidden = value;\n this.hiddenChange.emit(this._hidden);\n if (this.columnLayoutChild && this.parent.hidden !== value) {\n this.parent.hidden = value;\n return;\n }\n if (this.grid) {\n this.grid.crudService.endEdit(false);\n this.grid.summaryService.resetSummaryHeight();\n this.grid.filteringService.refreshExpressions();\n this.grid.filteringService.hideFilteringRowOnColumnVisibilityChange(this);\n this.grid.notifyChanges();\n }\n }\n }\n /**\n * Returns if the column is selected.\n * ```typescript\n * let isSelected = this.column.selected;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get selected() {\n return this.grid.selectionService.isColumnSelected(this.field);\n }\n /**\n * Select/deselect a column.\n * Default value is `false`.\n * ```typescript\n * this.column.selected = true;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set selected(value) {\n if (this.selectable && value !== this.selected) {\n if (value) {\n this.grid.selectionService.selectColumnsWithNoEvent([this.field]);\n }\n else {\n this.grid.selectionService.deselectColumnsWithNoEvent([this.field]);\n }\n this.grid.notifyChanges();\n }\n }\n /**\n * Gets the `width` of the column.\n * ```typescript\n * let columnWidth = this.column.width;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get width() {\n const isAutoWidth = this._width && typeof this._width === 'string' && this._width === 'auto';\n if (isAutoWidth) {\n if (!this.autoSize) {\n return 'fit-content';\n }\n else {\n return this.autoSize + 'px';\n }\n }\n return this.widthSetByUser ? this._width : this.defaultWidth;\n }\n /**\n * Sets the `width` of the column.\n * ```html\n * \n * ```\n *\n * Two-way data binding.\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set width(value) {\n if (value) {\n this._calcWidth = null;\n this.calcPixelWidth = NaN;\n this.widthSetByUser = true;\n // width could be passed as number from the template\n // host bindings are not px affixed so we need to ensure we affix simple number strings\n if (typeof (value) === 'number' || value.match(/^[0-9]*$/)) {\n value = value + 'px';\n }\n if (value === 'fit-content') {\n value = 'auto';\n }\n this._width = value;\n if (this.grid) {\n this.cacheCalcWidth();\n }\n this.widthChange.emit(this._width);\n }\n }\n /**\n * @hidden\n */\n get calcWidth() {\n return this.getCalcWidth();\n }\n /**\n * @hidden\n */\n get maxWidthPx() {\n const gridAvailableSize = this.grid.calcWidth;\n const isPercentageWidth = this.maxWidth && typeof this.maxWidth === 'string' && this.maxWidth.indexOf('%') !== -1;\n return isPercentageWidth ? parseFloat(this.maxWidth) / 100 * gridAvailableSize : parseFloat(this.maxWidth);\n }\n /**\n * @hidden\n */\n get maxWidthPercent() {\n const gridAvailableSize = this.grid.calcWidth;\n const isPercentageWidth = this.maxWidth && typeof this.maxWidth === 'string' && this.maxWidth.indexOf('%') !== -1;\n return isPercentageWidth ? parseFloat(this.maxWidth) : parseFloat(this.maxWidth) / gridAvailableSize * 100;\n }\n /**\n * @hidden\n */\n get minWidthPx() {\n const gridAvailableSize = this.grid.calcWidth;\n const isPercentageWidth = this.minWidth && typeof this.minWidth === 'string' && this.minWidth.indexOf('%') !== -1;\n return isPercentageWidth ? parseFloat(this.minWidth) / 100 * gridAvailableSize : parseFloat(this.minWidth);\n }\n /**\n * @hidden\n */\n get minWidthPercent() {\n const gridAvailableSize = this.grid.calcWidth;\n const isPercentageWidth = this.minWidth && typeof this.minWidth === 'string' && this.minWidth.indexOf('%') !== -1;\n return isPercentageWidth ? parseFloat(this.minWidth) : parseFloat(this.minWidth) / gridAvailableSize * 100;\n }\n /**\n * Sets/gets the minimum `width` of the column.\n * Default value is `88`;\n * ```typescript\n * let columnMinWidth = this.column.minWidth;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set minWidth(value) {\n const minVal = parseFloat(value);\n if (Number.isNaN(minVal)) {\n return;\n }\n this._defaultMinWidth = value;\n }\n get minWidth() {\n return !this._defaultMinWidth ? this.defaultMinWidth : this._defaultMinWidth;\n }\n /**\n * Gets the column index.\n * ```typescript\n * let columnIndex = this.column.index;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get index() {\n return this.grid._columns.indexOf(this);\n }\n /**\n * Gets whether the column is `pinned`.\n * ```typescript\n * let isPinned = this.column.pinned;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get pinned() {\n return this._pinned;\n }\n /**\n * Sets whether the column is pinned.\n * Default value is `false`.\n * ```html\n * \n * ```\n *\n * Two-way data binding.\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set pinned(value) {\n if (this._pinned !== value) {\n const isAutoWidth = this.width && typeof this.width === 'string' && this.width === 'fit-content';\n if (this.grid && this.width && (isAutoWidth || !isNaN(parseInt(this.width, 10)))) {\n if (value) {\n this.pin();\n }\n else {\n this.unpin();\n }\n return;\n }\n /* No grid/width available at initialization. `initPinning` in the grid\n will re-init the group (if present)\n */\n this._pinned = value;\n this.pinnedChange.emit(this._pinned);\n }\n }\n /**\n * Gets the column `summaries`.\n * ```typescript\n * let columnSummaries = this.column.summaries;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get summaries() {\n return this._summaries;\n }\n /**\n * Sets the column `summaries`.\n * ```typescript\n * this.column.summaries = IgxNumberSummaryOperand;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set summaries(classRef) {\n if (isConstructor(classRef)) {\n this._summaries = new classRef();\n }\n if (this.grid) {\n this.grid.summaryService.removeSummariesCachePerColumn(this.field);\n this.grid.summaryPipeTrigger++;\n this.grid.summaryService.resetSummaryHeight();\n }\n }\n /**\n * Gets the column `filters`.\n * ```typescript\n * let columnFilters = this.column.filters'\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get filters() {\n return this._filters;\n }\n /**\n * Sets the column `filters`.\n * ```typescript\n * this.column.filters = IgxBooleanFilteringOperand.instance().\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set filters(instance) {\n this._filters = instance;\n }\n /**\n * Gets the column `sortStrategy`.\n * ```typescript\n * let sortStrategy = this.column.sortStrategy\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get sortStrategy() {\n return this._sortStrategy;\n }\n /**\n * Sets the column `sortStrategy`.\n * ```typescript\n * this.column.sortStrategy = new CustomSortingStrategy().\n * class CustomSortingStrategy extends SortingStrategy {...}\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set sortStrategy(classRef) {\n this._sortStrategy = classRef;\n }\n /**\n * Gets the function that compares values for grouping.\n * ```typescript\n * let groupingComparer = this.column.groupingComparer'\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get groupingComparer() {\n return this._groupingComparer;\n }\n /**\n * Sets a custom function to compare values for grouping.\n * Subsequent values in the sorted data that the function returns 0 for are grouped.\n * ```typescript\n * this.column.groupingComparer = (a: any, b: any, currRec?: any, groupRec?: any) => { return a === b ? 0 : -1; }\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set groupingComparer(funcRef) {\n this._groupingComparer = funcRef;\n }\n /**\n * Gets the default minimum `width` of the column.\n * ```typescript\n * let defaultMinWidth = this.column.defaultMinWidth;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get defaultMinWidth() {\n if (!this.grid) {\n return '80';\n }\n switch (this.grid.displayDensity) {\n case DisplayDensity.cosy:\n return '64';\n case DisplayDensity.compact:\n return '56';\n default:\n return '80';\n }\n }\n /**\n * Returns a reference to the `summaryTemplate`.\n * ```typescript\n * let summaryTemplate = this.column.summaryTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get summaryTemplate() {\n return this._summaryTemplate;\n }\n /**\n * Sets the summary template.\n * ```html\n * \n *

    {{ summaryResults[0].label }}: {{ summaryResults[0].summaryResult }}

    \n *

    {{ summaryResults[1].label }}: {{ summaryResults[1].summaryResult }}

    \n *
    \n * ```\n * ```typescript\n * @ViewChild(\"'summaryTemplate'\", {read: TemplateRef })\n * public summaryTemplate: TemplateRef;\n * this.column.summaryTemplate = this.summaryTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set summaryTemplate(template) {\n this._summaryTemplate = template;\n }\n /**\n * Returns a reference to the `bodyTemplate`.\n * ```typescript\n * let bodyTemplate = this.column.bodyTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get bodyTemplate() {\n return this._bodyTemplate;\n }\n /**\n * Sets the body template.\n * ```html\n * \n *
    \n * {{val}} \n *
    \n *
    \n * ```\n * ```typescript\n * @ViewChild(\"'bodyTemplate'\", {read: TemplateRef })\n * public bodyTemplate: TemplateRef;\n * this.column.bodyTemplate = this.bodyTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set bodyTemplate(template) {\n this._bodyTemplate = template;\n }\n /**\n * Returns a reference to the header template.\n * ```typescript\n * let headerTemplate = this.column.headerTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get headerTemplate() {\n return this._headerTemplate;\n }\n /**\n * Sets the header template.\n * Note that the column header height is fixed and any content bigger than it will be cut off.\n * ```html\n * \n *
    \n * {{column.field}}\n *
    \n *
    \n * ```\n * ```typescript\n * @ViewChild(\"'headerTemplate'\", {read: TemplateRef })\n * public headerTemplate: TemplateRef;\n * this.column.headerTemplate = this.headerTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set headerTemplate(template) {\n this._headerTemplate = template;\n }\n /**\n * Returns a reference to the inline editor template.\n * ```typescript\n * let inlineEditorTemplate = this.column.inlineEditorTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get inlineEditorTemplate() {\n return this._inlineEditorTemplate;\n }\n /**\n * Sets the inline editor template.\n * ```html\n * \n * \n * \n * ```\n * ```typescript\n * @ViewChild(\"'inlineEditorTemplate'\", {read: TemplateRef })\n * public inlineEditorTemplate: TemplateRef;\n * this.column.inlineEditorTemplate = this.inlineEditorTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set inlineEditorTemplate(template) {\n this._inlineEditorTemplate = template;\n }\n /**\n * Returns a reference to the validation error template.\n * ```typescript\n * let errorTemplate = this.column.errorTemplate;\n * ```\n */\n get errorTemplate() {\n return this._errorTemplate;\n }\n /**\n * Sets the error template.\n * ```html\n * \n *
    \n * This name is forbidden.\n *
    \n *
    \n * ```\n * ```typescript\n * @ViewChild(\"'errorTemplate'\", {read: TemplateRef })\n * public errorTemplate: TemplateRef;\n * this.column.errorTemplate = this.errorTemplate;\n * ```\n */\n set errorTemplate(template) {\n this._errorTemplate = template;\n }\n /**\n * Returns a reference to the `filterCellTemplate`.\n * ```typescript\n * let filterCellTemplate = this.column.filterCellTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get filterCellTemplate() {\n return this._filterCellTemplate;\n }\n /**\n * Sets the quick filter template.\n * ```html\n * \n * \n * \n * ```\n * ```typescript\n * @ViewChild(\"'filterCellTemplate'\", {read: TemplateRef })\n * public filterCellTemplate: TemplateRef;\n * this.column.filterCellTemplate = this.filterCellTemplate;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n set filterCellTemplate(template) {\n this._filterCellTemplate = template;\n }\n /**\n * Gets the cells of the column.\n * ```typescript\n * let columnCells = this.column.cells;\n * ```\n *\n */\n get cells() {\n return this.grid.dataView\n .map((rec, index) => {\n if (!this.grid.isGroupByRecord(rec) && !this.grid.isSummaryRow(rec)) {\n this.grid.pagingMode === 1 && this.grid.page !== 0 ? index = index + this.grid.perPage * this.grid.page : index = this.grid.dataRowList.first.index + index;\n const cell = new IgxGridCell(this.grid, index, this.field);\n return cell;\n }\n }).filter(cell => cell);\n }\n /**\n * @hidden @internal\n */\n get _cells() {\n return this.grid.rowList.filter((row) => row instanceof IgxRowDirective)\n .map((row) => {\n if (row._cells) {\n return row._cells.filter((cell) => cell.columnIndex === this.index);\n }\n }).reduce((a, b) => a.concat(b), []);\n }\n /**\n * Gets the column visible index.\n * If the column is not visible, returns `-1`.\n * ```typescript\n * let visibleColumnIndex = this.column.visibleIndex;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get visibleIndex() {\n if (!isNaN(this._vIndex)) {\n return this._vIndex;\n }\n const unpinnedColumns = this.grid.unpinnedColumns.filter(c => !c.columnGroup);\n const pinnedColumns = this.grid.pinnedColumns.filter(c => !c.columnGroup);\n let col = this;\n let vIndex = -1;\n if (this.columnGroup) {\n col = this.allChildren.filter(c => !c.columnGroup && !c.hidden)[0];\n }\n if (this.columnLayoutChild) {\n return this.parent.childrenVisibleIndexes.find(x => x.column === this).index;\n }\n if (!this.pinned) {\n const indexInCollection = unpinnedColumns.indexOf(col);\n vIndex = indexInCollection === -1 ?\n -1 :\n (this.grid.isPinningToStart ?\n pinnedColumns.length + indexInCollection :\n indexInCollection);\n }\n else {\n const indexInCollection = pinnedColumns.indexOf(col);\n vIndex = this.grid.isPinningToStart ?\n indexInCollection :\n unpinnedColumns.length + indexInCollection;\n }\n this._vIndex = vIndex;\n return vIndex;\n }\n /**\n * Returns a boolean indicating if the column is a `ColumnGroup`.\n * ```typescript\n * let columnGroup = this.column.columnGroup;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get columnGroup() {\n return false;\n }\n /**\n * Returns a boolean indicating if the column is a `ColumnLayout` for multi-row layout.\n * ```typescript\n * let columnGroup = this.column.columnGroup;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get columnLayout() {\n return false;\n }\n /**\n * Returns a boolean indicating if the column is a child of a `ColumnLayout` for multi-row layout.\n * ```typescript\n * let columnLayoutChild = this.column.columnLayoutChild;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get columnLayoutChild() {\n return this.parent && this.parent.columnLayout;\n }\n /**\n * Returns the children columns collection.\n * Returns an empty array if the column does not contain children columns.\n * ```typescript\n * let childrenColumns = this.column.allChildren;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get allChildren() {\n return [];\n }\n /**\n * Returns the level of the column in a column group.\n * Returns `0` if the column doesn't have a `parent`.\n * ```typescript\n * let columnLevel = this.column.level;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get level() {\n let ptr = this.parent;\n let lvl = 0;\n while (ptr) {\n lvl++;\n ptr = ptr.parent;\n }\n return lvl;\n }\n get isLastPinned() {\n return this.grid.isPinningToStart &&\n this.grid.pinnedColumns[this.grid.pinnedColumns.length - 1] === this;\n }\n get isFirstPinned() {\n const pinnedCols = this.grid.pinnedColumns.filter(x => !x.columnGroup);\n return !this.grid.isPinningToStart && pinnedCols[0] === this;\n }\n get rightPinnedOffset() {\n return this.pinned && !this.grid.isPinningToStart ?\n -this.grid.pinnedWidth - this.grid.headerFeaturesWidth + 'px' :\n null;\n }\n get gridRowSpan() {\n return this.rowEnd && this.rowStart ? this.rowEnd - this.rowStart : 1;\n }\n get gridColumnSpan() {\n return this.colEnd && this.colStart ? this.colEnd - this.colStart : 1;\n }\n /**\n * Indicates whether the column will be visible when its parent is collapsed.\n * ```html\n * \n * \n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n set visibleWhenCollapsed(value) {\n this._visibleWhenCollapsed = value;\n this.visibleWhenCollapsedChange.emit(this._visibleWhenCollapsed);\n if (this.parent) {\n this.parent.setExpandCollapseState();\n }\n }\n get visibleWhenCollapsed() {\n return this._visibleWhenCollapsed;\n }\n /**\n * @remarks\n * Pass optional parameters for DatePipe and/or DecimalPipe to format the display value for date and numeric columns.\n * Accepts an `IColumnPipeArgs` object with any of the `format`, `timezone` and `digitsInfo` properties.\n * For more details see https://angular.io/api/common/DatePipe and https://angular.io/api/common/DecimalPipe\n * @example\n * ```typescript\n * const pipeArgs: IColumnPipeArgs = {\n * format: 'longDate',\n * timezone: 'UTC',\n * digitsInfo: '1.1-2'\n * }\n * ```\n * ```html\n * \n * \n * ```\n * @memberof IgxColumnComponent\n */\n set pipeArgs(value) {\n this._columnPipeArgs = Object.assign(this._columnPipeArgs, value);\n this.grid.summaryService.clearSummaryCache();\n this.grid.pipeTrigger++;\n }\n get pipeArgs() {\n return this._columnPipeArgs;\n }\n /**\n * @hidden\n * @internal\n */\n get collapsible() {\n return false;\n }\n set collapsible(_value) { }\n /**\n * @hidden\n * @internal\n */\n get expanded() {\n return true;\n }\n set expanded(_value) { }\n /**\n * Returns the filteringExpressionsTree of the column.\n * ```typescript\n * let tree = this.column.filteringExpressionsTree;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get filteringExpressionsTree() {\n return this.grid.filteringExpressionsTree.find(this.field);\n }\n /**\n * @hidden\n */\n get isPrimaryColumn() {\n return this.field !== undefined && this.grid !== undefined && this.field === this.grid.primaryKey;\n }\n constructor(grid, _validators, cdr, platform) {\n this.grid = grid;\n this._validators = _validators;\n this.cdr = cdr;\n this.platform = platform;\n /**\n * @hidden @internal\n */\n this.validators = [];\n /**\n * Sets/gets the `header` value.\n * ```typescript\n * let columnHeader = this.column.header;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.header = '';\n /**\n * Sets/gets the `title` value.\n * ```typescript\n * let title = this.column.title;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.title = '';\n /**\n * Sets/gets whether the column is sortable.\n * Default value is `false`.\n * ```typescript\n * let isSortable = this.column.sortable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.sortable = false;\n /**\n * Sets/gets whether the column is groupable.\n * Default value is `false`.\n * ```typescript\n * let isGroupable = this.column.groupable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.groupable = false;\n /**\n * Sets/gets whether the column is filterable.\n * Default value is `true`.\n * ```typescript\n * let isFilterable = this.column.filterable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.filterable = true;\n /**\n * Sets/gets whether the column is resizable.\n * Default value is `false`.\n * ```typescript\n * let isResizable = this.column.resizable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.resizable = false;\n /**\n * Sets/gets whether the column header is included in autosize logic.\n * Useful when template for a column header is sized based on parent, for example a default `div`.\n * Default value is `false`.\n * ```typescript\n * let isResizable = this.column.resizable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.autosizeHeader = true;\n /**\n * @hidden\n */\n this.hiddenChange = new EventEmitter();\n /** @hidden */\n this.expandedChange = new EventEmitter();\n /** @hidden */\n this.collapsibleChange = new EventEmitter();\n /** @hidden */\n this.visibleWhenCollapsedChange = new EventEmitter();\n /** @hidden */\n this.columnChange = new EventEmitter();\n /**\n * Gets whether the hiding is disabled.\n * ```typescript\n * let isHidingDisabled = this.column.disableHiding;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.disableHiding = false;\n /**\n * Gets whether the pinning is disabled.\n * ```typescript\n * let isPinningDisabled = this.column.disablePinning;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.disablePinning = false;\n /**\n * @deprecated in version 13.1.0. Use `IgxGridComponent.moving` instead.\n *\n * Sets/gets whether the column is movable.\n * Default value is `false`.\n *\n * ```typescript\n * let isMovable = this.column.movable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.movable = false;\n /**\n * Sets/gets the class selector of the column header.\n * ```typescript\n * let columnHeaderClass = this.column.headerClasses;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.headerClasses = '';\n /**\n * Sets conditional style properties on the column header.\n * Similar to `ngStyle` it accepts an object literal where the keys are\n * the style properties and the value is the expression to be evaluated.\n * ```typescript\n * styles = {\n * background: 'royalblue',\n * color: (column) => column.pinned ? 'red': 'inherit'\n * }\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.headerStyles = null;\n /**\n * Sets/gets the class selector of the column group header.\n * ```typescript\n * let columnHeaderClass = this.column.headerGroupClasses;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.headerGroupClasses = '';\n /**\n * Sets conditional style properties on the column header group wrapper.\n * Similar to `ngStyle` it accepts an object literal where the keys are\n * the style properties and the value is the expression to be evaluated.\n * ```typescript\n * styles = {\n * background: 'royalblue',\n * color: (column) => column.pinned ? 'red': 'inherit'\n * }\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.headerGroupStyles = null;\n /**\n * Sets conditional style properties on the column cells.\n * Similar to `ngStyle` it accepts an object literal where the keys are\n * the style properties and the value is the expression to be evaluated.\n * As with `cellClasses` it accepts a callback function.\n * ```typescript\n * styles = {\n * background: 'royalblue',\n * color: (rowData, columnKey, cellValue, rowIndex) => value.startsWith('Important') ? 'red': 'inherit'\n * }\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.cellStyles = null;\n /**\n * Sets/gets whether the column filtering should be case sensitive.\n * Default value is `true`.\n * ```typescript\n * let filteringIgnoreCase = this.column.filteringIgnoreCase;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.filteringIgnoreCase = true;\n /**\n * Sets/gets whether the column sorting should be case sensitive.\n * Default value is `true`.\n * ```typescript\n * let sortingIgnoreCase = this.column.sortingIgnoreCase;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.sortingIgnoreCase = true;\n /**\n * Sets/gets whether the column is `searchable`.\n * Default value is `true`.\n * ```typescript\n * let isSearchable = this.column.searchable';\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.searchable = true;\n /**\n * Sets/gets the data type of the column values.\n * Default value is `string`.\n * ```typescript\n * let columnDataType = this.column.dataType;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.dataType = GridColumnDataType.String;\n /**\n * @hidden\n */\n this.widthChange = new EventEmitter();\n /**\n * @hidden\n */\n this.pinnedChange = new EventEmitter();\n /**\n * @hidden\n * @internal\n */\n this.defaultTimeFormat = 'hh:mm:ss tt';\n /**\n * @hidden\n * @internal\n */\n this.defaultDateTimeFormat = 'dd/MM/yyyy HH:mm:ss tt';\n /**\n * Sets/gets the parent column.\n * ```typescript\n * let parentColumn = this.column.parent;\n * ```\n * ```typescript\n * this.column.parent = higherLevelColumn;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n this.parent = null;\n /**\n * @hidden\n */\n this.destroy$ = new Subject();\n /**\n * @hidden\n */\n this._applySelectableClass = false;\n this._vIndex = NaN;\n /**\n * @hidden\n */\n this._pinned = false;\n /**\n * @hidden\n */\n this._summaries = null;\n /**\n * @hidden\n */\n this._filters = null;\n /**\n * @hidden\n */\n this._sortStrategy = DefaultSortingStrategy.instance();\n /**\n * @hidden\n */\n this._hidden = false;\n /**\n * @hidden\n */\n this._disablePinning = false;\n /**\n * @hidden\n */\n this._defaultMinWidth = '';\n /**\n * @hidden\n */\n this._hasSummary = false;\n /**\n * @hidden\n */\n this._collapsible = false;\n /**\n * @hidden\n */\n this._expanded = true;\n /**\n * @hidden\n */\n this._selectable = true;\n this._calcWidth = null;\n this._columnPipeArgs = { digitsInfo: DEFAULT_DIGITS_INFO };\n this.validators = _validators;\n }\n /**\n * @hidden\n * @internal\n */\n resetCaches() {\n this._vIndex = NaN;\n if (this.grid) {\n this.cacheCalcWidth();\n }\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n if (this.summaryTemplateDirective) {\n this._summaryTemplate = this.summaryTemplateDirective.template;\n }\n if (this.cellTemplate) {\n this._bodyTemplate = this.cellTemplate.template;\n }\n if (this.cellValidationErrorTemplate) {\n this._errorTemplate = this.cellValidationErrorTemplate.template;\n }\n if (this.headTemplate && this.headTemplate.length) {\n this._headerTemplate = this.headTemplate.toArray()[0].template;\n }\n if (this.editorTemplate) {\n this._inlineEditorTemplate = this.editorTemplate.template;\n }\n if (this.filterCellTemplateDirective) {\n this._filterCellTemplate = this.filterCellTemplateDirective.template;\n }\n if (!this._columnPipeArgs.format) {\n this._columnPipeArgs.format = this.dataType === GridColumnDataType.Time ?\n DEFAULT_TIME_FORMAT$1 : this.dataType === GridColumnDataType.DateTime ?\n DEFAULT_DATE_TIME_FORMAT$1 : DEFAULT_DATE_FORMAT;\n }\n if (!this.summaries) {\n switch (this.dataType) {\n case GridColumnDataType.Number:\n case GridColumnDataType.Currency:\n case GridColumnDataType.Percent:\n this.summaries = IgxNumberSummaryOperand;\n break;\n case GridColumnDataType.Date:\n case GridColumnDataType.DateTime:\n this.summaries = IgxDateSummaryOperand;\n break;\n case GridColumnDataType.Time:\n this.summaries = IgxTimeSummaryOperand;\n break;\n case GridColumnDataType.String:\n case GridColumnDataType.Boolean:\n default:\n this.summaries = IgxSummaryOperand;\n break;\n }\n }\n if (!this.filters) {\n switch (this.dataType) {\n case GridColumnDataType.Boolean:\n this.filters = IgxBooleanFilteringOperand.instance();\n break;\n case GridColumnDataType.Number:\n case GridColumnDataType.Currency:\n case GridColumnDataType.Percent:\n this.filters = IgxNumberFilteringOperand.instance();\n break;\n case GridColumnDataType.Date:\n this.filters = IgxDateFilteringOperand.instance();\n break;\n case GridColumnDataType.Time:\n this.filters = IgxTimeFilteringOperand.instance();\n break;\n case GridColumnDataType.DateTime:\n this.filters = IgxDateTimeFilteringOperand.instance();\n break;\n case GridColumnDataType.Image:\n this.filterable = false;\n break;\n case GridColumnDataType.String:\n default:\n this.filters = IgxStringFilteringOperand.instance();\n break;\n }\n }\n }\n /**\n * @hidden\n */\n getGridTemplate(isRow) {\n if (isRow) {\n const rowsCount = !this.grid.isPivot ? this.grid.multiRowLayoutRowSize : this.children.length - 1;\n return `repeat(${rowsCount},1fr)`;\n }\n else {\n return this.getColumnSizesString(this.children);\n }\n }\n getInitialChildColumnSizes(children) {\n const columnSizes = [];\n // find the smallest col spans\n children.forEach(col => {\n if (!col.colStart) {\n return;\n }\n const newWidthSet = col.widthSetByUser && columnSizes[col.colStart - 1] && !columnSizes[col.colStart - 1].widthSetByUser;\n const newSpanSmaller = columnSizes[col.colStart - 1] && columnSizes[col.colStart - 1].colSpan > col.gridColumnSpan;\n const bothWidthsSet = col.widthSetByUser && columnSizes[col.colStart - 1] && columnSizes[col.colStart - 1].widthSetByUser;\n const bothWidthsNotSet = !col.widthSetByUser && columnSizes[col.colStart - 1] && !columnSizes[col.colStart - 1].widthSetByUser;\n if (columnSizes[col.colStart - 1] === undefined) {\n // If nothing is defined yet take any column at first\n // We use colEnd to know where the column actually ends, because not always it starts where we have it set in columnSizes.\n columnSizes[col.colStart - 1] = {\n ref: col,\n width: col.width === 'fit-content' ? col.autoSize :\n col.widthSetByUser || this.grid.columnWidthSetByUser ? parseInt(col.calcWidth, 10) : null,\n colSpan: col.gridColumnSpan,\n colEnd: col.colStart + col.gridColumnSpan,\n widthSetByUser: col.widthSetByUser\n };\n }\n else if (newWidthSet || (newSpanSmaller && ((bothWidthsSet) || (bothWidthsNotSet)))) {\n // If a column is set already it should either not have width defined or have width with bigger span than the new one.\n /**\n * If replaced column has bigger span, we want to fill the remaining columns\n * that the replacing column does not fill with the old one.\n */\n if (bothWidthsSet && newSpanSmaller) {\n // Start from where the new column set would end and apply the old column to the rest depending on how much it spans.\n // We have not yet replaced it so we can use it directly from the columnSizes collection.\n // This is where colEnd is used because the colStart of the old column is not actually i + 1.\n for (let i = col.colStart - 1 + col.gridColumnSpan; i < columnSizes[col.colStart - 1].colEnd - 1; i++) {\n if (!columnSizes[i] || !columnSizes[i].widthSetByUser) {\n columnSizes[i] = columnSizes[col.colStart - 1];\n }\n else {\n break;\n }\n }\n }\n // Replace the old column with the new one.\n columnSizes[col.colStart - 1] = {\n ref: col,\n width: col.width === 'fit-content' ? col.autoSize :\n col.widthSetByUser || this.grid.columnWidthSetByUser ? parseInt(col.calcWidth, 10) : null,\n colSpan: col.gridColumnSpan,\n colEnd: col.colStart + col.gridColumnSpan,\n widthSetByUser: col.widthSetByUser\n };\n }\n else if (bothWidthsSet && columnSizes[col.colStart - 1].colSpan < col.gridColumnSpan) {\n // If the column already in the columnSizes has smaller span, we still need to fill any empty places with the current col.\n // Start from where the smaller column set would end and apply the bigger column to the rest depending on how much it spans.\n // Since here we do not have it in columnSizes we set it as a new column keeping the same colSpan.\n for (let i = col.colStart - 1 + columnSizes[col.colStart - 1].colSpan; i < col.colStart - 1 + col.gridColumnSpan; i++) {\n if (!columnSizes[i] || !columnSizes[i].widthSetByUser) {\n columnSizes[i] = {\n ref: col,\n width: col.width === 'fit-content' ? col.autoSize :\n col.widthSetByUser || this.grid.columnWidthSetByUser ? parseInt(col.calcWidth, 10) : null,\n colSpan: col.gridColumnSpan,\n colEnd: col.colStart + col.gridColumnSpan,\n widthSetByUser: col.widthSetByUser\n };\n }\n else {\n break;\n }\n }\n }\n });\n // Flatten columnSizes so there are not columns with colSpan > 1\n for (let i = 0; i < columnSizes.length; i++) {\n if (columnSizes[i] && columnSizes[i].colSpan > 1) {\n let j = 1;\n // Replace all empty places depending on how much the current column spans starting from next col.\n for (; j < columnSizes[i].colSpan && i + j + 1 < columnSizes[i].colEnd; j++) {\n if (columnSizes[i + j] &&\n ((!columnSizes[i].width && columnSizes[i + j].width) ||\n (!columnSizes[i].width && !columnSizes[i + j].width && columnSizes[i + j].colSpan <= columnSizes[i].colSpan) ||\n (!!columnSizes[i + j].width && columnSizes[i + j].colSpan <= columnSizes[i].colSpan))) {\n // If we reach an already defined column that has width and the current doesn't have or\n // if the reached column has bigger colSpan we stop.\n break;\n }\n else {\n const width = columnSizes[i].widthSetByUser ?\n columnSizes[i].width / columnSizes[i].colSpan :\n columnSizes[i].width;\n columnSizes[i + j] = {\n ref: columnSizes[i].ref,\n width,\n colSpan: 1,\n colEnd: columnSizes[i].colEnd,\n widthSetByUser: columnSizes[i].widthSetByUser\n };\n }\n }\n // Update the current column width so it is divided between all columns it spans and set it to 1.\n columnSizes[i].width = columnSizes[i].widthSetByUser ?\n columnSizes[i].width / columnSizes[i].colSpan :\n columnSizes[i].width;\n columnSizes[i].colSpan = 1;\n // Update the index based on how much we have replaced. Subtract 1 because we started from 1.\n i += j - 1;\n }\n }\n return columnSizes;\n }\n getFilledChildColumnSizes(children) {\n const columnSizes = this.getInitialChildColumnSizes(children);\n // fill the gaps if there are any\n const result = [];\n for (const size of columnSizes) {\n if (size && !!size.width) {\n result.push(size.width + 'px');\n }\n else {\n result.push(parseInt(this.grid.getPossibleColumnWidth(), 10) + 'px');\n }\n }\n return result;\n }\n getResizableColUnderEnd() {\n if (this.columnLayout || !this.columnLayoutChild || this.columnGroup) {\n return [{ target: this, spanUsed: 1 }];\n }\n const columnSized = this.getInitialChildColumnSizes(this.parent.children);\n const targets = [];\n const colEnd = this.colEnd ? this.colEnd : this.colStart + 1;\n for (let i = 0; i < columnSized.length; i++) {\n if (this.colStart <= i + 1 && i + 1 < colEnd) {\n targets.push({ target: columnSized[i].ref, spanUsed: 1 });\n }\n }\n const targetsSquashed = [];\n for (const target of targets) {\n if (targetsSquashed.length && targetsSquashed[targetsSquashed.length - 1].target.field === target.target.field) {\n targetsSquashed[targetsSquashed.length - 1].spanUsed++;\n }\n else {\n targetsSquashed.push(target);\n }\n }\n return targetsSquashed;\n }\n /**\n * Pins the column at the provided index in the pinned area.\n * Defaults to index `0` if not provided, or to the initial index in the pinned area.\n * Returns `true` if the column is successfully pinned. Returns `false` if the column cannot be pinned.\n * Column cannot be pinned if:\n * - Is already pinned\n * - index argument is out of range\n * - The pinned area exceeds 80% of the grid width\n * ```typescript\n * let success = this.column.pin();\n * ```\n *\n * @memberof IgxColumnComponent\n */\n pin(index) {\n // TODO: Probably should the return type of the old functions\n // should be moved as a event parameter.\n const grid = this.grid;\n if (this._pinned) {\n return false;\n }\n if (this.parent && !this.parent.pinned) {\n return this.topLevelParent.pin(index);\n }\n const hasIndex = index !== undefined;\n if (hasIndex && (index < 0 || index > grid.pinnedColumns.length)) {\n return false;\n }\n if (!this.parent && !this.pinnable) {\n return false;\n }\n const rootPinnedCols = grid._pinnedColumns.filter((c) => c.level === 0);\n index = hasIndex ? index : rootPinnedCols.length;\n const args = { column: this, insertAtIndex: index, isPinned: false, cancel: false };\n this.grid.columnPin.emit(args);\n if (args.cancel) {\n return;\n }\n this.grid.crudService.endEdit(false);\n this._pinned = true;\n this.pinnedChange.emit(this._pinned);\n // it is possible that index is the last position, so will need to find target column by [index-1]\n const targetColumn = args.insertAtIndex === grid._pinnedColumns.length ?\n grid._pinnedColumns[args.insertAtIndex - 1] : grid._pinnedColumns[args.insertAtIndex];\n if (grid._pinnedColumns.indexOf(this) === -1) {\n if (!grid.hasColumnGroups) {\n grid._pinnedColumns.splice(args.insertAtIndex, 0, this);\n }\n else {\n // insert based only on root collection\n rootPinnedCols.splice(args.insertAtIndex, 0, this);\n let allPinned = [];\n // re-create hierarchy\n rootPinnedCols.forEach(group => {\n allPinned.push(group);\n allPinned = allPinned.concat(group.allChildren);\n });\n grid._pinnedColumns = allPinned;\n }\n if (grid._unpinnedColumns.indexOf(this) !== -1) {\n const childrenCount = this.allChildren.length;\n grid._unpinnedColumns.splice(grid._unpinnedColumns.indexOf(this), 1 + childrenCount);\n }\n }\n if (hasIndex) {\n grid._moveColumns(this, targetColumn);\n }\n if (this.columnGroup) {\n this.allChildren.forEach(child => child.pin());\n grid.reinitPinStates();\n }\n grid.resetCaches();\n grid.notifyChanges();\n if (this.columnLayoutChild) {\n this.grid.columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());\n }\n this.grid.filteringService.refreshExpressions();\n const eventArgs = { column: this, insertAtIndex: index, isPinned: true };\n this.grid.columnPinned.emit(eventArgs);\n return true;\n }\n /**\n * Unpins the column and place it at the provided index in the unpinned area.\n * Defaults to index `0` if not provided, or to the initial index in the unpinned area.\n * Returns `true` if the column is successfully unpinned. Returns `false` if the column cannot be unpinned.\n * Column cannot be unpinned if:\n * - Is already unpinned\n * - index argument is out of range\n * ```typescript\n * let success = this.column.unpin();\n * ```\n *\n * @memberof IgxColumnComponent\n */\n unpin(index) {\n const grid = this.grid;\n if (!this._pinned) {\n return false;\n }\n if (this.parent && this.parent.pinned) {\n return this.topLevelParent.unpin(index);\n }\n const hasIndex = index !== undefined;\n if (hasIndex && (index < 0 || index > grid._unpinnedColumns.length)) {\n return false;\n }\n // estimate the exact index at which column will be inserted\n // takes into account initial unpinned index of the column\n if (!hasIndex) {\n const indices = grid.unpinnedColumns.map(col => col.index);\n indices.push(this.index);\n indices.sort((a, b) => a - b);\n index = indices.indexOf(this.index);\n }\n const args = { column: this, insertAtIndex: index, isPinned: true, cancel: false };\n this.grid.columnPin.emit(args);\n if (args.cancel) {\n return;\n }\n this.grid.crudService.endEdit(false);\n this._pinned = false;\n this.pinnedChange.emit(this._pinned);\n // it is possible that index is the last position, so will need to find target column by [index-1]\n const targetColumn = args.insertAtIndex === grid._unpinnedColumns.length ?\n grid._unpinnedColumns[args.insertAtIndex - 1] : grid._unpinnedColumns[args.insertAtIndex];\n if (!hasIndex) {\n grid._unpinnedColumns.splice(index, 0, this);\n if (grid._pinnedColumns.indexOf(this) !== -1) {\n grid._pinnedColumns.splice(grid._pinnedColumns.indexOf(this), 1);\n }\n }\n if (hasIndex) {\n grid.moveColumn(this, targetColumn);\n }\n if (this.columnGroup) {\n this.allChildren.forEach(child => child.unpin());\n }\n grid.reinitPinStates();\n grid.resetCaches();\n grid.notifyChanges();\n if (this.columnLayoutChild) {\n this.grid.columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());\n }\n this.grid.filteringService.refreshExpressions();\n this.grid.columnPinned.emit({ column: this, insertAtIndex: index, isPinned: false });\n return true;\n }\n /**\n * Moves a column to the specified visible index.\n * If passed index is invalid, or if column would receive a different visible index after moving, moving is not performed.\n * If passed index would move the column to a different column group. moving is not performed.\n *\n * @example\n * ```typescript\n * column.move(index);\n * ```\n * @memberof IgxColumnComponent\n */\n move(index) {\n let target;\n let columns = this.grid.columns.filter(c => c.visibleIndex > -1);\n // grid last visible index\n const li = columns.map(c => c.visibleIndex).reduce((a, b) => Math.max(a, b));\n const parent = this.parent;\n const isPreceding = this.visibleIndex < index;\n if (index === this.visibleIndex || index < 0 || index > li) {\n return;\n }\n if (parent) {\n columns = columns.filter(c => c.level >= this.level && c !== this && c.parent !== this &&\n c.topLevelParent === this.topLevelParent);\n }\n /* eslint-disable max-len */\n // If isPreceding, find a target such that when the current column is placed after it, current colummn will receive a visibleIndex === index. This takes into account visible children of the columns.\n // If !isPreceding, finds a column of the same level and visible index that equals the passed index agument (c.visibleIndex === index). No need to consider the children here.\n /* eslint-enable max-len */\n if (isPreceding) {\n columns = columns.filter(c => c.visibleIndex > this.visibleIndex);\n target = columns.find(c => c.level === this.level && c.visibleIndex + c.calcChildren() - this.calcChildren() === index);\n }\n else {\n columns = columns.filter(c => c.visibleIndex < this.visibleIndex);\n target = columns.find(c => c.level === this.level && c.visibleIndex === index);\n }\n if (!target || (target.pinned && this.disablePinning)) {\n return;\n }\n const pos = isPreceding ? DropPosition.AfterDropTarget : DropPosition.BeforeDropTarget;\n this.grid.moveColumn(this, target, pos);\n }\n /**\n * No children for the column, so will returns 1 or 0, if the column is hidden.\n *\n * @hidden\n */\n calcChildren() {\n const children = this.hidden ? 0 : 1;\n return children;\n }\n /**\n * Toggles column vibisility and emits the respective event.\n *\n * @hidden\n */\n toggleVisibility(value) {\n const newValue = value ?? !this.hidden;\n const eventArgs = { column: this, newValue, cancel: false };\n this.grid.columnVisibilityChanging.emit(eventArgs);\n if (eventArgs.cancel) {\n return;\n }\n this.hidden = newValue;\n this.grid.columnVisibilityChanged.emit({ column: this, newValue });\n }\n /**\n * Returns a reference to the top level parent column.\n * ```typescript\n * let topLevelParent = this.column.topLevelParent;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get topLevelParent() {\n let parent = this.parent;\n while (parent && parent.parent) {\n parent = parent.parent;\n }\n return parent;\n }\n /**\n * Returns a reference to the header of the column.\n * ```typescript\n * let column = this.grid.columnList.filter(c => c.field === 'ID')[0];\n * let headerCell = column.headerCell;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get headerCell() {\n return this.grid.headerCellList.find((header) => header.column === this);\n }\n /**\n * Returns a reference to the filter cell of the column.\n * ```typescript\n * let column = this.grid.columnList.filter(c => c.field === 'ID')[0];\n * let filterell = column.filterell;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get filterCell() {\n return this.grid.filterCellList.find((filterCell) => filterCell.column === this);\n }\n /**\n * Returns a reference to the header group of the column.\n *\n * @memberof IgxColumnComponent\n */\n get headerGroup() {\n return this.grid.headerGroupsList.find(group => group.column === this);\n }\n /**\n * Autosize the column to the longest currently visible cell value, including the header cell.\n * ```typescript\n * @ViewChild('grid') grid: IgxGridComponent;\n * let column = this.grid.columnList.filter(c => c.field === 'ID')[0];\n * column.autosize();\n * ```\n *\n * @memberof IgxColumnComponent\n * @param byHeaderOnly Set if column should be autosized based only on the header content.\n */\n autosize(byHeaderOnly = false) {\n if (!this.columnGroup) {\n this.width = this.getAutoSize(byHeaderOnly);\n this.grid.reflow();\n }\n }\n /**\n * @hidden\n */\n getAutoSize(byHeader = false) {\n const size = !byHeader ? this.getLargestCellWidth() :\n (Object.values(this.getHeaderCellWidths()).reduce((a, b) => a + b) + 'px');\n const isPercentageWidth = this.width && typeof this.width === 'string' && this.width.indexOf('%') !== -1;\n let newWidth;\n if (isPercentageWidth) {\n const gridAvailableSize = this.grid.calcWidth;\n const percentageSize = parseFloat(size) / gridAvailableSize * 100;\n newWidth = percentageSize + '%';\n }\n else {\n newWidth = size;\n }\n const maxWidth = isPercentageWidth ? this.maxWidthPercent : this.maxWidthPx;\n const minWidth = isPercentageWidth ? this.minWidthPercent : this.minWidthPx;\n if (this.maxWidth && (parseFloat(newWidth) > maxWidth)) {\n newWidth = isPercentageWidth ? maxWidth + '%' : maxWidth + 'px';\n }\n else if (parseFloat(newWidth) < minWidth) {\n newWidth = isPercentageWidth ? minWidth + '%' : minWidth + 'px';\n }\n return newWidth;\n }\n /**\n * @hidden\n */\n getCalcWidth() {\n if (this._calcWidth && !isNaN(this.calcPixelWidth)) {\n return this._calcWidth;\n }\n this.cacheCalcWidth();\n return this._calcWidth;\n }\n /**\n * @hidden\n * Returns the width and padding of a header cell.\n */\n getHeaderCellWidths() {\n return this.grid.getHeaderCellWidth(this.headerCell.nativeElement);\n }\n /**\n * @hidden\n * Returns the size (in pixels) of the longest currently visible cell, including the header cell.\n * ```typescript\n * @ViewChild('grid') grid: IgxGridComponent;\n *\n * let column = this.grid.columnList.filter(c => c.field === 'ID')[0];\n * let size = column.getLargestCellWidth();\n * ```\n * @memberof IgxColumnComponent\n */\n getLargestCellWidth() {\n const range = this.grid.document.createRange();\n const largest = new Map();\n if (this._cells.length > 0) {\n const cellsContentWidths = [];\n this._cells.forEach((cell) => cellsContentWidths.push(cell.calculateSizeToFit(range)));\n const index = cellsContentWidths.indexOf(Math.max(...cellsContentWidths));\n const cellStyle = this.grid.document.defaultView.getComputedStyle(this._cells[index].nativeElement);\n const cellPadding = parseFloat(cellStyle.paddingLeft) + parseFloat(cellStyle.paddingRight) +\n parseFloat(cellStyle.borderLeftWidth) + parseFloat(cellStyle.borderRightWidth);\n largest.set(Math.max(...cellsContentWidths), cellPadding);\n }\n if (this.headerCell && this.autosizeHeader) {\n const headerCellWidths = this.getHeaderCellWidths();\n largest.set(headerCellWidths.width, headerCellWidths.padding);\n }\n const largestCell = Math.max(...Array.from(largest.keys()));\n const width = Math.ceil(largestCell + largest.get(largestCell));\n if (Number.isNaN(width)) {\n return this.width;\n }\n else {\n return width + 'px';\n }\n }\n /**\n * @hidden\n */\n getCellWidth() {\n const colWidth = this.width;\n const isPercentageWidth = colWidth && typeof colWidth === 'string' && colWidth.indexOf('%') !== -1;\n if (this.columnLayoutChild) {\n return '';\n }\n if (colWidth && !isPercentageWidth) {\n let cellWidth = colWidth;\n if (typeof cellWidth !== 'string' || cellWidth.endsWith('px') === false) {\n cellWidth += 'px';\n }\n return cellWidth;\n }\n else {\n return colWidth;\n }\n }\n /**\n * @hidden\n */\n populateVisibleIndexes() { }\n getColumnSizesString(children) {\n const res = this.getFilledChildColumnSizes(children);\n return res.join(' ');\n }\n /**\n * @hidden\n * @internal\n */\n cacheCalcWidth() {\n const colWidth = this.width;\n const isPercentageWidth = colWidth && typeof colWidth === 'string' && colWidth.indexOf('%') !== -1;\n const isAutoWidth = colWidth && typeof colWidth === 'string' && colWidth === 'fit-content';\n if (isPercentageWidth) {\n this._calcWidth = parseFloat(colWidth) / 100 * this.grid.calcWidth;\n }\n else if (!colWidth || isAutoWidth && !this.autoSize) {\n // no width\n this._calcWidth = this.defaultWidth || this.grid.getPossibleColumnWidth();\n }\n else {\n this._calcWidth = this.width;\n }\n this.calcPixelWidth = parseFloat(this._calcWidth);\n }\n /**\n * @hidden\n * @internal\n */\n setExpandCollapseState() {\n this.children.filter(col => (col.visibleWhenCollapsed !== undefined)).forEach(c => {\n if (!this.collapsible) {\n c.hidden = this.hidden;\n return;\n }\n c.hidden = this._expanded ? c.visibleWhenCollapsed : !c.visibleWhenCollapsed;\n });\n }\n /**\n * @hidden\n * @internal\n */\n checkCollapsibleState() {\n if (!this.children) {\n return false;\n }\n const cols = this.children.map(child => child.visibleWhenCollapsed);\n return (cols.some(c => c === true) && cols.some(c => c === false));\n }\n /**\n * @hidden\n */\n get pinnable() {\n return this.grid._init || !this.pinned;\n }\n /**\n * @hidden\n */\n get applySelectableClass() {\n return this._applySelectableClass;\n }\n /**\n * @hidden\n */\n set applySelectableClass(value) {\n if (this.selectable) {\n this._applySelectableClass = value;\n }\n }\n}\nIgxColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnComponent, deps: [{ token: IGX_GRID_BASE }, { token: NG_VALIDATORS, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxColumnComponent, selector: \"igx-column\", inputs: { field: \"field\", header: \"header\", title: \"title\", sortable: \"sortable\", selectable: \"selectable\", groupable: \"groupable\", editable: \"editable\", filterable: \"filterable\", resizable: \"resizable\", autosizeHeader: \"autosizeHeader\", hasSummary: \"hasSummary\", hidden: \"hidden\", disableHiding: \"disableHiding\", disablePinning: \"disablePinning\", movable: \"movable\", width: \"width\", maxWidth: \"maxWidth\", headerClasses: \"headerClasses\", headerStyles: \"headerStyles\", headerGroupClasses: \"headerGroupClasses\", headerGroupStyles: \"headerGroupStyles\", cellClasses: \"cellClasses\", cellStyles: \"cellStyles\", formatter: \"formatter\", summaryFormatter: \"summaryFormatter\", filteringIgnoreCase: \"filteringIgnoreCase\", sortingIgnoreCase: \"sortingIgnoreCase\", searchable: \"searchable\", dataType: \"dataType\", collapsibleIndicatorTemplate: \"collapsibleIndicatorTemplate\", rowEnd: \"rowEnd\", colEnd: \"colEnd\", rowStart: \"rowStart\", colStart: \"colStart\", additionalTemplateContext: \"additionalTemplateContext\", minWidth: \"minWidth\", pinned: \"pinned\", summaries: \"summaries\", filters: \"filters\", sortStrategy: \"sortStrategy\", groupingComparer: \"groupingComparer\", summaryTemplate: \"summaryTemplate\", bodyTemplate: [\"cellTemplate\", \"bodyTemplate\"], headerTemplate: \"headerTemplate\", inlineEditorTemplate: [\"cellEditorTemplate\", \"inlineEditorTemplate\"], errorTemplate: \"errorTemplate\", filterCellTemplate: \"filterCellTemplate\", visibleWhenCollapsed: \"visibleWhenCollapsed\", pipeArgs: \"pipeArgs\" }, outputs: { hiddenChange: \"hiddenChange\", expandedChange: \"expandedChange\", collapsibleChange: \"collapsibleChange\", visibleWhenCollapsedChange: \"visibleWhenCollapsedChange\", columnChange: \"columnChange\", widthChange: \"widthChange\", pinnedChange: \"pinnedChange\" }, queries: [{ propertyName: \"filterCellTemplateDirective\", first: true, predicate: IgxFilterCellTemplateDirective, descendants: true, read: IgxFilterCellTemplateDirective }, { propertyName: \"summaryTemplateDirective\", first: true, predicate: IgxSummaryTemplateDirective, descendants: true, read: IgxSummaryTemplateDirective }, { propertyName: \"cellTemplate\", first: true, predicate: IgxCellTemplateDirective, descendants: true, read: IgxCellTemplateDirective }, { propertyName: \"cellValidationErrorTemplate\", first: true, predicate: IgxCellValidationErrorDirective, descendants: true, read: IgxCellValidationErrorDirective }, { propertyName: \"editorTemplate\", first: true, predicate: IgxCellEditorTemplateDirective, descendants: true, read: IgxCellEditorTemplateDirective }, { propertyName: \"collapseIndicatorTemplate\", first: true, predicate: IgxCollapsibleIndicatorTemplateDirective, descendants: true, read: IgxCollapsibleIndicatorTemplateDirective }, { propertyName: \"headTemplate\", predicate: IgxCellHeaderTemplateDirective, read: IgxCellHeaderTemplateDirective }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"header\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"title\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"sortable\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"selectable\", null);\n__decorate([\n notifyChanges(true),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"groupable\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"editable\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"filterable\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"resizable\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"autosizeHeader\", void 0);\n__decorate([\n notifyChanges(true),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"hasSummary\", null);\n__decorate([\n notifyChanges(true),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"hidden\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"disableHiding\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"disablePinning\", void 0);\n__decorate([\n notifyChanges(true),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"width\", null);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"maxWidth\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"headerClasses\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"headerStyles\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"headerGroupClasses\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"headerGroupStyles\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"cellClasses\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"cellStyles\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"formatter\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"summaryFormatter\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"filteringIgnoreCase\", void 0);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"sortingIgnoreCase\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"searchable\", void 0);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"minWidth\", null);\n__decorate([\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"pinned\", null);\n__decorate([\n notifyChanges(true),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"summaries\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"summaryTemplate\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"bodyTemplate\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"headerTemplate\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"inlineEditorTemplate\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"errorTemplate\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"filterCellTemplate\", null);\n__decorate([\n notifyChanges(true)\n], IgxColumnComponent.prototype, \"visibleWhenCollapsed\", null);\n__decorate([\n notifyChanges(),\n WatchColumnChanges()\n], IgxColumnComponent.prototype, \"pipeArgs\", null);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnComponent, decorators: [{\n type: Component,\n args: [{\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'igx-column',\n template: ``\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: i0.ChangeDetectorRef }, { type: PlatformUtil }]; }, propDecorators: { field: [{\n type: Input\n }], header: [{\n type: Input\n }], title: [{\n type: Input\n }], sortable: [{\n type: Input\n }], selectable: [{\n type: Input\n }], groupable: [{\n type: Input\n }], editable: [{\n type: Input\n }], filterable: [{\n type: Input\n }], resizable: [{\n type: Input\n }], autosizeHeader: [{\n type: Input\n }], hasSummary: [{\n type: Input\n }], hidden: [{\n type: Input\n }], hiddenChange: [{\n type: Output\n }], expandedChange: [{\n type: Output\n }], collapsibleChange: [{\n type: Output\n }], visibleWhenCollapsedChange: [{\n type: Output\n }], columnChange: [{\n type: Output\n }], disableHiding: [{\n type: Input\n }], disablePinning: [{\n type: Input\n }], movable: [{\n type: Input\n }], width: [{\n type: Input\n }], maxWidth: [{\n type: Input\n }], headerClasses: [{\n type: Input\n }], headerStyles: [{\n type: Input\n }], headerGroupClasses: [{\n type: Input\n }], headerGroupStyles: [{\n type: Input\n }], cellClasses: [{\n type: Input\n }], cellStyles: [{\n type: Input\n }], formatter: [{\n type: Input\n }], summaryFormatter: [{\n type: Input\n }], filteringIgnoreCase: [{\n type: Input\n }], sortingIgnoreCase: [{\n type: Input\n }], searchable: [{\n type: Input\n }], dataType: [{\n type: Input\n }], collapsibleIndicatorTemplate: [{\n type: Input\n }], rowEnd: [{\n type: Input\n }], colEnd: [{\n type: Input\n }], rowStart: [{\n type: Input\n }], colStart: [{\n type: Input\n }], additionalTemplateContext: [{\n type: Input\n }], widthChange: [{\n type: Output\n }], pinnedChange: [{\n type: Output\n }], filterCellTemplateDirective: [{\n type: ContentChild,\n args: [IgxFilterCellTemplateDirective, { read: IgxFilterCellTemplateDirective }]\n }], summaryTemplateDirective: [{\n type: ContentChild,\n args: [IgxSummaryTemplateDirective, { read: IgxSummaryTemplateDirective }]\n }], cellTemplate: [{\n type: ContentChild,\n args: [IgxCellTemplateDirective, { read: IgxCellTemplateDirective }]\n }], cellValidationErrorTemplate: [{\n type: ContentChild,\n args: [IgxCellValidationErrorDirective, { read: IgxCellValidationErrorDirective }]\n }], headTemplate: [{\n type: ContentChildren,\n args: [IgxCellHeaderTemplateDirective, { read: IgxCellHeaderTemplateDirective, descendants: false }]\n }], editorTemplate: [{\n type: ContentChild,\n args: [IgxCellEditorTemplateDirective, { read: IgxCellEditorTemplateDirective }]\n }], collapseIndicatorTemplate: [{\n type: ContentChild,\n args: [IgxCollapsibleIndicatorTemplateDirective, { read: IgxCollapsibleIndicatorTemplateDirective, static: false }]\n }], minWidth: [{\n type: Input\n }], pinned: [{\n type: Input\n }], summaries: [{\n type: Input\n }], filters: [{\n type: Input\n }], sortStrategy: [{\n type: Input\n }], groupingComparer: [{\n type: Input\n }], summaryTemplate: [{\n type: Input\n }], bodyTemplate: [{\n type: Input,\n args: ['cellTemplate']\n }], headerTemplate: [{\n type: Input\n }], inlineEditorTemplate: [{\n type: Input,\n args: ['cellEditorTemplate']\n }], errorTemplate: [{\n type: Input,\n args: ['errorTemplate']\n }], filterCellTemplate: [{\n type: Input,\n args: ['filterCellTemplate']\n }], visibleWhenCollapsed: [{\n type: Input\n }], pipeArgs: [{\n type: Input\n }] } });\n\n/**\n * The `` is a container intended for row items in\n * a `` container.\n */\nclass IgxSelectGroupComponent extends IgxDropDownGroupComponent {\n}\nIgxSelectGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxSelectGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSelectGroupComponent, selector: \"igx-select-item-group\", usesInheritance: true, ngImport: i0, template: `\n \n \n `, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectGroupComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'igx-select-item-group',\n template: `\n \n \n `\n }]\n }] });\n\n/** @hidden */\nclass IgxSelectModule {\n}\nIgxSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectModule, declarations: [IgxSelectComponent,\n IgxSelectFooterDirective,\n IgxSelectGroupComponent,\n IgxSelectHeaderDirective,\n IgxSelectItemComponent,\n IgxSelectItemNavigationDirective,\n IgxSelectToggleIconDirective], imports: [CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxDropDownModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxRippleModule,\n IgxToggleModule,\n ReactiveFormsModule], exports: [IgxSelectComponent,\n IgxSelectFooterDirective,\n IgxSelectGroupComponent,\n IgxSelectHeaderDirective,\n IgxSelectItemComponent,\n IgxSelectItemNavigationDirective,\n IgxSelectToggleIconDirective,\n IgxInputGroupModule] });\nIgxSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectModule, imports: [CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxDropDownModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxRippleModule,\n IgxToggleModule,\n ReactiveFormsModule, IgxInputGroupModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSelectModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxSelectComponent,\n IgxSelectFooterDirective,\n IgxSelectGroupComponent,\n IgxSelectHeaderDirective,\n IgxSelectItemComponent,\n IgxSelectItemNavigationDirective,\n IgxSelectToggleIconDirective\n ],\n exports: [\n IgxSelectComponent,\n IgxSelectFooterDirective,\n IgxSelectGroupComponent,\n IgxSelectHeaderDirective,\n IgxSelectItemComponent,\n IgxSelectItemNavigationDirective,\n IgxSelectToggleIconDirective,\n IgxInputGroupModule\n ],\n imports: [\n CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxDropDownModule,\n IgxIconModule,\n IgxInputGroupModule,\n IgxRippleModule,\n IgxToggleModule,\n ReactiveFormsModule\n ],\n providers: []\n }]\n }] });\n\nclass IgxColumnGroupComponent extends IgxColumnComponent {\n constructor() {\n super(...arguments);\n this.children = new QueryList();\n /**\n * Sets/gets whether the column group is `searchable`.\n * Default value is `true`.\n * ```typescript\n * let isSearchable = this.columnGroup.searchable;\n * ```\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n this.searchable = true;\n }\n /**\n * Set if the column group is collapsible.\n * Default value is `false`\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n set collapsible(value) {\n this._collapsible = value;\n this.collapsibleChange.emit(this._collapsible);\n if (this.children && !this.hidden) {\n if (this._collapsible) {\n this.setExpandCollapseState();\n }\n else {\n this.children.forEach(child => child.hidden = false);\n }\n }\n }\n get collapsible() {\n return this._collapsible && this.checkCollapsibleState();\n }\n /**\n * Set whether the group is expanded or collapsed initially.\n * Applied only if the collapsible property is set to `true`\n * Default value is `true`\n * ```html\n * const state = false\n * \n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n set expanded(value) {\n this._expanded = value;\n this.expandedChange.emit(this._expanded);\n if (!this.collapsible) {\n return;\n }\n if (!this.hidden && this.children) {\n this.setExpandCollapseState();\n }\n }\n get expanded() {\n return this._expanded;\n }\n /**\n * Gets the column group `summaries`.\n * ```typescript\n * let columnGroupSummaries = this.columnGroup.summaries;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get summaries() {\n return this._summaries;\n }\n /**\n * Sets the column group `summaries`.\n * ```typescript\n * this.columnGroup.summaries = IgxNumberSummaryOperand;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n set summaries(classRef) { }\n /**\n * Gets the column group `filters`.\n * ```typescript\n * let columnGroupFilters = this.columnGroup.filters;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get filters() {\n return this._filters;\n }\n /**\n * Sets the column group `filters`.\n * ```typescript\n * this.columnGroup.filters = IgxStringFilteringOperand;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n set filters(classRef) { }\n /**\n * Returns if the column group is selectable\n * ```typescript\n * let columnGroupSelectable = this.columnGroup.selectable;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get selectable() {\n return this.children && this.children.some(child => child.selectable);\n }\n set selectable(value) { }\n /**\n * Returns a reference to the body template.\n * ```typescript\n * let bodyTemplate = this.columnGroup.bodyTemplate;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get bodyTemplate() {\n return this._bodyTemplate;\n }\n /**\n * @hidden\n */\n set bodyTemplate(template) { }\n /**\n * Returns a reference to the inline editor template.\n * ```typescript\n * let inlineEditorTemplate = this.columnGroup.inlineEditorTemplate;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get inlineEditorTemplate() {\n return this._inlineEditorTemplate;\n }\n /**\n * @hidden\n */\n set inlineEditorTemplate(template) { }\n /**\n * Will return empty array. Use this.children.toArray()[index].cells to get the cells for a column that is part of the column group.\n * ```typescript\n * let columnCells = this.columnGroup.cells;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get cells() {\n return [];\n }\n /**\n * Gets whether the column group is hidden.\n * ```typescript\n * let isHidden = this.columnGroup.hidden;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get hidden() {\n return this.allChildren.every(c => c.hidden);\n }\n /**\n * Sets the column group hidden property.\n * ```html\n * \n * ```\n *\n * Two-way data binding\n * ```html\n * \n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n set hidden(value) {\n this._hidden = value;\n this.hiddenChange.emit(this._hidden);\n if (this._hidden || !this.collapsible) {\n this.children.forEach(child => child.hidden = this._hidden);\n }\n else {\n this.children.forEach(c => {\n if (c.visibleWhenCollapsed === undefined) {\n c.hidden = false;\n return;\n }\n c.hidden = this.expanded ? c.visibleWhenCollapsed : !c.visibleWhenCollapsed;\n });\n }\n }\n /**\n * Returns if the column group is selected.\n * ```typescript\n * let isSelected = this.columnGroup.selected;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get selected() {\n const selectableChildren = this.allChildren.filter(c => !c.columnGroup && c.selectable && !c.hidden);\n return selectableChildren.length > 0 && selectableChildren.every(c => c.selected);\n }\n /**\n * Select/deselect the column group.\n * ```typescript\n * this.columnGroup.selected = true;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n set selected(value) {\n if (this.selectable) {\n this.children.forEach(c => {\n c.selected = value;\n });\n }\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n /*\n @ContentChildren with descendants still returns the `parent`\n component in the query list.\n */\n if (this.headTemplate && this.headTemplate.length) {\n this._headerTemplate = this.headTemplate.toArray()[0].template;\n }\n if (this.collapseIndicatorTemplate) {\n this.collapsibleIndicatorTemplate = this.collapseIndicatorTemplate.template;\n }\n // currently only ivy fixes the issue, we have to slice only if the first child is group\n if (this.children.first === this) {\n this.children.reset(this.children.toArray().slice(1));\n }\n this.children.forEach(child => {\n child.parent = this;\n });\n if (this.collapsible) {\n this.setExpandCollapseState();\n }\n this.children.changes\n .pipe(takeUntil(this.destroy$))\n .subscribe((change) => {\n change.forEach(x => x.parent = this);\n if (this.collapsible) {\n this.setExpandCollapseState();\n }\n });\n }\n /**\n * Returns the children columns collection.\n * ```typescript\n * let columns = this.columnGroup.allChildren;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get allChildren() {\n return flatten$1(this.children.toArray());\n }\n /**\n * Returns a boolean indicating if the column is a `ColumnGroup`.\n * ```typescript\n * let isColumnGroup = this.columnGroup.columnGroup\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get columnGroup() {\n return true;\n }\n /**\n * Returns a boolean indicating if the column is a `ColumnLayout` for multi-row layout.\n * ```typescript\n * let columnGroup = this.column.columnGroup;\n * ```\n *\n * @memberof IgxColumnComponent\n */\n get columnLayout() {\n return false;\n }\n /**\n * Gets the width of the column group.\n * ```typescript\n * let columnGroupWidth = this.columnGroup.width;\n * ```\n *\n * @memberof IgxColumnGroupComponent\n */\n get width() {\n const width = `${this.children.reduce((acc, val) => {\n if (val.hidden) {\n return acc;\n }\n return acc + parseInt(val.calcWidth, 10);\n }, 0)}`;\n return width + 'px';\n }\n set width(val) { }\n /**\n * @hidden\n */\n get applySelectableClass() {\n return this._applySelectableClass;\n }\n /**\n * @hidden\n */\n set applySelectableClass(value) {\n if (this.selectable) {\n this._applySelectableClass = value;\n this.children.forEach(c => {\n c.applySelectableClass = value;\n });\n }\n }\n /**\n * @hidden\n * Calculates the number of visible columns, based on indexes of first and last visible columns.\n */\n calcChildren() {\n const visibleChildren = this.allChildren.filter(c => c.visibleIndex > -1);\n const fi = visibleChildren[0].visibleIndex;\n const li = visibleChildren[visibleChildren.length - 1].visibleIndex;\n return li - fi + 1;\n }\n}\nIgxColumnGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxColumnGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxColumnGroupComponent, selector: \"igx-column-group\", inputs: { collapsible: \"collapsible\", expanded: \"expanded\", summaries: \"summaries\", searchable: \"searchable\", filters: \"filters\", collapsibleIndicatorTemplate: \"collapsibleIndicatorTemplate\", hidden: \"hidden\" }, providers: [{ provide: IgxColumnComponent, useExisting: forwardRef(() => IgxColumnGroupComponent) }], queries: [{ propertyName: \"children\", predicate: IgxColumnComponent, read: IgxColumnComponent }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnGroupComponent, decorators: [{\n type: Component,\n args: [{\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: IgxColumnComponent, useExisting: forwardRef(() => IgxColumnGroupComponent) }],\n selector: 'igx-column-group',\n template: ``\n }]\n }], propDecorators: { children: [{\n type: ContentChildren,\n args: [IgxColumnComponent, { read: IgxColumnComponent }]\n }], collapsible: [{\n type: Input\n }], expanded: [{\n type: Input\n }], summaries: [{\n type: Input\n }], searchable: [{\n type: Input\n }], filters: [{\n type: Input\n }], collapsibleIndicatorTemplate: [{\n type: Input\n }], hidden: [{\n type: Input\n }] } });\n\nclass IgxGridBodyDirective {\n}\nIgxGridBodyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxGridBodyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridBodyDirective, selector: \"[igxGridBody]\", providers: [IgxForOfSyncService], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridBodyDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGridBody]',\n providers: [IgxForOfSyncService]\n }]\n }] });\n/**\n * @hidden\n */\nclass RowEditPositionStrategy extends ConnectedPositioningStrategy {\n constructor() {\n super(...arguments);\n this.isTop = false;\n this.isTopInitialPosition = null;\n }\n position(contentElement, size, document, initialCall, target) {\n const container = this.settings.container; // grid.tbody\n const targetElement = target || this.settings.target; // current grid.row\n // Position of the overlay depends on the available space in the grid.\n // If the bottom space is not enough then the the row overlay will show at the top of the row.\n // Once shown, either top or bottom, then this position stays until the overlay is closed (isTopInitialPosition property),\n // which means that when scrolling then overlay may hide, while the row is still visible (UX requirement).\n this.isTop = this.isTopInitialPosition !== null ?\n this.isTopInitialPosition :\n container.getBoundingClientRect().bottom <\n targetElement.getBoundingClientRect().bottom + contentElement.getBoundingClientRect().height;\n // Set width of the row editing overlay to equal row width, otherwise it fits 100% of the grid.\n contentElement.style.width = targetElement.clientWidth + 'px';\n this.settings.verticalStartPoint = this.settings.verticalDirection = this.isTop ? VerticalAlignment.Top : VerticalAlignment.Bottom;\n this.settings.openAnimation = this.isTop ? scaleInVerBottom : scaleInVerTop;\n super.position(contentElement, { width: targetElement.clientWidth, height: targetElement.clientHeight }, document, initialCall, targetElement);\n }\n}\n\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass IgxExcelTextDirective {\n}\nIgxExcelTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelTextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExcelTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelTextDirective, selector: \"[excelText],excel-text\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelTextDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[excelText],excel-text' }]\n }] });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass IgxCSVTextDirective {\n}\nIgxCSVTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCSVTextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxCSVTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxCSVTextDirective, selector: \"[csvText],csv-text\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxCSVTextDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[csvText],csv-text' }]\n }] });\n/**\n * Provides a way to template the title portion of the toolbar in the grid.\n *\n * @igxModule IgxGridToolbarModule\n * @igxParent IgxGridToolbarComponent\n *\n * @example\n * ```html\n * My custom title\n * ```\n */\nclass IgxGridToolbarTitleComponent {\n constructor() {\n /**\n * Host `class.igx-grid-toolbar__title` binding.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-grid-toolbar__title';\n }\n}\nIgxGridToolbarTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarTitleComponent, selector: \"igx-grid-toolbar-title\", host: { properties: { \"class.igx-grid-toolbar__title\": \"this.cssClass\" } }, ngImport: i0, template: '', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarTitleComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar-title', template: '' }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-grid-toolbar__title']\n }] } });\n/**\n * Provides a way to template the action portion of the toolbar in the grid.\n *\n * @igxModule IgxGridToolbarModule\n * @igxParent IgxGridToolbarComponent\n *\n * @example\n * ```html\n * \n * \n * \n * ```\n */\nclass IgxGridToolbarActionsComponent {\n constructor() {\n /**\n * Host `class.igx-grid-toolbar__actions` binding.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-grid-toolbar__actions';\n }\n}\nIgxGridToolbarActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarActionsComponent, selector: \"igx-grid-toolbar-actions\", host: { properties: { \"class.igx-grid-toolbar__actions\": \"this.cssClass\" } }, ngImport: i0, template: '', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarActionsComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar-actions', template: '' }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-grid-toolbar__actions']\n }] } });\nclass IgxGridToolbarDirective {\n constructor(template) {\n this.template = template;\n }\n static ngTemplateContextGuard(_dir, ctx) {\n return true;\n }\n ;\n}\nIgxGridToolbarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGridToolbarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarDirective, selector: \"[igxGridToolbar]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxGridToolbar]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/** @hidden @internal */\nclass IgxToolbarToken {\n}\n\n/**\n * Provides a pre-configured button to open the advanced filtering dialog of the grid.\n *\n *\n * @igxModule IgxGridToolbarModule\n * @igxParent IgxGridToolbarComponent\n *\n * @example\n * ```html\n * \n * Custom text\n * ```\n */\nclass IgxGridToolbarAdvancedFilteringComponent {\n /**\n * Returns the grid containing this component.\n */\n get grid() {\n return this.toolbar.grid;\n }\n constructor(toolbar) {\n this.toolbar = toolbar;\n }\n}\nIgxGridToolbarAdvancedFilteringComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarAdvancedFilteringComponent, deps: [{ token: IgxToolbarToken }], target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarAdvancedFilteringComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarAdvancedFilteringComponent, selector: \"igx-grid-toolbar-advanced-filtering\", inputs: { overlaySettings: \"overlaySettings\" }, ngImport: i0, template: \"\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarAdvancedFilteringComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar-advanced-filtering', template: \"\\n\" }]\n }], ctorParameters: function () { return [{ type: IgxToolbarToken, decorators: [{\n type: Inject,\n args: [IgxToolbarToken]\n }] }]; }, propDecorators: { overlaySettings: [{\n type: Input\n }] } });\n\n/**\n * Provides a context-aware container component for UI operations for the grid components.\n *\n * @igxModule IgxGridToolbarModule\n *\n */\nclass IgxGridToolbarComponent extends DisplayDensityBase {\n /**\n * Gets/sets the grid component for the toolbar component.\n *\n * @remarks\n * Usually you should not set this property in the context of the default grid/tree grid.\n * The only grids that demands this to be set are the hierarchical child grids. For additional\n * information check the toolbar topic.\n */\n get grid() {\n if (this._grid) {\n return this._grid;\n }\n return this.api.grid;\n }\n set grid(value) {\n this._grid = value;\n }\n /** Returns the native DOM element of the toolbar component */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /**\n * @hidden\n * @internal\n */\n get cosyStyle() {\n return this.displayDensity === 'cosy';\n }\n /**\n * @hidden\n * @internal\n */\n get compactStyle() {\n return this.displayDensity === 'compact';\n }\n constructor(_displayDensityOptions, api, iconService, element) {\n super(_displayDensityOptions);\n this._displayDensityOptions = _displayDensityOptions;\n this.api = api;\n this.iconService = iconService;\n this.element = element;\n /**\n * When enabled, shows the indeterminate progress bar.\n *\n * @remarks\n * By default this will be toggled, when the default exporter component is present\n * and an exporting is in progress.\n */\n this.showProgress = false;\n /**\n * @hidden\n * @internal\n */\n this.defaultStyle = true;\n this.iconService.addSvgIconFromText(pinLeft.name, pinLeft.value, 'imx-icons');\n this.iconService.addSvgIconFromText(unpinLeft.name, unpinLeft.value, 'imx-icons');\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\nIgxGridToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarComponent, deps: [{ token: DisplayDensityToken, optional: true }, { token: IGX_GRID_SERVICE_BASE }, { token: IgxIconService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarComponent, selector: \"igx-grid-toolbar\", inputs: { showProgress: \"showProgress\", grid: \"grid\" }, host: { properties: { \"class.igx-grid-toolbar\": \"this.defaultStyle\", \"class.igx-grid-toolbar--cosy\": \"this.cosyStyle\", \"class.igx-grid-toolbar--compact\": \"this.compactStyle\" } }, providers: [{ provide: IgxToolbarToken, useExisting: IgxGridToolbarComponent }], queries: [{ propertyName: \"hasActions\", first: true, predicate: IgxGridToolbarActionsComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n \\n\\n\\n\\n\\n
    \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxLinearProgressBarComponent, selector: \"igx-linear-bar\", inputs: [\"striped\", \"role\", \"id\", \"textAlign\", \"textVisibility\", \"textTop\", \"text\", \"type\"] }, { kind: \"component\", type: IgxGridToolbarActionsComponent, selector: \"igx-grid-toolbar-actions\" }, { kind: \"component\", type: IgxGridToolbarAdvancedFilteringComponent, selector: \"igx-grid-toolbar-advanced-filtering\", inputs: [\"overlaySettings\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar', providers: [{ provide: IgxToolbarToken, useExisting: IgxGridToolbarComponent }], template: \"\\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n \\n\\n\\n\\n\\n
    \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_SERVICE_BASE]\n }] }, { type: IgxIconService }, { type: i0.ElementRef }]; }, propDecorators: { showProgress: [{\n type: Input\n }], grid: [{\n type: Input\n }], hasActions: [{\n type: ContentChild,\n args: [IgxGridToolbarActionsComponent]\n }], defaultStyle: [{\n type: HostBinding,\n args: ['class.igx-grid-toolbar']\n }], cosyStyle: [{\n type: HostBinding,\n args: ['class.igx-grid-toolbar--cosy']\n }], compactStyle: [{\n type: HostBinding,\n args: ['class.igx-grid-toolbar--compact']\n }] } });\n\n/** @hidden @internal */\nclass IgxRowEditTemplateDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowEditTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowEditTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowEditTemplateDirective, selector: \"[igxRowEdit]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowEdit]'\n }]\n }] });\n/** @hidden @internal */\nclass IgxRowEditTextDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowEditTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditTextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowEditTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowEditTextDirective, selector: \"[igxRowEditText]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditTextDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowEditText]'\n }]\n }] });\n/** @hidden @internal */\nclass IgxRowAddTextDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowAddTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowAddTextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowAddTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowAddTextDirective, selector: \"[igxRowAddText]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowAddTextDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowAddText]'\n }]\n }] });\n/** @hidden @internal */\nclass IgxRowEditActionsDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowEditActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowEditActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowEditActionsDirective, selector: \"[igxRowEditActions]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditActionsDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowEditActions]'\n }]\n }] });\n// TODO: Refactor circular ref, deps and logic\n/** @hidden @internal */\nclass IgxRowEditTabStopDirective {\n constructor(grid, element) {\n this.grid = grid;\n this.element = element;\n }\n handleTab(event) {\n event.stopPropagation();\n if ((this.grid.rowEditTabs.last === this && !event.shiftKey) ||\n (this.grid.rowEditTabs.first === this && event.shiftKey)) {\n this.move(event);\n }\n }\n handleEscape(event) {\n this.grid.crudService.endEdit(false, event);\n this.grid.tbody.nativeElement.focus();\n }\n handleEnter(event) {\n event.stopPropagation();\n }\n /**\n * Moves focus to first/last editable cell in the editable row and put the cell in edit mode.\n * If cell is out of view first scrolls to the cell\n *\n * @param event keyboard event containing information about whether SHIFT key was pressed\n */\n move(event) {\n event.preventDefault();\n this.currentCellIndex = event.shiftKey ? this.grid.lastEditableColumnIndex : this.grid.firstEditableColumnIndex;\n this.grid.navigation.activeNode.row = this.grid.crudService.rowInEditMode.index;\n this.grid.navigation.activeNode.column = this.currentCellIndex;\n this.grid.navigateTo(this.grid.crudService.rowInEditMode.index, this.currentCellIndex, (obj) => {\n obj.target.activate(event);\n this.grid.cdr.detectChanges();\n });\n }\n}\nIgxRowEditTabStopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditTabStopDirective, deps: [{ token: IGX_GRID_BASE }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowEditTabStopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowEditTabStopDirective, selector: \"[igxRowEditTabStop]\", host: { listeners: { \"keydown.Tab\": \"handleTab($event)\", \"keydown.Shift.Tab\": \"handleTab($event)\", \"keydown.Escape\": \"handleEscape($event)\", \"keydown.Enter\": \"handleEnter($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowEditTabStopDirective, decorators: [{\n type: Directive,\n args: [{\n selector: `[igxRowEditTabStop]`\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }, { type: i0.ElementRef }]; }, propDecorators: { handleTab: [{\n type: HostListener,\n args: ['keydown.Tab', [`$event`]]\n }, {\n type: HostListener,\n args: ['keydown.Shift.Tab', [`$event`]]\n }], handleEscape: [{\n type: HostListener,\n args: ['keydown.Escape', [`$event`]]\n }], handleEnter: [{\n type: HostListener,\n args: ['keydown.Enter', ['$event']]\n }] } });\n\nclass IgxSummaryCellComponent {\n constructor(element) {\n this.element = element;\n this.firstCellIndentation = 0;\n this.hasSummary = false;\n }\n get visibleColumnIndex() {\n return this.column.visibleIndex;\n }\n get attrCellID() {\n return `${this.grid.id}_${this.rowIndex}_${this.visibleColumnIndex}`;\n }\n activate() {\n const currNode = this.grid.navigation.activeNode;\n if (currNode && this.rowIndex === currNode.row && this.visibleColumnIndex === currNode.column) {\n return;\n }\n this.grid.navigation.setActiveNode({ row: this.rowIndex, column: this.visibleColumnIndex }, 'summaryCell');\n this.grid.cdr.detectChanges();\n }\n get selectionNode() {\n return {\n row: this.rowIndex,\n column: this.column.columnLayoutChild ? this.column.parent.visibleIndex : this.visibleColumnIndex,\n isSummaryRow: true\n };\n }\n get width() {\n return this.column.getCellWidth();\n }\n get nativeElement() {\n return this.element.nativeElement;\n }\n get columnDatatype() {\n return this.column.dataType;\n }\n get itemHeight() {\n return this.column.grid.defaultSummaryHeight;\n }\n /**\n * @hidden\n */\n get grid() {\n return this.column.grid;\n }\n /**\n * @hidden @internal\n */\n get currencyCode() {\n return this.column.pipeArgs.currencyCode ?\n this.column.pipeArgs.currencyCode : getLocaleCurrencyCode(this.grid.locale);\n }\n /**\n * @hidden @internal\n */\n get currencySymbol() {\n return this.column.pipeArgs.display ?\n this.column.pipeArgs.display : getLocaleCurrencySymbol(this.grid.locale);\n }\n translateSummary(summary) {\n return this.grid.resourceStrings[`igx_grid_summary_${summary.key}`] || summary.label;\n }\n /**\n * @hidden @internal\n */\n formatSummaryResult(summary) {\n if (summary.summaryResult === undefined || summary.summaryResult === null || summary.summaryResult === '') {\n return '';\n }\n if (this.summaryFormatter) {\n return this.summaryFormatter(summary, this.column.summaries);\n }\n const args = this.column.pipeArgs;\n const locale = this.grid.locale;\n if (summary.key === 'count') {\n return formatNumber(summary.summaryResult, locale);\n }\n if (summary.defaultFormatting) {\n switch (this.column.dataType) {\n case GridColumnDataType.Number:\n return formatNumber(summary.summaryResult, locale, args.digitsInfo);\n case GridColumnDataType.Date:\n case GridColumnDataType.DateTime:\n case GridColumnDataType.Time:\n return formatDate$1(summary.summaryResult, args.format, locale, args.timezone);\n case GridColumnDataType.Currency:\n return formatCurrency$1(summary.summaryResult, locale, this.currencySymbol, this.currencyCode, args.digitsInfo);\n case GridColumnDataType.Percent:\n return formatPercent(summary.summaryResult, locale, args.digitsInfo);\n }\n }\n return summary.summaryResult;\n }\n}\nIgxSummaryCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryCellComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxSummaryCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSummaryCellComponent, selector: \"igx-grid-summary-cell\", inputs: { summaryResults: \"summaryResults\", column: \"column\", firstCellIndentation: \"firstCellIndentation\", hasSummary: \"hasSummary\", density: \"density\", summaryFormatter: \"summaryFormatter\", summaryTemplate: \"summaryTemplate\", active: \"active\", rowIndex: \"rowIndex\" }, host: { listeners: { \"pointerdown\": \"activate()\" }, properties: { \"class.igx-grid-summary--active\": \"this.active\", \"attr.data-rowIndex\": \"this.rowIndex\", \"attr.data-visibleIndex\": \"this.visibleColumnIndex\", \"attr.id\": \"this.attrCellID\" } }, ngImport: i0, template: \"\\n \\n \\n\\n \\n \\n
    \\n\\n {{ translateSummary(summary) }}\\n \\n {{\\n formatSummaryResult(summary)\\n }}\\n \\n
    \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryCellComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-summary-cell', template: \"\\n \\n \\n\\n \\n \\n
    \\n\\n {{ translateSummary(summary) }}\\n \\n {{\\n formatSummaryResult(summary)\\n }}\\n \\n
    \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { summaryResults: [{\n type: Input\n }], column: [{\n type: Input\n }], firstCellIndentation: [{\n type: Input\n }], hasSummary: [{\n type: Input\n }], density: [{\n type: Input\n }], summaryFormatter: [{\n type: Input\n }], summaryTemplate: [{\n type: Input\n }], active: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-grid-summary--active']\n }], rowIndex: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['attr.data-rowIndex']\n }], visibleColumnIndex: [{\n type: HostBinding,\n args: ['attr.data-visibleIndex']\n }], attrCellID: [{\n type: HostBinding,\n args: ['attr.id']\n }], activate: [{\n type: HostListener,\n args: ['pointerdown']\n }] } });\n\nclass BaseRow {\n /**\n * Returns the view index calculated per the grid page.\n */\n get viewIndex() {\n return this.index + this.grid.page * this.grid.perPage;\n }\n /**\n * Gets the row key.\n * A row in the grid is identified either by:\n * - primaryKey data value,\n * - the whole rowData, if the primaryKey is omitted.\n *\n * ```typescript\n * let rowKey = row.key;\n * ```\n */\n get key() {\n const data = this._data ?? this.grid.dataView[this.index];\n const primaryKey = this.grid.primaryKey;\n return primaryKey ? data[primaryKey] : data;\n }\n /**\n * Gets if this represents add row UI\n *\n * ```typescript\n * let isAddRow = row.addRowUI;\n * ```\n */\n get addRowUI() {\n return !!this.grid.crudService.row &&\n this.grid.crudService.row.getClassName() === IgxAddRow.name &&\n this.grid.crudService.row.id === this.key;\n }\n /** Gets the validation status and errors, if any.\n * ```typescript\n * let validation = row.validation;\n * let errors = validation.errors;\n * ```\n */\n get validation() {\n const formGroup = this.grid.validation.getFormGroup(this.key);\n return { status: formGroup?.status || 'VALID', errors: formGroup?.errors };\n }\n /**\n * The data record that populates the row.\n *\n * ```typescript\n * let rowData = row.data;\n * ```\n */\n get data() {\n if (this.inEditMode) {\n return mergeWith(this.grid.dataCloneStrategy.clone(this._data ?? this.grid.dataView[this.index]), this.grid.transactions.getAggregatedValue(this.key, false), (objValue, srcValue) => {\n if (Array.isArray(srcValue)) {\n return objValue = srcValue;\n }\n });\n }\n return this._data ?? this.grid.dataView[this.index];\n }\n /**\n * Returns if the row is currently in edit mode.\n */\n get inEditMode() {\n if (this.grid.rowEditable) {\n const editRowState = this.grid.crudService.row;\n return (editRowState && editRowState.id === this.key) || false;\n }\n else {\n return false;\n }\n }\n /**\n * Gets whether the row is pinned.\n * Default value is `false`.\n * ```typescript\n * const isPinned = row.pinned;\n * ```\n */\n get pinned() {\n return this.grid.isRecordPinned(this.data);\n }\n /**\n * Sets whether the row is pinned.\n * Default value is `false`.\n * ```typescript\n * row.pinned = !row.pinned;\n * ```\n */\n set pinned(val) {\n if (val) {\n this.pin();\n }\n else {\n this.unpin();\n }\n }\n /**\n * Gets the row expanded/collapsed state.\n *\n * ```typescript\n * const isExpanded = row.expanded;\n * ```\n */\n get expanded() {\n return this.grid.gridAPI.get_row_expansion_state(this.data);\n }\n /**\n * Expands/collapses the row.\n *\n * ```typescript\n * row.expanded = true;\n * ```\n */\n set expanded(val) {\n this.grid.gridAPI.set_row_expansion_state(this.key, val);\n }\n /**\n * Gets whether the row is selected.\n * Default value is `false`.\n * ```typescript\n * row.selected = true;\n * ```\n */\n get selected() {\n return this.grid.selectionService.isRowSelected(this.key);\n }\n /**\n * Sets whether the row is selected.\n * Default value is `false`.\n * ```typescript\n * row.selected = !row.selected;\n * ```\n */\n set selected(val) {\n if (val) {\n this.grid.selectionService.selectRowsWithNoEvent([this.key]);\n }\n else {\n this.grid.selectionService.deselectRowsWithNoEvent([this.key]);\n }\n this.grid.cdr.markForCheck();\n }\n /**\n * Returns if the row is in delete state.\n */\n get deleted() {\n return this.grid.gridAPI.row_deleted_transaction(this.key);\n }\n /**\n * Returns if the row has child rows. Always return false for IgxGridRow.\n */\n get hasChildren() {\n return false;\n }\n get disabled() {\n return this.grid.isGhostRecord(this.data);\n }\n /**\n * Gets the rendered cells in the row component.\n */\n get cells() {\n const res = [];\n this.grid.columns.forEach(col => {\n const cell = new IgxGridCell(this.grid, this.index, col.field);\n res.push(cell);\n });\n return res;\n }\n /**\n * Pins the specified row.\n * This method emits `onRowPinning` event.\n *\n * ```typescript\n * // pin the selected row from the grid\n * this.grid.selectedRows[0].pin();\n * ```\n */\n pin() {\n return this.grid.pinRow(this.key, this.index);\n }\n /**\n * Unpins the specified row.\n * This method emits `onRowPinning` event.\n *\n * ```typescript\n * // unpin the selected row from the grid\n * this.grid.selectedRows[0].unpin();\n * ```\n */\n unpin() {\n return this.grid.unpinRow(this.key);\n }\n /**\n * Updates the specified row object and the data source record with the passed value.\n *\n * ```typescript\n * // update the second selected row's value\n * let newValue = \"Apple\";\n * this.grid.selectedRows[1].update(newValue);\n * ```\n */\n update(value) {\n const crudService = this.grid.crudService;\n if (crudService.cellInEditMode && crudService.cell.id.rowID === this.key) {\n this.grid.transactions.endPending(false);\n }\n const row = new IgxEditRow(this.key, this.index, this.data, this.grid);\n this.grid.gridAPI.update_row(row, value);\n this.grid.notifyChanges();\n }\n /**\n * Removes the specified row from the grid's data source.\n * This method emits `onRowDeleted` event.\n *\n * ```typescript\n * // delete the third selected row from the grid\n * this.grid.selectedRows[2].delete();\n * ```\n */\n delete() {\n this.grid.deleteRowById(this.key);\n }\n}\nclass IgxGridRow extends BaseRow {\n /**\n * @hidden\n */\n constructor(grid, index, data) {\n super();\n this.grid = grid;\n this.index = index;\n this._data = data && data.addRow && data.recordRef ? data.recordRef : data;\n }\n /**\n * Returns the view index calculated per the grid page.\n */\n get viewIndex() {\n if (this.grid.paginator) {\n const precedingDetailRows = [];\n const precedingGroupRows = [];\n const firstRow = this.grid.dataView[0];\n const hasDetailRows = this.grid.expansionStates.size;\n const hasGroupedRows = this.grid.groupingExpressions.length;\n let precedingSummaryRows = 0;\n const firstRowInd = this.grid.groupingFlatResult.indexOf(firstRow);\n // from groupingFlatResult, resolve two other collections:\n // precedingGroupedRows -> use it to resolve summaryRow for each group in previous pages\n // precedingDetailRows -> ise it to resolve the detail row for each expanded grid row in previous pages\n if (hasDetailRows || hasGroupedRows) {\n this.grid.groupingFlatResult.forEach((r, ind) => {\n const rowID = this.grid.primaryKey ? r[this.grid.primaryKey] : r;\n if (hasGroupedRows && ind < firstRowInd && this.grid.isGroupByRecord(r)) {\n precedingGroupRows.push(r);\n }\n if (this.grid.expansionStates.get(rowID) && ind < firstRowInd && !this.grid.isGroupByRecord(r)) {\n precedingDetailRows.push(r);\n }\n });\n }\n if (this.grid.summaryCalculationMode !== GridSummaryCalculationMode.rootLevelOnly) {\n // if firstRow is a child of the last item in precedingGroupRows,\n // then summaryRow for this given groupedRecord is rendered after firstRow,\n // i.e. need to decrease firstRowInd to account for the above.\n precedingSummaryRows = precedingGroupRows.filter(gr => this.grid.isExpandedGroup(gr)).length;\n if (this.grid.summaryPosition === GridSummaryPosition.bottom && precedingGroupRows.length &&\n precedingGroupRows[precedingGroupRows.length - 1].records.indexOf(firstRow) > -1) {\n precedingSummaryRows += -1;\n }\n }\n return precedingDetailRows.length + precedingSummaryRows + firstRowInd + this.index;\n }\n else {\n return this.index;\n }\n }\n /**\n * Returns the parent row, if grid is grouped.\n */\n get parent() {\n let parent;\n if (!this.grid.groupingExpressions.length) {\n return undefined;\n }\n let i = this.index - 1;\n while (i >= 0 && !parent) {\n const rec = this.grid.dataView[i];\n if (this.grid.isGroupByRecord(rec)) {\n parent = new IgxGroupByRow(this.grid, i, rec);\n }\n i--;\n }\n return parent;\n }\n}\nclass IgxTreeGridRow extends BaseRow {\n /**\n * @hidden\n */\n constructor(grid, index, data, _treeRow) {\n super();\n this.grid = grid;\n this.index = index;\n this._treeRow = _treeRow;\n this._data = data && data.addRow && data.recordRef ? data.recordRef : data;\n }\n /**\n * Returns the view index calculated per the grid page.\n */\n get viewIndex() {\n if (this.grid.hasSummarizedColumns && this.grid.page > 0) {\n if (this.grid.summaryCalculationMode !== GridSummaryCalculationMode.rootLevelOnly) {\n const firstRowIndex = this.grid.processedExpandedFlatData.indexOf(this.grid.dataView[0].data);\n // firstRowIndex is based on data result after all pipes triggered, excluding summary pipe\n const precedingSummaryRows = this.grid.summaryPosition === GridSummaryPosition.bottom ?\n this.grid.rootRecords.indexOf(this.getRootParent(this.grid.dataView[0])) :\n this.grid.rootRecords.indexOf(this.getRootParent(this.grid.dataView[0])) + 1;\n // there is a summary row for each root record, so we calculate how many root records are rendered before the current row\n return firstRowIndex + precedingSummaryRows + this.index;\n }\n }\n return this.index + this.grid.page * this.grid.perPage;\n }\n /**\n * The data passed to the row component.\n *\n * ```typescript\n * let selectedRowData = this.grid.selectedRows[0].data;\n * ```\n */\n get data() {\n if (this.inEditMode) {\n return mergeWith(this.grid.dataCloneStrategy.clone(this._data ?? this.grid.dataView[this.index]), this.grid.transactions.getAggregatedValue(this.key, false), (objValue, srcValue) => {\n if (Array.isArray(srcValue)) {\n return objValue = srcValue;\n }\n });\n }\n const rec = this.grid.dataView[this.index];\n return this._data ? this._data : this.grid.isTreeRow(rec) ? rec.data : rec;\n }\n /**\n * Returns the child rows.\n */\n get children() {\n const children = [];\n if (this.treeRow.expanded) {\n this.treeRow.children.forEach((rec, i) => {\n const row = new IgxTreeGridRow(this.grid, this.index + 1 + i, rec.data);\n children.push(row);\n });\n }\n return children;\n }\n /**\n * Returns the parent row.\n */\n get parent() {\n const row = this.grid.getRowByKey(this.treeRow.parent?.key);\n return row;\n }\n /**\n * Returns true if child rows exist. Always return false for IgxGridRow.\n */\n get hasChildren() {\n if (this.treeRow.children) {\n return this.treeRow.children.length > 0;\n }\n else {\n return false;\n }\n }\n /**\n * The `ITreeGridRecord` with metadata about the row in the context of the tree grid.\n *\n * ```typescript\n * const rowParent = this.treeGrid.getRowByKey(1).treeRow.parent;\n * ```\n */\n get treeRow() {\n return this._treeRow ?? this.grid.records.get(this.key);\n }\n /**\n * Gets whether the row is pinned.\n *\n * ```typescript\n * let isPinned = row.pinned;\n * ```\n */\n get pinned() {\n return this.grid.isRecordPinned(this);\n }\n /**\n * Sets whether the row is pinned.\n * Default value is `false`.\n * ```typescript\n * row.pinned = !row.pinned;\n * ```\n */\n set pinned(val) {\n if (val) {\n this.pin();\n }\n else {\n this.unpin();\n }\n }\n /**\n * Gets whether the row is expanded.\n *\n * ```typescript\n * let esExpanded = row.expanded;\n * ```\n */\n get expanded() {\n return this.grid.gridAPI.get_row_expansion_state(this.treeRow);\n }\n /**\n * Expands/collapses the row.\n *\n * ```typescript\n * row.expanded = true;\n * ```\n */\n set expanded(val) {\n this.grid.gridAPI.set_row_expansion_state(this.key, val);\n }\n get disabled() {\n // TODO cell\n return this.grid.isGhostRecord(this.data) ? this.treeRow.isFilteredOutParent === undefined : false;\n }\n getRootParent(row) {\n while (row.parent) {\n row = row.parent;\n }\n return row;\n }\n}\nclass IgxHierarchicalGridRow extends BaseRow {\n /**\n * @hidden\n */\n constructor(grid, index, data) {\n super();\n this.grid = grid;\n this.index = index;\n this._data = data && data.addRow && data.recordRef ? data.recordRef : data;\n }\n /**\n * Returns true if row islands exist.\n */\n get hasChildren() {\n return !!this.grid.childLayoutKeys.length;\n }\n /**\n * Returns the view index calculated per the grid page.\n */\n get viewIndex() {\n const firstRowInd = this.grid.filteredSortedData.indexOf(this.grid.dataView[0]);\n const expandedRows = this.grid.filteredSortedData.filter((rec, ind) => {\n const rowID = this.grid.primaryKey ? rec[this.grid.primaryKey] : rec;\n return this.grid.expansionStates.get(rowID) && ind < firstRowInd;\n });\n return firstRowInd + expandedRows.length + this.index;\n }\n /**\n * Gets the rendered cells in the row component.\n */\n get cells() {\n const res = [];\n this.grid.columns.forEach(col => {\n const cell = new IgxGridCell(this.grid, this.index, col.field);\n res.push(cell);\n });\n return res;\n }\n}\nclass IgxGroupByRow {\n /**\n * The IGroupByRecord object, representing the group record, if the row is a GroupByRow.\n */\n get groupRow() {\n return this._groupRow ? this._groupRow : this.grid.dataView[this.index];\n }\n /**\n * Returns the child rows.\n */\n get children() {\n const children = [];\n this.groupRow.records.forEach((rec, i) => {\n const row = new IgxGridRow(this.grid, this.index + 1 + i, rec);\n children.push(row);\n });\n return children;\n }\n /**\n * Returns the view index calculated per the grid page.\n */\n get viewIndex() {\n if (this.grid.page) {\n const precedingDetailRows = [];\n const precedingGroupRows = [];\n const firstRow = this.grid.dataView[0];\n const hasDetailRows = this.grid.expansionStates.size;\n const hasGroupedRows = this.grid.groupingExpressions.length;\n let precedingSummaryRows = 0;\n const firstRowInd = this.grid.groupingFlatResult.indexOf(firstRow);\n // from groupingFlatResult, resolve two other collections:\n // precedingGroupedRows -> use it to resolve summaryRow for each group in previous pages\n // precedingDetailRows -> ise it to resolve the detail row for each expanded grid row in previous pages\n if (hasDetailRows || hasGroupedRows) {\n this.grid.groupingFlatResult.forEach((r, ind) => {\n const rowID = this.grid.primaryKey ? r[this.grid.primaryKey] : r;\n if (hasGroupedRows && ind < firstRowInd && this.grid.isGroupByRecord(r)) {\n precedingGroupRows.push(r);\n }\n if (this.grid.expansionStates.get(rowID) && ind < firstRowInd && !this.grid.isGroupByRecord(r)) {\n precedingDetailRows.push(r);\n }\n });\n }\n if (this.grid.summaryCalculationMode !== GridSummaryCalculationMode.rootLevelOnly) {\n // if firstRow is a child of the last item in precedingGroupRows,\n // then summaryRow for this given groupedRecord is rendered after firstRow,\n // i.e. need to decrease firstRowInd to account for the above.\n precedingSummaryRows = precedingGroupRows.filter(gr => this.grid.isExpandedGroup(gr)).length;\n if (this.grid.summaryPosition === GridSummaryPosition.bottom && precedingGroupRows.length &&\n precedingGroupRows[precedingGroupRows.length - 1].records.indexOf(firstRow) > -1) {\n precedingSummaryRows += -1;\n }\n }\n return precedingDetailRows.length + precedingSummaryRows + firstRowInd + this.index;\n }\n else {\n return this.index;\n }\n }\n /**\n * @hidden\n */\n constructor(grid, index, _groupRow) {\n this._groupRow = _groupRow;\n this.grid = grid;\n this.index = index;\n this.isGroupByRow = true;\n }\n /**\n * Gets whether the row is selected.\n * Default value is `false`.\n * ```typescript\n * row.selected = true;\n * ```\n */\n get selected() {\n return this.children.every(row => row.selected);\n }\n /**\n * Sets whether the row is selected.\n * Default value is `false`.\n * ```typescript\n * row.selected = !row.selected;\n * ```\n */\n set selected(val) {\n if (val) {\n this.children.forEach(row => {\n this.grid.selectionService.selectRowsWithNoEvent([row.key]);\n });\n }\n else {\n this.children.forEach(row => {\n this.grid.selectionService.deselectRowsWithNoEvent([row.key]);\n });\n }\n this.grid.cdr.markForCheck();\n }\n /**\n * Gets/sets whether the group row is expanded.\n * ```typescript\n * const groupRowExpanded = groupRow.expanded;\n * ```\n */\n get expanded() {\n return this.grid.isExpandedGroup(this.groupRow);\n }\n set expanded(value) {\n this.gridAPI.set_grouprow_expansion_state(this.groupRow, value);\n }\n isActive() {\n return this.grid.navigation.activeNode ? this.grid.navigation.activeNode.row === this.index : false;\n }\n /**\n * Toggles the group row expanded/collapsed state.\n * ```typescript\n * groupRow.toggle()\n * ```\n */\n toggle() {\n this.grid.toggleGroup(this.groupRow);\n }\n get gridAPI() {\n return this.grid.gridAPI;\n }\n}\nclass IgxSummaryRow {\n /**\n * The IGroupByRecord object, representing the group record, if the row is a GroupByRow.\n */\n get summaries() {\n return this._summaries ? this._summaries : this.grid.dataView[this.index].summaries;\n }\n /**\n * Returns the view index calculated per the grid page.\n */\n get viewIndex() {\n if (this.grid.hasSummarizedColumns && this.grid.page > 0) {\n if (this.gridType === GridInstanceType.Grid) {\n if (this.grid.page) {\n const precedingDetailRows = [];\n const precedingGroupRows = [];\n const firstRow = this.grid.dataView[0];\n const hasDetailRows = this.grid.expansionStates.size;\n const hasGroupedRows = this.grid.groupingExpressions.length;\n let precedingSummaryRows = 0;\n const firstRowInd = this.grid.groupingFlatResult.indexOf(firstRow);\n // from groupingFlatResult, resolve two other collections:\n // precedingGroupedRows -> use it to resolve summaryRow for each group in previous pages\n // precedingDetailRows -> ise it to resolve the detail row for each expanded grid row in previous pages\n if (hasDetailRows || hasGroupedRows) {\n this.grid.groupingFlatResult.forEach((r, ind) => {\n const rowID = this.grid.primaryKey ? r[this.grid.primaryKey] : r;\n if (hasGroupedRows && ind < firstRowInd && this.grid.isGroupByRecord(r)) {\n precedingGroupRows.push(r);\n }\n if (this.grid.expansionStates.get(rowID) && ind < firstRowInd &&\n !this.grid.isGroupByRecord(r)) {\n precedingDetailRows.push(r);\n }\n });\n }\n if (this.grid.summaryCalculationMode !== GridSummaryCalculationMode.rootLevelOnly) {\n // if firstRow is a child of the last item in precedingGroupRows,\n // then summaryRow for this given groupedRecord is rendered after firstRow,\n // i.e. need to decrease firstRowInd to account for the above.\n precedingSummaryRows = precedingGroupRows.filter(gr => this.grid.isExpandedGroup(gr)).length;\n if (this.grid.summaryPosition === GridSummaryPosition.bottom && precedingGroupRows.length &&\n precedingGroupRows[precedingGroupRows.length - 1].records.indexOf(firstRow) > -1) {\n precedingSummaryRows += -1;\n }\n }\n return precedingDetailRows.length + precedingSummaryRows + firstRowInd + this.index;\n }\n else {\n return this.index;\n }\n }\n else if (this.gridType === GridInstanceType.TreeGrid) {\n if (this.grid.summaryCalculationMode !== GridSummaryCalculationMode.rootLevelOnly) {\n const firstRowIndex = this.grid.processedExpandedFlatData.indexOf(this.grid.dataView[0].data);\n const precedingSummaryRows = this.grid.summaryPosition === GridSummaryPosition.bottom ?\n this.grid.rootRecords.indexOf(this.getRootParent(this.grid.dataView[0])) :\n this.grid.rootRecords.indexOf(this.getRootParent(this.grid.dataView[0])) + 1;\n return firstRowIndex + precedingSummaryRows + this.index;\n }\n }\n }\n return this.index + this.grid.page * this.grid.perPage;\n }\n /**\n * @hidden\n */\n constructor(grid, index, _summaries, type) {\n this._summaries = _summaries;\n this.grid = grid;\n this.index = index;\n this.isSummaryRow = true;\n this.gridType = type;\n }\n getRootParent(row) {\n while (row.parent) {\n row = row.parent;\n }\n return row;\n }\n}\n\n/**\n * @hidden\n * @internal\n */\nclass IgxGridCellStyleClassesPipe {\n transform(cssClasses, _, data, field, index, __) {\n if (!cssClasses) {\n return '';\n }\n const result = [];\n for (const cssClass of Object.keys(cssClasses)) {\n const callbackOrValue = cssClasses[cssClass];\n const apply = typeof callbackOrValue === 'function' ?\n callbackOrValue(data, field, resolveNestedPath(data, field), index) : callbackOrValue;\n if (apply) {\n result.push(cssClass);\n }\n }\n return result.join(' ');\n }\n}\nIgxGridCellStyleClassesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellStyleClassesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridCellStyleClassesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellStyleClassesPipe, name: \"igxCellStyleClasses\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellStyleClassesPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'igxCellStyleClasses' }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridCellStylesPipe {\n transform(styles, _, data, field, index, __) {\n const css = {};\n if (!styles) {\n return css;\n }\n for (const prop of Object.keys(styles)) {\n const res = styles[prop];\n css[prop] = typeof res === 'function' ? res(data, field, resolveNestedPath(data, field), index) : res;\n }\n return css;\n }\n}\nIgxGridCellStylesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellStylesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridCellStylesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellStylesPipe, name: \"igxCellStyles\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellStylesPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'igxCellStyles'\n }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridCellImageAltPipe {\n transform(value) {\n if (value) {\n const val = value.split('/');\n const imagename = val[val.length - 1].split('.');\n return imagename.length ? imagename[0] : '';\n }\n return value;\n }\n}\nIgxGridCellImageAltPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellImageAltPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridCellImageAltPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellImageAltPipe, name: \"igxCellImageAlt\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCellImageAltPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'igxCellImageAlt'\n }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridRowClassesPipe {\n constructor(grid) {\n this.grid = grid;\n this.row = new IgxGridRow(this.grid, -1, {});\n }\n transform(cssClasses, row, editMode, selected, dirty, deleted, dragging, index, mrl, filteredOut, _rowData, _) {\n const result = new Set(['igx-grid__tr', index % 2 ? row.grid.evenRowCSS : row.grid.oddRowCSS]);\n const mapping = [\n [selected, 'igx-grid__tr--selected'],\n [editMode, 'igx-grid__tr--edit'],\n [dirty, 'igx-grid__tr--edited'],\n [deleted, 'igx-grid__tr--deleted'],\n [dragging, 'igx-grid__tr--drag'],\n [mrl, 'igx-grid__tr--mrl'],\n // Tree grid only\n [filteredOut, 'igx-grid__tr--filtered']\n ];\n for (const [state, _class] of mapping) {\n if (state) {\n result.add(_class);\n }\n }\n for (const cssClass of Object.keys(cssClasses ?? {})) {\n const callbackOrValue = cssClasses[cssClass];\n this.row.index = index;\n this.row._data = row.data;\n const apply = typeof callbackOrValue === 'function' ? callbackOrValue(this.row) : callbackOrValue;\n if (apply) {\n result.add(cssClass);\n }\n }\n return result;\n }\n}\nIgxGridRowClassesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowClassesPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridRowClassesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowClassesPipe, name: \"igxGridRowClasses\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowClassesPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'igxGridRowClasses' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridRowStylesPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(styles, rowData, index, __) {\n const css = {};\n if (!styles) {\n return css;\n }\n for (const prop of Object.keys(styles)) {\n const cb = styles[prop];\n const data = this.grid.isTreeRow && this.grid.isTreeRow(rowData) ? rowData.data : rowData;\n const row = new IgxGridRow(this.grid, index, data);\n css[prop] = typeof cb === 'function' ? cb(row) : cb;\n }\n return css;\n }\n}\nIgxGridRowStylesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowStylesPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridRowStylesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowStylesPipe, name: \"igxGridRowStyles\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowStylesPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'igxGridRowStyles' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridNotGroupedPipe {\n transform(value) {\n return value.filter(item => !item.columnGroup);\n }\n}\nIgxGridNotGroupedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridNotGroupedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridNotGroupedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridNotGroupedPipe, name: \"igxNotGrouped\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridNotGroupedPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'igxNotGrouped'\n }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridTopLevelColumns {\n transform(value) {\n return value.filter(item => item.level === 0);\n }\n}\nIgxGridTopLevelColumns.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTopLevelColumns, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridTopLevelColumns.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTopLevelColumns, name: \"igxTopLevel\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTopLevelColumns, decorators: [{\n type: Pipe,\n args: [{\n name: 'igxTopLevel'\n }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridFilterConditionPipe {\n transform(value) {\n return value.split(/(?=[A-Z])/).join(' ');\n }\n}\nIgxGridFilterConditionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridFilterConditionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridFilterConditionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridFilterConditionPipe, name: \"filterCondition\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridFilterConditionPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'filterCondition',\n pure: true\n }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridTransactionPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, _id, _pipeTrigger) {\n if (this.grid.transactions.enabled) {\n const result = DataUtil.mergeTransactions(cloneArray(collection), this.grid.transactions.getAggregatedChanges(true), this.grid.primaryKey, this.grid.dataCloneStrategy);\n return result;\n }\n return collection;\n }\n}\nIgxGridTransactionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTransactionPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridTransactionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTransactionPipe, name: \"gridTransaction\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTransactionPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'gridTransaction' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/**\n * @hidden\n * @internal\n */\nclass IgxGridPaginatorOptionsPipe {\n transform(values) {\n return Array.from(new Set([...values])).sort((a, b) => a - b);\n }\n}\nIgxGridPaginatorOptionsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridPaginatorOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridPaginatorOptionsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridPaginatorOptionsPipe, name: \"paginatorOptions\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridPaginatorOptionsPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'paginatorOptions' }]\n }] });\n/**\n * @hidden\n * @internal\n */\nclass IgxHasVisibleColumnsPipe {\n transform(values, hasVisibleColumns) {\n if (!(values && values.length)) {\n return values;\n }\n return hasVisibleColumns ? values : [];\n }\n}\nIgxHasVisibleColumnsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHasVisibleColumnsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxHasVisibleColumnsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHasVisibleColumnsPipe, name: \"visibleColumns\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHasVisibleColumnsPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'visibleColumns' }]\n }] });\n/** @hidden @internal */\nfunction buildDataView() {\n return function (_target, _propertyKey, descriptor) {\n const original = descriptor.value;\n descriptor.value = function (...args) {\n const result = original.apply(this, args);\n this.grid.buildDataView();\n return result;\n };\n return descriptor;\n };\n}\n/**\n * @hidden\n */\nclass IgxGridRowPinningPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, id, isPinned = false, _pipeTrigger) {\n if (this.grid.hasPinnedRecords && isPinned) {\n const result = collection.filter(rec => !this.grid.isSummaryRow(rec) && this.grid.isRecordPinned(rec));\n result.sort((rec1, rec2) => this.grid.getInitialPinnedIndex(rec1) - this.grid.getInitialPinnedIndex(rec2));\n return result;\n }\n this.grid.unpinnedRecords = collection;\n if (!this.grid.hasPinnedRecords) {\n this.grid.pinnedRecords = [];\n return isPinned ? [] : collection;\n }\n return collection.map((rec) => !this.grid.isSummaryRow(rec) &&\n this.grid.isRecordPinned(rec) ? { recordRef: rec, ghostRecord: true } : rec);\n }\n}\nIgxGridRowPinningPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowPinningPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridRowPinningPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowPinningPipe, name: \"gridRowPinning\" });\n__decorate([\n buildDataView()\n], IgxGridRowPinningPipe.prototype, \"transform\", null);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridRowPinningPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'gridRowPinning' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; }, propDecorators: { transform: [] } });\nclass IgxGridDataMapperPipe {\n transform(data, field, _, val, isNestedPath) {\n return isNestedPath ? resolveNestedPath(data, field) : val;\n }\n}\nIgxGridDataMapperPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridDataMapperPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridDataMapperPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridDataMapperPipe, name: \"dataMapper\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridDataMapperPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'dataMapper' }]\n }] });\nclass IgxStringReplacePipe {\n transform(value, search, replacement) {\n return value.replace(search, replacement);\n }\n}\nIgxStringReplacePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStringReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxStringReplacePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStringReplacePipe, name: \"igxStringReplace\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStringReplacePipe, decorators: [{\n type: Pipe,\n args: [{ name: 'igxStringReplace' }]\n }] });\nclass IgxGridTransactionStatePipe {\n transform(row_id, field, rowEditable, transactions, _, __, ___) {\n if (rowEditable) {\n const rowCurrentState = transactions.getAggregatedValue(row_id, false);\n if (rowCurrentState) {\n const value = resolveNestedPath(rowCurrentState, field);\n return value !== undefined && value !== null;\n }\n }\n else {\n const transaction = transactions.getState(row_id);\n const value = resolveNestedPath(transaction?.value ?? {}, field);\n return transaction && transaction.value && (value || value === 0 || value === false);\n }\n }\n}\nIgxGridTransactionStatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTransactionStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridTransactionStatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTransactionStatePipe, name: \"transactionState\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridTransactionStatePipe, decorators: [{\n type: Pipe,\n args: [{ name: 'transactionState' }]\n }] });\nclass IgxColumnFormatterPipe {\n transform(value, formatter, rowData, columnData) {\n return formatter(value, rowData, columnData);\n }\n}\nIgxColumnFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxColumnFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnFormatterPipe, name: \"columnFormatter\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnFormatterPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'columnFormatter' }]\n }] });\nclass IgxSummaryFormatterPipe {\n transform(summaryResult, summaryOperand, summaryFormatter) {\n return summaryFormatter(summaryResult, summaryOperand);\n }\n}\nIgxSummaryFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxSummaryFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryFormatterPipe, name: \"summaryFormatter\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryFormatterPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'summaryFormatter' }]\n }] });\nclass IgxGridAddRowPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, isPinned = false, _pipeTrigger) {\n if (!this.grid.rowEditable || !this.grid.crudService.row || this.grid.crudService.row.getClassName() !== IgxAddRow.name ||\n !this.grid.crudService.addRowParent || isPinned !== this.grid.crudService.addRowParent.isPinned) {\n return collection;\n }\n const copy = collection.slice(0);\n const rec = this.grid.crudService.row.recordRef;\n copy.splice(this.grid.crudService.row.index, 0, rec);\n return copy;\n }\n}\nIgxGridAddRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridAddRowPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridAddRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridAddRowPipe, name: \"gridAddRow\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridAddRowPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'gridAddRow' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n\nclass IgxSummaryRowComponent {\n get dataRowIndex() {\n return this.index;\n }\n get minHeight() {\n return this.grid.summaryRowHeight - 1;\n }\n get summaryCells() {\n const res = new QueryList();\n if (!this._summaryCells) {\n return res;\n }\n const cList = this._summaryCells.filter(c => c.nativeElement.isConnected);\n res.reset(cList);\n return res;\n }\n set summaryCells(cells) { }\n constructor(grid, element, cdr) {\n this.grid = grid;\n this.element = element;\n this.cdr = cdr;\n this.firstCellIndentation = -1;\n }\n ngDoCheck() {\n this.cdr.markForCheck();\n }\n get nativeElement() {\n return this.element.nativeElement;\n }\n getColumnSummaries(columnName) {\n if (!this.summaries.get(columnName)) {\n return [];\n }\n return this.summaries.get(columnName);\n }\n /**\n * @hidden\n * @internal\n */\n isCellActive(visibleColumnIndex) {\n const node = this.grid.navigation.activeNode;\n return node ? node.row === this.index && node.column === visibleColumnIndex : false;\n }\n /**\n * @hidden\n */\n get pinnedColumns() {\n return this.grid.pinnedColumns;\n }\n /**\n * @hidden\n */\n get unpinnedColumns() {\n return this.grid.unpinnedColumns;\n }\n getContext(row) {\n return {\n $implicit: row\n };\n }\n}\nIgxSummaryRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryRowComponent, deps: [{ token: IGX_GRID_BASE }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxSummaryRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSummaryRowComponent, selector: \"igx-grid-summary-row\", inputs: { summaries: \"summaries\", gridID: \"gridID\", index: \"index\", firstCellIndentation: \"firstCellIndentation\" }, host: { properties: { \"attr.data-rowIndex\": \"this.dataRowIndex\" } }, providers: [IgxForOfSyncService], viewQueries: [{ propertyName: \"virtDirRow\", first: true, predicate: [\"igxDirRef\"], descendants: true, read: IgxGridForOfDirective }, { propertyName: \"_summaryCells\", predicate: IgxSummaryCellComponent, descendants: true, read: IgxSummaryCellComponent }], ngImport: i0, template: \"\\n \\n \\n \\n 0 && grid.isPinningToStart\\\">\\n \\n \\n \\n \\n \\n \\n 0 && !grid.isPinningToStart\\\">\\n \\n \\n\\n\\n\\n \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxGridForOfDirective, selector: \"[igxGridFor][igxGridForOf]\", inputs: [\"igxGridForOf\", \"igxGridForOfUniqueSizeCache\", \"igxGridForOfVariableSizes\"], outputs: [\"dataChanging\"] }, { kind: \"component\", type: IgxSummaryCellComponent, selector: \"igx-grid-summary-cell\", inputs: [\"summaryResults\", \"column\", \"firstCellIndentation\", \"hasSummary\", \"density\", \"summaryFormatter\", \"summaryTemplate\", \"active\", \"rowIndex\"] }, { kind: \"pipe\", type: IgxGridNotGroupedPipe, name: \"igxNotGrouped\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSummaryRowComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-summary-row', providers: [IgxForOfSyncService], template: \"\\n \\n \\n \\n 0 && grid.isPinningToStart\\\">\\n \\n \\n \\n \\n \\n \\n 0 && !grid.isPinningToStart\\\">\\n \\n \\n\\n\\n\\n \\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { summaries: [{\n type: Input\n }], gridID: [{\n type: Input\n }], index: [{\n type: Input\n }], firstCellIndentation: [{\n type: Input\n }], dataRowIndex: [{\n type: HostBinding,\n args: ['attr.data-rowIndex']\n }], _summaryCells: [{\n type: ViewChildren,\n args: [IgxSummaryCellComponent, { read: IgxSummaryCellComponent }]\n }], virtDirRow: [{\n type: ViewChild,\n args: ['igxDirRef', { read: IgxGridForOfDirective }]\n }] } });\n\n/**\n * @hidden\n * @internal\n */\nclass IgxColumnResizerDirective {\n constructor(element, document, zone) {\n this.element = element;\n this.document = document;\n this.zone = zone;\n this.restrictHResizeMin = Number.MIN_SAFE_INTEGER;\n this.restrictHResizeMax = Number.MAX_SAFE_INTEGER;\n this.resizeEnd = new Subject();\n this.resizeStart = new Subject();\n // eslint-disable-next-line @angular-eslint/no-output-native\n this.resize = new Subject();\n this._destroy = new Subject();\n this.resizeStart.pipe(takeUntil(this._destroy), map((event) => event.clientX), switchMap((offset) => this.resize\n .pipe(takeUntil(this._destroy), takeUntil(this.resizeEnd), map((event) => event.clientX - offset))))\n .subscribe((pos) => {\n const left = this._left + pos;\n const min = this._left - this.restrictHResizeMin;\n const max = this._left + this.restrictHResizeMax;\n this.left = left < min ? min : left;\n if (left > max) {\n this.left = max;\n }\n });\n }\n ngOnInit() {\n this.zone.runOutsideAngular(() => {\n fromEvent(this.document.defaultView, 'mousemove')\n .pipe(takeUntil(this._destroy), throttle(() => interval(0, animationFrameScheduler)))\n .subscribe((res) => this.onMousemove(res));\n fromEvent(this.document.defaultView, 'mouseup')\n .pipe(takeUntil(this._destroy))\n .subscribe((res) => this.onMouseup(res));\n });\n }\n ngOnDestroy() {\n this._destroy.next(true);\n this._destroy.complete();\n }\n set left(val) {\n requestAnimationFrame(() => this.element.nativeElement.style.left = val + 'px');\n }\n set top(val) {\n if (this.restrictResizerTop != undefined) {\n requestAnimationFrame(() => this.element.nativeElement.style.top = this.restrictResizerTop + 'px');\n }\n else {\n requestAnimationFrame(() => this.element.nativeElement.style.top = val + 'px');\n }\n }\n onMouseup(event) {\n this.resizeEnd.next(event);\n this.resizeEnd.complete();\n }\n onMousedown(event) {\n event.preventDefault();\n const parent = this.element.nativeElement.parentElement.parentElement;\n this.left = this._left = event.clientX - parent.getBoundingClientRect().left;\n this.top = event.target.getBoundingClientRect().top - parent.getBoundingClientRect().top;\n this.resizeStart.next(event);\n }\n onMousemove(event) {\n event.preventDefault();\n this.resize.next(event);\n }\n}\nIgxColumnResizerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnResizerDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nIgxColumnResizerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxColumnResizerDirective, selector: \"[igxResizer]\", inputs: { restrictHResizeMin: \"restrictHResizeMin\", restrictHResizeMax: \"restrictHResizeMax\", restrictResizerTop: \"restrictResizerTop\" }, outputs: { resizeEnd: \"resizeEnd\", resizeStart: \"resizeStart\", resize: \"resize\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnResizerDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxResizer]'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone }]; }, propDecorators: { restrictHResizeMin: [{\n type: Input\n }], restrictHResizeMax: [{\n type: Input\n }], restrictResizerTop: [{\n type: Input\n }], resizeEnd: [{\n type: Output\n }], resizeStart: [{\n type: Output\n }], resize: [{\n type: Output\n }] } });\n\n/**\n * @hidden\n * @internal\n */\nclass IgxColumnResizingService {\n constructor(zone) {\n this.zone = zone;\n /**\n * @hidden\n */\n this.resizeCursor = null;\n /**\n * @hidden\n */\n this.showResizer = false;\n }\n /**\n * @hidden\n */\n getColumnHeaderRenderedWidth() {\n return this.column.headerCell.nativeElement.getBoundingClientRect().width;\n }\n /**\n * @hidden\n */\n get resizerHeight() {\n let height = this.column.grid.getVisibleContentHeight();\n // Column height multiplier in case there are Column Layouts. The resizer height need to take into account rowStart.\n let columnHeightMultiplier = 1;\n if (this.column.columnLayoutChild) {\n columnHeightMultiplier = this.column.grid.multiRowLayoutRowSize - this.column.rowStart + 1;\n }\n if (this.column.level !== 0) {\n height -= this.column.topLevelParent.headerGroup.height - this.column.headerGroup.height * columnHeightMultiplier;\n }\n return height;\n }\n /**\n * Returns the minimal possible width to which the column can be resized.\n */\n get restrictResizeMin() {\n const actualWidth = this.getColumnHeaderRenderedWidth();\n const minWidth = this.column.minWidthPx < actualWidth ? this.column.minWidthPx : actualWidth;\n return actualWidth - minWidth;\n }\n /**\n * Returns the maximal possible width to which the column can be resized.\n */\n get restrictResizeMax() {\n const actualWidth = this.getColumnHeaderRenderedWidth();\n const maxWidth = this.column.maxWidthPx;\n if (this.column.maxWidth) {\n return maxWidth - actualWidth;\n }\n else {\n return Number.MAX_SAFE_INTEGER;\n }\n }\n /**\n * Autosizes the column to the longest currently visible cell value, including the header cell.\n * If the column has a predifined maxWidth and the autosized column width will become bigger than it,\n * then the column is sized to its maxWidth.\n */\n autosizeColumnOnDblClick() {\n const currentColWidth = this.getColumnHeaderRenderedWidth();\n this.column.width = this.column.getAutoSize();\n this.zone.run(() => { });\n this.column.grid.columnResized.emit({\n column: this.column,\n prevWidth: currentColWidth.toString(),\n newWidth: this.column.width\n });\n }\n /**\n * Resizes the column regaridng to the column minWidth and maxWidth.\n */\n resizeColumn(event) {\n this.showResizer = false;\n const diff = event.clientX - this.startResizePos;\n const colWidth = this.column.width;\n const isPercentageWidth = colWidth && typeof colWidth === 'string' && colWidth.indexOf('%') !== -1;\n let currentColWidth = parseFloat(colWidth);\n const actualWidth = this.getColumnHeaderRenderedWidth();\n currentColWidth = Number.isNaN(currentColWidth) ? parseFloat(actualWidth) : currentColWidth;\n if (this.column.grid.hasColumnLayouts) {\n this.resizeColumnLayoutFor(this.column, diff);\n }\n else if (isPercentageWidth) {\n this._handlePercentageResize(diff, this.column);\n }\n else {\n this._handlePixelResize(diff, this.column);\n }\n this.zone.run(() => { });\n if (currentColWidth !== parseFloat(this.column.width)) {\n this.column.grid.columnResized.emit({\n column: this.column,\n prevWidth: isPercentageWidth ? currentColWidth + '%' : currentColWidth + 'px',\n newWidth: this.column.width\n });\n }\n this.isColumnResizing = false;\n }\n _handlePixelResize(diff, column) {\n const currentColWidth = parseFloat(column.width);\n const colMinWidth = column.minWidthPx;\n const colMaxWidth = column.maxWidthPx;\n if (currentColWidth + diff < colMinWidth) {\n column.width = colMinWidth + 'px';\n }\n else if (colMaxWidth && (currentColWidth + diff > colMaxWidth)) {\n column.width = colMaxWidth + 'px';\n }\n else {\n column.width = (currentColWidth + diff) + 'px';\n }\n }\n _handlePercentageResize(diff, column) {\n const currentPercentWidth = parseFloat(column.width);\n const gridAvailableSize = column.grid.calcWidth;\n const diffPercentage = (diff / gridAvailableSize) * 100;\n const colMinWidth = column.minWidthPercent;\n const colMaxWidth = column.maxWidthPercent;\n if (currentPercentWidth + diffPercentage < colMinWidth) {\n column.width = colMinWidth + '%';\n }\n else if (colMaxWidth && (currentPercentWidth + diffPercentage > colMaxWidth)) {\n column.width = colMaxWidth + '%';\n }\n else {\n column.width = (currentPercentWidth + diffPercentage) + '%';\n }\n }\n getColMinWidth(column) {\n let currentColWidth = parseFloat(column.width);\n const actualWidth = column.headerCell.nativeElement.getBoundingClientRect().width;\n currentColWidth = Number.isNaN(currentColWidth) || (currentColWidth < actualWidth) ? actualWidth : currentColWidth;\n const actualMinWidth = parseFloat(column.minWidth);\n return actualMinWidth < currentColWidth ? actualMinWidth : currentColWidth;\n }\n resizeColumnLayoutFor(column, diff) {\n const relativeColumns = column.getResizableColUnderEnd();\n const combinedSpan = relativeColumns.reduce((acc, col) => acc + col.spanUsed, 0);\n // Resize first those who might reach min/max width\n let columnsToResize = [...relativeColumns];\n let updatedDiff = diff;\n let updatedCombinedSpan = combinedSpan;\n let setMinMaxCols = false;\n do {\n // Cycle them until there are not ones that reach min/max size, because the diff accumulates after each cycle.\n // This is because we can have at first 2 cols reaching min width and then after\n // recalculating the diff there might be 1 more that reaches min width.\n setMinMaxCols = false;\n let newCombinedSpan = updatedCombinedSpan;\n const newColsToResize = [];\n columnsToResize.forEach((col) => {\n const currentResizeWidth = parseFloat(col.target.calcWidth);\n const resizeScaled = (diff / updatedCombinedSpan) * col.target.gridColumnSpan;\n const colWidth = col.target.width;\n const isPercentageWidth = colWidth && typeof colWidth === 'string' && colWidth.indexOf('%') !== -1;\n const minWidth = col.target.minWidthPx;\n const maxWidth = col.target.maxWidthPx;\n if (currentResizeWidth + resizeScaled < minWidth) {\n col.target.width = isPercentageWidth ? col.target.minWidthPercent + '%' : minWidth + 'px';\n updatedDiff += (currentResizeWidth - minWidth);\n newCombinedSpan -= col.spanUsed;\n setMinMaxCols = true;\n }\n else if (maxWidth && (currentResizeWidth + resizeScaled > maxWidth)) {\n col.target.width = isPercentageWidth ? col.target.maxWidthPercent + '%' : col.target.maxWidthPx + 'px';\n updatedDiff -= (maxWidth - currentResizeWidth);\n newCombinedSpan -= col.spanUsed;\n setMinMaxCols = true;\n }\n else {\n // Save new ones that can be resized\n newColsToResize.push(col);\n }\n });\n updatedCombinedSpan = newCombinedSpan;\n columnsToResize = newColsToResize;\n } while (setMinMaxCols);\n // Those left that don't reach min/max size resize them normally.\n columnsToResize.forEach((col) => {\n const resizeScaled = (updatedDiff / updatedCombinedSpan) * col.target.gridColumnSpan;\n const colWidth = col.target.width;\n const isPercentageWidth = colWidth && typeof colWidth === 'string' && colWidth.indexOf('%') !== -1;\n if (isPercentageWidth) {\n this._handlePercentageResize(resizeScaled, col.target);\n }\n else {\n this._handlePixelResize(resizeScaled, col.target);\n }\n });\n }\n}\nIgxColumnResizingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnResizingService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nIgxColumnResizingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnResizingService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnResizingService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });\n\nclass IgxGridColumnResizerComponent {\n constructor(colResizingService) {\n this.colResizingService = colResizingService;\n }\n}\nIgxGridColumnResizerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridColumnResizerComponent, deps: [{ token: IgxColumnResizingService }], target: i0.ɵɵFactoryTarget.Component });\nIgxGridColumnResizerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridColumnResizerComponent, selector: \"igx-grid-column-resizer\", inputs: { restrictResizerTop: \"restrictResizerTop\" }, viewQueries: [{ propertyName: \"resizer\", first: true, predicate: IgxColumnResizerDirective, descendants: true, static: true }], ngImport: i0, template: \"
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: IgxColumnResizerDirective, selector: \"[igxResizer]\", inputs: [\"restrictHResizeMin\", \"restrictHResizeMax\", \"restrictResizerTop\"], outputs: [\"resizeEnd\", \"resizeStart\", \"resize\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridColumnResizerComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-column-resizer', template: \"
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxColumnResizingService }]; }, propDecorators: { restrictResizerTop: [{\n type: Input\n }], resizer: [{\n type: ViewChild,\n args: [IgxColumnResizerDirective, { static: true }]\n }] } });\n\n/**\n * @hidden\n * @internal\n */\nclass IgxColumnMovingDragDirective extends IgxDragDirective {\n get draggable() {\n return this.column && (this.column.grid.moving || (this.column.groupable && !this.column.columnGroup));\n }\n get icon() {\n return this.cms.icon;\n }\n constructor(element, viewContainer, zone, renderer, cdr, cms, _platformUtil) {\n super(cdr, element, viewContainer, zone, renderer, _platformUtil);\n this.cms = cms;\n this._ghostClass = 'igx-grid__drag-ghost-image';\n this.ghostImgIconClass = 'igx-grid__drag-ghost-image-icon';\n this.ghostImgIconGroupClass = 'igx-grid__drag-ghost-image-icon-group';\n this.columnSelectedClass = 'igx-grid-th--selected';\n }\n ngOnDestroy() {\n this._unsubscribe();\n super.ngOnDestroy();\n }\n onEscape(event) {\n this.cms.cancelDrop = true;\n this.onPointerUp(event);\n }\n onPointerDown(event) {\n if (!this.draggable || event.target.getAttribute('draggable') === 'false') {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n this._removeOnDestroy = false;\n this.cms.column = this.column;\n this.ghostClass = this._ghostClass;\n super.onPointerDown(event);\n this.column.grid.cdr.detectChanges();\n const args = {\n source: this.column\n };\n this.column.grid.columnMovingStart.emit(args);\n this.subscription$ = fromEvent(this.column.grid.document.defaultView, 'keydown').subscribe((ev) => {\n if (ev.key === this.platformUtil.KEYMAP.ESCAPE) {\n this.onEscape(ev);\n }\n });\n }\n onPointerMove(event) {\n event.preventDefault();\n super.onPointerMove(event);\n if (this._dragStarted && this.ghostElement && !this.cms.column) {\n this.cms.column = this.column;\n this.column.grid.cdr.detectChanges();\n }\n if (this.cms.column) {\n const args = {\n source: this.column,\n cancel: false\n };\n this.column.grid.columnMoving.emit(args);\n if (args.cancel) {\n this.onEscape(event);\n }\n }\n }\n onPointerUp(event) {\n // Run it explicitly inside the zone because sometimes onPointerUp executes after the code below.\n this.zone.run(() => {\n super.onPointerUp(event);\n this.cms.column = null;\n this.column.grid.cdr.detectChanges();\n });\n this._unsubscribe();\n }\n createGhost(pageX, pageY) {\n super.createGhost(pageX, pageY);\n this.ghostElement.style.height = null;\n this.ghostElement.style.minWidth = null;\n this.ghostElement.style.flexBasis = null;\n this.ghostElement.style.position = null;\n this.renderer.removeClass(this.ghostElement, this.columnSelectedClass);\n const icon = document.createElement('i');\n const text = document.createTextNode('block');\n icon.appendChild(text);\n icon.classList.add('material-icons');\n this.cms.icon = icon;\n if (!this.column.columnGroup) {\n this.renderer.addClass(icon, this.ghostImgIconClass);\n this.ghostElement.insertBefore(icon, this.ghostElement.firstElementChild);\n this.ghostLeft = this._ghostStartX = pageX - ((this.ghostElement.getBoundingClientRect().width / 3) * 2);\n this.ghostTop = this._ghostStartY = pageY - ((this.ghostElement.getBoundingClientRect().height / 3) * 2);\n }\n else {\n this.ghostElement.insertBefore(icon, this.ghostElement.childNodes[0]);\n this.renderer.addClass(icon, this.ghostImgIconGroupClass);\n this.ghostElement.children[0].style.paddingLeft = '0px';\n this.ghostLeft = this._ghostStartX = pageX - ((this.ghostElement.getBoundingClientRect().width / 3) * 2);\n this.ghostTop = this._ghostStartY = pageY - ((this.ghostElement.getBoundingClientRect().height / 3) * 2);\n }\n }\n _unsubscribe() {\n if (this.subscription$) {\n this.subscription$.unsubscribe();\n this.subscription$ = null;\n }\n }\n}\nIgxColumnMovingDragDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnMovingDragDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: IgxColumnMovingService }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxColumnMovingDragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxColumnMovingDragDirective, selector: \"[igxColumnMovingDrag]\", inputs: { column: [\"igxColumnMovingDrag\", \"column\"] }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnMovingDragDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxColumnMovingDrag]' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: IgxColumnMovingService }, { type: PlatformUtil }]; }, propDecorators: { column: [{\n type: Input,\n args: ['igxColumnMovingDrag']\n }] } });\n\n/**\n * An internal component representing a base group-by drop area.\n *\n * @hidden @internal\n */\nclass IgxGroupByAreaDirective {\n get cosyStyle() {\n return this.density === 'cosy';\n }\n get compactStyle() {\n return this.density === 'compact';\n }\n /**\n * The group-by expressions provided by the parent grid.\n */\n get expressions() {\n return this._expressions;\n }\n set expressions(value) {\n this._expressions = value;\n this.chipExpressions = this._expressions;\n this.expressionsChanged();\n this.expressionsChange.emit(this._expressions);\n }\n /**\n * The default message for the default drop area template.\n * Obviously, if another template is provided, this is ignored.\n */\n get dropAreaMessage() {\n return this._dropAreaMessage ?? this.grid.resourceStrings.igx_grid_groupByArea_message;\n }\n set dropAreaMessage(value) {\n this._dropAreaMessage = value;\n }\n /** The native DOM element. Used in sizing calculations. */\n get nativeElement() {\n return this.ref.nativeElement;\n }\n constructor(ref, platform) {\n this.ref = ref;\n this.platform = platform;\n this.density = DisplayDensity.comfortable;\n this.defaultClass = true;\n this.expressionsChange = new EventEmitter();\n this._expressions = [];\n }\n get dropAreaVisible() {\n return (this.grid.columnInDrag && this.grid.columnInDrag.groupable) ||\n !this.expressions.length;\n }\n handleKeyDown(id, event) {\n if (this.platform.isActivationKey(event)) {\n this.updateGroupSorting(id);\n }\n }\n handleClick(id) {\n if (!this.grid.getColumnByName(id).groupable) {\n return;\n }\n this.updateGroupSorting(id);\n }\n onDragDrop(event) {\n const drag = event.detail.owner;\n if (drag instanceof IgxColumnMovingDragDirective) {\n const column = drag.column;\n if (!this.grid.columns.find(c => c === column)) {\n return;\n }\n const isGrouped = this.expressions.findIndex((item) => item.fieldName === column.field) !== -1;\n if (column.groupable && !isGrouped && !column.columnGroup && !!column.field) {\n const groupingExpression = {\n fieldName: column.field,\n dir: this.grid.sortingExpressions.find(expr => expr.fieldName === column.field)?.dir || SortingDirection.Asc,\n ignoreCase: column.sortingIgnoreCase,\n strategy: column.sortStrategy,\n groupingComparer: column.groupingComparer\n };\n this.groupBy(groupingExpression);\n }\n }\n }\n getReorderedExpressions(chipsArray) {\n const newExpressions = [];\n chipsArray.forEach(chip => {\n const expr = this.expressions.find(item => item.fieldName === chip.id);\n // disallow changing order if there are columns with groupable: false\n if (!this.grid.getColumnByName(expr.fieldName)?.groupable) {\n return;\n }\n newExpressions.push(expr);\n });\n return newExpressions;\n }\n updateGroupSorting(id) {\n const expr = this.expressions.find(e => e.fieldName === id);\n expr.dir = 3 - expr.dir;\n const expressionsChangeEvent = this.grid.groupingExpressionsChange || this.expressionsChange;\n expressionsChangeEvent.emit(this.expressions);\n this.grid.pipeTrigger++;\n this.grid.notifyChanges();\n }\n expressionsChanged() {\n }\n}\nIgxGroupByAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByAreaDirective, deps: [{ token: i0.ElementRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGroupByAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGroupByAreaDirective, inputs: { dropAreaTemplate: \"dropAreaTemplate\", density: \"density\", grid: \"grid\", expressions: \"expressions\", dropAreaMessage: \"dropAreaMessage\" }, outputs: { expressionsChange: \"expressionsChange\" }, host: { properties: { \"class.igx-grid-grouparea\": \"this.defaultClass\", \"class.igx-grid-grouparea--cosy\": \"this.cosyStyle\", \"class.igx-grid-grouparea--compact\": \"this.compactStyle\" } }, viewQueries: [{ propertyName: \"chips\", predicate: IgxChipComponent, descendants: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByAreaDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: PlatformUtil }]; }, propDecorators: { dropAreaTemplate: [{\n type: Input\n }], density: [{\n type: Input\n }], defaultClass: [{\n type: HostBinding,\n args: ['class.igx-grid-grouparea']\n }], cosyStyle: [{\n type: HostBinding,\n args: ['class.igx-grid-grouparea--cosy']\n }], compactStyle: [{\n type: HostBinding,\n args: ['class.igx-grid-grouparea--compact']\n }], grid: [{\n type: Input\n }], expressions: [{\n type: Input\n }], dropAreaMessage: [{\n type: Input\n }], expressionsChange: [{\n type: Output\n }], chips: [{\n type: ViewChildren,\n args: [IgxChipComponent]\n }] } });\n/**\n * A pipe to circumvent the use of getters/methods just to get some additional\n * information from the grouping expression and pass it to the chip representing\n * that expression.\n *\n * @hidden @internal\n */\nclass IgxGroupByMetaPipe {\n transform(key, grid) {\n const column = grid.getColumnByName(key);\n return { groupable: !!column?.groupable, title: column?.header || key };\n }\n}\nIgxGroupByMetaPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByMetaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGroupByMetaPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByMetaPipe, name: \"igxGroupByMeta\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByMetaPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'igxGroupByMeta' }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxGroupByRowTemplateDirective {\n static ngTemplateContextGuard(_dir, ctx) {\n return true;\n }\n ;\n constructor(template) {\n this.template = template;\n }\n}\nIgxGroupByRowTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByRowTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGroupByRowTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGroupByRowTemplateDirective, selector: \"[igxGroupByRow]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByRowTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGroupByRow]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * @hidden\n */\nclass IgxGridDetailTemplateDirective {\n static ngTemplateContextGuard(_dir, ctx) {\n return true;\n }\n ;\n}\nIgxGridDetailTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridDetailTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxGridDetailTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridDetailTemplateDirective, selector: \"[igxGridDetail]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridDetailTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGridDetail]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxRowExpandedIndicatorDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowExpandedIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowExpandedIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowExpandedIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowExpandedIndicatorDirective, selector: \"[igxRowExpandedIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowExpandedIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowExpandedIndicator]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxRowCollapsedIndicatorDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowCollapsedIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowCollapsedIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowCollapsedIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowCollapsedIndicatorDirective, selector: \"[igxRowCollapsedIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowCollapsedIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowCollapsedIndicator]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxHeaderExpandIndicatorDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxHeaderExpandIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHeaderExpandIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxHeaderExpandIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHeaderExpandIndicatorDirective, selector: \"[igxHeaderExpandedIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHeaderExpandIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxHeaderExpandedIndicator]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxHeaderCollapseIndicatorDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxHeaderCollapseIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHeaderCollapseIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxHeaderCollapseIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHeaderCollapseIndicatorDirective, selector: \"[igxHeaderCollapsedIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHeaderCollapseIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxHeaderCollapsedIndicator]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxExcelStyleHeaderIconDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxExcelStyleHeaderIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleHeaderIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxExcelStyleHeaderIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxExcelStyleHeaderIconDirective, selector: \"[igxExcelStyleHeaderIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxExcelStyleHeaderIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxExcelStyleHeaderIcon]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxSortHeaderIconDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxSortHeaderIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortHeaderIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSortHeaderIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSortHeaderIconDirective, selector: \"[igxSortHeaderIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortHeaderIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSortHeaderIcon]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxSortAscendingHeaderIconDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxSortAscendingHeaderIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortAscendingHeaderIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSortAscendingHeaderIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSortAscendingHeaderIconDirective, selector: \"[igxSortAscendingHeaderIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortAscendingHeaderIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSortAscendingHeaderIcon]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxSortDescendingHeaderIconDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxSortDescendingHeaderIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortDescendingHeaderIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxSortDescendingHeaderIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSortDescendingHeaderIconDirective, selector: \"[igxSortDescendingHeaderIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortDescendingHeaderIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSortDescendingHeaderIcon]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxGroupAreaDropDirective extends IgxDropDirective {\n constructor(groupArea, elementRef, renderer, zone) {\n super(elementRef, renderer, zone);\n this.groupArea = groupArea;\n this.elementRef = elementRef;\n this.hovered = false;\n }\n onDragEnter(event) {\n const drag = event.detail.owner;\n const column = drag.column;\n if (!this.columnBelongsToGrid(column)) {\n return;\n }\n const isGrouped = this.groupArea.expressions\n ? this.groupArea.expressions.findIndex((item) => item.fieldName === column.field) !== -1\n : false;\n if (column.groupable && !isGrouped && !column.columnGroup && !!column.field) {\n drag.icon.innerText = 'group_work';\n this.hovered = true;\n }\n else {\n drag.icon.innerText = 'block';\n this.hovered = false;\n }\n }\n onDragLeave(event) {\n const drag = event.detail.owner;\n const column = drag.column;\n if (!this.columnBelongsToGrid(column)) {\n return;\n }\n event.detail.owner.icon.innerText = 'block';\n this.hovered = false;\n }\n closestParentByAttr(elem, attr) {\n return elem.hasAttribute(attr) ?\n elem :\n this.closestParentByAttr(elem.parentElement, attr);\n }\n columnBelongsToGrid(column) {\n const elem = this.elementRef.nativeElement;\n const closestGridID = this.closestParentByAttr(elem, 'igxGroupAreaDrop').getAttribute('gridId');\n if (!column) {\n return false;\n }\n else {\n const grid = column.grid;\n if (!grid || grid.id !== closestGridID) {\n return false;\n }\n return true;\n }\n }\n}\nIgxGroupAreaDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupAreaDropDirective, deps: [{ token: IgxGroupByAreaDirective }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGroupAreaDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGroupAreaDropDirective, selector: \"[igxGroupAreaDrop]\", host: { properties: { \"class.igx-drop-area--hover\": \"this.hovered\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupAreaDropDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGroupAreaDrop]'\n }]\n }], ctorParameters: function () { return [{ type: IgxGroupByAreaDirective }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { hovered: [{\n type: HostBinding,\n args: ['class.igx-drop-area--hover']\n }] } });\n\nclass IgxQueryBuilderHeaderComponent {\n constructor() {\n this._resourceStrings = CurrentResourceStrings.QueryBuilderResStrings;\n /**\n * An @Input property to show/hide the legend.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.showLegend = true;\n }\n /**\n * Sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * Returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n}\nIgxQueryBuilderHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxQueryBuilderHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxQueryBuilderHeaderComponent, selector: \"igx-query-builder-header\", inputs: { title: \"title\", showLegend: \"showLegend\", resourceStrings: \"resourceStrings\" }, ngImport: i0, template: \"
    \\n
    \\n {{ title }}\\n \\n
    \\n
    \\n
    \\n {{this.resourceStrings.igx_query_builder_and_label}}\\n
    \\n
    \\n {{this.resourceStrings.igx_query_builder_or_label}}\\n
    \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderHeaderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-query-builder-header', template: \"
    \\n
    \\n {{ title }}\\n \\n
    \\n
    \\n
    \\n {{this.resourceStrings.igx_query_builder_and_label}}\\n
    \\n
    \\n {{this.resourceStrings.igx_query_builder_or_label}}\\n
    \\n
    \\n
    \\n\" }]\n }], propDecorators: { title: [{\n type: Input\n }], showLegend: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }] } });\n\nconst DEFAULT_PIPE_DATE_FORMAT = 'mediumDate';\nconst DEFAULT_PIPE_TIME_FORMAT = 'mediumTime';\nconst DEFAULT_PIPE_DATE_TIME_FORMAT = 'medium';\nconst DEFAULT_PIPE_DIGITS_INFO = '1.0-3';\nconst DEFAULT_DATE_TIME_FORMAT = 'dd/MM/yyyy HH:mm:ss tt';\nconst DEFAULT_TIME_FORMAT = 'hh:mm:ss tt';\nclass IgxFieldFormatterPipe {\n transform(value, formatter, rowData, fieldData) {\n return formatter(value, rowData, fieldData);\n }\n}\nIgxFieldFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFieldFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxFieldFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFieldFormatterPipe, name: \"fieldFormatter\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFieldFormatterPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'fieldFormatter' }]\n }] });\n/**\n * @hidden @internal\n */\nclass ExpressionItem {\n constructor(parent) {\n this.parent = parent;\n }\n}\n/**\n * @hidden @internal\n */\nclass ExpressionGroupItem extends ExpressionItem {\n constructor(operator, parent) {\n super(parent);\n this.operator = operator;\n this.children = [];\n }\n}\n/**\n * @hidden @internal\n */\nclass ExpressionOperandItem extends ExpressionItem {\n constructor(expression, parent) {\n super(parent);\n this.expression = expression;\n }\n}\n/**\n * A component used for operating with complex filters by creating or editing conditions\n * and grouping them using AND/OR logic.\n * It is used internally in the Advanced Filtering of the Grid.\n *\n * @example\n * ```html\n * \n * \n * ```\n */\nclass IgxQueryBuilderComponent extends DisplayDensityBase {\n /**\n * @hidden @internal\n */\n set editingInputsContainer(value) {\n if ((value && !this._editingInputsContainer) ||\n (value && this._editingInputsContainer && this._editingInputsContainer.nativeElement !== value.nativeElement)) {\n requestAnimationFrame(() => {\n this.scrollElementIntoView(value.nativeElement);\n });\n }\n this._editingInputsContainer = value;\n }\n /**\n * @hidden @internal\n */\n get editingInputsContainer() {\n return this._editingInputsContainer;\n }\n /**\n * @hidden @internal\n */\n set addModeContainer(value) {\n if ((value && !this._addModeContainer) ||\n (value && this._addModeContainer && this._addModeContainer.nativeElement !== value.nativeElement)) {\n requestAnimationFrame(() => {\n this.scrollElementIntoView(value.nativeElement);\n });\n }\n this._addModeContainer = value;\n }\n /**\n * @hidden @internal\n */\n get addModeContainer() {\n return this._addModeContainer;\n }\n /**\n * @hidden @internal\n */\n set currentGroupButtonsContainer(value) {\n if ((value && !this._currentGroupButtonsContainer) ||\n (value && this._currentGroupButtonsContainer && this._currentGroupButtonsContainer.nativeElement !== value.nativeElement)) {\n requestAnimationFrame(() => {\n this.scrollElementIntoView(value.nativeElement);\n });\n }\n this._currentGroupButtonsContainer = value;\n }\n /**\n * @hidden @internal\n */\n get currentGroupButtonsContainer() {\n return this._currentGroupButtonsContainer;\n }\n constructor(cdr, iconService, platform, _localeId, _displayDensityOptions) {\n super(_displayDensityOptions);\n this.cdr = cdr;\n this.iconService = iconService;\n this.platform = platform;\n this._localeId = _localeId;\n this._displayDensityOptions = _displayDensityOptions;\n /**\n * @hidden @internal\n */\n this.cssClass = 'igx-query-builder';\n /**\n * @hidden @internal\n */\n this.display = 'block';\n /**\n * @hidden @internal\n */\n this.selectedExpressions = [];\n /**\n * @hidden @internal\n */\n this.selectedGroups = [];\n /**\n * @hidden @internal\n */\n this.lastActiveNode = {};\n /**\n * @hidden @internal\n */\n this.fieldSelectOverlaySettings = {\n scrollStrategy: new AbsoluteScrollStrategy(),\n modal: false,\n closeOnOutsideClick: false\n };\n /**\n * @hidden @internal\n */\n this.conditionSelectOverlaySettings = {\n scrollStrategy: new AbsoluteScrollStrategy(),\n modal: false,\n closeOnOutsideClick: false\n };\n this.destroy$ = new Subject();\n this._dblClickDelay = 200;\n this._preventChipClick = false;\n this._resourceStrings = CurrentResourceStrings.QueryBuilderResStrings;\n this._positionSettings = {\n horizontalStartPoint: HorizontalAlignment.Right,\n verticalStartPoint: VerticalAlignment.Top\n };\n /**\n * Event fired as the expression tree is changed.\n *\n * ```html\n * \n * ```\n */\n this.expressionTreeChange = new EventEmitter();\n /**\n * @hidden @internal\n */\n this.overlaySettings = {\n closeOnOutsideClick: false,\n modal: false,\n positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),\n scrollStrategy: new CloseScrollStrategy()\n };\n this.locale = this.locale || this._localeId;\n }\n /**\n * @hidden @internal\n */\n ngAfterViewInit() {\n this.overlaySettings.outlet = this.overlayOutlet;\n this.fieldSelectOverlaySettings.outlet = this.overlayOutlet;\n this.conditionSelectOverlaySettings.outlet = this.overlayOutlet;\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden @internal\n */\n set selectedField(value) {\n const oldValue = this._selectedField;\n if (this._selectedField !== value) {\n this._selectedField = value;\n if (oldValue && this._selectedField && this._selectedField.dataType !== oldValue.dataType) {\n this.selectedCondition = null;\n this.searchValue = null;\n this.cdr.detectChanges();\n }\n }\n }\n /**\n * @hidden @internal\n */\n get selectedField() {\n return this._selectedField;\n }\n /**\n * Returns the fields.\n */\n get fields() {\n return this._fields;\n }\n /**\n * An @Input property that sets the fields.\n */\n set fields(fields) {\n this._fields = fields;\n if (this._fields) {\n this.registerSVGIcons();\n this._fields.forEach(field => {\n this.setFilters(field);\n this.setFormat(field);\n });\n }\n }\n /**\n * Returns the expression tree.\n */\n get expressionTree() {\n return this._expressionTree;\n }\n /**\n * An @Input property that sets the expression tree.\n */\n set expressionTree(expressionTree) {\n this._expressionTree = expressionTree;\n this.init();\n }\n /**\n * Gets the `locale` of the query builder.\n * If not set, defaults to application's locale.\n */\n get locale() {\n return this._locale;\n }\n /**\n * Sets the `locale` of the query builder.\n * Expects a valid BCP 47 language tag.\n */\n set locale(value) {\n this._locale = value;\n // if value is invalid, set it back to _localeId\n try {\n getLocaleFirstDayOfWeek(this._locale);\n }\n catch (e) {\n this._locale = this._localeId;\n }\n }\n /**\n * Sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * Returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n /**\n * @hidden @internal\n */\n setPickerOutlet(outlet) {\n this.pickerOutlet = outlet;\n }\n /**\n * @hidden @internal\n */\n get isContextMenuVisible() {\n return !this.contextMenuToggle.collapsed;\n }\n /**\n * @hidden @internal\n */\n get hasEditedExpression() {\n return this.editedExpression !== undefined && this.editedExpression !== null;\n }\n /**\n * @hidden @internal\n */\n addCondition(parent, afterExpression) {\n this.cancelOperandAdd();\n const operandItem = new ExpressionOperandItem({\n fieldName: null,\n condition: null,\n ignoreCase: true,\n searchVal: null\n }, parent);\n if (afterExpression) {\n const index = parent.children.indexOf(afterExpression);\n parent.children.splice(index + 1, 0, operandItem);\n }\n else {\n parent.children.push(operandItem);\n }\n this.enterExpressionEdit(operandItem);\n }\n /**\n * @hidden @internal\n */\n addAndGroup(parent, afterExpression) {\n this.addGroup(FilteringLogic.And, parent, afterExpression);\n }\n /**\n * @hidden @internal\n */\n addOrGroup(parent, afterExpression) {\n this.addGroup(FilteringLogic.Or, parent, afterExpression);\n }\n /**\n * @hidden @internal\n */\n endGroup(groupItem) {\n this.currentGroup = groupItem.parent;\n }\n /**\n * @hidden @internal\n */\n commitOperandEdit() {\n if (this.editedExpression) {\n this.editedExpression.expression.fieldName = this.selectedField.field;\n this.editedExpression.expression.condition = this.selectedField.filters.condition(this.selectedCondition);\n this.editedExpression.expression.searchVal = DataUtil.parseValue(this.selectedField.dataType, this.searchValue);\n this.editedExpression.fieldLabel = this.selectedField.label\n ? this.selectedField.label\n : this.selectedField.header\n ? this.selectedField.header\n : this.selectedField.field;\n this.editedExpression.inEditMode = false;\n this.editedExpression = null;\n }\n this._expressionTree = this.createExpressionTreeFromGroupItem(this.rootGroup);\n this.expressionTreeChange.emit();\n }\n /**\n * @hidden @internal\n */\n cancelOperandAdd() {\n if (this.addModeExpression) {\n this.addModeExpression.inAddMode = false;\n this.addModeExpression = null;\n }\n }\n /**\n * @hidden @internal\n */\n cancelOperandEdit() {\n if (this.editedExpression) {\n this.editedExpression.inEditMode = false;\n if (!this.editedExpression.expression.fieldName) {\n this.deleteItem(this.editedExpression);\n }\n this.editedExpression = null;\n }\n }\n /**\n * @hidden @internal\n */\n operandCanBeCommitted() {\n return this.selectedField && this.selectedCondition &&\n (!!this.searchValue || this.selectedField.filters.condition(this.selectedCondition).isUnary);\n }\n /**\n * @hidden @internal\n */\n exitOperandEdit() {\n if (!this.editedExpression) {\n return;\n }\n if (this.operandCanBeCommitted()) {\n this.commitOperandEdit();\n }\n else {\n this.cancelOperandEdit();\n }\n }\n /**\n * @hidden @internal\n */\n isExpressionGroup(expression) {\n return expression instanceof ExpressionGroupItem;\n }\n /**\n * @hidden @internal\n */\n onChipRemove(expressionItem) {\n this.deleteItem(expressionItem);\n }\n /**\n * @hidden @internal\n */\n onChipClick(expressionItem) {\n this._clickTimer = setTimeout(() => {\n if (!this._preventChipClick) {\n this.onToggleExpression(expressionItem);\n }\n this._preventChipClick = false;\n }, this._dblClickDelay);\n }\n /**\n * @hidden @internal\n */\n onChipDblClick(expressionItem) {\n clearTimeout(this._clickTimer);\n this._preventChipClick = true;\n this.enterExpressionEdit(expressionItem);\n }\n /**\n * @hidden @internal\n */\n enterExpressionEdit(expressionItem) {\n this.clearSelection();\n this.exitOperandEdit();\n this.cancelOperandAdd();\n if (this.editedExpression) {\n this.editedExpression.inEditMode = false;\n }\n expressionItem.hovered = false;\n this.selectedField = expressionItem.expression.fieldName ?\n this.fields.find(field => field.field === expressionItem.expression.fieldName) : null;\n this.selectedCondition = expressionItem.expression.condition ?\n expressionItem.expression.condition.name : null;\n this.searchValue = expressionItem.expression.searchVal;\n expressionItem.inEditMode = true;\n this.editedExpression = expressionItem;\n this.cdr.detectChanges();\n this.fieldSelectOverlaySettings.target = this.fieldSelect.element;\n this.fieldSelectOverlaySettings.excludeFromOutsideClick = [this.fieldSelect.element];\n this.fieldSelectOverlaySettings.positionStrategy = new AutoPositionStrategy();\n this.conditionSelectOverlaySettings.target = this.conditionSelect.element;\n this.conditionSelectOverlaySettings.excludeFromOutsideClick = [this.conditionSelect.element];\n this.conditionSelectOverlaySettings.positionStrategy = new AutoPositionStrategy();\n if (!this.selectedField) {\n this.fieldSelect.input.nativeElement.focus();\n }\n else if (this.selectedField.filters.condition(this.selectedCondition).isUnary) {\n this.conditionSelect.input.nativeElement.focus();\n }\n else {\n const input = this.searchValueInput?.nativeElement || this.picker?.getEditElement();\n input.focus();\n }\n }\n /**\n * @hidden @internal\n */\n clearSelection() {\n for (const group of this.selectedGroups) {\n group.selected = false;\n }\n this.selectedGroups = [];\n for (const expr of this.selectedExpressions) {\n expr.selected = false;\n }\n this.selectedExpressions = [];\n this.toggleContextMenu();\n }\n /**\n * @hidden @internal\n */\n enterExpressionAdd(expressionItem) {\n this.clearSelection();\n this.exitOperandEdit();\n if (this.addModeExpression) {\n this.addModeExpression.inAddMode = false;\n }\n expressionItem.inAddMode = true;\n this.addModeExpression = expressionItem;\n if (expressionItem.selected) {\n this.toggleExpression(expressionItem);\n }\n }\n /**\n * @hidden @internal\n */\n contextMenuClosed() {\n this.contextualGroup = null;\n }\n /**\n * @hidden @internal\n */\n onKeyDown(eventArgs) {\n eventArgs.stopPropagation();\n const key = eventArgs.key;\n if (!this.contextMenuToggle.collapsed && (key === this.platform.KEYMAP.ESCAPE)) {\n this.clearSelection();\n }\n }\n /**\n * @hidden @internal\n */\n createAndGroup() {\n this.createGroup(FilteringLogic.And);\n }\n /**\n * @hidden @internal\n */\n createOrGroup() {\n this.createGroup(FilteringLogic.Or);\n }\n /**\n * @hidden @internal\n */\n deleteFilters() {\n for (const expr of this.selectedExpressions) {\n this.deleteItem(expr);\n }\n this.clearSelection();\n }\n /**\n * @hidden @internal\n */\n onGroupClick(groupItem) {\n this.toggleGroup(groupItem);\n }\n /**\n * @hidden @internal\n */\n ungroup() {\n const selectedGroup = this.contextualGroup;\n const parent = selectedGroup.parent;\n if (parent) {\n const index = parent.children.indexOf(selectedGroup);\n parent.children.splice(index, 1, ...selectedGroup.children);\n for (const expr of selectedGroup.children) {\n expr.parent = parent;\n }\n }\n this.clearSelection();\n this.commitOperandEdit();\n }\n /**\n * @hidden @internal\n */\n deleteGroup() {\n const selectedGroup = this.contextualGroup;\n const parent = selectedGroup.parent;\n if (parent) {\n const index = parent.children.indexOf(selectedGroup);\n parent.children.splice(index, 1);\n }\n else {\n this.rootGroup = null;\n }\n this.clearSelection();\n this.commitOperandEdit();\n }\n /**\n * @hidden @internal\n */\n selectFilteringLogic(event) {\n this.contextualGroup.operator = event.index;\n this.commitOperandEdit();\n }\n /**\n * @hidden @internal\n */\n getConditionFriendlyName(name) {\n return this.resourceStrings[`igx_query_builder_filter_${name}`] || name;\n }\n /**\n * @hidden @internal\n */\n isDate(value) {\n return value instanceof Date;\n }\n /**\n * @hidden @internal\n */\n onExpressionsScrolled() {\n if (!this.contextMenuToggle.collapsed) {\n this.calculateContextMenuTarget();\n this.contextMenuToggle.reposition();\n }\n }\n /**\n * @hidden @internal\n */\n invokeClick(eventArgs) {\n if (this.platform.isActivationKey(eventArgs)) {\n eventArgs.preventDefault();\n eventArgs.currentTarget.click();\n }\n }\n /**\n * @hidden @internal\n */\n openPicker(args) {\n if (this.platform.isActivationKey(args)) {\n args.preventDefault();\n this.picker.open();\n }\n }\n /**\n * @hidden @internal\n */\n onOutletPointerDown(event) {\n // This prevents closing the select's dropdown when clicking the scroll\n event.preventDefault();\n }\n /**\n * @hidden @internal\n */\n getConditionList() {\n return this.selectedField ? this.selectedField.filters.conditionList() : [];\n }\n /**\n * @hidden @internal\n */\n getFormatter(field) {\n return this.fields.find(el => el.field === field).formatter;\n }\n /**\n * @hidden @internal\n */\n getFormat(field) {\n return this.fields.find(el => el.field === field).pipeArgs.format;\n }\n /**\n * @hidden @internal\n */\n setAddButtonFocus() {\n if (this.addRootAndGroupButton) {\n this.addRootAndGroupButton.nativeElement.focus();\n }\n else if (this.addConditionButton) {\n this.addConditionButton.nativeElement.focus();\n }\n }\n /**\n * @hidden @internal\n */\n context(expression, afterExpression) {\n return {\n $implicit: expression,\n afterExpression\n };\n }\n /**\n * @hidden @internal\n */\n onChipSelectionEnd() {\n const contextualGroup = this.findSingleSelectedGroup();\n if (contextualGroup || this.selectedExpressions.length > 1) {\n this.contextualGroup = contextualGroup;\n this.calculateContextMenuTarget();\n if (this.contextMenuToggle.collapsed) {\n this.contextMenuToggle.open(this.overlaySettings);\n }\n else {\n this.contextMenuToggle.reposition();\n }\n }\n }\n setFormat(field) {\n if (!field.pipeArgs) {\n field.pipeArgs = { digitsInfo: DEFAULT_PIPE_DIGITS_INFO };\n }\n if (!field.pipeArgs.format) {\n field.pipeArgs.format = field.dataType === DataType.Time ?\n DEFAULT_PIPE_TIME_FORMAT : field.dataType === DataType.DateTime ?\n DEFAULT_PIPE_DATE_TIME_FORMAT : DEFAULT_PIPE_DATE_FORMAT;\n }\n if (!field.defaultDateTimeFormat) {\n field.defaultDateTimeFormat = DEFAULT_DATE_TIME_FORMAT;\n }\n if (!field.defaultTimeFormat) {\n field.defaultTimeFormat = DEFAULT_TIME_FORMAT;\n }\n }\n setFilters(field) {\n if (!field.filters) {\n switch (field.dataType) {\n case DataType.Boolean:\n field.filters = IgxBooleanFilteringOperand.instance();\n break;\n case DataType.Number:\n case DataType.Currency:\n case DataType.Percent:\n field.filters = IgxNumberFilteringOperand.instance();\n break;\n case DataType.Date:\n field.filters = IgxDateFilteringOperand.instance();\n break;\n case DataType.Time:\n field.filters = IgxTimeFilteringOperand.instance();\n break;\n case DataType.DateTime:\n field.filters = IgxDateTimeFilteringOperand.instance();\n break;\n case DataType.String:\n default:\n field.filters = IgxStringFilteringOperand.instance();\n break;\n }\n }\n }\n onToggleExpression(expressionItem) {\n this.exitOperandEdit();\n this.toggleExpression(expressionItem);\n this.toggleContextMenu();\n }\n toggleExpression(expressionItem) {\n expressionItem.selected = !expressionItem.selected;\n if (expressionItem.selected) {\n this.selectedExpressions.push(expressionItem);\n }\n else {\n const index = this.selectedExpressions.indexOf(expressionItem);\n this.selectedExpressions.splice(index, 1);\n this.deselectParentRecursive(expressionItem);\n }\n }\n addGroup(operator, parent, afterExpression) {\n this.cancelOperandAdd();\n const groupItem = new ExpressionGroupItem(operator, parent);\n if (parent) {\n if (afterExpression) {\n const index = parent.children.indexOf(afterExpression);\n parent.children.splice(index + 1, 0, groupItem);\n }\n else {\n parent.children.push(groupItem);\n }\n }\n else {\n this.rootGroup = groupItem;\n }\n this.addCondition(groupItem);\n this.currentGroup = groupItem;\n }\n createExpressionGroupItem(expressionTree, parent) {\n let groupItem;\n if (expressionTree) {\n groupItem = new ExpressionGroupItem(expressionTree.operator, parent);\n for (const expr of expressionTree.filteringOperands) {\n if (expr instanceof FilteringExpressionsTree) {\n groupItem.children.push(this.createExpressionGroupItem(expr, groupItem));\n }\n else {\n const filteringExpr = expr;\n const exprCopy = {\n fieldName: filteringExpr.fieldName,\n condition: filteringExpr.condition,\n searchVal: filteringExpr.searchVal,\n ignoreCase: filteringExpr.ignoreCase\n };\n const operandItem = new ExpressionOperandItem(exprCopy, groupItem);\n const field = this.fields.find(el => el.field === filteringExpr.fieldName);\n operandItem.fieldLabel = field.label || field.header || field.field;\n groupItem.children.push(operandItem);\n }\n }\n }\n return groupItem;\n }\n /**\n * @hidden @internal\n */\n createExpressionTreeFromGroupItem(groupItem) {\n if (!groupItem) {\n return null;\n }\n const expressionTree = new FilteringExpressionsTree(groupItem.operator);\n for (const item of groupItem.children) {\n if (item instanceof ExpressionGroupItem) {\n const subTree = this.createExpressionTreeFromGroupItem(item);\n expressionTree.filteringOperands.push(subTree);\n }\n else {\n expressionTree.filteringOperands.push(item.expression);\n }\n }\n return expressionTree;\n }\n toggleContextMenu() {\n const contextualGroup = this.findSingleSelectedGroup();\n if (contextualGroup || this.selectedExpressions.length > 1) {\n this.contextualGroup = contextualGroup;\n if (contextualGroup) {\n this.filteringLogics = [\n {\n label: this.resourceStrings.igx_query_builder_filter_operator_and,\n selected: contextualGroup.operator === FilteringLogic.And\n },\n {\n label: this.resourceStrings.igx_query_builder_filter_operator_or,\n selected: contextualGroup.operator === FilteringLogic.Or\n }\n ];\n }\n }\n else if (this.contextMenuToggle) {\n this.contextMenuToggle.close();\n }\n }\n findSingleSelectedGroup() {\n for (const group of this.selectedGroups) {\n const containsAllSelectedExpressions = this.selectedExpressions.every(op => this.isInsideGroup(op, group));\n if (containsAllSelectedExpressions) {\n return group;\n }\n }\n return null;\n }\n isInsideGroup(item, group) {\n if (!item) {\n return false;\n }\n if (item.parent === group) {\n return true;\n }\n return this.isInsideGroup(item.parent, group);\n }\n deleteItem(expressionItem) {\n if (!expressionItem.parent) {\n this.rootGroup = null;\n this.currentGroup = null;\n this._expressionTree = null;\n return;\n }\n if (expressionItem === this.currentGroup) {\n this.currentGroup = this.currentGroup.parent;\n }\n const children = expressionItem.parent.children;\n const index = children.indexOf(expressionItem);\n children.splice(index, 1);\n this._expressionTree = this.createExpressionTreeFromGroupItem(this.rootGroup);\n if (!children.length) {\n this.deleteItem(expressionItem.parent);\n }\n this.expressionTreeChange.emit();\n }\n createGroup(operator) {\n const chips = this.chips.toArray();\n const minIndex = this.selectedExpressions.reduce((i, e) => Math.min(i, chips.findIndex(c => c.data === e)), Number.MAX_VALUE);\n const firstExpression = chips[minIndex].data;\n const parent = firstExpression.parent;\n const groupItem = new ExpressionGroupItem(operator, parent);\n const index = parent.children.indexOf(firstExpression);\n parent.children.splice(index, 0, groupItem);\n for (const expr of this.selectedExpressions) {\n groupItem.children.push(expr);\n this.deleteItem(expr);\n expr.parent = groupItem;\n }\n this.clearSelection();\n }\n toggleGroup(groupItem) {\n this.exitOperandEdit();\n if (groupItem.children && groupItem.children.length) {\n this.toggleGroupRecursive(groupItem, !groupItem.selected);\n if (!groupItem.selected) {\n this.deselectParentRecursive(groupItem);\n }\n this.toggleContextMenu();\n }\n }\n toggleGroupRecursive(groupItem, selected) {\n if (groupItem.selected !== selected) {\n groupItem.selected = selected;\n if (groupItem.selected) {\n this.selectedGroups.push(groupItem);\n }\n else {\n const index = this.selectedGroups.indexOf(groupItem);\n this.selectedGroups.splice(index, 1);\n }\n }\n for (const expr of groupItem.children) {\n if (expr instanceof ExpressionGroupItem) {\n this.toggleGroupRecursive(expr, selected);\n }\n else {\n const operandExpression = expr;\n if (operandExpression.selected !== selected) {\n this.toggleExpression(operandExpression);\n }\n }\n }\n }\n deselectParentRecursive(expressionItem) {\n const parent = expressionItem.parent;\n if (parent) {\n if (parent.selected) {\n parent.selected = false;\n const index = this.selectedGroups.indexOf(parent);\n this.selectedGroups.splice(index, 1);\n }\n this.deselectParentRecursive(parent);\n }\n }\n calculateContextMenuTarget() {\n const containerRect = this.expressionsContainer.nativeElement.getBoundingClientRect();\n const chips = this.chips.filter(c => this.selectedExpressions.indexOf(c.data) !== -1);\n let minTop = chips.reduce((t, c) => Math.min(t, c.nativeElement.getBoundingClientRect().top), Number.MAX_VALUE);\n minTop = Math.max(containerRect.top, minTop);\n minTop = Math.min(containerRect.bottom, minTop);\n let maxRight = chips.reduce((r, c) => Math.max(r, c.nativeElement.getBoundingClientRect().right), 0);\n maxRight = Math.max(maxRight, containerRect.left);\n maxRight = Math.min(maxRight, containerRect.right);\n this.overlaySettings.target = new Point(maxRight, minTop);\n }\n scrollElementIntoView(target) {\n const container = this.expressionsContainer.nativeElement;\n const targetOffset = target.offsetTop - container.offsetTop;\n const delta = 10;\n if (container.scrollTop + delta > targetOffset) {\n container.scrollTop = targetOffset - delta;\n }\n else if (container.scrollTop + container.clientHeight < targetOffset + target.offsetHeight + delta) {\n container.scrollTop = targetOffset + target.offsetHeight + delta - container.clientHeight;\n }\n }\n init() {\n this.clearSelection();\n this.cancelOperandAdd();\n this.cancelOperandEdit();\n this.rootGroup = this.createExpressionGroupItem(this.expressionTree);\n this.currentGroup = this.rootGroup;\n }\n registerSVGIcons() {\n const editorIcons = editor;\n editorIcons.forEach(icon => this.iconService.addSvgIconFromText(icon.name, icon.value, 'imx-icons'));\n }\n}\nIgxQueryBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: IgxIconService }, { token: PlatformUtil }, { token: LOCALE_ID }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxQueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxQueryBuilderComponent, selector: \"igx-query-builder\", inputs: { fields: \"fields\", expressionTree: \"expressionTree\", locale: \"locale\", resourceStrings: \"resourceStrings\" }, outputs: { expressionTreeChange: \"expressionTreeChange\" }, host: { properties: { \"class.igx-query-builder\": \"this.cssClass\", \"style.display\": \"this.display\" } }, queries: [{ propertyName: \"headerContent\", first: true, predicate: IgxQueryBuilderHeaderComponent, descendants: true }], viewQueries: [{ propertyName: \"fieldSelect\", first: true, predicate: [\"fieldSelect\"], descendants: true, read: IgxSelectComponent }, { propertyName: \"conditionSelect\", first: true, predicate: [\"conditionSelect\"], descendants: true, read: IgxSelectComponent }, { propertyName: \"searchValueInput\", first: true, predicate: [\"searchValueInput\"], descendants: true, read: ElementRef }, { propertyName: \"picker\", first: true, predicate: [\"picker\"], descendants: true }, { propertyName: \"addRootAndGroupButton\", first: true, predicate: [\"addRootAndGroupButton\"], descendants: true, read: ElementRef }, { propertyName: \"addConditionButton\", first: true, predicate: [\"addConditionButton\"], descendants: true, read: ElementRef }, { propertyName: \"editingInputsContainer\", first: true, predicate: [\"editingInputsContainer\"], descendants: true, read: ElementRef }, { propertyName: \"addModeContainer\", first: true, predicate: [\"addModeContainer\"], descendants: true, read: ElementRef }, { propertyName: \"currentGroupButtonsContainer\", first: true, predicate: [\"currentGroupButtonsContainer\"], descendants: true, read: ElementRef }, { propertyName: \"contextMenuToggle\", first: true, predicate: IgxToggleDirective, descendants: true }, { propertyName: \"expressionsContainer\", first: true, predicate: [\"expressionsContainer\"], descendants: true }, { propertyName: \"overlayOutlet\", first: true, predicate: [\"overlayOutlet\"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: \"chips\", predicate: IgxChipComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n\\n\\n\\n\\n \\n \\n add\\n {{ this.resourceStrings.igx_query_builder_and_group }}\\n \\n\\n \\n add\\n {{ this.resourceStrings.igx_query_builder_or_group }}\\n \\n\\n
    \\n
    \\n {{ this.resourceStrings.igx_query_builder_initial_text }}\\n
    \\n
    \\n
    \\n\\n \\n \\n add\\n {{\\n this.resourceStrings.igx_query_builder_add_condition\\n }}\\n \\n\\n \\n add\\n {{ this.resourceStrings.igx_query_builder_and_group }}\\n \\n\\n \\n add\\n {{ this.resourceStrings.igx_query_builder_or_group }}\\n \\n
    \\n\\n \\n \\n \\n {{\\n expressionItem.fieldLabel ||\\n expressionItem.expression.fieldName\\n }}\\n \\n \\n \\n \\n \\n {{\\n getConditionFriendlyName(\\n expressionItem.expression.condition.name\\n )\\n }}\\n \\n \\n {{\\n isDate(expressionItem.expression.searchVal)\\n ? getFormatter(expressionItem.expression.fieldName)\\n ? (expressionItem.expression.searchVal\\n | fieldFormatter\\n : getFormatter(\\n expressionItem.expression.fieldName\\n )\\n : undefined)\\n : (expressionItem.expression.searchVal\\n | date\\n : getFormat(\\n expressionItem.expression.fieldName\\n )\\n : undefined\\n : this.locale)\\n : expressionItem.expression.searchVal\\n }}\\n \\n \\n \\n \\n edit\\n \\n \\n add\\n \\n \\n \\n\\n \\n \\n \\n {{ field.label || field.header || field.field }}\\n \\n \\n\\n \\n \\n \\n \\n \\n\\n \\n
    \\n \\n \\n {{\\n getConditionFriendlyName(condition)\\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 check\\n \\n \\n close\\n \\n
    \\n \\n\\n \\n \\n \\n \\n close\\n \\n \\n
    \\n\\n \\n
    \\n
    \\n\\n
    \\n \\n \\n \\n \\n \\n \\n \\n \\n {{\\n this.resourceStrings.igx_query_builder_end_group\\n }}\\n \\n
    \\n \\n \\n
    \\n\\n \\n \\n \\n\\n \\n \\n close\\n \\n\\n \\n \\n \\n\\n \\n \\n {{\\n this.resourceStrings.igx_query_builder_ungroup\\n }}\\n \\n \\n delete\\n {{ this.resourceStrings.igx_query_builder_delete }}\\n \\n \\n \\n \\n {{ this.resourceStrings.igx_query_builder_create_and_group }}\\n \\n \\n {{ this.resourceStrings.igx_query_builder_create_or_group }}\\n \\n \\n {{ this.resourceStrings.igx_query_builder_delete_filters }}\\n \\n \\n \\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgClass; }), selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgTemplateOutlet; }), selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.DefaultValueAccessor; }), selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.NgControlStatus; }), selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.NgModel; }), selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxButtonDirective; }), selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxButtonGroupComponent; }), selector: \"igx-buttongroup\", inputs: [\"id\", \"itemContentCssClass\", \"multiSelection\", \"values\", \"disabled\", \"alignment\"], outputs: [\"selected\", \"deselected\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxDatePickerComponent; }), selector: \"igx-date-picker\", inputs: [\"hideOutsideDays\", \"displayMonthsCount\", \"showWeekNumbers\", \"formatter\", \"headerOrientation\", \"todayButtonLabel\", \"cancelButtonLabel\", \"spinLoop\", \"spinDelta\", \"outlet\", \"id\", \"formatViews\", \"disabledDates\", \"specialDates\", \"calendarFormat\", \"value\", \"minValue\", \"maxValue\", \"resourceStrings\", \"readOnly\"], outputs: [\"valueChange\", \"validationFailed\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxPickerToggleComponent; }), selector: \"igx-picker-toggle\", outputs: [\"clicked\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxPickerClearComponent; }), selector: \"igx-picker-clear\" }, { kind: \"component\", type: i0.forwardRef(function () { return IgxInputGroupComponent; }), selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxInputDirective; }), selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxPrefixDirective; }), selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxSuffixDirective; }), selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"component\", type: i0.forwardRef(function () { return IgxIconComponent; }), selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxDateTimeEditorDirective; }), selector: \"[igxDateTimeEditor]\", inputs: [\"locale\", \"minValue\", \"maxValue\", \"spinLoop\", \"displayFormat\", \"igxDateTimeEditor\", \"value\", \"spinDelta\"], outputs: [\"valueChange\", \"validationFailed\"], exportAs: [\"igxDateTimeEditor\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxTimePickerComponent; }), selector: \"igx-time-picker\", inputs: [\"id\", \"displayFormat\", \"inputFormat\", \"mode\", \"minValue\", \"maxValue\", \"spinLoop\", \"formatter\", \"headerOrientation\", \"readOnly\", \"value\", \"resourceStrings\", \"okButtonLabel\", \"cancelButtonLabel\", \"itemsDelta\"], outputs: [\"selected\", \"valueChange\", \"validationFailed\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxChipComponent; }), selector: \"igx-chip\", inputs: [\"id\", \"tabIndex\", \"data\", \"draggable\", \"animateOnRelease\", \"hideBaseOnDrag\", \"removable\", \"removeIcon\", \"selectable\", \"selectIcon\", \"disabled\", \"selected\", \"color\", \"resourceStrings\"], outputs: [\"selectedChange\", \"moveStart\", \"moveEnd\", \"remove\", \"chipClick\", \"selectedChanging\", \"selectedChanged\", \"keyDown\", \"dragEnter\", \"dragLeave\", \"dragOver\", \"dragDrop\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxSelectComponent; }), selector: \"igx-select\", inputs: [\"placeholder\", \"disabled\", \"overlaySettings\", \"value\", \"type\"], outputs: [\"opening\", \"opened\", \"closing\", \"closed\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxSelectItemComponent; }), selector: \"igx-select-item\", inputs: [\"text\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxToggleDirective; }), selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxOverlayOutletDirective; }), selector: \"[igxOverlayOutlet]\", exportAs: [\"overlay-outlet\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxQueryBuilderHeaderComponent; }), selector: \"igx-query-builder-header\", inputs: [\"title\", \"showLegend\", \"resourceStrings\"] }, { kind: \"pipe\", type: i0.forwardRef(function () { return i1$1.DatePipe; }), name: \"date\" }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxFieldFormatterPipe; }), name: \"fieldFormatter\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-query-builder', template: \"\\n\\n\\n\\n\\n\\n \\n \\n add\\n {{ this.resourceStrings.igx_query_builder_and_group }}\\n \\n\\n \\n add\\n {{ this.resourceStrings.igx_query_builder_or_group }}\\n \\n\\n
    \\n
    \\n {{ this.resourceStrings.igx_query_builder_initial_text }}\\n
    \\n
    \\n
    \\n\\n \\n \\n add\\n {{\\n this.resourceStrings.igx_query_builder_add_condition\\n }}\\n \\n\\n \\n add\\n {{ this.resourceStrings.igx_query_builder_and_group }}\\n \\n\\n \\n add\\n {{ this.resourceStrings.igx_query_builder_or_group }}\\n \\n
    \\n\\n \\n \\n \\n {{\\n expressionItem.fieldLabel ||\\n expressionItem.expression.fieldName\\n }}\\n \\n \\n \\n \\n \\n {{\\n getConditionFriendlyName(\\n expressionItem.expression.condition.name\\n )\\n }}\\n \\n \\n {{\\n isDate(expressionItem.expression.searchVal)\\n ? getFormatter(expressionItem.expression.fieldName)\\n ? (expressionItem.expression.searchVal\\n | fieldFormatter\\n : getFormatter(\\n expressionItem.expression.fieldName\\n )\\n : undefined)\\n : (expressionItem.expression.searchVal\\n | date\\n : getFormat(\\n expressionItem.expression.fieldName\\n )\\n : undefined\\n : this.locale)\\n : expressionItem.expression.searchVal\\n }}\\n \\n \\n \\n \\n edit\\n \\n \\n add\\n \\n \\n \\n\\n \\n \\n \\n {{ field.label || field.header || field.field }}\\n \\n \\n\\n \\n \\n \\n \\n \\n\\n \\n
    \\n \\n \\n {{\\n getConditionFriendlyName(condition)\\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 check\\n \\n \\n close\\n \\n
    \\n \\n\\n \\n \\n \\n \\n close\\n \\n \\n
    \\n\\n \\n
    \\n
    \\n\\n
    \\n \\n \\n \\n \\n \\n \\n \\n \\n {{\\n this.resourceStrings.igx_query_builder_end_group\\n }}\\n \\n
    \\n \\n \\n
    \\n\\n \\n \\n \\n\\n \\n \\n close\\n \\n\\n \\n \\n \\n\\n \\n \\n {{\\n this.resourceStrings.igx_query_builder_ungroup\\n }}\\n \\n \\n delete\\n {{ this.resourceStrings.igx_query_builder_delete }}\\n \\n \\n \\n \\n {{ this.resourceStrings.igx_query_builder_create_and_group }}\\n \\n \\n {{ this.resourceStrings.igx_query_builder_create_or_group }}\\n \\n \\n {{ this.resourceStrings.igx_query_builder_delete_filters }}\\n \\n \\n \\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: IgxIconService }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-query-builder']\n }], fieldSelect: [{\n type: ViewChild,\n args: ['fieldSelect', { read: IgxSelectComponent }]\n }], conditionSelect: [{\n type: ViewChild,\n args: ['conditionSelect', { read: IgxSelectComponent }]\n }], searchValueInput: [{\n type: ViewChild,\n args: ['searchValueInput', { read: ElementRef }]\n }], picker: [{\n type: ViewChild,\n args: ['picker']\n }], addRootAndGroupButton: [{\n type: ViewChild,\n args: ['addRootAndGroupButton', { read: ElementRef }]\n }], addConditionButton: [{\n type: ViewChild,\n args: ['addConditionButton', { read: ElementRef }]\n }], headerContent: [{\n type: ContentChild,\n args: [IgxQueryBuilderHeaderComponent]\n }], editingInputsContainer: [{\n type: ViewChild,\n args: ['editingInputsContainer', { read: ElementRef }]\n }], addModeContainer: [{\n type: ViewChild,\n args: ['addModeContainer', { read: ElementRef }]\n }], currentGroupButtonsContainer: [{\n type: ViewChild,\n args: ['currentGroupButtonsContainer', { read: ElementRef }]\n }], contextMenuToggle: [{\n type: ViewChild,\n args: [IgxToggleDirective]\n }], chips: [{\n type: ViewChildren,\n args: [IgxChipComponent]\n }], display: [{\n type: HostBinding,\n args: ['style.display']\n }], expressionsContainer: [{\n type: ViewChild,\n args: ['expressionsContainer']\n }], overlayOutlet: [{\n type: ViewChild,\n args: ['overlayOutlet', { read: IgxOverlayOutletDirective, static: true }]\n }], fields: [{\n type: Input\n }], expressionTree: [{\n type: Input\n }], locale: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], expressionTreeChange: [{\n type: Output\n }] } });\n/**\n * @hidden\n */\nclass IgxQueryBuilderModule {\n}\nIgxQueryBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderModule, declarations: [IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent, IgxFieldFormatterPipe], imports: [CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxButtonGroupModule,\n IgxDatePickerModule,\n IgxDateTimeEditorModule,\n IgxInputGroupModule,\n IgxTimePickerModule,\n IgxChipsModule,\n IgxDragDropModule,\n IgxIconModule,\n IgxSelectModule,\n IgxToggleModule], exports: [IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent] });\nIgxQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderModule, imports: [CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxButtonGroupModule,\n IgxDatePickerModule,\n IgxDateTimeEditorModule,\n IgxInputGroupModule,\n IgxTimePickerModule,\n IgxChipsModule,\n IgxDragDropModule,\n IgxIconModule,\n IgxSelectModule,\n IgxToggleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxQueryBuilderModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent, IgxFieldFormatterPipe],\n exports: [IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent],\n imports: [\n CommonModule,\n FormsModule,\n IgxButtonModule,\n IgxButtonGroupModule,\n IgxDatePickerModule,\n IgxDateTimeEditorModule,\n IgxInputGroupModule,\n IgxTimePickerModule,\n IgxChipsModule,\n IgxDragDropModule,\n IgxIconModule,\n IgxSelectModule,\n IgxToggleModule\n ]\n }]\n }] });\n\n/**\n * A component used for presenting advanced filtering UI for a Grid.\n * It is used internally in the Grid, but could also be hosted in a container outside of it.\n *\n * Example:\n * ```html\n * \n * \n * ```\n */\nclass IgxAdvancedFilteringDialogComponent {\n constructor(cdr, platform) {\n this.cdr = cdr;\n this.platform = platform;\n /**\n * @hidden @internal\n */\n this.display = 'block';\n /**\n * @hidden @internal\n */\n this.inline = true;\n /**\n * @hidden @internal\n */\n this.lastActiveNode = {};\n this.destroy$ = new Subject();\n }\n /**\n * @hidden @internal\n */\n ngAfterViewInit() {\n this.queryBuilder.setPickerOutlet(this.grid.outlet);\n }\n /**\n * @hidden @internal\n */\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * @hidden @internal\n */\n get displayDensity() {\n return this.grid.displayDensity;\n }\n /**\n * An @Input property that sets the grid.\n */\n set grid(grid) {\n this._grid = grid;\n if (this._grid) {\n this._grid.filteringService.registerSVGIcons();\n }\n this.assignResourceStrings();\n }\n /**\n * Returns the grid.\n */\n get grid() {\n return this._grid;\n }\n /**\n * @hidden @internal\n */\n get filterableFields() {\n return this.grid.columns.filter((column) => !column.columnGroup && column.filterable);\n }\n /**\n * @hidden @internal\n */\n dragStart(dragArgs) {\n if (!this._overlayComponentId) {\n dragArgs.cancel = true;\n return;\n }\n }\n /**\n * @hidden @internal\n */\n onDragMove(e) {\n const deltaX = e.nextPageX - e.pageX;\n const deltaY = e.nextPageY - e.pageY;\n e.cancel = true;\n this._overlayService.setOffset(this._overlayComponentId, deltaX, deltaY);\n }\n /**\n * @hidden @internal\n */\n onKeyDown(eventArgs) {\n eventArgs.stopPropagation();\n const key = eventArgs.key;\n if (this.queryBuilder.isContextMenuVisible && (key === this.platform.KEYMAP.ESCAPE)) {\n this.queryBuilder.clearSelection();\n }\n else if (key === this.platform.KEYMAP.ESCAPE) {\n this.closeDialog();\n }\n }\n /**\n * @hidden @internal\n */\n initialize(grid, overlayService, overlayComponentId) {\n this.inline = false;\n this.grid = grid;\n this._overlayService = overlayService;\n this._overlayComponentId = overlayComponentId;\n }\n /**\n * @hidden @internal\n */\n onClearButtonClick(event) {\n this.grid.crudService.endEdit(false, event);\n this.queryBuilder.expressionTree = this.grid.advancedFilteringExpressionsTree = null;\n }\n /**\n * @hidden @internal\n */\n closeDialog() {\n if (this._overlayComponentId) {\n this._overlayService.hide(this._overlayComponentId);\n }\n this.grid.navigation.activeNode = this.lastActiveNode;\n if (this.grid.navigation.activeNode && this.grid.navigation.activeNode.row === -1) {\n this.grid.theadRow.nativeElement.focus();\n }\n }\n /**\n * @hidden @internal\n */\n applyChanges(event) {\n this.grid.crudService.endEdit(false, event);\n this.queryBuilder.exitOperandEdit();\n this.grid.advancedFilteringExpressionsTree = this.queryBuilder.expressionTree;\n }\n /**\n * @hidden @internal\n */\n cancelChanges() {\n this.closeDialog();\n }\n /**\n * @hidden @internal\n */\n onApplyButtonClick(event) {\n this.applyChanges(event);\n this.closeDialog();\n }\n assignResourceStrings() {\n // If grid has custom resource strings set for the advanced filtering,\n // they are passed to the query builder resource strings.\n const gridRS = this.grid.resourceStrings;\n if (gridRS !== GridResourceStringsEN) {\n const queryBuilderRS = CurrentResourceStrings.QueryBuilderResStrings;\n Object.keys(gridRS).forEach((prop) => {\n const reg = /^igx_grid_(advanced_)?filter_(row_)?/;\n if (!reg.test(prop)) {\n return;\n }\n const affix = prop.replace(reg, '');\n const filterProp = `igx_query_builder_filter_${affix}`;\n const generalProp = `igx_query_builder_${affix}`;\n if (queryBuilderRS[filterProp] !== undefined) {\n queryBuilderRS[filterProp] = gridRS[prop];\n }\n else if (queryBuilderRS[generalProp] !== undefined) {\n queryBuilderRS[generalProp] = gridRS[prop];\n }\n });\n }\n }\n}\nIgxAdvancedFilteringDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAdvancedFilteringDialogComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxAdvancedFilteringDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxAdvancedFilteringDialogComponent, selector: \"igx-advanced-filtering-dialog\", inputs: { grid: \"grid\" }, host: { properties: { \"style.display\": \"this.display\" } }, viewQueries: [{ propertyName: \"queryBuilder\", first: true, predicate: [\"queryBuilder\"], descendants: true, read: IgxQueryBuilderComponent }], ngImport: i0, template: \"
    \\n \\n \\n \\n \\n\\n
    \\n
    \\n \\n
    \\n
    \\n \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: IgxDragDirective, selector: \"[igxDrag]\", inputs: [\"igxDrag\", \"dragTolerance\", \"dragDirection\", \"dragChannel\", \"ghost\", \"ghostClass\", \"ghostTemplate\", \"ghostHost\", \"scrollContainer\", \"ghostOffsetX\", \"ghostOffsetY\"], outputs: [\"dragStart\", \"dragMove\", \"dragEnd\", \"dragClick\", \"ghostCreate\", \"ghostDestroy\", \"transitioned\"], exportAs: [\"drag\"] }, { kind: \"directive\", type: IgxDragHandleDirective, selector: \"[igxDragHandle]\" }, { kind: \"component\", type: IgxQueryBuilderComponent, selector: \"igx-query-builder\", inputs: [\"fields\", \"expressionTree\", \"locale\", \"resourceStrings\"], outputs: [\"expressionTreeChange\"] }, { kind: \"component\", type: IgxQueryBuilderHeaderComponent, selector: \"igx-query-builder-header\", inputs: [\"title\", \"showLegend\", \"resourceStrings\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxAdvancedFilteringDialogComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-advanced-filtering-dialog', template: \"
    \\n \\n \\n \\n \\n\\n
    \\n
    \\n \\n
    \\n
    \\n \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: PlatformUtil }]; }, propDecorators: { queryBuilder: [{\n type: ViewChild,\n args: ['queryBuilder', { read: IgxQueryBuilderComponent }]\n }], display: [{\n type: HostBinding,\n args: ['style.display']\n }], grid: [{\n type: Input\n }] } });\n\n/**\n * @hidden\n * @internal\n */\nclass IgxRowSelectorDirective {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowSelectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowSelectorDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowSelectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowSelectorDirective, selector: \"[igxRowSelector]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowSelectorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowSelector]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * @hidden\n * @internal\n */\nclass IgxGroupByRowSelectorDirective {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxGroupByRowSelectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByRowSelectorDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxGroupByRowSelectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGroupByRowSelectorDirective, selector: \"[igxGroupByRowSelector]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGroupByRowSelectorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxGroupByRowSelector]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * @hidden\n * @internal\n */\nclass IgxHeadSelectorDirective {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxHeadSelectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHeadSelectorDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxHeadSelectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHeadSelectorDirective, selector: \"[igxHeadSelector]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHeadSelectorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxHeadSelector]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nconst ghostBackgroundClass = 'igx-grid__tr--ghost';\nconst gridCellClass = 'igx-grid__td';\nconst rowSelectedClass = 'igx-grid__tr--selected';\nconst cellSelectedClass = 'igx-grid__td--selected';\nconst cellActiveClass = 'igx-grid__td--active';\n/**\n * @hidden\n */\nclass IgxRowDragDirective extends IgxDragDirective {\n constructor() {\n super(...arguments);\n this._rowDragStarted = false;\n this.transitionEndEvent = () => {\n if (this.ghostElement) {\n this.ghostElement.removeEventListener('transitionend', this.transitionEndEvent, false);\n }\n this.endDragging();\n };\n }\n set data(value) {\n this._data = value;\n }\n get data() {\n return this._data.grid.createRow(this._data.index, this._data.data);\n }\n get row() {\n return this._data;\n }\n onPointerDown(event) {\n event.preventDefault();\n this._rowDragStarted = false;\n this._removeOnDestroy = false;\n super.onPointerDown(event);\n }\n onPointerMove(event) {\n super.onPointerMove(event);\n if (this._dragStarted && !this._rowDragStarted) {\n this._rowDragStarted = true;\n const args = {\n dragDirective: this,\n dragData: this.data,\n dragElement: this.row.nativeElement,\n cancel: false,\n owner: this.row.grid\n };\n this.row.grid.rowDragStart.emit(args);\n if (args.cancel) {\n this.ghostElement.parentNode.removeChild(this.ghostElement);\n this.ghostElement = null;\n this._dragStarted = false;\n this._clicked = false;\n return;\n }\n this.row.grid.dragRowID = this.row.key;\n this.row.grid.rowDragging = true;\n this.row.grid.cdr.detectChanges();\n this.subscription$ = fromEvent(this.row.grid.document.defaultView, 'keydown').subscribe((ev) => {\n if (ev.key === this.platformUtil.KEYMAP.ESCAPE) {\n this._lastDropArea = false;\n this.onPointerUp(event);\n }\n });\n }\n }\n onPointerUp(event) {\n if (!this._clicked) {\n return;\n }\n const args = {\n dragDirective: this,\n dragData: this.data,\n dragElement: this.row.nativeElement,\n animation: false,\n owner: this.row.grid\n };\n this.zone.run(() => {\n this.row.grid.rowDragEnd.emit(args);\n });\n const dropArea = this._lastDropArea;\n super.onPointerUp(event);\n if (!dropArea && this.ghostElement) {\n this.ghostElement.addEventListener('transitionend', this.transitionEndEvent, false);\n }\n else {\n this.endDragging();\n }\n }\n createGhost(pageX, pageY) {\n this.row.grid.gridAPI.crudService.endEdit(false);\n this.row.grid.cdr.detectChanges();\n this.ghostContext = {\n $implicit: this.row.data,\n data: this.row.data,\n grid: this.row.grid\n };\n super.createGhost(pageX, pageY, this.row.nativeElement);\n // check if there is an expander icon and create the ghost at the corresponding position\n if (this.isHierarchicalGrid) {\n const row = this.row;\n if (row.expander) {\n const expanderWidth = row.expander.nativeElement.getBoundingClientRect().width;\n this._ghostHostX += expanderWidth;\n }\n }\n const ghost = this.ghostElement;\n const gridRect = this.row.grid.nativeElement.getBoundingClientRect();\n const rowRect = this.row.nativeElement.getBoundingClientRect();\n ghost.style.overflow = 'hidden';\n ghost.style.width = gridRect.width + 'px';\n ghost.style.height = rowRect.height + 'px';\n this.renderer.addClass(ghost, ghostBackgroundClass);\n this.renderer.removeClass(ghost, rowSelectedClass);\n const ghostCells = ghost.getElementsByClassName(gridCellClass);\n for (const cell of ghostCells) {\n this.renderer.removeClass(cell, cellSelectedClass);\n this.renderer.removeClass(cell, cellActiveClass);\n }\n }\n _unsubscribe() {\n if (this.subscription$ && !this.subscription$.closed) {\n this.subscription$.unsubscribe();\n }\n }\n endDragging() {\n this.onTransitionEnd(null);\n this.row.grid.dragRowID = null;\n this.row.grid.rowDragging = false;\n this.row.grid.cdr.detectChanges();\n this._unsubscribe();\n }\n get isHierarchicalGrid() {\n return this.row.grid.nativeElement.tagName.toLowerCase() === 'igx-hierarchical-grid';\n }\n}\nIgxRowDragDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nIgxRowDragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowDragDirective, selector: \"[igxRowDrag]\", inputs: { data: [\"igxRowDrag\", \"data\"] }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowDrag]'\n }]\n }], propDecorators: { data: [{\n type: Input,\n args: ['igxRowDrag']\n }] } });\n/**\n * @hidden\n */\nclass IgxDragIndicatorIconDirective {\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxDragIndicatorIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragIndicatorIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxDragIndicatorIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDragIndicatorIconDirective, selector: \"[igxDragIndicatorIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDragIndicatorIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDragIndicatorIcon]'\n }]\n }] });\n/**\n * @hidden\n */\nclass IgxRowDragGhostDirective {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static ngTemplateContextGuard(_directive, context) {\n return true;\n }\n ;\n}\nIgxRowDragGhostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragGhostDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowDragGhostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowDragGhostDirective, selector: \"[igxRowDragGhost]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragGhostDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowDragGhost]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxRowDragModule {\n}\nIgxRowDragModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxRowDragModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragModule, declarations: [IgxRowDragDirective, IgxDragIndicatorIconDirective, IgxRowDragGhostDirective], exports: [IgxRowDragDirective, IgxDragIndicatorIconDirective, IgxRowDragGhostDirective] });\nIgxRowDragModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowDragModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxRowDragDirective, IgxDragIndicatorIconDirective, IgxRowDragGhostDirective],\n exports: [IgxRowDragDirective, IgxDragIndicatorIconDirective, IgxRowDragGhostDirective],\n }]\n }] });\n\nclass IgxNotificationsDirective extends IgxToggleDirective {\n constructor() {\n super(...arguments);\n /**\n * Sets/gets the `aria-live` attribute.\n * If not set, `aria-live` will have value `\"polite\"`.\n */\n this.ariaLive = 'polite';\n /**\n * Sets/gets whether the element will be hidden after the `displayTime` is over.\n * Default value is `true`.\n */\n this.autoHide = true;\n /**\n * Sets/gets the duration of time span (in milliseconds) which the element will be visible\n * after it is being shown.\n * Default value is `4000`.\n */\n this.displayTime = 4000;\n /**\n * @hidden\n * @internal\n */\n this.textMessage = '';\n }\n /**\n * Enables/Disables the visibility of the element.\n * If not set, the `isVisible` attribute will have value `false`.\n */\n get isVisible() {\n return !this.collapsed;\n }\n set isVisible(value) {\n if (value !== this.isVisible) {\n if (value) {\n requestAnimationFrame(() => {\n this.open();\n });\n }\n else {\n this.close();\n }\n }\n }\n /**\n * @hidden\n */\n open() {\n clearInterval(this.timeoutId);\n const overlaySettings = {\n positionStrategy: this.strategy,\n closeOnEscape: false,\n closeOnOutsideClick: false,\n modal: false,\n outlet: this.outlet\n };\n super.open(overlaySettings);\n if (this.autoHide) {\n this.timeoutId = window.setTimeout(() => {\n this.close();\n }, this.displayTime);\n }\n }\n /**\n * Hides the element.\n */\n close() {\n clearTimeout(this.timeoutId);\n super.close();\n }\n}\nIgxNotificationsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNotificationsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nIgxNotificationsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNotificationsDirective, inputs: { ariaLive: \"ariaLive\", autoHide: \"autoHide\", displayTime: \"displayTime\", outlet: \"outlet\", isVisible: \"isVisible\" }, host: { properties: { \"attr.aria-live\": \"this.ariaLive\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNotificationsDirective, decorators: [{\n type: Directive\n }], propDecorators: { ariaLive: [{\n type: HostBinding,\n args: ['attr.aria-live']\n }, {\n type: Input\n }], autoHide: [{\n type: Input\n }], displayTime: [{\n type: Input\n }], outlet: [{\n type: Input\n }], isVisible: [{\n type: Input\n }] } });\n\nlet NEXT_ID$a = 0;\n/**\n * **Ignite UI for Angular Snackbar** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/snackbar.html)\n *\n * The Ignite UI Snack Bar provides feedback about an operation with a single-line message, which can\n * include a link to an action such as Undo.\n *\n * Example:\n * ```html\n * \n *
    \n * \n * Message sent\n * \n *
    \n * ```\n */\nclass IgxSnackbarComponent extends IgxNotificationsDirective {\n constructor() {\n super(...arguments);\n /**\n * Sets/gets the `id` of the snackbar.\n * If not set, the `id` of the first snackbar component will be `\"igx-snackbar-0\"`;\n * ```html\n * \n * ```\n * ```typescript\n * let snackbarId = this.snackbar.id;\n * ```\n *\n * @memberof IgxSnackbarComponent\n */\n this.id = `igx-snackbar-${NEXT_ID$a++}`;\n /**\n * The default css class applied to the component.\n *\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-snackbar';\n /**\n * An event that will be emitted when the action button is clicked.\n * Provides reference to the `IgxSnackbarComponent` as an argument.\n * ```html\n * \n * ```\n */\n this.clicked = new EventEmitter();\n /**\n * An event that will be emitted when the snackbar animation starts.\n * Provides reference to the `ToggleViewEventArgs` interface as an argument.\n * ```html\n * \n * ```\n */\n this.animationStarted = new EventEmitter();\n /**\n * An event that will be emitted when the snackbar animation ends.\n * Provides reference to the `ToggleViewEventArgs` interface as an argument.\n * ```html\n * \n * ```\n */\n this.animationDone = new EventEmitter();\n this._positionSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Bottom,\n openAnimation: useAnimation(fadeIn, { params: { duration: '.35s', easing: 'cubic-bezier(0.0, 0.0, 0.2, 1)',\n fromPosition: 'translateY(100%)', toPosition: 'translateY(0)' } }),\n closeAnimation: useAnimation(fadeOut, { params: { duration: '.2s', easing: 'cubic-bezier(0.4, 0.0, 1, 1)',\n fromPosition: 'translateY(0)', toPosition: 'translateY(100%)' } }),\n };\n }\n /**\n * Get the position and animation settings used by the snackbar.\n * ```typescript\n * @ViewChild('snackbar', { static: true }) public snackbar: IgxSnackbarComponent;\n * let currentPosition: PositionSettings = this.snackbar.positionSettings\n * ```\n */\n get positionSettings() {\n return this._positionSettings;\n }\n /**\n * Set the position and animation settings used by the snackbar.\n * ```html\n * \n * ```\n * ```typescript\n * import { slideInTop, slideOutBottom } from 'igniteui-angular';\n * ...\n * @ViewChild('snackbar', { static: true }) public snackbar: IgxSnackbarComponent;\n * public newPositionSettings: PositionSettings = {\n * openAnimation: useAnimation(slideInTop, { params: { duration: '1000ms', fromPosition: 'translateY(100%)'}}),\n * closeAnimation: useAnimation(slideOutBottom, { params: { duration: '1000ms', fromPosition: 'translateY(0)'}}),\n * horizontalDirection: HorizontalAlignment.Left,\n * verticalDirection: VerticalAlignment.Middle,\n * horizontalStartPoint: HorizontalAlignment.Left,\n * verticalStartPoint: VerticalAlignment.Middle,\n * minSize: { height: 100, width: 100 }\n * };\n * this.snackbar.positionSettings = this.newPositionSettings;\n * ```\n */\n set positionSettings(settings) {\n this._positionSettings = settings;\n }\n /**\n * Shows the snackbar and hides it after the `displayTime` is over if `autoHide` is set to `true`.\n * ```typescript\n * this.snackbar.open();\n * ```\n */\n open(message) {\n if (message !== undefined) {\n this.textMessage = message;\n }\n this.strategy = this.outlet ? new ContainerPositionStrategy(this.positionSettings)\n : new GlobalPositionStrategy(this.positionSettings);\n super.open();\n }\n /**\n * Opens or closes the snackbar, depending on its current state.\n *\n * ```typescript\n * this.snackbar.toggle();\n * ```\n */\n toggle() {\n if (this.collapsed || this.isClosing) {\n this.open();\n }\n else {\n this.close();\n }\n }\n /**\n * @hidden\n */\n triggerAction() {\n this.clicked.emit(this);\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this.opened.pipe(takeUntil(this.destroy$)).subscribe(() => {\n const openedEventArgs = { owner: this, id: this._overlayId };\n this.animationStarted.emit(openedEventArgs);\n });\n this.closed.pipe(takeUntil(this.destroy$)).subscribe(() => {\n const closedEventArgs = { owner: this, id: this._overlayId };\n this.animationDone.emit(closedEventArgs);\n });\n }\n}\nIgxSnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSnackbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxSnackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSnackbarComponent, selector: \"igx-snackbar\", inputs: { id: \"id\", actionText: \"actionText\", positionSettings: \"positionSettings\" }, outputs: { clicked: \"clicked\", animationStarted: \"animationStarted\", animationDone: \"animationDone\" }, host: { properties: { \"attr.id\": \"this.id\", \"class.igx-snackbar\": \"this.cssClass\" } }, usesInheritance: true, ngImport: i0, template: \"
    \\n {{ textMessage }}\\n \\n
    \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSnackbarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-snackbar', template: \"
    \\n {{ textMessage }}\\n \\n
    \\n\\n\" }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-snackbar']\n }], actionText: [{\n type: Input\n }], clicked: [{\n type: Output\n }], animationStarted: [{\n type: Output\n }], animationDone: [{\n type: Output\n }], positionSettings: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxSnackbarModule {\n}\nIgxSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSnackbarModule, declarations: [IgxSnackbarComponent], imports: [CommonModule], exports: [IgxSnackbarComponent] });\nIgxSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSnackbarModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSnackbarModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxSnackbarComponent],\n exports: [IgxSnackbarComponent],\n imports: [CommonModule]\n }]\n }] });\n\nclass IgxPaginatorTemplateDirective {\n constructor() {\n /**\n * @internal\n * @hidden\n */\n this.cssClass = 'igx-paginator-content';\n }\n}\nIgxPaginatorTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPaginatorTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxPaginatorTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxPaginatorTemplateDirective, selector: \"[igxPaginatorContent],igx-paginator-content\", host: { properties: { \"class.igx-paginator-content\": \"this.cssClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPaginatorTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxPaginatorContent],igx-paginator-content' }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-paginator-content']\n }] } });\nclass IgxPaginatorComponent extends DisplayDensityBase {\n /**\n * Sets the class of the IgxPaginatorComponent based\n * on the provided displayDensity.\n */\n get classCosy() {\n return this.displayDensity === DisplayDensity.cosy;\n }\n get classCompact() {\n return this.displayDensity === DisplayDensity.compact;\n }\n get classComfortable() {\n return this.displayDensity === DisplayDensity.comfortable;\n }\n /**\n * An @Input property, sets current page of the `IgxPaginatorComponent`.\n * The default is 0.\n * ```typescript\n * let page = this.paginator.page;\n * ```\n *\n * @memberof IgxPaginatorComponent\n */\n get page() {\n return this._page;\n }\n set page(value) {\n if (this._page === value || value < 0 || value > this.totalPages) {\n return;\n }\n const cancelEventArgs = { current: this._page, next: value, cancel: false };\n const eventArgs = { previous: this._page, current: value };\n this.paging.emit(cancelEventArgs);\n if (cancelEventArgs.cancel) {\n return;\n }\n this._page = value;\n this.pageChange.emit(this._page);\n this.pagingDone.emit(eventArgs);\n }\n /**\n * An @Input property, sets number of visible items per page in the `IgxPaginatorComponent`.\n * The default is 15.\n * ```typescript\n * let itemsPerPage = this.paginator.perPage;\n * ```\n *\n * @memberof IgxPaginatorComponent\n */\n get perPage() {\n return this._perPage;\n }\n set perPage(value) {\n if (value < 0 || this.perPage === value) {\n return;\n }\n this._perPage = Number(value);\n this.perPageChange.emit(this._perPage);\n this._selectOptions = this.sortUniqueOptions(this.defaultSelectValues, this._perPage);\n this.totalPages = Math.ceil(this.totalRecords / this._perPage);\n if (this.totalPages !== 0 && this.page >= this.totalPages) {\n this.page = this.totalPages - 1;\n }\n }\n /**\n * An @Input property that sets the total records.\n * ```typescript\n * let totalRecords = this.paginator.totalRecords;\n * ```\n *\n * @memberof IgxPaginatorComponent\n */\n get totalRecords() {\n return this._totalRecords;\n }\n set totalRecords(value) {\n this._totalRecords = value;\n this.totalPages = Math.ceil(this.totalRecords / this.perPage);\n if (this.page > this.totalPages) {\n this.page = 0;\n }\n this.cdr.detectChanges();\n }\n /**\n * An @Input property that sets custom options in the select of the paginator\n * ```typescript\n * let options = this.paginator.selectOptions;\n * ```\n *\n * @memberof IgxPaginatorComponent\n */\n get selectOptions() {\n return this._selectOptions;\n }\n set selectOptions(value) {\n this._selectOptions = this.sortUniqueOptions(value, this._perPage);\n this.defaultSelectValues = [...value];\n }\n /**\n * An @Input property that sets custom OverlaySettings.\n * ```html\n * \n * ```\n */\n get overlaySettings() {\n return this._overlaySettings;\n }\n set overlaySettings(value) {\n this._overlaySettings = Object.assign({}, this._overlaySettings, value);\n }\n /**\n * An accessor that sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n constructor(_displayDensityOptions, elementRef, cdr) {\n super(_displayDensityOptions);\n this._displayDensityOptions = _displayDensityOptions;\n this.elementRef = elementRef;\n this.cdr = cdr;\n /**\n * Emitted when `perPage` property value of the paginator is changed.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * public onPerPageChange(perPage: number) {\n * this.perPage = perPage;\n * }\n * ```\n */\n this.perPageChange = new EventEmitter();\n /**\n * Emitted after the current page is changed.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * public onPageChange(page: number) {\n * this.currentPage = page;\n * }\n * ```\n */\n this.pageChange = new EventEmitter();\n /**\n * Emitted before paging is performed.\n *\n * @remarks\n * Returns an object consisting of the current and next pages.\n * @example\n * ```html\n * \n * ```\n */\n this.paging = new EventEmitter();\n /**\n * Emitted after paging is performed.\n *\n * @remarks\n * Returns an object consisting of the previous and current pages.\n * @example\n * ```html\n * \n * ```\n */\n this.pagingDone = new EventEmitter();\n this._page = 0;\n this._selectOptions = [5, 10, 15, 25, 50, 100, 500];\n this._perPage = 15;\n this._resourceStrings = CurrentResourceStrings.PaginatorResStrings;\n this._overlaySettings = {};\n this.defaultSelectValues = [5, 10, 15, 25, 50, 100, 500];\n }\n /**\n * Returns if the current page is the last page.\n * ```typescript\n * const lastPage = this.paginator.isLastPage;\n * ```\n */\n get isLastPage() {\n return this.page + 1 >= this.totalPages;\n }\n /**\n * Returns if the current page is the first page.\n * ```typescript\n * const lastPage = this.paginator.isFirstPage;\n * ```\n */\n get isFirstPage() {\n return this.page === 0;\n }\n /**\n * Returns if the first pager buttons should be disabled\n */\n get isFirstPageDisabled() {\n return this.isFirstPage;\n }\n /**\n * Returns if the last pager buttons should be disabled\n */\n get isLastPageDisabled() {\n return this.isLastPage;\n }\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n /**\n * Sets DisplayDensity for the \\n \\n\\n\\n
    \\n \\n {{ column.header || column.field }}\\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.DefaultValueAccessor; }), selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.NgControlStatus; }), selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return i5.NgModel; }), selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: [\"name\", \"disabled\", \"ngModel\", \"ngModelOptions\"], outputs: [\"ngModelChange\"], exportAs: [\"ngModel\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxButtonDirective; }), selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxInputGroupComponent; }), selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxInputDirective; }), selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return IgxRippleDirective; }), selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxCheckboxComponent; }), selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxColumnActionEnabledPipe; }), name: \"columnActionEnabled\" }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxFilterActionColumnsPipe; }), name: \"filterActionColumns\" }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxSortActionColumnsPipe; }), name: \"sortActionColumns\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionsComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-column-actions', template: \"
    \\n

    {{ title }}

    \\n\\n \\n \\n \\n
    \\n\\n
    \\n \\n {{ column.header || column.field }}\\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }]; }, propDecorators: { grid: [{\n type: Input\n }], indentation: [{\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class']\n }], columnsAreaMaxHeight: [{\n type: Input\n }], hideFilter: [{\n type: Input\n }], columnItems: [{\n type: ViewChildren,\n args: [IgxCheckboxComponent]\n }], title: [{\n type: Input\n }], columnToggled: [{\n type: Output\n }], filterColumnsPrompt: [{\n type: Input\n }], filterCriteria: [{\n type: Input\n }], columnDisplayOrder: [{\n type: Input\n }], uncheckAllText: [{\n type: Input\n }], checkAllText: [{\n type: Input\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }] } });\nclass IgxColumnActionEnabledPipe {\n constructor(columnActions) {\n this.columnActions = columnActions;\n }\n transform(collection, actionFilter, _pipeTrigger) {\n if (!collection) {\n return collection;\n }\n let copy = collection.slice(0);\n if (copy.length && copy[0].grid.hasColumnLayouts) {\n copy = copy.filter(c => c.columnLayout);\n }\n if (actionFilter) {\n copy = copy.filter(actionFilter);\n }\n // Preserve the actionable collection for use in the component\n this.columnActions.actionableColumns = copy;\n return copy;\n }\n}\nIgxColumnActionEnabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionEnabledPipe, deps: [{ token: IgxColumnActionsComponent }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxColumnActionEnabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionEnabledPipe, name: \"columnActionEnabled\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionEnabledPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'columnActionEnabled' }]\n }], ctorParameters: function () { return [{ type: IgxColumnActionsComponent, decorators: [{\n type: Inject,\n args: [IgxColumnActionsComponent]\n }] }]; } });\nclass IgxFilterActionColumnsPipe {\n constructor(columnActions) {\n this.columnActions = columnActions;\n }\n transform(collection, filterCriteria, _pipeTrigger) {\n if (!collection) {\n return collection;\n }\n let copy = collection.slice(0);\n if (filterCriteria && filterCriteria.length > 0) {\n const filterFunc = (c) => {\n const filterText = c.header || c.field;\n if (!filterText) {\n return false;\n }\n return filterText.toLocaleLowerCase().indexOf(filterCriteria.toLocaleLowerCase()) >= 0 ||\n (c.children?.some(filterFunc) ?? false);\n };\n copy = collection.filter(filterFunc);\n }\n // Preserve the filtered collection for use in the component\n this.columnActions.filteredColumns = copy;\n return copy;\n }\n}\nIgxFilterActionColumnsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterActionColumnsPipe, deps: [{ token: IgxColumnActionsComponent }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxFilterActionColumnsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterActionColumnsPipe, name: \"filterActionColumns\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxFilterActionColumnsPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'filterActionColumns' }]\n }], ctorParameters: function () { return [{ type: IgxColumnActionsComponent, decorators: [{\n type: Inject,\n args: [IgxColumnActionsComponent]\n }] }]; } });\nclass IgxSortActionColumnsPipe {\n transform(collection, displayOrder, _pipeTrigger) {\n if (displayOrder === ColumnDisplayOrder.Alphabetical) {\n return collection.sort((a, b) => (a.header || a.field).localeCompare(b.header || b.field));\n }\n return collection;\n }\n}\nIgxSortActionColumnsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortActionColumnsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxSortActionColumnsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortActionColumnsPipe, name: \"sortActionColumns\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSortActionColumnsPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'sortActionColumns' }]\n }] });\n\nclass IgxColumnHidingDirective extends IgxColumnActionsBaseDirective {\n constructor(columnActions) {\n super();\n this.columnActions = columnActions;\n /**\n * @hidden @internal\n */\n this.actionEnabledColumnsFilter = c => !c.disableHiding;\n columnActions.actionsDirective = this;\n }\n /**\n * @hidden @internal\n */\n get checkAllLabel() {\n return this.columnActions.grid?.resourceStrings.igx_grid_hiding_check_all_label ?? 'Show All';\n }\n /**\n * @hidden @internal\n */\n get uncheckAllLabel() {\n return this.columnActions.grid?.resourceStrings.igx_grid_hiding_uncheck_all_label ?? 'Hide All';\n }\n /**\n * @hidden @internal\n */\n checkAll() {\n this.columnActions.filteredColumns.forEach(c => c.toggleVisibility(false));\n }\n /**\n * @hidden @internal\n */\n uncheckAll() {\n this.columnActions.filteredColumns.forEach(c => c.toggleVisibility(true));\n }\n /**\n * @hidden @internal\n */\n columnChecked(column) {\n return !column.hidden;\n }\n /**\n * @hidden @internal\n */\n toggleColumn(column) {\n column.toggleVisibility();\n }\n get allChecked() {\n return this.columnActions.filteredColumns.every(col => !this.columnChecked(col));\n }\n get allUnchecked() {\n return this.columnActions.filteredColumns.every(col => this.columnChecked(col));\n }\n}\nIgxColumnHidingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnHidingDirective, deps: [{ token: IgxColumnActionsComponent }], target: i0.ɵɵFactoryTarget.Directive });\nIgxColumnHidingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxColumnHidingDirective, selector: \"[igxColumnHiding]\", usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnHidingDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxColumnHiding]' }]\n }], ctorParameters: function () { return [{ type: IgxColumnActionsComponent, decorators: [{\n type: Inject,\n args: [IgxColumnActionsComponent]\n }] }]; } });\n\nclass IgxColumnPinningDirective extends IgxColumnActionsBaseDirective {\n constructor(columnActions) {\n super();\n this.columnActions = columnActions;\n /**\n * @hidden @internal\n */\n this.actionEnabledColumnsFilter = (c) => !c.disablePinning && !c.level;\n columnActions.actionsDirective = this;\n }\n /**\n * @hidden @internal\n */\n get checkAllLabel() {\n return this.columnActions.grid?.resourceStrings.igx_grid_pinning_check_all_label ?? 'Pin All';\n }\n /**\n * @hidden @internal\n */\n get uncheckAllLabel() {\n return this.columnActions.grid?.resourceStrings.igx_grid_pinning_uncheck_all_label ?? 'Unpin All';\n }\n /**\n * @hidden @internal\n */\n checkAll() {\n this.columnActions.filteredColumns.forEach(c => c.pinned = true);\n }\n /**\n * @hidden @internal\n */\n uncheckAll() {\n this.columnActions.filteredColumns.forEach(c => c.pinned = false);\n }\n /**\n * @hidden @internal\n */\n columnChecked(column) {\n return column.pinned;\n }\n /**\n * @hidden @internal\n */\n toggleColumn(column) {\n column.pinned = !column.pinned;\n }\n get allUnchecked() {\n return !this.columnActions.filteredColumns.some(col => !this.columnChecked(col));\n }\n get allChecked() {\n return !this.columnActions.filteredColumns.some(col => this.columnChecked(col));\n }\n}\nIgxColumnPinningDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnPinningDirective, deps: [{ token: IgxColumnActionsComponent }], target: i0.ɵɵFactoryTarget.Directive });\nIgxColumnPinningDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxColumnPinningDirective, selector: \"[igxColumnPinning]\", usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnPinningDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[igxColumnPinning]' }]\n }], ctorParameters: function () { return [{ type: IgxColumnActionsComponent, decorators: [{\n type: Inject,\n args: [IgxColumnActionsComponent]\n }] }]; } });\n\nclass IgxColumnActionsModule {\n}\nIgxColumnActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxColumnActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionsModule, declarations: [IgxColumnHidingDirective,\n IgxColumnPinningDirective,\n IgxColumnActionsComponent,\n IgxColumnActionEnabledPipe,\n IgxFilterActionColumnsPipe,\n IgxSortActionColumnsPipe], imports: [IgxGridSharedModules,\n IgxGridPipesModule], exports: [IgxColumnHidingDirective,\n IgxColumnPinningDirective,\n IgxColumnActionsComponent,\n IgxColumnActionEnabledPipe,\n IgxFilterActionColumnsPipe,\n IgxSortActionColumnsPipe] });\nIgxColumnActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionsModule, imports: [IgxGridSharedModules,\n IgxGridPipesModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxColumnActionsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxColumnHidingDirective,\n IgxColumnPinningDirective,\n IgxColumnActionsComponent,\n IgxColumnActionEnabledPipe,\n IgxFilterActionColumnsPipe,\n IgxSortActionColumnsPipe\n ],\n imports: [\n IgxGridSharedModules,\n IgxGridPipesModule\n ],\n exports: [\n IgxColumnHidingDirective,\n IgxColumnPinningDirective,\n IgxColumnActionsComponent,\n IgxColumnActionEnabledPipe,\n IgxFilterActionColumnsPipe,\n IgxSortActionColumnsPipe\n ]\n }]\n }] });\n\n/**\n * Base class for the pinning/hiding column and exporter actions.\n *\n * @hidden @internal\n */\nclass BaseToolbarDirective {\n /**\n * Sets overlay settings\n */\n set overlaySettings(overlaySettings) {\n this._overlaySettings = overlaySettings;\n }\n /**\n * Returns overlay settings\n */\n get overlaySettings() {\n return this._overlaySettings;\n }\n /**\n * Returns the grid containing this component.\n */\n get grid() {\n return this.toolbar.grid;\n }\n constructor(toolbar) {\n this.toolbar = toolbar;\n /**\n * Emits an event before the toggle container is opened.\n */\n this.opening = new EventEmitter();\n /**\n * Emits an event after the toggle container is opened.\n */\n this.opened = new EventEmitter();\n /**\n * Emits an event before the toggle container is closed.\n */\n this.closing = new EventEmitter();\n /**\n * Emits an event after the toggle container is closed.\n */\n this.closed = new EventEmitter();\n /**\n * Emits when after a column's checked state is changed\n */\n this.columnToggle = new EventEmitter();\n this.$destroy = new Subject();\n this._overlaySettings = {\n positionStrategy: new ConnectedPositioningStrategy({\n horizontalDirection: HorizontalAlignment.Left,\n horizontalStartPoint: HorizontalAlignment.Right,\n verticalDirection: VerticalAlignment.Bottom,\n verticalStartPoint: VerticalAlignment.Bottom\n }),\n scrollStrategy: new AbsoluteScrollStrategy(),\n modal: false,\n closeOnEscape: true,\n closeOnOutsideClick: true\n };\n }\n ngOnDestroy() {\n this.$destroy.next();\n this.$destroy.complete();\n }\n /** @hidden @internal */\n toggle(anchorElement, toggleRef, actions) {\n if (actions) {\n this._setupListeners(toggleRef, actions);\n const setHeight = () => actions.columnsAreaMaxHeight = actions.columnsAreaMaxHeight !== '100%'\n ? actions.columnsAreaMaxHeight :\n this.columnListHeight ??\n `${Math.max(this.grid.calcHeight * 0.5, 200)}px`;\n toggleRef.opening.pipe(first$1()).subscribe(setHeight);\n }\n toggleRef.toggle({ ...this.overlaySettings, ...{ target: anchorElement, outlet: this.grid.outlet,\n excludeFromOutsideClick: [anchorElement] } });\n }\n /** @hidden @internal */\n focusSearch(columnActions) {\n columnActions.querySelector('input')?.focus();\n }\n _setupListeners(toggleRef, actions) {\n if (actions) {\n if (!this.$sub || this.$sub.closed) {\n this.$sub = actions.columnToggled.pipe(takeUntil(this.$destroy)).subscribe((event) => this.columnToggle.emit(event));\n }\n }\n /** The if statement prevents emitting open and close events twice */\n if (toggleRef.collapsed) {\n toggleRef.opening.pipe(first$1(), takeUntil(this.$destroy)).subscribe((event) => this.opening.emit(event));\n toggleRef.opened.pipe(first$1(), takeUntil(this.$destroy)).subscribe((event) => this.opened.emit(event));\n }\n else {\n toggleRef.closing.pipe(first$1(), takeUntil(this.$destroy)).subscribe((event) => this.closing.emit(event));\n toggleRef.closed.pipe(first$1(), takeUntil(this.$destroy)).subscribe((event) => this.closed.emit(event));\n }\n }\n}\nBaseToolbarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseToolbarDirective, deps: [{ token: IgxToolbarToken }], target: i0.ɵɵFactoryTarget.Directive });\nBaseToolbarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: BaseToolbarDirective, inputs: { columnListHeight: \"columnListHeight\", title: \"title\", prompt: \"prompt\", overlaySettings: \"overlaySettings\" }, outputs: { opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\", columnToggle: \"columnToggle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseToolbarDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: IgxToolbarToken, decorators: [{\n type: Inject,\n args: [IgxToolbarToken]\n }] }]; }, propDecorators: { columnListHeight: [{\n type: Input\n }], title: [{\n type: Input\n }], prompt: [{\n type: Input\n }], overlaySettings: [{\n type: Input\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], columnToggle: [{\n type: Output\n }] } });\n/**\n * @hidden @internal\n * Base class for pinning/hiding column actions\n */\nclass BaseToolbarColumnActionsDirective extends BaseToolbarDirective {\n constructor() {\n super(...arguments);\n this.hideFilter = false;\n this.filterCriteria = '';\n this.columnDisplayOrder = ColumnDisplayOrder.DisplayOrder;\n this.columnsAreaMaxHeight = '100%';\n this.indentetion = 30;\n }\n checkAll() {\n this.columnActionsUI.checkAllColumns();\n }\n uncheckAll() {\n this.columnActionsUI.uncheckAllColumns();\n }\n}\nBaseToolbarColumnActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseToolbarColumnActionsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nBaseToolbarColumnActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: BaseToolbarColumnActionsDirective, inputs: { hideFilter: \"hideFilter\", filterCriteria: \"filterCriteria\", columnDisplayOrder: \"columnDisplayOrder\", columnsAreaMaxHeight: \"columnsAreaMaxHeight\", uncheckAllText: \"uncheckAllText\", checkAllText: \"checkAllText\", indentetion: \"indentetion\", buttonText: \"buttonText\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: BaseToolbarColumnActionsDirective, decorators: [{\n type: Directive\n }], propDecorators: { hideFilter: [{\n type: Input\n }], filterCriteria: [{\n type: Input\n }], columnDisplayOrder: [{\n type: Input\n }], columnsAreaMaxHeight: [{\n type: Input\n }], uncheckAllText: [{\n type: Input\n }], checkAllText: [{\n type: Input\n }], indentetion: [{\n type: Input\n }], buttonText: [{\n type: Input\n }] } });\n\n/**\n * Provides a pre-configured exporter component for the grid.\n *\n * @remarks\n * This component still needs the actual exporter service(s) provided in the DI chain\n * in order to export something.\n *\n * @igxModule IgxGridToolbarModule\n * @igxParent IgxGridToolbarComponent\n *\n */\nclass IgxGridToolbarExporterComponent extends BaseToolbarDirective {\n constructor(toolbar, excelExporter, csvExporter) {\n super(toolbar);\n this.excelExporter = excelExporter;\n this.csvExporter = csvExporter;\n /**\n * Show entry for CSV export.\n */\n this.exportCSV = true;\n /**\n * Show entry for Excel export.\n */\n this.exportExcel = true;\n /**\n * The name for the exported file.\n */\n this.filename = 'ExportedData';\n /**\n * Emitted when starting an export operation. Re-emitted additionally\n * by the grid itself.\n */\n this.exportStarted = new EventEmitter();\n /**\n * Emitted on successful ending of an export operation.\n */\n this.exportEnded = new EventEmitter();\n /**\n * Indicates whether there is an export in progress.\n */\n this.isExporting = false;\n }\n export(type, toggleRef) {\n let options;\n let exporter;\n toggleRef?.close();\n switch (type) {\n case 'csv':\n options = new IgxCsvExporterOptions(this.filename, CsvFileTypes.CSV);\n exporter = this.csvExporter;\n break;\n case 'excel':\n options = new IgxExcelExporterOptions(this.filename);\n exporter = this.excelExporter;\n }\n const args = { exporter, options, grid: this.grid, cancel: false };\n this.exportStarted.emit(args);\n this.grid.toolbarExporting.emit(args);\n this.isExporting = true;\n this.toolbar.showProgress = true;\n if (args.cancel) {\n return;\n }\n exporter.exportEnded.pipe(first$1()).subscribe(() => {\n this.exportEnded.emit();\n this.isExporting = false;\n this.toolbar.showProgress = false;\n });\n exporter.export(this.grid, options);\n }\n}\nIgxGridToolbarExporterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarExporterComponent, deps: [{ token: IgxToolbarToken }, { token: IgxExcelExporterService }, { token: IgxCsvExporterService }], target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarExporterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarExporterComponent, selector: \"igx-grid-toolbar-exporter\", inputs: { exportCSV: \"exportCSV\", exportExcel: \"exportExcel\", filename: \"filename\" }, outputs: { exportStarted: \"exportStarted\", exportEnded: \"exportEnded\" }, queries: [{ propertyName: \"hasExcelAttr\", first: true, predicate: IgxExcelTextDirective, descendants: true }, { propertyName: \"hasCSVAttr\", first: true, predicate: IgxCSVTextDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n
    \\n
      \\n
    • \\n \\n \\n \\n \\n {{ grid?.resourceStrings.igx_grid_toolbar_exporter_excel_entry_text}}\\n \\n \\n
    • \\n\\n
    • \\n \\n \\n \\n \\n {{ grid?.resourceStrings.igx_grid_toolbar_exporter_csv_entry_text }}\\n \\n
    • \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: IgxCSVTextDirective, selector: \"[csvText],csv-text\" }, { kind: \"directive\", type: IgxExcelTextDirective, selector: \"[excelText],excel-text\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarExporterComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar-exporter', template: \"\\n\\n
    \\n
      \\n
    • \\n \\n \\n \\n \\n {{ grid?.resourceStrings.igx_grid_toolbar_exporter_excel_entry_text}}\\n \\n \\n
    • \\n\\n
    • \\n \\n \\n \\n \\n {{ grid?.resourceStrings.igx_grid_toolbar_exporter_csv_entry_text }}\\n \\n
    • \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxToolbarToken, decorators: [{\n type: Inject,\n args: [IgxToolbarToken]\n }] }, { type: IgxExcelExporterService }, { type: IgxCsvExporterService }]; }, propDecorators: { hasExcelAttr: [{\n type: ContentChild,\n args: [IgxExcelTextDirective]\n }], hasCSVAttr: [{\n type: ContentChild,\n args: [IgxCSVTextDirective]\n }], exportCSV: [{\n type: Input\n }], exportExcel: [{\n type: Input\n }], filename: [{\n type: Input\n }], exportStarted: [{\n type: Output\n }], exportEnded: [{\n type: Output\n }] } });\n\n/**\n * Provides a pre-configured column hiding component for the grid.\n *\n *\n * @igxModule IgxGridToolbarModule\n * @igxParent IgxGridToolbarComponent\n *\n * @example\n * ```html\n * \n * ```\n */\nclass IgxGridToolbarHidingComponent extends BaseToolbarColumnActionsDirective {\n set content(content) {\n this.columnActionsUI = content;\n }\n}\nIgxGridToolbarHidingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarHidingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarHidingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarHidingComponent, selector: \"igx-grid-toolbar-hiding\", viewQueries: [{ propertyName: \"content\", first: true, predicate: IgxColumnHidingDirective, descendants: true, read: IgxColumnActionsComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: IgxColumnHidingDirective, selector: \"[igxColumnHiding]\" }, { kind: \"component\", type: IgxColumnActionsComponent, selector: \"igx-column-actions\", inputs: [\"grid\", \"indentation\", \"columnsAreaMaxHeight\", \"hideFilter\", \"title\", \"filterColumnsPrompt\", \"filterCriteria\", \"columnDisplayOrder\", \"uncheckAllText\", \"checkAllText\", \"id\"], outputs: [\"columnToggled\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"pipe\", type: i1$1.AsyncPipe, name: \"async\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarHidingComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar-hiding', template: \"\\n \\n \\n \\n\\n\" }]\n }], propDecorators: { content: [{\n type: ViewChild,\n args: [IgxColumnHidingDirective, { read: IgxColumnActionsComponent }]\n }] } });\n\n/**\n * Provides a pre-configured column pinning component for the grid.\n *\n *\n * @igxModule IgxGridToolbarModule\n * @igxParent IgxGridToolbarComponent\n *\n * @example\n * ```html\n * \n * ```\n */\nclass IgxGridToolbarPinningComponent extends BaseToolbarColumnActionsDirective {\n set content(content) {\n this.columnActionsUI = content;\n }\n}\nIgxGridToolbarPinningComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarPinningComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxGridToolbarPinningComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxGridToolbarPinningComponent, selector: \"igx-grid-toolbar-pinning\", viewQueries: [{ propertyName: \"content\", first: true, predicate: IgxColumnPinningDirective, descendants: true, read: IgxColumnActionsComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: IgxColumnPinningDirective, selector: \"[igxColumnPinning]\" }, { kind: \"component\", type: IgxColumnActionsComponent, selector: \"igx-column-actions\", inputs: [\"grid\", \"indentation\", \"columnsAreaMaxHeight\", \"hideFilter\", \"title\", \"filterColumnsPrompt\", \"filterCriteria\", \"columnDisplayOrder\", \"uncheckAllText\", \"checkAllText\", \"id\"], outputs: [\"columnToggled\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"pipe\", type: i1$1.AsyncPipe, name: \"async\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarPinningComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-grid-toolbar-pinning', template: \"\\n \\n \\n \\n\\n\" }]\n }], propDecorators: { content: [{\n type: ViewChild,\n args: [IgxColumnPinningDirective, { read: IgxColumnActionsComponent }]\n }] } });\n\nclass IgxGridToolbarModule {\n}\nIgxGridToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxGridToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarModule, declarations: [IgxCSVTextDirective,\n IgxExcelTextDirective,\n IgxGridToolbarActionsComponent,\n IgxGridToolbarAdvancedFilteringComponent,\n IgxGridToolbarComponent,\n IgxGridToolbarExporterComponent,\n IgxGridToolbarHidingComponent,\n IgxGridToolbarPinningComponent,\n IgxGridToolbarTitleComponent,\n IgxGridToolbarDirective], imports: [IgxColumnActionsModule,\n IgxGridSharedModules], exports: [IgxCSVTextDirective,\n IgxExcelTextDirective,\n IgxGridToolbarActionsComponent,\n IgxGridToolbarAdvancedFilteringComponent,\n IgxGridToolbarComponent,\n IgxGridToolbarExporterComponent,\n IgxGridToolbarHidingComponent,\n IgxGridToolbarPinningComponent,\n IgxGridToolbarTitleComponent,\n IgxGridToolbarDirective] });\nIgxGridToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarModule, imports: [IgxColumnActionsModule,\n IgxGridSharedModules] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridToolbarModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxCSVTextDirective,\n IgxExcelTextDirective,\n IgxGridToolbarActionsComponent,\n IgxGridToolbarAdvancedFilteringComponent,\n IgxGridToolbarComponent,\n IgxGridToolbarExporterComponent,\n IgxGridToolbarHidingComponent,\n IgxGridToolbarPinningComponent,\n IgxGridToolbarTitleComponent,\n IgxGridToolbarDirective\n ],\n imports: [\n IgxColumnActionsModule,\n IgxGridSharedModules\n ],\n exports: [\n IgxCSVTextDirective,\n IgxExcelTextDirective,\n IgxGridToolbarActionsComponent,\n IgxGridToolbarAdvancedFilteringComponent,\n IgxGridToolbarComponent,\n IgxGridToolbarExporterComponent,\n IgxGridToolbarHidingComponent,\n IgxGridToolbarPinningComponent,\n IgxGridToolbarTitleComponent,\n IgxGridToolbarDirective\n ]\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxGridCommonModule {\n}\nIgxGridCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxGridCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCommonModule, declarations: [IgxRowDirective,\n IgxGridCellComponent,\n IgxRowAddTextDirective,\n IgxRowEditTemplateDirective,\n IgxRowEditActionsDirective,\n IgxRowEditTextDirective,\n IgxRowEditTabStopDirective,\n IgxGridBodyDirective,\n IgxGridFooterComponent,\n IgxAdvancedFilteringDialogComponent,\n IgxRowExpandedIndicatorDirective,\n IgxRowCollapsedIndicatorDirective,\n IgxHeaderExpandIndicatorDirective,\n IgxHeaderCollapseIndicatorDirective,\n IgxExcelStyleHeaderIconDirective,\n IgxSortAscendingHeaderIconDirective,\n IgxSortDescendingHeaderIconDirective,\n IgxSortHeaderIconDirective,\n IgxGroupAreaDropDirective,\n IgxGroupByMetaPipe], imports: [IgxGridColumnModule,\n IgxGridHeadersModule,\n IgxColumnMovingModule,\n IgxGridResizingModule,\n IgxGridSelectionModule,\n IgxGridSummaryModule,\n IgxGridToolbarModule,\n IgxColumnActionsModule,\n IgxGridPipesModule,\n IgxGridFilteringModule,\n IgxGridExcelStyleFilteringModule,\n IgxRowDragModule,\n IgxPaginatorModule,\n IgxGridSharedModules,\n IgxChipsModule,\n IgxQueryBuilderModule,\n IgxTooltipModule,\n ReactiveFormsModule], exports: [IgxGridCellComponent,\n IgxRowAddTextDirective,\n IgxRowEditTemplateDirective,\n IgxRowEditActionsDirective,\n IgxRowEditTextDirective,\n IgxRowEditTabStopDirective,\n IgxGridBodyDirective,\n IgxColumnActionsModule,\n IgxGridColumnModule,\n IgxGridHeadersModule,\n IgxGridPipesModule,\n IgxGridFilteringModule,\n IgxGridExcelStyleFilteringModule,\n IgxRowDragModule,\n IgxPaginatorModule,\n IgxGridFooterComponent,\n IgxGridResizingModule,\n IgxColumnMovingModule,\n IgxGridSelectionModule,\n IgxGridSummaryModule,\n IgxGridToolbarModule,\n IgxAdvancedFilteringDialogComponent,\n IgxGridSharedModules,\n IgxRowExpandedIndicatorDirective,\n IgxRowCollapsedIndicatorDirective,\n IgxHeaderExpandIndicatorDirective,\n IgxHeaderCollapseIndicatorDirective,\n IgxExcelStyleHeaderIconDirective,\n IgxSortAscendingHeaderIconDirective,\n IgxSortDescendingHeaderIconDirective,\n IgxSortHeaderIconDirective,\n IgxGroupAreaDropDirective,\n IgxGroupByMetaPipe] });\nIgxGridCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCommonModule, imports: [IgxGridColumnModule,\n IgxGridHeadersModule,\n IgxColumnMovingModule,\n IgxGridResizingModule,\n IgxGridSelectionModule,\n IgxGridSummaryModule,\n IgxGridToolbarModule,\n IgxColumnActionsModule,\n IgxGridPipesModule,\n IgxGridFilteringModule,\n IgxGridExcelStyleFilteringModule,\n IgxRowDragModule,\n IgxPaginatorModule,\n IgxGridSharedModules,\n IgxChipsModule,\n IgxQueryBuilderModule,\n IgxTooltipModule,\n ReactiveFormsModule, IgxColumnActionsModule,\n IgxGridColumnModule,\n IgxGridHeadersModule,\n IgxGridPipesModule,\n IgxGridFilteringModule,\n IgxGridExcelStyleFilteringModule,\n IgxRowDragModule,\n IgxPaginatorModule,\n IgxGridResizingModule,\n IgxColumnMovingModule,\n IgxGridSelectionModule,\n IgxGridSummaryModule,\n IgxGridToolbarModule,\n IgxGridSharedModules] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridCommonModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxRowDirective,\n IgxGridCellComponent,\n IgxRowAddTextDirective,\n IgxRowEditTemplateDirective,\n IgxRowEditActionsDirective,\n IgxRowEditTextDirective,\n IgxRowEditTabStopDirective,\n IgxGridBodyDirective,\n IgxGridFooterComponent,\n IgxAdvancedFilteringDialogComponent,\n IgxRowExpandedIndicatorDirective,\n IgxRowCollapsedIndicatorDirective,\n IgxHeaderExpandIndicatorDirective,\n IgxHeaderCollapseIndicatorDirective,\n IgxExcelStyleHeaderIconDirective,\n IgxSortAscendingHeaderIconDirective,\n IgxSortDescendingHeaderIconDirective,\n IgxSortHeaderIconDirective,\n IgxGroupAreaDropDirective,\n IgxGroupByMetaPipe\n ],\n exports: [\n IgxGridCellComponent,\n IgxRowAddTextDirective,\n IgxRowEditTemplateDirective,\n IgxRowEditActionsDirective,\n IgxRowEditTextDirective,\n IgxRowEditTabStopDirective,\n IgxGridBodyDirective,\n IgxColumnActionsModule,\n IgxGridColumnModule,\n IgxGridHeadersModule,\n IgxGridPipesModule,\n IgxGridFilteringModule,\n IgxGridExcelStyleFilteringModule,\n IgxRowDragModule,\n IgxPaginatorModule,\n IgxGridFooterComponent,\n IgxGridResizingModule,\n IgxColumnMovingModule,\n IgxGridSelectionModule,\n IgxGridSummaryModule,\n IgxGridToolbarModule,\n IgxAdvancedFilteringDialogComponent,\n IgxGridSharedModules,\n IgxRowExpandedIndicatorDirective,\n IgxRowCollapsedIndicatorDirective,\n IgxHeaderExpandIndicatorDirective,\n IgxHeaderCollapseIndicatorDirective,\n IgxExcelStyleHeaderIconDirective,\n IgxSortAscendingHeaderIconDirective,\n IgxSortDescendingHeaderIconDirective,\n IgxSortHeaderIconDirective,\n IgxGroupAreaDropDirective,\n IgxGroupByMetaPipe\n ],\n imports: [\n IgxGridColumnModule,\n IgxGridHeadersModule,\n IgxColumnMovingModule,\n IgxGridResizingModule,\n IgxGridSelectionModule,\n IgxGridSummaryModule,\n IgxGridToolbarModule,\n IgxColumnActionsModule,\n IgxGridPipesModule,\n IgxGridFilteringModule,\n IgxGridExcelStyleFilteringModule,\n IgxRowDragModule,\n IgxPaginatorModule,\n IgxGridSharedModules,\n IgxChipsModule,\n IgxQueryBuilderModule,\n IgxTooltipModule,\n ReactiveFormsModule\n ]\n }]\n }] });\n\n/**\n * An internal component representing the group-by drop area for the igx-grid component.\n *\n * @hidden @internal\n */\nclass IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {\n get hideGroupedColumns() {\n return this._hideGroupedColumns;\n }\n set hideGroupedColumns(value) {\n if (this.grid.columns && this.expressions) {\n this.setColumnsVisibility(value);\n }\n this._hideGroupedColumns = value;\n }\n constructor(differs, ref, platform) {\n super(ref, platform);\n this.differs = differs;\n this._hideGroupedColumns = false;\n this.destroy$ = new Subject();\n }\n ngAfterContentInit() {\n if (this.grid.columns && this.expressions) {\n this.groupingDiffer = this.differs.find(this.expressions).create();\n this.updateColumnsVisibility();\n }\n this.grid.sortingExpressionsChange.pipe(takeUntil(this.destroy$)).subscribe((sortingExpressions) => {\n if (!this.expressions || !this.expressions.length) {\n return;\n }\n let changed = false;\n sortingExpressions.forEach((sortExpr) => {\n const fieldName = sortExpr.fieldName;\n const groupingExpr = this.expressions.find(ex => ex.fieldName === fieldName);\n if (groupingExpr && groupingExpr.dir !== sortExpr.dir) {\n groupingExpr.dir = sortExpr.dir;\n changed = true;\n }\n });\n if (changed) {\n this.expressions = [...this.expressions];\n }\n });\n }\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n handleReorder(event) {\n const { chipsArray, originalEvent } = event;\n const newExpressions = this.getReorderedExpressions(chipsArray);\n this.chipExpressions = newExpressions;\n // When reordered using keyboard navigation, we don't have `onMoveEnd` event.\n if (originalEvent instanceof KeyboardEvent) {\n this.expressions = newExpressions;\n }\n }\n handleMoveEnd() {\n this.expressions = this.chipExpressions;\n }\n groupBy(expression) {\n this.expressions.push(expression);\n this.expressions = [...this.expressions];\n }\n clearGrouping(name) {\n this.expressions = this.expressions.filter(item => item.fieldName !== name);\n this.grid.sortingExpressions = this.grid.sortingExpressions.filter(item => item.fieldName !== name);\n this.grid.notifyChanges(true);\n }\n expressionsChanged() {\n this.updateColumnsVisibility();\n }\n updateColumnsVisibility() {\n if (this.groupingDiffer && this.grid.columns && !this.grid.hasColumnLayouts) {\n const changes = this.groupingDiffer.diff(this.expressions);\n if (changes && this.grid.columns.length > 0) {\n changes.forEachAddedItem((rec) => {\n const col = this.grid.getColumnByName(rec.item.fieldName);\n col.hidden = this.hideGroupedColumns;\n });\n changes.forEachRemovedItem((rec) => {\n const col = this.grid.getColumnByName(rec.item.fieldName);\n col.hidden = false;\n });\n }\n }\n }\n setColumnsVisibility(value) {\n if (this.grid.columns.length > 0 && !this.grid.hasColumnLayouts) {\n this.expressions.forEach((expr) => {\n const col = this.grid.getColumnByName(expr.fieldName);\n col.hidden = value;\n });\n }\n }\n}\nIgxTreeGridGroupByAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridGroupByAreaComponent, deps: [{ token: i0.IterableDiffers }, { token: i0.ElementRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxTreeGridGroupByAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeGridGroupByAreaComponent, selector: \"igx-tree-grid-group-by-area\", inputs: { hideGroupedColumns: \"hideGroupedColumns\" }, providers: [{ provide: IgxGroupByAreaDirective, useExisting: IgxTreeGridGroupByAreaComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n {{ (expression.fieldName | igxGroupByMeta:grid).title }}\\n {{ expression.dir === 1 ? 'arrow_upward' : 'arrow_downward' }}\\n \\n\\n \\n arrow_forward\\n \\n \\n
    \\n \\n
    \\n
    \\n\\n\\n group_work\\n {{ dropAreaMessage }}\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxChipsAreaComponent, selector: \"igx-chips-area\", inputs: [\"width\", \"height\"], outputs: [\"reorder\", \"selectionChange\", \"moveStart\", \"moveEnd\"] }, { kind: \"component\", type: IgxChipComponent, selector: \"igx-chip\", inputs: [\"id\", \"tabIndex\", \"data\", \"draggable\", \"animateOnRelease\", \"hideBaseOnDrag\", \"removable\", \"removeIcon\", \"selectable\", \"selectIcon\", \"disabled\", \"selected\", \"color\", \"resourceStrings\"], outputs: [\"selectedChange\", \"moveStart\", \"moveEnd\", \"remove\", \"chipClick\", \"selectedChanging\", \"selectedChanged\", \"keyDown\", \"dragEnter\", \"dragLeave\", \"dragOver\", \"dragDrop\"] }, { kind: \"directive\", type: IgxDropDirective, selector: \"[igxDrop]\", inputs: [\"igxDrop\", \"dropChannel\", \"dropStrategy\"], outputs: [\"enter\", \"over\", \"leave\", \"dropped\"], exportAs: [\"drop\"] }, { kind: \"directive\", type: IgxGroupAreaDropDirective, selector: \"[igxGroupAreaDrop]\" }, { kind: \"pipe\", type: IgxGroupByMetaPipe, name: \"igxGroupByMeta\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridGroupByAreaComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tree-grid-group-by-area', providers: [{ provide: IgxGroupByAreaDirective, useExisting: IgxTreeGridGroupByAreaComponent }], template: \"\\n \\n \\n {{ (expression.fieldName | igxGroupByMeta:grid).title }}\\n {{ expression.dir === 1 ? 'arrow_upward' : 'arrow_downward' }}\\n \\n\\n \\n arrow_forward\\n \\n \\n
    \\n \\n
    \\n
    \\n\\n\\n group_work\\n {{ dropAreaMessage }}\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.ElementRef }, { type: PlatformUtil }]; }, propDecorators: { hideGroupedColumns: [{\n type: Input\n }] } });\n\n/**\n * @hidden\n */\nclass IgxGridModule {\n}\nIgxGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridModule, declarations: [IgxGridComponent,\n IgxGridRowComponent,\n IgxGridGroupByRowComponent,\n IgxGroupByRowTemplateDirective,\n IgxGridDetailTemplateDirective,\n IgxGridGroupingPipe,\n IgxGridPagingPipe,\n IgxGridSortingPipe,\n IgxGridFilteringPipe,\n IgxGridSummaryPipe,\n IgxGridDetailsPipe,\n IgxGridExpandableCellComponent,\n IgxGridGroupByAreaComponent], imports: [IgxGridCommonModule,\n IgxTooltipModule,\n ReactiveFormsModule], exports: [IgxGridComponent,\n IgxGridExpandableCellComponent,\n IgxGridGroupByRowComponent,\n IgxGridRowComponent,\n IgxGroupByRowTemplateDirective,\n IgxGridDetailTemplateDirective,\n IgxGridGroupingPipe,\n IgxGridPagingPipe,\n IgxGridSortingPipe,\n IgxGridFilteringPipe,\n IgxGridSummaryPipe,\n IgxGridDetailsPipe,\n IgxGridGroupByAreaComponent,\n IgxGridCommonModule] });\nIgxGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridModule, imports: [IgxGridCommonModule,\n IgxTooltipModule,\n ReactiveFormsModule, IgxGridCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxGridComponent,\n IgxGridRowComponent,\n IgxGridGroupByRowComponent,\n IgxGroupByRowTemplateDirective,\n IgxGridDetailTemplateDirective,\n IgxGridGroupingPipe,\n IgxGridPagingPipe,\n IgxGridSortingPipe,\n IgxGridFilteringPipe,\n IgxGridSummaryPipe,\n IgxGridDetailsPipe,\n IgxGridExpandableCellComponent,\n IgxGridGroupByAreaComponent,\n ],\n exports: [\n IgxGridComponent,\n IgxGridExpandableCellComponent,\n IgxGridGroupByRowComponent,\n IgxGridRowComponent,\n IgxGroupByRowTemplateDirective,\n IgxGridDetailTemplateDirective,\n IgxGridGroupingPipe,\n IgxGridPagingPipe,\n IgxGridSortingPipe,\n IgxGridFilteringPipe,\n IgxGridSummaryPipe,\n IgxGridDetailsPipe,\n IgxGridGroupByAreaComponent,\n IgxGridCommonModule\n ],\n imports: [\n IgxGridCommonModule,\n IgxTooltipModule,\n ReactiveFormsModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n }]\n }] });\n\nclass IgxTreeGridAPIService extends GridBaseAPIService {\n get_all_data(transactions) {\n const grid = this.grid;\n let data = grid && grid.flatData ? grid.flatData : [];\n data = transactions ? grid.dataWithAddedInTransactionRows : data;\n return data;\n }\n get_summary_data() {\n const grid = this.grid;\n const data = grid.processedRootRecords?.filter(row => row.isFilteredOutParent === undefined || row.isFilteredOutParent === false)\n .map(rec => rec.data);\n if (data && grid.transactions.enabled) {\n const deletedRows = grid.transactions.getTransactionLog().filter(t => t.type === TransactionType.DELETE).map(t => t.id);\n deletedRows.forEach(rowID => {\n const tempData = grid.primaryKey ? data.map(rec => rec[grid.primaryKey]) : data;\n const index = tempData.indexOf(rowID);\n if (index !== -1) {\n data.splice(index, 1);\n }\n });\n }\n return data;\n }\n allow_expansion_state_change(rowID, expanded) {\n const grid = this.grid;\n const row = grid.records.get(rowID);\n if (row.expanded === expanded ||\n ((!row.children || !row.children.length) && (!grid.loadChildrenOnDemand ||\n (grid.hasChildrenKey && !row.data[grid.hasChildrenKey])))) {\n return false;\n }\n return true;\n }\n expand_path_to_record(record) {\n const grid = this.grid;\n const expandedStates = grid.expansionStates;\n while (record.parent) {\n record = record.parent;\n const expanded = this.get_row_expansion_state(record);\n if (!expanded) {\n expandedStates.set(record.key, true);\n }\n }\n grid.expansionStates = expandedStates;\n if (grid.rowEditable) {\n grid.gridAPI.crudService.endEdit(false);\n }\n }\n get_row_expansion_state(record) {\n const grid = this.grid;\n const states = grid.expansionStates;\n const expanded = states.get(record.key);\n if (expanded !== undefined) {\n return expanded;\n }\n else {\n return record.children && record.children.length && record.level < grid.expansionDepth;\n }\n }\n should_apply_number_style(column) {\n return column.dataType === GridColumnDataType.Number && column.visibleIndex !== 0;\n }\n deleteRowById(rowID) {\n const treeGrid = this.grid;\n const flatDataWithCascadeOnDeleteAndTransactions = treeGrid.primaryKey &&\n treeGrid.foreignKey &&\n treeGrid.cascadeOnDelete &&\n treeGrid.transactions.enabled;\n if (flatDataWithCascadeOnDeleteAndTransactions) {\n treeGrid.transactions.startPending();\n }\n const record = super.deleteRowById(rowID);\n if (flatDataWithCascadeOnDeleteAndTransactions) {\n treeGrid.transactions.endPending(true);\n }\n return record;\n }\n deleteRowFromData(rowID, index) {\n const treeGrid = this.grid;\n const record = treeGrid.records.get(rowID);\n if (treeGrid.primaryKey && treeGrid.foreignKey) {\n index = treeGrid.primaryKey ?\n treeGrid.data.map(c => c[treeGrid.primaryKey]).indexOf(rowID) :\n treeGrid.data.indexOf(rowID);\n super.deleteRowFromData(rowID, index);\n if (treeGrid.cascadeOnDelete) {\n if (record && record.children) {\n for (const child of record.children) {\n super.deleteRowById(child.key);\n }\n }\n }\n }\n else {\n const collection = record.parent ? record.parent.data[treeGrid.childDataKey] : treeGrid.data;\n index = treeGrid.primaryKey ?\n collection.map(c => c[treeGrid.primaryKey]).indexOf(rowID) :\n collection.indexOf(rowID);\n const selectedChildren = [];\n this.get_selected_children(record, selectedChildren);\n if (selectedChildren.length > 0) {\n treeGrid.deselectRows(selectedChildren);\n }\n if (treeGrid.transactions.enabled) {\n const path = treeGrid.generateRowPath(rowID);\n treeGrid.transactions.add({\n id: rowID,\n type: TransactionType.DELETE,\n newValue: null,\n path\n }, collection[index]);\n }\n else {\n collection.splice(index, 1);\n }\n this.grid.validation.clear(rowID);\n }\n }\n get_selected_children(record, selectedRowIDs) {\n const grid = this.grid;\n if (!record.children || record.children.length === 0) {\n return;\n }\n for (const child of record.children) {\n if (grid.selectionService.isRowSelected(child.key)) {\n selectedRowIDs.push(child.key);\n }\n this.get_selected_children(child, selectedRowIDs);\n }\n }\n row_deleted_transaction(rowID) {\n return this.row_deleted_parent(rowID) || super.row_deleted_transaction(rowID);\n }\n get_rec_by_id(rowID) {\n return this.grid.records.get(rowID);\n }\n /**\n * Returns the index of the record in the data view by pk or -1 if not found or primaryKey is not set.\n *\n * @param pk\n * @param dataCollection\n */\n get_rec_index_by_id(pk, dataCollection) {\n dataCollection = dataCollection || this.grid.data;\n return this.grid.primaryKey ? dataCollection.findIndex(rec => rec.data[this.grid.primaryKey] === pk) : -1;\n }\n addRowToData(data, parentRowID) {\n if (parentRowID !== undefined && parentRowID !== null) {\n const state = this.grid.transactions.getState(parentRowID);\n // we should not allow adding of rows as child of deleted row\n if (state && state.type === TransactionType.DELETE) {\n throw Error(`Cannot add child row to deleted parent row`);\n }\n const parentRecord = this.grid.records.get(parentRowID);\n if (!parentRecord) {\n throw Error('Invalid parent row ID!');\n }\n this.grid.summaryService.clearSummaryCache({ rowID: parentRecord.key });\n if (this.grid.primaryKey && this.grid.foreignKey) {\n data[this.grid.foreignKey] = parentRowID;\n super.addRowToData(data);\n }\n else {\n const parentData = parentRecord.data;\n const childKey = this.grid.childDataKey;\n if (this.grid.transactions.enabled) {\n const rowId = this.grid.primaryKey ? data[this.grid.primaryKey] : data;\n const path = [];\n path.push(...this.grid.generateRowPath(parentRowID));\n path.push(parentRowID);\n this.grid.transactions.add({\n id: rowId,\n path,\n newValue: data,\n type: TransactionType.ADD\n }, null);\n }\n else {\n if (!parentData[childKey]) {\n parentData[childKey] = [];\n }\n parentData[childKey].push(data);\n }\n }\n }\n else {\n super.addRowToData(data);\n }\n }\n filterDataByExpressions(expressionsTree) {\n let records = this.filterTreeDataByExpressions(expressionsTree);\n const data = [];\n this.getFlatDataFromFilteredRecords(records, data);\n return data;\n }\n sortDataByExpressions(data, expressions) {\n const records = DataUtil.sort(cloneArray(data), expressions, this.grid.sortStrategy ?? new IgxDataRecordSorting(), this.grid);\n return records.map(r => r.data);\n }\n filterTreeDataByExpressions(expressionsTree) {\n let records = this.grid.rootRecords;\n if (expressionsTree.filteringOperands.length) {\n const state = {\n expressionsTree,\n strategy: this.grid.filterStrategy ?? new TreeGridFilteringStrategy()\n };\n records = FilterUtil.filter(cloneArray(records), state, this.grid);\n }\n return records;\n }\n update_row_in_array(value, rowID, index) {\n const grid = this.grid;\n if (grid.primaryKey && grid.foreignKey) {\n super.update_row_in_array(value, rowID, index);\n }\n else {\n const record = grid.records.get(rowID);\n const childData = record.parent ? record.parent.data[grid.childDataKey] : grid.data;\n index = grid.primaryKey ? childData.map(c => c[grid.primaryKey]).indexOf(rowID) :\n childData.indexOf(rowID);\n childData[index] = value;\n }\n }\n /**\n * Updates related row of provided grid's data source with provided new row value\n *\n * @param grid Grid to update data for\n * @param rowID ID of the row to update\n * @param rowValueInDataSource Initial value of the row as it is in data source\n * @param rowCurrentValue Current value of the row as it is with applied previous transactions\n * @param rowNewValue New value of the row\n */\n updateData(grid, rowID, rowValueInDataSource, rowCurrentValue, rowNewValue) {\n if (grid.transactions.enabled) {\n const path = grid.generateRowPath(rowID);\n const transaction = {\n id: rowID,\n type: TransactionType.UPDATE,\n newValue: rowNewValue,\n path\n };\n grid.transactions.add(transaction, rowCurrentValue);\n }\n else {\n mergeObjects(rowValueInDataSource, rowNewValue);\n }\n }\n row_deleted_parent(rowID) {\n const grid = this.grid;\n if (!grid) {\n return false;\n }\n if ((grid.cascadeOnDelete && grid.foreignKey) || grid.childDataKey) {\n let node = grid.records.get(rowID);\n while (node) {\n const state = grid.transactions.getState(node.key);\n if (state && state.type === TransactionType.DELETE) {\n return true;\n }\n node = node.parent;\n }\n }\n return false;\n }\n getFlatDataFromFilteredRecords(records, data) {\n if (!records || records.length === 0) {\n return;\n }\n for (const record of records) {\n if (!record.isFilteredOutParent) {\n data.push(record);\n }\n this.getFlatDataFromFilteredRecords(record.children, data);\n }\n }\n}\nIgxTreeGridAPIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridAPIService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxTreeGridAPIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridAPIService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridAPIService, decorators: [{\n type: Injectable\n }] });\n\n/**\n * @hidden\n */\nclass IgxRowLoadingIndicatorTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxRowLoadingIndicatorTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowLoadingIndicatorTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxRowLoadingIndicatorTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowLoadingIndicatorTemplateDirective, selector: \"[igxRowLoadingIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowLoadingIndicatorTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxRowLoadingIndicator]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nclass IgxTreeGridSelectionService extends IgxGridSelectionService {\n /** Select specified rows. No event is emitted. */\n selectRowsWithNoEvent(rowIDs, clearPrevSelection) {\n if (this.grid && this.grid.rowSelection === GridSelectionMode.multipleCascade) {\n this.cascadeSelectRowsWithNoEvent(rowIDs, clearPrevSelection);\n return;\n }\n super.selectRowsWithNoEvent(rowIDs, clearPrevSelection);\n }\n /** Deselect specified rows. No event is emitted. */\n deselectRowsWithNoEvent(rowIDs) {\n if (this.grid.rowSelection === GridSelectionMode.multipleCascade) {\n this.cascadeDeselectRowsWithNoEvent(rowIDs);\n return;\n }\n super.deselectRowsWithNoEvent(rowIDs);\n }\n emitRowSelectionEvent(newSelection, added, removed, event) {\n if (this.grid.rowSelection === GridSelectionMode.multipleCascade) {\n this.emitCascadeRowSelectionEvent(newSelection, added, removed, event);\n return;\n }\n super.emitRowSelectionEvent(newSelection, added, removed, event);\n }\n updateCascadeSelectionOnFilterAndCRUD(parents, crudRowID, visibleRowIDs = null) {\n if (visibleRowIDs === null) {\n // if the tree grid has flat structure\n // do not explicitly handle the selection state of the rows\n if (!parents.size) {\n return;\n }\n visibleRowIDs = new Set(this.getRowIDs(this.allData));\n this.rowsToBeSelected = new Set(this.rowSelection);\n this.rowsToBeIndeterminate = new Set(this.indeterminateRows);\n if (crudRowID) {\n this.rowSelection.delete(crudRowID);\n }\n }\n if (!parents.size) {\n this.rowSelection = new Set(this.rowsToBeSelected);\n this.indeterminateRows = new Set(this.rowsToBeIndeterminate);\n // TODO: emit selectionChangeD event, calculate its args through the handleAddedAndRemovedArgs method\n this.clearHeaderCBState();\n this.selectedRowsChange.next();\n return;\n }\n const newParents = new Set();\n parents.forEach(parent => {\n this.handleRowSelectionState(parent, visibleRowIDs);\n if (parent && parent.parent) {\n newParents.add(parent.parent);\n }\n });\n this.updateCascadeSelectionOnFilterAndCRUD(newParents, null, visibleRowIDs);\n }\n cascadeSelectRowsWithNoEvent(rowIDs, clearPrevSelection) {\n if (clearPrevSelection) {\n this.indeterminateRows.clear();\n this.rowSelection.clear();\n this.calculateRowsNewSelectionState({ added: rowIDs, removed: [] });\n }\n else {\n const oldSelection = this.getSelectedRows();\n const newSelection = [...oldSelection, ...rowIDs];\n const args = { oldSelection, newSelection };\n // retrieve only the rows without their parents/children which has to be added to the selection\n this.handleAddedAndRemovedArgs(args);\n this.calculateRowsNewSelectionState(args);\n }\n this.rowSelection = new Set(this.rowsToBeSelected);\n this.indeterminateRows = new Set(this.rowsToBeIndeterminate);\n this.clearHeaderCBState();\n this.selectedRowsChange.next();\n }\n cascadeDeselectRowsWithNoEvent(rowIDs) {\n const args = { added: [], removed: rowIDs };\n this.calculateRowsNewSelectionState(args);\n this.rowSelection = new Set(this.rowsToBeSelected);\n this.indeterminateRows = new Set(this.rowsToBeIndeterminate);\n this.clearHeaderCBState();\n this.selectedRowsChange.next();\n }\n get selectionService() {\n return this.grid.selectionService;\n }\n emitCascadeRowSelectionEvent(newSelection, added, removed, event) {\n const currSelection = this.getSelectedRows();\n if (this.areEqualCollections(currSelection, newSelection)) {\n return;\n }\n const args = {\n owner: this.grid, oldSelection: this.getSelectedRowsData(), newSelection,\n added, removed, event, cancel: false\n };\n this.calculateRowsNewSelectionState(args, !!this.grid.primaryKey);\n args.newSelection = Array.from(this.allData.filter(r => this.rowsToBeSelected.has(this.grid.primaryKey ? r[this.grid.primaryKey] : r)));\n // retrieve rows/parents/children which has been added/removed from the selection\n this.handleAddedAndRemovedArgs(args);\n this.grid.rowSelectionChanging.emit(args);\n if (args.cancel) {\n return;\n }\n const newSelectionIDs = args.newSelection.map(r => this.grid.primaryKey ? r[this.grid.primaryKey] : r);\n // if args.newSelection hasn't been modified\n if (this.areEqualCollections(Array.from(this.rowsToBeSelected), newSelectionIDs)) {\n this.rowSelection = new Set(this.rowsToBeSelected);\n this.indeterminateRows = new Set(this.rowsToBeIndeterminate);\n this.clearHeaderCBState();\n this.selectedRowsChange.next();\n }\n else {\n // select the rows within the modified args.newSelection with no event\n this.cascadeSelectRowsWithNoEvent(newSelectionIDs, true);\n }\n }\n /**\n * retrieve the rows which should be added/removed to/from the old selection\n */\n handleAddedAndRemovedArgs(args) {\n const newSelectionSet = new Set(args.newSelection);\n const oldSelectionSet = new Set(args.oldSelection);\n args.removed = args.oldSelection.filter(x => !newSelectionSet.has(x));\n args.added = args.newSelection.filter(x => !oldSelectionSet.has(x));\n }\n /**\n * adds to rowsToBeProcessed set all visible children of the rows which was initially within the rowsToBeProcessed set\n *\n * @param rowsToBeProcessed set of the rows (without their parents/children) to be selected/deselected\n * @param visibleRowIDs list of all visible rowIds\n * @returns a new set with all direct parents of the rows within rowsToBeProcessed set\n */\n collectRowsChildrenAndDirectParents(rowsToBeProcessed, visibleRowIDs, adding, shouldConvert) {\n const processedRowsParents = new Set();\n Array.from(rowsToBeProcessed).forEach((row) => {\n const rowID = shouldConvert ? row[this.grid.primaryKey] : row;\n this.selectDeselectRow(rowID, adding);\n const rowTreeRecord = this.grid.gridAPI.get_rec_by_id(rowID);\n const rowAndAllChildren = this.get_all_children(rowTreeRecord);\n rowAndAllChildren.forEach(r => {\n if (visibleRowIDs.has(r.key)) {\n this.selectDeselectRow(r.key, adding);\n }\n });\n if (rowTreeRecord && rowTreeRecord.parent) {\n processedRowsParents.add(rowTreeRecord.parent);\n }\n });\n return processedRowsParents;\n }\n /**\n * populates the rowsToBeSelected and rowsToBeIndeterminate sets\n * with the rows which will be eventually in selected/indeterminate state\n */\n calculateRowsNewSelectionState(args, shouldConvert = false) {\n this.rowsToBeSelected = new Set(args.oldSelection ? shouldConvert ? args.oldSelection.map(r => r[this.grid.primaryKey]) : args.oldSelection : this.getSelectedRows());\n this.rowsToBeIndeterminate = new Set(this.getIndeterminateRows());\n const visibleRowIDs = new Set(this.getRowIDs(this.allData));\n const removed = new Set(args.removed);\n const added = new Set(args.added);\n if (removed && removed.size) {\n let removedRowsParents = new Set();\n removedRowsParents = this.collectRowsChildrenAndDirectParents(removed, visibleRowIDs, false, shouldConvert);\n Array.from(removedRowsParents).forEach((parent) => {\n this.handleParentSelectionState(parent, visibleRowIDs);\n });\n }\n if (added && added.size) {\n let addedRowsParents = new Set();\n addedRowsParents = this.collectRowsChildrenAndDirectParents(added, visibleRowIDs, true, shouldConvert);\n Array.from(addedRowsParents).forEach((parent) => {\n this.handleParentSelectionState(parent, visibleRowIDs);\n });\n }\n }\n /**\n * recursively handle the selection state of the direct and indirect parents\n */\n handleParentSelectionState(treeRow, visibleRowIDs) {\n if (!treeRow) {\n return;\n }\n this.handleRowSelectionState(treeRow, visibleRowIDs);\n if (treeRow.parent) {\n this.handleParentSelectionState(treeRow.parent, visibleRowIDs);\n }\n }\n /**\n * Handle the selection state of a given row based the selection states of its direct children\n */\n handleRowSelectionState(treeRow, visibleRowIDs) {\n let visibleChildren = [];\n if (treeRow && treeRow.children) {\n visibleChildren = treeRow.children.filter(child => visibleRowIDs.has(child.key));\n }\n if (visibleChildren.length) {\n if (visibleChildren.every(row => this.rowsToBeSelected.has(row.key))) {\n this.selectDeselectRow(treeRow.key, true);\n }\n else if (visibleChildren.some(row => this.rowsToBeSelected.has(row.key) || this.rowsToBeIndeterminate.has(row.key))) {\n this.rowsToBeIndeterminate.add(treeRow.key);\n this.rowsToBeSelected.delete(treeRow.key);\n }\n else {\n this.selectDeselectRow(treeRow.key, false);\n }\n }\n else {\n // if the children of the row has been deleted and the row was selected do not change its state\n if (this.isRowSelected(treeRow.key)) {\n this.selectDeselectRow(treeRow.key, true);\n }\n else {\n this.selectDeselectRow(treeRow.key, false);\n }\n }\n }\n get_all_children(record) {\n const children = [];\n if (record && record.children && record.children.length) {\n for (const child of record.children) {\n children.push(...this.get_all_children(child));\n children.push(child);\n }\n }\n return children;\n }\n selectDeselectRow(rowID, select) {\n if (select) {\n this.rowsToBeSelected.add(rowID);\n this.rowsToBeIndeterminate.delete(rowID);\n }\n else {\n this.rowsToBeSelected.delete(rowID);\n this.rowsToBeIndeterminate.delete(rowID);\n }\n }\n}\nIgxTreeGridSelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSelectionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxTreeGridSelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSelectionService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSelectionService, decorators: [{\n type: Injectable\n }] });\n\nclass IgxTreeGridCellComponent extends IgxGridExpandableCellComponent {\n constructor() {\n super(...arguments);\n /**\n * @hidden\n */\n this.level = 0;\n /**\n * @hidden\n */\n this.showIndicator = false;\n }\n /**\n * Gets the row of the cell.\n * ```typescript\n * let cellRow = this.cell.row;\n * ```\n *\n * @memberof IgxGridCellComponent\n */\n get row() {\n // TODO: Fix types\n return new IgxTreeGridRow(this.grid, this.intRow.index, this.intRow.data);\n }\n /**\n * @hidden\n */\n toggle(event) {\n event.stopPropagation();\n this.grid.gridAPI.set_row_expansion_state(this.intRow.key, !this.intRow.expanded, event);\n }\n /**\n * @hidden\n */\n onLoadingDblClick(event) {\n event.stopPropagation();\n }\n}\nIgxTreeGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxTreeGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeGridCellComponent, selector: \"igx-tree-grid-cell\", inputs: { level: \"level\", showIndicator: \"showIndicator\", isLoading: \"isLoading\", row: \"row\" }, providers: [HammerGesturesManager], usesInheritance: true, ngImport: i0, template: \"\\n {{ grid.resourceStrings.igx_grid_pinned_row_indicator }}\\n\\n\\n
    {{\\n formatter\\n ? (value | columnFormatter:formatter:rowData)\\n : column.dataType === \\\"number\\\"\\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\\n : column.dataType === 'currency'\\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\\n : column.dataType === 'percent'\\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\\n : value\\n }}
    \\n {{ value ? \\\"check\\\" : \\\"close\\\" }}\\n \\n
    \\n\\n
    {{\\n !isEmptyAddRowCell ? value : (column.header || column.field)\\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 {{ currencyCodeSymbol }}\\n \\n {{ currencyCodeSymbol }}\\n \\n \\n \\n \\n \\n {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} \\n \\n \\n\\n\\n 0\\\">\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n error\\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n\\n\\n expand_more\\n\\n\\n chevron_right\\n\\n\\n
    \\n {{grid.resourceStrings.igx_grid_required_validation_error}}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_email_validation_error }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"directive\", type: i5.DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i5.NumberValueAccessor, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\" }, { kind: \"directive\", type: i5.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i5.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\" }, { kind: \"component\", type: IgxDatePickerComponent, selector: \"igx-date-picker\", inputs: [\"hideOutsideDays\", \"displayMonthsCount\", \"showWeekNumbers\", \"formatter\", \"headerOrientation\", \"todayButtonLabel\", \"cancelButtonLabel\", \"spinLoop\", \"spinDelta\", \"outlet\", \"id\", \"formatViews\", \"disabledDates\", \"specialDates\", \"calendarFormat\", \"value\", \"minValue\", \"maxValue\", \"resourceStrings\", \"readOnly\"], outputs: [\"valueChange\", \"validationFailed\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxFocusDirective, selector: \"[igxFocus]\", inputs: [\"igxFocus\"], exportAs: [\"igxFocus\"] }, { kind: \"directive\", type: IgxTextHighlightDirective, selector: \"[igxTextHighlight]\", inputs: [\"cssClass\", \"activeCssClass\", \"containerClass\", \"groupName\", \"value\", \"row\", \"column\", \"metadata\"] }, { kind: \"directive\", type: IgxTextSelectionDirective, selector: \"[igxTextSelection]\", inputs: [\"igxTextSelection\"], exportAs: [\"igxTextSelection\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxChipComponent, selector: \"igx-chip\", inputs: [\"id\", \"tabIndex\", \"data\", \"draggable\", \"animateOnRelease\", \"hideBaseOnDrag\", \"removable\", \"removeIcon\", \"selectable\", \"selectIcon\", \"disabled\", \"selected\", \"color\", \"resourceStrings\"], outputs: [\"selectedChange\", \"moveStart\", \"moveEnd\", \"remove\", \"chipClick\", \"selectedChanging\", \"selectedChanged\", \"keyDown\", \"dragEnter\", \"dragLeave\", \"dragOver\", \"dragDrop\"] }, { kind: \"component\", type: IgxCircularProgressBarComponent, selector: \"igx-circular-bar\", inputs: [\"id\", \"isIndeterminate\", \"textVisibility\", \"text\"] }, { kind: \"component\", type: IgxTimePickerComponent, selector: \"igx-time-picker\", inputs: [\"id\", \"displayFormat\", \"inputFormat\", \"mode\", \"minValue\", \"maxValue\", \"spinLoop\", \"formatter\", \"headerOrientation\", \"readOnly\", \"value\", \"resourceStrings\", \"okButtonLabel\", \"cancelButtonLabel\", \"itemsDelta\"], outputs: [\"selected\", \"valueChange\", \"validationFailed\"] }, { kind: \"directive\", type: IgxDateTimeEditorDirective, selector: \"[igxDateTimeEditor]\", inputs: [\"locale\", \"minValue\", \"maxValue\", \"spinLoop\", \"displayFormat\", \"igxDateTimeEditor\", \"value\", \"spinDelta\"], outputs: [\"valueChange\", \"validationFailed\"], exportAs: [\"igxDateTimeEditor\"] }, { kind: \"directive\", type: IgxTooltipDirective, selector: \"[igxTooltip]\", inputs: [\"context\", \"id\"], exportAs: [\"tooltip\"] }, { kind: \"directive\", type: IgxTooltipTargetDirective, selector: \"[igxTooltipTarget]\", inputs: [\"showDelay\", \"hideDelay\", \"tooltipDisabled\", \"igxTooltipTarget\", \"tooltip\"], outputs: [\"tooltipShow\", \"tooltipHide\"], exportAs: [\"tooltipTarget\"] }, { kind: \"directive\", type: i5.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"directive\", type: i5.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }, { kind: \"pipe\", type: IgxGridCellImageAltPipe, name: \"igxCellImageAlt\" }, { kind: \"pipe\", type: IgxStringReplacePipe, name: \"igxStringReplace\" }, { kind: \"pipe\", type: IgxColumnFormatterPipe, name: \"columnFormatter\" }, { kind: \"pipe\", type: i1$1.DecimalPipe, name: \"number\" }, { kind: \"pipe\", type: i1$1.PercentPipe, name: \"percent\" }, { kind: \"pipe\", type: i1$1.CurrencyPipe, name: \"currency\" }, { kind: \"pipe\", type: i1$1.DatePipe, name: \"date\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridCellComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-tree-grid-cell', providers: [HammerGesturesManager], template: \"\\n {{ grid.resourceStrings.igx_grid_pinned_row_indicator }}\\n\\n\\n
    {{\\n formatter\\n ? (value | columnFormatter:formatter:rowData)\\n : column.dataType === \\\"number\\\"\\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\\n : column.dataType === 'currency'\\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\\n : column.dataType === 'percent'\\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\\n : value\\n }}
    \\n {{ value ? \\\"check\\\" : \\\"close\\\" }}\\n \\n
    \\n\\n
    {{\\n !isEmptyAddRowCell ? value : (column.header || column.field)\\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 {{ currencyCodeSymbol }}\\n \\n {{ currencyCodeSymbol }}\\n \\n \\n \\n \\n \\n {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} \\n \\n \\n\\n\\n 0\\\">\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n error\\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n\\n\\n expand_more\\n\\n\\n chevron_right\\n\\n\\n
    \\n {{grid.resourceStrings.igx_grid_required_validation_error}}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_email_validation_error }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\\n
    \\n
    \\n\" }]\n }], propDecorators: { level: [{\n type: Input\n }], showIndicator: [{\n type: Input\n }], isLoading: [{\n type: Input\n }], row: [{\n type: Input\n }] } });\n\nclass IgxTreeGridRowComponent extends IgxRowDirective {\n /**\n * The `ITreeGridRecord` passed to the row component.\n *\n * ```typescript\n * const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;\n * const treeRow = row.treeRow;\n * ```\n */\n get treeRow() {\n return this._treeRow;\n }\n set treeRow(value) {\n if (this._treeRow !== value) {\n this._treeRow = value;\n this.data = this._treeRow.data;\n }\n }\n /**\n * Sets whether the row is pinned.\n * Default value is `false`.\n * ```typescript\n * this.grid.selectedRows[0].pinned = true;\n * ```\n */\n set pinned(value) {\n if (value) {\n this.grid.pinRow(this.key);\n }\n else {\n this.grid.unpinRow(this.key);\n }\n }\n /**\n * Gets whether the row is pinned.\n * ```typescript\n * let isPinned = row.pinned;\n * ```\n */\n get pinned() {\n return this.grid.isRecordPinned(this._treeRow);\n }\n /**\n * @hidden\n */\n get isRoot() {\n let treeRec = this.treeRow;\n const isPinnedArea = this.pinned && !this.disabled;\n if (isPinnedArea) {\n treeRec = this.grid.unpinnedRecords.find(x => x.data === this.data);\n }\n return treeRec?.level === 0;\n }\n /**\n * @hidden\n */\n get hasChildren() {\n return true;\n }\n /**\n * Returns a value indicating whether the row component is expanded.\n *\n * ```typescript\n * const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;\n * const expanded = row.expanded;\n * ```\n */\n get expanded() {\n return this._treeRow.expanded;\n }\n /**\n * Sets a value indicating whether the row component is expanded.\n *\n * ```typescript\n * const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;\n * row.expanded = true;\n * ```\n */\n set expanded(value) {\n this.grid.gridAPI.set_row_expansion_state(this._treeRow.key, value);\n }\n /**\n * @hidden\n * @internal\n */\n get viewIndex() {\n return this.index + this.grid.page * this.grid.perPage;\n }\n /**\n * @hidden\n */\n get showIndicator() {\n return this.grid.loadChildrenOnDemand ?\n this.grid.expansionStates.has(this.key) ?\n this.treeRow.children && this.treeRow.children.length :\n this.grid.hasChildrenKey ?\n this.data[this.grid.hasChildrenKey] :\n true :\n this.treeRow.children && this.treeRow.children.length;\n }\n /**\n * @hidden\n */\n get indeterminate() {\n return this.selectionService.isRowInIndeterminateState(this.key);\n }\n /**\n * @hidden\n */\n ngDoCheck() {\n this.isLoading = this.grid.loadChildrenOnDemand ? this.grid.loadingRows.has(this.key) : false;\n super.ngDoCheck();\n }\n /**\n * Spawns the add child row UI for the specific row.\n *\n * @example\n * ```typescript\n * const row = this.grid.getRowByKey(1) as IgxTreeGridRowComponent;\n * row.beginAddChild();\n * ```\n * @param rowID\n */\n beginAddChild() {\n this.grid.crudService.enterAddRowMode(this, true);\n }\n}\nIgxTreeGridRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxTreeGridRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeGridRowComponent, selector: \"igx-tree-grid-row\", inputs: { treeRow: \"treeRow\" }, host: { properties: { \"attr.aria-expanded\": \"this.expanded\" } }, providers: [{ provide: IgxRowDirective, useExisting: forwardRef(() => IgxTreeGridRowComponent) }], viewQueries: [{ propertyName: \"_cells\", predicate: [\"treeCell\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n\\n
    \\n \\n
    \\n
    \\n\\n\\n
    \\n \\n
    \\n
    \\n\\n
    \\n \\n \\n
    \\n
    \\n 0 && grid.isPinningToStart\\\">\\n \\n\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n 0 && !grid.isPinningToStart\\\">\\n \\n\\n\\n
    \\n \\n \\n
    \\n
    \\n\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\", dependencies: [{ kind: \"component\", type: IgxGridCellComponent, selector: \"igx-grid-cell\", inputs: [\"column\", \"intRow\", \"row\", \"rowData\", \"columnData\", \"cellTemplate\", \"cellValidationErrorTemplate\", \"pinnedIndicator\", \"value\", \"formatter\", \"visibleColumnIndex\", \"cellSelectionMode\", \"lastSearchInfo\", \"lastPinned\", \"firstPinned\", \"editMode\", \"width\", \"active\", \"displayPinnedChip\"] }, { kind: \"directive\", type: IgxRowDragDirective, selector: \"[igxRowDrag]\", inputs: [\"igxRowDrag\"] }, { kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"directive\", type: IgxGridForOfDirective, selector: \"[igxGridFor][igxGridForOf]\", inputs: [\"igxGridForOf\", \"igxGridForOfUniqueSizeCache\", \"igxGridForOfVariableSizes\"], outputs: [\"dataChanging\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxTreeGridCellComponent, selector: \"igx-tree-grid-cell\", inputs: [\"level\", \"showIndicator\", \"isLoading\", \"row\"] }, { kind: \"pipe\", type: IgxGridNotGroupedPipe, name: \"igxNotGrouped\" }, { kind: \"pipe\", type: IgxGridCellStylesPipe, name: \"igxCellStyles\" }, { kind: \"pipe\", type: IgxGridCellStyleClassesPipe, name: \"igxCellStyleClasses\" }, { kind: \"pipe\", type: IgxGridDataMapperPipe, name: \"dataMapper\" }, { kind: \"pipe\", type: IgxGridTransactionStatePipe, name: \"transactionState\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridRowComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-tree-grid-row', providers: [{ provide: IgxRowDirective, useExisting: forwardRef(() => IgxTreeGridRowComponent) }], template: \"\\n\\n\\n
    \\n \\n
    \\n
    \\n\\n\\n
    \\n \\n
    \\n
    \\n\\n
    \\n \\n \\n
    \\n
    \\n 0 && grid.isPinningToStart\\\">\\n \\n\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n 0 && !grid.isPinningToStart\\\">\\n \\n\\n\\n
    \\n \\n \\n
    \\n
    \\n\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\" }]\n }], propDecorators: { _cells: [{\n type: ViewChildren,\n args: ['treeCell']\n }], treeRow: [{\n type: Input\n }], expanded: [{\n type: HostBinding,\n args: ['attr.aria-expanded']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxTreeGridHierarchizingPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, primaryKey, foreignKey, childDataKey, _) {\n let hierarchicalRecords = [];\n const treeGridRecordsMap = new Map();\n const flatData = [];\n if (!collection || !collection.length) {\n this.grid.flatData = collection;\n this.grid.records = treeGridRecordsMap;\n this.grid.rootRecords = collection;\n return collection;\n }\n if (childDataKey) {\n hierarchicalRecords = this.hierarchizeRecursive(collection, primaryKey, childDataKey, undefined, flatData, 0, treeGridRecordsMap);\n }\n else if (primaryKey) {\n hierarchicalRecords = this.hierarchizeFlatData(collection, primaryKey, foreignKey, treeGridRecordsMap, flatData);\n }\n this.grid.flatData = this.grid.transactions.enabled ?\n flatData.filter(rec => {\n const state = this.grid.transactions.getState(this.getRowID(primaryKey, rec));\n return !state || state.type !== TransactionType.ADD;\n }) : flatData;\n this.grid.records = treeGridRecordsMap;\n this.grid.rootRecords = hierarchicalRecords;\n return hierarchicalRecords;\n }\n getRowID(primaryKey, rowData) {\n return primaryKey ? rowData[primaryKey] : rowData;\n }\n hierarchizeFlatData(collection, primaryKey, foreignKey, map, flatData) {\n const result = [];\n const missingParentRecords = [];\n collection.forEach(row => {\n const record = {\n key: this.getRowID(primaryKey, row),\n data: row,\n children: []\n };\n const parent = map.get(row[foreignKey]);\n if (parent) {\n record.parent = parent;\n parent.children.push(record);\n }\n else {\n missingParentRecords.push(record);\n }\n map.set(row[primaryKey], record);\n });\n missingParentRecords.forEach(record => {\n const parent = map.get(record.data[foreignKey]);\n if (parent) {\n record.parent = parent;\n parent.children.push(record);\n }\n else {\n result.push(record);\n }\n });\n this.setIndentationLevels(result, 0, flatData);\n return result;\n }\n setIndentationLevels(collection, indentationLevel, flatData) {\n for (const record of collection) {\n record.level = indentationLevel;\n record.expanded = this.grid.gridAPI.get_row_expansion_state(record);\n flatData.push(record.data);\n if (record.children && record.children.length > 0) {\n this.setIndentationLevels(record.children, indentationLevel + 1, flatData);\n }\n }\n }\n hierarchizeRecursive(collection, primaryKey, childDataKey, parent, flatData, indentationLevel, map) {\n const result = [];\n for (const item of collection) {\n const record = {\n key: this.getRowID(primaryKey, item),\n data: item,\n parent,\n level: indentationLevel\n };\n record.expanded = this.grid.gridAPI.get_row_expansion_state(record);\n flatData.push(item);\n map.set(record.key, record);\n record.children = item[childDataKey] ?\n this.hierarchizeRecursive(item[childDataKey], primaryKey, childDataKey, record, flatData, indentationLevel + 1, map) :\n undefined;\n result.push(record);\n }\n return result;\n }\n}\nIgxTreeGridHierarchizingPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridHierarchizingPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridHierarchizingPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridHierarchizingPipe, name: \"treeGridHierarchizing\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridHierarchizingPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridHierarchizing' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/**\n * @hidden\n */\nclass IgxTreeGridFlatteningPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, expandedLevels, expandedStates, _) {\n const data = [];\n this.grid.processedRootRecords = collection;\n this.grid.processedRecords = new Map();\n this.getFlatDataRecursive(collection, data, expandedLevels, expandedStates, true);\n this.grid.processedExpandedFlatData = data.map(r => r.data);\n return data;\n }\n getFlatDataRecursive(collection, data, expandedLevels, expandedStates, parentExpanded) {\n if (!collection || !collection.length) {\n return;\n }\n for (const hierarchicalRecord of collection) {\n if (parentExpanded) {\n data.push(hierarchicalRecord);\n }\n hierarchicalRecord.expanded = this.grid.gridAPI.get_row_expansion_state(hierarchicalRecord);\n this.updateNonProcessedRecordExpansion(this.grid, hierarchicalRecord);\n this.grid.processedRecords.set(hierarchicalRecord.key, hierarchicalRecord);\n this.getFlatDataRecursive(hierarchicalRecord.children, data, expandedLevels, expandedStates, parentExpanded && hierarchicalRecord.expanded);\n }\n }\n updateNonProcessedRecordExpansion(grid, record) {\n const rec = grid.records.get(record.key);\n rec.expanded = record.expanded;\n }\n}\nIgxTreeGridFlatteningPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridFlatteningPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridFlatteningPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridFlatteningPipe, name: \"treeGridFlattening\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridFlatteningPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridFlattening' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/** @hidden */\nclass IgxTreeGridSortingPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(hierarchicalData, sortExpressions, groupExpressions, sorting, _, pinned) {\n const expressions = groupExpressions ? groupExpressions.concat(sortExpressions) : sortExpressions;\n let result;\n if (!expressions.length) {\n result = hierarchicalData;\n }\n else {\n result = DataUtil.treeGridSort(hierarchicalData, expressions, sorting, null, this.grid);\n }\n const filteredSortedData = [];\n this.flattenTreeGridRecords(result, filteredSortedData);\n this.grid.setFilteredSortedData(filteredSortedData, pinned);\n return result;\n }\n flattenTreeGridRecords(records, flatData) {\n if (records && records.length) {\n for (const record of records) {\n flatData.push(record.data);\n this.flattenTreeGridRecords(record.children, flatData);\n }\n }\n }\n}\nIgxTreeGridSortingPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSortingPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridSortingPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSortingPipe, name: \"treeGridSorting\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSortingPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridSorting' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/** @hidden */\nclass IgxTreeGridPagingPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, enabled, page = 0, perPage = 15, _) {\n if (!enabled || this.grid.pagingMode !== GridPagingMode.Local) {\n return collection;\n }\n const len = this.grid._totalRecords >= 0 ? this.grid._totalRecords : collection.length;\n const totalPages = Math.ceil(len / perPage);\n const state = {\n index: (totalPages > 0 && page >= totalPages) ? totalPages - 1 : page,\n recordsPerPage: perPage\n };\n const result = DataUtil.page(cloneArray(collection), state, len);\n this.grid.pagingState = state;\n this.grid.page = state.index;\n return result;\n }\n}\nIgxTreeGridPagingPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridPagingPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridPagingPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridPagingPipe, name: \"treeGridPaging\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridPagingPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridPaging' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/** @hidden */\nclass IgxTreeGridTransactionPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, _) {\n if (this.grid.transactions.enabled) {\n const aggregatedChanges = this.grid.transactions.getAggregatedChanges(true);\n if (aggregatedChanges.length > 0) {\n const primaryKey = this.grid.primaryKey;\n if (!primaryKey) {\n return collection;\n }\n const childDataKey = this.grid.childDataKey;\n if (childDataKey) {\n const hierarchicalDataClone = cloneHierarchicalArray(collection, childDataKey);\n return DataUtil.mergeHierarchicalTransactions(hierarchicalDataClone, aggregatedChanges, childDataKey, this.grid.primaryKey, this.grid.dataCloneStrategy);\n }\n else {\n const flatDataClone = cloneArray(collection);\n return DataUtil.mergeTransactions(flatDataClone, aggregatedChanges, this.grid.primaryKey, this.grid.dataCloneStrategy);\n }\n }\n }\n return collection;\n }\n}\nIgxTreeGridTransactionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridTransactionPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridTransactionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridTransactionPipe, name: \"treeGridTransaction\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridTransactionPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridTransaction' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/**\n * This pipe maps the original record to ITreeGridRecord format used in TreeGrid.\n */\nclass IgxTreeGridNormalizeRecordsPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(_, __) {\n const primaryKey = this.grid.primaryKey;\n // using flattened data because origin data may be hierarchical.\n const flatData = this.grid.flatData;\n const res = flatData.map(rec => ({\n rowID: this.grid.primaryKey ? rec[primaryKey] : rec,\n data: rec,\n level: 0,\n children: []\n }));\n return res;\n }\n}\nIgxTreeGridNormalizeRecordsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridNormalizeRecordsPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridNormalizeRecordsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridNormalizeRecordsPipe, name: \"treeGridNormalizeRecord\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridNormalizeRecordsPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridNormalizeRecord' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\nclass IgxTreeGridAddRowPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, isPinned = false, _pipeTrigger) {\n if (!this.grid.rowEditable || !this.grid.crudService.row || this.grid.crudService.row.getClassName() !== IgxAddRow.name ||\n !this.grid.gridAPI.crudService.addRowParent || isPinned !== this.grid.gridAPI.crudService.addRowParent.isPinned) {\n return collection;\n }\n const copy = collection.slice(0);\n const rec = this.grid.crudService.row.recordRef;\n if (this.grid.crudService.addRowParent.isPinned) {\n const parentRowIndex = copy.findIndex(record => record.rowID === this.grid.crudService.addRowParent.rowID);\n copy.splice(parentRowIndex + 1, 0, rec);\n }\n else {\n copy.splice(this.grid.crudService.row.index, 0, rec);\n }\n this.grid.records.set(rec.key, rec);\n return copy;\n }\n}\nIgxTreeGridAddRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridAddRowPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridAddRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridAddRowPipe, name: \"treeGridAddRow\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridAddRowPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridAddRow' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n\n/** @hidden */\nclass IgxTreeGridFilteringPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(hierarchyData, expressionsTree, filterStrategy, advancedFilteringExpressionsTree, _, __, pinned) {\n const state = {\n expressionsTree,\n advancedExpressionsTree: advancedFilteringExpressionsTree,\n strategy: new TreeGridFilteringStrategy()\n };\n if (filterStrategy) {\n state.strategy = filterStrategy;\n }\n if (FilteringExpressionsTree.empty(state.expressionsTree) && FilteringExpressionsTree.empty(state.advancedExpressionsTree)) {\n this.grid.setFilteredData(null, pinned);\n return hierarchyData;\n }\n const result = this.filter(hierarchyData, state, this.grid);\n const filteredData = [];\n this.expandAllRecursive(this.grid, result, this.grid.expansionStates, filteredData);\n this.grid.setFilteredData(filteredData, pinned);\n return result;\n }\n expandAllRecursive(grid, data, expandedStates, filteredData) {\n for (const rec of data) {\n filteredData.push(rec.data);\n if (rec.children && rec.children.length > 0) {\n expandedStates.set(rec.key, true);\n this.expandAllRecursive(grid, rec.children, expandedStates, filteredData);\n }\n }\n }\n filter(data, state, grid) {\n return state.strategy.filter(data, state.expressionsTree, state.advancedExpressionsTree, grid);\n }\n}\nIgxTreeGridFilteringPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridFilteringPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridFilteringPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridFilteringPipe, name: \"treeGridFiltering\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridFilteringPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridFiltering' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n\n/** @hidden */\nclass IgxTreeGridSummaryPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(flatData, hasSummary, summaryCalculationMode, summaryPosition, showSummaryOnCollapse, _, __) {\n if (!flatData || !hasSummary || summaryCalculationMode === GridSummaryCalculationMode.rootLevelOnly) {\n return flatData;\n }\n return this.addSummaryRows(this.grid, flatData, summaryPosition, showSummaryOnCollapse);\n }\n addSummaryRows(grid, collection, summaryPosition, showSummaryOnCollapse) {\n const recordsWithSummary = [];\n const maxSummaryHeight = grid.summaryService.calcMaxSummaryHeight();\n for (const record of collection) {\n recordsWithSummary.push(record);\n const isCollapsed = !record.expanded && record.children && record.children.length > 0 && showSummaryOnCollapse;\n if (isCollapsed) {\n let childData = record.children.filter(r => !r.isFilteredOutParent).map(r => r.data);\n childData = this.removeDeletedRecord(grid, record.key, childData);\n const summaries = grid.summaryService.calculateSummaries(record.key, childData);\n const summaryRecord = {\n summaries,\n max: maxSummaryHeight,\n cellIndentation: record.level + 1\n };\n recordsWithSummary.push(summaryRecord);\n }\n const isExpanded = record.children && record.children.length > 0 && record.expanded;\n if (summaryPosition === GridSummaryPosition.bottom && !isExpanded) {\n let childRecord = record;\n let parent = record.parent;\n while (parent) {\n const children = parent.children;\n if (children[children.length - 1] === childRecord) {\n let childData = children.filter(r => !r.isFilteredOutParent).map(r => r.data);\n childData = this.removeDeletedRecord(grid, parent.key, childData);\n const summaries = grid.summaryService.calculateSummaries(parent.key, childData);\n const summaryRecord = {\n summaries,\n max: maxSummaryHeight,\n cellIndentation: parent.level + 1\n };\n recordsWithSummary.push(summaryRecord);\n childRecord = parent;\n parent = childRecord.parent;\n }\n else {\n break;\n }\n }\n }\n else if (summaryPosition === GridSummaryPosition.top && isExpanded) {\n let childData = record.children.filter(r => !r.isFilteredOutParent).map(r => r.data);\n childData = this.removeDeletedRecord(grid, record.key, childData);\n const summaries = grid.summaryService.calculateSummaries(record.key, childData);\n const summaryRecord = {\n summaries,\n max: maxSummaryHeight,\n cellIndentation: record.level + 1\n };\n recordsWithSummary.push(summaryRecord);\n }\n }\n return recordsWithSummary;\n }\n removeDeletedRecord(grid, rowId, data) {\n if (!grid.transactions.enabled || !grid.cascadeOnDelete) {\n return data;\n }\n const deletedRows = grid.transactions.getTransactionLog().filter(t => t.type === 'delete').map(t => t.id);\n let row = grid.records.get(rowId);\n if (!row && deletedRows.lenght === 0) {\n return [];\n }\n row = row.children ? row : row.parent;\n while (row) {\n rowId = row.key;\n if (deletedRows.indexOf(rowId) !== -1) {\n return [];\n }\n row = row.parent;\n }\n deletedRows.forEach(rowID => {\n const tempData = grid.primaryKey ? data.map(rec => rec[grid.primaryKey]) : data;\n const index = tempData.indexOf(rowID);\n if (index !== -1) {\n data.splice(index, 1);\n }\n });\n return data;\n }\n}\nIgxTreeGridSummaryPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSummaryPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridSummaryPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSummaryPipe, name: \"treeGridSummary\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridSummaryPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'treeGridSummary' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n\nlet NEXT_ID$6 = 0;\n/**\n * **Ignite UI for Angular Tree Grid** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid)\n *\n * The Ignite UI Tree Grid displays and manipulates hierarchical data with consistent schema formatted as a table and\n * provides features such as sorting, filtering, editing, column pinning, paging, column moving and hiding.\n *\n * Example:\n * ```html\n * \n * \n * \n * \n * \n * ```\n */\nclass IgxTreeGridComponent extends IgxGridBaseDirective {\n /**\n * An @Input property that lets you fill the `IgxTreeGridComponent` with an array of data.\n * ```html\n * \n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n get data() {\n return this._data;\n }\n set data(value) {\n this._data = value || [];\n this.summaryService.clearSummaryCache();\n if (this.shouldGenerate) {\n this.setupColumns();\n }\n this.cdr.markForCheck();\n }\n /**\n * Get transactions service for the grid.\n *\n * @experimental @hidden\n */\n get transactions() {\n if (this._diTransactions && !this.batchEditing) {\n return this._diTransactions;\n }\n return this._transactions;\n }\n /**\n * An @Input property that sets the count of levels to be expanded in the `IgxTreeGridComponent`. By default it is\n * set to `Infinity` which means all levels would be expanded.\n * ```html\n * \n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n get expansionDepth() {\n return this._expansionDepth;\n }\n set expansionDepth(value) {\n this._expansionDepth = value;\n this.notifyChanges();\n }\n /**\n * An @Input property that provides a template for the row loading indicator when load on demand is enabled.\n * ```html\n * \n * loop\n * \n *\n * \n * \n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n get rowLoadingIndicatorTemplate() {\n return this._rowLoadingIndicatorTemplate;\n }\n set rowLoadingIndicatorTemplate(value) {\n this._rowLoadingIndicatorTemplate = value;\n this.notifyChanges();\n }\n // Kind of stupid\n // private get _gridAPI(): IgxTreeGridAPIService {\n // return this.gridAPI as IgxTreeGridAPIService;\n // }\n constructor(validationService, selectionService, colResizingService, gridAPI, \n // public gridAPI: GridBaseAPIService,\n transactionFactory, _elementRef, _zone, document, cdr, differs, viewRef, appRef, injector, envInjector, navigation, filteringService, overlayService, summaryService, _displayDensityOptions, localeId, platform, _diTransactions) {\n super(validationService, selectionService, colResizingService, gridAPI, transactionFactory, _elementRef, _zone, document, cdr, differs, viewRef, appRef, injector, envInjector, navigation, filteringService, overlayService, summaryService, _displayDensityOptions, localeId, platform, _diTransactions);\n this._diTransactions = _diTransactions;\n /**\n * An @Input property indicating whether child records should be deleted when their parent gets deleted.\n * By default it is set to true and deletes all children along with the parent.\n * ```html\n * \n * \n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n this.cascadeOnDelete = true;\n /**\n * @hidden @internal\n */\n this.role = 'treegrid';\n /**\n * An @Input property that sets the value of the `id` attribute. If not provided it will be automatically generated.\n * ```html\n * \n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n this.id = `igx-tree-grid-${NEXT_ID$6++}`;\n /**\n * Returns a map of all `ITreeGridRecord`s.\n * ```typescript\n * // gets the record with primaryKey=2\n * const states = this.grid.records.get(2);\n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n this.records = new Map();\n /**\n * Returns a map of all processed (filtered and sorted) `ITreeGridRecord`s.\n * ```typescript\n * // gets the processed record with primaryKey=2\n * const states = this.grid.processedRecords.get(2);\n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n this.processedRecords = new Map();\n /**\n * @hidden\n */\n this.loadingRows = new Set();\n this._filterStrategy = new TreeGridFilteringStrategy();\n this._expansionDepth = Infinity;\n }\n /**\n * @deprecated in version 12.1.0. Use `getCellByColumn` or `getCellByKey` instead\n *\n * Returns a `CellType` object that matches the conditions.\n *\n * @example\n * ```typescript\n * const myCell = this.grid1.getCellByColumnVisibleIndex(2,\"UnitPrice\");\n * ```\n * @param rowIndex\n * @param index\n */\n getCellByColumnVisibleIndex(rowIndex, index) {\n const row = this.getRowByIndex(rowIndex);\n const column = this.columns.find((col) => col.visibleIndex === index);\n if (row && row instanceof IgxTreeGridRow && column) {\n return new IgxGridCell(this, rowIndex, column.field);\n }\n }\n /**\n * @hidden\n */\n ngOnInit() {\n super.ngOnInit();\n this.rowToggle.pipe(takeUntil(this.destroy$)).subscribe((args) => {\n this.loadChildrenOnRowExpansion(args);\n });\n // TODO: cascade selection logic should be refactor to be handled in the already existing subs\n this.rowAddedNotifier.pipe(takeUntil(this.destroy$)).subscribe(args => {\n if (this.rowSelection === GridSelectionMode.multipleCascade) {\n let rec = this.gridAPI.get_rec_by_id(this.primaryKey ? args.data[this.primaryKey] : args.data);\n if (rec && rec.parent) {\n this.gridAPI.grid.selectionService.updateCascadeSelectionOnFilterAndCRUD(new Set([rec.parent]), rec.parent.key);\n }\n else {\n // The record is still not available\n // Wait for the change detection to update records through pipes\n requestAnimationFrame(() => {\n rec = this.gridAPI.get_rec_by_id(this.primaryKey ?\n args.data[this.primaryKey] : args.data);\n if (rec && rec.parent) {\n this.gridAPI.grid.selectionService.updateCascadeSelectionOnFilterAndCRUD(new Set([rec.parent]), rec.parent.key);\n }\n this.notifyChanges();\n });\n }\n }\n });\n this.rowDeletedNotifier.pipe(takeUntil(this.destroy$)).subscribe(args => {\n if (this.rowSelection === GridSelectionMode.multipleCascade) {\n if (args.data) {\n const rec = this.gridAPI.get_rec_by_id(this.primaryKey ? args.data[this.primaryKey] : args.data);\n this.handleCascadeSelection(args, rec);\n }\n else {\n // if a row has been added and before commiting the transaction deleted\n const leafRowsDirectParents = new Set();\n this.records.forEach(record => {\n if (record && (!record.children || record.children.length === 0) && record.parent) {\n leafRowsDirectParents.add(record.parent);\n }\n });\n // Wait for the change detection to update records through pipes\n requestAnimationFrame(() => {\n this.gridAPI.grid.selectionService.updateCascadeSelectionOnFilterAndCRUD(leafRowsDirectParents);\n this.notifyChanges();\n });\n }\n }\n });\n this.filteringDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.rowSelection === GridSelectionMode.multipleCascade) {\n const leafRowsDirectParents = new Set();\n this.records.forEach(record => {\n if (record && (!record.children || record.children.length === 0) && record.parent) {\n leafRowsDirectParents.add(record.parent);\n }\n });\n this.gridAPI.grid.selectionService.updateCascadeSelectionOnFilterAndCRUD(leafRowsDirectParents);\n this.notifyChanges();\n }\n });\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n // TODO: pipesExectured event\n // run after change detection in super triggers pipes for records structure\n if (this.rowSelection === GridSelectionMode.multipleCascade && this.selectedRows.length) {\n const selRows = this.selectedRows;\n this.selectionService.clearRowSelection();\n this.selectRows(selRows, true);\n this.cdr.detectChanges();\n }\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n if (this.rowLoadingTemplate) {\n this._rowLoadingIndicatorTemplate = this.rowLoadingTemplate.template;\n }\n super.ngAfterContentInit();\n }\n getDefaultExpandState(record) {\n return record.children && record.children.length && record.level < this.expansionDepth;\n }\n /**\n * Expands all rows.\n * ```typescript\n * this.grid.expandAll();\n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n expandAll() {\n this._expansionDepth = Infinity;\n this.expansionStates = new Map();\n }\n /**\n * Collapses all rows.\n *\n * ```typescript\n * this.grid.collapseAll();\n * ```\n *\n * @memberof IgxTreeGridComponent\n */\n collapseAll() {\n this._expansionDepth = 0;\n this.expansionStates = new Map();\n }\n /**\n * @hidden\n */\n refreshGridState(args) {\n super.refreshGridState();\n if (this.primaryKey && this.foreignKey && args) {\n const rowID = args.data[this.foreignKey];\n this.summaryService.clearSummaryCache({ rowID });\n this.pipeTrigger++;\n this.cdr.detectChanges();\n }\n }\n /**\n * Creates a new `IgxTreeGridRowComponent` with the given data. If a parentRowID is not specified, the newly created\n * row would be added at the root level. Otherwise, it would be added as a child of the row whose primaryKey matches\n * the specified parentRowID. If the parentRowID does not exist, an error would be thrown.\n * ```typescript\n * const record = {\n * ID: this.grid.data[this.grid1.data.length - 1].ID + 1,\n * Name: this.newRecord\n * };\n * this.grid.addRow(record, 1); // Adds a new child row to the row with ID=1.\n * ```\n *\n * @param data\n * @param parentRowID\n * @memberof IgxTreeGridComponent\n */\n // TODO: remove evt emission\n addRow(data, parentRowID) {\n this.crudService.endEdit(true);\n this.gridAPI.addRowToData(data, parentRowID);\n this.rowAddedNotifier.next({ data: data, owner: this, primaryKey: data[this.primaryKey] });\n this.pipeTrigger++;\n this.notifyChanges();\n }\n /**\n * Enters add mode by spawning the UI with the context of the specified row by index.\n *\n * @remarks\n * Accepted values for index are integers from 0 to this.grid.dataView.length\n * @remarks\n * When adding the row as a child, the parent row is the specified row.\n * @remarks\n * To spawn the UI on top, call the function with index = null or a negative number.\n * In this case trying to add this row as a child will result in error.\n * @example\n * ```typescript\n * this.grid.beginAddRowByIndex(10);\n * this.grid.beginAddRowByIndex(10, true);\n * this.grid.beginAddRowByIndex(null);\n * ```\n * @param index - The index to spawn the UI at. Accepts integers from 0 to this.grid.dataView.length\n * @param asChild - Whether the record should be added as a child. Only applicable to igxTreeGrid.\n */\n beginAddRowByIndex(index, asChild) {\n if (index === null || index < 0) {\n return this.beginAddRowById(null, asChild);\n }\n return this._addRowForIndex(index - 1, asChild);\n }\n /**\n * @hidden\n */\n getContext(rowData, rowIndex, pinned) {\n return {\n $implicit: this.isGhostRecord(rowData) ? rowData.recordRef : rowData,\n index: this.getDataViewIndex(rowIndex, pinned),\n templateID: {\n type: this.isSummaryRow(rowData) ? 'summaryRow' : 'dataRow',\n id: null\n },\n disabled: this.isGhostRecord(rowData) ? rowData.recordRef.isFilteredOutParent === undefined : false\n };\n }\n /**\n * @hidden\n * @internal\n */\n getInitialPinnedIndex(rec) {\n const id = this.gridAPI.get_row_id(rec);\n return this._pinnedRecordIDs.indexOf(id);\n }\n /**\n * @hidden\n * @internal\n */\n isRecordPinned(rec) {\n return this.getInitialPinnedIndex(rec.data) !== -1;\n }\n /**\n *\n * Returns an array of the current cell selection in the form of `[{ column.field: cell.value }, ...]`.\n *\n * @remarks\n * If `formatters` is enabled, the cell value will be formatted by its respective column formatter (if any).\n * If `headers` is enabled, it will use the column header (if any) instead of the column field.\n */\n getSelectedData(formatters = false, headers = false) {\n let source = [];\n const process = (record) => {\n if (record.summaries) {\n source.push(null);\n return;\n }\n source.push(record.data);\n };\n this.unpinnedDataView.forEach(process);\n source = this.isRowPinningToTop ? [...this.pinnedDataView, ...source] : [...source, ...this.pinnedDataView];\n return this.extractDataFromSelection(source, formatters, headers);\n }\n /**\n * @hidden @internal\n */\n getEmptyRecordObjectFor(inTreeRow) {\n const treeRowRec = inTreeRow?.treeRow || null;\n const row = { ...treeRowRec };\n const data = treeRowRec?.data || {};\n row.data = { ...data };\n Object.keys(row.data).forEach(key => {\n // persist foreign key if one is set.\n if (this.foreignKey && key === this.foreignKey) {\n row.data[key] = treeRowRec.data[key];\n }\n else {\n row.data[key] = undefined;\n }\n });\n let id = this.generateRowID();\n const rootRecPK = this.foreignKey && this.rootRecords && this.rootRecords.length > 0 ?\n this.rootRecords[0].data[this.foreignKey] : null;\n if (id === rootRecPK) {\n // safeguard in case generated id matches the root foreign key.\n id = this.generateRowID();\n }\n row.key = id;\n row.data[this.primaryKey] = id;\n return { rowID: id, data: row.data, recordRef: row };\n }\n /** @hidden */\n deleteRowById(rowId) {\n // if this is flat self-referencing data, and CascadeOnDelete is set to true\n // and if we have transactions we should start pending transaction. This allows\n // us in case of delete action to delete all child rows as single undo action\n const args = {\n rowID: rowId,\n primaryKey: rowId,\n cancel: false,\n rowData: this.getRowData(rowId),\n oldValue: null,\n owner: this\n };\n this.rowDelete.emit(args);\n if (args.cancel) {\n return;\n }\n const record = this.gridAPI.deleteRowById(rowId);\n if (record !== null && record !== undefined) {\n const rowDeletedEventArgs = { data: record, owner: this, primaryKey: record[this.primaryKey] };\n this.rowDeleted.emit(rowDeletedEventArgs);\n }\n return record;\n }\n /**\n * Returns the `IgxTreeGridRow` by index.\n *\n * @example\n * ```typescript\n * const myRow = treeGrid.getRowByIndex(1);\n * ```\n * @param index\n */\n getRowByIndex(index) {\n if (index < 0 || index >= this.dataView.length) {\n return undefined;\n }\n return this.createRow(index);\n }\n /**\n * Returns the `RowType` object by the specified primary key.\n *\n * @example\n * ```typescript\n * const myRow = this.treeGrid.getRowByIndex(1);\n * ```\n * @param index\n */\n getRowByKey(key) {\n const rec = this.filteredSortedData ? this.primaryKey ? this.filteredSortedData.find(r => r[this.primaryKey] === key) :\n this.filteredSortedData.find(r => r === key) : undefined;\n const index = this.dataView.findIndex(r => r.data && r.data === rec);\n if (index < 0 || index >= this.filteredSortedData.length) {\n return undefined;\n }\n return new IgxTreeGridRow(this, index, rec);\n }\n /**\n * Returns the collection of all RowType for current page.\n *\n * @hidden @internal\n */\n allRows() {\n return this.dataView.map((rec, index) => this.createRow(index));\n }\n /**\n * Returns the collection of `IgxTreeGridRow`s for current page.\n *\n * @hidden @internal\n */\n dataRows() {\n return this.allRows().filter(row => row instanceof IgxTreeGridRow);\n }\n /**\n * Returns an array of the selected `IgxGridCell`s.\n *\n * @example\n * ```typescript\n * const selectedCells = this.grid.selectedCells;\n * ```\n */\n get selectedCells() {\n return this.dataRows().map((row) => row.cells.filter((cell) => cell.selected))\n .reduce((a, b) => a.concat(b), []);\n }\n /**\n * Returns a `CellType` object that matches the conditions.\n *\n * @example\n * ```typescript\n * const myCell = this.grid1.getCellByColumn(2, \"UnitPrice\");\n * ```\n * @param rowIndex\n * @param columnField\n */\n getCellByColumn(rowIndex, columnField) {\n const row = this.getRowByIndex(rowIndex);\n const column = this.columns.find((col) => col.field === columnField);\n if (row && row instanceof IgxTreeGridRow && column) {\n return new IgxGridCell(this, rowIndex, columnField);\n }\n }\n /**\n * Returns a `CellType` object that matches the conditions.\n *\n * @remarks\n * Requires that the primaryKey property is set.\n * @example\n * ```typescript\n * grid.getCellByKey(1, 'index');\n * ```\n * @param rowSelector match any rowID\n * @param columnField\n */\n getCellByKey(rowSelector, columnField) {\n const row = this.getRowByKey(rowSelector);\n const column = this.columns.find((col) => col.field === columnField);\n if (row && column) {\n return new IgxGridCell(this, row.index, columnField);\n }\n }\n pinRow(rowID, index) {\n const row = this.getRowByKey(rowID);\n return super.pinRow(rowID, index, row);\n }\n unpinRow(rowID) {\n const row = this.getRowByKey(rowID);\n return super.unpinRow(rowID, row);\n }\n /** @hidden */\n generateRowPath(rowId) {\n const path = [];\n let record = this.records.get(rowId);\n while (record.parent) {\n path.push(record.parent.key);\n record = record.parent;\n }\n return path.reverse();\n }\n /** @hidden */\n isTreeRow(record) {\n return record.key !== undefined && record.data;\n }\n /** @hidden */\n getUnpinnedIndexById(id) {\n return this.unpinnedRecords.findIndex(x => x.data[this.primaryKey] === id);\n }\n /**\n * @hidden\n */\n createRow(index, data) {\n let row;\n const dataIndex = this._getDataViewIndex(index);\n const rec = data ?? this.dataView[dataIndex];\n if (this.isSummaryRow(rec)) {\n row = new IgxSummaryRow(this, index, rec.summaries, GridInstanceType.TreeGrid);\n }\n if (!row && rec) {\n const isTreeRow = this.isTreeRow(rec);\n const dataRec = isTreeRow ? rec.data : rec;\n const treeRow = isTreeRow ? rec : undefined;\n row = new IgxTreeGridRow(this, index, dataRec, treeRow);\n }\n return row;\n }\n /**\n * Returns if the `IgxTreeGridComponent` has groupable columns.\n *\n * @example\n * ```typescript\n * const groupableGrid = this.grid.hasGroupableColumns;\n * ```\n */\n get hasGroupableColumns() {\n return this.columns.some((col) => col.groupable && !col.columnGroup);\n }\n generateDataFields(data) {\n return super.generateDataFields(data).filter(field => field !== this.childDataKey);\n }\n transactionStatusUpdate(event) {\n let actions = [];\n if (event.origin === TransactionEventOrigin.REDO) {\n actions = event.actions ? event.actions.filter(x => x.transaction.type === TransactionType.DELETE) : [];\n if (this.rowSelection === GridSelectionMode.multipleCascade) {\n this.handleCascadeSelection(event);\n }\n }\n else if (event.origin === TransactionEventOrigin.UNDO) {\n actions = event.actions ? event.actions.filter(x => x.transaction.type === TransactionType.ADD) : [];\n if (this.rowSelection === GridSelectionMode.multipleCascade) {\n if (event.actions[0].transaction.type === 'add') {\n const rec = this.gridAPI.get_rec_by_id(event.actions[0].transaction.id);\n this.handleCascadeSelection(event, rec);\n }\n else {\n this.handleCascadeSelection(event);\n }\n }\n }\n if (actions.length) {\n for (const action of actions) {\n this.deselectChildren(action.transaction.id);\n }\n }\n super.transactionStatusUpdate(event);\n }\n ;\n findRecordIndexInView(rec) {\n return this.dataView.findIndex(x => x.data[this.primaryKey] === rec[this.primaryKey]);\n }\n /**\n * @hidden @internal\n */\n getDataBasedBodyHeight() {\n return !this.flatData || (this.flatData.length < this._defaultTargetRecordNumber) ?\n 0 : this.defaultTargetBodyHeight;\n }\n /**\n * @hidden\n */\n scrollTo(row, column) {\n let delayScrolling = false;\n let record;\n if (typeof (row) !== 'number') {\n const rowData = row;\n const rowID = this.gridAPI.get_row_id(rowData);\n record = this.processedRecords.get(rowID);\n this.gridAPI.expand_path_to_record(record);\n if (this.paginator) {\n const rowIndex = this.processedExpandedFlatData.indexOf(rowData);\n const page = Math.floor(rowIndex / this.perPage);\n if (this.page !== page) {\n delayScrolling = true;\n this.page = page;\n }\n }\n }\n if (delayScrolling) {\n this.verticalScrollContainer.dataChanged.pipe(first$1()).subscribe(() => {\n this.scrollDirective(this.verticalScrollContainer, typeof (row) === 'number' ? row : this.unpinnedDataView.indexOf(record));\n });\n }\n else {\n this.scrollDirective(this.verticalScrollContainer, typeof (row) === 'number' ? row : this.unpinnedDataView.indexOf(record));\n }\n this.scrollToHorizontally(column);\n }\n writeToData(rowIndex, value) {\n mergeObjects(this.flatData[rowIndex], value);\n }\n /**\n * @hidden\n */\n initColumns(collection, cb = null) {\n if (this.hasColumnLayouts) {\n // invalid configuration - tree grid should not allow column layouts\n // remove column layouts\n const nonColumnLayoutColumns = this.columns.filter((col) => !col.columnLayout && !col.columnLayoutChild);\n this.updateColumns(nonColumnLayoutColumns);\n }\n super.initColumns(collection, cb);\n }\n /**\n * @hidden @internal\n */\n getGroupAreaHeight() {\n return this.treeGroupArea ? this.getComputedHeight(this.treeGroupArea.nativeElement) : 0;\n }\n /**\n * @description A recursive way to deselect all selected children of a given record\n * @param recordID ID of the record whose children to deselect\n * @hidden\n * @internal\n */\n deselectChildren(recordID) {\n const selectedChildren = [];\n // G.E. Apr 28, 2021 #9465 Records which are not in view can also be selected so we need to\n // deselect them as well, hence using 'records' map instead of getRowByKey() method which will\n // return only row components (i.e. records in view).\n const rowToDeselect = this.records.get(recordID);\n this.selectionService.deselectRowsWithNoEvent([recordID]);\n this.gridAPI.get_selected_children(rowToDeselect, selectedChildren);\n if (selectedChildren.length > 0) {\n selectedChildren.forEach(x => this.deselectChildren(x));\n }\n }\n addChildRows(children, parentID) {\n if (this.primaryKey && this.foreignKey) {\n for (const child of children) {\n child[this.foreignKey] = parentID;\n }\n this.data.push(...children);\n }\n else if (this.childDataKey) {\n let parent = this.records.get(parentID);\n let parentData = parent.data;\n if (this.transactions.enabled && this.transactions.getAggregatedChanges(true).length) {\n const path = [];\n while (parent) {\n path.push(parent.key);\n parent = parent.parent;\n }\n let collection = this.data;\n let record;\n for (let i = path.length - 1; i >= 0; i--) {\n const pid = path[i];\n record = collection.find(r => r[this.primaryKey] === pid);\n if (!record) {\n break;\n }\n collection = record[this.childDataKey];\n }\n if (record) {\n parentData = record;\n }\n }\n parentData[this.childDataKey] = children;\n }\n this.selectionService.clearHeaderCBState();\n this.pipeTrigger++;\n if (this.rowSelection === GridSelectionMode.multipleCascade) {\n // Force pipe triggering for building the data structure\n this.cdr.detectChanges();\n if (this.selectionService.isRowSelected(parentID)) {\n this.selectionService.rowSelection.delete(parentID);\n this.selectionService.selectRowsWithNoEvent([parentID]);\n }\n }\n }\n loadChildrenOnRowExpansion(args) {\n if (this.loadChildrenOnDemand) {\n const parentID = args.rowID;\n if (args.expanded && !this._expansionStates.has(parentID)) {\n this.loadingRows.add(parentID);\n this.loadChildrenOnDemand(parentID, children => {\n this.loadingRows.delete(parentID);\n this.addChildRows(children, parentID);\n this.notifyChanges();\n });\n }\n }\n }\n handleCascadeSelection(event, rec = null) {\n // Wait for the change detection to update records through the pipes\n requestAnimationFrame(() => {\n if (rec === null) {\n rec = this.gridAPI.get_rec_by_id(event.actions[0].transaction.id);\n }\n if (rec && rec.parent) {\n this.gridAPI.grid.selectionService.updateCascadeSelectionOnFilterAndCRUD(new Set([rec.parent]), rec.parent.key);\n this.notifyChanges();\n }\n });\n }\n}\nIgxTreeGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridComponent, deps: [{ token: IgxGridValidationService }, { token: IgxGridSelectionService }, { token: IgxColumnResizingService }, { token: IGX_GRID_SERVICE_BASE }, { token: IgxHierarchicalTransactionFactory }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i0.ViewContainerRef }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.EnvironmentInjector }, { token: IgxGridNavigationService }, { token: IgxFilteringService }, { token: IgxOverlayService }, { token: IgxGridSummaryService }, { token: DisplayDensityToken, optional: true }, { token: LOCALE_ID }, { token: PlatformUtil }, { token: IgxGridTransaction, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxTreeGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTreeGridComponent, selector: \"igx-tree-grid\", inputs: { childDataKey: \"childDataKey\", foreignKey: \"foreignKey\", hasChildrenKey: \"hasChildrenKey\", cascadeOnDelete: \"cascadeOnDelete\", loadChildrenOnDemand: \"loadChildrenOnDemand\", id: \"id\", data: \"data\", expansionDepth: \"expansionDepth\", rowLoadingIndicatorTemplate: \"rowLoadingIndicatorTemplate\" }, host: { properties: { \"attr.role\": \"this.role\", \"attr.id\": \"this.id\" } }, providers: [\n IgxGridCRUDService,\n IgxGridValidationService,\n IgxGridSummaryService,\n IgxGridNavigationService,\n { provide: IgxGridSelectionService, useClass: IgxTreeGridSelectionService },\n { provide: IGX_GRID_SERVICE_BASE, useClass: IgxTreeGridAPIService },\n { provide: IGX_GRID_BASE, useExisting: IgxTreeGridComponent },\n IgxFilteringService,\n IgxColumnResizingService,\n IgxForOfSyncService,\n IgxForOfScrollSyncService\n ], queries: [{ propertyName: \"treeGroupArea\", first: true, predicate: IgxTreeGridGroupByAreaComponent, descendants: true, read: IgxTreeGridGroupByAreaComponent }, { propertyName: \"rowLoadingTemplate\", first: true, predicate: IgxRowLoadingIndicatorTemplateDirective, descendants: true, read: IgxRowLoadingIndicatorTemplateDirective }], viewQueries: [{ propertyName: \"recordTemplate\", first: true, predicate: [\"record_template\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"summaryTemplate\", first: true, predicate: [\"summary_template\"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n\\n\\n\\n
    \\n
    \\n \\n 0\\\"\\n [igxColumnMovingDrop]=\\\"headerContainer\\\" [attr.droppable]=\\\"true\\\" id=\\\"left\\\"\\n class=\\\"igx-grid__scroll-on-drag-pinned\\\" [style.left.px]=\\\"pinnedWidth\\\">\\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
    \\n
    \\n \\n \\n
    \\n \\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n {{resourceStrings.igx_grid_snackbar_addrow_label}}\\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 {{emptyFilteredGridMessage}}\\n \\n \\n \\n \\n\\n\\n\\n \\n {{emptyGridMessage}}\\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 You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns\\n\\n\\n\\n \\n \\n\\n\\n\\n
    \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n\\n\\n drag_indicator\\n\\n\\n\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: IgxRowEditTabStopDirective, selector: \"[igxRowEditTabStop]\" }, { kind: \"directive\", type: IgxGridBodyDirective, selector: \"[igxGridBody]\" }, { kind: \"component\", type: IgxGridHeaderRowComponent, selector: \"igx-grid-header-row\", inputs: [\"grid\", \"pinnedColumnCollection\", \"unpinnedColumnCollection\", \"activeDescendant\", \"hasMRL\", \"width\", \"density\"] }, { kind: \"component\", type: IgxGridColumnResizerComponent, selector: \"igx-grid-column-resizer\", inputs: [\"restrictResizerTop\"] }, { kind: \"directive\", type: IgxColumnMovingDropDirective, selector: \"[igxColumnMovingDrop]\", inputs: [\"igxColumnMovingDrop\"] }, { kind: \"directive\", type: IgxGridDragSelectDirective, selector: \"[igxGridDragSelect]\", inputs: [\"igxGridDragSelect\"], outputs: [\"dragStop\", \"dragScroll\"] }, { kind: \"component\", type: IgxSummaryRowComponent, selector: \"igx-grid-summary-row\", inputs: [\"summaries\", \"gridID\", \"index\", \"firstCellIndentation\"] }, { kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: IgxOverlayOutletDirective, selector: \"[igxOverlayOutlet]\", exportAs: [\"overlay-outlet\"] }, { kind: \"directive\", type: IgxGridForOfDirective, selector: \"[igxGridFor][igxGridForOf]\", inputs: [\"igxGridForOf\", \"igxGridForOfUniqueSizeCache\", \"igxGridForOfVariableSizes\"], outputs: [\"dataChanging\"] }, { kind: \"directive\", type: IgxTemplateOutletDirective, selector: \"[igxTemplateOutlet]\", inputs: [\"igxTemplateOutletContext\", \"igxTemplateOutlet\"], outputs: [\"viewCreated\", \"viewMoved\", \"cachedViewLoaded\", \"beforeViewDetach\"] }, { kind: \"component\", type: IgxCircularProgressBarComponent, selector: \"igx-circular-bar\", inputs: [\"id\", \"isIndeterminate\", \"textVisibility\", \"text\"] }, { kind: \"component\", type: IgxSnackbarComponent, selector: \"igx-snackbar\", inputs: [\"id\", \"actionText\", \"positionSettings\"], outputs: [\"clicked\", \"animationStarted\", \"animationDone\"] }, { kind: \"component\", type: IgxTreeGridRowComponent, selector: \"igx-tree-grid-row\", inputs: [\"treeRow\"] }, { kind: \"pipe\", type: IgxHasVisibleColumnsPipe, name: \"visibleColumns\" }, { kind: \"pipe\", type: IgxGridRowPinningPipe, name: \"gridRowPinning\" }, { kind: \"pipe\", type: IgxGridRowClassesPipe, name: \"igxGridRowClasses\" }, { kind: \"pipe\", type: IgxGridRowStylesPipe, name: \"igxGridRowStyles\" }, { kind: \"pipe\", type: IgxSummaryDataPipe, name: \"igxGridSummaryDataPipe\" }, { kind: \"pipe\", type: IgxTreeGridHierarchizingPipe, name: \"treeGridHierarchizing\" }, { kind: \"pipe\", type: IgxTreeGridFlatteningPipe, name: \"treeGridFlattening\" }, { kind: \"pipe\", type: IgxTreeGridSortingPipe, name: \"treeGridSorting\" }, { kind: \"pipe\", type: IgxTreeGridFilteringPipe, name: \"treeGridFiltering\" }, { kind: \"pipe\", type: IgxTreeGridPagingPipe, name: \"treeGridPaging\" }, { kind: \"pipe\", type: IgxTreeGridTransactionPipe, name: \"treeGridTransaction\" }, { kind: \"pipe\", type: IgxTreeGridSummaryPipe, name: \"treeGridSummary\" }, { kind: \"pipe\", type: IgxTreeGridNormalizeRecordsPipe, name: \"treeGridNormalizeRecord\" }, { kind: \"pipe\", type: IgxTreeGridAddRowPipe, name: \"treeGridAddRow\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-tree-grid', providers: [\n IgxGridCRUDService,\n IgxGridValidationService,\n IgxGridSummaryService,\n IgxGridNavigationService,\n { provide: IgxGridSelectionService, useClass: IgxTreeGridSelectionService },\n { provide: IGX_GRID_SERVICE_BASE, useClass: IgxTreeGridAPIService },\n { provide: IGX_GRID_BASE, useExisting: IgxTreeGridComponent },\n IgxFilteringService,\n IgxColumnResizingService,\n IgxForOfSyncService,\n IgxForOfScrollSyncService\n ], template: \"\\n\\n\\n\\n\\n
    \\n
    \\n \\n 0\\\"\\n [igxColumnMovingDrop]=\\\"headerContainer\\\" [attr.droppable]=\\\"true\\\" id=\\\"left\\\"\\n class=\\\"igx-grid__scroll-on-drag-pinned\\\" [style.left.px]=\\\"pinnedWidth\\\">\\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
    \\n
    \\n \\n \\n
    \\n \\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n {{resourceStrings.igx_grid_snackbar_addrow_label}}\\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 {{emptyFilteredGridMessage}}\\n \\n \\n \\n \\n\\n\\n\\n \\n {{emptyGridMessage}}\\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 You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns\\n\\n\\n\\n \\n \\n\\n\\n\\n
    \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n\\n\\n drag_indicator\\n\\n\\n\\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxGridValidationService }, { type: IgxGridSelectionService }, { type: IgxColumnResizingService }, { type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_SERVICE_BASE]\n }] }, { type: IgxHierarchicalTransactionFactory }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: i0.ViewContainerRef }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.EnvironmentInjector }, { type: IgxGridNavigationService }, { type: IgxFilteringService }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: IgxGridSummaryService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IgxGridTransaction]\n }] }]; }, propDecorators: { childDataKey: [{\n type: Input\n }], foreignKey: [{\n type: Input\n }], hasChildrenKey: [{\n type: Input\n }], cascadeOnDelete: [{\n type: Input\n }], loadChildrenOnDemand: [{\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], treeGroupArea: [{\n type: ContentChild,\n args: [IgxTreeGridGroupByAreaComponent, { read: IgxTreeGridGroupByAreaComponent }]\n }], recordTemplate: [{\n type: ViewChild,\n args: ['record_template', { read: TemplateRef, static: true }]\n }], summaryTemplate: [{\n type: ViewChild,\n args: ['summary_template', { read: TemplateRef, static: true }]\n }], rowLoadingTemplate: [{\n type: ContentChild,\n args: [IgxRowLoadingIndicatorTemplateDirective, { read: IgxRowLoadingIndicatorTemplateDirective }]\n }], data: [{\n type: Input\n }], expansionDepth: [{\n type: Input\n }], rowLoadingIndicatorTemplate: [{\n type: Input\n }] } });\n\nconst HIDDEN_FIELD_NAME = '_Igx_Hidden_Data_';\n/**\n * @hidden\n * @internal\n */\nclass GroupByRecord {\n}\nclass ITreeGridAggregation {\n}\nclass IgxGroupedTreeGridSorting extends IgxSorting {\n static instance() {\n return this._instance || (this._instance = new IgxGroupedTreeGridSorting());\n }\n getFieldValue(obj, key, isDate = false, isTime = false) {\n const data = obj.data[HIDDEN_FIELD_NAME] ?\n obj.data.hasOwnProperty(key) ?\n obj.data :\n obj.data[HIDDEN_FIELD_NAME] :\n obj.data;\n return super.getFieldValue(data, key, isDate, isTime);\n }\n}\nIgxGroupedTreeGridSorting._instance = null;\n/** @hidden */\nclass IgxTreeGridGroupingPipe {\n transform(collection, groupingExpressions, groupKey, childDataKey, grid, aggregations) {\n if (groupingExpressions.length === 0) {\n return collection;\n }\n if (groupKey?.toLowerCase() === childDataKey?.toLowerCase()) {\n throw new Error('Group key and child data key cannot be the same.');\n }\n this.grid = grid;\n const result = [];\n const groupedRecords = this.groupByMultiple(collection, groupingExpressions);\n this.flattenGrouping(groupedRecords, groupKey, childDataKey, result, aggregations);\n return result;\n }\n flattenGrouping(groupRecords, groupKey, childDataKey, data, aggregations = []) {\n for (const groupRecord of groupRecords) {\n const parent = {};\n const children = groupRecord.records;\n parent[childDataKey] = [];\n for (const aggregation of aggregations) {\n parent[aggregation.field] = aggregation.aggregate(parent, children);\n }\n parent[groupKey] = groupRecord.value + ` (${groupRecord.records.length})`;\n parent[HIDDEN_FIELD_NAME] = { [groupRecord.key]: groupRecord.value };\n data.push(parent);\n if (groupRecord.groups) {\n this.flattenGrouping(groupRecord.groups, groupKey, childDataKey, parent[childDataKey], aggregations);\n }\n else {\n parent[childDataKey] = children;\n }\n }\n }\n groupByMultiple(array, groupingExpressions, index = 0) {\n const res = this.groupBy(array, groupingExpressions[index]);\n if (index + 1 < groupingExpressions.length) {\n for (const groupByRecord of res) {\n groupByRecord.groups = this.groupByMultiple(groupByRecord.records, groupingExpressions, index + 1);\n }\n }\n return res;\n }\n groupBy(array, groupingExpression) {\n const key = groupingExpression.fieldName;\n const column = this.grid?.getColumnByName(key);\n const isDateTime = column?.dataType === GridColumnDataType.Date ||\n column?.dataType === GridColumnDataType.DateTime ||\n column?.dataType === GridColumnDataType.Time;\n const map = new Map();\n for (const record of array) {\n const value = isDateTime\n ? formatDate(record[key], column.pipeArgs.format, this.grid.locale)\n : record[key];\n let valueCase = value;\n let groupByRecord;\n if (groupingExpression.ignoreCase) {\n valueCase = value?.toString().toLowerCase();\n }\n if (map.has(valueCase)) {\n groupByRecord = map.get(valueCase);\n }\n else {\n groupByRecord = new GroupByRecord();\n groupByRecord.key = key;\n groupByRecord.value = value;\n groupByRecord.records = [];\n map.set(valueCase, groupByRecord);\n }\n groupByRecord.records.push(record);\n }\n return Array.from(map.values());\n }\n}\nIgxTreeGridGroupingPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridGroupingPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTreeGridGroupingPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridGroupingPipe, name: \"treeGridGrouping\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridGroupingPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'treeGridGrouping'\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxTreeGridModule {\n}\nIgxTreeGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTreeGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridModule, declarations: [IgxTreeGridComponent,\n IgxTreeGridRowComponent,\n IgxTreeGridCellComponent,\n IgxTreeGridHierarchizingPipe,\n IgxTreeGridFlatteningPipe,\n IgxTreeGridSortingPipe,\n IgxTreeGridFilteringPipe,\n IgxTreeGridPagingPipe,\n IgxTreeGridTransactionPipe,\n IgxTreeGridSummaryPipe,\n IgxRowLoadingIndicatorTemplateDirective,\n IgxTreeGridNormalizeRecordsPipe,\n IgxTreeGridGroupingPipe,\n IgxTreeGridGroupByAreaComponent,\n IgxTreeGridAddRowPipe], imports: [IgxGridCommonModule,\n IgxTooltipModule,\n ReactiveFormsModule], exports: [IgxTreeGridComponent,\n IgxTreeGridRowComponent,\n IgxTreeGridCellComponent,\n IgxRowLoadingIndicatorTemplateDirective,\n IgxGridCommonModule,\n IgxTreeGridGroupingPipe,\n IgxTreeGridGroupByAreaComponent,\n IgxTreeGridAddRowPipe] });\nIgxTreeGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridModule, imports: [IgxGridCommonModule,\n IgxTooltipModule,\n ReactiveFormsModule, IgxGridCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTreeGridModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxTreeGridComponent,\n IgxTreeGridRowComponent,\n IgxTreeGridCellComponent,\n IgxTreeGridHierarchizingPipe,\n IgxTreeGridFlatteningPipe,\n IgxTreeGridSortingPipe,\n IgxTreeGridFilteringPipe,\n IgxTreeGridPagingPipe,\n IgxTreeGridTransactionPipe,\n IgxTreeGridSummaryPipe,\n IgxRowLoadingIndicatorTemplateDirective,\n IgxTreeGridNormalizeRecordsPipe,\n IgxTreeGridGroupingPipe,\n IgxTreeGridGroupByAreaComponent,\n IgxTreeGridAddRowPipe\n ],\n exports: [\n IgxTreeGridComponent,\n IgxTreeGridRowComponent,\n IgxTreeGridCellComponent,\n IgxRowLoadingIndicatorTemplateDirective,\n IgxGridCommonModule,\n IgxTreeGridGroupingPipe,\n IgxTreeGridGroupByAreaComponent,\n IgxTreeGridAddRowPipe\n ],\n imports: [\n IgxGridCommonModule,\n IgxTooltipModule,\n ReactiveFormsModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n }]\n }] });\n\nclass IgxHierarchicalGridNavigationService extends IgxGridNavigationService {\n constructor() {\n super(...arguments);\n this._pendingNavigation = false;\n }\n dispatchEvent(event) {\n const key = event.key.toLowerCase();\n if (!this.activeNode || !(SUPPORTED_KEYS.has(key) || (key === 'tab' && this.grid.crudService.cell)) &&\n !this.grid.crudService.rowEditingBlocked && !this.grid.crudService.rowInEditMode) {\n return;\n }\n const targetGrid = this.getClosestElemByTag(event.target, 'igx-hierarchical-grid');\n if (targetGrid !== this.grid.nativeElement) {\n return;\n }\n if (this._pendingNavigation && NAVIGATION_KEYS.has(key)) {\n // In case focus needs to be moved from one grid to another, however there is a pending scroll operation\n // which is an async operation, any additional navigation keys should be ignored\n // untill operation complete.\n event.preventDefault();\n return;\n }\n super.dispatchEvent(event);\n }\n navigateInBody(rowIndex, visibleColIndex, cb = null) {\n const rec = this.grid.dataView[rowIndex];\n if (rec && this.grid.isChildGridRecord(rec)) {\n // target is child grid\n const virtState = this.grid.verticalScrollContainer.state;\n const inView = rowIndex >= virtState.startIndex && rowIndex <= virtState.startIndex + virtState.chunkSize;\n const isNext = this.activeNode.row < rowIndex;\n const targetLayoutIndex = isNext ? null : this.grid.childLayoutKeys.length - 1;\n if (inView) {\n this._moveToChild(rowIndex, visibleColIndex, isNext, targetLayoutIndex, cb);\n }\n else {\n let scrollAmount = this.grid.verticalScrollContainer.getScrollForIndex(rowIndex, !isNext);\n scrollAmount += isNext ? 1 : -1;\n this.grid.verticalScrollContainer.getScroll().scrollTop = scrollAmount;\n this._pendingNavigation = true;\n this.grid.verticalScrollContainer.chunkLoad.pipe(first$1()).subscribe(() => {\n this._moveToChild(rowIndex, visibleColIndex, isNext, targetLayoutIndex, cb);\n this._pendingNavigation = false;\n });\n }\n return;\n }\n const isLast = rowIndex === this.grid.dataView.length;\n if ((rowIndex === -1 || isLast) &&\n this.grid.parent !== null) {\n // reached end of child grid\n const nextSiblingIndex = this.nextSiblingIndex(isLast);\n if (nextSiblingIndex !== null) {\n this.grid.parent.navigation._moveToChild(this.grid.childRow.index, visibleColIndex, isLast, nextSiblingIndex, cb);\n }\n else {\n this._moveToParent(isLast, visibleColIndex, cb);\n }\n return;\n }\n if (this.grid.parent) {\n const isNext = this.activeNode && typeof this.activeNode.row === 'number' ? rowIndex > this.activeNode.row : false;\n const cbHandler = (args) => {\n this._handleScrollInChild(rowIndex, isNext);\n cb(args);\n };\n if (!this.activeNode) {\n this.activeNode = { row: null, column: null };\n }\n super.navigateInBody(rowIndex, visibleColIndex, cbHandler);\n return;\n }\n if (!this.activeNode) {\n this.activeNode = { row: null, column: null };\n }\n super.navigateInBody(rowIndex, visibleColIndex, cb);\n }\n shouldPerformVerticalScroll(index, visibleColumnIndex = -1, isNext) {\n const targetRec = this.grid.dataView[index];\n if (this.grid.isChildGridRecord(targetRec)) {\n const scrollAmount = this.grid.verticalScrollContainer.getScrollForIndex(index, !isNext);\n const currScroll = this.grid.verticalScrollContainer.getScroll().scrollTop;\n const shouldScroll = !isNext ? scrollAmount > currScroll : currScroll < scrollAmount;\n return shouldScroll;\n }\n else {\n return super.shouldPerformVerticalScroll(index, visibleColumnIndex);\n }\n }\n focusTbody(event) {\n if (!this.activeNode || this.activeNode.row === null) {\n this.activeNode = {\n row: 0,\n column: 0\n };\n this.grid.navigateTo(0, 0, (obj) => {\n this.grid.clearCellSelection();\n obj.target.activate(event);\n });\n }\n else {\n super.focusTbody(event);\n }\n }\n nextSiblingIndex(isNext) {\n const layoutKey = this.grid.childRow.layout.key;\n const layoutIndex = this.grid.parent.childLayoutKeys.indexOf(layoutKey);\n const nextIndex = isNext ? layoutIndex + 1 : layoutIndex - 1;\n if (nextIndex <= this.grid.parent.childLayoutKeys.length - 1 && nextIndex > -1) {\n return nextIndex;\n }\n else {\n return null;\n }\n }\n /**\n * Handles scrolling in child grid and ensures target child row is in main grid view port.\n *\n * @param rowIndex The row index which should be in view.\n * @param isNext Optional. Whether we are navigating to next. Used to determine scroll direction.\n * @param cb Optional.Callback function called when operation is complete.\n */\n _handleScrollInChild(rowIndex, isNext, cb) {\n const shouldScroll = this.shouldPerformVerticalScroll(rowIndex, -1, isNext);\n if (shouldScroll) {\n this.grid.navigation.performVerticalScrollToCell(rowIndex, -1, () => {\n this.positionInParent(rowIndex, isNext, cb);\n });\n }\n else {\n this.positionInParent(rowIndex, isNext, cb);\n }\n }\n /**\n *\n * @param rowIndex Row index that should come in view.\n * @param isNext Whether we are navigating to next. Used to determine scroll direction.\n * @param cb Optional.Callback function called when operation is complete.\n */\n positionInParent(rowIndex, isNext, cb) {\n const row = this.grid.gridAPI.get_row_by_index(rowIndex);\n if (!row) {\n if (cb) {\n cb();\n }\n return;\n }\n const positionInfo = this.getPositionInfo(row, isNext);\n if (!positionInfo.inView) {\n // stop event from triggering multiple times before scrolling is complete.\n this._pendingNavigation = true;\n const scrollableGrid = isNext ? this.getNextScrollableDown(this.grid) : this.getNextScrollableUp(this.grid);\n scrollableGrid.grid.verticalScrollContainer.recalcUpdateSizes();\n scrollableGrid.grid.verticalScrollContainer.addScrollTop(positionInfo.offset);\n scrollableGrid.grid.verticalScrollContainer.chunkLoad.pipe(first$1()).subscribe(() => {\n this._pendingNavigation = false;\n if (cb) {\n cb();\n }\n });\n }\n else {\n if (cb) {\n cb();\n }\n }\n }\n /**\n * Moves navigation to child grid.\n *\n * @param parentRowIndex The parent row index, at which the child grid is rendered.\n * @param childLayoutIndex Optional. The index of the child row island to which the child grid belongs to. Uses first if not set.\n */\n _moveToChild(parentRowIndex, visibleColIndex, isNext, childLayoutIndex, cb) {\n const ri = typeof childLayoutIndex !== 'number' ?\n this.grid.childLayoutList.first : this.grid.childLayoutList.toArray()[childLayoutIndex];\n const rowId = this.grid.dataView[parentRowIndex].rowID;\n const pathSegment = {\n rowID: rowId,\n rowIslandKey: ri.key\n };\n const childGrid = this.grid.gridAPI.getChildGrid([pathSegment]);\n const targetIndex = isNext ? 0 : childGrid.dataView.length - 1;\n const targetRec = childGrid.dataView[targetIndex];\n if (!targetRec) {\n // if no target rec, then move on in next sibling or parent\n childGrid.navigation.navigateInBody(targetIndex, visibleColIndex, cb);\n return;\n }\n if (childGrid.isChildGridRecord(targetRec)) {\n // if target is a child grid record should move into it.\n this.grid.navigation.activeNode.row = null;\n childGrid.navigation.activeNode = { row: targetIndex, column: this.activeNode.column };\n childGrid.navigation._handleScrollInChild(targetIndex, isNext, () => {\n const targetLayoutIndex = isNext ? 0 : childGrid.childLayoutList.toArray().length - 1;\n childGrid.navigation._moveToChild(targetIndex, visibleColIndex, isNext, targetLayoutIndex, cb);\n });\n return;\n }\n const childGridNav = childGrid.navigation;\n this.clearActivation();\n const lastVisibleIndex = childGridNav.lastColumnIndex;\n const columnIndex = visibleColIndex <= lastVisibleIndex ? visibleColIndex : lastVisibleIndex;\n childGridNav.activeNode = { row: targetIndex, column: columnIndex };\n childGrid.tbody.nativeElement.focus({ preventScroll: true });\n this._pendingNavigation = false;\n childGrid.navigation._handleScrollInChild(targetIndex, isNext, () => {\n childGrid.navigateTo(targetIndex, columnIndex, cb);\n });\n }\n /**\n * Moves navigation back to parent grid.\n *\n * @param rowIndex\n */\n _moveToParent(isNext, columnIndex, cb) {\n const indexInParent = this.grid.childRow.index;\n const hasNextTarget = this.hasNextTarget(this.grid.parent, indexInParent, isNext);\n if (!hasNextTarget) {\n return;\n }\n this.clearActivation();\n const targetRowIndex = isNext ? indexInParent + 1 : indexInParent - 1;\n const lastVisibleIndex = this.grid.parent.navigation.lastColumnIndex;\n const nextColumnIndex = columnIndex <= lastVisibleIndex ? columnIndex : lastVisibleIndex;\n this._pendingNavigation = true;\n const cbFunc = (args) => {\n this._pendingNavigation = false;\n cb(args);\n args.target.grid.tbody.nativeElement.focus();\n };\n this.grid.parent.navigation.navigateInBody(targetRowIndex, nextColumnIndex, cbFunc);\n }\n /**\n * Gets information on the row position relative to the root grid view port.\n * Returns whether the row is in view and its offset.\n *\n * @param rowObj\n * @param isNext\n */\n getPositionInfo(row, isNext) {\n // XXX: Fix type\n let rowElem = row.nativeElement;\n if (row.layout) {\n const childLayoutKeys = this.grid.childLayoutKeys;\n const riKey = isNext ? childLayoutKeys[0] : childLayoutKeys[childLayoutKeys.length - 1];\n const pathSegment = {\n rowID: row.data.rowID,\n rowIslandKey: riKey\n };\n const childGrid = this.grid.gridAPI.getChildGrid([pathSegment]);\n rowElem = childGrid.tfoot.nativeElement;\n }\n const gridBottom = this._getMinBottom(this.grid);\n const diffBottom = rowElem.getBoundingClientRect().bottom - gridBottom;\n const gridTop = this._getMaxTop(this.grid);\n const diffTop = rowElem.getBoundingClientRect().bottom -\n rowElem.offsetHeight - gridTop;\n // Adding Math.Round because Chrome has some inconsistencies when the page is zoomed\n const isInView = isNext ? Math.round(diffBottom) <= 0 : Math.round(diffTop) >= 0;\n const calcOffset = isNext ? diffBottom : diffTop;\n return { inView: isInView, offset: calcOffset };\n }\n /**\n * Gets closest element by its tag name.\n *\n * @param sourceElem The element from which to start the search.\n * @param targetTag The target element tag name, for which to search.\n */\n getClosestElemByTag(sourceElem, targetTag) {\n let result = sourceElem;\n while (result !== null && result.nodeType === 1) {\n if (result.tagName.toLowerCase() === targetTag.toLowerCase()) {\n return result;\n }\n result = result.parentNode;\n }\n return null;\n }\n clearActivation() {\n // clear if previous activation exists.\n if (this.activeNode && Object.keys(this.activeNode).length) {\n this.activeNode = Object.assign({});\n }\n }\n hasNextTarget(grid, index, isNext) {\n const targetRowIndex = isNext ? index + 1 : index - 1;\n const hasTargetRecord = !!grid.dataView[targetRowIndex];\n if (hasTargetRecord) {\n return true;\n }\n else {\n let hasTargetRecordInParent = false;\n if (grid.parent) {\n const indexInParent = grid.childRow.index;\n hasTargetRecordInParent = this.hasNextTarget(grid.parent, indexInParent, isNext);\n }\n return hasTargetRecordInParent;\n }\n }\n /**\n * Gets the max top view in the current grid hierarchy.\n *\n * @param grid\n */\n _getMaxTop(grid) {\n let currGrid = grid;\n let top = currGrid.tbody.nativeElement.getBoundingClientRect().top;\n while (currGrid.parent) {\n currGrid = currGrid.parent;\n const pinnedRowsHeight = currGrid.hasPinnedRecords && currGrid.isRowPinningToTop ? currGrid.pinnedRowHeight : 0;\n top = Math.max(top, currGrid.tbody.nativeElement.getBoundingClientRect().top + pinnedRowsHeight);\n }\n return top;\n }\n /**\n * Gets the min bottom view in the current grid hierarchy.\n *\n * @param grid\n */\n _getMinBottom(grid) {\n let currGrid = grid;\n let bottom = currGrid.tbody.nativeElement.getBoundingClientRect().bottom;\n while (currGrid.parent) {\n currGrid = currGrid.parent;\n const pinnedRowsHeight = currGrid.hasPinnedRecords && !currGrid.isRowPinningToTop ? currGrid.pinnedRowHeight : 0;\n bottom = Math.min(bottom, currGrid.tbody.nativeElement.getBoundingClientRect().bottom - pinnedRowsHeight);\n }\n return bottom;\n }\n /**\n * Finds the next grid that allows scrolling down.\n *\n * @param grid The grid from which to begin the search.\n */\n getNextScrollableDown(grid) {\n let currGrid = grid.parent;\n if (!currGrid) {\n return { grid, prev: null };\n }\n let scrollTop = currGrid.verticalScrollContainer.scrollPosition;\n let scrollHeight = currGrid.verticalScrollContainer.getScroll().scrollHeight;\n let nonScrollable = scrollHeight === 0 ||\n Math.round(scrollTop + currGrid.verticalScrollContainer.igxForContainerSize) === scrollHeight;\n let prev = grid;\n while (nonScrollable && currGrid.parent !== null) {\n prev = currGrid;\n currGrid = currGrid.parent;\n scrollTop = currGrid.verticalScrollContainer.scrollPosition;\n scrollHeight = currGrid.verticalScrollContainer.getScroll().scrollHeight;\n nonScrollable = scrollHeight === 0 ||\n Math.round(scrollTop + currGrid.verticalScrollContainer.igxForContainerSize) === scrollHeight;\n }\n return { grid: currGrid, prev };\n }\n /**\n * Finds the next grid that allows scrolling up.\n *\n * @param grid The grid from which to begin the search.\n */\n getNextScrollableUp(grid) {\n let currGrid = grid.parent;\n if (!currGrid) {\n return { grid, prev: null };\n }\n let nonScrollable = currGrid.verticalScrollContainer.scrollPosition === 0;\n let prev = grid;\n while (nonScrollable && currGrid.parent !== null) {\n prev = currGrid;\n currGrid = currGrid.parent;\n nonScrollable = currGrid.verticalScrollContainer.scrollPosition === 0;\n }\n return { grid: currGrid, prev };\n }\n}\nIgxHierarchicalGridNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridNavigationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxHierarchicalGridNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridNavigationService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridNavigationService, decorators: [{\n type: Injectable\n }] });\n\nclass IgxHierarchicalGridAPIService extends GridBaseAPIService {\n constructor() {\n super(...arguments);\n this.childRowIslands = new Map();\n this.childGrids = new Map();\n }\n registerChildRowIsland(rowIsland) {\n this.childRowIslands.set(rowIsland.key, rowIsland);\n this.destroyMap.set(rowIsland.key, new Subject());\n }\n unsetChildRowIsland(rowIsland) {\n this.childGrids.delete(rowIsland.key);\n this.childRowIslands.delete(rowIsland.key);\n this.destroyMap.delete(rowIsland.key);\n }\n getChildRowIsland(key) {\n return this.childRowIslands.get(key);\n }\n getChildGrid(path) {\n const currPath = path;\n let grid;\n const pathElem = currPath.shift();\n const childrenForLayout = this.childGrids.get(pathElem.rowIslandKey);\n if (childrenForLayout) {\n const childGrid = childrenForLayout.get(pathElem.rowID);\n if (currPath.length === 0) {\n grid = childGrid;\n }\n else {\n grid = childGrid.gridAPI.getChildGrid(currPath);\n }\n }\n return grid;\n }\n getChildGrids(inDepth) {\n let allChildren = [];\n this.childGrids.forEach((layoutMap) => {\n layoutMap.forEach((grid) => {\n allChildren.push(grid);\n if (inDepth) {\n const children = grid.gridAPI.getChildGrids(inDepth);\n allChildren = allChildren.concat(children);\n }\n });\n });\n return allChildren;\n }\n getParentRowId(childGrid) {\n let rowID;\n this.childGrids.forEach((layoutMap) => {\n layoutMap.forEach((grid, key) => {\n if (grid === childGrid) {\n rowID = key;\n return;\n }\n });\n });\n return rowID;\n }\n registerChildGrid(parentRowID, rowIslandKey, grid) {\n let childrenForLayout = this.childGrids.get(rowIslandKey);\n if (!childrenForLayout) {\n this.childGrids.set(rowIslandKey, new Map());\n childrenForLayout = this.childGrids.get(rowIslandKey);\n }\n childrenForLayout.set(parentRowID, grid);\n }\n getChildGridsForRowIsland(rowIslandKey) {\n const childrenForLayout = this.childGrids.get(rowIslandKey);\n const children = [];\n if (childrenForLayout) {\n childrenForLayout.forEach((child) => {\n children.push(child);\n });\n }\n return children;\n }\n getChildGridByID(rowIslandKey, rowID) {\n const childrenForLayout = this.childGrids.get(rowIslandKey);\n return childrenForLayout.get(rowID);\n }\n get_row_expansion_state(record) {\n let inState;\n if (record.childGridsData !== undefined) {\n const ri = record.key;\n const states = this.grid.expansionStates;\n const expanded = states.get(ri);\n if (expanded !== undefined) {\n return expanded;\n }\n else {\n return this.grid.getDefaultExpandState(record);\n }\n }\n else {\n inState = !!super.get_row_expansion_state(record);\n }\n return inState && this.grid.childLayoutList.length !== 0;\n }\n allow_expansion_state_change(rowID, expanded) {\n const rec = this.get_rec_by_id(rowID);\n const grid = this.grid;\n if (grid.hasChildrenKey && !rec[grid.hasChildrenKey]) {\n return false;\n }\n return !!rec && this.grid.expansionStates.get(rowID) !== expanded;\n }\n get_rec_by_id(rowID) {\n const data = this.get_all_data(false);\n const index = this.get_row_index_in_data(rowID, data);\n return data[index];\n }\n}\nIgxHierarchicalGridAPIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridAPIService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nIgxHierarchicalGridAPIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridAPIService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridAPIService, decorators: [{\n type: Injectable\n }] });\n\nconst hierarchicalTransactionServiceFactory = () => new IgxTransactionService();\nconst IgxHierarchicalTransactionServiceFactory = {\n provide: IgxGridTransaction,\n useFactory: hierarchicalTransactionServiceFactory\n};\nclass IgxHierarchicalGridBaseDirective extends IgxGridBaseDirective {\n /**\n * @hidden\n */\n get maxLevelHeaderDepth() {\n if (this._maxLevelHeaderDepth === null) {\n this._maxLevelHeaderDepth = this.columns.reduce((acc, col) => Math.max(acc, col.level), 0);\n }\n return this._maxLevelHeaderDepth;\n }\n /**\n * Gets the outlet used to attach the grid's overlays to.\n *\n * @remark\n * If set, returns the outlet defined outside the grid. Otherwise returns the grid's internal outlet directive.\n */\n get outlet() {\n return this.rootGrid ? this.rootGrid.resolveOutlet() : this.resolveOutlet();\n }\n /**\n * Sets the outlet used to attach the grid's overlays to.\n */\n set outlet(val) {\n this._userOutletDirective = val;\n }\n get batchEditing() {\n return this._batchEditing;\n }\n set batchEditing(val) {\n if (val !== this._batchEditing) {\n delete this._transactions;\n this.switchTransactionService(val);\n this.subscribeToTransactions();\n this.batchEditingChange.emit(val);\n this._batchEditing = val;\n }\n }\n constructor(validationService, selectionService, colResizingService, gridAPI, transactionFactory, elementRef, zone, document, cdr, differs, viewRef, appRef, injector, envInjector, navigation, filteringService, overlayService, summaryService, _displayDensityOptions, localeId, platform, _diTransactions) {\n super(validationService, selectionService, colResizingService, gridAPI, transactionFactory, elementRef, zone, document, cdr, differs, viewRef, appRef, injector, envInjector, navigation, filteringService, overlayService, summaryService, _displayDensityOptions, localeId, platform, _diTransactions);\n this.gridAPI = gridAPI;\n /**\n * Gets/Sets whether the expand/collapse all button in the header should be rendered.\n *\n * @remark\n * The default value is false.\n * @example\n * ```html\n * \n * \n * ```\n */\n this.showExpandAll = false;\n /**\n * Emitted when a new chunk of data is loaded from virtualization.\n *\n * @example\n * ```typescript\n * \n * \n * ```\n */\n this.dataPreLoad = new EventEmitter();\n /** @hidden @internal */\n this.batchEditingChange = new EventEmitter();\n }\n /**\n * @hidden\n */\n createColumnsList(cols) {\n const columns = [];\n const topLevelCols = cols.filter(c => c.level === 0);\n topLevelCols.forEach((col) => {\n const ref = this._createColumn(col);\n ref.changeDetectorRef.detectChanges();\n columns.push(ref.instance);\n });\n const result = flatten(columns);\n this.updateColumns(result);\n this.initPinning();\n const mirror = reflectComponentType(IgxColumnComponent);\n const outputs = mirror.outputs.filter(o => o.propName !== 'columnChange');\n outputs.forEach(output => {\n this.columns.forEach(column => {\n if (column[output.propName]) {\n column[output.propName].pipe(takeUntil(column.destroy$)).subscribe((args) => {\n const rowIslandColumn = this.parentIsland.childColumns.find(col => col.field === column.field);\n rowIslandColumn[output.propName].emit({ args, owner: this });\n });\n }\n });\n });\n }\n _createColumn(col) {\n let ref;\n if (col instanceof IgxColumnGroupComponent) {\n ref = this._createColGroupComponent(col);\n }\n else {\n ref = this._createColComponent(col);\n }\n return ref;\n }\n _createColGroupComponent(col) {\n const ref = createComponent(IgxColumnGroupComponent, { environmentInjector: this.envInjector, elementInjector: this.injector });\n ref.changeDetectorRef.detectChanges();\n const mirror = reflectComponentType(IgxColumnGroupComponent);\n mirror.inputs.forEach((input) => {\n const propName = input.propName;\n ref.instance[propName] = col[propName];\n });\n if (col.children.length > 0) {\n const newChildren = [];\n col.children.forEach(child => {\n const newCol = this._createColumn(child).instance;\n newCol.parent = ref.instance;\n newChildren.push(newCol);\n });\n ref.instance.children.reset(newChildren);\n ref.instance.children.notifyOnChanges();\n }\n return ref;\n }\n _createColComponent(col) {\n const ref = createComponent(IgxColumnComponent, { environmentInjector: this.envInjector, elementInjector: this.injector });\n const mirror = reflectComponentType(IgxColumnComponent);\n mirror.inputs.forEach((input) => {\n const propName = input.propName;\n if (!(col[propName] instanceof IgxSummaryOperand)) {\n ref.instance[propName] = col[propName];\n }\n else {\n ref.instance[propName] = col[propName].constructor;\n }\n });\n ref.instance.validators = col.validators;\n return ref;\n }\n getGridsForIsland(rowIslandID) {\n return this.gridAPI.getChildGridsForRowIsland(rowIslandID);\n }\n getChildGrid(path) {\n if (!path) {\n return;\n }\n return this.gridAPI.getChildGrid(path);\n }\n}\nIgxHierarchicalGridBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridBaseDirective, deps: [{ token: IgxGridValidationService }, { token: IgxGridSelectionService }, { token: IgxColumnResizingService }, { token: IGX_GRID_SERVICE_BASE }, { token: IgxFlatTransactionFactory }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i0.ViewContainerRef }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.EnvironmentInjector }, { token: IgxHierarchicalGridNavigationService }, { token: IgxFilteringService }, { token: IgxOverlayService }, { token: IgxGridSummaryService }, { token: DisplayDensityToken, optional: true }, { token: LOCALE_ID }, { token: PlatformUtil }, { token: IgxGridTransaction, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nIgxHierarchicalGridBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHierarchicalGridBaseDirective, inputs: { hasChildrenKey: \"hasChildrenKey\", showExpandAll: \"showExpandAll\" }, outputs: { dataPreLoad: \"dataPreLoad\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridBaseDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: IgxGridValidationService }, { type: IgxGridSelectionService }, { type: IgxColumnResizingService }, { type: IgxHierarchicalGridAPIService, decorators: [{\n type: Inject,\n args: [IGX_GRID_SERVICE_BASE]\n }] }, { type: IgxFlatTransactionFactory }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: i0.ViewContainerRef }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.EnvironmentInjector }, { type: IgxHierarchicalGridNavigationService }, { type: IgxFilteringService }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: IgxGridSummaryService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: PlatformUtil }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IgxGridTransaction]\n }] }]; }, propDecorators: { hasChildrenKey: [{\n type: Input\n }], showExpandAll: [{\n type: Input\n }], dataPreLoad: [{\n type: Output\n }] } });\nconst flatten = (arr) => {\n let result = [];\n arr.forEach(el => {\n result.push(el);\n if (el.children) {\n result = result.concat(flatten(el.children.toArray()));\n }\n });\n return result;\n};\n\nclass IgxRowIslandAPIService {\n constructor() {\n this.change = new Subject();\n this.state = new Map();\n this.destroyMap = new Map();\n this.childRowIslands = new Map();\n this.childGrids = new Map();\n }\n register(rowIsland) {\n this.state.set(rowIsland.id, rowIsland);\n this.destroyMap.set(rowIsland.id, new Subject());\n }\n unsubscribe(rowIsland) {\n this.state.delete(rowIsland.id);\n }\n get(id) {\n return this.state.get(id);\n }\n unset(id) {\n this.state.delete(id);\n this.destroyMap.delete(id);\n }\n reset(oldId, newId) {\n const destroy = this.destroyMap.get(oldId);\n const rowIsland = this.get(oldId);\n this.unset(oldId);\n if (rowIsland) {\n this.state.set(newId, rowIsland);\n }\n if (destroy) {\n this.destroyMap.set(newId, destroy);\n }\n }\n registerChildRowIsland(rowIsland) {\n this.childRowIslands.set(rowIsland.key, rowIsland);\n this.destroyMap.set(rowIsland.key, new Subject());\n }\n unsetChildRowIsland(rowIsland) {\n this.childRowIslands.delete(rowIsland.key);\n this.destroyMap.delete(rowIsland.key);\n }\n getChildRowIsland(rowIslandKey) {\n return this.childRowIslands.get(rowIslandKey);\n }\n registerChildGrid(parentRowID, grid) {\n this.childGrids.set(parentRowID, grid);\n }\n getChildGrids(inDepth) {\n let allChildren = [];\n this.childGrids.forEach((grid) => {\n allChildren.push(grid);\n });\n if (inDepth) {\n this.childRowIslands.forEach((layout) => {\n allChildren = allChildren.concat(layout.rowIslandAPI.getChildGrids(inDepth));\n });\n }\n return allChildren;\n }\n getChildGridByID(rowID) {\n return this.childGrids.get(rowID);\n }\n}\nIgxRowIslandAPIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowIslandAPIService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxRowIslandAPIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowIslandAPIService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowIslandAPIService, decorators: [{\n type: Injectable\n }] });\n\nclass IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {\n /**\n * Sets if all immediate children of the grids for this `IgxRowIslandComponent` should be expanded/collapsed.\n * ```html\n * \n * \n * \n * \n * \n * ```\n *\n * @memberof IgxRowIslandComponent\n */\n set expandChildren(value) {\n this._defaultExpandState = value;\n this.rowIslandAPI.getChildGrids().forEach((grid) => {\n if (document.body.contains(grid.nativeElement)) {\n // Detect changes right away if the grid is visible\n grid.expandChildren = value;\n grid.cdr.detectChanges();\n }\n else {\n // Else defer the detection on changes when the grid gets into view for performance.\n grid.updateOnRender = true;\n }\n });\n }\n /**\n * Gets if all immediate children of the grids for this `IgxRowIslandComponent` have been set to be expanded/collapsed.\n * ```typescript\n * const expanded = this.rowIsland.expandChildren;\n * ```\n *\n * @memberof IgxRowIslandComponent\n */\n get expandChildren() {\n return this._defaultExpandState;\n }\n /**\n * @hidden\n */\n get id() {\n const pId = this.parentId ? this.parentId.substring(this.parentId.indexOf(this.layout_id) + this.layout_id.length) + '-' : '';\n return this.layout_id + pId + this.key;\n }\n /**\n * @hidden\n */\n get parentId() {\n return this.parentIsland ? this.parentIsland.id : null;\n }\n /**\n * @hidden\n */\n get level() {\n let ptr = this.parentIsland;\n let lvl = 0;\n while (ptr) {\n lvl++;\n ptr = ptr.parentIsland;\n }\n return lvl + 1;\n }\n constructor(validationService, selectionService, colResizingService, gridAPI, transactionFactory, elementRef, zone, document, cdr, differs, viewRef, injector, envInjector, appRef, navigation, filteringService, overlayService, summaryService, _displayDensityOptions, rowIslandAPI, localeId, platform) {\n super(validationService, selectionService, colResizingService, gridAPI, transactionFactory, elementRef, zone, document, cdr, differs, viewRef, appRef, injector, envInjector, navigation, filteringService, overlayService, summaryService, _displayDensityOptions, localeId, platform);\n this.rowIslandAPI = rowIslandAPI;\n /**\n * @hidden\n */\n this.children = new QueryList();\n /**\n * @hidden\n */\n this.childColumns = new QueryList();\n /**\n * @hidden\n */\n this.layoutChange = new EventEmitter();\n /**\n * Event emmited when a grid is being created based on this row island.\n * ```html\n * \n * \n * \n * \n * \n * ```\n *\n * @memberof IgxRowIslandComponent\n */\n this.gridCreated = new EventEmitter();\n /**\n * Emitted after a grid is being initialized for this row island.\n * The emitting is done in `ngAfterViewInit`.\n * ```html\n * \n * \n * \n * \n * \n * ```\n *\n * @memberof IgxRowIslandComponent\n */\n this.gridInitialized = new EventEmitter();\n /**\n * @hidden\n */\n this.initialChanges = [];\n /**\n * @hidden\n */\n this.rootGrid = null;\n this.layout_id = `igx-row-island-`;\n this.isInit = false;\n this._childColumns = [];\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this.filteringService.grid = this;\n this.rootGrid = this.gridAPI.grid;\n this.rowIslandAPI.rowIsland = this;\n this.ri_columnListDiffer = this.differs.find([]).create(null);\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n this.updateChildren();\n this.children.notifyOnChanges();\n this.children.changes.pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.updateChildren();\n // update existing grids since their child ri have been changed.\n this.getGridsForIsland(this.key).forEach(grid => {\n grid.onRowIslandChange(this.children);\n });\n });\n const nestedColumns = this.children.map((layout) => layout.columnList.toArray());\n const colsArray = [].concat.apply([], nestedColumns);\n const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);\n this._childColumns = topCols;\n this.updateColumns(this._childColumns);\n this.columnList.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n Promise.resolve().then(() => {\n this.updateColumnList();\n });\n });\n // handle column changes so that they are passed to child grid instances when columnChange is emitted.\n this.ri_columnListDiffer.diff(this.childColumns);\n this._childColumns.forEach(x => x.columnChange.pipe(takeUntil(x.destroy$)).subscribe(() => this.updateColumnList()));\n this.childColumns.changes.pipe(takeUntil(this.destroy$)).subscribe((change) => {\n const diff = this.ri_columnListDiffer.diff(change);\n if (diff) {\n diff.forEachAddedItem((record) => {\n record.item.columnChange.pipe(takeUntil(record.item.destroy$)).subscribe(() => this.updateColumnList());\n });\n }\n });\n this.actionStrip = this.actionStrips.first;\n if (this.actionStrip) {\n this.actionStrip.menuOverlaySettings.outlet = this.outlet;\n }\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n this.rowIslandAPI.register(this);\n if (this.parentIsland) {\n this.parentIsland.rowIslandAPI.registerChildRowIsland(this);\n }\n else {\n this.rootGrid.gridAPI.registerChildRowIsland(this);\n }\n this._init = false;\n // Create the child toolbar if the parent island has a toolbar definition\n this.gridCreated.pipe(pluck('grid'), takeUntil(this.destroy$)).subscribe(grid => {\n grid.rendered$.pipe(first$1(), filter(() => !!this.islandToolbarTemplate))\n .subscribe(() => grid.toolbarOutlet.createEmbeddedView(this.islandToolbarTemplate, { $implicit: grid }));\n grid.rendered$.pipe(first$1(), filter(() => !!this.islandPaginatorTemplate))\n .subscribe(() => {\n this.rootGrid.paginatorList.changes.pipe(takeUntil(this.destroy$)).subscribe(() => grid.setUpPaginator());\n grid.paginatorOutlet.createEmbeddedView(this.islandPaginatorTemplate);\n });\n });\n }\n /**\n * @hidden\n */\n ngOnChanges(changes) {\n this.layoutChange.emit(changes);\n if (!this.isInit) {\n this.initialChanges.push(changes);\n }\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n // Override the base destroy because we don't have rendered anything to use removeEventListener on\n this.destroy$.next(true);\n this.destroy$.complete();\n this._destroyed = true;\n this.rowIslandAPI.unset(this.id);\n if (this.parentIsland) {\n this.getGridsForIsland(this.key).forEach(grid => {\n this.cleanGridState(grid);\n grid.gridAPI.unsetChildRowIsland(this);\n });\n this.parentIsland.rowIslandAPI.unsetChildRowIsland(this);\n }\n else {\n this.rootGrid.gridAPI.unsetChildRowIsland(this);\n this.cleanGridState(this.rootGrid);\n }\n }\n /**\n * @hidden\n */\n reflow() { }\n /**\n * @hidden\n */\n calculateGridHeight() { }\n updateColumnList() {\n const nestedColumns = this.children.map((layout) => layout.columnList.toArray());\n const colsArray = [].concat.apply([], nestedColumns);\n const topCols = this.columnList.filter((item) => {\n if (colsArray.indexOf(item) === -1) {\n /* Reset the default width of the columns that come into this row island,\n because the root catches them first during the detectChanges() and sets their defaultWidth. */\n item.defaultWidth = undefined;\n return true;\n }\n return false;\n });\n this._childColumns = topCols;\n this.rowIslandAPI.getChildGrids().forEach((grid) => {\n grid.createColumnsList(this._childColumns);\n if (!document.body.contains(grid.nativeElement)) {\n grid.updateOnRender = true;\n }\n });\n }\n updateChildren() {\n if (this.children.first === this) {\n this.children.reset(this.children.toArray().slice(1));\n }\n this.children.forEach(child => {\n child.parentIsland = this;\n });\n }\n cleanGridState(grid) {\n grid.childGridTemplates.forEach((tmpl) => {\n tmpl.owner.cleanView(tmpl.context.templateID);\n });\n grid.childGridTemplates.clear();\n grid.onRowIslandChange();\n }\n}\nIgxRowIslandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowIslandComponent, deps: [{ token: IgxGridValidationService }, { token: IgxGridSelectionService }, { token: IgxColumnResizingService }, { token: IGX_GRID_SERVICE_BASE }, { token: IgxFlatTransactionFactory }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.EnvironmentInjector }, { token: i0.ApplicationRef }, { token: IgxHierarchicalGridNavigationService }, { token: IgxFilteringService }, { token: IgxOverlayService }, { token: IgxGridSummaryService }, { token: DisplayDensityToken, optional: true }, { token: IgxRowIslandAPIService }, { token: LOCALE_ID }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxRowIslandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxRowIslandComponent, selector: \"igx-row-island\", inputs: { key: \"key\", expandChildren: \"expandChildren\" }, outputs: { layoutChange: \"layoutChange\", gridCreated: \"gridCreated\", gridInitialized: \"gridInitialized\" }, providers: [\n IgxRowIslandAPIService,\n IgxFilteringService,\n IgxGridSelectionService\n ], queries: [{ propertyName: \"islandToolbarTemplate\", first: true, predicate: IgxGridToolbarDirective, descendants: true, read: TemplateRef }, { propertyName: \"islandPaginatorTemplate\", first: true, predicate: IgxPaginatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"children\", predicate: i0.forwardRef(function () { return IgxRowIslandComponent; }), read: IgxRowIslandComponent }, { propertyName: \"childColumns\", predicate: IgxColumnComponent, read: IgxColumnComponent }, { propertyName: \"actionStrips\", predicate: IgxActionStripComponent, read: IgxActionStripComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxRowIslandComponent, decorators: [{\n type: Component,\n args: [{\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'igx-row-island',\n template: ``,\n providers: [\n IgxRowIslandAPIService,\n IgxFilteringService,\n IgxGridSelectionService\n ]\n }]\n }], ctorParameters: function () { return [{ type: IgxGridValidationService }, { type: IgxGridSelectionService }, { type: IgxColumnResizingService }, { type: IgxHierarchicalGridAPIService, decorators: [{\n type: Inject,\n args: [IGX_GRID_SERVICE_BASE]\n }] }, { type: IgxFlatTransactionFactory }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: i0.ViewContainerRef }, { type: i0.Injector }, { type: i0.EnvironmentInjector }, { type: i0.ApplicationRef }, { type: IgxHierarchicalGridNavigationService }, { type: IgxFilteringService }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: IgxGridSummaryService }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: IgxRowIslandAPIService }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: PlatformUtil }]; }, propDecorators: { key: [{\n type: Input\n }], children: [{\n type: ContentChildren,\n args: [forwardRef(() => IgxRowIslandComponent), { read: IgxRowIslandComponent, descendants: false }]\n }], childColumns: [{\n type: ContentChildren,\n args: [IgxColumnComponent, { read: IgxColumnComponent, descendants: false }]\n }], islandToolbarTemplate: [{\n type: ContentChild,\n args: [IgxGridToolbarDirective, { read: TemplateRef }]\n }], islandPaginatorTemplate: [{\n type: ContentChild,\n args: [IgxPaginatorDirective, { read: TemplateRef }]\n }], actionStrips: [{\n type: ContentChildren,\n args: [IgxActionStripComponent, { read: IgxActionStripComponent, descendants: false }]\n }], layoutChange: [{\n type: Output\n }], gridCreated: [{\n type: Output\n }], gridInitialized: [{\n type: Output\n }], expandChildren: [{\n type: Input\n }] } });\n\nclass IgxHierarchicalGridCellComponent extends IgxGridCellComponent {\n constructor(selectionService, grid, overlayService, cdr, helement, zone, touchManager, platformUtil) {\n super(selectionService, grid, overlayService, cdr, helement, zone, touchManager, platformUtil);\n }\n ngOnInit() {\n super.ngOnInit();\n this._rootGrid = this._getRootGrid();\n }\n /**\n * @hidden\n * @internal\n */\n activate(event) {\n this._clearAllHighlights();\n const currentElement = this.grid.nativeElement;\n let parentGrid = this.grid;\n let childGrid;\n // add highligh to the current grid\n if (this._rootGrid.id !== currentElement.id) {\n currentElement.classList.add('igx-grid__tr--highlighted');\n }\n // add highligh to the current grid\n while (this._rootGrid.id !== parentGrid.id) {\n childGrid = parentGrid;\n parentGrid = parentGrid.parent;\n const parentRowID = parentGrid.gridAPI.getParentRowId(childGrid);\n parentGrid.highlightedRowID = parentRowID;\n }\n this.grid.navigation.activeNode.gridID = this.gridID;\n super.activate(event);\n }\n _getRootGrid() {\n let currGrid = this.grid;\n while (currGrid.parent) {\n currGrid = currGrid.parent;\n }\n return currGrid;\n }\n // TODO: Extend the new selection service to avoid complete traversal\n _clearAllHighlights() {\n [this._rootGrid, ...this._rootGrid.getChildGrids(true)].forEach(grid => {\n if (grid !== this.grid && grid.navigation.activeNode) {\n grid.navigation.clearActivation();\n grid.selectionService.initKeyboardState();\n grid.selectionService.clear();\n }\n grid.selectionService.activeElement = null;\n grid.nativeElement.classList.remove('igx-grid__tr--highlighted');\n grid.highlightedRowID = null;\n grid.cdr.markForCheck();\n });\n }\n}\nIgxHierarchicalGridCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridCellComponent, deps: [{ token: IgxGridSelectionService }, { token: IGX_GRID_BASE }, { token: IgxOverlayService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: HammerGesturesManager }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxHierarchicalGridCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHierarchicalGridCellComponent, selector: \"igx-hierarchical-grid-cell\", providers: [HammerGesturesManager], usesInheritance: true, ngImport: i0, template: \"\\n {{ grid.resourceStrings.igx_grid_pinned_row_indicator }}\\n\\n\\n
    {{\\n formatter\\n ? (value | columnFormatter:formatter:rowData:columnData)\\n : column.dataType === \\\"number\\\"\\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\\n : column.dataType === 'currency'\\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\\n : column.dataType === 'percent'\\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\\n : value\\n }}
    \\n {{ value ? \\\"check\\\" : \\\"close\\\" }}\\n \\n
    \\n\\n
    {{\\n !isEmptyAddRowCell ? value : (column.header || column.field)\\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 {{ currencyCodeSymbol }}\\n \\n {{ currencyCodeSymbol }}\\n \\n \\n \\n \\n \\n {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} \\n \\n \\n\\n\\n\\n\\n\\n\\n error\\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n\\n\\n
    \\n {{grid.resourceStrings.igx_grid_required_validation_error}}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_email_validation_error }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i5.DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\" }, { kind: \"directive\", type: i5.NumberValueAccessor, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\" }, { kind: \"directive\", type: i5.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i5.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\" }, { kind: \"component\", type: IgxDatePickerComponent, selector: \"igx-date-picker\", inputs: [\"hideOutsideDays\", \"displayMonthsCount\", \"showWeekNumbers\", \"formatter\", \"headerOrientation\", \"todayButtonLabel\", \"cancelButtonLabel\", \"spinLoop\", \"spinDelta\", \"outlet\", \"id\", \"formatViews\", \"disabledDates\", \"specialDates\", \"calendarFormat\", \"value\", \"minValue\", \"maxValue\", \"resourceStrings\", \"readOnly\"], outputs: [\"valueChange\", \"validationFailed\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxFocusDirective, selector: \"[igxFocus]\", inputs: [\"igxFocus\"], exportAs: [\"igxFocus\"] }, { kind: \"directive\", type: IgxTextHighlightDirective, selector: \"[igxTextHighlight]\", inputs: [\"cssClass\", \"activeCssClass\", \"containerClass\", \"groupName\", \"value\", \"row\", \"column\", \"metadata\"] }, { kind: \"directive\", type: IgxTextSelectionDirective, selector: \"[igxTextSelection]\", inputs: [\"igxTextSelection\"], exportAs: [\"igxTextSelection\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxChipComponent, selector: \"igx-chip\", inputs: [\"id\", \"tabIndex\", \"data\", \"draggable\", \"animateOnRelease\", \"hideBaseOnDrag\", \"removable\", \"removeIcon\", \"selectable\", \"selectIcon\", \"disabled\", \"selected\", \"color\", \"resourceStrings\"], outputs: [\"selectedChange\", \"moveStart\", \"moveEnd\", \"remove\", \"chipClick\", \"selectedChanging\", \"selectedChanged\", \"keyDown\", \"dragEnter\", \"dragLeave\", \"dragOver\", \"dragDrop\"] }, { kind: \"component\", type: IgxTimePickerComponent, selector: \"igx-time-picker\", inputs: [\"id\", \"displayFormat\", \"inputFormat\", \"mode\", \"minValue\", \"maxValue\", \"spinLoop\", \"formatter\", \"headerOrientation\", \"readOnly\", \"value\", \"resourceStrings\", \"okButtonLabel\", \"cancelButtonLabel\", \"itemsDelta\"], outputs: [\"selected\", \"valueChange\", \"validationFailed\"] }, { kind: \"directive\", type: IgxDateTimeEditorDirective, selector: \"[igxDateTimeEditor]\", inputs: [\"locale\", \"minValue\", \"maxValue\", \"spinLoop\", \"displayFormat\", \"igxDateTimeEditor\", \"value\", \"spinDelta\"], outputs: [\"valueChange\", \"validationFailed\"], exportAs: [\"igxDateTimeEditor\"] }, { kind: \"directive\", type: IgxTooltipDirective, selector: \"[igxTooltip]\", inputs: [\"context\", \"id\"], exportAs: [\"tooltip\"] }, { kind: \"directive\", type: IgxTooltipTargetDirective, selector: \"[igxTooltipTarget]\", inputs: [\"showDelay\", \"hideDelay\", \"tooltipDisabled\", \"igxTooltipTarget\", \"tooltip\"], outputs: [\"tooltipShow\", \"tooltipHide\"], exportAs: [\"tooltipTarget\"] }, { kind: \"directive\", type: i5.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"directive\", type: i5.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }, { kind: \"pipe\", type: IgxGridCellImageAltPipe, name: \"igxCellImageAlt\" }, { kind: \"pipe\", type: IgxStringReplacePipe, name: \"igxStringReplace\" }, { kind: \"pipe\", type: IgxColumnFormatterPipe, name: \"columnFormatter\" }, { kind: \"pipe\", type: i1$1.DecimalPipe, name: \"number\" }, { kind: \"pipe\", type: i1$1.PercentPipe, name: \"percent\" }, { kind: \"pipe\", type: i1$1.CurrencyPipe, name: \"currency\" }, { kind: \"pipe\", type: i1$1.DatePipe, name: \"date\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridCellComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-hierarchical-grid-cell', providers: [HammerGesturesManager], template: \"\\n {{ grid.resourceStrings.igx_grid_pinned_row_indicator }}\\n\\n\\n
    {{\\n formatter\\n ? (value | columnFormatter:formatter:rowData:columnData)\\n : column.dataType === \\\"number\\\"\\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\\n : column.dataType === 'currency'\\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\\n : column.dataType === 'percent'\\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\\n : value\\n }}
    \\n {{ value ? \\\"check\\\" : \\\"close\\\" }}\\n \\n
    \\n\\n
    {{\\n !isEmptyAddRowCell ? value : (column.header || column.field)\\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 {{ currencyCodeSymbol }}\\n \\n {{ currencyCodeSymbol }}\\n \\n \\n \\n \\n \\n {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} \\n \\n \\n\\n\\n\\n\\n\\n\\n error\\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n\\n\\n
    \\n {{grid.resourceStrings.igx_grid_required_validation_error}}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_email_validation_error }}\\n
    \\n
    \\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxGridSelectionService }, { type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: HammerGesturesManager }, { type: PlatformUtil }]; } });\n\nclass IgxHierarchicalRowComponent extends IgxRowDirective {\n constructor() {\n super(...arguments);\n this.expanderClass = 'igx-grid__hierarchical-expander';\n this.rolActionClass = 'igx-grid__tr-action';\n /**\n * @hidden\n * @internal\n */\n this.select = () => {\n this.grid.selectRows([this.key]);\n };\n /**\n * @hidden\n * @internal\n */\n this.deselect = () => {\n this.grid.deselectRows([this.key]);\n };\n }\n /**\n * @hidden\n */\n get expanderClassResolved() {\n return {\n [`${this.expanderClass} ${this.rolActionClass}`]: !this.pinned || this.disabled,\n [`${this.expanderClass}--empty`]: this.pinned && !this.disabled\n };\n }\n get viewIndex() {\n return this.index + this.grid.page * this.grid.perPage;\n }\n /**\n * Returns whether the row is expanded.\n * ```typescript\n * const RowExpanded = this.grid1.rowList.first.expanded;\n * ```\n */\n get expanded() {\n return this.grid.gridAPI.get_row_expansion_state(this.data);\n }\n /**\n * @hidden\n */\n get expandedClass() {\n return this.expanded && !this.pinned;\n }\n get hasChildren() {\n return !!this.grid.childLayoutKeys.length;\n }\n /**\n * @hidden\n */\n get highlighted() {\n return this.grid && this.grid.highlightedRowID === this.key;\n }\n /**\n * @hidden\n */\n expanderClick(event) {\n event.stopPropagation();\n this.toggle();\n }\n /**\n * Toggles the hierarchical row.\n * ```typescript\n * this.grid1.rowList.first.toggle()\n * ```\n */\n toggle() {\n if (this.added) {\n return;\n }\n // K.D. 28 Feb, 2022 #10634 Don't trigger endEdit/commit upon row expansion state change\n // this.endEdit(this.grid.rootGrid);\n this.grid.gridAPI.set_row_expansion_state(this.key, !this.expanded);\n this.grid.cdr.detectChanges();\n }\n /**\n * @hidden\n */\n get iconTemplate() {\n let expandable = true;\n if (this.grid.hasChildrenKey) {\n expandable = this.data[this.grid.hasChildrenKey];\n }\n if (!expandable || (this.pinned && !this.disabled)) {\n return this.defaultEmptyTemplate;\n }\n if (this.expanded) {\n return this.grid.rowExpandedIndicatorTemplate || this.defaultExpandedTemplate;\n }\n else {\n return this.grid.rowCollapsedIndicatorTemplate || this.defaultCollapsedTemplate;\n }\n }\n // TODO: consider moving into CRUD\n endEdit(grid) {\n if (grid.gridAPI.crudService.cellInEditMode) {\n grid.gridAPI.crudService.endEdit();\n }\n grid.gridAPI.getChildGrids(true).forEach(g => {\n if (g.gridAPI.crudService.cellInEditMode) {\n g.gridAPI.crudService.endEdit();\n }\n });\n }\n}\nIgxHierarchicalRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxHierarchicalRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHierarchicalRowComponent, selector: \"igx-hierarchical-grid-row\", host: { properties: { \"class.igx-grid__tr--expanded\": \"this.expandedClass\", \"class.igx-grid__tr--highlighted\": \"this.highlighted\" } }, providers: [{ provide: IgxRowDirective, useExisting: forwardRef(() => IgxHierarchicalRowComponent) }], viewQueries: [{ propertyName: \"expander\", first: true, predicate: [\"expander\"], descendants: true, read: ElementRef }, { propertyName: \"defaultExpandedTemplate\", first: true, predicate: [\"defaultExpandedTemplate\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultEmptyTemplate\", first: true, predicate: [\"defaultEmptyTemplate\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"defaultCollapsedTemplate\", first: true, predicate: [\"defaultCollapsedTemplate\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"_cells\", predicate: i0.forwardRef(function () { return IgxHierarchicalGridCellComponent; }), descendants: true, read: IgxHierarchicalGridCellComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\\n expand_more\\n\\n\\n\\n chevron_right\\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
    \\n\\n 0 && grid.isPinningToStart\\\">\\n \\n \\n\\n \\n \\n \\n \\n\\n 0 && !grid.isPinningToStart\\\">\\n \\n \\n\\n \\n
    \\n \\n \\n
    \\n
    \\n\\n \\n \\n \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: IgxRowDragDirective, selector: \"[igxRowDrag]\", inputs: [\"igxRowDrag\"] }, { kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxGridForOfDirective, selector: \"[igxGridFor][igxGridForOf]\", inputs: [\"igxGridForOf\", \"igxGridForOfUniqueSizeCache\", \"igxGridForOfVariableSizes\"], outputs: [\"dataChanging\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxHierarchicalGridCellComponent, selector: \"igx-hierarchical-grid-cell\" }, { kind: \"pipe\", type: IgxGridNotGroupedPipe, name: \"igxNotGrouped\" }, { kind: \"pipe\", type: IgxGridCellStylesPipe, name: \"igxCellStyles\" }, { kind: \"pipe\", type: IgxGridCellStyleClassesPipe, name: \"igxCellStyleClasses\" }, { kind: \"pipe\", type: IgxGridDataMapperPipe, name: \"dataMapper\" }, { kind: \"pipe\", type: IgxGridTransactionStatePipe, name: \"transactionState\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalRowComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-hierarchical-grid-row', providers: [{ provide: IgxRowDirective, useExisting: forwardRef(() => IgxHierarchicalRowComponent) }], template: \"\\n\\n expand_more\\n\\n\\n\\n chevron_right\\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
    \\n\\n 0 && grid.isPinningToStart\\\">\\n \\n \\n\\n \\n \\n \\n \\n\\n 0 && !grid.isPinningToStart\\\">\\n \\n \\n\\n \\n
    \\n \\n \\n
    \\n
    \\n\\n \\n \\n \\n \\n
    \\n\" }]\n }], propDecorators: { expander: [{\n type: ViewChild,\n args: ['expander', { read: ElementRef }]\n }], _cells: [{\n type: ViewChildren,\n args: [forwardRef(() => IgxHierarchicalGridCellComponent), { read: IgxHierarchicalGridCellComponent }]\n }], defaultExpandedTemplate: [{\n type: ViewChild,\n args: ['defaultExpandedTemplate', { read: TemplateRef, static: true }]\n }], defaultEmptyTemplate: [{\n type: ViewChild,\n args: ['defaultEmptyTemplate', { read: TemplateRef, static: true }]\n }], defaultCollapsedTemplate: [{\n type: ViewChild,\n args: ['defaultCollapsedTemplate', { read: TemplateRef, static: true }]\n }], expandedClass: [{\n type: HostBinding,\n args: ['class.igx-grid__tr--expanded']\n }], highlighted: [{\n type: HostBinding,\n args: ['class.igx-grid__tr--highlighted']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxGridHierarchicalPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, state = new Map(), id, primaryKey, childKeys, _pipeTrigger) {\n if (childKeys.length === 0) {\n return collection;\n }\n if (this.grid.verticalScrollContainer.isRemote) {\n return collection;\n }\n const result = this.addHierarchy(this.grid, cloneArray(collection), state, primaryKey, childKeys);\n return result;\n }\n addHierarchy(grid, data, state, primaryKey, childKeys) {\n const result = [];\n data.forEach((v) => {\n result.push(v);\n const childGridsData = {};\n childKeys.forEach((childKey) => {\n if (!v[childKey]) {\n v[childKey] = [];\n }\n const hasNestedPath = childKey?.includes('.');\n const childData = !hasNestedPath ? v[childKey] : resolveNestedPath(v, childKey);\n childGridsData[childKey] = childData;\n });\n if (grid.gridAPI.get_row_expansion_state(v)) {\n result.push({ rowID: primaryKey ? v[primaryKey] : v, childGridsData });\n }\n });\n return result;\n }\n}\nIgxGridHierarchicalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridHierarchicalPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridHierarchicalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridHierarchicalPipe, name: \"gridHierarchical\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridHierarchicalPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'gridHierarchical' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n/**\n * @hidden\n */\nclass IgxGridHierarchicalPagingPipe {\n constructor(grid) {\n this.grid = grid;\n }\n transform(collection, enabled, page = 0, perPage = 15, _id, _pipeTrigger) {\n if (!enabled || this.grid.pagingMode !== GridPagingMode.Local) {\n return collection;\n }\n const state = {\n index: page,\n recordsPerPage: perPage\n };\n const total = this.grid._totalRecords >= 0 ? this.grid._totalRecords : collection.length;\n const result = DataUtil.page(cloneArray(collection), state, total);\n this.grid.pagingState = state;\n return result;\n }\n}\nIgxGridHierarchicalPagingPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridHierarchicalPagingPipe, deps: [{ token: IGX_GRID_BASE }], target: i0.ɵɵFactoryTarget.Pipe });\nIgxGridHierarchicalPagingPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridHierarchicalPagingPipe, name: \"gridHierarchicalPaging\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxGridHierarchicalPagingPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'gridHierarchicalPaging' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_GRID_BASE]\n }] }]; } });\n\nlet NEXT_ID$5 = 0;\nclass IgxChildGridRowComponent {\n /**\n * @hidden\n */\n get parentHasScroll() {\n return !this.parentGrid.verticalScrollContainer.dc.instance.notVirtual;\n }\n /**\n * Get a reference to the grid that contains the selected row.\n *\n * ```typescript\n * handleRowSelection(event) {\n * // the grid on which the rowSelected event was triggered\n * const grid = event.row.grid;\n * }\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n // TODO: Refactor\n get parentGrid() {\n return this.gridAPI.grid;\n }\n get level() {\n return this.layout.level;\n }\n /**\n * The native DOM element representing the row. Could be null in certain environments.\n *\n * ```typescript\n * // get the nativeElement of the second selected row\n * let selectedRowNativeElement = this.grid.selectedRows[1].nativeElement;\n * ```\n */\n get nativeElement() {\n return this.element.nativeElement;\n }\n constructor(gridAPI, element, cdr) {\n this.gridAPI = gridAPI;\n this.element = element;\n this.cdr = cdr;\n /**\n * The data passed to the row component.\n *\n * ```typescript\n * // get the row data for the first selected row\n * let selectedRowData = this.grid.selectedRows[0].data;\n * ```\n */\n this.data = [];\n /**\n * Returns whether the row is expanded.\n * ```typescript\n * const RowExpanded = this.grid1.rowList.first.expanded;\n * ```\n */\n this.expanded = false;\n }\n /**\n * @hidden\n */\n ngOnInit() {\n const ref = this.container.createComponent(IgxHierarchicalGridComponent, { injector: this.container.injector });\n this.hGrid = ref.instance;\n this.hGrid.data = this.data.childGridsData[this.layout.key];\n this.layout.layoutChange.subscribe((ch) => {\n this._handleLayoutChanges(ch);\n });\n const changes = this.layout.initialChanges;\n changes.forEach(change => {\n this._handleLayoutChanges(change);\n });\n this.hGrid.parent = this.parentGrid;\n this.hGrid.parentIsland = this.layout;\n this.hGrid.childRow = this;\n // handler logic that re-emits hgrid events on the row island\n this.setupEventEmitters();\n this.layout.gridCreated.emit({\n owner: this.layout,\n parentID: this.data.rowID,\n grid: this.hGrid\n });\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n this.hGrid.childLayoutList = this.layout.children;\n const layouts = this.hGrid.childLayoutList.toArray();\n layouts.forEach((l) => this.hGrid.gridAPI.registerChildRowIsland(l));\n this.parentGrid.gridAPI.registerChildGrid(this.data.rowID, this.layout.key, this.hGrid);\n this.layout.rowIslandAPI.registerChildGrid(this.data.rowID, this.hGrid);\n this.layout.gridInitialized.emit({\n owner: this.layout,\n parentID: this.data.rowID,\n grid: this.hGrid\n });\n this.hGrid.cdr.detectChanges();\n }\n setupEventEmitters() {\n const destructor = takeUntil(this.hGrid.destroy$);\n const mirror = reflectComponentType(IgxGridComponent);\n // exclude outputs related to two-way binding functionality\n const inputNames = mirror.inputs.map(input => input.propName);\n const outputs = mirror.outputs.filter(o => {\n const matchingInputPropName = o.propName.slice(0, o.propName.indexOf('Change'));\n return inputNames.indexOf(matchingInputPropName) === -1;\n });\n // TODO: Skip the `rendered` output. Rendered should be called once per grid.\n outputs.filter(o => o.propName !== 'rendered').forEach(output => {\n if (this.hGrid[output.propName]) {\n this.hGrid[output.propName].pipe(destructor).subscribe((args) => {\n if (!args) {\n args = {};\n }\n args.owner = this.hGrid;\n this.layout[output.propName].emit(args);\n });\n }\n });\n }\n _handleLayoutChanges(changes) {\n for (const change in changes) {\n if (changes.hasOwnProperty(change)) {\n this.hGrid[change] = changes[change].currentValue;\n }\n }\n }\n}\nIgxChildGridRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChildGridRowComponent, deps: [{ token: IGX_GRID_SERVICE_BASE }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxChildGridRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxChildGridRowComponent, selector: \"igx-child-grid-row\", inputs: { layout: \"layout\", parentGridID: \"parentGridID\", data: \"data\", index: \"index\" }, host: { properties: { \"attr.aria-level\": \"this.level\" } }, viewQueries: [{ propertyName: \"container\", first: true, predicate: [\"container\"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: \"
    \\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxChildGridRowComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-child-grid-row', template: \"
    \\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: IgxHierarchicalGridAPIService, decorators: [{\n type: Inject,\n args: [IGX_GRID_SERVICE_BASE]\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { layout: [{\n type: Input\n }], parentGridID: [{\n type: Input\n }], data: [{\n type: Input\n }], index: [{\n type: Input\n }], container: [{\n type: ViewChild,\n args: ['container', { read: ViewContainerRef, static: true }]\n }], level: [{\n type: HostBinding,\n args: ['attr.aria-level']\n }] } });\nclass IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {\n constructor() {\n super(...arguments);\n /**\n * @hidden @internal\n */\n this.role = 'grid';\n /**\n * @hidden\n */\n this.childLayoutKeys = [];\n /**\n * @hidden\n */\n this.highlightedRowID = null;\n /**\n * @hidden\n */\n this.updateOnRender = false;\n /**\n * @hidden\n */\n this.parent = null;\n this.h_id = `igx-hierarchical-grid-${NEXT_ID$5++}`;\n this.childGridTemplates = new Map();\n this.scrollTop = 0;\n this.scrollLeft = 0;\n }\n // @ViewChild('headerHierarchyExpander', { read: ElementRef, static: true })\n get headerHierarchyExpander() {\n return this.theadRow?.headerHierarchyExpander;\n }\n /**\n * Gets/Sets the value of the `id` attribute.\n *\n * @remarks\n * If not provided it will be automatically generated.\n * @example\n * ```html\n * \n * ```\n */\n get id() {\n return this.h_id;\n }\n set id(value) {\n this.h_id = value;\n }\n /**\n * An @Input property that lets you fill the `IgxHierarchicalGridComponent` with an array of data.\n * ```html\n * \n * ```\n *\n * @memberof IgxHierarchicalGridComponent\n */\n set data(value) {\n this._data = value || [];\n this.summaryService.clearSummaryCache();\n if (this.shouldGenerate) {\n this.setupColumns();\n this.reflow();\n }\n this.cdr.markForCheck();\n if (this.parent && (this.height === null || this.height.indexOf('%') !== -1)) {\n // If the height will change based on how much data there is, recalculate sizes in igxForOf.\n this.notifyChanges(true);\n }\n }\n /**\n * Returns an array of data set to the `IgxHierarchicalGridComponent`.\n * ```typescript\n * let filteredData = this.grid.filteredData;\n * ```\n *\n * @memberof IgxHierarchicalGridComponent\n */\n get data() {\n return this._data;\n }\n /** @hidden @internal */\n get paginator() {\n const id = this.id;\n return (!this.parentIsland && this.paginationComponents?.first) || this.rootGrid.paginatorList?.find((pg) => pg.nativeElement.offsetParent?.id === id);\n }\n /** @hidden @internal */\n get excelStyleFilteringComponent() {\n return this.parentIsland ?\n this.parentIsland.excelStyleFilteringComponents.first :\n super.excelStyleFilteringComponent;\n }\n /**\n * Gets/Sets the total number of records in the data source.\n *\n * @remarks\n * This property is required for remote grid virtualization to function when it is bound to remote data.\n * @example\n * ```typescript\n * const itemCount = this.grid1.totalItemCount;\n * this.grid1.totalItemCount = 55;\n * ```\n */\n set totalItemCount(count) {\n this.verticalScrollContainer.totalItemCount = count;\n this.cdr.detectChanges();\n }\n get totalItemCount() {\n return this.verticalScrollContainer.totalItemCount;\n }\n /**\n * Sets if all immediate children of the `IgxHierarchicalGridComponent` should be expanded/collapsed.\n * Defult value is false.\n * ```html\n * \n * ```\n *\n * @memberof IgxHierarchicalGridComponent\n */\n set expandChildren(value) {\n this._defaultExpandState = value;\n this.expansionStates = new Map();\n }\n /**\n * Gets if all immediate children of the `IgxHierarchicalGridComponent` previously have been set to be expanded/collapsed.\n * If previously set and some rows have been manually expanded/collapsed it will still return the last set value.\n * ```typescript\n * const expanded = this.grid.expandChildren;\n * ```\n *\n * @memberof IgxHierarchicalGridComponent\n */\n get expandChildren() {\n return this._defaultExpandState;\n }\n /**\n * @deprecated in version 12.1.0. Use `getCellByColumn` or `getCellByKey` instead\n *\n * Returns a `CellType` object that matches the conditions.\n *\n * @example\n * ```typescript\n * const myCell = this.grid1.getCellByColumnVisibleIndex(2,\"UnitPrice\");\n * ```\n * @param rowIndex\n * @param index\n */\n getCellByColumnVisibleIndex(rowIndex, index) {\n const row = this.getRowByIndex(rowIndex);\n const column = this.columns.find((col) => col.visibleIndex === index);\n if (row && row instanceof IgxHierarchicalGridRow && column) {\n return new IgxGridCell(this, rowIndex, column.field);\n }\n }\n /**\n * Gets the unique identifier of the parent row. It may be a `string` or `number` if `primaryKey` of the\n * parent grid is set or an object reference of the parent record otherwise.\n * ```typescript\n * const foreignKey = this.grid.foreignKey;\n * ```\n *\n * @memberof IgxHierarchicalGridComponent\n */\n get foreignKey() {\n if (!this.parent) {\n return null;\n }\n return this.parent.gridAPI.getParentRowId(this);\n }\n /**\n * @hidden\n */\n get hasExpandableChildren() {\n return !!this.childLayoutKeys.length;\n }\n /**\n * @hidden\n */\n get resolveRowEditContainer() {\n if (this.parentIsland && this.parentIsland.rowEditCustom) {\n return this.parentIsland.rowEditContainer;\n }\n return this.rowEditContainer;\n }\n /**\n * @hidden\n */\n get resolveRowEditActions() {\n return this.parentIsland ? this.parentIsland.rowEditActionsTemplate : this.rowEditActionsTemplate;\n }\n /**\n * @hidden\n */\n get resolveRowEditText() {\n return this.parentIsland ? this.parentIsland.rowEditTextTemplate : this.rowEditTextTemplate;\n }\n /** @hidden */\n hideActionStrip() {\n if (!this.parent) {\n // hide child layout actions strips when\n // moving outside root grid.\n super.hideActionStrip();\n this.allLayoutList.forEach(ri => {\n ri.actionStrip?.hide();\n });\n }\n }\n /**\n * @hidden\n */\n get parentRowOutletDirective() {\n // Targeting parent outlet in order to prevent hiding when outlet\n // is present at a child grid and is attached to a row.\n return this.parent ? this.parent.rowOutletDirective : this.outlet;\n }\n /**\n * @hidden\n */\n ngOnInit() {\n // this.expansionStatesChange.pipe(takeUntil(this.destroy$)).subscribe((value: Map) => {\n // const res = Array.from(value.entries()).filter(({1: v}) => v === true).map(([k]) => k);\n // });\n this.batchEditing = !!this.rootGrid.batchEditing;\n if (this.rootGrid !== this) {\n this.rootGrid.batchEditingChange.pipe(takeUntil(this.destroy$)).subscribe((val) => {\n this.batchEditing = val;\n });\n }\n super.ngOnInit();\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.zone.runOutsideAngular(() => {\n this.verticalScrollContainer.getScroll().addEventListener('scroll', this.hg_verticalScrollHandler.bind(this));\n this.headerContainer.getScroll().addEventListener('scroll', this.hg_horizontalScrollHandler.bind(this));\n });\n this.verticalScrollContainer.beforeViewDestroyed.pipe(takeUntil(this.destroy$)).subscribe((view) => {\n const rowData = view.context.$implicit;\n if (this.isChildGridRecord(rowData)) {\n const cachedData = this.childGridTemplates.get(rowData.rowID);\n if (cachedData) {\n const tmlpOutlet = cachedData.owner;\n tmlpOutlet._viewContainerRef.detach(0);\n }\n }\n });\n if (this.parent) {\n this._displayDensity = this.rootGrid.displayDensity;\n this.summaryService.summaryHeight = 0;\n this.rootGrid.densityChanged.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this._displayDensity = this.rootGrid.displayDensity;\n this.summaryService.summaryHeight = 0;\n this.notifyChanges(true);\n this.cdr.markForCheck();\n });\n this.childLayoutKeys = this.parentIsland.children.map((item) => item.key);\n }\n this.actionStrip = this.parentIsland ? this.parentIsland.actionStrip : this.actionStrip;\n this.headSelectorsTemplates = this.parentIsland ?\n this.parentIsland.headSelectorsTemplates :\n this.headSelectorsTemplates;\n this.rowSelectorsTemplates = this.parentIsland ?\n this.parentIsland.rowSelectorsTemplates :\n this.rowSelectorsTemplates;\n this.dragIndicatorIconTemplate = this.parentIsland ?\n this.parentIsland.dragIndicatorIconTemplate :\n this.dragIndicatorIconTemplate;\n this.rowExpandedIndicatorTemplate = this.rootGrid.rowExpandedIndicatorTemplate;\n this.rowCollapsedIndicatorTemplate = this.rootGrid.rowCollapsedIndicatorTemplate;\n this.headerCollapseIndicatorTemplate = this.rootGrid.headerCollapseIndicatorTemplate;\n this.headerExpandIndicatorTemplate = this.rootGrid.headerExpandIndicatorTemplate;\n this.excelStyleHeaderIconTemplate = this.rootGrid.excelStyleHeaderIconTemplate;\n this.sortAscendingHeaderIconTemplate = this.rootGrid.sortAscendingHeaderIconTemplate;\n this.sortDescendingHeaderIconTemplate = this.rootGrid.sortDescendingHeaderIconTemplate;\n this.sortHeaderIconTemplate = this.rootGrid.sortHeaderIconTemplate;\n this.hasChildrenKey = this.parentIsland ?\n this.parentIsland.hasChildrenKey || this.rootGrid.hasChildrenKey :\n this.rootGrid.hasChildrenKey;\n this.showExpandAll = this.parentIsland ?\n this.parentIsland.showExpandAll : this.rootGrid.showExpandAll;\n }\n get outletDirective() {\n return this.rootGrid.outlet;\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n this.updateColumnList(false);\n this.childLayoutKeys = this.parent ?\n this.parentIsland.children.map((item) => item.key) :\n this.childLayoutKeys = this.childLayoutList.map((item) => item.key);\n this.childLayoutList.notifyOnChanges();\n this.childLayoutList.changes.pipe(takeUntil(this.destroy$)).subscribe(() => this.onRowIslandChange());\n super.ngAfterContentInit();\n }\n /**\n * Returns the `RowType` by index.\n *\n * @example\n * ```typescript\n * const myRow = this.grid1.getRowByIndex(1);\n * ```\n * @param index\n */\n getRowByIndex(index) {\n if (index < 0 || index >= this.dataView.length) {\n return undefined;\n }\n return this.createRow(index);\n }\n /**\n * Returns the `RowType` by key.\n *\n * @example\n * ```typescript\n * const myRow = this.grid1.getRowByKey(1);\n * ```\n * @param key\n */\n getRowByKey(key) {\n const data = this.dataView;\n const rec = this.primaryKey ?\n data.find(record => record[this.primaryKey] === key) :\n data.find(record => record === key);\n const index = data.indexOf(rec);\n if (index < 0 || index > data.length) {\n return undefined;\n }\n return new IgxHierarchicalGridRow(this, index, rec);\n }\n /**\n * @hidden @internal\n */\n allRows() {\n return this.dataView.map((rec, index) => this.createRow(index));\n }\n /**\n * Returns the collection of `IgxHierarchicalGridRow`s for current page.\n *\n * @hidden @internal\n */\n dataRows() {\n return this.allRows().filter(row => row instanceof IgxHierarchicalGridRow);\n }\n /**\n * Returns an array of the selected `IgxGridCell`s.\n *\n * @example\n * ```typescript\n * const selectedCells = this.grid.selectedCells;\n * ```\n */\n get selectedCells() {\n return this.dataRows().map((row) => row.cells.filter((cell) => cell.selected))\n .reduce((a, b) => a.concat(b), []);\n }\n /**\n * Returns a `CellType` object that matches the conditions.\n *\n * @example\n * ```typescript\n * const myCell = this.grid1.getCellByColumn(2, \"UnitPrice\");\n * ```\n * @param rowIndex\n * @param columnField\n */\n getCellByColumn(rowIndex, columnField) {\n const row = this.getRowByIndex(rowIndex);\n const column = this.columns.find((col) => col.field === columnField);\n if (row && row instanceof IgxHierarchicalGridRow && column) {\n return new IgxGridCell(this, rowIndex, columnField);\n }\n }\n /**\n * Returns a `CellType` object that matches the conditions.\n *\n * @remarks\n * Requires that the primaryKey property is set.\n * @example\n * ```typescript\n * grid.getCellByKey(1, 'index');\n * ```\n * @param rowSelector match any rowID\n * @param columnField\n */\n getCellByKey(rowSelector, columnField) {\n const row = this.getRowByKey(rowSelector);\n const column = this.columns.find((col) => col.field === columnField);\n if (row && column) {\n return new IgxGridCell(this, row.index, columnField);\n }\n }\n pinRow(rowID, index) {\n const row = this.getRowByKey(rowID);\n return super.pinRow(rowID, index, row);\n }\n unpinRow(rowID) {\n const row = this.getRowByKey(rowID);\n return super.unpinRow(rowID, row);\n }\n /**\n * @hidden @internal\n */\n dataLoading(event) {\n this.dataPreLoad.emit(event);\n }\n /** @hidden */\n featureColumnsWidth() {\n return super.featureColumnsWidth(this.headerHierarchyExpander);\n }\n /**\n * @hidden\n */\n onRowIslandChange() {\n if (this.parent) {\n this.childLayoutKeys = this.parentIsland.children.filter(item => !item._destroyed).map((item) => item.key);\n }\n else {\n this.childLayoutKeys = this.childLayoutList.filter(item => !item._destroyed).map((item) => item.key);\n }\n if (!this.cdr.destroyed) {\n this.cdr.detectChanges();\n }\n }\n ngOnDestroy() {\n if (!this.parent) {\n this.gridAPI.getChildGrids(true).forEach((grid) => {\n if (!grid.childRow.cdr.destroyed) {\n grid.childRow.cdr.destroy();\n }\n });\n }\n if (this.parent && this.selectionService.activeElement) {\n // in case selection is in destroyed child grid, selection should be cleared.\n this._clearSeletionHighlights();\n }\n super.ngOnDestroy();\n }\n /**\n * @hidden\n */\n isRowHighlighted(rowData) {\n return this.highlightedRowID === rowData.rowID;\n }\n /**\n * @hidden\n */\n isHierarchicalRecord(record) {\n if (this.isGhostRecord(record)) {\n record = record.recordRef;\n }\n return this.childLayoutList.length !== 0 && record[this.childLayoutList.first.key];\n }\n /**\n * @hidden\n */\n isChildGridRecord(record) {\n // Can be null when there is defined layout but no child data was found\n return record?.childGridsData !== undefined;\n }\n /**\n * @hidden\n */\n trackChanges(index, rec) {\n if (rec.childGridsData !== undefined) {\n // if is child rec\n return rec.rowID;\n }\n return rec;\n }\n /**\n * @hidden\n */\n getContext(rowData, rowIndex, pinned) {\n if (this.isChildGridRecord(rowData)) {\n const cachedData = this.childGridTemplates.get(rowData.rowID);\n if (cachedData) {\n const view = cachedData.view;\n const tmlpOutlet = cachedData.owner;\n return {\n $implicit: rowData,\n moveView: view,\n owner: tmlpOutlet,\n index: this.dataView.indexOf(rowData)\n };\n }\n else {\n // child rows contain unique grids, hence should have unique templates\n return {\n $implicit: rowData,\n templateID: {\n type: 'childRow',\n id: rowData.rowID\n },\n index: this.dataView.indexOf(rowData)\n };\n }\n }\n else {\n return {\n $implicit: this.isGhostRecord(rowData) ? rowData.recordRef : rowData,\n templateID: {\n type: 'dataRow',\n id: null\n },\n index: this.getDataViewIndex(rowIndex, pinned),\n disabled: this.isGhostRecord(rowData)\n };\n }\n }\n /**\n * @hidden\n */\n get rootGrid() {\n let currGrid = this;\n while (currGrid.parent) {\n currGrid = currGrid.parent;\n }\n return currGrid;\n }\n /**\n * @hidden\n */\n get iconTemplate() {\n const expanded = this.hasExpandedRecords() && this.hasExpandableChildren;\n if (!expanded && this.showExpandAll) {\n return this.headerCollapseIndicatorTemplate || this.defaultCollapsedTemplate;\n }\n else {\n return this.headerExpandIndicatorTemplate || this.defaultExpandedTemplate;\n }\n }\n /**\n * @hidden\n * @internal\n */\n getDragGhostCustomTemplate() {\n if (this.parentIsland) {\n return this.parentIsland.getDragGhostCustomTemplate();\n }\n return super.getDragGhostCustomTemplate();\n }\n /**\n * @hidden\n * Gets the visible content height that includes header + tbody + footer.\n * For hierarchical child grid it may be scrolled and not fully visible.\n */\n getVisibleContentHeight() {\n let height = super.getVisibleContentHeight();\n if (this.parent) {\n const rootHeight = this.rootGrid.getVisibleContentHeight();\n const topDiff = this.nativeElement.getBoundingClientRect().top - this.rootGrid.nativeElement.getBoundingClientRect().top;\n height = rootHeight - topDiff > height ? height : rootHeight - topDiff;\n }\n return height;\n }\n /**\n * @hidden\n */\n toggleAll() {\n const expanded = this.hasExpandedRecords() && this.hasExpandableChildren;\n if (!expanded && this.showExpandAll) {\n this.expandAll();\n }\n else {\n this.collapseAll();\n }\n }\n /**\n * @hidden\n * @internal\n */\n hasExpandedRecords() {\n if (this.expandChildren) {\n return true;\n }\n let hasExpandedEntry = false;\n this.expansionStates.forEach(value => {\n if (value) {\n hasExpandedEntry = value;\n }\n });\n return hasExpandedEntry;\n }\n getDefaultExpandState(record) {\n if (this.hasChildrenKey && !record[this.hasChildrenKey]) {\n return false;\n }\n return this.expandChildren;\n }\n /**\n * @hidden\n */\n isExpanded(record) {\n return this.gridAPI.get_row_expansion_state(record);\n }\n /**\n * @hidden\n */\n viewCreatedHandler(args) {\n if (this.isChildGridRecord(args.context.$implicit)) {\n const key = args.context.$implicit.rowID;\n this.childGridTemplates.set(key, args);\n }\n }\n /**\n * @hidden\n */\n viewMovedHandler(args) {\n if (this.isChildGridRecord(args.context.$implicit)) {\n // view was moved, update owner in cache\n const key = args.context.$implicit.rowID;\n const cachedData = this.childGridTemplates.get(key);\n cachedData.owner = args.owner;\n this.childLayoutList.forEach((layout) => {\n const relatedGrid = this.gridAPI.getChildGridByID(layout.key, args.context.$implicit.rowID);\n if (relatedGrid && relatedGrid.updateOnRender) {\n // Detect changes if `expandChildren` has changed when the grid wasn't visible. This is for performance reasons.\n relatedGrid.notifyChanges(true);\n relatedGrid.updateOnRender = false;\n }\n });\n }\n }\n onContainerScroll() {\n this.hideOverlays();\n }\n /**\n * @hidden\n */\n createRow(index, data) {\n let row;\n const dataIndex = this._getDataViewIndex(index);\n const rec = data ?? this.dataView[dataIndex];\n if (!row && rec && !rec.childGridsData) {\n row = new IgxHierarchicalGridRow(this, index, rec);\n }\n return row;\n }\n /** @hidden @internal */\n getChildGrids(inDeph) {\n return this.gridAPI.getChildGrids(inDeph);\n }\n generateDataFields(data) {\n return super.generateDataFields(data).filter((field) => {\n const layoutsList = this.parentIsland ? this.parentIsland.children : this.childLayoutList;\n const keys = layoutsList.map((item) => item.key);\n return keys.indexOf(field) === -1;\n });\n }\n resizeNotifyHandler() {\n // do not trigger reflow if element is detached or if it is child grid.\n if (this.document.contains(this.nativeElement) && !this.parent) {\n this.notifyChanges(true);\n }\n }\n /**\n * @hidden\n */\n initColumns(collection, cb = null) {\n if (this.hasColumnLayouts) {\n // invalid configuration - hierarchical grid should not allow column layouts\n // remove column layouts\n const nonColumnLayoutColumns = this.columns.filter((col) => !col.columnLayout && !col.columnLayoutChild);\n this.updateColumns(nonColumnLayoutColumns);\n }\n super.initColumns(collection, cb);\n }\n setupColumns() {\n if (this.parentIsland && this.parentIsland.childColumns.length > 0 && !this.autoGenerate) {\n this.createColumnsList(this.parentIsland.childColumns.toArray());\n }\n else {\n super.setupColumns();\n }\n }\n getColumnList() {\n const childLayouts = this.parent ? this.childLayoutList : this.allLayoutList;\n const nestedColumns = childLayouts.map((layout) => layout.columnList.toArray());\n const colsArray = [].concat.apply([], nestedColumns);\n if (colsArray.length > 0) {\n const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);\n return topCols;\n }\n else {\n return this.columnList.toArray();\n }\n }\n onColumnsChanged() {\n Promise.resolve().then(() => {\n this.updateColumnList();\n });\n }\n _shouldAutoSize(renderedHeight) {\n if (this.isPercentHeight && this.parent) {\n return true;\n }\n return super._shouldAutoSize(renderedHeight);\n }\n updateColumnList(recalcColSizes = true) {\n const childLayouts = this.parent ? this.childLayoutList : this.allLayoutList;\n const nestedColumns = childLayouts.map((layout) => layout.columnList.toArray());\n const colsArray = [].concat.apply([], nestedColumns);\n const colLength = this.columns.length;\n const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);\n if (topCols.length > 0) {\n this.updateColumns(topCols);\n if (recalcColSizes && this.columns.length !== colLength) {\n this.calculateGridSizes(false);\n }\n }\n }\n _clearSeletionHighlights() {\n [this.rootGrid, ...this.rootGrid.getChildGrids(true)].forEach(grid => {\n grid.selectionService.clear();\n grid.selectionService.activeElement = null;\n grid.nativeElement.classList.remove('igx-grid__tr--highlighted');\n grid.highlightedRowID = null;\n grid.cdr.markForCheck();\n });\n }\n hg_verticalScrollHandler() {\n this.scrollTop = this.verticalScrollContainer.scrollPosition;\n }\n hg_horizontalScrollHandler() {\n this.scrollLeft = this.headerContainer.scrollPosition;\n }\n}\nIgxHierarchicalGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxHierarchicalGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxHierarchicalGridComponent, selector: \"igx-hierarchical-grid\", inputs: { id: \"id\", data: \"data\", expandChildren: \"expandChildren\" }, host: { properties: { \"attr.role\": \"this.role\", \"attr.id\": \"this.id\" } }, providers: [\n IgxGridCRUDService,\n IgxGridValidationService,\n IgxGridSelectionService,\n { provide: IGX_GRID_SERVICE_BASE, useClass: IgxHierarchicalGridAPIService },\n { provide: IGX_GRID_BASE, useExisting: IgxHierarchicalGridComponent },\n IgxGridSummaryService,\n IgxFilteringService,\n IgxHierarchicalGridNavigationService,\n IgxColumnResizingService,\n IgxForOfSyncService,\n IgxForOfScrollSyncService,\n IgxRowIslandAPIService\n ], queries: [{ propertyName: \"toolbarTemplate\", first: true, predicate: IgxGridToolbarDirective, descendants: true, read: TemplateRef, static: true }, { propertyName: \"childLayoutList\", predicate: IgxRowIslandComponent, read: IgxRowIslandComponent }, { propertyName: \"allLayoutList\", predicate: IgxRowIslandComponent, descendants: true, read: IgxRowIslandComponent }, { propertyName: \"paginatorList\", predicate: IgxPaginatorComponent, descendants: true }], viewQueries: [{ propertyName: \"toolbarOutlet\", first: true, predicate: [\"toolbarOutlet\"], descendants: true, read: ViewContainerRef }, { propertyName: \"paginatorOutlet\", first: true, predicate: [\"paginatorOutlet\"], descendants: true, read: ViewContainerRef }, { propertyName: \"hierarchicalRecordTemplate\", first: true, predicate: [\"hierarchical_record_template\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"childTemplate\", first: true, predicate: [\"child_record_template\"], descendants: true, read: TemplateRef, static: true }, { propertyName: \"templateOutlets\", predicate: IgxTemplateOutletDirective, descendants: true, read: IgxTemplateOutletDirective }, { propertyName: \"hierarchicalRows\", predicate: IgxChildGridRowComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n\\n\\n\\n\\n\\n
    \\n
    \\n \\n 0\\\"\\n [igxColumnMovingDrop]=\\\"headerContainer\\\" [attr.droppable]=\\\"true\\\" id=\\\"left\\\"\\n class=\\\"igx-grid__scroll-on-drag-pinned\\\" [style.left.px]=\\\"pinnedWidth\\\">\\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
    \\n \\n \\n \\n \\n
    \\n \\n
    \\n
    \\n \\n \\n
    \\n \\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n {{resourceStrings.igx_grid_snackbar_addrow_label}}\\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 {{emptyFilteredGridMessage}}\\n \\n \\n \\n \\n\\n\\n\\n \\n {{emptyGridMessage}}\\n \\n \\n \\n \\n\\n\\n\\n \\n\\n\\n\\n
    \\n \\n \\n
    \\n
    \\n\\n\\n unfold_more\\n\\n\\n\\n unfold_less\\n\\n\\n
    \\n
    \\n \\n \\n
    \\n
    \\n\\n You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns\\n\\n\\n \\n \\n\\n\\n
    \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n\\n\\n drag_indicator\\n\\n\\n\\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: IgxRowEditTabStopDirective, selector: \"[igxRowEditTabStop]\" }, { kind: \"directive\", type: IgxGridBodyDirective, selector: \"[igxGridBody]\" }, { kind: \"component\", type: IgxGridHeaderRowComponent, selector: \"igx-grid-header-row\", inputs: [\"grid\", \"pinnedColumnCollection\", \"unpinnedColumnCollection\", \"activeDescendant\", \"hasMRL\", \"width\", \"density\"] }, { kind: \"component\", type: IgxGridColumnResizerComponent, selector: \"igx-grid-column-resizer\", inputs: [\"restrictResizerTop\"] }, { kind: \"directive\", type: IgxColumnMovingDropDirective, selector: \"[igxColumnMovingDrop]\", inputs: [\"igxColumnMovingDrop\"] }, { kind: \"directive\", type: IgxGridDragSelectDirective, selector: \"[igxGridDragSelect]\", inputs: [\"igxGridDragSelect\"], outputs: [\"dragStop\", \"dragScroll\"] }, { kind: \"component\", type: IgxSummaryRowComponent, selector: \"igx-grid-summary-row\", inputs: [\"summaries\", \"gridID\", \"index\", \"firstCellIndentation\"] }, { kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }, { kind: \"directive\", type: IgxToggleDirective, selector: \"[igxToggle]\", inputs: [\"id\"], outputs: [\"opened\", \"opening\", \"closed\", \"closing\", \"appended\"], exportAs: [\"toggle\"] }, { kind: \"directive\", type: IgxOverlayOutletDirective, selector: \"[igxOverlayOutlet]\", exportAs: [\"overlay-outlet\"] }, { kind: \"directive\", type: IgxGridForOfDirective, selector: \"[igxGridFor][igxGridForOf]\", inputs: [\"igxGridForOf\", \"igxGridForOfUniqueSizeCache\", \"igxGridForOfVariableSizes\"], outputs: [\"dataChanging\"] }, { kind: \"directive\", type: IgxTemplateOutletDirective, selector: \"[igxTemplateOutlet]\", inputs: [\"igxTemplateOutletContext\", \"igxTemplateOutlet\"], outputs: [\"viewCreated\", \"viewMoved\", \"cachedViewLoaded\", \"beforeViewDetach\"] }, { kind: \"component\", type: IgxCircularProgressBarComponent, selector: \"igx-circular-bar\", inputs: [\"id\", \"isIndeterminate\", \"textVisibility\", \"text\"] }, { kind: \"component\", type: IgxSnackbarComponent, selector: \"igx-snackbar\", inputs: [\"id\", \"actionText\", \"positionSettings\"], outputs: [\"clicked\", \"animationStarted\", \"animationDone\"] }, { kind: \"component\", type: IgxHierarchicalRowComponent, selector: \"igx-hierarchical-grid-row\" }, { kind: \"component\", type: IgxChildGridRowComponent, selector: \"igx-child-grid-row\", inputs: [\"layout\", \"parentGridID\", \"data\", \"index\"] }, { kind: \"pipe\", type: IgxGridSortingPipe, name: \"gridSort\" }, { kind: \"pipe\", type: IgxGridFilteringPipe, name: \"gridFiltering\" }, { kind: \"pipe\", type: IgxGridTransactionPipe, name: \"gridTransaction\" }, { kind: \"pipe\", type: IgxHasVisibleColumnsPipe, name: \"visibleColumns\" }, { kind: \"pipe\", type: IgxGridRowPinningPipe, name: \"gridRowPinning\" }, { kind: \"pipe\", type: IgxGridAddRowPipe, name: \"gridAddRow\" }, { kind: \"pipe\", type: IgxGridRowClassesPipe, name: \"igxGridRowClasses\" }, { kind: \"pipe\", type: IgxGridRowStylesPipe, name: \"igxGridRowStyles\" }, { kind: \"pipe\", type: IgxSummaryDataPipe, name: \"igxGridSummaryDataPipe\" }, { kind: \"pipe\", type: IgxGridHierarchicalPipe, name: \"gridHierarchical\" }, { kind: \"pipe\", type: IgxGridHierarchicalPagingPipe, name: \"gridHierarchicalPaging\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridComponent, decorators: [{\n type: Component,\n args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-hierarchical-grid', providers: [\n IgxGridCRUDService,\n IgxGridValidationService,\n IgxGridSelectionService,\n { provide: IGX_GRID_SERVICE_BASE, useClass: IgxHierarchicalGridAPIService },\n { provide: IGX_GRID_BASE, useExisting: IgxHierarchicalGridComponent },\n IgxGridSummaryService,\n IgxFilteringService,\n IgxHierarchicalGridNavigationService,\n IgxColumnResizingService,\n IgxForOfSyncService,\n IgxForOfScrollSyncService,\n IgxRowIslandAPIService\n ], template: \"\\n\\n\\n\\n\\n\\n
    \\n
    \\n \\n 0\\\"\\n [igxColumnMovingDrop]=\\\"headerContainer\\\" [attr.droppable]=\\\"true\\\" id=\\\"left\\\"\\n class=\\\"igx-grid__scroll-on-drag-pinned\\\" [style.left.px]=\\\"pinnedWidth\\\">\\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
    \\n \\n \\n \\n \\n
    \\n \\n
    \\n
    \\n \\n \\n
    \\n \\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n {{resourceStrings.igx_grid_snackbar_addrow_label}}\\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 {{emptyFilteredGridMessage}}\\n \\n \\n \\n \\n\\n\\n\\n \\n {{emptyGridMessage}}\\n \\n \\n \\n \\n\\n\\n\\n \\n\\n\\n\\n
    \\n \\n \\n
    \\n
    \\n\\n\\n unfold_more\\n\\n\\n\\n unfold_less\\n\\n\\n
    \\n
    \\n \\n \\n
    \\n
    \\n\\n You have {{ rowChangesCount }} changes in this row and {{ hiddenColumnsCount }} hidden columns\\n\\n\\n \\n \\n\\n\\n
    \\n \\n \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n\\n\\n drag_indicator\\n\\n\\n\\n
    \\n
    \\n\" }]\n }], propDecorators: { role: [{\n type: HostBinding,\n args: ['attr.role']\n }], childLayoutList: [{\n type: ContentChildren,\n args: [IgxRowIslandComponent, { read: IgxRowIslandComponent, descendants: false }]\n }], allLayoutList: [{\n type: ContentChildren,\n args: [IgxRowIslandComponent, { read: IgxRowIslandComponent, descendants: true }]\n }], toolbarTemplate: [{\n type: ContentChild,\n args: [IgxGridToolbarDirective, { read: TemplateRef, static: true }]\n }], paginatorList: [{\n type: ContentChildren,\n args: [IgxPaginatorComponent, { descendants: true }]\n }], toolbarOutlet: [{\n type: ViewChild,\n args: ['toolbarOutlet', { read: ViewContainerRef }]\n }], paginatorOutlet: [{\n type: ViewChild,\n args: ['paginatorOutlet', { read: ViewContainerRef }]\n }], templateOutlets: [{\n type: ViewChildren,\n args: [IgxTemplateOutletDirective, { read: IgxTemplateOutletDirective }]\n }], hierarchicalRows: [{\n type: ViewChildren,\n args: [IgxChildGridRowComponent]\n }], hierarchicalRecordTemplate: [{\n type: ViewChild,\n args: ['hierarchical_record_template', { read: TemplateRef, static: true }]\n }], childTemplate: [{\n type: ViewChild,\n args: ['child_record_template', { read: TemplateRef, static: true }]\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], data: [{\n type: Input\n }], expandChildren: [{\n type: Input\n }] } });\n\n/**\n * @hidden\n */\nclass IgxHierarchicalGridModule {\n}\nIgxHierarchicalGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxHierarchicalGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridModule, declarations: [IgxHierarchicalGridComponent,\n IgxHierarchicalRowComponent,\n IgxRowIslandComponent,\n IgxChildGridRowComponent,\n IgxHierarchicalGridCellComponent,\n IgxGridHierarchicalPipe,\n IgxGridHierarchicalPagingPipe], imports: [IgxGridModule,\n IgxTooltipModule,\n ReactiveFormsModule], exports: [IgxGridModule,\n IgxHierarchicalGridComponent,\n IgxHierarchicalRowComponent,\n IgxHierarchicalGridCellComponent,\n IgxRowIslandComponent,\n IgxChildGridRowComponent] });\nIgxHierarchicalGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridModule, imports: [IgxGridModule,\n IgxTooltipModule,\n ReactiveFormsModule, IgxGridModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxHierarchicalGridModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxHierarchicalGridComponent,\n IgxHierarchicalRowComponent,\n IgxRowIslandComponent,\n IgxChildGridRowComponent,\n IgxHierarchicalGridCellComponent,\n IgxGridHierarchicalPipe,\n IgxGridHierarchicalPagingPipe\n ],\n exports: [\n IgxGridModule,\n IgxHierarchicalGridComponent,\n IgxHierarchicalRowComponent,\n IgxHierarchicalGridCellComponent,\n IgxRowIslandComponent,\n IgxChildGridRowComponent\n ],\n imports: [\n IgxGridModule,\n IgxTooltipModule,\n ReactiveFormsModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n }]\n }] });\n\n/**\n * IgxActionIcon is a container for the action nav icon of the IgxNavbar.\n */\nclass IgxNavbarActionDirective {\n}\nIgxNavbarActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavbarActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavbarActionDirective, selector: \"igx-navbar-action,[igxNavbarAction]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarActionDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-navbar-action,[igxNavbarAction]'\n }]\n }] });\nclass IgxNavbarTitleDirective {\n}\nIgxNavbarTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavbarTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavbarTitleDirective, selector: \"igx-navbar-title,[igxNavbarTitle]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarTitleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-navbar-title,[igxNavbarTitle]'\n }]\n }] });\nlet NEXT_ID$4 = 0;\n/**\n * **Ignite UI for Angular Navbar** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/navbar.html)\n *\n * The Ignite UI Navbar is most commonly used to provide an app header with a hamburger menu and navigation\n * state such as a \"Go Back\" button. It also supports other actions represented by icons.\n *\n * Example:\n * ```html\n * \n * search\n * favorite\n * more_vert\n * \n * ```\n */\nclass IgxNavbarComponent {\n constructor() {\n /**\n * An @Input property that sets the value of the `id` attribute. If not provided it will be automatically generated.\n * ```html\n * \n * ```\n */\n this.id = `igx-navbar-${NEXT_ID$4++}`;\n /**\n * The event that will be thrown when the action is executed,\n * provides reference to the `IgxNavbar` component as argument\n * ```typescript\n * public actionExc(event){\n * alert(\"Action Execute!\");\n * }\n * //..\n * ```\n * ```html\n * \n * ```\n */\n this.action = new EventEmitter();\n /**\n * An @Input property that sets the titleId of the `IgxNavbarComponent`. If not set it will be automatically generated.\n * ```html\n * \n * ```\n */\n this.titleId = `igx-navbar-title-${NEXT_ID$4++}`;\n this.isVisible = true;\n }\n /**\n * Sets whether the action button of the `IgxNavbarComponent` is visible.\n * ```html\n * \n * ```\n */\n set isActionButtonVisible(value) {\n this.isVisible = value;\n }\n /**\n * Returns whether the `IgxNavbarComponent` action button is visible, true/false.\n * ```typescript\n * @ViewChild(\"MyChild\")\n * public navBar: IgxNavbarComponent;\n * ngAfterViewInit(){\n * let actionButtonVisibile = this.navBar.isActionButtonVisible;\n * }\n * ```\n */\n get isActionButtonVisible() {\n if (this.actionIconTemplate || !this.actionButtonIcon) {\n return false;\n }\n return this.isVisible;\n }\n get isTitleContentVisible() {\n return this.titleContent ? true : false;\n }\n /**\n * @hidden\n */\n _triggerAction() {\n this.action.emit(this);\n }\n}\nIgxNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavbarComponent, selector: \"igx-navbar\", inputs: { id: \"id\", actionButtonIcon: \"actionButtonIcon\", title: \"title\", titleId: \"titleId\", isActionButtonVisible: \"isActionButtonVisible\" }, outputs: { action: \"action\" }, host: { properties: { \"attr.id\": \"this.id\" } }, queries: [{ propertyName: \"actionIconTemplate\", first: true, predicate: IgxNavbarActionDirective, descendants: true, read: IgxNavbarActionDirective }, { propertyName: \"titleContent\", first: true, predicate: IgxNavbarTitleDirective, descendants: true, read: IgxNavbarTitleDirective }], ngImport: i0, template: \"\\n\", styles: [\":host{display:block;width:100%}\\n\"], dependencies: [{ kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-navbar', template: \"\\n\", styles: [\":host{display:block;width:100%}\\n\"] }]\n }], propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], actionButtonIcon: [{\n type: Input\n }], title: [{\n type: Input\n }], action: [{\n type: Output\n }], titleId: [{\n type: Input\n }], actionIconTemplate: [{\n type: ContentChild,\n args: [IgxNavbarActionDirective, { read: IgxNavbarActionDirective }]\n }], titleContent: [{\n type: ContentChild,\n args: [IgxNavbarTitleDirective, { read: IgxNavbarTitleDirective }]\n }], isActionButtonVisible: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxNavbarModule {\n}\nIgxNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarModule, declarations: [IgxNavbarComponent, IgxNavbarActionDirective, IgxNavbarTitleDirective], imports: [IgxButtonModule, IgxIconModule, CommonModule], exports: [IgxNavbarComponent, IgxNavbarActionDirective, IgxNavbarTitleDirective] });\nIgxNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarModule, imports: [IgxButtonModule, IgxIconModule, CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavbarModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxNavbarComponent, IgxNavbarActionDirective, IgxNavbarTitleDirective],\n exports: [IgxNavbarComponent, IgxNavbarActionDirective, IgxNavbarTitleDirective],\n imports: [IgxButtonModule, IgxIconModule, CommonModule]\n }]\n }] });\n\nclass IgxNavDrawerItemDirective {\n constructor() {\n /**\n * @hidden\n */\n this.active = false;\n /**\n * @hidden\n */\n this.isHeader = false;\n /**\n * @hidden\n */\n this.activeClass = 'igx-nav-drawer__item--active';\n }\n /**\n * @hidden\n */\n get defaultCSS() {\n return !this.active && !this.isHeader;\n }\n /**\n * @hidden\n */\n get currentCSS() {\n return this.active && !this.isHeader;\n }\n /**\n * @hidden\n */\n get headerCSS() {\n return this.isHeader;\n }\n}\nIgxNavDrawerItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavDrawerItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavDrawerItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavDrawerItemDirective, selector: \"[igxDrawerItem]\", inputs: { active: \"active\", isHeader: \"isHeader\" }, host: { properties: { \"class.igx-nav-drawer__item\": \"this.defaultCSS\", \"class.igx-nav-drawer__item--active\": \"this.currentCSS\", \"class.igx-nav-drawer__item--header\": \"this.headerCSS\" } }, exportAs: [\"igxDrawerItem\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavDrawerItemDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDrawerItem]',\n exportAs: 'igxDrawerItem'\n }]\n }], propDecorators: { active: [{\n type: Input,\n args: ['active']\n }], isHeader: [{\n type: Input,\n args: ['isHeader']\n }], defaultCSS: [{\n type: HostBinding,\n args: ['class.igx-nav-drawer__item']\n }], currentCSS: [{\n type: HostBinding,\n args: ['class.igx-nav-drawer__item--active']\n }], headerCSS: [{\n type: HostBinding,\n args: ['class.igx-nav-drawer__item--header']\n }] } });\nclass IgxNavDrawerTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxNavDrawerTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavDrawerTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavDrawerTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavDrawerTemplateDirective, selector: \"[igxDrawer]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavDrawerTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDrawer]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\nclass IgxNavDrawerMiniTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nIgxNavDrawerMiniTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavDrawerMiniTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxNavDrawerMiniTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavDrawerMiniTemplateDirective, selector: \"[igxDrawerMini]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavDrawerMiniTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDrawerMini]'\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nlet NEXT_ID$3 = 0;\n/**\n * **Ignite UI for Angular Navigation Drawer** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/navdrawer)\n *\n * The Ignite UI Navigation Drawer is a collapsible side navigation container commonly used in combination with the Navbar.\n *\n * Example:\n * ```html\n * \n * \n * \n * \n * \n * ```\n */\nclass IgxNavigationDrawerComponent {\n /**\n * State of the drawer.\n *\n * ```typescript\n * // get\n * let navDrawerIsOpen = this.navdrawer.isOpen;\n * ```\n *\n * ```html\n * \n * \n * ```\n *\n * Two-way data binding.\n * ```html\n * \n * \n * ```\n */\n get isOpen() {\n return this._isOpen;\n }\n set isOpen(value) {\n this._isOpen = value;\n this.isOpenChange.emit(this._isOpen);\n }\n /**\n * Returns nativeElement of the component.\n *\n * @hidden\n */\n get element() {\n return this.elementRef.nativeElement;\n }\n /**\n * @hidden\n */\n get template() {\n if (this.miniTemplate && !this.isOpen) {\n return this.miniTemplate.template;\n }\n else if (this.contentTemplate) {\n return this.contentTemplate.template;\n }\n }\n /**\n * @hidden\n */\n get miniTemplate() {\n return this._miniTemplate;\n }\n /**\n * @hidden\n */\n set miniTemplate(v) {\n if (!this.isOpen) {\n this.setDrawerWidth(v ? this.miniWidth : '');\n }\n this._miniTemplate = v;\n }\n /**\n * @hidden\n */\n get flexWidth() {\n if (!this.pin) {\n return '0px';\n }\n if (this.isOpen) {\n return this.width;\n }\n if (this.miniTemplate && this.miniWidth) {\n return this.miniWidth;\n }\n return '0px';\n }\n /** @hidden */\n get isPinnedRight() {\n return this.pin && this.position === 'right' ? '1' : '0';\n }\n /**\n * @hidden\n */\n get drawer() {\n return this._drawer.nativeElement;\n }\n /**\n * @hidden\n */\n get overlay() {\n return this._overlay.nativeElement;\n }\n /**\n * @hidden\n */\n get styleDummy() {\n return this._styleDummy.nativeElement;\n }\n /**\n * Property to decide whether to change width or translate the drawer from pan gesture.\n *\n * @hidden\n */\n get hasAnimateWidth() {\n return this.pin || !!this.miniTemplate;\n }\n /**\n * Used for touch gestures (swipe and pan).\n * Defaults to 50 (in px) and is extended to at least 110% of the mini template width if available.\n *\n * @hidden\n */\n get maxEdgeZone() {\n return this._maxEdgeZone;\n }\n /**\n * Gets the Drawer width for specific state.\n * Will attempt to evaluate requested state and cache.\n *\n *\n * @hidden\n */\n get expectedWidth() {\n return this.getExpectedWidth(false);\n }\n /**\n * Get the Drawer mini width for specific state.\n * Will attempt to evaluate requested state and cache.\n *\n * @hidden\n */\n get expectedMiniWidth() {\n return this.getExpectedWidth(true);\n }\n /**\n * @hidden\n */\n get touchManager() {\n return this._touchManager;\n }\n /**\n * Exposes optional navigation service\n *\n * @hidden\n */\n get state() {\n return this._state;\n }\n constructor(elementRef, _state, renderer, _touchManager, platformUtil) {\n this.elementRef = elementRef;\n this._state = _state;\n this.renderer = renderer;\n this._touchManager = _touchManager;\n this.platformUtil = platformUtil;\n /** @hidden @internal */\n this.cssClass = true;\n /**\n * ID of the component\n *\n * ```typescript\n * // get\n * let myNavDrawerId = this.navdrawer.id;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.id = `igx-nav-drawer-${NEXT_ID$3++}`;\n /**\n * Position of the Navigation Drawer. Can be \"left\"(default) or \"right\".\n *\n * ```typescript\n * // get\n * let myNavDrawerPosition = this.navdrawer.position;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.position = 'left';\n /**\n * Enables the use of touch gestures to manipulate the drawer:\n * - swipe/pan from edge to open, swipe-toggle and pan-drag.\n *\n * ```typescript\n * // get\n * let gesturesEnabled = this.navdrawer.enableGestures;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.enableGestures = true;\n /**\n * @hidden\n */\n this.isOpenChange = new EventEmitter();\n /**\n * Minimum device width required for automatic pin to be toggled.\n * Default is 1024, can be set to a falsy value to disable this behavior.\n *\n * ```typescript\n * // get\n * let navDrawerPinThreshold = this.navdrawer.pinThreshold;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.pinThreshold = 1024;\n /**\n * When pinned the drawer is relatively positioned instead of sitting above content.\n * May require additional layout styling.\n *\n * ```typescript\n * // get\n * let navDrawerIsPinned = this.navdrawer.pin;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.pin = false;\n /**\n * Width of the drawer in its open state. Defaults to \"280px\".\n *\n * ```typescript\n * // get\n * let navDrawerWidth = this.navdrawer.width;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.width = '280px';\n /**\n * Enables/disables the animation, when toggling the drawer. Set to `false` by default.\n * ````html\n * \n * ````\n */\n this.disableAnimation = false;\n /**\n * Width of the drawer in its mini state. Defaults to 68px.\n *\n * ```typescript\n * // get\n * let navDrawerMiniWidth = this.navdrawer.miniWidth;\n * ```\n *\n * ```html\n * \n * \n * ```\n */\n this.miniWidth = '68px';\n /**\n * Pinned state change output for two-way binding.\n *\n * ```html\n * \n * ```\n */\n this.pinChange = new EventEmitter(true);\n /**\n * Event fired as the Navigation Drawer is about to open.\n *\n * ```html\n * \n * ```\n */\n this.opening = new EventEmitter();\n /**\n * Event fired when the Navigation Drawer has opened.\n *\n * ```html\n * \n * ```\n */\n this.opened = new EventEmitter();\n /**\n * Event fired as the Navigation Drawer is about to close.\n *\n * ```html\n * \n * ```\n */\n this.closing = new EventEmitter();\n /**\n * Event fired when the Navigation Drawer has closed.\n *\n * ```html\n * \n * ```\n */\n this.closed = new EventEmitter();\n this._isOpen = false;\n this._gesturesAttached = false;\n this._widthCache = { width: null, miniWidth: null, windowWidth: null };\n this.css = {\n drawer: 'igx-nav-drawer__aside',\n mini: 'igx-nav-drawer__aside--mini',\n overlay: 'igx-nav-drawer__overlay',\n styleDummy: 'igx-nav-drawer__style-dummy'\n };\n /** Pan animation properties */\n this._panning = false;\n this._maxEdgeZone = 50;\n this.checkPinThreshold = (evt) => {\n if (!this.platformUtil.isBrowser) {\n return;\n }\n let windowWidth;\n if (this.pinThreshold) {\n windowWidth = this.getWindowWidth();\n if (evt && this._widthCache.windowWidth === windowWidth) {\n return;\n }\n this._widthCache.windowWidth = windowWidth;\n if (!this.pin && windowWidth >= this.pinThreshold) {\n this.pin = true;\n this.pinChange.emit(true);\n }\n else if (this.pin && windowWidth < this.pinThreshold) {\n this.pin = false;\n this.pinChange.emit(false);\n }\n }\n };\n this.swipe = (evt) => {\n // TODO: Could also force input type: http://stackoverflow.com/a/27108052\n if (!this.enableGestures || evt.pointerType !== 'touch') {\n return;\n }\n // HammerJS swipe is horizontal-only by default, don't check deltaY\n let deltaX;\n let startPosition;\n if (this.position === 'right') {\n // when on the right use inverse of deltaX\n deltaX = -evt.deltaX;\n startPosition = this.getWindowWidth() - (evt.center.x + evt.distance);\n }\n else {\n deltaX = evt.deltaX;\n startPosition = evt.center.x - evt.distance;\n }\n // only accept closing swipe (ignoring minEdgeZone) when the drawer is expanded:\n if ((this.isOpen && deltaX < 0) ||\n // positive deltaX from the edge:\n (deltaX > 0 && startPosition < this.maxEdgeZone)) {\n this.toggle();\n }\n };\n this.panstart = (evt) => {\n if (!this.enableGestures || this.pin || evt.pointerType !== 'touch') {\n return;\n }\n const startPosition = this.position === 'right' ? this.getWindowWidth() - (evt.center.x + evt.distance)\n : evt.center.x - evt.distance;\n // cache width during animation, flag to allow further handling\n if (this.isOpen || (startPosition < this.maxEdgeZone)) {\n this._panning = true;\n this._panStartWidth = this.getExpectedWidth(!this.isOpen);\n this._panLimit = this.getExpectedWidth(this.isOpen);\n this.renderer.addClass(this.overlay, 'panning');\n this.renderer.addClass(this.drawer, 'panning');\n }\n };\n this.pan = (evt) => {\n // TODO: input.deltaX = prevDelta.x + (center.x - offset.x);\n // get actual delta (not total session one) from event?\n // pan WILL also fire after a full swipe, only resize on flag\n if (!this._panning) {\n return;\n }\n const right = this.position === 'right';\n // when on the right use inverse of deltaX\n const deltaX = right ? -evt.deltaX : evt.deltaX;\n let newX;\n let percent;\n const visibleWidth = this._panStartWidth + deltaX;\n if (this.isOpen && deltaX < 0) {\n // when visibleWidth hits limit - stop animating\n if (visibleWidth <= this._panLimit) {\n return;\n }\n if (this.hasAnimateWidth) {\n percent = (visibleWidth - this._panLimit) / (this._panStartWidth - this._panLimit);\n newX = visibleWidth;\n }\n else {\n percent = visibleWidth / this._panStartWidth;\n newX = evt.deltaX;\n }\n this.setXSize(newX, percent.toPrecision(2));\n }\n else if (!this.isOpen && deltaX > 0) {\n // when visibleWidth hits limit - stop animating\n if (visibleWidth >= this._panLimit) {\n return;\n }\n if (this.hasAnimateWidth) {\n percent = (visibleWidth - this._panStartWidth) / (this._panLimit - this._panStartWidth);\n newX = visibleWidth;\n }\n else {\n percent = visibleWidth / this._panLimit;\n newX = (this._panLimit - visibleWidth) * (right ? 1 : -1);\n }\n this.setXSize(newX, percent.toPrecision(2));\n }\n };\n this.panEnd = (evt) => {\n if (this._panning) {\n const deltaX = this.position === 'right' ? -evt.deltaX : evt.deltaX;\n const visibleWidth = this._panStartWidth + deltaX;\n this.resetPan();\n // check if pan brought the drawer to 50%\n if (this.isOpen && visibleWidth <= this._panStartWidth / 2) {\n this.close();\n }\n else if (!this.isOpen && visibleWidth >= this._panLimit / 2) {\n this.open();\n }\n this._panStartWidth = null;\n }\n };\n this.toggleOpenedEvent = () => {\n this.elementRef.nativeElement.removeEventListener('transitionend', this.toggleOpenedEvent, false);\n this.opened.emit();\n };\n this.toggleClosedEvent = () => {\n this.elementRef.nativeElement.removeEventListener('transitionend', this.toggleClosedEvent, false);\n this.closed.emit();\n };\n }\n /**\n * @hidden\n */\n ngOnInit() {\n // DOM and @Input()-s initialized\n if (this._state) {\n this._state.add(this.id, this);\n }\n if (this.isOpen) {\n this.setDrawerWidth(this.width);\n }\n }\n /**\n * @hidden\n */\n ngAfterContentInit() {\n // wait for template and ng-content to be ready\n this.updateEdgeZone();\n this.checkPinThreshold();\n this.ensureEvents();\n // TODO: apply platform-safe Ruler from http://plnkr.co/edit/81nWDyreYMzkunihfRgX?p=preview\n // (https://github.com/angular/angular/issues/6515), blocked by https://github.com/angular/angular/issues/6904\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this._touchManager.destroy();\n if (this._state) {\n this._state.remove(this.id);\n }\n if (this._resizeObserver) {\n this._resizeObserver.unsubscribe();\n }\n }\n /**\n * @hidden\n */\n ngOnChanges(changes) {\n // simple settings can come from attribute set (rather than binding), make sure boolean props are converted\n if (changes.enableGestures && changes.enableGestures.currentValue !== undefined) {\n this.enableGestures = !!(this.enableGestures && this.enableGestures.toString() === 'true');\n this.ensureEvents();\n }\n if (changes.pin && changes.pin.currentValue !== undefined) {\n this.pin = !!(this.pin && this.pin.toString() === 'true');\n if (this.pin) {\n this._touchManager.destroy();\n this._gesturesAttached = false;\n }\n else {\n this.ensureEvents();\n }\n }\n if (changes.pinThreshold) {\n if (this.pinThreshold) {\n this.ensureEvents();\n this.checkPinThreshold();\n }\n }\n if (changes.width && this.isOpen) {\n this.setDrawerWidth(changes.width.currentValue);\n }\n if (changes.isOpen) {\n this.setDrawerWidth(this.isOpen ? this.width : (this.miniTemplate ? this.miniWidth : ''));\n }\n if (changes.miniWidth) {\n if (!this.isOpen) {\n this.setDrawerWidth(changes.miniWidth.currentValue);\n }\n this.updateEdgeZone();\n }\n }\n /**\n * Toggle the open state of the Navigation Drawer.\n *\n * ```typescript\n * this.navdrawer.toggle();\n * ```\n */\n toggle() {\n if (this.isOpen) {\n this.close();\n }\n else {\n this.open();\n }\n }\n /**\n * Open the Navigation Drawer. Has no effect if already opened.\n *\n * ```typescript\n * this.navdrawer.open();\n * ```\n */\n open() {\n if (this._panning) {\n this.resetPan();\n }\n if (this.isOpen) {\n return;\n }\n this.opening.emit();\n this.isOpen = true;\n // TODO: Switch to animate API when available\n // var animationCss = this.animate.css();\n // animationCss\n // .setStyles({'width':'50px'}, {'width':'400px'})\n // .start(this.elementRef.nativeElement)\n // .onComplete(() => animationCss.setToStyles({'width':'auto'}).start(this.elementRef.nativeElement));\n this.elementRef.nativeElement.addEventListener('transitionend', this.toggleOpenedEvent, false);\n this.setDrawerWidth(this.width);\n }\n /**\n * Close the Navigation Drawer. Has no effect if already closed.\n *\n * ```typescript\n * this.navdrawer.close();\n * ```\n */\n close() {\n if (this._panning) {\n this.resetPan();\n }\n if (!this.isOpen) {\n return;\n }\n this.closing.emit();\n this.isOpen = false;\n this.setDrawerWidth(this.miniTemplate ? this.miniWidth : '');\n this.elementRef.nativeElement.addEventListener('transitionend', this.toggleClosedEvent, false);\n }\n /**\n * @hidden\n */\n set_maxEdgeZone(value) {\n this._maxEdgeZone = value;\n }\n /**\n * Get the Drawer width for specific state. Will attempt to evaluate requested state and cache.\n *\n * @hidden\n * @param [mini] - Request mini width instead\n */\n getExpectedWidth(mini) {\n if (mini) {\n if (!this.miniTemplate) {\n return 0;\n }\n if (this.miniWidth) {\n return parseFloat(this.miniWidth);\n }\n else {\n // if (!this.isOpen) { // This WON'T work due to transition timings...\n // return this.elementRef.nativeElement.children[1].offsetWidth;\n // } else {\n if (this._widthCache.miniWidth === null) {\n // force class for width calc. TODO?\n // force class for width calc. TODO?\n this.renderer.addClass(this.styleDummy, this.css.drawer);\n this.renderer.addClass(this.styleDummy, this.css.mini);\n this._widthCache.miniWidth = this.styleDummy.offsetWidth;\n this.renderer.removeClass(this.styleDummy, this.css.drawer);\n this.renderer.removeClass(this.styleDummy, this.css.mini);\n }\n return this._widthCache.miniWidth;\n }\n }\n else {\n if (this.width) {\n return parseFloat(this.width);\n }\n else {\n if (this._widthCache.width === null) {\n // force class for width calc. TODO?\n // force class for width calc. TODO?\n this.renderer.addClass(this.styleDummy, this.css.drawer);\n this._widthCache.width = this.styleDummy.offsetWidth;\n this.renderer.removeClass(this.styleDummy, this.css.drawer);\n }\n return this._widthCache.width;\n }\n }\n }\n getWindowWidth() {\n return (window.innerWidth > 0) ? window.innerWidth : screen.width;\n }\n /**\n * Sets the drawer width.\n */\n setDrawerWidth(width) {\n if (this.platformUtil.isBrowser) {\n requestAnimationFrame(() => {\n if (this.drawer) {\n this.renderer.setStyle(this.drawer, 'width', width);\n }\n });\n }\n else {\n this.renderer.setStyle(this.drawer, 'width', width);\n }\n }\n /**\n * Get current Drawer width.\n */\n getDrawerWidth() {\n return this.drawer.offsetWidth;\n }\n ensureEvents() {\n // set listeners for swipe/pan only if needed, but just once\n if (this.enableGestures && !this.pin && !this._gesturesAttached) {\n // Built-in manager handler(L20887) causes endless loop and max stack exception.\n // https://github.com/angular/angular/issues/6993\n // Use ours for now (until beta.10):\n // this.renderer.listen(document, \"swipe\", this.swipe);\n this._touchManager.addGlobalEventListener('document', 'swipe', this.swipe);\n this._gesturesAttached = true;\n // this.renderer.listen(document, \"panstart\", this.panstart);\n // this.renderer.listen(document, \"pan\", this.pan);\n this._touchManager.addGlobalEventListener('document', 'panstart', this.panstart);\n this._touchManager.addGlobalEventListener('document', 'panmove', this.pan);\n this._touchManager.addGlobalEventListener('document', 'panend', this.panEnd);\n }\n if (!this._resizeObserver && this.platformUtil.isBrowser) {\n this._resizeObserver = fromEvent(window, 'resize').pipe(debounce(() => interval(150)))\n .subscribe((value) => {\n this.checkPinThreshold(value);\n });\n }\n }\n updateEdgeZone() {\n let maxValue;\n if (this.miniTemplate) {\n maxValue = Math.max(this._maxEdgeZone, this.getExpectedWidth(true) * 1.1);\n this.set_maxEdgeZone(maxValue);\n }\n }\n resetPan() {\n this._panning = false;\n /* styles fail to apply when set on parent due to extra attributes, prob ng bug */\n /* styles fail to apply when set on parent due to extra attributes, prob ng bug */\n this.renderer.removeClass(this.overlay, 'panning');\n this.renderer.removeClass(this.drawer, 'panning');\n this.setXSize(0, '');\n }\n /**\n * Sets the absolute position or width in case the drawer doesn't change position.\n *\n * @param x the number pixels to translate on the X axis or the width to set. 0 width will clear the style instead.\n * @param opacity optional value to apply to the overlay\n */\n setXSize(x, opacity) {\n // Angular polyfills patches window.requestAnimationFrame, but switch to DomAdapter API (TODO)\n window.requestAnimationFrame(() => {\n if (this.hasAnimateWidth) {\n this.renderer.setStyle(this.drawer, 'width', x ? Math.abs(x) + 'px' : '');\n }\n else {\n this.renderer.setStyle(this.drawer, 'transform', x ? 'translate3d(' + x + 'px,0,0)' : '');\n this.renderer.setStyle(this.drawer, '-webkit-transform', x ? 'translate3d(' + x + 'px,0,0)' : '');\n }\n if (opacity !== undefined) {\n this.renderer.setStyle(this.overlay, 'opacity', opacity);\n }\n });\n }\n}\nIgxNavigationDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationDrawerComponent, deps: [{ token: ElementRef }, { token: IgxNavigationService, optional: true }, { token: i0.Renderer2 }, { token: HammerGesturesManager }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component });\nIgxNavigationDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxNavigationDrawerComponent, selector: \"igx-nav-drawer\", inputs: { id: \"id\", position: \"position\", enableGestures: \"enableGestures\", pinThreshold: \"pinThreshold\", pin: \"pin\", width: \"width\", disableAnimation: \"disableAnimation\", miniWidth: \"miniWidth\", isOpen: \"isOpen\" }, outputs: { isOpenChange: \"isOpenChange\", pinChange: \"pinChange\", opening: \"opening\", opened: \"opened\", closing: \"closing\", closed: \"closed\" }, host: { properties: { \"class.igx-nav-drawer\": \"this.cssClass\", \"attr.id\": \"this.id\", \"class.igx-nav-drawer--disable-animation\": \"this.disableAnimation\", \"style.flexBasis\": \"this.flexWidth\", \"style.order\": \"this.isPinnedRight\" } }, providers: [HammerGesturesManager], queries: [{ propertyName: \"contentTemplate\", first: true, predicate: IgxNavDrawerTemplateDirective, descendants: true, read: IgxNavDrawerTemplateDirective }, { propertyName: \"miniTemplate\", first: true, predicate: IgxNavDrawerMiniTemplateDirective, descendants: true, read: IgxNavDrawerMiniTemplateDirective }], viewQueries: [{ propertyName: \"_drawer\", first: true, predicate: [\"aside\"], descendants: true, static: true }, { propertyName: \"_overlay\", first: true, predicate: [\"overlay\"], descendants: true, static: true }, { propertyName: \"_styleDummy\", first: true, predicate: [\"dummy\"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: \"\\n
    Navigation Drawer
    \\n
    Start by adding
    \\n
    <ng-template igxDrawer>
    \\n
    And some items inside
    \\n
    Style with igxDrawerItem
    \\n
    and igxRipple directives
    \\n
    \\n\\n
    \\n
    \\n\\n
    \\n\", styles: [\":host{display:block;height:100%}\\n\"], dependencies: [{ kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxNavDrawerItemDirective, selector: \"[igxDrawerItem]\", inputs: [\"active\", \"isHeader\"], exportAs: [\"igxDrawerItem\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationDrawerComponent, decorators: [{\n type: Component,\n args: [{ providers: [HammerGesturesManager], selector: 'igx-nav-drawer', template: \"\\n
    Navigation Drawer
    \\n
    Start by adding
    \\n
    <ng-template igxDrawer>
    \\n
    And some items inside
    \\n
    Style with igxDrawerItem
    \\n
    and igxRipple directives
    \\n
    \\n\\n
    \\n
    \\n\\n
    \\n\", styles: [\":host{display:block;height:100%}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{\n type: Inject,\n args: [ElementRef]\n }] }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }, { type: i0.Renderer2 }, { type: HammerGesturesManager }, { type: PlatformUtil }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-nav-drawer']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], position: [{\n type: Input\n }], enableGestures: [{\n type: Input\n }], isOpenChange: [{\n type: Output\n }], pinThreshold: [{\n type: Input\n }], pin: [{\n type: Input\n }], width: [{\n type: Input\n }], disableAnimation: [{\n type: HostBinding,\n args: ['class.igx-nav-drawer--disable-animation']\n }, {\n type: Input\n }], miniWidth: [{\n type: Input\n }], pinChange: [{\n type: Output\n }], opening: [{\n type: Output\n }], opened: [{\n type: Output\n }], closing: [{\n type: Output\n }], closed: [{\n type: Output\n }], contentTemplate: [{\n type: ContentChild,\n args: [IgxNavDrawerTemplateDirective, { read: IgxNavDrawerTemplateDirective }]\n }], _drawer: [{\n type: ViewChild,\n args: ['aside', { static: true }]\n }], _overlay: [{\n type: ViewChild,\n args: ['overlay', { static: true }]\n }], _styleDummy: [{\n type: ViewChild,\n args: ['dummy', { static: true }]\n }], isOpen: [{\n type: Input\n }], miniTemplate: [{\n type: ContentChild,\n args: [IgxNavDrawerMiniTemplateDirective, { read: IgxNavDrawerMiniTemplateDirective }]\n }], flexWidth: [{\n type: HostBinding,\n args: ['style.flexBasis']\n }], isPinnedRight: [{\n type: HostBinding,\n args: ['style.order']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxNavigationDrawerModule {\n}\nIgxNavigationDrawerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxNavigationDrawerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationDrawerModule, declarations: [IgxNavigationDrawerComponent,\n IgxNavDrawerItemDirective,\n IgxNavDrawerMiniTemplateDirective,\n IgxNavDrawerTemplateDirective], imports: [CommonModule], exports: [IgxNavigationDrawerComponent,\n IgxNavDrawerItemDirective,\n IgxNavDrawerMiniTemplateDirective,\n IgxNavDrawerTemplateDirective] });\nIgxNavigationDrawerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationDrawerModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxNavigationDrawerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxNavigationDrawerComponent,\n IgxNavDrawerItemDirective,\n IgxNavDrawerMiniTemplateDirective,\n IgxNavDrawerTemplateDirective\n ],\n exports: [\n IgxNavigationDrawerComponent,\n IgxNavDrawerItemDirective,\n IgxNavDrawerMiniTemplateDirective,\n IgxNavDrawerTemplateDirective\n ],\n imports: [CommonModule]\n }]\n }] });\n\n/**\n * Template directive that allows you to set a custom template representing the lower label value of the {@link IgxSliderComponent}\n *\n * ```html\n * \n * {{value}}\n * \n * ```\n *\n * @context {@link IgxSliderComponent.context}\n */\nclass IgxThumbFromTemplateDirective {\n}\nIgxThumbFromTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxThumbFromTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxThumbFromTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxThumbFromTemplateDirective, selector: \"[igxSliderThumbFrom]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxThumbFromTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSliderThumbFrom]'\n }]\n }] });\n/**\n * Template directive that allows you to set a custom template representing the upper label value of the {@link IgxSliderComponent}\n *\n * ```html\n * \n * {{value}}\n * \n * ```\n *\n * @context {@link IgxSliderComponent.context}\n */\nclass IgxThumbToTemplateDirective {\n}\nIgxThumbToTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxThumbToTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxThumbToTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxThumbToTemplateDirective, selector: \"[igxSliderThumbTo]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxThumbToTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSliderThumbTo]'\n }]\n }] });\n/**\n * Template directive that allows you to set a custom template, represeting primary/secondary tick labels of the {@link IgxSliderComponent}\n *\n * @context {@link IgxTicksComponent.context}\n */\nclass IgxTickLabelTemplateDirective {\n}\nIgxTickLabelTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTickLabelTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxTickLabelTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTickLabelTemplateDirective, selector: \"[igxSliderTickLabel]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTickLabelTemplateDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxSliderTickLabel]'\n }]\n }] });\nconst IgxSliderType = mkenum({\n /**\n * Slider with single thumb.\n */\n SLIDER: 'slider',\n /**\n * Range slider with multiple thumbs, that can mark the range.\n */\n RANGE: 'range'\n});\nconst SliderHandle = mkenum({\n FROM: 'from',\n TO: 'to'\n});\n/**\n * Slider Tick labels Orientation\n */\nconst TickLabelsOrientation = mkenum({\n Horizontal: 'horizontal',\n TopToBottom: 'toptobottom',\n BottomToTop: 'bottomtotop'\n});\n/**\n * Slider Ticks orientation\n */\nconst TicksOrientation = mkenum({\n Top: 'top',\n Bottom: 'bottom',\n Mirror: 'mirror'\n});\n\n/**\n * @hidden\n */\nclass IgxThumbLabelComponent {\n get thumbFromClass() {\n return this.type === SliderHandle.FROM;\n }\n get thumbToClass() {\n return this.type === SliderHandle.TO;\n }\n get thumbFromActiveClass() {\n return this.type === SliderHandle.FROM && this.active;\n }\n get thumbToActiveClass() {\n return this.type === SliderHandle.TO && this.active;\n }\n get labelFromPressedClass() {\n return this.thumb?.thumbFromPressedClass;\n }\n get labelToPressedClass() {\n return this.thumb?.thumbToPressedClass;\n }\n get getLabelClass() {\n return {\n 'igx-slider-thumb-label-from__container': this.type === SliderHandle.FROM,\n 'igx-slider-thumb-label-to__container': this.type === SliderHandle.TO\n };\n }\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n get nativeElement() {\n return this._elementRef.nativeElement;\n }\n get active() {\n return this._active;\n }\n set active(val) {\n if (this.continuous || this.deactiveState) {\n this._active = false;\n }\n else {\n this._active = val;\n }\n }\n}\nIgxThumbLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxThumbLabelComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxThumbLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxThumbLabelComponent, selector: \"igx-thumb-label\", inputs: { value: \"value\", templateRef: \"templateRef\", context: \"context\", type: \"type\", continuous: \"continuous\", deactiveState: \"deactiveState\", thumb: \"thumb\" }, host: { properties: { \"class.igx-slider-thumb-label-from\": \"this.thumbFromClass\", \"class.igx-slider-thumb-label-to\": \"this.thumbToClass\", \"class.igx-slider-thumb-label-from--active\": \"this.thumbFromActiveClass\", \"class.igx-slider-thumb-label-to--active\": \"this.thumbToActiveClass\", \"class.igx-slider-thumb-label-from--pressed\": \"this.labelFromPressedClass\", \"class.igx-slider-thumb-label-to--pressed\": \"this.labelToPressedClass\" } }, ngImport: i0, template: \"
    \\n \\n
    \\n\\n\\n {{ value }}\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxThumbLabelComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-thumb-label', template: \"
    \\n \\n
    \\n\\n\\n {{ value }}\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { value: [{\n type: Input\n }], templateRef: [{\n type: Input\n }], context: [{\n type: Input\n }], type: [{\n type: Input\n }], continuous: [{\n type: Input\n }], deactiveState: [{\n type: Input\n }], thumb: [{\n type: Input\n }], thumbFromClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-label-from']\n }], thumbToClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-label-to']\n }], thumbFromActiveClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-label-from--active']\n }], thumbToActiveClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-label-to--active']\n }], labelFromPressedClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-label-from--pressed']\n }], labelToPressedClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-label-to--pressed']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxSliderThumbComponent {\n get thumbFromClass() {\n return this.type === SliderHandle.FROM;\n }\n get thumbToClass() {\n return this.type === SliderHandle.TO;\n }\n get thumbFromActiveClass() {\n return this.type === SliderHandle.FROM && this._isActive;\n }\n get thumbToActiveClass() {\n return this.type === SliderHandle.TO && this._isActive;\n }\n get thumbFromDisabledClass() {\n return this.type === SliderHandle.FROM && this.disabled;\n }\n get thumbToDisabledClass() {\n return this.type === SliderHandle.TO && this.disabled;\n }\n get thumbFromPressedClass() {\n return this.type === SliderHandle.FROM && this.isActive && this._isPressed;\n }\n get thumbToPressedClass() {\n return this.type === SliderHandle.TO && this.isActive && this._isPressed;\n }\n get getDotClass() {\n return {\n 'igx-slider-thumb-from__dot': this.type === SliderHandle.FROM,\n 'igx-slider-thumb-to__dot': this.type === SliderHandle.TO\n };\n }\n get nativeElement() {\n return this._elementRef.nativeElement;\n }\n get destroy() {\n return this._destroy$;\n }\n get thumbPositionX() {\n const thumbBounderies = this.nativeElement.getBoundingClientRect();\n const thumbCenter = (thumbBounderies.right - thumbBounderies.left) / 2;\n return thumbBounderies.left + thumbCenter;\n }\n constructor(_elementRef, _dir) {\n this._elementRef = _elementRef;\n this._dir = _dir;\n this.thumbValueChange = new EventEmitter();\n this.thumbChange = new EventEmitter();\n this.hoverChange = new EventEmitter();\n this.tabindex = 0;\n this.zIndex = 0;\n this.focused = false;\n this.isActive = false;\n this._isActive = false;\n this._isPressed = false;\n this._destroy$ = new Subject();\n }\n onPointerEnter() {\n this.focused = false;\n this.hoverChange.emit(true);\n }\n onPointerLeave() {\n this.hoverChange.emit(false);\n }\n onKeyUp(event) {\n event.stopPropagation();\n this.focused = true;\n }\n onKeyDown(event) {\n if (this.disabled) {\n return;\n }\n let increment = 0;\n const stepWithDir = (rtl) => rtl ? this.step * -1 : this.step;\n if (event.key.endsWith('Left')) {\n increment = stepWithDir(!this._dir.rtl);\n }\n else if (event.key.endsWith('Right')) {\n increment = stepWithDir(this._dir.rtl);\n }\n else {\n return;\n }\n this.thumbChange.emit();\n this.thumbValueChange.emit(increment);\n }\n onBlur() {\n this.isActive = false;\n this.zIndex = 0;\n this.focused = false;\n }\n onFocusListener() {\n this.isActive = true;\n this.zIndex = 1;\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this.onPan\n .pipe(takeUntil(this._destroy$))\n .subscribe(mouseX => this.updateThumbValue(mouseX));\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this._destroy$.next(true);\n this._destroy$.complete();\n }\n /**\n * Show thumb label and ripple.\n */\n showThumbIndicators() {\n this.toggleThumbIndicators(true);\n }\n /**\n * Hide thumb label and ripple.\n */\n hideThumbIndicators() {\n this.toggleThumbIndicators(false);\n }\n updateThumbValue(mouseX) {\n const updateValue = this.calculateTrackUpdate(mouseX);\n if (this.isActive && updateValue !== 0) {\n this.thumbValueChange.emit(updateValue);\n }\n }\n calculateTrackUpdate(mouseX) {\n const scaleX = this._dir.rtl ? this.thumbPositionX - mouseX : mouseX - this.thumbPositionX;\n const stepDistanceCenter = this.stepDistance / 2;\n // If the thumb scale range (slider update) is less thàn a half step,\n // the position stays the same.\n const scaleXPositive = Math.abs(scaleX);\n if (scaleXPositive < stepDistanceCenter) {\n return 0;\n }\n return this.stepToProceed(scaleX, this.stepDistance);\n }\n stepToProceed(scaleX, stepDist) {\n return Math.round(scaleX / stepDist) * this.step;\n }\n toggleThumbIndicators(visible) {\n this._isPressed = visible;\n if (this.continuous || this.deactiveState) {\n this._isActive = false;\n }\n else {\n this._isActive = visible;\n }\n }\n}\nIgxSliderThumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderThumbComponent, deps: [{ token: i0.ElementRef }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Component });\nIgxSliderThumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSliderThumbComponent, selector: \"igx-thumb\", inputs: { value: \"value\", continuous: \"continuous\", thumbLabelVisibilityDuration: \"thumbLabelVisibilityDuration\", disabled: \"disabled\", onPan: \"onPan\", stepDistance: \"stepDistance\", step: \"step\", templateRef: \"templateRef\", context: \"context\", type: \"type\", deactiveState: \"deactiveState\" }, outputs: { thumbValueChange: \"thumbValueChange\", thumbChange: \"thumbChange\", hoverChange: \"hoverChange\" }, host: { listeners: { \"pointerenter\": \"onPointerEnter()\", \"pointerleave\": \"onPointerLeave()\", \"keyup\": \"onKeyUp($event)\", \"keydown\": \"onKeyDown($event)\", \"blur\": \"onBlur()\", \"focus\": \"onFocusListener()\" }, properties: { \"attr.tabindex\": \"this.tabindex\", \"attr.z-index\": \"this.zIndex\", \"class.igx-slider-thumb-to--focused\": \"this.focused\", \"class.igx-slider-thumb-from\": \"this.thumbFromClass\", \"class.igx-slider-thumb-to\": \"this.thumbToClass\", \"class.igx-slider-thumb-from--active\": \"this.thumbFromActiveClass\", \"class.igx-slider-thumb-to--active\": \"this.thumbToActiveClass\", \"class.igx-slider-thumb-from--disabled\": \"this.thumbFromDisabledClass\", \"class.igx-slider-thumb-to--disabled\": \"this.thumbToDisabledClass\", \"class.igx-slider-thumb-from--pressed\": \"this.thumbFromPressedClass\", \"class.igx-slider-thumb-to--pressed\": \"this.thumbToPressedClass\" } }, ngImport: i0, template: \"
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderThumbComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-thumb', template: \"
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IgxDirectionality }]; }, propDecorators: { value: [{\n type: Input\n }], continuous: [{\n type: Input\n }], thumbLabelVisibilityDuration: [{\n type: Input\n }], disabled: [{\n type: Input\n }], onPan: [{\n type: Input\n }], stepDistance: [{\n type: Input\n }], step: [{\n type: Input\n }], templateRef: [{\n type: Input\n }], context: [{\n type: Input\n }], type: [{\n type: Input\n }], deactiveState: [{\n type: Input\n }], thumbValueChange: [{\n type: Output\n }], thumbChange: [{\n type: Output\n }], hoverChange: [{\n type: Output\n }], tabindex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], zIndex: [{\n type: HostBinding,\n args: ['attr.z-index']\n }], focused: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-to--focused']\n }], thumbFromClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-from']\n }], thumbToClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-to']\n }], thumbFromActiveClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-from--active']\n }], thumbToActiveClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-to--active']\n }], thumbFromDisabledClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-from--disabled']\n }], thumbToDisabledClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-to--disabled']\n }], thumbFromPressedClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-from--pressed']\n }], thumbToPressedClass: [{\n type: HostBinding,\n args: ['class.igx-slider-thumb-to--pressed']\n }], onPointerEnter: [{\n type: HostListener,\n args: ['pointerenter']\n }], onPointerLeave: [{\n type: HostListener,\n args: ['pointerleave']\n }], onKeyUp: [{\n type: HostListener,\n args: ['keyup', ['$event']]\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }], onFocusListener: [{\n type: HostListener,\n args: ['focus']\n }] } });\n\n/**\n * @hidden\n */\nclass IgxTickLabelsPipe {\n transform(labels, secondaryTicks) {\n if (!labels) {\n return;\n }\n const result = [];\n labels.forEach(item => {\n result.push(item);\n for (let i = 0; i < secondaryTicks; i++) {\n result.push('');\n }\n });\n return result;\n }\n}\nIgxTickLabelsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTickLabelsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nIgxTickLabelsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTickLabelsPipe, name: \"spreadTickLabels\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTickLabelsPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'spreadTickLabels'\n }]\n }] });\n\n/**\n * @hidden\n */\nclass IgxTicksComponent {\n constructor() {\n /**\n * @hidden\n */\n this.ticksClass = true;\n }\n /**\n * @hidden\n */\n get ticksTopClass() {\n return this.ticksOrientation === TicksOrientation.Top;\n }\n /**\n * @hidden\n */\n get hasPrimaryClass() {\n return this.primaryTicks > 0;\n }\n /**\n * @hidden\n */\n get labelsTopToBottomClass() {\n return this.tickLabelsOrientation === TickLabelsOrientation.TopToBottom;\n }\n /**\n * @hidden\n */\n get labelsBottomToTopClass() {\n return this.tickLabelsOrientation === TickLabelsOrientation.BottomToTop;\n }\n /**\n * Returns the template context corresponding to\n * {@link IgxTickLabelTemplateDirective}\n *\n * ```typescript\n * return {\n * $implicit //returns the value per each tick label.\n * isPrimery //returns if the tick is primary.\n * labels // returns the {@link labels} collection.\n * index // returns the index per each tick of the whole sequence.\n * }\n * ```\n *\n * @param idx the index per each tick label.\n */\n context(idx) {\n return {\n $implicit: this.tickLabel(idx),\n isPrimary: this.isPrimary(idx),\n labels: this.labels,\n index: idx\n };\n }\n /**\n * @hidden\n */\n get ticksLength() {\n return this.primaryTicks > 0 ?\n ((this.primaryTicks - 1) * this.secondaryTicks) + this.primaryTicks :\n this.secondaryTicks > 0 ? this.secondaryTicks : 0;\n }\n hiddenTickLabels(idx) {\n return this.isPrimary(idx) ? this.primaryTickLabels : this.secondaryTickLabels;\n }\n /**\n * @hidden\n */\n isPrimary(idx) {\n return this.primaryTicks <= 0 ? false :\n idx % (this.secondaryTicks + 1) === 0;\n }\n /**\n * @hidden\n */\n tickLabel(idx) {\n if (this.labelsViewEnabled) {\n return this.labels[idx];\n }\n const labelStep = (Math.max(this.minValue, this.maxValue) - Math.min(this.minValue, this.maxValue)) / (this.ticksLength - 1);\n const labelVal = labelStep * idx;\n return (this.minValue + labelVal).toFixed(2);\n }\n}\nIgxTicksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTicksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxTicksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTicksComponent, selector: \"igx-ticks\", inputs: { primaryTicks: \"primaryTicks\", secondaryTicks: \"secondaryTicks\", primaryTickLabels: \"primaryTickLabels\", secondaryTickLabels: \"secondaryTickLabels\", ticksOrientation: \"ticksOrientation\", tickLabelsOrientation: \"tickLabelsOrientation\", maxValue: \"maxValue\", minValue: \"minValue\", labelsViewEnabled: \"labelsViewEnabled\", labels: \"labels\", tickLabelTemplateRef: \"tickLabelTemplateRef\" }, host: { properties: { \"class.igx-slider__ticks\": \"this.ticksClass\", \"class.igx-slider__ticks--top\": \"this.ticksTopClass\", \"class.igx-slider__ticks--tall\": \"this.hasPrimaryClass\", \"class.igx-slider__tick-labels--top-bottom\": \"this.labelsTopToBottomClass\", \"class.igx-slider__tick-labels--bottom-top\": \"this.labelsBottomToTopClass\" } }, ngImport: i0, template: \"
    \\n
    \\n \\n \\n \\n
    \\n
    \\n\\n\\n {{ value }}\\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTicksComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-ticks', template: \"
    \\n
    \\n \\n \\n \\n
    \\n
    \\n\\n\\n {{ value }}\\n\\n\" }]\n }], propDecorators: { primaryTicks: [{\n type: Input\n }], secondaryTicks: [{\n type: Input\n }], primaryTickLabels: [{\n type: Input\n }], secondaryTickLabels: [{\n type: Input\n }], ticksOrientation: [{\n type: Input\n }], tickLabelsOrientation: [{\n type: Input\n }], maxValue: [{\n type: Input\n }], minValue: [{\n type: Input\n }], labelsViewEnabled: [{\n type: Input\n }], labels: [{\n type: Input\n }], tickLabelTemplateRef: [{\n type: Input\n }], ticksClass: [{\n type: HostBinding,\n args: ['class.igx-slider__ticks']\n }], ticksTopClass: [{\n type: HostBinding,\n args: ['class.igx-slider__ticks--top']\n }], hasPrimaryClass: [{\n type: HostBinding,\n args: ['class.igx-slider__ticks--tall']\n }], labelsTopToBottomClass: [{\n type: HostBinding,\n args: ['class.igx-slider__tick-labels--top-bottom']\n }], labelsBottomToTopClass: [{\n type: HostBinding,\n args: ['class.igx-slider__tick-labels--bottom-top']\n }] } });\n\nlet NEXT_ID$2 = 0;\n/**\n * **Ignite UI for Angular Slider** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/slider/slider)\n *\n * The Ignite UI Slider allows selection in a given range by moving the thumb along the track. The track\n * can be defined as continuous or stepped, and you can choose between single and range slider types.\n *\n * Example:\n * ```html\n * \n * \n * ```\n */\nclass IgxSliderComponent {\n /**\n * @hidden\n */\n get thumbFrom() {\n return this.thumbs.find(thumb => thumb.type === SliderHandle.FROM);\n }\n /**\n * @hidden\n */\n get thumbTo() {\n return this.thumbs.find(thumb => thumb.type === SliderHandle.TO);\n }\n get labelFrom() {\n return this.labelRefs.find(label => label.type === SliderHandle.FROM);\n }\n get labelTo() {\n return this.labelRefs.find(label => label.type === SliderHandle.TO);\n }\n /**\n * @hidden\n */\n get valuemin() {\n return this.minValue;\n }\n /**\n * @hidden\n */\n get valuemax() {\n return this.maxValue;\n }\n /**\n * @hidden\n */\n get readonly() {\n return this.disabled;\n }\n /**\n * @hidden\n */\n get disabledClass() {\n return this.disabled;\n }\n /**\n * An @Input property that gets the type of the `IgxSliderComponent`.\n * The slider can be IgxSliderType.SLIDER(default) or IgxSliderType.RANGE.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let type = this.slider.type;\n * }\n */\n get type() {\n return this._type;\n }\n /**\n * An @Input property that sets the type of the `IgxSliderComponent`.\n * The slider can be IgxSliderType.SLIDER(default) or IgxSliderType.RANGE.\n * ```typescript\n * sliderType: IgxSliderType = IgxSliderType.RANGE;\n * ```\n * ```html\n * \n * ```\n */\n set type(type) {\n this._type = type;\n if (type === IgxSliderType.SLIDER) {\n this.lowerValue = 0;\n }\n if (this._hasViewInit) {\n this.updateTrack();\n }\n }\n /**\n * Enables `labelView`, by accepting a collection of primitive values with more than one element.\n * Each element will be equally spread over the slider and it will serve as a thumb label.\n * Once the property is set, it will precendence over {@link maxValue}, {@link minValue}, {@link step}.\n * This means that the manipulation for those properties won't be allowed.\n */\n get labels() {\n return this._labels;\n }\n set labels(labels) {\n this._labels = labels;\n this._pMax = this.valueToFraction(this.upperBound, 0, 1);\n this._pMin = this.valueToFraction(this.lowerBound, 0, 1);\n this.positionHandlersAndUpdateTrack();\n if (this._hasViewInit) {\n this.stepDistance = this.calculateStepDistance();\n this.setTickInterval();\n }\n }\n /**\n * Returns the template context corresponding\n * to {@link IgxThumbFromTemplateDirective} and {@link IgxThumbToTemplateDirective} templates.\n *\n * ```typescript\n * return {\n * $implicit // returns the value of the label,\n * labels // returns the labels collection the user has passed.\n * }\n * ```\n */\n get context() {\n return {\n $implicit: this.value,\n labels: this.labels\n };\n }\n /**\n * An @Input property that sets the incremental/decremental step of the value when dragging the thumb.\n * The default step is 1, and step should not be less or equal than 0.\n * ```html\n * \n * ```\n */\n set step(step) {\n this._step = step;\n if (this._hasViewInit) {\n this.stepDistance = this.calculateStepDistance();\n this.normalizeByStep(this._value);\n this.setValue(this._value, true);\n this.positionHandlersAndUpdateTrack();\n this.setTickInterval();\n }\n }\n /**\n * Returns the incremental/decremental dragging step of the {@link IgxSliderComponent}.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let step = this.slider.step;\n * }\n * ```\n */\n get step() {\n return this.labelsViewEnabled ? 1 : this._step;\n }\n /**\n * Returns if the {@link IgxSliderComponent} is disabled.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let isDisabled = this.slider.disabled;\n * }\n * ```\n */\n get disabled() {\n return this._disabled;\n }\n /**\n * An @Input property that disables or enables UI interaction.\n * ```html\n * \n * ```\n */\n set disabled(disable) {\n this._disabled = disable;\n if (this._hasViewInit) {\n this.changeThumbFocusableState(disable);\n }\n }\n /**\n * Returns if the {@link IgxSliderComponent} is set as continuous.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let continuous = this.slider.continuous;\n * }\n * ```\n */\n get continuous() {\n return this._continuous;\n }\n /**\n * An @Input property that marks the {@link IgxSliderComponent} as continuous.\n * By default is considered that the {@link IgxSliderComponent} is discrete.\n * Discrete {@link IgxSliderComponent} slider has step indicators over the track and visible thumb labels during interaction.\n * Continuous {@link IgxSliderComponent} does not have ticks and does not show bubble labels for values.\n * ```html\n * \n * ```\n */\n set continuous(continuous) {\n this._continuous = continuous;\n if (this._hasViewInit) {\n this.setTickInterval();\n }\n }\n /**\n * Returns the minimal displayed track value of the `IgxSliderComponent`.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let sliderMin = this.slider.minValue;\n * }\n * ```\n */\n get minValue() {\n if (this.labelsViewEnabled) {\n return 0;\n }\n return this._minValue;\n }\n /**\n * Sets the minimal displayed track value for the `IgxSliderComponent`.\n * The default minimal value is 0.\n * ```html\n * \n * ```\n */\n set minValue(value) {\n if (value >= this.maxValue) {\n return;\n }\n else {\n this._minValue = value;\n }\n if (value > this._upperBound) {\n this.updateUpperBoundAndMaxTravelZone();\n this.lowerBound = value;\n }\n // Refresh min travel zone limit.\n this._pMin = 0;\n // Recalculate step distance.\n this.positionHandlersAndUpdateTrack();\n if (this._hasViewInit) {\n this.stepDistance = this.calculateStepDistance();\n this.setTickInterval();\n }\n }\n /**\n * Returns the maximum displayed track value for the {@link IgxSliderComponent}.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let sliderMax = this.slider.maxValue;\n * }\n * ```\n */\n get maxValue() {\n return this.labelsViewEnabled ?\n this.labels.length - 1 :\n this._maxValue;\n }\n /**\n * Sets the maximal displayed track value for the `IgxSliderComponent`.\n * The default maximum value is 100.\n * ```html\n * \n * ```\n */\n set maxValue(value) {\n if (value <= this._minValue) {\n return;\n }\n else {\n this._maxValue = value;\n }\n if (value < this._lowerBound) {\n this.updateLowerBoundAndMinTravelZone();\n this.upperBound = value;\n }\n // refresh max travel zone limits.\n this._pMax = 1;\n // recalculate step distance.\n this.positionHandlersAndUpdateTrack();\n if (this._hasViewInit) {\n this.stepDistance = this.calculateStepDistance();\n this.setTickInterval();\n }\n }\n /**\n * Returns the lower boundary of settable values of the `IgxSliderComponent`.\n * If not set, will return `minValue`.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let sliderLowBound = this.slider.lowerBound;\n * }\n * ```\n */\n get lowerBound() {\n if (!Number.isNaN(this._lowerBound) && this._lowerBound !== undefined) {\n return this.valueInRange(this._lowerBound, this.minValue, this.maxValue);\n }\n return this.minValue;\n }\n /**\n * Sets the lower boundary of settable values of the `IgxSliderComponent`.\n * If not set is the same as min value.\n * ```html\n * \n * ```\n */\n set lowerBound(value) {\n if (value >= this.upperBound || (this.labelsViewEnabled && value < 0)) {\n return;\n }\n this._lowerBound = this.valueInRange(value, this.minValue, this.maxValue);\n // Refresh min travel zone.\n this._pMin = this.valueToFraction(this._lowerBound, 0, 1);\n this.positionHandlersAndUpdateTrack();\n }\n /**\n * Returns the upper boundary of settable values of the `IgxSliderComponent`.\n * If not set, will return `maxValue`\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let sliderUpBound = this.slider.upperBound;\n * }\n * ```\n */\n get upperBound() {\n if (!Number.isNaN(this._upperBound) && this._upperBound !== undefined) {\n return this.valueInRange(this._upperBound, this.minValue, this.maxValue);\n }\n return this.maxValue;\n }\n /**\n * Sets the upper boundary of the `IgxSliderComponent`.\n * If not set is the same as max value.\n * ```html\n * \n * ```\n */\n set upperBound(value) {\n if (value <= this.lowerBound || (this.labelsViewEnabled && value > this.labels.length - 1)) {\n return;\n }\n this._upperBound = this.valueInRange(value, this.minValue, this.maxValue);\n // Refresh time travel zone.\n this._pMax = this.valueToFraction(this._upperBound, 0, 1);\n this.positionHandlersAndUpdateTrack();\n }\n /**\n * Returns the slider value. If the slider is of type {@link IgxSliderType.SLIDER} the returned value is number.\n * If the slider type is {@link IgxSliderType.RANGE}.\n * The returned value represents an object of {@link lowerValue} and {@link upperValue}.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * public sliderValue(event){\n * let sliderVal = this.slider.value;\n * }\n * ```\n */\n get value() {\n if (this.isRange) {\n return {\n lower: this.valueInRange(this.lowerValue, this.lowerBound, this.upperBound),\n upper: this.valueInRange(this.upperValue, this.lowerBound, this.upperBound)\n };\n }\n else {\n return this.valueInRange(this.upperValue, this.lowerBound, this.upperBound);\n }\n }\n /**\n * Sets the slider value.\n * If the slider is of type {@link IgxSliderType.SLIDER}.\n * The argument is number. By default the {@link value} gets the {@link lowerBound}.\n * If the slider type is {@link IgxSliderType.RANGE} the argument\n * represents an object of {@link lowerValue} and {@link upperValue} properties.\n * By default the object is associated with the {@link lowerBound} and {@link upperBound} property values.\n * ```typescript\n * rangeValue = {\n * lower: 30,\n * upper: 60\n * };\n * ```\n * ```html\n * \n * ```\n */\n set value(value) {\n this.normalizeByStep(value);\n if (this._hasViewInit) {\n this.setValue(this._value, true);\n this.positionHandlersAndUpdateTrack();\n }\n }\n /**\n * Returns the number of the presented primary ticks.\n * ```typescript\n * const primaryTicks = this.slider.primaryTicks;\n * ```\n */\n get primaryTicks() {\n if (this.labelsViewEnabled) {\n return this._primaryTicks = this.labels.length;\n }\n return this._primaryTicks;\n }\n /**\n * Sets the number of primary ticks. If {@link @labels} is enabled, this property won't function.\n * Insted enable ticks by {@link showTicks} property.\n * ```typescript\n * this.slider.primaryTicks = 5;\n * ```\n */\n set primaryTicks(val) {\n if (val <= 1) {\n return;\n }\n this._primaryTicks = val;\n }\n /**\n * Returns the number of the presented secondary ticks.\n * ```typescript\n * const secondaryTicks = this.slider.secondaryTicks;\n * ```\n */\n get secondaryTicks() {\n return this._secondaryTicks;\n }\n /**\n * Sets the number of secondary ticks. The property functions even when {@link labels} is enabled,\n * but all secondary ticks won't present any tick labels.\n * ```typescript\n * this.slider.secondaryTicks = 5;\n * ```\n */\n set secondaryTicks(val) {\n if (val < 1) {\n return;\n }\n this._secondaryTicks = val;\n }\n /**\n * @hidden\n */\n get deactivateThumbLabel() {\n return ((this.primaryTicks && this.primaryTickLabels) || (this.secondaryTicks && this.secondaryTickLabels)) &&\n (this.ticksOrientation === TicksOrientation.Top || this.ticksOrientation === TicksOrientation.Mirror);\n }\n constructor(renderer, _el, _cdr, _ngZone, _dir) {\n this.renderer = renderer;\n this._el = _el;\n this._cdr = _cdr;\n this._ngZone = _ngZone;\n this._dir = _dir;\n /**\n * @hidden\n */\n this.role = 'slider';\n /**\n * @hidden\n */\n this.slierClass = true;\n /**\n * An @Input property that sets the value of the `id` attribute.\n * If not provided it will be automatically generated.\n * ```html\n * \n * ```\n */\n this.id = `igx-slider-${NEXT_ID$2++}`;\n /**\n * An @Input property that sets the duration visibility of thumbs labels. The default value is 750 milliseconds.\n * ```html\n * \n * ```\n */\n this.thumbLabelVisibilityDuration = 750;\n /**\n * Show/hide slider ticks\n * ```html\n * \n * ```\n */\n this.showTicks = false;\n /**\n * show/hide primary tick labels\n * ```html\n * \n * ```\n */\n this.primaryTickLabels = true;\n /**\n * show/hide secondary tick labels\n * ```html\n * \n * ```\n */\n this.secondaryTickLabels = true;\n /**\n * Changes ticks orientation:\n * bottom - The default orienation, below the slider track.\n * top - Above the slider track\n * mirror - combines top and bottom orientation.\n * ```html\n * \n * ```\n */\n this.ticksOrientation = TicksOrientation.Bottom;\n /**\n * Changes tick labels rotation:\n * horizontal - The default rotation\n * toptobottom - Rotates tick labels vertically to 90deg\n * bottomtotop - Rotate tick labels vertically to -90deg\n * ```html\n * \n * ```\n */\n this.tickLabelsOrientation = TickLabelsOrientation.Horizontal;\n /**\n * This event is emitted every time the value is changed.\n * ```typescript\n * public change(event){\n * alert(\"The value has been changed!\");\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.valueChange = new EventEmitter();\n /**\n * This event is emitted every time the lower value of a range slider is changed.\n * ```typescript\n * public change(value){\n * alert(`The lower value has been changed to ${value}`);\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.lowerValueChange = new EventEmitter();\n /**\n * This event is emitted every time the upper value of a range slider is changed.\n * ```typescript\n * public change(value){\n * alert(`The upper value has been changed to ${value}`);\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.upperValueChange = new EventEmitter();\n /**\n * This event is emitted at the end of every slide interaction.\n * ```typescript\n * public change(event){\n * alert(\"The value has been changed!\");\n * }\n * ```\n * ```html\n * \n * ```\n */\n this.dragFinished = new EventEmitter();\n /**\n * @hidden\n */\n this.thumbs = new QueryList();\n /**\n * @hidden\n */\n this.labelRefs = new QueryList();\n /**\n * @hidden\n */\n this.onPan = new Subject();\n // Limit handle travel zone\n this._pMin = 0;\n this._pMax = 1;\n // From/upperValue in percent values\n this._hasViewInit = false;\n this._minValue = 0;\n this._maxValue = 100;\n this._continuous = false;\n this._disabled = false;\n this._step = 1;\n this._value = 0;\n // ticks\n this._primaryTicks = 0;\n this._secondaryTicks = 0;\n this._labels = new Array();\n this._type = IgxSliderType.SLIDER;\n this._destroyer$ = new Subject();\n this._indicatorsDestroyer$ = new Subject();\n this._onChangeCallback = noop;\n this._onTouchedCallback = noop;\n this.stepDistance = this._step;\n }\n /**\n * @hidden\n */\n onPointerDown($event) {\n this.findClosestThumb($event);\n if (!this.thumbTo.isActive && this.thumbFrom === undefined) {\n return;\n }\n const activeThumb = this.thumbTo.isActive ? this.thumbTo : this.thumbFrom;\n activeThumb.nativeElement.setPointerCapture($event.pointerId);\n this.showSliderIndicators();\n $event.preventDefault();\n }\n /**\n * @hidden\n */\n onPointerUp($event) {\n if (!this.thumbTo.isActive && this.thumbFrom === undefined) {\n return;\n }\n const activeThumb = this.thumbTo.isActive ? this.thumbTo : this.thumbFrom;\n activeThumb.nativeElement.releasePointerCapture($event.pointerId);\n this.hideSliderIndicators();\n this.dragFinished.emit(this.value);\n }\n /**\n * @hidden\n */\n onFocus() {\n this.toggleSliderIndicators();\n }\n /**\n * @hidden\n */\n onPanListener($event) {\n this.update($event.srcEvent.clientX);\n }\n /**\n * Returns whether the `IgxSliderComponent` type is RANGE.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * ngAfterViewInit(){\n * let sliderRange = this.slider.isRange;\n * }\n * ```\n */\n get isRange() {\n return this.type === IgxSliderType.RANGE;\n }\n /**\n * Returns the lower value of a RANGE `IgxSliderComponent`.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * public lowValue(event){\n * let sliderLowValue = this.slider.lowerValue;\n * }\n * ```\n */\n get lowerValue() {\n if (!Number.isNaN(this._lowerValue) && this._lowerValue !== undefined && this._lowerValue >= this.lowerBound) {\n return this._lowerValue;\n }\n return this.lowerBound;\n }\n /**\n * Sets the lower value of a RANGE `IgxSliderComponent`.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * public lowValue(event){\n * this.slider.lowerValue = value;\n * }\n * ```\n */\n set lowerValue(value) {\n const adjustedValue = this.valueInRange(value, this.lowerBound, this.upperBound);\n if (this._lowerValue !== adjustedValue) {\n this._lowerValue = adjustedValue;\n this.value = { lower: this._lowerValue, upper: this._upperValue };\n }\n }\n /**\n * Returns the upper value of a RANGE `IgxSliderComponent`.\n * Returns `value` of a SLIDER `IgxSliderComponent`\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * public upperValue(event){\n * let upperValue = this.slider.upperValue;\n * }\n * ```\n */\n get upperValue() {\n if (!Number.isNaN(this._upperValue) && this._upperValue !== undefined && this._upperValue <= this.upperBound) {\n return this._upperValue;\n }\n return this.upperBound;\n }\n /**\n * Sets the upper value of a RANGE `IgxSliderComponent`.\n * ```typescript\n * @ViewChild(\"slider2\")\n * public slider: IgxSliderComponent;\n * public upperValue(event){\n * this.slider.upperValue = value;\n * }\n * ```\n */\n set upperValue(value) {\n const adjustedValue = this.valueInRange(value, this.lowerBound, this.upperBound);\n if (this._upperValue !== adjustedValue) {\n this._upperValue = adjustedValue;\n this.value = { lower: this._lowerValue, upper: this._upperValue };\n }\n }\n /**\n * Returns the value corresponding the lower label.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * let label = this.slider.lowerLabel;\n * ```\n */\n get lowerLabel() {\n return this.labelsViewEnabled ? this.labels[this.lowerValue] : this.lowerValue;\n }\n /**\n * Returns the value corresponding the upper label.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * let label = this.slider.upperLabel;\n * ```\n */\n get upperLabel() {\n return this.labelsViewEnabled ? this.labels[this.upperValue] : this.upperValue;\n }\n /**\n * Returns if label view is enabled.\n * If the {@link labels} is set, the view is automatically activated.\n * ```typescript\n * @ViewChild(\"slider\")\n * public slider: IgxSliderComponent;\n * let labelView = this.slider.labelsViewEnabled;\n * ```\n */\n get labelsViewEnabled() {\n return !!(this.labels && this.labels.length > 1);\n }\n /**\n * @hidden\n */\n get showTopTicks() {\n return this.ticksOrientation === TicksOrientation.Top ||\n this.ticksOrientation === TicksOrientation.Mirror;\n }\n /**\n * @hidden\n */\n get showBottomTicks() {\n return this.ticksOrientation === TicksOrientation.Bottom ||\n this.ticksOrientation === TicksOrientation.Mirror;\n }\n /**\n * @hidden\n */\n ngOnChanges(changes) {\n if (changes.minValue && changes.maxValue &&\n changes.minValue.currentValue < changes.maxValue.currentValue) {\n this._maxValue = changes.maxValue.currentValue;\n this._minValue = changes.minValue.currentValue;\n }\n if (changes.step && changes.step.isFirstChange()) {\n this.normalizeByStep(this._value);\n }\n }\n /**\n * @hidden\n */\n ngOnInit() {\n /**\n * if {@link SliderType.SLIDER} than the initial value shold be the lowest one.\n */\n if (!this.isRange) {\n this._upperValue = this.lowerBound;\n }\n // Set track travel zone\n this._pMin = this.valueToFraction(this.lowerBound) || 0;\n this._pMax = this.valueToFraction(this.upperBound) || 1;\n }\n ngAfterContentInit() {\n this.setValue(this._value, false);\n }\n /**\n * @hidden\n */\n ngAfterViewInit() {\n this._hasViewInit = true;\n this.stepDistance = this.calculateStepDistance();\n this.positionHandlersAndUpdateTrack();\n this.setTickInterval();\n this.changeThumbFocusableState(this.disabled);\n this.subscribeTo(this.thumbFrom, this.thumbChanged.bind(this));\n this.subscribeTo(this.thumbTo, this.thumbChanged.bind(this));\n this.thumbs.changes.pipe(takeUntil(this._destroyer$)).subscribe(change => {\n const thumbFrom = change.find((thumb) => thumb.type === SliderHandle.FROM);\n this.positionHandler(thumbFrom, null, this.lowerValue);\n this.subscribeTo(thumbFrom, this.thumbChanged.bind(this));\n this.changeThumbFocusableState(this.disabled);\n });\n this.labelRefs.changes.pipe(takeUntil(this._destroyer$)).subscribe(() => {\n const labelFrom = this.labelRefs.find((label) => label.type === SliderHandle.FROM);\n this.positionHandler(null, labelFrom, this.lowerValue);\n });\n this._ngZone.runOutsideAngular(() => {\n resizeObservable(this._el.nativeElement).pipe(throttleTime(40), takeUntil(this._destroyer$)).subscribe(() => this._ngZone.run(() => {\n this.stepDistance = this.calculateStepDistance();\n }));\n });\n }\n /**\n * @hidden\n */\n ngOnDestroy() {\n this._destroyer$.next(true);\n this._destroyer$.complete();\n this._indicatorsDestroyer$.next(true);\n this._indicatorsDestroyer$.complete();\n }\n /**\n * @hidden\n */\n writeValue(value) {\n if (!value) {\n return;\n }\n this.normalizeByStep(value);\n this.setValue(this._value, false);\n this.positionHandlersAndUpdateTrack();\n }\n /**\n * @hidden\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * @hidden\n */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /** @hidden */\n getEditElement() {\n return this.isRange ? this.thumbFrom.nativeElement : this.thumbTo.nativeElement;\n }\n /**\n *\n * @hidden\n */\n update(mouseX) {\n if (this.disabled) {\n return;\n }\n // Update To/From Values\n this.onPan.next(mouseX);\n // Finally do positionHandlersAndUpdateTrack the DOM\n // based on data values\n this.positionHandlersAndUpdateTrack();\n this._onTouchedCallback();\n }\n /**\n * @hidden\n */\n thumbChanged(value, thumbType) {\n const oldValue = this.value;\n if (this.isRange) {\n if (thumbType === SliderHandle.FROM) {\n const newLower = this.lowerValue + value;\n if (newLower >= this.lowerBound && newLower <= this.upperValue) {\n this._lowerValue = newLower;\n this.lowerValueChange.emit(this._lowerValue);\n }\n }\n else {\n const newUpper = this.upperValue + value;\n if (newUpper <= this.upperBound && newUpper >= this.lowerValue) {\n this._upperValue = newUpper;\n this.upperValueChange.emit(this._upperValue);\n }\n }\n const newVal = {\n lower: this._lowerValue,\n upper: this._upperValue\n };\n // Swap the thumbs if a collision appears.\n if (newVal.lower == newVal.upper) {\n this.toggleThumb();\n }\n this.value = newVal;\n }\n else {\n const newVal = this.value + value;\n if (newVal >= this.lowerBound && newVal <= this.upperBound) {\n this.value = newVal;\n }\n }\n if (this.hasValueChanged(oldValue)) {\n this.emitValueChange(oldValue);\n }\n }\n /**\n * @hidden\n */\n onThumbChange() {\n this.toggleSliderIndicators();\n }\n /**\n * @hidden\n */\n onHoverChange(state) {\n return state ? this.showSliderIndicators() : this.hideSliderIndicators();\n }\n setValue(value, triggerChange) {\n let res;\n if (!this.isRange) {\n value = value;\n if (!isNaN(value)) {\n this._upperValue = value - value % this.step;\n res = this.upperValue;\n }\n }\n else {\n value = this.validateInitialValue(value);\n this._upperValue = value.upper;\n this._lowerValue = value.lower;\n res = { lower: this.lowerValue, upper: this.upperValue };\n }\n if (triggerChange) {\n this._onChangeCallback(res);\n }\n }\n validateInitialValue(value) {\n if (value.upper < value.lower) {\n const temp = value.upper;\n value.upper = value.lower;\n value.lower = temp;\n }\n if (value.lower < this.lowerBound) {\n value.lower = this.lowerBound;\n }\n if (value.upper > this.upperBound) {\n value.upper = this.upperBound;\n }\n return value;\n }\n findClosestThumb(event) {\n if (this.isRange) {\n this.closestHandle(event);\n }\n else {\n this.thumbTo.nativeElement.focus();\n }\n this.update(event.clientX);\n }\n updateLowerBoundAndMinTravelZone() {\n this.lowerBound = this.minValue;\n this._pMin = 0;\n }\n updateUpperBoundAndMaxTravelZone() {\n this.upperBound = this.maxValue;\n this._pMax = 1;\n }\n calculateStepDistance() {\n return this._el.nativeElement.getBoundingClientRect().width / (this.maxValue - this.minValue) * this.step;\n }\n toggleThumb() {\n return this.thumbFrom.isActive ?\n this.thumbTo.nativeElement.focus() :\n this.thumbFrom.nativeElement.focus();\n }\n valueInRange(value, min = 0, max = 100) {\n return Math.max(Math.min(value, max), min);\n }\n positionHandler(thumbHandle, labelHandle, position) {\n const percent = `${this.valueToFraction(position) * 100}%`;\n const dir = this._dir.rtl ? 'right' : 'left';\n if (thumbHandle) {\n thumbHandle.nativeElement.style[dir] = percent;\n }\n if (labelHandle) {\n labelHandle.nativeElement.style[dir] = percent;\n }\n }\n positionHandlersAndUpdateTrack() {\n if (!this.isRange) {\n this.positionHandler(this.thumbTo, this.labelTo, this.value);\n }\n else {\n this.positionHandler(this.thumbTo, this.labelTo, this.value.upper);\n this.positionHandler(this.thumbFrom, this.labelFrom, this.value.lower);\n }\n if (this._hasViewInit) {\n this.updateTrack();\n }\n }\n closestHandle(event) {\n const fromOffset = this.thumbFrom.nativeElement.offsetLeft + this.thumbFrom.nativeElement.offsetWidth / 2;\n const toOffset = this.thumbTo.nativeElement.offsetLeft + this.thumbTo.nativeElement.offsetWidth / 2;\n const xPointer = event.clientX - this._el.nativeElement.getBoundingClientRect().left;\n const match = this.closestTo(xPointer, [fromOffset, toOffset]);\n if (fromOffset === toOffset && toOffset < xPointer) {\n this.thumbTo.nativeElement.focus();\n }\n else if (fromOffset === toOffset && toOffset > xPointer) {\n this.thumbFrom.nativeElement.focus();\n }\n else if (match === fromOffset) {\n this.thumbFrom.nativeElement.focus();\n }\n else {\n this.thumbTo.nativeElement.focus();\n }\n }\n setTickInterval() {\n let interval;\n const trackProgress = 100;\n if (this.labelsViewEnabled) {\n // Calc ticks depending on the labels length;\n interval = ((trackProgress / (this.labels.length - 1) * 10)) / 10;\n }\n else {\n const trackRange = this.maxValue - this.minValue;\n interval = this.step > 1 ?\n (trackProgress / ((trackRange / this.step)) * 10) / 10\n : null;\n }\n this.renderer.setStyle(this.ticks.nativeElement, 'stroke-dasharray', `0, ${interval * Math.sqrt(2)}%`);\n this.renderer.setStyle(this.ticks.nativeElement, 'visibility', this.continuous || interval === null ? 'hidden' : 'visible');\n }\n showSliderIndicators() {\n if (this.disabled) {\n return;\n }\n if (this._indicatorsTimer) {\n this._indicatorsDestroyer$.next(true);\n this._indicatorsTimer = null;\n }\n this.thumbTo.showThumbIndicators();\n this.labelTo.active = true;\n if (this.thumbFrom) {\n this.thumbFrom.showThumbIndicators();\n }\n if (this.labelFrom) {\n this.labelFrom.active = true;\n }\n }\n hideSliderIndicators() {\n if (this.disabled) {\n return;\n }\n this._indicatorsTimer = timer(this.thumbLabelVisibilityDuration);\n this._indicatorsTimer.pipe(takeUntil(this._indicatorsDestroyer$)).subscribe(() => {\n this.thumbTo.hideThumbIndicators();\n this.labelTo.active = false;\n if (this.thumbFrom) {\n this.thumbFrom.hideThumbIndicators();\n }\n if (this.labelFrom) {\n this.labelFrom.active = false;\n }\n });\n }\n toggleSliderIndicators() {\n this.showSliderIndicators();\n this.hideSliderIndicators();\n }\n changeThumbFocusableState(state) {\n const value = state ? -1 : 1;\n if (this.isRange) {\n this.thumbFrom.tabindex = value;\n }\n this.thumbTo.tabindex = value;\n this._cdr.detectChanges();\n }\n closestTo(goal, positions) {\n return positions.reduce((previous, current) => (Math.abs(goal - current) < Math.abs(goal - previous) ? current : previous));\n }\n valueToFraction(value, pMin = this._pMin, pMax = this._pMax) {\n return this.valueInRange((value - this.minValue) / (this.maxValue - this.minValue), pMin, pMax);\n }\n /**\n * @hidden\n * Normalizе the value when two-way data bind is used and {@link this.step} is set.\n * @param value\n */\n normalizeByStep(value) {\n if (this.isRange) {\n this._value = {\n lower: value.lower - (value.lower % this.step),\n upper: value.upper - (value.upper % this.step)\n };\n }\n else {\n this._value = value - (value % this.step);\n }\n }\n updateTrack() {\n const fromPosition = this.valueToFraction(this.lowerValue);\n const toPosition = this.valueToFraction(this.upperValue);\n const positionGap = toPosition - fromPosition;\n let trackLeftIndention = fromPosition;\n if (this.isRange) {\n if (positionGap) {\n trackLeftIndention = Math.round((1 / positionGap * fromPosition) * 100);\n }\n trackLeftIndention = this._dir.rtl ? -trackLeftIndention : trackLeftIndention;\n this.renderer.setStyle(this.trackRef.nativeElement, 'transform', `scaleX(${positionGap}) translateX(${trackLeftIndention}%)`);\n }\n else {\n this.renderer.setStyle(this.trackRef.nativeElement, 'transform', `scaleX(${toPosition})`);\n }\n }\n subscribeTo(thumb, callback) {\n if (!thumb) {\n return;\n }\n thumb.thumbValueChange\n .pipe(takeUntil(this.unsubscriber(thumb)))\n .subscribe(value => callback(value, thumb.type));\n }\n unsubscriber(thumb) {\n return merge(this._destroyer$, thumb.destroy);\n }\n hasValueChanged(oldValue) {\n const isSliderWithDifferentValue = !this.isRange && oldValue !== this.value;\n const isRangeWithOneDifferentValue = this.isRange &&\n (oldValue.lower !== this.value.lower ||\n oldValue.upper !== this.value.upper);\n return isSliderWithDifferentValue || isRangeWithOneDifferentValue;\n }\n emitValueChange(oldValue) {\n this.valueChange.emit({ oldValue, value: this.value });\n }\n}\nIgxSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Component });\nIgxSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSliderComponent, selector: \"igx-slider\", inputs: { id: \"id\", thumbLabelVisibilityDuration: \"thumbLabelVisibilityDuration\", type: \"type\", labels: \"labels\", step: \"step\", disabled: \"disabled\", continuous: \"continuous\", minValue: \"minValue\", maxValue: \"maxValue\", lowerBound: \"lowerBound\", upperBound: \"upperBound\", value: \"value\", primaryTicks: \"primaryTicks\", secondaryTicks: \"secondaryTicks\", showTicks: \"showTicks\", primaryTickLabels: \"primaryTickLabels\", secondaryTickLabels: \"secondaryTickLabels\", ticksOrientation: \"ticksOrientation\", tickLabelsOrientation: \"tickLabelsOrientation\", lowerValue: \"lowerValue\", upperValue: \"upperValue\" }, outputs: { valueChange: \"valueChange\", lowerValueChange: \"lowerValueChange\", upperValueChange: \"upperValueChange\", dragFinished: \"dragFinished\" }, host: { listeners: { \"pointerdown\": \"onPointerDown($event)\", \"pointerup\": \"onPointerUp($event)\", \"focus\": \"onFocus()\", \"pan\": \"onPanListener($event)\" }, properties: { \"attr.role\": \"this.role\", \"class.igx-slider\": \"this.slierClass\", \"attr.id\": \"this.id\", \"attr.aria-valuemin\": \"this.valuemin\", \"attr.aria-valuemax\": \"this.valuemax\", \"attr.aria-readonly\": \"this.readonly\", \"class.igx-slider--disabled\": \"this.disabledClass\" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxSliderComponent, multi: true }], queries: [{ propertyName: \"thumbFromTemplateRef\", first: true, predicate: IgxThumbFromTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"thumbToTemplateRef\", first: true, predicate: IgxThumbToTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"tickLabelTemplateRef\", first: true, predicate: IgxTickLabelTemplateDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: \"trackRef\", first: true, predicate: [\"track\"], descendants: true, static: true }, { propertyName: \"ticks\", first: true, predicate: [\"ticks\"], descendants: true, static: true }, { propertyName: \"thumbs\", predicate: IgxSliderThumbComponent, descendants: true }, { propertyName: \"labelRefs\", predicate: IgxThumbLabelComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: \"\\n\\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n \\n\\n \\n\\n \\n\\n \\n
    \\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxSliderThumbComponent; }), selector: \"igx-thumb\", inputs: [\"value\", \"continuous\", \"thumbLabelVisibilityDuration\", \"disabled\", \"onPan\", \"stepDistance\", \"step\", \"templateRef\", \"context\", \"type\", \"deactiveState\"], outputs: [\"thumbValueChange\", \"thumbChange\", \"hoverChange\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxThumbLabelComponent; }), selector: \"igx-thumb-label\", inputs: [\"value\", \"templateRef\", \"context\", \"type\", \"continuous\", \"deactiveState\", \"thumb\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxTicksComponent; }), selector: \"igx-ticks\", inputs: [\"primaryTicks\", \"secondaryTicks\", \"primaryTickLabels\", \"secondaryTickLabels\", \"ticksOrientation\", \"tickLabelsOrientation\", \"maxValue\", \"minValue\", \"labelsViewEnabled\", \"labels\", \"tickLabelTemplateRef\"] }, { kind: \"pipe\", type: i0.forwardRef(function () { return IgxTickLabelsPipe; }), name: \"spreadTickLabels\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderComponent, decorators: [{\n type: Component,\n args: [{ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxSliderComponent, multi: true }], selector: 'igx-slider', template: \"\\n\\n
    \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    \\n
    \\n \\n\\n \\n\\n \\n\\n \\n
    \\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: IgxDirectionality }]; }, propDecorators: { trackRef: [{\n type: ViewChild,\n args: ['track', { static: true }]\n }], thumbFromTemplateRef: [{\n type: ContentChild,\n args: [IgxThumbFromTemplateDirective, { read: TemplateRef }]\n }], thumbToTemplateRef: [{\n type: ContentChild,\n args: [IgxThumbToTemplateDirective, { read: TemplateRef }]\n }], tickLabelTemplateRef: [{\n type: ContentChild,\n args: [IgxTickLabelTemplateDirective, { read: TemplateRef, static: false }]\n }], role: [{\n type: HostBinding,\n args: [`attr.role`]\n }], slierClass: [{\n type: HostBinding,\n args: ['class.igx-slider']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], thumbLabelVisibilityDuration: [{\n type: Input\n }], valuemin: [{\n type: HostBinding,\n args: [`attr.aria-valuemin`]\n }], valuemax: [{\n type: HostBinding,\n args: [`attr.aria-valuemax`]\n }], readonly: [{\n type: HostBinding,\n args: [`attr.aria-readonly`]\n }], disabledClass: [{\n type: HostBinding,\n args: ['class.igx-slider--disabled']\n }], type: [{\n type: Input\n }], labels: [{\n type: Input\n }], step: [{\n type: Input\n }], disabled: [{\n type: Input\n }], continuous: [{\n type: Input\n }], minValue: [{\n type: Input\n }], maxValue: [{\n type: Input\n }], lowerBound: [{\n type: Input\n }], upperBound: [{\n type: Input\n }], value: [{\n type: Input\n }], primaryTicks: [{\n type: Input\n }], secondaryTicks: [{\n type: Input\n }], showTicks: [{\n type: Input\n }], primaryTickLabels: [{\n type: Input\n }], secondaryTickLabels: [{\n type: Input\n }], ticksOrientation: [{\n type: Input\n }], tickLabelsOrientation: [{\n type: Input\n }], valueChange: [{\n type: Output\n }], lowerValueChange: [{\n type: Output\n }], upperValueChange: [{\n type: Output\n }], dragFinished: [{\n type: Output\n }], ticks: [{\n type: ViewChild,\n args: ['ticks', { static: true }]\n }], thumbs: [{\n type: ViewChildren,\n args: [IgxSliderThumbComponent]\n }], labelRefs: [{\n type: ViewChildren,\n args: [IgxThumbLabelComponent]\n }], onPointerDown: [{\n type: HostListener,\n args: ['pointerdown', ['$event']]\n }], onPointerUp: [{\n type: HostListener,\n args: ['pointerup', ['$event']]\n }], onFocus: [{\n type: HostListener,\n args: ['focus']\n }], onPanListener: [{\n type: HostListener,\n args: ['pan', ['$event']]\n }], lowerValue: [{\n type: Input\n }], upperValue: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxSliderModule {\n}\nIgxSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderModule, declarations: [IgxSliderComponent, IgxThumbFromTemplateDirective,\n IgxThumbToTemplateDirective,\n IgxTickLabelTemplateDirective,\n IgxSliderThumbComponent,\n IgxThumbLabelComponent,\n IgxTicksComponent,\n IgxTickLabelsPipe], imports: [CommonModule, FormsModule], exports: [IgxSliderComponent, IgxThumbFromTemplateDirective,\n IgxThumbToTemplateDirective,\n IgxTickLabelTemplateDirective] });\nIgxSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderModule, imports: [CommonModule, FormsModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSliderModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxSliderComponent,\n IgxThumbFromTemplateDirective,\n IgxThumbToTemplateDirective,\n IgxTickLabelTemplateDirective,\n IgxSliderThumbComponent,\n IgxThumbLabelComponent,\n IgxTicksComponent,\n IgxTickLabelsPipe\n ],\n exports: [\n IgxSliderComponent,\n IgxThumbFromTemplateDirective,\n IgxThumbToTemplateDirective,\n IgxTickLabelTemplateDirective\n ],\n imports: [CommonModule, FormsModule]\n }]\n }] });\n\nconst SwitchLabelPosition = mkenum({\n BEFORE: 'before',\n AFTER: 'after'\n});\nlet nextId = 0;\n/**\n *\n * The Switch component is a binary choice selection component.\n *\n * @igxModule IgxSwitchModule\n *\n * @igxTheme igx-switch-theme, igx-tooltip-theme\n *\n * @igxKeywords switch, states, tooltip\n *\n * @igxGroup Data Entry & Display\n *\n * @remarks\n *\n * The Ignite UI Switch lets the user toggle between on/off or true/false states.\n *\n * @example\n * ```html\n * \n * Simple switch\n * \n * ```\n */\nclass IgxSwitchComponent {\n /**\n * Returns reference to the `nativeElement` of the igx-switch.\n *\n * @example\n * ```typescript\n * let nativeElement = this.switch.nativeElement;\n * ```\n */\n get nativeElement() {\n return this.nativeCheckbox.nativeElement;\n }\n /**\n * Sets/gets whether switch is required.\n * If not set, `required` will have value `false`.\n *\n * @example\n * ```html\n * \n * ```\n */\n get required() {\n return this._required || this.nativeElement.hasAttribute('required');\n }\n set required(value) {\n this._required = (value === '') || value;\n }\n /**\n * Sets/gets whether the switch is on or off.\n * Default value is 'false'.\n *\n * @example\n * ```html\n * \n * ```\n */\n set checked(value) {\n if (this._checked !== value) {\n this._checked = value;\n this._onChangeCallback(this.checked);\n }\n }\n get checked() {\n return this._checked;\n }\n /**\n * Sets/gets the `disabled` attribute.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = (value === '') || value;\n }\n /**\n * Sets/gets whether the switch component is invalid.\n * Default value is `false`.\n *\n * @example\n * ```html\n * \n * ```\n * ```typescript\n * let isInvalid = this.switch.invalid;\n * ```\n */\n get invalid() {\n return this._invalid || false;\n }\n set invalid(value) {\n this._invalid = !!value;\n }\n constructor(cdr, renderer, ngControl) {\n this.cdr = cdr;\n this.renderer = renderer;\n this.ngControl = ngControl;\n /**\n * @hidden\n * @internal\n */\n this.destroy$ = new Subject();\n /**\n * Sets/gets the `id` of the switch component.\n * If not set, the `id` of the first switch component will be `\"igx-switch-0\"`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.id = `igx-switch-${nextId++}`;\n /**\n * Sets/gets the id of the `label` element of the switch component.\n * If not set, the label of the first switch component will have value `\"igx-switch-0-label\"`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.labelId = `${this.id}-label`;\n /**\n * Sets/gets the value of the `tabindex` attribute.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.tabindex = null;\n /**\n * Sets/gets the position of the `label` in the switch component.\n * If not set, `labelPosition` will have value `\"after\"`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.labelPosition = 'after';\n /**\n * Enables/Disables the ripple effect\n * If not set, `disableRipple` will have value `false`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.disableRipple = false;\n /**\n * Sets/gets the `aria-labelledBy` attribute.\n * If not set, the value of `aria-labelledBy` will be equal to the value of `labelId` attribute.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.ariaLabelledBy = this.labelId;\n /**\n * Sets/gets the value of the `aria-label` attribute.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.ariaLabel = null;\n /**\n * An event that is emitted after the switch state is changed.\n * Provides references to the `IgxSwitchComponent` and the `checked` property as event arguments.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n this.change = new EventEmitter();\n /**\n * Returns the class of the switch component.\n *\n * @example\n * ```typescript\n * let switchClass = this.switch.cssClass;\n * ```\n */\n this.cssClass = 'igx-switch';\n /**\n * Sets/gets whether the switch component is on focus.\n * Default value is `false`.\n *\n * @example\n * ```typescript\n * this.switch.focused = true;\n * ```\n */\n this.focused = false;\n /**\n * @hidden\n * @internal\n */\n this.inputId = `${this.id}-input`;\n /**\n * @hidden\n * @internal\n */\n this._checked = false;\n /**\n * @hidden\n * @internal\n */\n this._required = false;\n /**\n * @hidden\n * @internal\n */\n this._disabled = false;\n /**\n * @hidden\n * @internal\n */\n this._invalid = false;\n /**\n * @hidden\n * @internal\n */\n this._onTouchedCallback = noop;\n /**\n * @hidden\n * @internal\n */\n this._onChangeCallback = noop;\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n /**\n * @hidden\n * @internal\n */\n ngAfterViewInit() {\n if (this.ngControl) {\n this.ngControl.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(this.updateValidityState.bind(this));\n if (this.ngControl.control.validator || this.ngControl.control.asyncValidator) {\n this._required = this.ngControl?.control?.hasValidator(Validators.required);\n this.cdr.detectChanges();\n }\n }\n }\n /**\n * @hidden\n * @internal\n */\n onKeyUp(event) {\n event.stopPropagation();\n this.focused = true;\n }\n /**\n * @hidden\n * @internal\n */\n _onSwitchClick() {\n if (this.disabled) {\n return;\n }\n this.nativeCheckbox.nativeElement.focus();\n this.checked = !this.checked;\n this.updateValidityState();\n // K.D. March 23, 2021 Emitting on click and not on the setter because otherwise every component\n // bound on change would have to perform self checks for weather the value has changed because\n // of the initial set on initialization\n this.change.emit({ checked: this.checked, switch: this });\n }\n /**\n * @hidden\n * @internal\n */\n _onSwitchChange(event) {\n event.stopPropagation();\n }\n /**\n * @hidden\n * @internal\n */\n onBlur() {\n this.focused = false;\n this._onTouchedCallback();\n this.updateValidityState();\n }\n /**\n * @hidden\n * @internal\n */\n writeValue(value) {\n this._checked = value;\n }\n /**\n * @hidden\n * @internal\n */\n getEditElement() {\n return this.nativeCheckbox.nativeElement;\n }\n /**\n * @hidden\n * @internal\n */\n get labelClass() {\n switch (this.labelPosition) {\n case SwitchLabelPosition.BEFORE:\n return `${this.cssClass}__label--before`;\n case SwitchLabelPosition.AFTER:\n default:\n return `${this.cssClass}__label`;\n }\n }\n /**\n * @hidden\n * @internal\n */\n registerOnChange(fn) {\n this._onChangeCallback = fn;\n }\n /**\n * @hidden\n * @internal\n */\n registerOnTouched(fn) {\n this._onTouchedCallback = fn;\n }\n /**\n * @hidden\n * @internal\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /**\n * @hidden\n * @internal\n */\n updateValidityState() {\n if (this.ngControl) {\n if (!this.disabled && (this.ngControl.control.touched || this.ngControl.control.dirty)) {\n // the control is not disabled and is touched or dirty\n if (this.checked) {\n this._invalid = this.ngControl.invalid;\n }\n else {\n this._invalid = this.required ? true : false;\n }\n }\n else {\n // if the control is untouched, pristine, or disabled, its state is initial. This is when the user did not interact\n // with the switch or when the form/control is reset\n this._invalid = false;\n }\n }\n else {\n this.checkNativeValidity();\n }\n }\n /**\n * A function to assign a native validity property of a swicth.\n * This should be used when there's no ngControl\n *\n * @hidden\n * @internal\n */\n checkNativeValidity() {\n if (!this.disabled && this._required && !this.checked) {\n this._invalid = true;\n }\n else {\n this._invalid = false;\n }\n }\n}\nIgxSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSwitchComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSwitchComponent, selector: \"igx-switch\", inputs: { id: \"id\", labelId: \"labelId\", value: \"value\", name: \"name\", tabindex: \"tabindex\", labelPosition: \"labelPosition\", disableRipple: \"disableRipple\", required: \"required\", ariaLabelledBy: [\"aria-labelledby\", \"ariaLabelledBy\"], ariaLabel: [\"aria-label\", \"ariaLabel\"], checked: \"checked\", disabled: \"disabled\", invalid: \"invalid\" }, outputs: { change: \"change\" }, host: { listeners: { \"keyup\": \"onKeyUp($event)\", \"click\": \"_onSwitchClick()\", \"blur\": \"onBlur()\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-switch\": \"this.cssClass\", \"class.igx-switch--checked\": \"this.checked\", \"class.igx-switch--disabled\": \"this.disabled\", \"class.igx-switch--invalid\": \"this.invalid\", \"class.igx-switch--focused\": \"this.focused\" } }, providers: [{\n provide: EDITOR_PROVIDER,\n useExisting: IgxSwitchComponent,\n multi: true\n }], viewQueries: [{ propertyName: \"nativeCheckbox\", first: true, predicate: [\"checkbox\"], descendants: true, static: true }, { propertyName: \"nativeLabel\", first: true, predicate: [\"label\"], descendants: true, static: true }, { propertyName: \"placeholderLabel\", first: true, predicate: [\"placeholderLabel\"], descendants: true, static: true }], ngImport: i0, template: \"\\n\\n\\n
    \\n
    \\n
    \\n
    \\n\\n\\n \\n\\n\", dependencies: [{ kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSwitchComponent, decorators: [{\n type: Component,\n args: [{ providers: [{\n provide: EDITOR_PROVIDER,\n useExisting: IgxSwitchComponent,\n multi: true\n }], selector: 'igx-switch', template: \"\\n\\n\\n
    \\n
    \\n
    \\n
    \\n\\n\\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i5.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; }, propDecorators: { nativeCheckbox: [{\n type: ViewChild,\n args: ['checkbox', { static: true }]\n }], nativeLabel: [{\n type: ViewChild,\n args: ['label', { static: true }]\n }], placeholderLabel: [{\n type: ViewChild,\n args: ['placeholderLabel', { static: true }]\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], labelId: [{\n type: Input\n }], value: [{\n type: Input\n }], name: [{\n type: Input\n }], tabindex: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], disableRipple: [{\n type: Input\n }], required: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], change: [{\n type: Output\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-switch']\n }], checked: [{\n type: HostBinding,\n args: ['class.igx-switch--checked']\n }, {\n type: Input\n }], disabled: [{\n type: HostBinding,\n args: ['class.igx-switch--disabled']\n }, {\n type: Input\n }], invalid: [{\n type: HostBinding,\n args: ['class.igx-switch--invalid']\n }, {\n type: Input\n }], focused: [{\n type: HostBinding,\n args: ['class.igx-switch--focused']\n }], onKeyUp: [{\n type: HostListener,\n args: ['keyup', ['$event']]\n }], _onSwitchClick: [{\n type: HostListener,\n args: ['click']\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }] } });\n/**\n * @hidden\n */\nclass IgxSwitchModule {\n}\nIgxSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSwitchModule, declarations: [IgxSwitchComponent], imports: [IgxRippleModule], exports: [IgxSwitchComponent] });\nIgxSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSwitchModule, imports: [IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSwitchModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxSwitchComponent],\n exports: [IgxSwitchComponent],\n imports: [IgxRippleModule]\n }]\n }] });\n\n/** @hidden */\nclass IgxTabsBase {\n}\n/** @hidden */\nclass IgxTabItemBase {\n}\n/** @hidden */\nclass IgxTabHeaderBase {\n}\n/** @hidden */\nclass IgxTabContentBase {\n}\n\nclass IgxTabItemDirective {\n /**\n * An @Input property which determines whether an item is selected.\n */\n get selected() {\n return this._selected;\n }\n ;\n set selected(value) {\n if (this._selected !== value) {\n this._selected = value;\n this.tabs.selectTab(this, this._selected);\n this.selectedChange.emit(this._selected);\n }\n }\n /** @hidden */\n constructor(tabs) {\n this.tabs = tabs;\n /**\n * Output to enable support for two-way binding on [(selected)]\n */\n this.selectedChange = new EventEmitter();\n /**\n * An @Input property that allows you to enable/disable the item.\n */\n this.disabled = false;\n /** @hidden */\n this.direction = Direction.NONE;\n this._selected = false;\n }\n}\nIgxTabItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabItemDirective, deps: [{ token: IgxTabsBase }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTabItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabItemDirective, inputs: { disabled: \"disabled\", selected: \"selected\" }, outputs: { selectedChange: \"selectedChange\" }, queries: [{ propertyName: \"headerComponent\", first: true, predicate: IgxTabHeaderBase, descendants: true }, { propertyName: \"panelComponent\", first: true, predicate: IgxTabContentBase, descendants: true }], viewQueries: [{ propertyName: \"headerTemplate\", first: true, predicate: [\"headerTemplate\"], descendants: true, static: true }, { propertyName: \"panelTemplate\", first: true, predicate: [\"panelTemplate\"], descendants: true, static: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabItemDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: IgxTabsBase }]; }, propDecorators: { headerComponent: [{\n type: ContentChild,\n args: [IgxTabHeaderBase]\n }], panelComponent: [{\n type: ContentChild,\n args: [IgxTabContentBase]\n }], headerTemplate: [{\n type: ViewChild,\n args: ['headerTemplate', { static: true }]\n }], panelTemplate: [{\n type: ViewChild,\n args: ['panelTemplate', { static: true }]\n }], selectedChange: [{\n type: Output\n }], disabled: [{\n type: Input\n }], selected: [{\n type: Input\n }] } });\n\nclass IgxTabHeaderDirective {\n /** @hidden */\n constructor(tabs, tab, elementRef, platform) {\n this.tabs = tabs;\n this.tab = tab;\n this.elementRef = elementRef;\n this.platform = platform;\n /** @hidden */\n this.role = 'tab';\n }\n /** @hidden */\n get tabIndex() {\n return this.tab.selected ? 0 : -1;\n }\n /** @hidden */\n get ariaSelected() {\n return this.tab.selected;\n }\n /** @hidden */\n get ariaDisabled() {\n return this.tab.disabled;\n }\n /** @hidden */\n onClick() {\n if (this.tab.panelComponent) {\n this.tabs.selectTab(this.tab, true);\n }\n }\n /** @hidden */\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n ;\n}\nIgxTabHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderDirective, deps: [{ token: IgxTabsBase }, { token: IgxTabItemDirective }, { token: i0.ElementRef }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTabHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabHeaderDirective, host: { listeners: { \"click\": \"onClick()\" }, properties: { \"attr.role\": \"this.role\", \"attr.tabindex\": \"this.tabIndex\", \"attr.aria-selected\": \"this.ariaSelected\", \"attr.aria-disabled\": \"this.ariaDisabled\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: IgxTabsBase }, { type: IgxTabItemDirective }, { type: i0.ElementRef }, { type: PlatformUtil }]; }, propDecorators: { role: [{\n type: HostBinding,\n args: ['attr.role']\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], ariaSelected: [{\n type: HostBinding,\n args: ['attr.aria-selected']\n }], ariaDisabled: [{\n type: HostBinding,\n args: ['attr.aria-disabled']\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }] } });\n\nclass IgxTabContentDirective {\n /** @hidden */\n constructor(tab, elementRef) {\n this.tab = tab;\n this.elementRef = elementRef;\n /** @hidden */\n this.role = 'tabpanel';\n }\n /** @hidden */\n get tabIndex() {\n return this.tab.selected ? 0 : -1;\n }\n /** @hidden */\n get zIndex() {\n return this.tab.selected ? 'auto' : -1;\n }\n /** @hidden */\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n ;\n}\nIgxTabContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabContentDirective, deps: [{ token: IgxTabItemDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTabContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabContentDirective, host: { properties: { \"attr.role\": \"this.role\", \"attr.tabindex\": \"this.tabIndex\", \"style.z-index\": \"this.zIndex\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabContentDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: IgxTabItemDirective }, { type: i0.ElementRef }]; }, propDecorators: { role: [{\n type: HostBinding,\n args: ['attr.role']\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], zIndex: [{\n type: HostBinding,\n args: ['style.z-index']\n }] } });\n\nclass IgxTabsDirective extends IgxCarouselComponentBase {\n /**\n * An @Input property that gets/sets the index of the selected item.\n * Default value is 0 if contents are defined otherwise defaults to -1.\n */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(value) {\n if (this._selectedIndex !== value) {\n let newIndex = value;\n const oldIndex = this._selectedIndex;\n const args = {\n owner: this,\n cancel: false,\n oldIndex,\n newIndex\n };\n this.selectedIndexChanging.emit(args);\n if (!args.cancel) {\n newIndex = args.newIndex;\n this._selectedIndex = newIndex;\n this.selectedIndexChange.emit(this._selectedIndex);\n }\n this.updateSelectedTabs(oldIndex);\n }\n }\n /**\n * Enables/disables the transition animation of the contents.\n */\n get disableAnimation() {\n return this._disableAnimation;\n }\n set disableAnimation(value) {\n this._disableAnimation = value;\n }\n /**\n * Gets the selected item.\n */\n get selectedItem() {\n return this.items && this.selectedIndex >= 0 && this.selectedIndex < this.items.length ?\n this.items.get(this.selectedIndex) : null;\n }\n /** @hidden */\n constructor(animationService, cdr, dir) {\n super(animationService, cdr);\n this.dir = dir;\n /**\n * Output to enable support for two-way binding on [(selectedIndex)]\n */\n this.selectedIndexChange = new EventEmitter();\n /**\n * Emitted when the selected index is about to change.\n */\n this.selectedIndexChanging = new EventEmitter();\n /**\n * Emitted when the selected item is changed.\n */\n this.selectedItemChange = new EventEmitter();\n /** @hidden */\n this._disableAnimation = false;\n this._selectedIndex = -1;\n }\n /** @hidden */\n ngAfterViewInit() {\n if (this._selectedIndex === -1) {\n const hasSelectedTab = this.items.some((tab, i) => {\n if (tab.selected) {\n this._selectedIndex = i;\n }\n return tab.selected;\n });\n if (!hasSelectedTab && this.hasPanels) {\n this._selectedIndex = 0;\n }\n }\n // Use promise to avoid expression changed after check error\n Promise.resolve().then(() => {\n this.updateSelectedTabs(null, false);\n });\n this._itemChanges$ = this.items.changes.subscribe(() => {\n this.onItemChanges();\n });\n this.setAttributes();\n }\n /** @hidden */\n ngOnDestroy() {\n if (this._itemChanges$) {\n this._itemChanges$.unsubscribe();\n }\n }\n /** @hidden */\n selectTab(tab, selected) {\n if (!this.items) {\n return;\n }\n const tabs = this.items.toArray();\n if (selected) {\n const index = tabs.indexOf(tab);\n if (index > -1) {\n this.selectedIndex = index;\n }\n }\n else {\n if (tabs.every(t => !t.selected)) {\n this.selectedIndex = -1;\n }\n }\n }\n /** @hidden */\n getPreviousElement() {\n return this.previousItem.panelComponent.nativeElement;\n }\n /** @hidden */\n getCurrentElement() {\n return this.currentItem.panelComponent.nativeElement;\n }\n /** @hidden */\n scrollTabHeaderIntoView() {\n }\n /** @hidden */\n onItemChanges() {\n this.setAttributes();\n // Check if there is selected tab\n let selectedIndex = -1;\n this.items.some((tab, i) => {\n if (tab.selected) {\n selectedIndex = i;\n }\n return tab.selected;\n });\n if (selectedIndex >= 0) {\n // Set the selected index to the tab that has selected=true\n Promise.resolve().then(() => {\n this.selectedIndex = selectedIndex;\n });\n }\n else {\n if (this.selectedIndex >= 0 && this.selectedIndex < this.items.length) {\n // Select the tab on the same index the previous selected tab was\n Promise.resolve().then(() => {\n this.updateSelectedTabs(null);\n });\n }\n else if (this.selectedIndex >= this.items.length) {\n // Select the last tab\n Promise.resolve().then(() => {\n this.selectedIndex = this.items.length - 1;\n });\n }\n }\n }\n setAttributes() {\n this.items.forEach(item => {\n if (item.panelComponent && !item.headerComponent.nativeElement.getAttribute('id')) {\n const id = this.getNextTabId();\n const tabHeaderId = `${this.componentName}-header-${id}`;\n const tabPanelId = `${this.componentName}-content-${id}`;\n this.setHeaderAttribute(item, 'id', tabHeaderId);\n this.setHeaderAttribute(item, 'aria-controls', tabPanelId);\n this.setPanelAttribute(item, 'id', tabPanelId);\n this.setPanelAttribute(item, 'aria-labelledby', tabHeaderId);\n }\n });\n }\n setHeaderAttribute(item, attrName, value) {\n item.headerComponent.nativeElement.setAttribute(attrName, value);\n }\n setPanelAttribute(item, attrName, value) {\n item.panelComponent.nativeElement.setAttribute(attrName, value);\n }\n get hasPanels() {\n return this.panels && this.panels.length;\n }\n updateSelectedTabs(oldSelectedIndex, raiseEvent = true) {\n if (!this.items) {\n return;\n }\n let newTab;\n const oldTab = this.currentItem;\n // First select the new tab\n if (this._selectedIndex >= 0 && this._selectedIndex < this.items.length) {\n newTab = this.items.get(this._selectedIndex);\n newTab.selected = true;\n }\n // Then unselect the other tabs\n this.items.forEach((tab, i) => {\n if (i !== this._selectedIndex) {\n tab.selected = false;\n }\n });\n if (this._selectedIndex !== oldSelectedIndex) {\n this.scrollTabHeaderIntoView();\n this.triggerPanelAnimations(oldSelectedIndex);\n if (raiseEvent && newTab !== oldTab) {\n this.selectedItemChange.emit({\n owner: this,\n newItem: newTab,\n oldItem: oldTab\n });\n }\n }\n }\n triggerPanelAnimations(oldSelectedIndex) {\n const item = this.items.get(this._selectedIndex);\n if (item &&\n !this.disableAnimation &&\n this.hasPanels &&\n this.currentItem &&\n !this.currentItem.selected) {\n item.direction = (!this.dir.rtl && this._selectedIndex > oldSelectedIndex) ||\n (this.dir.rtl && this._selectedIndex < oldSelectedIndex)\n ? Direction.NEXT : Direction.PREV;\n if (this.previousItem && this.previousItem.previous) {\n this.previousItem.previous = false;\n }\n this.currentItem.direction = item.direction;\n this.previousItem = this.currentItem;\n this.currentItem = item;\n this.triggerAnimations();\n }\n else {\n this.currentItem = item;\n }\n }\n}\nIgxTabsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsDirective, deps: [{ token: IgxAngularAnimationService }, { token: i0.ChangeDetectorRef }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Directive });\nIgxTabsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabsDirective, inputs: { selectedIndex: \"selectedIndex\", disableAnimation: \"disableAnimation\" }, outputs: { selectedIndexChange: \"selectedIndexChange\", selectedIndexChanging: \"selectedIndexChanging\", selectedItemChange: \"selectedItemChange\" }, queries: [{ propertyName: \"items\", predicate: IgxTabItemDirective }, { propertyName: \"panels\", predicate: IgxTabContentBase, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsDirective, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: i0.ChangeDetectorRef }, { type: IgxDirectionality }]; }, propDecorators: { selectedIndex: [{\n type: Input\n }], disableAnimation: [{\n type: Input\n }], selectedIndexChange: [{\n type: Output\n }], selectedIndexChanging: [{\n type: Output\n }], selectedItemChange: [{\n type: Output\n }], items: [{\n type: ContentChildren,\n args: [IgxTabItemDirective]\n }], panels: [{\n type: ContentChildren,\n args: [IgxTabContentBase, { descendants: true }]\n }] } });\n\n/** @hidden */\nlet NEXT_BOTTOM_NAV_ITEM_ID = 0;\n/**\n * Bottom Navigation component enables the user to navigate among a number of contents displayed in a single view.\n *\n * @igxModule IgxBottomNavModule\n *\n * @igxTheme igx-bottom-nav-theme\n *\n * @igxKeywords bottom navigation\n *\n * @igxGroup Layouts\n *\n * @remarks\n * The Ignite UI for Angular Bottom Navigation component enables the user to navigate among a number of contents\n * displayed in a single view. The navigation through the contents is accomplished with the tab buttons located at bottom.\n *\n * @example\n * ```html\n * \n * \n * \n * folder\n * Tab 1\n * \n * \n * Content 1\n * \n * \n * ...\n * \n * ```\n */\nclass IgxBottomNavComponent extends IgxTabsDirective {\n constructor() {\n super(...arguments);\n /** @hidden */\n this._disableAnimation = true;\n /** @hidden */\n this.componentName = 'igx-bottom-nav';\n }\n /** @hidden */\n getNextTabId() {\n return NEXT_BOTTOM_NAV_ITEM_ID++;\n }\n}\nIgxBottomNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxBottomNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBottomNavComponent, selector: \"igx-bottom-nav\", providers: [{ provide: IgxTabsBase, useExisting: IgxBottomNavComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n\\n\\n\\n \\n \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-bottom-nav', providers: [{ provide: IgxTabsBase, useExisting: IgxBottomNavComponent }], template: \"\\n \\n\\n\\n\\n \\n \\n \\n\\n\" }]\n }] });\n\nclass IgxBottomNavItemComponent extends IgxTabItemDirective {\n}\nIgxBottomNavItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxBottomNavItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBottomNavItemComponent, selector: \"igx-bottom-nav-item\", providers: [{ provide: IgxTabItemDirective, useExisting: IgxBottomNavItemComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n\\n\\n \\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavItemComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-bottom-nav-item', providers: [{ provide: IgxTabItemDirective, useExisting: IgxBottomNavItemComponent }], template: \"\\n \\n\\n\\n \\n\\n\" }]\n }] });\n\nclass IgxBottomNavHeaderComponent extends IgxTabHeaderDirective {\n /** @hidden */\n get cssClassSelected() {\n return this.tab.selected;\n }\n /** @hidden */\n get cssClassDisabled() {\n return this.tab.disabled;\n }\n /** @hidden */\n get cssClass() {\n return (!this.tab.disabled && !this.tab.selected);\n }\n}\nIgxBottomNavHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxBottomNavHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBottomNavHeaderComponent, selector: \"igx-bottom-nav-header\", host: { properties: { \"class.igx-bottom-nav__menu-item--selected\": \"this.cssClassSelected\", \"class.igx-bottom-nav__menu-item--disabled\": \"this.cssClassDisabled\", \"class.igx-bottom-nav__menu-item\": \"this.cssClass\" } }, providers: [{ provide: IgxTabHeaderBase, useExisting: IgxBottomNavHeaderComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavHeaderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-bottom-nav-header', providers: [{ provide: IgxTabHeaderBase, useExisting: IgxBottomNavHeaderComponent }], template: \"\\n\" }]\n }], propDecorators: { cssClassSelected: [{\n type: HostBinding,\n args: ['class.igx-bottom-nav__menu-item--selected']\n }], cssClassDisabled: [{\n type: HostBinding,\n args: ['class.igx-bottom-nav__menu-item--disabled']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-bottom-nav__menu-item']\n }] } });\n\nclass IgxBottomNavHeaderLabelDirective {\n}\nIgxBottomNavHeaderLabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavHeaderLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxBottomNavHeaderLabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBottomNavHeaderLabelDirective, selector: \"igx-bottom-nav-header-label,[igxBottomNavHeaderLabel]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavHeaderLabelDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-bottom-nav-header-label,[igxBottomNavHeaderLabel]'\n }]\n }] });\nclass IgxBottomNavHeaderIconDirective {\n}\nIgxBottomNavHeaderIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavHeaderIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxBottomNavHeaderIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBottomNavHeaderIconDirective, selector: \"igx-bottom-nav-header-icon,[igxBottomNavHeaderIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavHeaderIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-bottom-nav-header-icon,[igxBottomNavHeaderIcon]'\n }]\n }] });\n\nclass IgxBottomNavContentComponent extends IgxTabContentDirective {\n constructor() {\n super(...arguments);\n /** @hidden */\n this.defaultClass = true;\n }\n}\nIgxBottomNavContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxBottomNavContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxBottomNavContentComponent, selector: \"igx-bottom-nav-content\", host: { properties: { \"class.igx-bottom-nav__panel\": \"this.defaultClass\" } }, providers: [{ provide: IgxTabContentBase, useExisting: IgxBottomNavContentComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavContentComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-bottom-nav-content', providers: [{ provide: IgxTabContentBase, useExisting: IgxBottomNavContentComponent }], template: \"\\n\" }]\n }], propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-bottom-nav__panel']\n }] } });\n\n/** @hidden */\nclass IgxBottomNavModule {\n}\nIgxBottomNavModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxBottomNavModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavModule, declarations: [IgxBottomNavComponent,\n IgxBottomNavItemComponent,\n IgxBottomNavHeaderComponent,\n IgxBottomNavContentComponent,\n IgxBottomNavHeaderLabelDirective,\n IgxBottomNavHeaderIconDirective], imports: [CommonModule, IgxIconModule, IgxRippleModule], exports: [IgxBottomNavComponent,\n IgxBottomNavItemComponent,\n IgxBottomNavHeaderComponent,\n IgxBottomNavContentComponent,\n IgxBottomNavHeaderLabelDirective,\n IgxBottomNavHeaderIconDirective] });\nIgxBottomNavModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavModule, imports: [CommonModule, IgxIconModule, IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxBottomNavModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxBottomNavComponent,\n IgxBottomNavItemComponent,\n IgxBottomNavHeaderComponent,\n IgxBottomNavContentComponent,\n IgxBottomNavHeaderLabelDirective,\n IgxBottomNavHeaderIconDirective\n ],\n exports: [\n IgxBottomNavComponent,\n IgxBottomNavItemComponent,\n IgxBottomNavHeaderComponent,\n IgxBottomNavContentComponent,\n IgxBottomNavHeaderLabelDirective,\n IgxBottomNavHeaderIconDirective\n ],\n imports: [CommonModule, IgxIconModule, IgxRippleModule]\n }]\n }] });\n\nconst IgxTabsAlignment = mkenum({\n start: 'start',\n end: 'end',\n center: 'center',\n justify: 'justify'\n});\n/** @hidden */\nvar TabScrollButtonStyle;\n(function (TabScrollButtonStyle) {\n TabScrollButtonStyle[\"Enabled\"] = \"enabled\";\n TabScrollButtonStyle[\"Disabled\"] = \"disabled\";\n TabScrollButtonStyle[\"NotDisplayed\"] = \"not_displayed\";\n})(TabScrollButtonStyle || (TabScrollButtonStyle = {}));\n/** @hidden */\nlet NEXT_TAB_ID = 0;\n/**\n * Tabs component is used to organize or switch between similar data sets.\n *\n * @igxModule IgxTabsModule\n *\n * @igxTheme igx-tabs-theme\n *\n * @igxKeywords tabs\n *\n * @igxGroup Layouts\n *\n * @remarks\n * The Ignite UI for Angular Tabs component places tabs at the top and allows for scrolling when there are multiple tab items on the screen.\n *\n * @example\n * ```html\n * \n * \n * \n * folder\n * Tab 1\n * \n * \n * Content 1\n * \n * \n * ...\n * \n * ```\n */\nclass IgxTabsComponent extends IgxTabsDirective {\n /**\n * An @Input property which determines the tab alignment. Defaults to `start`.\n */\n get tabAlignment() {\n return this._tabAlignment;\n }\n ;\n set tabAlignment(value) {\n this._tabAlignment = value;\n requestAnimationFrame(() => {\n this.updateScrollButtons();\n this.realignSelectedIndicator();\n });\n }\n constructor(animationService, cdr, ngZone, dir) {\n super(animationService, cdr, dir);\n this.ngZone = ngZone;\n /** @hidden */\n this.defaultClass = true;\n /** @hidden */\n this.offset = 0;\n /** @hidden */\n this.componentName = 'igx-tabs';\n this._tabAlignment = 'start';\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.ngZone.runOutsideAngular(() => {\n this._resizeObserver = new (getResizeObserver())(() => {\n this.updateScrollButtons();\n this.realignSelectedIndicator();\n });\n this._resizeObserver.observe(this.headerContainer.nativeElement);\n this._resizeObserver.observe(this.viewPort.nativeElement);\n });\n }\n /** @hidden @internal */\n ngOnDestroy() {\n super.ngOnDestroy();\n this.ngZone.runOutsideAngular(() => {\n this._resizeObserver?.disconnect();\n });\n }\n /** @hidden */\n scrollPrev() {\n this.scroll(false);\n }\n /** @hidden */\n scrollNext() {\n this.scroll(true);\n }\n /** @hidden */\n realignSelectedIndicator() {\n if (this.selectedIndex >= 0 && this.selectedIndex < this.items.length) {\n const header = this.items.get(this.selectedIndex).headerComponent.nativeElement;\n this.alignSelectedIndicator(header, 0);\n }\n }\n /** @hidden */\n resolveHeaderScrollClasses() {\n return {\n 'igx-tabs__header-scroll--start': this.tabAlignment === 'start',\n 'igx-tabs__header-scroll--end': this.tabAlignment === 'end',\n 'igx-tabs__header-scroll--center': this.tabAlignment === 'center',\n 'igx-tabs__header-scroll--justify': this.tabAlignment === 'justify',\n };\n }\n /** @hidden */\n scrollTabHeaderIntoView() {\n if (this.selectedIndex >= 0) {\n const tabItems = this.items.toArray();\n const tabHeaderNativeElement = tabItems[this.selectedIndex].headerComponent.nativeElement;\n // Scroll left if there is need\n if (this.getElementOffset(tabHeaderNativeElement) < this.offset) {\n this.scrollElement(tabHeaderNativeElement, false);\n }\n // Scroll right if there is need\n const viewPortOffsetWidth = this.viewPort.nativeElement.offsetWidth;\n const delta = (this.getElementOffset(tabHeaderNativeElement) + tabHeaderNativeElement.offsetWidth) - (viewPortOffsetWidth + this.offset);\n // Fix for IE 11, a difference is accumulated from the widths calculations\n if (delta > 1) {\n this.scrollElement(tabHeaderNativeElement, true);\n }\n this.alignSelectedIndicator(tabHeaderNativeElement);\n }\n else {\n this.hideSelectedIndicator();\n }\n }\n /** @hidden */\n getNextTabId() {\n return NEXT_TAB_ID++;\n }\n /** @hidden */\n onItemChanges() {\n super.onItemChanges();\n Promise.resolve().then(() => {\n this.updateScrollButtons();\n });\n }\n alignSelectedIndicator(element, duration = 0.3) {\n if (this.selectedIndicator) {\n this.selectedIndicator.nativeElement.style.visibility = 'visible';\n this.selectedIndicator.nativeElement.style.transitionDuration = duration > 0 ? `${duration}s` : 'initial';\n this.selectedIndicator.nativeElement.style.width = `${element.offsetWidth}px`;\n this.selectedIndicator.nativeElement.style.transform = `translate(${element.offsetLeft}px)`;\n }\n }\n hideSelectedIndicator() {\n if (this.selectedIndicator) {\n this.selectedIndicator.nativeElement.style.visibility = 'hidden';\n }\n }\n scroll(scrollNext) {\n const tabsArray = this.items.toArray();\n for (let index = 0; index < tabsArray.length; index++) {\n const tab = tabsArray[index];\n const element = tab.headerComponent.nativeElement;\n if (scrollNext) {\n if (element.offsetWidth + this.getElementOffset(element) > this.viewPort.nativeElement.offsetWidth + this.offset) {\n this.scrollElement(element, scrollNext);\n break;\n }\n }\n else {\n if (this.getElementOffset(element) >= this.offset) {\n this.scrollElement(tabsArray[index - 1].headerComponent.nativeElement, scrollNext);\n break;\n }\n }\n }\n }\n scrollElement(element, scrollNext) {\n const viewPortWidth = this.viewPort.nativeElement.offsetWidth;\n this.offset = (scrollNext) ? element.offsetWidth + this.getElementOffset(element) - viewPortWidth : this.getElementOffset(element);\n this.viewPort.nativeElement.scrollLeft = this.getOffset(this.offset);\n this.updateScrollButtons();\n }\n updateScrollButtons() {\n const itemsContainerWidth = this.getTabItemsContainerWidth();\n const scrollPrevButtonStyle = this.resolveLeftScrollButtonStyle(itemsContainerWidth);\n this.setScrollButtonStyle(this.scrollPrevButton.nativeElement, scrollPrevButtonStyle);\n const scrollNextButtonStyle = this.resolveRightScrollButtonStyle(itemsContainerWidth);\n this.setScrollButtonStyle(this.scrollNextButton.nativeElement, scrollNextButtonStyle);\n }\n setScrollButtonStyle(button, buttonStyle) {\n if (buttonStyle === TabScrollButtonStyle.Enabled) {\n button.disabled = false;\n button.style.display = '';\n }\n else if (buttonStyle === TabScrollButtonStyle.Disabled) {\n button.disabled = true;\n button.style.display = '';\n }\n else if (buttonStyle === TabScrollButtonStyle.NotDisplayed) {\n button.style.display = 'none';\n }\n }\n resolveLeftScrollButtonStyle(itemsContainerWidth) {\n const headerContainerWidth = this.headerContainer.nativeElement.offsetWidth;\n const offset = this.offset;\n if (offset === 0) {\n // Fix for IE 11, a difference is accumulated from the widths calculations.\n if (itemsContainerWidth - headerContainerWidth <= 1) {\n return TabScrollButtonStyle.NotDisplayed;\n }\n return TabScrollButtonStyle.Disabled;\n }\n else {\n return TabScrollButtonStyle.Enabled;\n }\n }\n resolveRightScrollButtonStyle(itemsContainerWidth) {\n const viewPortWidth = this.viewPort.nativeElement.offsetWidth;\n const headerContainerWidth = this.headerContainer.nativeElement.offsetWidth;\n const offset = this.offset;\n const total = offset + viewPortWidth;\n // Fix for IE 11, a difference is accumulated from the widths calculations.\n if (itemsContainerWidth - headerContainerWidth <= 1 && offset === 0) {\n return TabScrollButtonStyle.NotDisplayed;\n }\n if (itemsContainerWidth > total) {\n return TabScrollButtonStyle.Enabled;\n }\n else {\n return TabScrollButtonStyle.Disabled;\n }\n }\n getTabItemsContainerWidth() {\n // We use this hacky way to get the width of the itemsContainer,\n // because there is inconsistency in IE we cannot use offsetWidth or scrollOffset.\n const itemsContainerChildrenCount = this.itemsContainer.nativeElement.children.length;\n let itemsContainerWidth = 0;\n if (itemsContainerChildrenCount > 1) {\n const lastTab = this.itemsContainer.nativeElement.children[itemsContainerChildrenCount - 1];\n itemsContainerWidth = this.getElementOffset(lastTab) + lastTab.offsetWidth;\n }\n return itemsContainerWidth;\n }\n getOffset(offset) {\n return this.dir.rtl ? -offset : offset;\n }\n getElementOffset(element) {\n return this.dir.rtl ? this.itemsWrapper.nativeElement.offsetWidth - element.offsetLeft - element.offsetWidth : element.offsetLeft;\n }\n}\nIgxTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsComponent, deps: [{ token: IgxAngularAnimationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Component });\nIgxTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabsComponent, selector: \"igx-tabs\", inputs: { tabAlignment: \"tabAlignment\" }, host: { properties: { \"class.igx-tabs\": \"this.defaultClass\" } }, providers: [{ provide: IgxTabsBase, useExisting: IgxTabsComponent }], viewQueries: [{ propertyName: \"headerContainer\", first: true, predicate: [\"headerContainer\"], descendants: true, static: true }, { propertyName: \"viewPort\", first: true, predicate: [\"viewPort\"], descendants: true, static: true }, { propertyName: \"itemsWrapper\", first: true, predicate: [\"itemsWrapper\"], descendants: true, static: true }, { propertyName: \"itemsContainer\", first: true, predicate: [\"itemsContainer\"], descendants: true, static: true }, { propertyName: \"selectedIndicator\", first: true, predicate: [\"selectedIndicator\"], descendants: true }, { propertyName: \"scrollPrevButton\", first: true, predicate: [\"scrollPrevButton\"], descendants: true }, { propertyName: \"scrollNextButton\", first: true, predicate: [\"scrollNextButton\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    0\\\" class=\\\"igx-tabs__header-active-indicator\\\">\\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n \\n \\n \\n
    \", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tabs', providers: [{ provide: IgxTabsBase, useExisting: IgxTabsComponent }], template: \"
    \\n \\n
    \\n
    \\n
    \\n \\n \\n \\n
    \\n
    0\\\" class=\\\"igx-tabs__header-active-indicator\\\">\\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n \\n \\n \\n
    \" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: IgxDirectionality }]; }, propDecorators: { tabAlignment: [{\n type: Input\n }], headerContainer: [{\n type: ViewChild,\n args: ['headerContainer', { static: true }]\n }], viewPort: [{\n type: ViewChild,\n args: ['viewPort', { static: true }]\n }], itemsWrapper: [{\n type: ViewChild,\n args: ['itemsWrapper', { static: true }]\n }], itemsContainer: [{\n type: ViewChild,\n args: ['itemsContainer', { static: true }]\n }], selectedIndicator: [{\n type: ViewChild,\n args: ['selectedIndicator']\n }], scrollPrevButton: [{\n type: ViewChild,\n args: ['scrollPrevButton']\n }], scrollNextButton: [{\n type: ViewChild,\n args: ['scrollNextButton']\n }], defaultClass: [{\n type: HostBinding,\n args: ['class.igx-tabs']\n }] } });\n\nclass IgxTabItemComponent extends IgxTabItemDirective {\n}\nIgxTabItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxTabItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabItemComponent, selector: \"igx-tab-item\", providers: [{ provide: IgxTabItemDirective, useExisting: IgxTabItemComponent }], usesInheritance: true, ngImport: i0, template: \"\\n \\n\\n\\n \\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabItemComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tab-item', providers: [{ provide: IgxTabItemDirective, useExisting: IgxTabItemComponent }], template: \"\\n \\n\\n\\n \\n\\n\" }]\n }] });\n\nclass IgxTabHeaderComponent extends IgxTabHeaderDirective {\n /** @hidden @internal */\n get provideCssClassSelected() {\n return this.tab.selected;\n }\n /** @hidden @internal */\n get provideCssClassDisabled() {\n return this.tab.disabled;\n }\n /** @hidden @internal */\n constructor(tabs, tab, elementRef, platform, ngZone, dir) {\n super(tabs, tab, elementRef, platform);\n this.tabs = tabs;\n this.ngZone = ngZone;\n this.dir = dir;\n /** @hidden @internal */\n this.cssClass = true;\n }\n /** @hidden @internal */\n keyDown(event) {\n let unsupportedKey = false;\n const itemsArray = this.tabs.items.toArray();\n const previousIndex = itemsArray.indexOf(this.tab);\n let newIndex = previousIndex;\n const hasDisabledItems = itemsArray.some((item) => item.disabled);\n switch (event.key) {\n case this.platform.KEYMAP.ARROW_RIGHT:\n newIndex = this.getNewSelectionIndex(newIndex, itemsArray, event.key, hasDisabledItems);\n break;\n case this.platform.KEYMAP.ARROW_LEFT:\n newIndex = this.getNewSelectionIndex(newIndex, itemsArray, event.key, hasDisabledItems);\n break;\n case this.platform.KEYMAP.HOME:\n event.preventDefault();\n newIndex = 0;\n while (itemsArray[newIndex].disabled && newIndex < itemsArray.length) {\n newIndex = newIndex === itemsArray.length - 1 ? 0 : newIndex + 1;\n }\n break;\n case this.platform.KEYMAP.END:\n event.preventDefault();\n newIndex = itemsArray.length - 1;\n while (hasDisabledItems && itemsArray[newIndex].disabled && newIndex > 0) {\n newIndex = newIndex === 0 ? itemsArray.length - 1 : newIndex - 1;\n }\n break;\n case this.platform.KEYMAP.ENTER:\n if (!this.tab.panelComponent) {\n this.nativeElement.click();\n }\n unsupportedKey = true;\n break;\n case this.platform.KEYMAP.SPACE:\n event.preventDefault();\n if (!this.tab.panelComponent) {\n this.nativeElement.click();\n }\n unsupportedKey = true;\n break;\n default:\n unsupportedKey = true;\n break;\n }\n if (!unsupportedKey) {\n itemsArray[newIndex].headerComponent.nativeElement.focus({ preventScroll: true });\n if (this.tab.panelComponent) {\n this.tabs.selectedIndex = newIndex;\n }\n }\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.ngZone.runOutsideAngular(() => {\n this._resizeObserver = new (getResizeObserver())(() => {\n this.tabs.realignSelectedIndicator();\n });\n this._resizeObserver.observe(this.nativeElement);\n });\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this.ngZone.runOutsideAngular(() => {\n this._resizeObserver?.disconnect();\n });\n }\n getNewSelectionIndex(newIndex, itemsArray, key, hasDisabledItems) {\n if ((key === this.platform.KEYMAP.ARROW_RIGHT && !this.dir.rtl) || (key === this.platform.KEYMAP.ARROW_LEFT && this.dir.rtl)) {\n newIndex = newIndex === itemsArray.length - 1 ? 0 : newIndex + 1;\n while (hasDisabledItems && itemsArray[newIndex].disabled && newIndex < itemsArray.length) {\n newIndex = newIndex === itemsArray.length - 1 ? 0 : newIndex + 1;\n }\n }\n else {\n newIndex = newIndex === 0 ? itemsArray.length - 1 : newIndex - 1;\n while (hasDisabledItems && itemsArray[newIndex].disabled && newIndex >= 0) {\n newIndex = newIndex === 0 ? itemsArray.length - 1 : newIndex - 1;\n }\n }\n return newIndex;\n }\n}\nIgxTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderComponent, deps: [{ token: IgxTabsComponent }, { token: IgxTabItemDirective }, { token: i0.ElementRef }, { token: PlatformUtil }, { token: i0.NgZone }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Component });\nIgxTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabHeaderComponent, selector: \"igx-tab-header\", host: { listeners: { \"keydown\": \"keyDown($event)\" }, properties: { \"class.igx-tabs__header-item--selected\": \"this.provideCssClassSelected\", \"class.igx-tabs__header-item--disabled\": \"this.provideCssClassDisabled\", \"class.igx-tabs__header-item\": \"this.cssClass\" } }, providers: [{ provide: IgxTabHeaderBase, useExisting: IgxTabHeaderComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\\n
    \\n \\n
    \\n\\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tab-header', providers: [{ provide: IgxTabHeaderBase, useExisting: IgxTabHeaderComponent }], template: \"\\n\\n
    \\n \\n
    \\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: IgxTabsComponent }, { type: IgxTabItemDirective }, { type: i0.ElementRef }, { type: PlatformUtil }, { type: i0.NgZone }, { type: IgxDirectionality }]; }, propDecorators: { provideCssClassSelected: [{\n type: HostBinding,\n args: ['class.igx-tabs__header-item--selected']\n }], provideCssClassDisabled: [{\n type: HostBinding,\n args: ['class.igx-tabs__header-item--disabled']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-tabs__header-item']\n }], keyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\nclass IgxTabHeaderLabelDirective {\n}\nIgxTabHeaderLabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxTabHeaderLabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabHeaderLabelDirective, selector: \"igx-tab-header-label,[igxTabHeaderLabel]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderLabelDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-tab-header-label,[igxTabHeaderLabel]'\n }]\n }] });\nclass IgxTabHeaderIconDirective {\n}\nIgxTabHeaderIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxTabHeaderIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabHeaderIconDirective, selector: \"igx-tab-header-icon,[igxTabHeaderIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabHeaderIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'igx-tab-header-icon,[igxTabHeaderIcon]'\n }]\n }] });\n\nclass IgxTabContentComponent extends IgxTabContentDirective {\n constructor() {\n super(...arguments);\n /** @hidden */\n this.cssClass = true;\n }\n}\nIgxTabContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxTabContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxTabContentComponent, selector: \"igx-tab-content\", host: { properties: { \"class.igx-tabs__panel\": \"this.cssClass\" } }, providers: [{ provide: IgxTabContentBase, useExisting: IgxTabContentComponent }], usesInheritance: true, ngImport: i0, template: \"\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabContentComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-tab-content', providers: [{ provide: IgxTabContentBase, useExisting: IgxTabContentComponent }], template: \"\\n\" }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-tabs__panel']\n }] } });\n\n/** @hidden */\nclass IgxTabsModule {\n}\nIgxTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsModule, declarations: [IgxTabsComponent,\n IgxTabItemComponent,\n IgxTabHeaderComponent,\n IgxTabContentComponent,\n IgxTabHeaderLabelDirective,\n IgxTabHeaderIconDirective], imports: [CommonModule, IgxIconModule, IgxRippleModule, IgxPrefixModule, IgxSuffixModule], exports: [IgxTabsComponent,\n IgxTabItemComponent,\n IgxTabHeaderComponent,\n IgxTabContentComponent,\n IgxTabHeaderLabelDirective,\n IgxTabHeaderIconDirective,\n IgxPrefixModule,\n IgxSuffixModule] });\nIgxTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsModule, imports: [CommonModule, IgxIconModule, IgxRippleModule, IgxPrefixModule, IgxSuffixModule, IgxPrefixModule,\n IgxSuffixModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxTabsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxTabsComponent,\n IgxTabItemComponent,\n IgxTabHeaderComponent,\n IgxTabContentComponent,\n IgxTabHeaderLabelDirective,\n IgxTabHeaderIconDirective\n ],\n exports: [\n IgxTabsComponent,\n IgxTabItemComponent,\n IgxTabHeaderComponent,\n IgxTabContentComponent,\n IgxTabHeaderLabelDirective,\n IgxTabHeaderIconDirective,\n IgxPrefixModule,\n IgxSuffixModule\n ],\n imports: [CommonModule, IgxIconModule, IgxRippleModule, IgxPrefixModule, IgxSuffixModule]\n }]\n }] });\n\nlet NEXT_ID$1 = 0;\n/**\n * **Ignite UI for Angular Toast** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/toast)\n *\n * The Ignite UI Toast provides information and warning messages that are non-interactive and cannot\n * be dismissed by the user. Toasts can be displayed at the bottom, middle, or top of the page.\n *\n * Example:\n * ```html\n * \n * \n * Notification displayed\n * \n * ```\n */\nclass IgxToastComponent extends IgxNotificationsDirective {\n /**\n * Get the position and animation settings used by the toast.\n * ```typescript\n * @ViewChild('toast', { static: true }) public toast: IgxToastComponent;\n * let currentPosition: PositionSettings = this.toast.positionSettings\n * ```\n */\n get positionSettings() {\n return this._positionSettings;\n }\n /**\n * Set the position and animation settings used by the toast.\n * ```html\n * \n * ```\n * ```typescript\n * import { slideInTop, slideOutBottom } from 'igniteui-angular';\n * ...\n * @ViewChild('toast', { static: true }) public toast: IgxToastComponent;\n * public newPositionSettings: PositionSettings = {\n * openAnimation: useAnimation(slideInTop, { params: { duration: '1000ms', fromPosition: 'translateY(100%)'}}),\n * closeAnimation: useAnimation(slideOutBottom, { params: { duration: '1000ms', fromPosition: 'translateY(0)'}}),\n * horizontalDirection: HorizontalAlignment.Left,\n * verticalDirection: VerticalAlignment.Middle,\n * horizontalStartPoint: HorizontalAlignment.Left,\n * verticalStartPoint: VerticalAlignment.Middle\n * };\n * this.toast.positionSettings = this.newPositionSettings;\n * ```\n */\n set positionSettings(settings) {\n this._positionSettings = settings;\n }\n /**\n * Gets the nativeElement of the toast.\n * ```typescript\n * let nativeElement = this.toast.element;\n * ```\n *\n * @memberof IgxToastComponent\n */\n get element() {\n return this._element.nativeElement;\n }\n constructor(_element, cdr, navService, overlayService) {\n super(_element, cdr, overlayService, navService);\n this._element = _element;\n /**\n * @hidden\n */\n this.cssClass = 'igx-toast';\n /**\n * Sets/gets the `id` of the toast.\n * If not set, the `id` will have value `\"igx-toast-0\"`.\n * ```html\n * \n * ```\n * ```typescript\n * let toastId = this.toast.id;\n * ```\n */\n this.id = `igx-toast-${NEXT_ID$1++}`;\n /**\n * Sets/gets the `role` attribute.\n * If not set, `role` will have value `\"alert\"`.\n * ```html\n * \n * ```\n * ```typescript\n * let toastRole = this.toast.role;\n * ```\n *\n * @memberof IgxToastComponent\n */\n this.role = 'alert';\n /**\n * @hidden\n */\n this.isVisibleChange = new EventEmitter();\n this._positionSettings = {\n horizontalDirection: HorizontalAlignment.Center,\n verticalDirection: VerticalAlignment.Bottom,\n openAnimation: useAnimation(fadeIn),\n closeAnimation: useAnimation(fadeOut),\n };\n }\n /**\n * Shows the toast.\n * If `autoHide` is enabled, the toast will hide after `displayTime` is over.\n *\n * ```typescript\n * this.toast.open();\n * ```\n */\n open(message, settings) {\n if (message !== undefined) {\n this.textMessage = message;\n }\n if (settings !== undefined) {\n this.positionSettings = settings;\n }\n this.strategy = new GlobalPositionStrategy(this.positionSettings);\n super.open();\n }\n /**\n * Opens or closes the toast, depending on its current state.\n *\n * ```typescript\n * this.toast.toggle();\n * ```\n */\n toggle() {\n if (this.collapsed || this.isClosing) {\n this.open();\n }\n else {\n this.close();\n }\n }\n /**\n * @hidden\n */\n ngOnInit() {\n this.opened.pipe(takeUntil(this.destroy$)).subscribe(() => {\n const openedEventArgs = { owner: this, id: this._overlayId };\n this.isVisibleChange.emit(openedEventArgs);\n });\n this.closed.pipe(takeUntil(this.destroy$)).subscribe(() => {\n const closedEventArgs = { owner: this, id: this._overlayId };\n this.isVisibleChange.emit(closedEventArgs);\n });\n }\n}\nIgxToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToastComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxNavigationService, optional: true }, { token: IgxOverlayService }], target: i0.ɵɵFactoryTarget.Component });\nIgxToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxToastComponent, selector: \"igx-toast\", inputs: { id: \"id\", role: \"role\", positionSettings: \"positionSettings\" }, outputs: { isVisibleChange: \"isVisibleChange\" }, host: { properties: { \"class.igx-toast\": \"this.cssClass\", \"attr.id\": \"this.id\", \"attr.role\": \"this.role\" } }, usesInheritance: true, ngImport: i0, template: \"\\n{{ textMessage }}\\n\\n\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToastComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-toast', template: \"\\n{{ textMessage }}\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: IgxNavigationService, decorators: [{\n type: Optional\n }] }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }]; }, propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-toast']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }, {\n type: Input\n }], isVisibleChange: [{\n type: Output\n }], positionSettings: [{\n type: Input\n }] } });\n/**\n * @hidden\n */\nclass IgxToastModule {\n}\nIgxToastModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToastModule, declarations: [IgxToastComponent], imports: [CommonModule], exports: [IgxToastComponent] });\nIgxToastModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToastModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxToastModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [IgxToastComponent],\n exports: [IgxToastComponent],\n imports: [CommonModule],\n }]\n }] });\n\n/**\n * Represents individual resizable/collapsible panes.\n *\n * @igxModule IgxSplitterModule\n *\n * @igxParent IgxSplitterComponent\n *\n * @igxKeywords pane\n *\n * @igxGroup presentation\n *\n * @remarks\n * Users can control the resize behavior via the min and max size properties.\n */\nclass IgxSplitterPaneComponent {\n /**\n * Gets/Sets the minimum allowed size of the current pane.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n get minSize() {\n return this._minSize;\n }\n ;\n set minSize(value) {\n this._minSize = value;\n if (this.owner) {\n this.owner.panes.notifyOnChanges();\n }\n }\n /**\n * Gets/Set the maximum allowed size of the current pane.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n get maxSize() {\n return this._maxSize;\n }\n ;\n set maxSize(value) {\n this._maxSize = value;\n if (this.owner) {\n this.owner.panes.notifyOnChanges();\n }\n }\n /**\n * Gets/Sets the size of the current pane.\n * * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n get size() {\n return this._size;\n }\n set size(value) {\n this._size = value;\n this.el.nativeElement.style.flex = this.flex;\n }\n /** @hidden @internal */\n get isPercentageSize() {\n return this.size === 'auto' || this.size.indexOf('%') !== -1;\n }\n /** @hidden @internal */\n get dragSize() {\n return this._dragSize;\n }\n set dragSize(val) {\n this._dragSize = val;\n this.el.nativeElement.style.flex = this.flex;\n }\n /**\n *\n * @hidden @internal\n * Gets the host native element.\n */\n get element() {\n return this.el.nativeElement;\n }\n /**\n * @hidden @internal\n * Gets the `flex` property of the current `IgxSplitterPaneComponent`.\n */\n get flex() {\n const isAuto = this.size === 'auto' && !this.dragSize;\n const grow = !isAuto ? 0 : 1;\n const size = this.dragSize || this.size;\n return `${grow} ${grow} ${size}`;\n }\n /**\n * Gets/Sets whether current pane is collapsed.\n *\n * @example\n * ```typescript\n * const isCollapsed = pane.collapsed;\n * ```\n */\n set collapsed(value) {\n if (this.owner) {\n // reset sibling sizes when pane collapse state changes.\n this._getSiblings().forEach(sibling => {\n sibling.size = 'auto';\n sibling.dragSize = null;\n });\n }\n this._collapsed = value;\n this.display = this._collapsed ? 'none' : 'flex';\n this.collapsedChange.emit(this._collapsed);\n }\n get collapsed() {\n return this._collapsed;\n }\n constructor(el) {\n this.el = el;\n /**\n * @hidden @internal\n * Gets/Sets the 'display' property of the current pane.\n */\n this.display = 'flex';\n /**\n * Gets/Sets whether pane is resizable.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n * @remarks\n * If pane is not resizable its related splitter bar cannot be dragged.\n */\n this.resizable = true;\n /**\n * Event fired when collapsed state of pane is changed.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n this.collapsedChange = new EventEmitter();\n /**\n * @hidden @internal\n * Gets/Sets the `overflow`.\n */\n this.overflow = 'auto';\n /**\n * @hidden @internal\n * Get/Sets the `minWidth` properties of the current pane.\n */\n this.minWidth = '0';\n /**\n * @hidden @internal\n * Get/Sets the `maxWidth` properties of the current pane.\n */\n this.maxWidth = '100%';\n /**\n * @hidden @internal\n * Gets/Sets the `minHeight` properties of the current pane.\n */\n this.minHeight = '0';\n /**\n * @hidden @internal\n * Gets/Sets the `maxHeight` properties of the current `IgxSplitterPaneComponent`.\n */\n this.maxHeight = '100%';\n this._size = 'auto';\n this._collapsed = false;\n }\n /**\n * Toggles the collapsed state of the pane.\n *\n * @example\n * ```typescript\n * pane.toggle();\n * ```\n */\n toggle() {\n this.collapsed = !this.collapsed;\n }\n /** @hidden @internal */\n _getSiblings() {\n const panes = this.owner.panes.toArray();\n const index = panes.indexOf(this);\n const siblings = [];\n if (index !== 0) {\n siblings.push(panes[index - 1]);\n }\n if (index !== panes.length - 1) {\n siblings.push(panes[index + 1]);\n }\n return siblings;\n }\n}\nIgxSplitterPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterPaneComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxSplitterPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSplitterPaneComponent, selector: \"igx-splitter-pane\", inputs: { minSize: \"minSize\", maxSize: \"maxSize\", resizable: \"resizable\", size: \"size\", collapsed: \"collapsed\" }, outputs: { collapsedChange: \"collapsedChange\" }, host: { properties: { \"style.display\": \"this.display\", \"style.order\": \"this.order\", \"style.overflow\": \"this.overflow\", \"style.min-width\": \"this.minWidth\", \"style.max-width\": \"this.maxWidth\", \"style.min-height\": \"this.minHeight\", \"style.max-height\": \"this.maxHeight\", \"style.flex\": \"this.flex\" } }, ngImport: i0, template: \"\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterPaneComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-splitter-pane', template: \"\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { display: [{\n type: HostBinding,\n args: ['style.display']\n }], minSize: [{\n type: Input\n }], maxSize: [{\n type: Input\n }], resizable: [{\n type: Input\n }], collapsedChange: [{\n type: Output\n }], order: [{\n type: HostBinding,\n args: ['style.order']\n }], overflow: [{\n type: HostBinding,\n args: ['style.overflow']\n }], minWidth: [{\n type: HostBinding,\n args: ['style.min-width']\n }], maxWidth: [{\n type: HostBinding,\n args: ['style.max-width']\n }], minHeight: [{\n type: HostBinding,\n args: ['style.min-height']\n }], maxHeight: [{\n type: HostBinding,\n args: ['style.max-height']\n }], size: [{\n type: Input\n }], flex: [{\n type: HostBinding,\n args: ['style.flex']\n }], collapsed: [{\n type: Input\n }] } });\n\n/**\n * An enumeration that defines the `SplitterComponent` panes orientation.\n */\nvar SplitterType;\n(function (SplitterType) {\n SplitterType[SplitterType[\"Horizontal\"] = 0] = \"Horizontal\";\n SplitterType[SplitterType[\"Vertical\"] = 1] = \"Vertical\";\n})(SplitterType || (SplitterType = {}));\n/**\n * Provides a framework for a simple layout, splitting the view horizontally or vertically\n * into multiple smaller resizable and collapsible areas.\n *\n * @igxModule IgxSplitterModule\n *\n * @igxParent Layouts\n *\n * @igxTheme igx-splitter-theme\n *\n * @igxKeywords splitter panes layout\n *\n * @igxGroup presentation\n *\n * @example\n * ```html\n * \n * \n * ...\n * \n * \n * ...\n * \n * \n * ```\n */\nclass IgxSplitterComponent {\n /**\n * @hidden\n * @internal\n */\n get orientation() {\n return this.type === SplitterType.Horizontal ? 'horizontal' : 'vertical';\n }\n constructor(document, elementRef) {\n this.document = document;\n this.elementRef = elementRef;\n /**\n * @hidden\n * @internal\n */\n this.cssClass = 'igx-splitter';\n /**\n * @hidden @internal\n * Gets/Sets the `overflow` property of the current splitter.\n */\n this.overflow = 'hidden';\n /**\n * @hidden @internal\n * Sets/Gets the `display` property of the current splitter.\n */\n this.display = 'flex';\n /**\n * Event fired when resizing of panes starts.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n this.resizeStart = new EventEmitter();\n /**\n * Event fired when resizing of panes is in progress.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n this.resizing = new EventEmitter();\n /**\n * Event fired when resizing of panes ends.\n *\n * @example\n * ```html\n * \n * ...\n * \n * ```\n */\n this.resizeEnd = new EventEmitter();\n this._type = SplitterType.Horizontal;\n }\n /**\n * Gets/Sets the splitter orientation.\n *\n * @example\n * ```html\n * ...\n * ```\n */\n get type() {\n return this._type;\n }\n set type(value) {\n this._type = value;\n this.resetPaneSizes();\n this.panes?.notifyOnChanges();\n }\n /**\n * @hidden @internal\n * Gets the `flex-direction` property of the current `SplitterComponent`.\n */\n get direction() {\n return this.type === SplitterType.Horizontal ? 'row' : 'column';\n }\n /** @hidden @internal */\n ngAfterContentInit() {\n this.initPanes();\n this.panes.changes.subscribe(() => {\n this.initPanes();\n });\n }\n /**\n * @hidden @internal\n * This method performs initialization logic when the user starts dragging the splitter bar between each pair of panes.\n * @param pane - the main pane associated with the currently dragged bar.\n */\n onMoveStart(pane) {\n const panes = this.panes.toArray();\n this.pane = pane;\n this.sibling = panes[panes.indexOf(this.pane) + 1];\n const paneRect = this.pane.element.getBoundingClientRect();\n this.initialPaneSize = this.type === SplitterType.Horizontal ? paneRect.width : paneRect.height;\n const siblingRect = this.sibling.element.getBoundingClientRect();\n this.initialSiblingSize = this.type === SplitterType.Horizontal ? siblingRect.width : siblingRect.height;\n const args = { pane: this.pane, sibling: this.sibling };\n this.resizeStart.emit(args);\n }\n /**\n * @hidden @internal\n * This method performs calculations concerning the sizes of each pair of panes when the bar between them is dragged.\n * @param delta - The difference along the X (or Y) axis between the initial and the current point when dragging the bar.\n */\n onMoving(delta) {\n const min = parseInt(this.pane.minSize, 10) || 0;\n const max = parseInt(this.pane.maxSize, 10) || this.initialPaneSize + this.initialSiblingSize;\n const minSibling = parseInt(this.sibling.minSize, 10) || 0;\n const maxSibling = parseInt(this.sibling.maxSize, 10) || this.initialPaneSize + this.initialSiblingSize;\n const paneSize = this.initialPaneSize - delta;\n const siblingSize = this.initialSiblingSize + delta;\n if (paneSize < min || paneSize > max || siblingSize < minSibling || siblingSize > maxSibling) {\n return;\n }\n this.pane.dragSize = paneSize + 'px';\n this.sibling.dragSize = siblingSize + 'px';\n const args = { pane: this.pane, sibling: this.sibling };\n this.resizing.emit(args);\n }\n onMoveEnd(delta) {\n const min = parseInt(this.pane.minSize, 10) || 0;\n const max = parseInt(this.pane.maxSize, 10) || this.initialPaneSize + this.initialSiblingSize;\n const minSibling = parseInt(this.sibling.minSize, 10) || 0;\n const maxSibling = parseInt(this.sibling.maxSize, 10) || this.initialPaneSize + this.initialSiblingSize;\n const paneSize = this.initialPaneSize - delta;\n const siblingSize = this.initialSiblingSize + delta;\n if (paneSize < min || paneSize > max || siblingSize < minSibling || siblingSize > maxSibling) {\n return;\n }\n if (this.pane.isPercentageSize) {\n // handle % resizes\n const totalSize = this.getTotalSize();\n const percentPaneSize = (paneSize / totalSize) * 100;\n this.pane.size = percentPaneSize + '%';\n }\n else {\n // px resize\n this.pane.size = paneSize + 'px';\n }\n if (this.sibling.isPercentageSize) {\n // handle % resizes\n const totalSize = this.getTotalSize();\n const percentSiblingPaneSize = (siblingSize / totalSize) * 100;\n this.sibling.size = percentSiblingPaneSize + '%';\n }\n else {\n // px resize\n this.sibling.size = siblingSize + 'px';\n }\n this.pane.dragSize = null;\n this.sibling.dragSize = null;\n const args = { pane: this.pane, sibling: this.sibling };\n this.resizeEnd.emit(args);\n }\n /** @hidden @internal */\n getPaneSiblingsByOrder(order, barIndex) {\n const panes = this.panes.toArray();\n const prevPane = panes[order - barIndex - 1];\n const nextPane = panes[order - barIndex];\n const siblings = [prevPane, nextPane];\n return siblings;\n }\n getTotalSize() {\n const computed = this.document.defaultView.getComputedStyle(this.elementRef.nativeElement);\n const totalSize = this.type === SplitterType.Horizontal ? computed.getPropertyValue('width') : computed.getPropertyValue('height');\n return parseFloat(totalSize);\n }\n /**\n * @hidden @internal\n * This method inits panes with properties.\n */\n initPanes() {\n this.panes.forEach(pane => {\n pane.owner = this;\n if (this.type === SplitterType.Horizontal) {\n pane.minWidth = pane.minSize ?? '0';\n pane.maxWidth = pane.maxSize ?? '100%';\n }\n else {\n pane.minHeight = pane.minSize ?? '0';\n pane.maxHeight = pane.maxSize ?? '100%';\n }\n });\n this.assignFlexOrder();\n if (this.panes.filter(x => x.collapsed).length > 0) {\n // if any panes are collapsed, reset sizes.\n this.resetPaneSizes();\n }\n }\n /**\n * @hidden @internal\n * This method reset pane sizes.\n */\n resetPaneSizes() {\n if (this.panes) {\n // if type is changed runtime, should reset sizes.\n this.panes.forEach(x => {\n x.size = 'auto';\n x.minWidth = '0';\n x.maxWidth = '100%';\n x.minHeight = '0';\n x.maxHeight = '100%';\n });\n }\n }\n /**\n * @hidden @internal\n * This method assigns the order of each pane.\n */\n assignFlexOrder() {\n let k = 0;\n this.panes.forEach((pane) => {\n pane.order = k;\n k += 2;\n });\n }\n}\nIgxSplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterComponent, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxSplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSplitterComponent, selector: \"igx-splitter\", inputs: { type: \"type\" }, outputs: { resizeStart: \"resizeStart\", resizing: \"resizing\", resizeEnd: \"resizeEnd\" }, host: { properties: { \"class.igx-splitter\": \"this.cssClass\", \"style.overflow\": \"this.overflow\", \"style.display\": \"this.display\", \"attr.aria-orientation\": \"this.orientation\", \"style.flex-direction\": \"this.direction\" } }, queries: [{ propertyName: \"panes\", predicate: IgxSplitterPaneComponent, read: IgxSplitterPaneComponent }], ngImport: i0, template: \"\\n\\n \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: i0.forwardRef(function () { return IgxSplitBarComponent; }), selector: \"igx-splitter-bar\", inputs: [\"type\", \"order\", \"pane\", \"siblings\"], outputs: [\"moveStart\", \"moving\", \"movingEnd\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-splitter', template: \"\\n\\n \\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ElementRef }]; }, propDecorators: { panes: [{\n type: ContentChildren,\n args: [IgxSplitterPaneComponent, { read: IgxSplitterPaneComponent }]\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-splitter']\n }], overflow: [{\n type: HostBinding,\n args: ['style.overflow']\n }], display: [{\n type: HostBinding,\n args: ['style.display']\n }], orientation: [{\n type: HostBinding,\n args: ['attr.aria-orientation']\n }], resizeStart: [{\n type: Output\n }], resizing: [{\n type: Output\n }], resizeEnd: [{\n type: Output\n }], type: [{\n type: Input\n }], direction: [{\n type: HostBinding,\n args: ['style.flex-direction']\n }] } });\nconst SPLITTER_INTERACTION_KEYS = new Set('right down left up arrowright arrowdown arrowleft arrowup'.split(' '));\n/**\n * @hidden @internal\n * Represents the draggable bar that visually separates panes and allows for changing their sizes.\n */\nclass IgxSplitBarComponent {\n constructor() {\n /**\n * Set css class to the host element.\n */\n this.cssClass = 'igx-splitter-bar-host';\n /**\n * Gets/Sets the orientation.\n */\n this.type = SplitterType.Horizontal;\n /**\n * An event that is emitted whenever we start dragging the current `SplitBarComponent`.\n */\n this.moveStart = new EventEmitter();\n /**\n * An event that is emitted while we are dragging the current `SplitBarComponent`.\n */\n this.moving = new EventEmitter();\n this.movingEnd = new EventEmitter();\n }\n /**\n * @hidden\n * @internal\n */\n get tabindex() {\n return this.resizeDisallowed ? null : 0;\n }\n /**\n * @hidden\n * @internal\n */\n get orientation() {\n return this.type === SplitterType.Horizontal ? 'horizontal' : 'vertical';\n }\n /**\n * @hidden\n * @internal\n */\n get cursor() {\n if (this.resizeDisallowed) {\n return '';\n }\n return this.type === SplitterType.Horizontal ? 'col-resize' : 'row-resize';\n }\n /**\n * @hidden @internal\n */\n get prevButtonHidden() {\n return this.siblings[0].collapsed && !this.siblings[1].collapsed;\n }\n /**\n * @hidden @internal\n */\n keyEvent(event) {\n const key = event.key.toLowerCase();\n const ctrl = event.ctrlKey;\n event.stopPropagation();\n if (SPLITTER_INTERACTION_KEYS.has(key)) {\n event.preventDefault();\n }\n switch (key) {\n case 'arrowup':\n case 'up':\n if (this.type === SplitterType.Vertical) {\n if (ctrl) {\n this.onCollapsing(false);\n break;\n }\n if (!this.resizeDisallowed) {\n event.preventDefault();\n this.moveStart.emit(this.pane);\n this.moving.emit(10);\n }\n }\n break;\n case 'arrowdown':\n case 'down':\n if (this.type === SplitterType.Vertical) {\n if (ctrl) {\n this.onCollapsing(true);\n break;\n }\n if (!this.resizeDisallowed) {\n event.preventDefault();\n this.moveStart.emit(this.pane);\n this.moving.emit(-10);\n }\n }\n break;\n case 'arrowleft':\n case 'left':\n if (this.type === SplitterType.Horizontal) {\n if (ctrl) {\n this.onCollapsing(false);\n break;\n }\n if (!this.resizeDisallowed) {\n event.preventDefault();\n this.moveStart.emit(this.pane);\n this.moving.emit(10);\n }\n }\n break;\n case 'arrowright':\n case 'right':\n if (this.type === SplitterType.Horizontal) {\n if (ctrl) {\n this.onCollapsing(true);\n break;\n }\n if (!this.resizeDisallowed) {\n event.preventDefault();\n this.moveStart.emit(this.pane);\n this.moving.emit(-10);\n }\n }\n break;\n default:\n break;\n }\n }\n /**\n * @hidden @internal\n */\n get dragDir() {\n return this.type === SplitterType.Horizontal ? DragDirection.VERTICAL : DragDirection.HORIZONTAL;\n }\n /**\n * @hidden @internal\n */\n get nextButtonHidden() {\n return this.siblings[1].collapsed && !this.siblings[0].collapsed;\n }\n /**\n * @hidden @internal\n */\n onDragStart(event) {\n if (this.resizeDisallowed) {\n event.cancel = true;\n return;\n }\n this.startPoint = this.type === SplitterType.Horizontal ? event.startX : event.startY;\n this.moveStart.emit(this.pane);\n }\n /**\n * @hidden @internal\n */\n onDragMove(event) {\n const isHorizontal = this.type === SplitterType.Horizontal;\n const curr = isHorizontal ? event.pageX : event.pageY;\n const delta = this.startPoint - curr;\n if (delta !== 0) {\n this.moving.emit(delta);\n event.cancel = true;\n event.owner.element.nativeElement.style.transform = '';\n }\n }\n onDragEnd(event) {\n const isHorizontal = this.type === SplitterType.Horizontal;\n const curr = isHorizontal ? event.pageX : event.pageY;\n const delta = this.startPoint - curr;\n if (delta !== 0) {\n this.movingEnd.emit(delta);\n }\n }\n get resizeDisallowed() {\n const relatedTabs = this.siblings;\n return !!relatedTabs.find(x => x.resizable === false || x.collapsed === true);\n }\n /**\n * @hidden @internal\n */\n onCollapsing(next) {\n const prevSibling = this.siblings[0];\n const nextSibling = this.siblings[1];\n let target;\n if (next) {\n // if next is clicked when prev pane is hidden, show prev pane, else hide next pane.\n target = prevSibling.collapsed ? prevSibling : nextSibling;\n }\n else {\n // if prev is clicked when next pane is hidden, show next pane, else hide prev pane.\n target = nextSibling.collapsed ? nextSibling : prevSibling;\n }\n target.toggle();\n }\n}\nIgxSplitBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nIgxSplitBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxSplitBarComponent, selector: \"igx-splitter-bar\", inputs: { type: \"type\", order: \"order\", pane: \"pane\", siblings: \"siblings\" }, outputs: { moveStart: \"moveStart\", moving: \"moving\", movingEnd: \"movingEnd\" }, host: { listeners: { \"keydown\": \"keyEvent($event)\" }, properties: { \"class.igx-splitter-bar-host\": \"this.cssClass\", \"style.order\": \"this.order\", \"attr.tabindex\": \"this.tabindex\", \"attr.aria-orientation\": \"this.orientation\" } }, ngImport: i0, template: \"
    \\n
    \\n
    \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: IgxDragDirective, selector: \"[igxDrag]\", inputs: [\"igxDrag\", \"dragTolerance\", \"dragDirection\", \"dragChannel\", \"ghost\", \"ghostClass\", \"ghostTemplate\", \"ghostHost\", \"scrollContainer\", \"ghostOffsetX\", \"ghostOffsetY\"], outputs: [\"dragStart\", \"dragMove\", \"dragEnd\", \"dragClick\", \"ghostCreate\", \"ghostDestroy\", \"transitioned\"], exportAs: [\"drag\"] }, { kind: \"directive\", type: IgxDragIgnoreDirective, selector: \"[igxDragIgnore]\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitBarComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-splitter-bar', template: \"
    \\n
    \\n
    \\n
    \\n
    \\n\" }]\n }], propDecorators: { cssClass: [{\n type: HostBinding,\n args: ['class.igx-splitter-bar-host']\n }], type: [{\n type: Input\n }], order: [{\n type: HostBinding,\n args: ['style.order']\n }, {\n type: Input\n }], tabindex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }], orientation: [{\n type: HostBinding,\n args: ['attr.aria-orientation']\n }], pane: [{\n type: Input\n }], siblings: [{\n type: Input\n }], moveStart: [{\n type: Output\n }], moving: [{\n type: Output\n }], movingEnd: [{\n type: Output\n }], keyEvent: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\nclass IgxSplitterModule {\n}\nIgxSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterModule, declarations: [IgxSplitterComponent,\n IgxSplitterPaneComponent,\n IgxSplitBarComponent], imports: [CommonModule, IgxIconModule, IgxDragDropModule], exports: [IgxSplitterComponent,\n IgxSplitterPaneComponent] });\nIgxSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterModule, imports: [CommonModule, IgxIconModule, IgxDragDropModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxSplitterModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n CommonModule, IgxIconModule, IgxDragDropModule\n ],\n declarations: [\n IgxSplitterComponent,\n IgxSplitterPaneComponent,\n IgxSplitBarComponent\n ],\n exports: [\n IgxSplitterComponent,\n IgxSplitterPaneComponent\n ]\n }]\n }] });\n\n// Enums\nconst IgxStepperOrientation = {\n Horizontal: 'horizontal',\n Vertical: 'vertical'\n};\nconst IgxStepType = {\n Indicator: 'indicator',\n Title: 'title',\n Full: 'full'\n};\nconst IgxStepperTitlePosition = {\n Bottom: 'bottom',\n Top: 'top',\n End: 'end',\n Start: 'start'\n};\nconst VerticalAnimationType = {\n Grow: 'grow',\n Fade: 'fade',\n None: 'none'\n};\n// Token\nconst IGX_STEPPER_COMPONENT = new InjectionToken('IgxStepperToken');\nconst IGX_STEP_COMPONENT = new InjectionToken('IgxStepToken');\n\n/** @hidden @internal */\nclass IgxStepperService {\n constructor() {\n this.collapsingSteps = new Set();\n this.linearDisabledSteps = new Set();\n this.visitedSteps = new Set();\n }\n /**\n * Activates the step, fires the steps change event and plays animations.\n */\n expand(step) {\n if (this.activeStep === step) {\n return;\n }\n const cancel = this.emitActivatingEvent(step);\n if (cancel) {\n return;\n }\n this.collapsingSteps.delete(step);\n this.previousActiveStep = this.activeStep;\n this.activeStep = step;\n this.activeStep.activeChange.emit(true);\n this.collapsingSteps.add(this.previousActiveStep);\n this.visitedSteps.add(this.activeStep);\n if (this.stepper.orientation === IgxStepperOrientation.Vertical) {\n this.previousActiveStep.playCloseAnimation(this.previousActiveStep.contentContainer);\n this.activeStep.cdr.detectChanges();\n this.activeStep.playOpenAnimation(this.activeStep.contentContainer);\n }\n else {\n this.activeStep.cdr.detectChanges();\n this.stepper.playHorizontalAnimations();\n }\n }\n /**\n * Activates the step and fires the steps change event without playing animations.\n */\n expandThroughApi(step) {\n if (this.activeStep === step) {\n return;\n }\n this.collapsingSteps.clear();\n this.previousActiveStep = this.activeStep;\n this.activeStep = step;\n if (this.previousActiveStep) {\n this.previousActiveStep.tabIndex = -1;\n }\n this.activeStep.tabIndex = 0;\n this.visitedSteps.add(this.activeStep);\n this.activeStep.cdr.detectChanges();\n this.previousActiveStep?.cdr.detectChanges();\n this.activeStep.activeChange.emit(true);\n this.previousActiveStep?.activeChange.emit(false);\n }\n /**\n * Collapses the currently active step and fires the change event.\n */\n collapse(step) {\n if (this.activeStep === step) {\n return;\n }\n step.activeChange.emit(false);\n this.collapsingSteps.delete(step);\n }\n /**\n * Determines the steps that should be marked as visited based on the active step.\n */\n calculateVisitedSteps() {\n this.stepper.steps.forEach(step => {\n if (step.index <= this.activeStep.index) {\n this.visitedSteps.add(step);\n }\n else {\n this.visitedSteps.delete(step);\n }\n });\n }\n /**\n * Determines the steps that should be disabled in linear mode based on the validity of the active step.\n */\n calculateLinearDisabledSteps() {\n if (!this.activeStep) {\n return;\n }\n if (this.activeStep.isValid) {\n const firstRequiredIndex = this.getNextRequiredStep();\n if (firstRequiredIndex !== -1) {\n this.updateLinearDisabledSteps(firstRequiredIndex);\n }\n else {\n this.linearDisabledSteps.clear();\n }\n }\n else {\n this.stepper.steps.forEach(s => {\n if (s.index > this.activeStep.index) {\n this.linearDisabledSteps.add(s);\n }\n });\n }\n }\n emitActivatingEvent(step) {\n const args = {\n owner: this.stepper,\n newIndex: step.index,\n oldIndex: this.activeStep.index,\n cancel: false\n };\n this.stepper.activeStepChanging.emit(args);\n return args.cancel;\n }\n /**\n * Updates the linearDisabled steps from the current active step to the next required invalid step.\n *\n * @param toIndex the index of the last step that should be enabled.\n */\n updateLinearDisabledSteps(toIndex) {\n this.stepper.steps.forEach(s => {\n if (s.index > this.activeStep.index) {\n if (s.index <= toIndex) {\n this.linearDisabledSteps.delete(s);\n }\n else {\n this.linearDisabledSteps.add(s);\n }\n }\n });\n }\n getNextRequiredStep() {\n if (!this.activeStep) {\n return;\n }\n return this.stepper.steps.findIndex(s => s.index > this.activeStep.index && !s.optional && !s.disabled && !s.isValid);\n }\n}\nIgxStepperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nIgxStepperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperService, decorators: [{\n type: Injectable\n }] });\n\nclass IgxStepActiveIndicatorDirective {\n}\nIgxStepActiveIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepActiveIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepActiveIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepActiveIndicatorDirective, selector: \"[igxStepActiveIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepActiveIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepActiveIndicator]'\n }]\n }] });\nclass IgxStepCompletedIndicatorDirective {\n}\nIgxStepCompletedIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepCompletedIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepCompletedIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepCompletedIndicatorDirective, selector: \"[igxStepCompletedIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepCompletedIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepCompletedIndicator]'\n }]\n }] });\nclass IgxStepInvalidIndicatorDirective {\n}\nIgxStepInvalidIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepInvalidIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepInvalidIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepInvalidIndicatorDirective, selector: \"[igxStepInvalidIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepInvalidIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepInvalidIndicator]'\n }]\n }] });\nclass IgxStepIndicatorDirective {\n}\nIgxStepIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepIndicatorDirective, selector: \"[igxStepIndicator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepIndicatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepIndicator]'\n }]\n }] });\nclass IgxStepTitleDirective {\n constructor() {\n this.defaultClass = true;\n }\n}\nIgxStepTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepTitleDirective, selector: \"[igxStepTitle]\", host: { properties: { \"class.igx-stepper__step-title\": \"this.defaultClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepTitleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepTitle]'\n }]\n }], propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-stepper__step-title']\n }] } });\nclass IgxStepSubTitleDirective {\n constructor() {\n this.defaultClass = true;\n }\n}\nIgxStepSubTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepSubTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepSubTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepSubTitleDirective, selector: \"[igxStepSubTitle]\", host: { properties: { \"class.igx-stepper__step-subtitle\": \"this.defaultClass\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepSubTitleDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepSubTitle]'\n }]\n }], propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-stepper__step-subtitle']\n }] } });\nclass IgxStepContentDirective {\n get target() {\n return this.step;\n }\n get stepId() {\n return this.target.id;\n }\n get tabIndex() {\n if (this._tabIndex !== null) {\n return this._tabIndex;\n }\n return this.stepperService.activeStep === this.target ? 0 : -1;\n }\n set tabIndex(val) {\n this._tabIndex = val;\n }\n constructor(step, stepperService, elementRef) {\n this.step = step;\n this.stepperService = stepperService;\n this.elementRef = elementRef;\n this.defaultClass = true;\n this.role = 'tabpanel';\n this.id = this.target.id.replace('step', 'content');\n this._tabIndex = null;\n }\n}\nIgxStepContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepContentDirective, deps: [{ token: IGX_STEP_COMPONENT }, { token: IgxStepperService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nIgxStepContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepContentDirective, selector: \"[igxStepContent]\", inputs: { id: \"id\", tabIndex: \"tabIndex\" }, host: { properties: { \"class.igx-stepper__step-content\": \"this.defaultClass\", \"attr.role\": \"this.role\", \"attr.aria-labelledby\": \"this.stepId\", \"attr.id\": \"this.id\", \"attr.tabindex\": \"this.tabIndex\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepContentDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxStepContent]'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_STEP_COMPONENT]\n }] }, { type: IgxStepperService }, { type: i0.ElementRef }]; }, propDecorators: { defaultClass: [{\n type: HostBinding,\n args: ['class.igx-stepper__step-content']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], stepId: [{\n type: HostBinding,\n args: ['attr.aria-labelledby']\n }], id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }, {\n type: Input\n }] } });\n\nlet NEXT_ID = 0;\n/**\n * The IgxStepComponent is used within the `igx-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @igxModule IgxStepperModule\n *\n * @igxKeywords step\n *\n * @example\n * ```html\n * \n * ...\n * \n * ...\n * \n * ...\n * \n * ```\n */\nclass IgxStepComponent extends ToggleAnimationPlayer {\n /**\n * Get/Set whether the step is interactable.\n *\n * ```html\n * \n * ...\n * \n * ...\n * \n * ```\n *\n * ```typescript\n * this.stepper.steps[1].disabled = true;\n * ```\n */\n set disabled(value) {\n this._disabled = value;\n if (this.stepper.linear) {\n this.stepperService.calculateLinearDisabledSteps();\n }\n }\n get disabled() {\n return this._disabled;\n }\n /**\n * Get/Set whether the step is valid.\n *```html\n * \n * ...\n *
    \n *
    \n * ...\n *
    \n *
    \n *
    \n * ```\n */\n get isValid() {\n return this._valid;\n }\n set isValid(value) {\n this._valid = value;\n if (this.stepper.linear && this.index !== undefined) {\n this.stepperService.calculateLinearDisabledSteps();\n }\n }\n /**\n * Get/Set the active state of the step\n *\n * ```html\n * \n * ```\n *\n * ```typescript\n * this.stepper.steps[1].active = true;\n * ```\n *\n * @param value: boolean\n */\n set active(value) {\n if (value) {\n this.stepperService.expandThroughApi(this);\n }\n else {\n this.stepperService.collapse(this);\n }\n }\n get active() {\n return this.stepperService.activeStep === this;\n }\n /** @hidden @internal */\n set tabIndex(value) {\n this._tabIndex = value;\n }\n get tabIndex() {\n return this._tabIndex;\n }\n /** @hidden @internal */\n get contentId() {\n return this.content?.id;\n }\n /** @hidden @internal */\n get generalDisabled() {\n return this.disabled || this.linearDisabled;\n }\n /** @hidden @internal */\n get titlePositionTop() {\n if (this.stepper.stepType !== IgxStepType.Full) {\n return 'igx-stepper__step--simple';\n }\n return `igx-stepper__step--${this.titlePosition}`;\n }\n /**\n * Get the step index inside of the stepper.\n *\n * ```typescript\n * const step = this.stepper.steps[1];\n * const stepIndex: number = step.index;\n * ```\n */\n get index() {\n return this._index;\n }\n /** @hidden @internal */\n get indicatorTemplate() {\n if (this.active && this.stepper.activeIndicatorTemplate) {\n return this.stepper.activeIndicatorTemplate;\n }\n if (!this.isValid && this.stepper.invalidIndicatorTemplate) {\n return this.stepper.invalidIndicatorTemplate;\n }\n if (this.completed && this.stepper.completedIndicatorTemplate) {\n return this.stepper.completedIndicatorTemplate;\n }\n if (this.indicator) {\n return this.customIndicatorTemplate;\n }\n return null;\n }\n /** @hidden @internal */\n get direction() {\n return this.stepperService.previousActiveStep\n && this.stepperService.previousActiveStep.index > this.index\n ? Direction.PREV\n : Direction.NEXT;\n }\n /** @hidden @internal */\n get isAccessible() {\n return !this.disabled && !this.linearDisabled;\n }\n /** @hidden @internal */\n get isHorizontal() {\n return this.stepper.orientation === IgxStepperOrientation.Horizontal;\n }\n /** @hidden @internal */\n get isTitleVisible() {\n return this.stepper.stepType !== IgxStepType.Indicator;\n }\n /** @hidden @internal */\n get isIndicatorVisible() {\n return this.stepper.stepType !== IgxStepType.Title;\n }\n /** @hidden @internal */\n get titlePosition() {\n return this.stepper.titlePosition ? this.stepper.titlePosition : this.stepper._defaultTitlePosition;\n }\n /** @hidden @internal */\n get linearDisabled() {\n return this.stepperService.linearDisabledSteps.has(this);\n }\n /** @hidden @internal */\n get collapsing() {\n return this.stepperService.collapsingSteps.has(this);\n }\n /** @hidden @internal */\n get animationSettings() {\n return this.stepper.verticalAnimationSettings;\n }\n /** @hidden @internal */\n get contentClasses() {\n if (this.isHorizontal) {\n return { 'igx-stepper__body-content': true, 'igx-stepper__body-content--active': this.active };\n }\n else {\n return 'igx-stepper__step-content';\n }\n }\n /** @hidden @internal */\n get stepHeaderClasses() {\n return {\n 'igx-stepper__step--optional': this.optional,\n 'igx-stepper__step-header--current': this.active,\n 'igx-stepper__step-header--invalid': !this.isValid\n && this.stepperService.visitedSteps.has(this) && !this.active && this.isAccessible\n };\n }\n /** @hidden @internal */\n get nativeElement() {\n return this.element.nativeElement;\n }\n constructor(stepper, cdr, renderer, platform, stepperService, animationService, element, dir) {\n super(animationService);\n this.stepper = stepper;\n this.cdr = cdr;\n this.renderer = renderer;\n this.platform = platform;\n this.stepperService = stepperService;\n this.element = element;\n this.dir = dir;\n /**\n * Get/Set the `id` of the step component.\n * Default value is `\"igx-step-0\"`;\n * ```html\n * \n * ```\n * ```typescript\n * const stepId = this.step.id;\n * ```\n */\n this.id = `igx-step-${NEXT_ID++}`;\n /**\n * Get/Set whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n *\n * ```html\n * \n * ...\n * \n * ...\n * \n * ```\n *\n * ```typescript\n * this.stepper.steps[1].completed = true;\n * ```\n */\n this.completed = false;\n /**\n * Get/Set whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n *\n * ```html\n * \n * ```\n * ```typescript\n * this.stepper.steps[1].optional = true;\n * ```\n */\n this.optional = false;\n /** @hidden @internal **/\n this.role = 'tab';\n /** @hidden @internal */\n this.cssClass = true;\n /**\n * Emitted when the step's `active` property changes. Can be used for two-way binding.\n *\n * ```html\n * \n * \n * ```\n *\n * ```typescript\n * const step: IgxStepComponent = this.stepper.step[0];\n * step.activeChange.subscribe((e: boolean) => console.log(\"Step active state change to \", e))\n * ```\n */\n this.activeChange = new EventEmitter();\n this._tabIndex = -1;\n this._valid = true;\n this._focused = false;\n this._disabled = false;\n }\n /** @hidden @internal */\n onFocus() {\n this._focused = true;\n this.stepperService.focusedStep = this;\n if (this.stepperService.focusedStep !== this.stepperService.activeStep) {\n this.stepperService.activeStep.tabIndex = -1;\n }\n }\n /** @hidden @internal */\n onBlur() {\n this._focused = false;\n this.stepperService.activeStep.tabIndex = 0;\n }\n /** @hidden @internal */\n handleKeydown(event) {\n if (!this._focused) {\n return;\n }\n const key = event.key;\n if (this.stepper.orientation === IgxStepperOrientation.Horizontal) {\n if (key === this.platform.KEYMAP.ARROW_UP || key === this.platform.KEYMAP.ARROW_DOWN) {\n return;\n }\n }\n if (!(this.platform.isNavigationKey(key) || this.platform.isActivationKey(event))) {\n return;\n }\n event.preventDefault();\n this.handleNavigation(key);\n }\n /** @hidden @internal */\n ngAfterViewInit() {\n this.openAnimationDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.stepperService.activeStep === this) {\n this.stepper.activeStepChanged.emit({ owner: this.stepper, index: this.index });\n }\n });\n this.closeAnimationDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.stepperService.collapse(this);\n this.cdr.markForCheck();\n });\n }\n /** @hidden @internal */\n onPointerDown(event) {\n event.stopPropagation();\n if (this.isHorizontal) {\n this.changeHorizontalActiveStep();\n }\n else {\n this.changeVerticalActiveStep();\n }\n }\n /** @hidden @internal */\n handleNavigation(key) {\n switch (key) {\n case this.platform.KEYMAP.HOME:\n this.stepper.steps.filter(s => s.isAccessible)[0]?.nativeElement.focus();\n break;\n case this.platform.KEYMAP.END:\n this.stepper.steps.filter(s => s.isAccessible).pop()?.nativeElement.focus();\n break;\n case this.platform.KEYMAP.ARROW_UP:\n this.previousStep?.nativeElement.focus();\n break;\n case this.platform.KEYMAP.ARROW_LEFT:\n if (this.dir.rtl && this.stepper.orientation === IgxStepperOrientation.Horizontal) {\n this.nextStep?.nativeElement.focus();\n }\n else {\n this.previousStep?.nativeElement.focus();\n }\n break;\n case this.platform.KEYMAP.ARROW_DOWN:\n this.nextStep?.nativeElement.focus();\n break;\n case this.platform.KEYMAP.ARROW_RIGHT:\n if (this.dir.rtl && this.stepper.orientation === IgxStepperOrientation.Horizontal) {\n this.previousStep?.nativeElement.focus();\n }\n else {\n this.nextStep?.nativeElement.focus();\n }\n break;\n case this.platform.KEYMAP.SPACE:\n case this.platform.KEYMAP.ENTER:\n if (this.isHorizontal) {\n this.changeHorizontalActiveStep();\n }\n else {\n this.changeVerticalActiveStep();\n }\n break;\n default:\n return;\n }\n }\n /** @hidden @internal */\n changeHorizontalActiveStep() {\n if (this.stepper.animationType === HorizontalAnimationType.none && this.stepperService.activeStep !== this) {\n const argsCanceled = this.stepperService.emitActivatingEvent(this);\n if (argsCanceled) {\n return;\n }\n this.active = true;\n this.stepper.activeStepChanged.emit({ owner: this.stepper, index: this.index });\n return;\n }\n this.stepperService.expand(this);\n if (this.stepper.animationType === HorizontalAnimationType.fade) {\n if (this.stepperService.collapsingSteps.has(this.stepperService.previousActiveStep)) {\n this.stepperService.previousActiveStep.active = false;\n }\n }\n }\n get nextStep() {\n const focusedStep = this.stepperService.focusedStep;\n if (focusedStep) {\n if (focusedStep.index === this.stepper.steps.length - 1) {\n return this.stepper.steps.find(s => s.isAccessible);\n }\n const nextAccessible = this.stepper.steps.find((s, i) => i > focusedStep.index && s.isAccessible);\n return nextAccessible ? nextAccessible : this.stepper.steps.find(s => s.isAccessible);\n }\n return null;\n }\n get previousStep() {\n const focusedStep = this.stepperService.focusedStep;\n if (focusedStep) {\n if (focusedStep.index === 0) {\n return this.stepper.steps.filter(s => s.isAccessible).pop();\n }\n let prevStep;\n for (let i = focusedStep.index - 1; i >= 0; i--) {\n const step = this.stepper.steps[i];\n if (step.isAccessible) {\n prevStep = step;\n break;\n }\n }\n return prevStep ? prevStep : this.stepper.steps.filter(s => s.isAccessible).pop();\n }\n return null;\n }\n changeVerticalActiveStep() {\n this.stepperService.expand(this);\n if (!this.animationSettings.closeAnimation) {\n this.stepperService.previousActiveStep.openAnimationPlayer?.finish();\n }\n if (!this.animationSettings.openAnimation) {\n this.stepperService.activeStep.closeAnimationPlayer?.finish();\n }\n }\n}\nIgxStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepComponent, deps: [{ token: IGX_STEPPER_COMPONENT }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: PlatformUtil }, { token: IgxStepperService }, { token: IgxAngularAnimationService }, { token: i0.ElementRef }, { token: IgxDirectionality }], target: i0.ɵɵFactoryTarget.Component });\nIgxStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepComponent, selector: \"igx-step\", inputs: { id: \"id\", disabled: \"disabled\", completed: \"completed\", isValid: \"isValid\", optional: \"optional\", active: \"active\", tabIndex: \"tabIndex\" }, outputs: { activeChange: \"activeChange\" }, host: { listeners: { \"focus\": \"onFocus()\", \"blur\": \"onBlur()\", \"keydown\": \"handleKeydown($event)\" }, properties: { \"attr.id\": \"this.id\", \"class.igx-stepper__step--completed\": \"this.completed\", \"attr.aria-selected\": \"this.active\", \"attr.tabindex\": \"this.tabIndex\", \"attr.role\": \"this.role\", \"attr.aria-controls\": \"this.contentId\", \"class.igx-stepper__step\": \"this.cssClass\", \"class.igx-stepper__step--disabled\": \"this.generalDisabled\", \"class\": \"this.titlePositionTop\" } }, providers: [\n { provide: IGX_STEP_COMPONENT, useExisting: IgxStepComponent }\n ], queries: [{ propertyName: \"indicator\", first: true, predicate: i0.forwardRef(function () { return IgxStepIndicatorDirective; }), descendants: true }, { propertyName: \"content\", first: true, predicate: i0.forwardRef(function () { return IgxStepContentDirective; }), descendants: true }], viewQueries: [{ propertyName: \"contentTemplate\", first: true, predicate: [\"contentTemplate\"], descendants: true, static: true }, { propertyName: \"customIndicatorTemplate\", first: true, predicate: [\"customIndicator\"], descendants: true, static: true }, { propertyName: \"contentContainer\", first: true, predicate: [\"contentContainer\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n\\n\\n\\n
    \\n \\n
    \\n
    \\n\\n\\n {{ index + 1 }}\\n\\n\\n\\n \\n\\n\\n
    \\n\\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n
    \\n\\n\\n
    \\n \\n
    \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: IgxRippleDirective, selector: \"[igxRipple]\", inputs: [\"igxRippleTarget\", \"igxRipple\", \"igxRippleDuration\", \"igxRippleCentered\", \"igxRippleDisabled\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-step', providers: [\n { provide: IGX_STEP_COMPONENT, useExisting: IgxStepComponent }\n ], template: \"\\n \\n \\n\\n\\n\\n
    \\n \\n
    \\n
    \\n\\n\\n {{ index + 1 }}\\n\\n\\n\\n \\n\\n\\n
    \\n\\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n
    \\n\\n\\n
    \\n \\n
    \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [IGX_STEPPER_COMPONENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: PlatformUtil }, { type: IgxStepperService }, { type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: i0.ElementRef }, { type: IgxDirectionality }]; }, propDecorators: { id: [{\n type: HostBinding,\n args: ['attr.id']\n }, {\n type: Input\n }], disabled: [{\n type: Input\n }], completed: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.igx-stepper__step--completed']\n }], isValid: [{\n type: Input\n }], optional: [{\n type: Input\n }], active: [{\n type: HostBinding,\n args: ['attr.aria-selected']\n }, {\n type: Input\n }], tabIndex: [{\n type: HostBinding,\n args: ['attr.tabindex']\n }, {\n type: Input\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], contentId: [{\n type: HostBinding,\n args: ['attr.aria-controls']\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-stepper__step']\n }], generalDisabled: [{\n type: HostBinding,\n args: ['class.igx-stepper__step--disabled']\n }], titlePositionTop: [{\n type: HostBinding,\n args: ['class']\n }], activeChange: [{\n type: Output\n }], contentTemplate: [{\n type: ViewChild,\n args: ['contentTemplate', { static: true }]\n }], customIndicatorTemplate: [{\n type: ViewChild,\n args: ['customIndicator', { static: true }]\n }], contentContainer: [{\n type: ViewChild,\n args: ['contentContainer']\n }], indicator: [{\n type: ContentChild,\n args: [forwardRef(() => IgxStepIndicatorDirective)]\n }], content: [{\n type: ContentChild,\n args: [forwardRef(() => IgxStepContentDirective)]\n }], onFocus: [{\n type: HostListener,\n args: ['focus']\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }], handleKeydown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\n// TODO: common interface between IgxCarouselComponentBase and ToggleAnimationPlayer?\n/**\n * IgxStepper provides a wizard-like workflow by dividing content into logical steps.\n *\n * @igxModule IgxStepperModule\n *\n * @igxKeywords stepper\n *\n * @igxGroup Layouts\n *\n * @remarks\n * The Ignite UI for Angular Stepper component allows the user to navigate between multiple steps.\n * It supports horizontal and vertical orientation as well as keyboard navigation and provides API methods to control the active step.\n * The component offers keyboard navigation and API to control the active step.\n *\n * @example\n * ```html\n * \n * \n * home\n *

    Home

    \n *
    \n * ...\n *
    \n *
    \n * \n *
    \n * ...\n *
    \n *
    \n * \n *
    \n * ...\n *
    \n *
    \n *
    \n * ```\n */\nclass IgxStepperComponent extends IgxCarouselComponentBase {\n /**\n * Get/Set the animation type of the stepper when the orientation direction is vertical.\n *\n * @remarks\n * Default value is `grow`. Other possible values are `fade` and `none`.\n *\n * ```html\n * \n * \n * ```\n */\n get verticalAnimationType() {\n return this._verticalAnimationType;\n }\n set verticalAnimationType(value) {\n // TODO: activeChange event is not emitted for the collapsing steps (loop through collapsing steps and emit)\n this.stepperService.collapsingSteps.clear();\n this._verticalAnimationType = value;\n switch (value) {\n case 'grow':\n this.verticalAnimationSettings = this.updateVerticalAnimationSettings(growVerIn, growVerOut);\n break;\n case 'fade':\n this.verticalAnimationSettings = this.updateVerticalAnimationSettings(fadeIn, null);\n break;\n case 'none':\n this.verticalAnimationSettings = this.updateVerticalAnimationSettings(null, null);\n break;\n }\n }\n /**\n * Get/Set the animation type of the stepper when the orientation direction is horizontal.\n *\n * @remarks\n * Default value is `grow`. Other possible values are `fade` and `none`.\n *\n * ```html\n * \n * \n * ```\n */\n get horizontalAnimationType() {\n return this.animationType;\n }\n set horizontalAnimationType(value) {\n // TODO: activeChange event is not emitted for the collapsing steps (loop through collapsing steps and emit)\n this.stepperService.collapsingSteps.clear();\n this.animationType = value;\n }\n /**\n * Get/Set the animation duration.\n * ```html\n * \n * \n * ```\n */\n get animationDuration() {\n return this.defaultAnimationDuration;\n }\n set animationDuration(value) {\n if (value && value > 0) {\n this.defaultAnimationDuration = value;\n return;\n }\n this.defaultAnimationDuration = this._defaultAnimationDuration;\n }\n /**\n * Get/Set whether the stepper is linear.\n *\n * @remarks\n * If the stepper is in linear mode and if the active step is valid only then the user is able to move forward.\n *\n * ```html\n * \n * ```\n */\n get linear() {\n return this._linear;\n }\n set linear(value) {\n this._linear = value;\n if (this._linear && this.steps.length > 0) {\n // when the stepper is in linear mode we should calculate which steps should be disabled\n // and which are visited i.e. their validity should be correctly displayed.\n this.stepperService.calculateVisitedSteps();\n this.stepperService.calculateLinearDisabledSteps();\n }\n else {\n this.stepperService.linearDisabledSteps.clear();\n }\n }\n /**\n * Get/Set the stepper orientation.\n *\n * ```typescript\n * this.stepper.orientation = IgxStepperOrientation.Vertical;\n * ```\n */\n get orientation() {\n return this._orientation;\n }\n set orientation(value) {\n if (this._orientation === value) {\n return;\n }\n // TODO: activeChange event is not emitted for the collapsing steps\n this.stepperService.collapsingSteps.clear();\n this._orientation = value;\n this._defaultTitlePosition = this._orientation === IgxStepperOrientation.Horizontal ?\n IgxStepperTitlePosition.Bottom : IgxStepperTitlePosition.End;\n }\n /** @hidden @internal **/\n get directionClass() {\n return this.orientation === IgxStepperOrientation.Horizontal;\n }\n /**\n * Get all steps.\n *\n * ```typescript\n * const steps: IgxStepComponent[] = this.stepper.steps;\n * ```\n */\n get steps() {\n return this._steps?.toArray() || [];\n }\n /** @hidden @internal */\n get nativeElement() {\n return this.element.nativeElement;\n }\n constructor(cdr, animationService, stepperService, element) {\n super(animationService, cdr);\n this.stepperService = stepperService;\n this.element = element;\n /**\n * Get/Set the type of the steps.\n *\n * ```typescript\n * this.stepper.stepType = IgxStepType.Indicator;\n * ```\n */\n this.stepType = IgxStepType.Full;\n /**\n * Get/Set whether the content is displayed above the steps.\n *\n * @remarks\n * Default value is `false` and the content is below the steps.\n *\n * ```typescript\n * this.stepper.contentTop = true;\n * ```\n */\n this.contentTop = false;\n /**\n * Get/Set the position of the steps title.\n *\n * @remarks\n * The default value when the stepper is horizontally orientated is `bottom`.\n * In vertical layout the default title position is `end`.\n *\n * ```typescript\n * this.stepper.titlePosition = IgxStepperTitlePosition.Top;\n * ```\n */\n this.titlePosition = null;\n /** @hidden @internal **/\n this.cssClass = 'igx-stepper';\n /** @hidden @internal **/\n this.role = 'tablist';\n /**\n * Emitted when the stepper's active step is changing.\n *\n *```html\n * \n * \n * ```\n *\n *```typescript\n * public handleActiveStepChanging(event: IStepChangingEventArgs) {\n * if (event.newIndex < event.oldIndex) {\n * event.cancel = true;\n * }\n * }\n *```\n */\n this.activeStepChanging = new EventEmitter();\n /**\n * Emitted when the active step is changed.\n *\n * @example\n * ```\n * \n * ```\n */\n this.activeStepChanged = new EventEmitter();\n /** @hidden @internal */\n this.verticalAnimationSettings = {\n openAnimation: growVerIn,\n closeAnimation: growVerOut,\n };\n /** @hidden @internal */\n this._defaultTitlePosition = IgxStepperTitlePosition.Bottom;\n this.destroy$ = new Subject();\n this._orientation = IgxStepperOrientation.Horizontal;\n this._verticalAnimationType = VerticalAnimationType.Grow;\n this._linear = false;\n this._defaultAnimationDuration = 350;\n this.stepperService.stepper = this;\n }\n /** @hidden @internal */\n ngOnChanges(changes) {\n if (changes['animationDuration']) {\n this.verticalAnimationType = this._verticalAnimationType;\n }\n }\n /** @hidden @internal */\n ngOnInit() {\n this.enterAnimationDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.activeStepChanged.emit({ owner: this, index: this.stepperService.activeStep.index });\n });\n this.leaveAnimationDone.pipe(takeUntil(this.destroy$)).subscribe(() => {\n if (this.stepperService.collapsingSteps.size === 1) {\n this.stepperService.collapse(this.stepperService.previousActiveStep);\n }\n else {\n Array.from(this.stepperService.collapsingSteps).slice(0, this.stepperService.collapsingSteps.size - 1)\n .forEach(step => this.stepperService.collapse(step));\n }\n });\n }\n /** @hidden @internal */\n ngAfterContentInit() {\n let activeStep;\n this.steps.forEach((step, index) => {\n this.updateStepAria(step, index);\n if (!activeStep && step.active) {\n activeStep = step;\n }\n });\n if (!activeStep) {\n this.activateFirstStep(true);\n }\n if (this.linear) {\n this.stepperService.calculateLinearDisabledSteps();\n }\n this.handleStepChanges();\n }\n /** @hidden @internal */\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n /**\n * Activates the step at a given index.\n *\n *```typescript\n * this.stepper.navigateTo(1);\n *```\n */\n navigateTo(index) {\n const step = this.steps[index];\n if (!step || this.stepperService.activeStep === step) {\n return;\n }\n this.activateStep(step);\n }\n /**\n * Activates the next enabled step.\n *\n *```typescript\n * this.stepper.next();\n *```\n */\n next() {\n this.moveToNextStep();\n }\n /**\n * Activates the previous enabled step.\n *\n *```typescript\n * this.stepper.prev();\n *```\n */\n prev() {\n this.moveToNextStep(false);\n }\n /**\n * Resets the stepper to its initial state i.e. activates the first step.\n *\n * @remarks\n * The steps' content will not be automatically reset.\n *```typescript\n * this.stepper.reset();\n *```\n */\n reset() {\n this.stepperService.visitedSteps.clear();\n const activeStep = this.steps.find(s => !s.disabled);\n if (activeStep) {\n this.activateStep(activeStep);\n }\n }\n /** @hidden @internal */\n playHorizontalAnimations() {\n this.previousItem = this.stepperService.previousActiveStep;\n this.currentItem = this.stepperService.activeStep;\n this.triggerAnimations();\n }\n getPreviousElement() {\n return this.stepperService.previousActiveStep?.contentContainer.nativeElement;\n }\n getCurrentElement() {\n return this.stepperService.activeStep.contentContainer.nativeElement;\n }\n updateVerticalAnimationSettings(openAnimation, closeAnimation) {\n const customCloseAnimation = useAnimation(closeAnimation, {\n params: {\n duration: this.animationDuration + 'ms'\n }\n });\n const customOpenAnimation = useAnimation(openAnimation, {\n params: {\n duration: this.animationDuration + 'ms'\n }\n });\n return {\n openAnimation: openAnimation ? customOpenAnimation : null,\n closeAnimation: closeAnimation ? customCloseAnimation : null\n };\n }\n updateStepAria(step, index) {\n step._index = index;\n step.renderer.setAttribute(step.nativeElement, 'aria-setsize', (this.steps.length).toString());\n step.renderer.setAttribute(step.nativeElement, 'aria-posinset', (index + 1).toString());\n }\n handleStepChanges() {\n this._steps.changes.pipe(takeUntil(this.destroy$)).subscribe(steps => {\n Promise.resolve().then(() => {\n steps.forEach((step, index) => {\n this.updateStepAria(step, index);\n });\n // when the active step is removed\n const hasActiveStep = this.steps.find(s => s === this.stepperService.activeStep);\n if (!hasActiveStep) {\n this.activateFirstStep();\n }\n // TO DO: mark step added before the active as visited?\n if (this.linear) {\n this.stepperService.calculateLinearDisabledSteps();\n }\n });\n });\n }\n activateFirstStep(activateInitially = false) {\n const firstEnabledStep = this.steps.find(s => !s.disabled);\n if (firstEnabledStep) {\n firstEnabledStep.active = true;\n if (activateInitially) {\n firstEnabledStep.activeChange.emit(true);\n this.activeStepChanged.emit({ owner: this, index: firstEnabledStep.index });\n }\n }\n }\n activateStep(step) {\n if (this.orientation === IgxStepperOrientation.Horizontal) {\n step.changeHorizontalActiveStep();\n }\n else {\n this.stepperService.expand(step);\n }\n }\n moveToNextStep(next = true) {\n let steps = this.steps;\n let activeStepIndex = this.stepperService.activeStep.index;\n if (!next) {\n steps = this.steps.reverse();\n activeStepIndex = steps.findIndex(s => s === this.stepperService.activeStep);\n }\n const nextStep = steps.find((s, i) => i > activeStepIndex && s.isAccessible);\n if (nextStep) {\n this.activateStep(nextStep);\n }\n }\n}\nIgxStepperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: IgxAngularAnimationService }, { token: IgxStepperService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxStepperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxStepperComponent, selector: \"igx-stepper\", inputs: { verticalAnimationType: \"verticalAnimationType\", horizontalAnimationType: \"horizontalAnimationType\", animationDuration: \"animationDuration\", linear: \"linear\", orientation: \"orientation\", stepType: \"stepType\", contentTop: \"contentTop\", titlePosition: \"titlePosition\" }, outputs: { activeStepChanging: \"activeStepChanging\", activeStepChanged: \"activeStepChanged\" }, host: { properties: { \"attr.aria-orientation\": \"this.orientation\", \"class.igx-stepper\": \"this.cssClass\", \"attr.role\": \"this.role\", \"class.igx-stepper--horizontal\": \"this.directionClass\" } }, providers: [\n IgxStepperService,\n { provide: IGX_STEPPER_COMPONENT, useExisting: IgxStepperComponent },\n ], queries: [{ propertyName: \"invalidIndicatorTemplate\", first: true, predicate: IgxStepInvalidIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"completedIndicatorTemplate\", first: true, predicate: IgxStepCompletedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"activeIndicatorTemplate\", first: true, predicate: IgxStepActiveIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"_steps\", predicate: IgxStepComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: \"
    \\n \\n
    \\n\\n
    \\n \\n \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-stepper', providers: [\n IgxStepperService,\n { provide: IGX_STEPPER_COMPONENT, useExisting: IgxStepperComponent },\n ], template: \"
    \\n \\n
    \\n\\n
    \\n \\n \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [IgxAngularAnimationService]\n }] }, { type: IgxStepperService }, { type: i0.ElementRef }]; }, propDecorators: { verticalAnimationType: [{\n type: Input\n }], horizontalAnimationType: [{\n type: Input\n }], animationDuration: [{\n type: Input\n }], linear: [{\n type: Input\n }], orientation: [{\n type: HostBinding,\n args: ['attr.aria-orientation']\n }, {\n type: Input\n }], stepType: [{\n type: Input\n }], contentTop: [{\n type: Input\n }], titlePosition: [{\n type: Input\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-stepper']\n }], role: [{\n type: HostBinding,\n args: ['attr.role']\n }], directionClass: [{\n type: HostBinding,\n args: ['class.igx-stepper--horizontal']\n }], activeStepChanging: [{\n type: Output\n }], activeStepChanged: [{\n type: Output\n }], invalidIndicatorTemplate: [{\n type: ContentChild,\n args: [IgxStepInvalidIndicatorDirective, { read: TemplateRef }]\n }], completedIndicatorTemplate: [{\n type: ContentChild,\n args: [IgxStepCompletedIndicatorDirective, { read: TemplateRef }]\n }], activeIndicatorTemplate: [{\n type: ContentChild,\n args: [IgxStepActiveIndicatorDirective, { read: TemplateRef }]\n }], _steps: [{\n type: ContentChildren,\n args: [IgxStepComponent, { descendants: false }]\n }] } });\nclass IgxStepperModule {\n}\nIgxStepperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxStepperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperModule, declarations: [IgxStepComponent, IgxStepperComponent, IgxStepTitleDirective,\n IgxStepSubTitleDirective,\n IgxStepIndicatorDirective,\n IgxStepContentDirective,\n IgxStepActiveIndicatorDirective,\n IgxStepCompletedIndicatorDirective,\n IgxStepInvalidIndicatorDirective], imports: [CommonModule,\n IgxRippleModule], exports: [IgxStepComponent, IgxStepperComponent, IgxStepTitleDirective,\n IgxStepSubTitleDirective,\n IgxStepIndicatorDirective,\n IgxStepContentDirective,\n IgxStepActiveIndicatorDirective,\n IgxStepCompletedIndicatorDirective,\n IgxStepInvalidIndicatorDirective] });\nIgxStepperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperModule, imports: [CommonModule,\n IgxRippleModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxStepperModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n CommonModule,\n IgxRippleModule\n ],\n declarations: [\n IgxStepComponent,\n IgxStepperComponent,\n IgxStepTitleDirective,\n IgxStepSubTitleDirective,\n IgxStepIndicatorDirective,\n IgxStepContentDirective,\n IgxStepActiveIndicatorDirective,\n IgxStepCompletedIndicatorDirective,\n IgxStepInvalidIndicatorDirective,\n ],\n exports: [\n IgxStepComponent,\n IgxStepperComponent,\n IgxStepTitleDirective,\n IgxStepSubTitleDirective,\n IgxStepIndicatorDirective,\n IgxStepContentDirective,\n IgxStepActiveIndicatorDirective,\n IgxStepCompletedIndicatorDirective,\n IgxStepInvalidIndicatorDirective,\n ]\n }]\n }] });\n\n/** @hidden @internal */\nclass DateRangePickerFormatPipe {\n transform(values, appliedFormat, locale, formatter) {\n if (!values || !values.start && !values.end) {\n return '';\n }\n if (formatter) {\n return formatter(values);\n }\n let { start, end } = values;\n if (!isDate(start)) {\n start = DateTimeUtil.parseIsoDate(start);\n }\n if (!isDate(end)) {\n end = DateTimeUtil.parseIsoDate(end);\n }\n const startDate = appliedFormat ? DateTimeUtil.formatDate(start, appliedFormat, locale || 'en') : start?.toLocaleDateString();\n const endDate = appliedFormat ? DateTimeUtil.formatDate(end, appliedFormat, locale || 'en') : end?.toLocaleDateString();\n let formatted;\n if (start) {\n formatted = `${startDate} - `;\n if (end) {\n formatted += endDate;\n }\n }\n return formatted ? formatted : '';\n }\n}\nDateRangePickerFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: DateRangePickerFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nDateRangePickerFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: DateRangePickerFormatPipe, name: \"dateRange\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: DateRangePickerFormatPipe, decorators: [{\n type: Pipe,\n args: [{ name: 'dateRange' }]\n }] });\n/** @hidden @internal */\nclass IgxDateRangeInputsBaseComponent extends IgxInputGroupComponent {\n /** @hidden @internal */\n get nativeElement() {\n return this.element.nativeElement;\n }\n /** @hidden @internal */\n setFocus() {\n this.input.focus();\n }\n /** @hidden @internal */\n updateInputValue(value) {\n if (this.ngControl) {\n this.ngControl.control.setValue(value);\n }\n else {\n this.dateTimeEditor.value = value;\n }\n }\n /** @hidden @internal */\n updateInputValidity(state) {\n this.inputDirective.valid = state;\n }\n}\nIgxDateRangeInputsBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeInputsBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxDateRangeInputsBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDateRangeInputsBaseComponent, selector: \"igx-date-range-base\", providers: [{ provide: IgxInputGroupBase, useExisting: IgxDateRangeInputsBaseComponent }], queries: [{ propertyName: \"dateTimeEditor\", first: true, predicate: IgxDateTimeEditorDirective, descendants: true }, { propertyName: \"inputDirective\", first: true, predicate: IgxInputDirective, descendants: true }, { propertyName: \"ngControl\", first: true, predicate: NgControl, descendants: true }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeInputsBaseComponent, decorators: [{\n type: Component,\n args: [{\n template: ``,\n selector: `igx-date-range-base`,\n providers: [{ provide: IgxInputGroupBase, useExisting: IgxDateRangeInputsBaseComponent }]\n }]\n }], propDecorators: { dateTimeEditor: [{\n type: ContentChild,\n args: [IgxDateTimeEditorDirective]\n }], inputDirective: [{\n type: ContentChild,\n args: [IgxInputDirective]\n }], ngControl: [{\n type: ContentChild,\n args: [NgControl]\n }] } });\n/**\n * Defines the start input for a date range picker\n *\n * @igxModule IgxDateRangePickerModule\n *\n * @igxTheme igx-input-group-theme, igx-calendar-theme, igx-date-range-picker-theme\n *\n * @igxKeywords date, range, date range, date picker\n *\n * @igxGroup scheduling\n *\n * @remarks\n * When templating, start input has to be templated separately\n *\n * @example\n * ```html\n * \n * \n * \n * \n * ...\n * \n * ```\n */\nclass IgxDateRangeStartComponent extends IgxDateRangeInputsBaseComponent {\n}\nIgxDateRangeStartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeStartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxDateRangeStartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDateRangeStartComponent, selector: \"igx-date-range-start\", providers: [\n { provide: IgxInputGroupBase, useExisting: IgxDateRangeStartComponent },\n { provide: IgxDateRangeInputsBaseComponent, useExisting: IgxDateRangeStartComponent }\n ], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n \\n {{ resourceStrings.igx_input_upload_button }}\\n \\n \\n\\n\\n\\n \\n {{ fileNames }}\\n \\n\\n\\n\\n \\n clear\\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\\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
    \\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 \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i1$1.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i1$1.NgSwitchDefault, selector: \"[ngSwitchDefault]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeStartComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-date-range-start', providers: [\n { provide: IgxInputGroupBase, useExisting: IgxDateRangeStartComponent },\n { provide: IgxDateRangeInputsBaseComponent, useExisting: IgxDateRangeStartComponent }\n ], template: \"
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n \\n {{ resourceStrings.igx_input_upload_button }}\\n \\n \\n\\n\\n\\n \\n {{ fileNames }}\\n \\n\\n\\n\\n \\n clear\\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\\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
    \\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 \\n \\n\\n\" }]\n }] });\n/**\n * Defines the end input for a date range picker\n *\n * @igxModule IgxDateRangePickerModule\n *\n * @igxTheme igx-input-group-theme, igx-calendar-theme, igx-date-range-picker-theme\n *\n * @igxKeywords date, range, date range, date picker\n *\n * @igxGroup scheduling\n *\n * @remarks\n * When templating, end input has to be template separately\n *\n * @example\n * ```html\n * \n * ...\n * \n * \n * \n * \n * ```\n */\nclass IgxDateRangeEndComponent extends IgxDateRangeInputsBaseComponent {\n}\nIgxDateRangeEndComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeEndComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });\nIgxDateRangeEndComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDateRangeEndComponent, selector: \"igx-date-range-end\", providers: [\n { provide: IgxInputGroupBase, useExisting: IgxDateRangeEndComponent },\n { provide: IgxDateRangeInputsBaseComponent, useExisting: IgxDateRangeEndComponent }\n ], usesInheritance: true, ngImport: i0, template: \"
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n \\n {{ resourceStrings.igx_input_upload_button }}\\n \\n \\n\\n\\n\\n \\n {{ fileNames }}\\n \\n\\n\\n\\n \\n clear\\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\\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
    \\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 \\n \\n\\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i1$1.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i1$1.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i1$1.NgSwitchDefault, selector: \"[ngSwitchDefault]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"directive\", type: IgxButtonDirective, selector: \"[igxButton]\", inputs: [\"selected\", \"igxButton\", \"igxButtonColor\", \"igxButtonBackground\", \"igxLabel\", \"disabled\"], outputs: [\"buttonClick\", \"buttonSelected\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"directive\", type: IgxSuffixDirective, selector: \"igx-suffix,[igxSuffix],[igxEnd]\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeEndComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-date-range-end', providers: [\n { provide: IgxInputGroupBase, useExisting: IgxDateRangeEndComponent },\n { provide: IgxDateRangeInputsBaseComponent, useExisting: IgxDateRangeEndComponent }\n ], template: \"
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n \\n {{ resourceStrings.igx_input_upload_button }}\\n \\n \\n\\n\\n\\n \\n {{ fileNames }}\\n \\n\\n\\n\\n \\n clear\\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\\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
    \\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 \\n \\n\\n\" }]\n }] });\n/**\n * Replaces the default separator `to` with the provided value\n *\n * @igxModule IgxDateRangePickerModule\n *\n * @igxTheme igx-date-range-picker-theme\n *\n * @igxKeywords date, range, date range, date picker\n *\n * @igxGroup scheduling\n *\n * @example\n * ```html\n * \n * \n * \n * \n *\n * -\n *\n * \n * \n * \n * ...\n * \n * ```\n */\nclass IgxDateRangeSeparatorDirective {\n}\nIgxDateRangeSeparatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nIgxDateRangeSeparatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDateRangeSeparatorDirective, selector: \"[igxDateRangeSeparator]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangeSeparatorDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[igxDateRangeSeparator]'\n }]\n }] });\n\nconst SingleInputDatesConcatenationString = ' - ';\n/**\n * Provides the ability to select a range of dates from a calendar UI or editable inputs.\n *\n * @igxModule IgxDateRangeModule\n *\n * @igxTheme igx-input-group-theme, igx-calendar-theme, igx-date-range-picker-theme\n *\n * @igxKeywords date, range, date range, date picker\n *\n * @igxGroup scheduling\n *\n * @remarks\n * It displays the range selection in a single or two input fields.\n * The default template displays a single *readonly* input field\n * while projecting `igx-date-range-start` and `igx-date-range-end`\n * displays two *editable* input fields.\n *\n * @example\n * ```html\n * \n * ```\n */\nclass IgxDateRangePickerComponent extends PickerBaseDirective {\n /**\n * The default text of the calendar dialog `done` button.\n *\n * @remarks\n * Default value is `Done`.\n * An @Input property that renders Done button with custom text. By default `doneButtonText` is set to Done.\n * The button will only show up in `dialog` mode.\n *\n * @example\n * ```html\n * \n * ```\n */\n set doneButtonText(value) {\n this._doneButtonText = value;\n }\n get doneButtonText() {\n if (this._doneButtonText === null) {\n return this.resourceStrings.igx_date_range_picker_done_button;\n }\n return this._doneButtonText;\n }\n /**\n * The minimum value in a valid range.\n *\n * @example\n * \n */\n set minValue(value) {\n this._minValue = value;\n this.onValidatorChange();\n }\n get minValue() {\n return this._minValue;\n }\n /**\n * The maximum value in a valid range.\n *\n * @example\n * \n */\n set maxValue(value) {\n this._maxValue = value;\n this.onValidatorChange();\n }\n get maxValue() {\n return this._maxValue;\n }\n /**\n * An accessor that sets the resource strings.\n * By default it uses EN resources.\n */\n set resourceStrings(value) {\n this._resourceStrings = Object.assign({}, this._resourceStrings, value);\n }\n /**\n * An accessor that returns the resource strings.\n */\n get resourceStrings() {\n return this._resourceStrings;\n }\n /** @hidden @internal */\n get dateSeparator() {\n if (this._dateSeparator === null) {\n return this.resourceStrings.igx_date_range_picker_date_separator;\n }\n return this._dateSeparator;\n }\n /** @hidden @internal */\n get appliedFormat() {\n return DateTimeUtil.getLocaleDateFormat(this.locale, this.displayFormat)\n || DateTimeUtil.DEFAULT_INPUT_FORMAT;\n }\n /** @hidden @internal */\n get singleInputFormat() {\n if (this.placeholder !== '') {\n return this.placeholder;\n }\n const format = this.appliedFormat;\n return `${format}${SingleInputDatesConcatenationString}${format}`;\n }\n /**\n * Gets calendar state.\n *\n * ```typescript\n * let state = this.dateRange.collapsed;\n * ```\n */\n get collapsed() {\n return this._collapsed;\n }\n /**\n * The currently selected value / range from the calendar\n *\n * @remarks\n * The current value is of type `DateRange`\n *\n * @example\n * ```typescript\n * const newValue: DateRange = { start: new Date(\"2/2/2012\"), end: new Date(\"3/3/2013\")};\n * this.dateRangePicker.value = newValue;\n * ```\n */\n get value() {\n return this._value;\n }\n set value(value) {\n this.updateValue(value);\n this.onChangeCallback(value);\n this.valueChange.emit(value);\n }\n /** @hidden @internal */\n get hasProjectedInputs() {\n return this.projectedInputs?.length > 0;\n }\n /** @hidden @internal */\n get separatorClass() {\n return this.getComponentDensityClass('igx-date-range-picker__label');\n }\n get required() {\n if (this._ngControl && this._ngControl.control && this._ngControl.control.validator) {\n const error = this._ngControl.control.validator({});\n return (error && error.required) ? true : false;\n }\n return false;\n }\n get calendar() {\n return this._calendar;\n }\n get dropdownOverlaySettings() {\n return Object.assign({}, this._dropDownOverlaySettings, this.overlaySettings);\n }\n get dialogOverlaySettings() {\n return Object.assign({}, this._dialogOverlaySettings, this.overlaySettings);\n }\n constructor(element, _localeId, platform, _injector, _cdr, _overlayService, _displayDensityOptions, _inputGroupType) {\n super(element, _localeId, _displayDensityOptions, _inputGroupType);\n this.platform = platform;\n this._injector = _injector;\n this._cdr = _cdr;\n this._overlayService = _overlayService;\n /**\n * The number of displayed month views.\n *\n * @remarks\n * Default is `2`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.displayMonthsCount = 2;\n /**\n * Sets the `placeholder` for single-input `IgxDateRangePickerComponent`.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.placeholder = '';\n /**\n * Emitted when the picker's value changes. Used for two-way binding.\n *\n * @example\n * ```html\n * \n * ```\n */\n this.valueChange = new EventEmitter();\n /** @hidden @internal */\n this.cssClass = 'igx-date-range-picker';\n this._resourceStrings = CurrentResourceStrings.DateRangePickerResStrings;\n this._doneButtonText = null;\n this._dateSeparator = null;\n this._overlaySubFilter = [\n filter(x => x.id === this._overlayId),\n takeUntil(merge(this._destroy$, this.closed))\n ];\n this._dialogOverlaySettings = {\n closeOnOutsideClick: true,\n modal: true,\n closeOnEscape: true\n };\n this._dropDownOverlaySettings = {\n closeOnOutsideClick: true,\n modal: false,\n closeOnEscape: true\n };\n this.onChangeCallback = noop;\n this.onTouchCallback = noop;\n this.onValidatorChange = noop;\n this.onStatusChanged = () => {\n if (this.inputGroup) {\n this.inputDirective.valid = this.isTouchedOrDirty && !this._ngControl.disabled\n ? this.getInputState(this.inputGroup.isFocused)\n : IgxInputState.INITIAL;\n }\n else if (this.hasProjectedInputs) {\n this.projectedInputs\n .forEach(i => {\n i.inputDirective.valid = this.isTouchedOrDirty && !this._ngControl.disabled\n ? this.getInputState(i.isFocused)\n : IgxInputState.INITIAL;\n ;\n });\n }\n this.setRequiredToInputs();\n };\n this.locale = this.locale || this._localeId;\n }\n /** @hidden @internal */\n onKeyDown(event) {\n switch (event.key) {\n case this.platform.KEYMAP.ARROW_UP:\n if (event.altKey) {\n this.close();\n }\n break;\n case this.platform.KEYMAP.ARROW_DOWN:\n if (event.altKey) {\n this.open();\n }\n break;\n }\n }\n /**\n * Opens the date range picker's dropdown or dialog.\n *\n * @example\n * ```html\n * \n *\n * \n * ```\n */\n close() {\n if (!this.collapsed) {\n this._overlayService.hide(this._overlayId);\n }\n }\n /**\n * Toggles the date range picker's dropdown or dialog\n *\n * @example\n * ```html\n * \n *\n * \n * ```\n */\n toggle(overlaySettings) {\n if (!this.collapsed) {\n this.close();\n }\n else {\n this.open(overlaySettings);\n }\n }\n /**\n * Selects a range of dates. If no `endDate` is passed, range is 1 day (only `startDate`)\n *\n * @example\n * ```typescript\n * public selectFiveDayRange() {\n * const today = new Date();\n * const inFiveDays = new Date(new Date().setDate(today.getDate() + 5));\n * this.dateRange.select(today, inFiveDays);\n * }\n * ```\n */\n select(startDate, endDate) {\n endDate = endDate ?? startDate;\n const dateRange = [startDate, endDate];\n this.handleSelection(dateRange);\n }\n /** @hidden @internal */\n writeValue(value) {\n this.updateValue(value);\n }\n /** @hidden @internal */\n registerOnChange(fn) {\n this.onChangeCallback = fn;\n }\n /** @hidden @internal */\n registerOnTouched(fn) {\n this.onTouchCallback = fn;\n }\n /** @hidden @internal */\n validate(control) {\n const value = control.value;\n const errors = {};\n if (value) {\n if (this.hasProjectedInputs) {\n const startInput = this.projectedInputs.find(i => i instanceof IgxDateRangeStartComponent);\n const endInput = this.projectedInputs.find(i => i instanceof IgxDateRangeEndComponent);\n if (!startInput.dateTimeEditor.value) {\n Object.assign(errors, { startValue: true });\n }\n if (!endInput.dateTimeEditor.value) {\n Object.assign(errors, { endValue: true });\n }\n }\n const min = parseDate(this.minValue);\n const max = parseDate(this.maxValue);\n const start = parseDate(value.start);\n const end = parseDate(value.end);\n if ((min && start && DateTimeUtil.lessThanMinValue(start, min, false))\n || (min && end && DateTimeUtil.lessThanMinValue(end, min, false))) {\n Object.assign(errors, { minValue: true });\n }\n if ((max && start && DateTimeUtil.greaterThanMaxValue(start, max, false))\n || (max && end && DateTimeUtil.greaterThanMaxValue(end, max, false))) {\n Object.assign(errors, { maxValue: true });\n }\n }\n return Object.keys(errors).length > 0 ? errors : null;\n }\n /** @hidden @internal */\n registerOnValidatorChange(fn) {\n this.onValidatorChange = fn;\n }\n /** @hidden @internal */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /** @hidden */\n ngOnInit() {\n this._ngControl = this._injector.get(NgControl, null);\n this.locale = this.locale || this._localeId;\n super.ngOnInit();\n }\n /** @hidden */\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.subscribeToDateEditorEvents();\n this.configPositionStrategy();\n this.configOverlaySettings();\n this.cacheFocusedInput();\n this.attachOnTouched();\n this.setRequiredToInputs();\n if (this._ngControl) {\n this._statusChanges$ = this._ngControl.statusChanges.subscribe(this.onStatusChanged.bind(this));\n }\n // delay invocations until the current change detection cycle has completed\n Promise.resolve().then(() => {\n this.updateDisabledState();\n this.initialSetValue();\n this.updateInputs();\n // B.P. 07 July 2021 - IgxDateRangePicker not showing initial disabled state with ChangeDetectionStrategy.OnPush #9776\n /**\n * if disabled is placed on the range picker element and there are projected inputs\n * run change detection since igxInput will initially set the projected inputs' disabled to false\n */\n if (this.hasProjectedInputs && this.disabled) {\n this._cdr.markForCheck();\n }\n });\n this.updateDisplayFormat();\n this.updateInputFormat();\n }\n /** @hidden @internal */\n ngOnChanges(changes) {\n if (changes['displayFormat'] && this.hasProjectedInputs) {\n this.updateDisplayFormat();\n }\n if (changes['inputFormat'] && this.hasProjectedInputs) {\n this.updateInputFormat();\n }\n if (changes['disabled']) {\n this.updateDisabledState();\n }\n }\n /** @hidden @internal */\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._statusChanges$) {\n this._statusChanges$.unsubscribe();\n }\n if (this._overlayId) {\n this._overlayService.detach(this._overlayId);\n }\n }\n /** @hidden @internal */\n getEditElement() {\n return this.inputDirective.nativeElement;\n }\n get isTouchedOrDirty() {\n return (this._ngControl.control.touched || this._ngControl.control.dirty)\n && (!!this._ngControl.control.validator || !!this._ngControl.control.asyncValidator);\n }\n handleSelection(selectionData) {\n let newValue = this.extractRange(selectionData);\n if (!newValue.start && !newValue.end) {\n newValue = null;\n }\n this.value = newValue;\n if (this.isDropdown && selectionData?.length > 1) {\n this.close();\n }\n }\n handleClosing(e) {\n const args = { owner: this, cancel: e?.cancel, event: e?.event };\n this.closing.emit(args);\n e.cancel = args.cancel;\n if (args.cancel) {\n return;\n }\n if (this.isDropdown && e?.event && !this.element.nativeElement.contains(e.event.target)) {\n // outside click\n this.updateValidityOnBlur();\n }\n else {\n this.onTouchCallback();\n // input click\n if (this.hasProjectedInputs && this._focusedInput) {\n this._focusedInput.setFocus();\n this._focusedInput = null;\n }\n if (this.inputDirective) {\n this.inputDirective.focus();\n }\n }\n }\n subscribeToOverlayEvents() {\n this._overlayService.opening.pipe(...this._overlaySubFilter).subscribe((e) => {\n const overlayEvent = e;\n const args = { owner: this, cancel: overlayEvent?.cancel, event: e.event };\n this.opening.emit(args);\n if (args.cancel) {\n this._overlayService.detach(this._overlayId);\n overlayEvent.cancel = true;\n return;\n }\n this._initializeCalendarContainer(e.componentRef.instance);\n this._collapsed = false;\n this.updateCalendar();\n });\n this._overlayService.opened.pipe(...this._overlaySubFilter).subscribe(() => {\n this.calendar?.daysView?.focusActiveDate();\n this.opened.emit({ owner: this });\n });\n this._overlayService.closing.pipe(...this._overlaySubFilter).subscribe((e) => {\n this.handleClosing(e);\n });\n this._overlayService.closed.pipe(...this._overlaySubFilter).subscribe(() => {\n this._overlayService.detach(this._overlayId);\n this._collapsed = true;\n this._overlayId = null;\n this.closed.emit({ owner: this });\n });\n }\n updateValue(value) {\n this._value = value ? value : null;\n this.updateInputs();\n this.updateCalendar();\n }\n updateValidityOnBlur() {\n this.onTouchCallback();\n if (this._ngControl) {\n if (this.hasProjectedInputs) {\n this.projectedInputs.forEach(i => {\n if (!this._ngControl.valid) {\n i.updateInputValidity(IgxInputState.INVALID);\n }\n else {\n i.updateInputValidity(IgxInputState.INITIAL);\n }\n });\n }\n if (this.inputDirective) {\n if (!this._ngControl.valid) {\n this.inputDirective.valid = IgxInputState.INVALID;\n }\n else {\n this.inputDirective.valid = IgxInputState.INITIAL;\n }\n }\n }\n }\n updateDisabledState() {\n if (this.hasProjectedInputs) {\n const start = this.projectedInputs.find(i => i instanceof IgxDateRangeStartComponent);\n const end = this.projectedInputs.find(i => i instanceof IgxDateRangeEndComponent);\n start.inputDirective.disabled = this.disabled;\n end.inputDirective.disabled = this.disabled;\n return;\n }\n }\n getInputState(focused) {\n if (focused) {\n return this._ngControl.valid ? IgxInputState.VALID : IgxInputState.INVALID;\n }\n else {\n return this._ngControl.valid ? IgxInputState.INITIAL : IgxInputState.INVALID;\n }\n }\n setRequiredToInputs() {\n // workaround for igxInput setting required\n Promise.resolve().then(() => {\n const isRequired = this.required;\n if (this.inputGroup && this.inputGroup.isRequired !== isRequired) {\n this.inputGroup.isRequired = isRequired;\n }\n else if (this.hasProjectedInputs && this._ngControl) {\n this.projectedInputs.forEach(i => i.isRequired = isRequired);\n }\n });\n }\n parseMinValue(value) {\n let minValue = parseDate(value);\n if (!minValue && this.hasProjectedInputs) {\n const start = this.projectedInputs.filter(i => i instanceof IgxDateRangeStartComponent)[0];\n if (start) {\n minValue = parseDate(start.dateTimeEditor.minValue);\n }\n }\n return minValue;\n }\n parseMaxValue(value) {\n let maxValue = parseDate(value);\n if (!maxValue && this.projectedInputs) {\n const end = this.projectedInputs.filter(i => i instanceof IgxDateRangeEndComponent)[0];\n if (end) {\n maxValue = parseDate(end.dateTimeEditor.maxValue);\n }\n }\n return maxValue;\n }\n updateCalendar() {\n if (!this.calendar) {\n return;\n }\n this.calendar.disabledDates = [];\n const minValue = this.parseMinValue(this.minValue);\n if (minValue) {\n this.calendar.disabledDates.push({ type: DateRangeType.Before, dateRange: [minValue] });\n }\n const maxValue = this.parseMaxValue(this.maxValue);\n if (maxValue) {\n this.calendar.disabledDates.push({ type: DateRangeType.After, dateRange: [maxValue] });\n }\n const range = [];\n if (this.value?.start && this.value?.end) {\n const _value = this.toRangeOfDates(this.value);\n if (DateTimeUtil.greaterThanMaxValue(_value.start, _value.end)) {\n this.swapEditorDates();\n }\n if (this.valueInRange(this.value, minValue, maxValue)) {\n range.push(_value.start, _value.end);\n }\n }\n if (range.length > 0) {\n this.calendar.selectDate(range);\n }\n else if (range.length === 0 && this.calendar.monthViews) {\n this.calendar.deselectDate();\n }\n this.calendar.viewDate = range[0] || new Date();\n }\n swapEditorDates() {\n if (this.hasProjectedInputs) {\n const start = this.projectedInputs.find(i => i instanceof IgxDateRangeStartComponent);\n const end = this.projectedInputs.find(i => i instanceof IgxDateRangeEndComponent);\n [start.dateTimeEditor.value, end.dateTimeEditor.value] = [end.dateTimeEditor.value, start.dateTimeEditor.value];\n [this.value.start, this.value.end] = [this.value.end, this.value.start];\n }\n }\n valueInRange(value, minValue, maxValue) {\n const _value = this.toRangeOfDates(value);\n if (minValue && DateTimeUtil.lessThanMinValue(_value.start, minValue, false)) {\n return false;\n }\n if (maxValue && DateTimeUtil.greaterThanMaxValue(_value.end, maxValue, false)) {\n return false;\n }\n return true;\n }\n extractRange(selection) {\n return {\n start: selection[0] || null,\n end: selection.length > 0 ? selection[selection.length - 1] : null\n };\n }\n toRangeOfDates(range) {\n let start;\n let end;\n if (!isDate(range.start)) {\n start = DateTimeUtil.parseIsoDate(range.start);\n }\n if (!isDate(range.end)) {\n end = DateTimeUtil.parseIsoDate(range.end);\n }\n if (start || end) {\n return { start, end };\n }\n return { start: range.start, end: range.end };\n }\n subscribeToDateEditorEvents() {\n if (this.hasProjectedInputs) {\n const start = this.projectedInputs.find(i => i instanceof IgxDateRangeStartComponent);\n const end = this.projectedInputs.find(i => i instanceof IgxDateRangeEndComponent);\n if (start && end) {\n start.dateTimeEditor.valueChange\n .pipe(takeUntil(this._destroy$))\n .subscribe(value => {\n if (this.value) {\n this.value = { start: value, end: this.value.end };\n }\n else {\n this.value = { start: value, end: null };\n }\n });\n end.dateTimeEditor.valueChange\n .pipe(takeUntil(this._destroy$))\n .subscribe(value => {\n if (this.value) {\n this.value = { start: this.value.start, end: value };\n }\n else {\n this.value = { start: null, end: value };\n }\n });\n }\n }\n }\n attachOnTouched() {\n if (this.hasProjectedInputs) {\n this.projectedInputs.forEach(i => {\n fromEvent(i.dateTimeEditor.nativeElement, 'blur')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (this.collapsed) {\n this.updateValidityOnBlur();\n }\n });\n });\n }\n else {\n fromEvent(this.inputDirective.nativeElement, 'blur')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (this.collapsed) {\n this.updateValidityOnBlur();\n }\n });\n }\n }\n cacheFocusedInput() {\n if (this.hasProjectedInputs) {\n this.projectedInputs.forEach(i => {\n fromEvent(i.dateTimeEditor.nativeElement, 'focus')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => this._focusedInput = i);\n });\n }\n }\n configPositionStrategy() {\n this._positionSettings = {\n openAnimation: fadeIn,\n closeAnimation: fadeOut\n };\n this._dropDownOverlaySettings.positionStrategy = new AutoPositionStrategy(this._positionSettings);\n this._dropDownOverlaySettings.target = this.element.nativeElement;\n }\n configOverlaySettings() {\n if (this.overlaySettings !== null) {\n this._dropDownOverlaySettings = Object.assign({}, this._dropDownOverlaySettings, this.overlaySettings);\n this._dialogOverlaySettings = Object.assign({}, this._dialogOverlaySettings, this.overlaySettings);\n }\n }\n initialSetValue() {\n // if there is no value and no ngControl on the picker but we have inputs we may have value set through\n // their ngModels - we should generate our initial control value\n if ((!this.value || (!this.value.start && !this.value.end)) && this.hasProjectedInputs && !this._ngControl) {\n const start = this.projectedInputs.find(i => i instanceof IgxDateRangeStartComponent);\n const end = this.projectedInputs.find(i => i instanceof IgxDateRangeEndComponent);\n this._value = {\n start: start.dateTimeEditor.value,\n end: end.dateTimeEditor.value\n };\n }\n }\n updateInputs() {\n const start = this.projectedInputs?.find(i => i instanceof IgxDateRangeStartComponent);\n const end = this.projectedInputs?.find(i => i instanceof IgxDateRangeEndComponent);\n if (start && end) {\n const _value = this.value ? this.toRangeOfDates(this.value) : null;\n start.updateInputValue(_value?.start || null);\n end.updateInputValue(_value?.end || null);\n }\n }\n updateDisplayFormat() {\n this.projectedInputs.forEach(i => {\n const input = i;\n input.dateTimeEditor.displayFormat = this.displayFormat;\n });\n }\n updateInputFormat() {\n this.projectedInputs.forEach(i => {\n const input = i;\n if (input.dateTimeEditor.inputFormat !== this.inputFormat) {\n input.dateTimeEditor.inputFormat = this.inputFormat;\n }\n });\n }\n _initializeCalendarContainer(componentInstance) {\n this._calendar = componentInstance.calendar;\n this.calendar.hasHeader = false;\n this.calendar.locale = this.locale;\n this.calendar.selection = CalendarSelection.RANGE;\n this.calendar.weekStart = this.weekStart;\n this.calendar.hideOutsideDays = this.hideOutsideDays;\n this.calendar.monthsViewNumber = this.displayMonthsCount;\n this.calendar.selected.pipe(takeUntil(this._destroy$)).subscribe((ev) => this.handleSelection(ev));\n componentInstance.mode = this.mode;\n componentInstance.closeButtonLabel = !this.isDropdown ? this.doneButtonText : null;\n componentInstance.pickerActions = this.pickerActions;\n componentInstance.calendarClose.pipe(takeUntil(this._destroy$)).subscribe(() => this.close());\n }\n}\nIgxDateRangePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangePickerComponent, deps: [{ token: i0.ElementRef }, { token: LOCALE_ID }, { token: PlatformUtil }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: IgxOverlayService }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nIgxDateRangePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxDateRangePickerComponent, selector: \"igx-date-range-picker\", inputs: { displayMonthsCount: \"displayMonthsCount\", hideOutsideDays: \"hideOutsideDays\", formatter: \"formatter\", doneButtonText: \"doneButtonText\", overlaySettings: \"overlaySettings\", displayFormat: \"displayFormat\", inputFormat: \"inputFormat\", minValue: \"minValue\", maxValue: \"maxValue\", resourceStrings: \"resourceStrings\", placeholder: \"placeholder\", outlet: \"outlet\", value: \"value\" }, outputs: { valueChange: \"valueChange\" }, host: { listeners: { \"keydown\": \"onKeyDown($event)\" }, properties: { \"class.igx-date-range-picker\": \"this.cssClass\" } }, providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxDateRangePickerComponent, multi: true },\n { provide: NG_VALIDATORS, useExisting: IgxDateRangePickerComponent, multi: true }\n ], queries: [{ propertyName: \"label\", first: true, predicate: IgxLabelDirective, descendants: true }, { propertyName: \"pickerActions\", first: true, predicate: IgxPickerActionsDirective, descendants: true }, { propertyName: \"dateSeparatorTemplate\", first: true, predicate: IgxDateRangeSeparatorDirective, descendants: true, read: TemplateRef }, { propertyName: \"projectedInputs\", predicate: IgxDateRangeInputsBaseComponent }], viewQueries: [{ propertyName: \"viewContainerRef\", first: true, predicate: IgxInputGroupComponent, descendants: true, read: ViewContainerRef }, { propertyName: \"inputDirective\", first: true, predicate: IgxInputDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: \"\\n\\n\\n
    \\n \\n
    \\n
    \\n\\n\\n \\n
    \\n \\n \\n
    \\n \\n
    \\n\\n\\n \\n date_range\\n \\n\\n\\n{{ dateSeparator }}\\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\", dependencies: [{ kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i1$1.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"pipe\", type: DateRangePickerFormatPipe, name: \"dateRange\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangePickerComponent, decorators: [{\n type: Component,\n args: [{ selector: 'igx-date-range-picker', providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: IgxDateRangePickerComponent, multi: true },\n { provide: NG_VALIDATORS, useExisting: IgxDateRangePickerComponent, multi: true }\n ], template: \"\\n\\n\\n
    \\n \\n
    \\n
    \\n\\n\\n \\n
    \\n \\n \\n
    \\n \\n
    \\n\\n\\n \\n date_range\\n \\n\\n\\n{{ dateSeparator }}\\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 }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: PlatformUtil }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: IgxOverlayService, decorators: [{\n type: Inject,\n args: [IgxOverlayService]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DisplayDensityToken]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [IGX_INPUT_GROUP_TYPE]\n }] }]; }, propDecorators: { displayMonthsCount: [{\n type: Input\n }], hideOutsideDays: [{\n type: Input\n }], formatter: [{\n type: Input\n }], doneButtonText: [{\n type: Input\n }], overlaySettings: [{\n type: Input\n }], displayFormat: [{\n type: Input\n }], inputFormat: [{\n type: Input\n }], minValue: [{\n type: Input\n }], maxValue: [{\n type: Input\n }], resourceStrings: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], outlet: [{\n type: Input\n }], valueChange: [{\n type: Output\n }], cssClass: [{\n type: HostBinding,\n args: ['class.igx-date-range-picker']\n }], viewContainerRef: [{\n type: ViewChild,\n args: [IgxInputGroupComponent, { read: ViewContainerRef }]\n }], inputDirective: [{\n type: ViewChild,\n args: [IgxInputDirective]\n }], projectedInputs: [{\n type: ContentChildren,\n args: [IgxDateRangeInputsBaseComponent]\n }], label: [{\n type: ContentChild,\n args: [IgxLabelDirective]\n }], pickerActions: [{\n type: ContentChild,\n args: [IgxPickerActionsDirective]\n }], dateSeparatorTemplate: [{\n type: ContentChild,\n args: [IgxDateRangeSeparatorDirective, { read: TemplateRef }]\n }], value: [{\n type: Input\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\n/** @hidden */\nclass IgxDateRangePickerModule {\n}\nIgxDateRangePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxDateRangePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangePickerModule, declarations: [IgxDateRangePickerComponent,\n IgxDateRangeStartComponent,\n IgxDateRangeEndComponent,\n IgxDateRangeInputsBaseComponent,\n DateRangePickerFormatPipe,\n IgxDateRangeSeparatorDirective], imports: [CommonModule,\n IgxIconModule,\n IgxButtonModule,\n IgxToggleModule,\n IgxCalendarModule,\n IgxInputGroupModule,\n IgxPickersCommonModule,\n IgxDateTimeEditorModule,\n IgxCalendarContainerModule], exports: [IgxDateRangePickerComponent,\n IgxDateRangeStartComponent,\n IgxDateRangeEndComponent,\n IgxDateRangeSeparatorDirective,\n IgxDateTimeEditorModule,\n IgxPickersCommonModule,\n IgxInputGroupModule] });\nIgxDateRangePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangePickerModule, imports: [CommonModule,\n IgxIconModule,\n IgxButtonModule,\n IgxToggleModule,\n IgxCalendarModule,\n IgxInputGroupModule,\n IgxPickersCommonModule,\n IgxDateTimeEditorModule,\n IgxCalendarContainerModule, IgxDateTimeEditorModule,\n IgxPickersCommonModule,\n IgxInputGroupModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxDateRangePickerModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxDateRangePickerComponent,\n IgxDateRangeStartComponent,\n IgxDateRangeEndComponent,\n IgxDateRangeInputsBaseComponent,\n DateRangePickerFormatPipe,\n IgxDateRangeSeparatorDirective,\n ],\n imports: [\n CommonModule,\n IgxIconModule,\n IgxButtonModule,\n IgxToggleModule,\n IgxCalendarModule,\n IgxInputGroupModule,\n IgxPickersCommonModule,\n IgxDateTimeEditorModule,\n IgxCalendarContainerModule\n ],\n exports: [\n IgxDateRangePickerComponent,\n IgxDateRangeStartComponent,\n IgxDateRangeEndComponent,\n IgxDateRangeSeparatorDirective,\n IgxDateTimeEditorModule,\n IgxPickersCommonModule,\n IgxInputGroupModule\n ]\n }]\n }] });\n\n/**\n * Pivot Data Selector provides means to configure the pivot state of the Pivot Grid via a vertical panel UI\n *\n * @igxModule IgxPivotGridModule\n * @igxGroup Grids & Lists\n * @igxKeywords data selector, pivot, grid\n * @igxTheme pivot-data-selector-theme\n * @remarks\n * The Ignite UI Data Selector has a searchable list with the grid data columns,\n * there are also four expandable areas underneath for filters, rows, columns, and values\n * is used for grouping and aggregating simple flat data into a pivot table.\n * @example\n * ```html\n * \n * \n * \n * ```\n */\nclass IgxPivotDataSelectorComponent {\n /** @hidden @internal */\n get dims() {\n return this._grid?.allDimensions || [];\n }\n ;\n /** @hidden @internal */\n get values() {\n return this._grid?.pivotConfiguration.values || [];\n }\n ;\n constructor(renderer, cdr) {\n this.renderer = renderer;\n this.cdr = cdr;\n /**\n * Gets/sets whether the columns panel is expanded\n * Get\n * ```typescript\n * const columnsPanelState: boolean = this.dataSelector.columnsExpanded;\n * ```\n * Set\n * ```html\n * \n * ```\n *\n * Two-way data binding:\n * ```html\n * \n * ```\n */\n this.columnsExpanded = true;\n /**\n * @hidden\n */\n this.columnsExpandedChange = new EventEmitter();\n /**\n * Gets/sets whether the rows panel is expanded\n * Get\n * ```typescript\n * const rowsPanelState: boolean = this.dataSelector.rowsExpanded;\n * ```\n * Set\n * ```html\n * \n * ```\n *\n * Two-way data binding:\n * ```html\n * \n * ```\n */\n this.rowsExpanded = true;\n /**\n * @hidden\n */\n this.rowsExpandedChange = new EventEmitter();\n /**\n * Gets/sets whether the filters panel is expanded\n * Get\n * ```typescript\n * const filtersPanelState: boolean = this.dataSelector.filtersExpanded;\n * ```\n * Set\n * ```html\n * \n * ```\n *\n * Two-way data binding:\n * ```html\n * \n * ```\n */\n this.filtersExpanded = true;\n /**\n * @hidden\n */\n this.filtersExpandedChange = new EventEmitter();\n /**\n * Gets/sets whether the values panel is expanded\n * Get\n * ```typescript\n * const valuesPanelState: boolean = this.dataSelector.valuesExpanded;\n * ```\n * Set\n * ```html\n * \n * ```\n *\n * Two-way data binding:\n * ```html\n * \n * ```\n */\n this.valuesExpanded = true;\n /**\n * @hidden\n */\n this.valuesExpandedChange = new EventEmitter();\n this._dropDelta = 0;\n /** @hidden @internal **/\n this.cssClass = \"igx-pivot-data-selector\";\n this._subMenuPositionSettings = {\n verticalStartPoint: VerticalAlignment.Bottom,\n closeAnimation: undefined,\n };\n this._subMenuOverlaySettings = {\n closeOnOutsideClick: true,\n modal: false,\n positionStrategy: new AutoPositionStrategy(this._subMenuPositionSettings),\n scrollStrategy: new AbsoluteScrollStrategy(),\n };\n this.animationSettings = {\n closeAnimation: useAnimation(fadeOut, {\n params: {\n duration: \"0ms\",\n },\n }),\n openAnimation: useAnimation(fadeIn, {\n params: {\n duration: \"0ms\",\n },\n }),\n };\n /** @hidden @internal */\n this.aggregateList = [];\n /**\n * @hidden @internal\n */\n this._panels = [\n {\n name: \"Filters\",\n i18n: 'igx_grid_pivot_selector_filters',\n type: PivotDimensionType.Filter,\n dataKey: \"filterDimensions\",\n icon: \"filter_list\",\n itemKey: \"memberName\",\n sortable: false,\n dragChannels: [\"Filters\", \"Columns\", \"Rows\"]\n },\n {\n name: \"Columns\",\n i18n: 'igx_grid_pivot_selector_columns',\n type: PivotDimensionType.Column,\n dataKey: \"columnDimensions\",\n icon: \"view_column\",\n itemKey: \"memberName\",\n sortable: true,\n dragChannels: [\"Filters\", \"Columns\", \"Rows\"]\n },\n {\n name: \"Rows\",\n i18n: 'igx_grid_pivot_selector_rows',\n type: PivotDimensionType.Row,\n dataKey: \"rowDimensions\",\n icon: \"table_rows\",\n itemKey: \"memberName\",\n sortable: true,\n dragChannels: [\"Filters\", \"Columns\", \"Rows\"]\n },\n {\n name: \"Values\",\n i18n: 'igx_grid_pivot_selector_values',\n type: null,\n dataKey: \"values\",\n icon: \"functions\",\n itemKey: \"member\",\n displayKey: 'displayName',\n sortable: false,\n dragChannels: [\"Values\"]\n },\n ];\n }\n /**\n * @hidden @internal\n */\n get displayDensity() {\n return this.grid?.displayDensity;\n }\n /**\n * An @Input property that sets the grid.\n */\n set grid(value) {\n this._grid = value;\n }\n /**\n * Returns the grid.\n */\n get grid() {\n return this._grid;\n }\n /**\n * @hidden\n * @internal\n */\n onItemSort(_, dimension, dimensionType) {\n if (!this._panels.find((panel) => panel.type === dimensionType).sortable)\n return;\n const startDirection = dimension.sortDirection || SortingDirection.None;\n const direction = startDirection + 1 > SortingDirection.Desc ?\n SortingDirection.None : startDirection + 1;\n this.grid.sortDimension(dimension, direction);\n }\n /**\n * @hidden\n * @internal\n */\n onFilteringIconPointerDown(event) {\n event.stopPropagation();\n event.preventDefault();\n }\n /**\n * @hidden\n * @internal\n */\n onFilteringIconClick(event, dimension) {\n event.stopPropagation();\n event.preventDefault();\n let dim = dimension;\n let col;\n while (dim) {\n col = this.grid.dimensionDataColumns.find((x) => x.field === dim.memberName);\n if (col) {\n break;\n }\n else {\n dim = dim.childLevel;\n }\n }\n this.grid.filteringService.toggleFilterDropdown(event.target, col);\n }\n /**\n * @hidden\n * @internal\n */\n getDimensionState(dimensionType) {\n switch (dimensionType) {\n case PivotDimensionType.Row:\n return this.grid.rowDimensions;\n case PivotDimensionType.Column:\n return this.grid.columnDimensions;\n case PivotDimensionType.Filter:\n return this.grid.filterDimensions;\n default:\n return null;\n }\n }\n /**\n * @hidden\n * @internal\n */\n moveValueItem(itemId) {\n const aggregation = this.grid.pivotConfiguration.values;\n const valueIndex = aggregation.findIndex((x) => x.member === itemId) !== -1\n ? aggregation?.findIndex((x) => x.member === itemId)\n : aggregation.length;\n const newValueIndex = valueIndex + this._dropDelta < 0 ? 0 : valueIndex + this._dropDelta;\n const aggregationItem = aggregation.find((x) => x.member === itemId || x.displayName === itemId);\n if (aggregationItem) {\n this.grid.moveValue(aggregationItem, newValueIndex);\n this.grid.valuesChange.emit({\n values: this.grid.pivotConfiguration.values,\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n onItemDropped(event, dimensionType) {\n if (!this.dropAllowed) {\n return;\n }\n const dimension = this.grid.getDimensionsByType(dimensionType);\n const dimensionState = this.getDimensionState(dimensionType);\n const itemId = event.drag.element.nativeElement.id;\n const targetId = event.owner.element.nativeElement.id;\n const dimensionItem = dimension?.find((x) => x.memberName === itemId);\n const itemIndex = dimension?.findIndex((x) => x?.memberName === itemId) !== -1\n ? dimension?.findIndex((x) => x.memberName === itemId)\n : dimension?.length;\n const dimensions = this.grid.allDimensions.filter((x) => x && x.memberName === itemId);\n const reorder = dimensionState?.findIndex((item) => item.memberName === itemId) !==\n -1;\n let targetIndex = targetId !== \"\"\n ? dimension?.findIndex((x) => x.memberName === targetId)\n : dimension?.length;\n if (!dimension) {\n this.moveValueItem(itemId);\n }\n if (reorder) {\n targetIndex =\n itemIndex + this._dropDelta < 0\n ? 0\n : itemIndex + this._dropDelta;\n }\n if (dimensionItem) {\n this.grid.moveDimension(dimensionItem, dimensionType, targetIndex);\n }\n else {\n const newDim = dimensions.find((x) => x.memberName === itemId);\n this.grid.moveDimension(newDim, dimensionType, targetIndex);\n }\n this.grid.dimensionsChange.emit({\n dimensions: dimension,\n dimensionCollectionType: dimensionType,\n });\n }\n /**\n * @hidden\n * @internal\n */\n updateDropDown(value, dropdown) {\n this.value = value;\n dropdown.width = \"200px\";\n this.aggregateList = PivotUtil.getAggregateList(value, this.grid);\n this.cdr.detectChanges();\n dropdown.open(this._subMenuOverlaySettings);\n }\n /**\n * @hidden\n * @internal\n */\n onSummaryClick(event, value, dropdown) {\n this._subMenuOverlaySettings.target =\n event.currentTarget;\n if (dropdown.collapsed) {\n this.updateDropDown(value, dropdown);\n }\n else {\n // close for previous chip\n dropdown.close();\n dropdown.closed.pipe(first$1()).subscribe(() => {\n this.updateDropDown(value, dropdown);\n });\n }\n }\n /**\n * @hidden\n * @internal\n */\n onAggregationChange(event) {\n if (!this.isSelected(event.newSelection.value)) {\n this.value.aggregate = event.newSelection.value;\n this.grid.pipeTrigger++;\n this.grid.cdr.markForCheck();\n }\n }\n /**\n * @hidden\n * @internal\n */\n isSelected(val) {\n return this.value.aggregate.key === val.key;\n }\n /**\n * @hidden\n * @internal\n */\n ghostCreated(event, value) {\n const { width: itemWidth } = event.owner.element.nativeElement.getBoundingClientRect();\n this.ghostWidth = itemWidth;\n this.ghostText = value;\n this.renderer.setStyle(event.owner.element.nativeElement, \"position\", \"absolute\");\n this.renderer.setStyle(event.owner.element.nativeElement, \"visibility\", \"hidden\");\n }\n /**\n * @hidden\n * @internal\n */\n toggleItem(item) {\n if (item) {\n this.grid.toggleValue(item);\n }\n if (item) {\n this.grid.toggleDimension(item);\n }\n }\n /**\n * @hidden\n * @internal\n */\n onPanelEntry(event, panel) {\n this.dropAllowed = event.dragData.gridID === this.grid.id && event.dragData.selectorChannels?.some((channel) => channel === panel);\n }\n /**\n * @hidden\n * @internal\n */\n onItemDragMove(event) {\n const clientRect = event.owner.element.nativeElement.getBoundingClientRect();\n this._dropDelta = Math.round((event.nextPageY - event.startY) / clientRect.height);\n }\n /**\n * @hidden\n * @internal\n */\n onItemDragEnd(event) {\n this.renderer.setStyle(event.owner.element.nativeElement, \"position\", \"static\");\n this.renderer.setStyle(event.owner.element.nativeElement, \"visibility\", \"visible\");\n }\n /**\n * @hidden\n * @internal\n */\n onItemDragOver(event) {\n if (this.dropAllowed) {\n this.renderer.addClass(event.owner.element.nativeElement, \"igx-drag--push\");\n }\n }\n /**\n * @hidden\n * @internal\n */\n onItemDragLeave(event) {\n if (this.dropAllowed) {\n this.renderer.removeClass(event.owner.element.nativeElement, \"igx-drag--push\");\n }\n }\n /**\n * @hidden\n * @internal\n */\n getPanelCollapsed(panelType) {\n switch (panelType) {\n case PivotDimensionType.Column:\n return !this.columnsExpanded;\n case PivotDimensionType.Filter:\n return !this.filtersExpanded;\n case PivotDimensionType.Row:\n return !this.rowsExpanded;\n default:\n return !this.valuesExpanded;\n }\n }\n /**\n * @hidden\n * @internal\n */\n onCollapseChange(value, panelType) {\n switch (panelType) {\n case PivotDimensionType.Column:\n this.columnsExpanded = !value;\n this.columnsExpandedChange.emit(this.columnsExpanded);\n break;\n case PivotDimensionType.Filter:\n this.filtersExpanded = !value;\n this.filtersExpandedChange.emit(this.filtersExpanded);\n break;\n case PivotDimensionType.Row:\n this.rowsExpanded = !value;\n this.rowsExpandedChange.emit(this.rowsExpanded);\n break;\n default:\n this.valuesExpanded = !value;\n this.valuesExpandedChange.emit(this.valuesExpanded);\n }\n }\n}\nIgxPivotDataSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPivotDataSelectorComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nIgxPivotDataSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.0\", type: IgxPivotDataSelectorComponent, selector: \"igx-pivot-data-selector\", inputs: { columnsExpanded: \"columnsExpanded\", rowsExpanded: \"rowsExpanded\", filtersExpanded: \"filtersExpanded\", valuesExpanded: \"valuesExpanded\", grid: \"grid\" }, outputs: { columnsExpandedChange: \"columnsExpandedChange\", rowsExpandedChange: \"rowsExpandedChange\", filtersExpandedChange: \"filtersExpandedChange\", valuesExpandedChange: \"valuesExpandedChange\" }, host: { properties: { \"class.igx-pivot-data-selector\": \"this.cssClass\" } }, ngImport: i0, template: \"
    \\n \\n search\\n \\n \\n \\n \\n \\n {{ item.memberName }}\\n \\n \\n \\n {{ item.displayName || item.member }}\\n \\n \\n
    \\n\\n\\n \\n \\n \\n
    \\n {{ grid?.resourceStrings[panel.i18n] }}\\n
    \\n
    \\n {{ panel.icon }}\\n {{ this.grid ? this.grid[panel.dataKey].length : 0 }}\\n
    \\n
    \\n \\n \\n 0\\\"\\n [displayDensity]=\\\"displayDensity\\\"\\n >\\n \\n
    \\n \\n
    \\n {{\\n item.aggregate.key\\n }}\\n (\\n {{ item[panel.displayKey] || item[panel.itemKey] }}\\n )\\n
    \\n \\n {{\\n item.sortDirection < 2\\n ? \\\"arrow_upward\\\"\\n : \\\"arrow_downward\\\"\\n }}\\n \\n
    \\n
    \\n filter_list\\n \\n \\n functions\\n \\n 0\\\"\\n >drag_handle\\n
    \\n \\n \\n \\n \\n {{ grid?.resourceStrings.igx_grid_pivot_selector_panel_empty }}\\n \\n \\n \\n
    \\n\\n\\n \\n {{ item.label }}\\n \\n\\n\\n\\n \\n
    \\n unfold_more\\n {{ ghostText }}\\n
    \\n drag_handle\\n \\n
    \\n\", dependencies: [{ kind: \"directive\", type: i1$1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: IgxInputGroupComponent, selector: \"igx-input-group\", inputs: [\"resourceStrings\", \"suppressInputAutofocus\", \"type\", \"theme\"] }, { kind: \"directive\", type: IgxInputDirective, selector: \"[igxInput]\", inputs: [\"value\", \"disabled\", \"required\"], exportAs: [\"igxInput\"] }, { kind: \"directive\", type: IgxPrefixDirective, selector: \"igx-prefix,[igxPrefix],[igxStart]\" }, { kind: \"component\", type: IgxIconComponent, selector: \"igx-icon\", inputs: [\"family\", \"active\", \"name\"] }, { kind: \"component\", type: IgxCheckboxComponent, selector: \"igx-checkbox\", inputs: [\"id\", \"labelId\", \"value\", \"name\", \"tabindex\", \"labelPosition\", \"disableRipple\", \"required\", \"aria-labelledby\", \"aria-label\", \"indeterminate\", \"checked\", \"disabled\", \"invalid\", \"readonly\", \"disableTransitions\"], outputs: [\"change\"] }, { kind: \"component\", type: IgxChipComponent, selector: \"igx-chip\", inputs: [\"id\", \"tabIndex\", \"data\", \"draggable\", \"animateOnRelease\", \"hideBaseOnDrag\", \"removable\", \"removeIcon\", \"selectable\", \"selectIcon\", \"disabled\", \"selected\", \"color\", \"resourceStrings\"], outputs: [\"selectedChange\", \"moveStart\", \"moveEnd\", \"remove\", \"chipClick\", \"selectedChanging\", \"selectedChanged\", \"keyDown\", \"dragEnter\", \"dragLeave\", \"dragOver\", \"dragDrop\"] }, { kind: \"directive\", type: IgxDragDirective, selector: \"[igxDrag]\", inputs: [\"igxDrag\", \"dragTolerance\", \"dragDirection\", \"dragChannel\", \"ghost\", \"ghostClass\", \"ghostTemplate\", \"ghostHost\", \"scrollContainer\", \"ghostOffsetX\", \"ghostOffsetY\"], outputs: [\"dragStart\", \"dragMove\", \"dragEnd\", \"dragClick\", \"ghostCreate\", \"ghostDestroy\", \"transitioned\"], exportAs: [\"drag\"] }, { kind: \"directive\", type: IgxDropDirective, selector: \"[igxDrop]\", inputs: [\"igxDrop\", \"dropChannel\", \"dropStrategy\"], outputs: [\"enter\", \"over\", \"leave\", \"dropped\"], exportAs: [\"drop\"] }, { kind: \"directive\", type: IgxDragHandleDirective, selector: \"[igxDragHandle]\" }, { kind: \"component\", type: IgxDropDownComponent, selector: \"igx-drop-down\", inputs: [\"allowItemsFocus\", \"labelledBy\"], outputs: [\"opening\", \"opened\", \"closing\", \"closed\"] }, { kind: \"component\", type: IgxDropDownItemComponent, selector: \"igx-drop-down-item\" }, { kind: \"directive\", type: IgxDropDownItemNavigationDirective, selector: \"[igxDropDownItemNavigation]\", inputs: [\"igxDropDownItemNavigation\"] }, { kind: \"component\", type: IgxExpansionPanelComponent, selector: \"igx-expansion-panel\", inputs: [\"animationSettings\", \"id\", \"collapsed\"], outputs: [\"collapsedChange\", \"contentCollapsing\", \"contentCollapsed\", \"contentExpanding\", \"contentExpanded\"] }, { kind: \"component\", type: IgxExpansionPanelHeaderComponent, selector: \"igx-expansion-panel-header\", inputs: [\"lv\", \"role\", \"iconPosition\", \"disabled\"], outputs: [\"interaction\"] }, { kind: \"component\", type: IgxExpansionPanelBodyComponent, selector: \"igx-expansion-panel-body\", inputs: [\"role\", \"label\", \"labelledBy\"] }, { kind: \"directive\", type: IgxExpansionPanelTitleDirective, selector: \"igx-expansion-panel-title\" }, { kind: \"component\", type: IgxListComponent, selector: \"igx-list\", inputs: [\"panEndTriggeringThreshold\", \"id\", \"allowLeftPanning\", \"allowRightPanning\", \"isLoading\", \"resourceStrings\"], outputs: [\"leftPan\", \"rightPan\", \"startPan\", \"endPan\", \"resetPan\", \"panStateChange\", \"itemClicked\"] }, { kind: \"component\", type: IgxListItemComponent, selector: \"igx-list-item\", inputs: [\"isHeader\", \"hidden\", \"index\"] }, { kind: \"component\", type: IgxAccordionComponent, selector: \"igx-accordion\", inputs: [\"id\", \"animationSettings\", \"singleBranchExpand\"], outputs: [\"panelExpanding\", \"panelExpanded\", \"panelCollapsing\", \"panelCollapsed\"] }, { kind: \"pipe\", type: IgxFilterPivotItemsPipe, name: \"filterPivotItems\" }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPivotDataSelectorComponent, decorators: [{\n type: Component,\n args: [{ selector: \"igx-pivot-data-selector\", template: \"
    \\n \\n search\\n \\n \\n \\n \\n \\n {{ item.memberName }}\\n \\n \\n \\n {{ item.displayName || item.member }}\\n \\n \\n
    \\n\\n\\n \\n \\n \\n
    \\n {{ grid?.resourceStrings[panel.i18n] }}\\n
    \\n
    \\n {{ panel.icon }}\\n {{ this.grid ? this.grid[panel.dataKey].length : 0 }}\\n
    \\n
    \\n \\n \\n 0\\\"\\n [displayDensity]=\\\"displayDensity\\\"\\n >\\n \\n
    \\n \\n
    \\n {{\\n item.aggregate.key\\n }}\\n (\\n {{ item[panel.displayKey] || item[panel.itemKey] }}\\n )\\n
    \\n \\n {{\\n item.sortDirection < 2\\n ? \\\"arrow_upward\\\"\\n : \\\"arrow_downward\\\"\\n }}\\n \\n
    \\n
    \\n filter_list\\n \\n \\n functions\\n \\n 0\\\"\\n >drag_handle\\n
    \\n \\n \\n \\n \\n {{ grid?.resourceStrings.igx_grid_pivot_selector_panel_empty }}\\n \\n \\n \\n
    \\n\\n\\n \\n {{ item.label }}\\n \\n\\n\\n\\n \\n
    \\n unfold_more\\n {{ ghostText }}\\n
    \\n drag_handle\\n \\n
    \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columnsExpanded: [{\n type: Input\n }], columnsExpandedChange: [{\n type: Output\n }], rowsExpanded: [{\n type: Input\n }], rowsExpandedChange: [{\n type: Output\n }], filtersExpanded: [{\n type: Input\n }], filtersExpandedChange: [{\n type: Output\n }], valuesExpanded: [{\n type: Input\n }], valuesExpandedChange: [{\n type: Output\n }], cssClass: [{\n type: HostBinding,\n args: [\"class.igx-pivot-data-selector\"]\n }], grid: [{\n type: Input\n }] } });\n\n/**\n * @hidden\n */\nclass IgxPivotGridModule {\n}\nIgxPivotGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPivotGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nIgxPivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPivotGridModule, declarations: [IgxPivotGridComponent,\n IgxPivotRowComponent,\n IgxPivotHeaderRowComponent,\n IgxPivotRowDimensionContentComponent,\n IgxPivotRowDimensionHeaderComponent,\n IgxPivotRowDimensionHeaderGroupComponent,\n IgxPivotRowPipe,\n IgxPivotRowExpansionPipe,\n IgxPivotAutoTransform,\n IgxPivotColumnPipe,\n IgxPivotGridFilterPipe,\n IgxPivotGridSortingPipe,\n IgxPivotGridColumnSortingPipe,\n IgxPivotCellMergingPipe,\n IgxFilterPivotItemsPipe,\n IgxPivotGridCellStyleClassesPipe,\n IgxPivotDataSelectorComponent,\n IgxPivotValueChipTemplateDirective], imports: [IgxGridModule, IgxExpansionPanelModule, IgxDragDropModule, IgxListModule, IgxAccordionModule], exports: [IgxGridModule,\n IgxPivotGridComponent,\n IgxPivotRowComponent,\n IgxPivotHeaderRowComponent,\n IgxPivotRowDimensionContentComponent,\n IgxPivotRowDimensionHeaderComponent,\n IgxPivotRowDimensionHeaderGroupComponent,\n IgxPivotRowExpansionPipe,\n IgxPivotAutoTransform,\n IgxPivotRowPipe,\n IgxPivotColumnPipe,\n IgxPivotGridFilterPipe,\n IgxPivotGridSortingPipe,\n IgxPivotGridColumnSortingPipe,\n IgxPivotCellMergingPipe,\n IgxFilterPivotItemsPipe,\n IgxPivotGridCellStyleClassesPipe,\n IgxPivotDataSelectorComponent,\n IgxPivotValueChipTemplateDirective] });\nIgxPivotGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPivotGridModule, imports: [IgxGridModule, IgxExpansionPanelModule, IgxDragDropModule, IgxListModule, IgxAccordionModule, IgxGridModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0\", ngImport: i0, type: IgxPivotGridModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n IgxPivotGridComponent,\n IgxPivotRowComponent,\n IgxPivotHeaderRowComponent,\n IgxPivotRowDimensionContentComponent,\n IgxPivotRowDimensionHeaderComponent,\n IgxPivotRowDimensionHeaderGroupComponent,\n IgxPivotRowPipe,\n IgxPivotRowExpansionPipe,\n IgxPivotAutoTransform,\n IgxPivotColumnPipe,\n IgxPivotGridFilterPipe,\n IgxPivotGridSortingPipe,\n IgxPivotGridColumnSortingPipe,\n IgxPivotCellMergingPipe,\n IgxFilterPivotItemsPipe,\n IgxPivotGridCellStyleClassesPipe,\n IgxPivotDataSelectorComponent,\n IgxPivotValueChipTemplateDirective,\n ],\n exports: [\n IgxGridModule,\n IgxPivotGridComponent,\n IgxPivotRowComponent,\n IgxPivotHeaderRowComponent,\n IgxPivotRowDimensionContentComponent,\n IgxPivotRowDimensionHeaderComponent,\n IgxPivotRowDimensionHeaderGroupComponent,\n IgxPivotRowExpansionPipe,\n IgxPivotAutoTransform,\n IgxPivotRowPipe,\n IgxPivotColumnPipe,\n IgxPivotGridFilterPipe,\n IgxPivotGridSortingPipe,\n IgxPivotGridColumnSortingPipe,\n IgxPivotCellMergingPipe,\n IgxFilterPivotItemsPipe,\n IgxPivotGridCellStyleClassesPipe,\n IgxPivotDataSelectorComponent,\n IgxPivotValueChipTemplateDirective,\n ],\n imports: [IgxGridModule, IgxExpansionPanelModule, IgxDragDropModule, IgxListModule, IgxAccordionModule],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n }]\n }] });\n\n/*\n * Public API Surface of igniteui-angular\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbsolutePosition, AbsoluteScrollStrategy, AutoPositionStrategy, BaseFilteringStrategy, BaseProgressDirective, BlockScrollStrategy, ButtonGroupAlignment, Calendar, CalendarHammerConfig, CalendarSelection, CalendarView, CarouselHammerConfig, CarouselIndicatorsOrientation, CloseScrollStrategy, ColumnDisplayOrder, ColumnPinningPosition, ConnectedPositioningStrategy, ContainerPositionStrategy, CsvFileTypes, DEFAULT_OWNER, DEFAULT_PIVOT_KEYS, DataType, DataUtil, DatePart, DateRangePickerFormatPipe, DateRangeType, DefaultDataCloneStrategy, DefaultPivotGridRecordSortingStrategy, DefaultPivotSortingStrategy, DefaultSortingStrategy, DimensionValuesFilteringStrategy, Direction, DisplayDensity, DisplayDensityBase, DisplayDensityToken, DragDirection, DropPosition, ElasticPositionStrategy, ExpansionPanelHeaderIconPosition, ExportRecordType, FilterMode, FilterUtil, FilteringExpressionsTree, FilteringExpressionsTreeType, FilteringLogic, FilteringStrategy, FormattedValuesFilteringStrategy, GRID_LEVEL_COL, GRID_PARENT, GRID_ROOT_SUMMARY, GlobalPositionStrategy, GridBaseAPIService, GridColumnDataType, GridInstanceType, GridPagingMode, GridSelectionMode, GridSummaryCalculationMode, GridSummaryPosition, GroupMemberCountSortingStrategy, GroupedRecords, HeaderType, HorizontalAlignment, HorizontalAnimationType, IGX_GRID_BASE, IGX_INPUT_GROUP_TYPE, IGX_STEPPER_COMPONENT, IGX_STEP_COMPONENT, ITreeGridAggregation, IgcFormControlDirective, IgcFormsModule, IgxAccordionComponent, IgxAccordionModule, IgxActionStripComponent, IgxActionStripMenuItemDirective, IgxActionStripModule, IgxAdvancedFilteringDialogComponent, IgxAppendDropStrategy, IgxAutocompleteDirective, IgxAutocompleteModule, IgxAvatarComponent, IgxAvatarModule, IgxAvatarSize, IgxAvatarType, IgxBadgeComponent, IgxBadgeModule, IgxBadgeType, IgxBannerActionsDirective, IgxBannerComponent, IgxBannerModule, IgxBaseExporter, IgxBaseTransactionService, IgxBooleanFilteringOperand, IgxBottomNavComponent, IgxBottomNavContentComponent, IgxBottomNavHeaderComponent, IgxBottomNavHeaderIconDirective, IgxBottomNavHeaderLabelDirective, IgxBottomNavItemComponent, IgxBottomNavModule, IgxButtonDirective, IgxButtonGroupComponent, IgxButtonGroupModule, IgxButtonModule, IgxCSVTextDirective, IgxCalendarBaseDirective, IgxCalendarComponent, IgxCalendarHeaderTemplateDirective, IgxCalendarModule, IgxCalendarMonthDirective, IgxCalendarScrollMonthDirective, IgxCalendarSubheaderTemplateDirective, IgxCalendarView, IgxCalendarYearDirective, IgxCardActionsComponent, IgxCardActionsLayout, IgxCardComponent, IgxCardContentDirective, IgxCardFooterDirective, IgxCardHeaderComponent, IgxCardHeaderSubtitleDirective, IgxCardHeaderTitleDirective, IgxCardMediaDirective, IgxCardModule, IgxCardThumbnailDirective, IgxCardType, IgxCarouselComponent, IgxCarouselComponentBase, IgxCarouselIndicatorDirective, IgxCarouselModule, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective, IgxCellEditorTemplateDirective, IgxCellFooterTemplateDirective, IgxCellHeaderTemplateDirective, IgxCellTemplateDirective, IgxCellValidationErrorDirective, IgxCheckboxComponent, IgxCheckboxModule, IgxChildGridRowComponent, IgxChipComponent, IgxChipsAreaComponent, IgxChipsModule, IgxCircularProgressBarComponent, IgxCollapsibleIndicatorTemplateDirective, IgxColumMaxLengthValidatorDirective, IgxColumPatternValidatorDirective, IgxColumnActionEnabledPipe, IgxColumnActionsBaseDirective, IgxColumnActionsComponent, IgxColumnActionsModule, IgxColumnComponent, IgxColumnEmailValidatorDirective, IgxColumnFormatterPipe, IgxColumnGroupComponent, IgxColumnHidingDirective, IgxColumnLayoutComponent, IgxColumnMaxValidatorDirective, IgxColumnMinLengthValidatorDirective, IgxColumnMinValidatorDirective, IgxColumnMovingDragDirective, IgxColumnMovingDropDirective, IgxColumnMovingModule, IgxColumnPinningDirective, IgxColumnRequiredValidatorDirective, IgxColumnResizerDirective, IgxComboAddItemComponent, IgxComboAddItemDirective, IgxComboClearIconDirective, IgxComboComponent, IgxComboDropDownComponent, IgxComboEmptyDirective, IgxComboFilteringPipe, IgxComboFooterDirective, IgxComboGroupingPipe, IgxComboHeaderDirective, IgxComboHeaderItemDirective, IgxComboItemComponent, IgxComboItemDirective, IgxComboModule, IgxComboToggleIconDirective, IgxCsvExporterOptions, IgxCsvExporterService, IgxDataLoadingTemplateDirective, IgxDataRecordSorting, IgxDateFilteringOperand, IgxDatePickerComponent, IgxDatePickerModule, IgxDateRangeEndComponent, IgxDateRangeInputsBaseComponent, IgxDateRangePickerComponent, IgxDateRangePickerModule, IgxDateRangeSeparatorDirective, IgxDateRangeStartComponent, IgxDateSummaryOperand, IgxDateTimeEditorDirective, IgxDateTimeEditorModule, IgxDateTimeFilteringOperand, IgxDaysViewComponent, IgxDefaultDropStrategy, IgxDialogActionsDirective, IgxDialogComponent, IgxDialogModule, IgxDialogTitleDirective, IgxDisplayDensityModule, IgxDividerDirective, IgxDividerModule, IgxDividerType, IgxDragDirective, IgxDragDropModule, IgxDragHandleDirective, IgxDragIgnoreDirective, IgxDragIndicatorIconDirective, IgxDragLocation, IgxDropDirective, IgxDropDownBaseDirective, IgxDropDownComponent, IgxDropDownGroupComponent, IgxDropDownItemBaseDirective, IgxDropDownItemComponent, IgxDropDownItemNavigationDirective, IgxDropDownModule, IgxEmptyListTemplateDirective, IgxExcelExporterOptions, IgxExcelExporterService, IgxExcelStyleClearFiltersComponent, IgxExcelStyleColumnOperationsTemplateDirective, IgxExcelStyleConditionalFilterComponent, IgxExcelStyleDateExpressionComponent, IgxExcelStyleFilterOperationsTemplateDirective, IgxExcelStyleHeaderComponent, IgxExcelStyleHeaderIconDirective, IgxExcelStyleHidingComponent, IgxExcelStyleLoadingValuesTemplateDirective, IgxExcelStyleMovingComponent, IgxExcelStylePinningComponent, IgxExcelStyleSearchComponent, IgxExcelStyleSelectingComponent, IgxExcelStyleSortingComponent, IgxExcelTextDirective, IgxExpansionPanelBodyComponent, IgxExpansionPanelComponent, IgxExpansionPanelDescriptionDirective, IgxExpansionPanelHeaderComponent, IgxExpansionPanelIconDirective, IgxExpansionPanelModule, IgxExpansionPanelTitleDirective, IgxExporterOptionsBase, IgxFieldFormatterPipe, IgxFilterActionColumnsPipe, IgxFilterCellTemplateDirective, IgxFilterDirective, IgxFilterModule, IgxFilterOptions, IgxFilterPipe, IgxFilterPivotItemsPipe, IgxFilteringOperand, IgxFlatTransactionFactory, IgxFlexDirective, IgxFocusDirective, IgxFocusModule, IgxFocusTrapDirective, IgxFocusTrapModule, IgxForOfContext, IgxForOfDirective, IgxForOfModule, IgxGridAPIService, IgxGridActionButtonComponent, IgxGridActionsBaseDirective, IgxGridAddRowPipe, IgxGridBaseDirective, IgxGridBodyDirective, IgxGridCell, IgxGridCellImageAltPipe, IgxGridCellStyleClassesPipe, IgxGridCellStylesPipe, IgxGridColumnModule, IgxGridColumnResizerComponent, IgxGridCommonModule, IgxGridComponent, IgxGridDataMapperPipe, IgxGridDetailTemplateDirective, IgxGridDetailsPipe, IgxGridDragSelectDirective, IgxGridEditingActionsComponent, IgxGridExcelStyleFilteringComponent, IgxGridExcelStyleFilteringModule, IgxGridExpandableCellComponent, IgxGridFilterConditionPipe, IgxGridFilteringModule, IgxGridFilteringPipe, IgxGridFooterComponent, IgxGridForOfDirective, IgxGridGroupByAreaComponent, IgxGridGroupByRowComponent, IgxGridGroupingPipe, IgxGridHeaderComponent, IgxGridHeaderGroupComponent, IgxGridHeaderRowComponent, IgxGridHeadersModule, IgxGridHierarchicalPagingPipe, IgxGridHierarchicalPipe, IgxGridModule, IgxGridNotGroupedPipe, IgxGridPaginatorOptionsPipe, IgxGridPagingPipe, IgxGridPinningActionsComponent, IgxGridPipesModule, IgxGridResizingModule, IgxGridRow, IgxGridRowClassesPipe, IgxGridRowPinningPipe, IgxGridRowStylesPipe, IgxGridSelectionModule, IgxGridSharedModules, IgxGridSortingPipe, IgxGridStateDirective, IgxGridStateModule, IgxGridSummaryModule, IgxGridSummaryPipe, IgxGridToolbarActionsComponent, IgxGridToolbarAdvancedFilteringComponent, IgxGridToolbarComponent, IgxGridToolbarDirective, IgxGridToolbarExporterComponent, IgxGridToolbarHidingComponent, IgxGridToolbarModule, IgxGridToolbarPinningComponent, IgxGridToolbarTitleComponent, IgxGridTopLevelColumns, IgxGridTransactionPipe, IgxGridTransactionStatePipe, IgxGridValidationService, IgxGroupAreaDropDirective, IgxGroupByAreaDirective, IgxGroupByMetaPipe, IgxGroupByRow, IgxGroupByRowSelectorDirective, IgxGroupByRowTemplateDirective, IgxGroupedTreeGridSorting, IgxGrouping, IgxHasVisibleColumnsPipe, IgxHeadSelectorDirective, IgxHeaderCollapseIndicatorDirective, IgxHeaderExpandIndicatorDirective, IgxHeaderGroupStylePipe, IgxHeaderGroupWidthPipe, IgxHierarchicalGridAPIService, IgxHierarchicalGridBaseDirective, IgxHierarchicalGridComponent, IgxHierarchicalGridModule, IgxHierarchicalGridRow, IgxHierarchicalRowComponent, IgxHierarchicalTransactionFactory, IgxHierarchicalTransactionService, IgxHierarchicalTransactionServiceFactory, IgxHintDirective, IgxIconComponent, IgxIconModule, IgxIconService, IgxInputDirective, IgxInputGroupComponent, IgxInputGroupModule, IgxInputState, IgxInsertDropStrategy, IgxItemListDirective, IgxLabelDirective, IgxLayoutDirective, IgxLayoutModule, IgxLinearProgressBarComponent, IgxListActionDirective, IgxListBaseDirective, IgxListComponent, IgxListItemComponent, IgxListItemLeftPanningTemplateDirective, IgxListItemRightPanningTemplateDirective, IgxListLineDirective, IgxListLineSubTitleDirective, IgxListLineTitleDirective, IgxListModule, IgxListPanState, IgxListThumbnailDirective, IgxMaskDirective, IgxMaskModule, IgxMonthPickerBaseDirective, IgxMonthPickerComponent, IgxMonthsViewComponent, IgxNavDrawerItemDirective, IgxNavDrawerMiniTemplateDirective, IgxNavDrawerTemplateDirective, IgxNavbarActionDirective, IgxNavbarComponent, IgxNavbarModule, IgxNavbarTitleDirective, IgxNavigationCloseDirective, IgxNavigationDrawerComponent, IgxNavigationDrawerModule, IgxNavigationModule, IgxNavigationService, IgxNavigationToggleDirective, IgxNumberFilteringOperand, IgxNumberSummaryOperand, IgxOverlayOutletDirective, IgxOverlayService, IgxPageNavigationComponent, IgxPageSizeSelectorComponent, IgxPaginatorComponent, IgxPaginatorDirective, IgxPaginatorModule, IgxPaginatorTemplateDirective, IgxPickerActionsDirective, IgxPickerClearComponent, IgxPickerToggleComponent, IgxPickersCommonModule, IgxPivotAggregate, IgxPivotAutoTransform, IgxPivotCellMergingPipe, IgxPivotColumnPipe, IgxPivotDataSelectorComponent, IgxPivotDateAggregate, IgxPivotDateDimension, IgxPivotGridCellStyleClassesPipe, IgxPivotGridColumnResizerComponent, IgxPivotGridColumnSortingPipe, IgxPivotGridComponent, IgxPivotGridFilterPipe, IgxPivotGridModule, IgxPivotGridSortingPipe, IgxPivotHeaderRowComponent, IgxPivotNumericAggregate, IgxPivotResizeHandleDirective, IgxPivotRowComponent, IgxPivotRowDimensionContentComponent, IgxPivotRowDimensionHeaderComponent, IgxPivotRowDimensionHeaderGroupComponent, IgxPivotRowExpansionPipe, IgxPivotRowPipe, IgxPivotTimeAggregate, IgxPivotValueChipTemplateDirective, IgxPrefixDirective, IgxPrefixModule, IgxPrependDropStrategy, IgxProcessBarTextTemplateDirective, IgxProgressBarGradientDirective, IgxProgressBarModule, IgxProgressType, IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent, IgxQueryBuilderModule, IgxRadioComponent, IgxRadioGroupDirective, IgxRadioModule, IgxResizeHandleDirective, IgxRippleDirective, IgxRippleModule, IgxRowAddTextDirective, IgxRowCollapsedIndicatorDirective, IgxRowDragDirective, IgxRowDragGhostDirective, IgxRowDragModule, IgxRowEditActionsDirective, IgxRowEditTabStopDirective, IgxRowEditTemplateDirective, IgxRowEditTextDirective, IgxRowExpandedIndicatorDirective, IgxRowIslandAPIService, IgxRowIslandComponent, IgxRowLoadingIndicatorTemplateDirective, IgxRowSelectorDirective, IgxSelectComponent, IgxSelectFooterDirective, IgxSelectGroupComponent, IgxSelectHeaderDirective, IgxSelectItemComponent, IgxSelectItemNavigationDirective, IgxSelectModule, IgxSelectToggleIconDirective, IgxSimpleComboComponent, IgxSimpleComboModule, IgxSlideComponent, IgxSliderComponent, IgxSliderModule, IgxSliderType, IgxSnackbarComponent, IgxSnackbarModule, IgxSortActionColumnsPipe, IgxSortAscendingHeaderIconDirective, IgxSortDescendingHeaderIconDirective, IgxSortHeaderIconDirective, IgxSorting, IgxSplitBarComponent, IgxSplitterComponent, IgxSplitterModule, IgxSplitterPaneComponent, IgxStepActiveIndicatorDirective, IgxStepCompletedIndicatorDirective, IgxStepComponent, IgxStepContentDirective, IgxStepIndicatorDirective, IgxStepInvalidIndicatorDirective, IgxStepSubTitleDirective, IgxStepTitleDirective, IgxStepType, IgxStepperComponent, IgxStepperModule, IgxStepperOrientation, IgxStepperTitlePosition, IgxStringFilteringOperand, IgxStringReplacePipe, IgxSuffixDirective, IgxSuffixModule, IgxSummaryCellComponent, IgxSummaryDataPipe, IgxSummaryFormatterPipe, IgxSummaryOperand, IgxSummaryRow, IgxSummaryRowComponent, IgxSummaryTemplateDirective, IgxSwitchComponent, IgxSwitchModule, IgxTabContentComponent, IgxTabContentDirective, IgxTabHeaderComponent, IgxTabHeaderDirective, IgxTabHeaderIconDirective, IgxTabHeaderLabelDirective, IgxTabItemComponent, IgxTabItemDirective, IgxTabsAlignment, IgxTabsComponent, IgxTabsDirective, IgxTabsModule, IgxTemplateOutletDirective, IgxTemplateOutletModule, IgxTextAlign, IgxTextHighlightDirective, IgxTextHighlightModule, IgxTextSelectionDirective, IgxTextSelectionModule, IgxThumbFromTemplateDirective, IgxThumbToTemplateDirective, IgxTickLabelTemplateDirective, IgxTimeFilteringOperand, IgxTimeItemDirective, IgxTimePickerActionsDirective, IgxTimePickerComponent, IgxTimePickerModule, IgxTimePickerTemplateDirective, IgxTimeSummaryOperand, IgxToastComponent, IgxToastModule, IgxToggleActionDirective, IgxToggleDirective, IgxToggleModule, IgxTooltipDirective, IgxTooltipModule, IgxTooltipTargetDirective, IgxTransactionService, IgxTreeComponent, IgxTreeExpandIndicatorDirective, IgxTreeGridAPIService, IgxTreeGridAddRowPipe, IgxTreeGridComponent, IgxTreeGridGroupByAreaComponent, IgxTreeGridGroupingPipe, IgxTreeGridModule, IgxTreeGridRow, IgxTreeModule, IgxTreeNodeComponent, IgxTreeNodeLinkDirective, IgxTreeSelectMarkerDirective, IgxTreeSelectionType, IgxYearsViewComponent, LabelPosition, NoOpScrollStrategy, NoopFilteringStrategy, NoopPivotDimensionsStrategy, NoopSortingStrategy, PagingError, PickerInteractionMode, PivotColumnDimensionsStrategy, PivotDimensionType, PivotRowDimensionsStrategy, Point, RadioGroupAlignment, RadioLabelPosition, RelativePosition, RelativePositionStrategy, RowEditPositionStrategy, RowPinningPosition, SPLITTER_INTERACTION_KEYS, ScrollMonth, ScrollStrategy, SliderHandle, SortingDirection, SortingIndexPipe, SplitterType, SwitchLabelPosition, TickLabelsOrientation, TicksOrientation, TransactionEventOrigin, TransactionType, TreeGridFilteringStrategy, TreeGridFormattedValuesFilteringStrategy, TreeGridMatchingRecordsOnlyFilteringStrategy, VerticalAlignment, VerticalAnimationType, WEEKDAYS, blink, changei18n, fadeIn, fadeOut, flipBottom, flipHorBck, flipHorFwd, flipLeft, flipRight, flipTop, flipVerBck, flipVerFwd, getCurrentResourceStrings, getTypeNameForDebugging, growVerIn, growVerOut, heartbeat, hierarchicalTransactionServiceFactory, isDateInRanges, isLeap, monthRange, pulsateBck, pulsateFwd, range, rotateInBl, rotateInBottom, rotateInBr, rotateInCenter, rotateInDiagonal1, rotateInDiagonal2, rotateInHor, rotateInLeft, rotateInRight, rotateInTl, rotateInTop, rotateInTr, rotateInVer, rotateOutBl, rotateOutBottom, rotateOutBr, rotateOutCenter, rotateOutDiagonal1, rotateOutDiagonal2, rotateOutHor, rotateOutLeft, rotateOutRight, rotateOutTl, rotateOutTop, rotateOutTr, rotateOutVer, scaleInBl, scaleInBottom, scaleInBr, scaleInCenter, scaleInHorCenter, scaleInHorLeft, scaleInHorRight, scaleInLeft, scaleInRight, scaleInTl, scaleInTop, scaleInTr, scaleInVerBottom, scaleInVerCenter, scaleInVerTop, scaleOutBl, scaleOutBottom, scaleOutBr, scaleOutCenter, scaleOutHorCenter, scaleOutHorLeft, scaleOutHorRight, scaleOutLeft, scaleOutRight, scaleOutTl, scaleOutTop, scaleOutTr, scaleOutVerBottom, scaleOutVerCenter, scaleOutVerTop, shakeBl, shakeBottom, shakeBr, shakeCenter, shakeHor, shakeLeft, shakeRight, shakeTl, shakeTop, shakeTr, shakeVer, slideInBl, slideInBottom, slideInBr, slideInLeft, slideInRight, slideInTl, slideInTop, slideInTr, slideOutBl, slideOutBottom, slideOutBr, slideOutLeft, slideOutRight, slideOutTl, slideOutTop, slideOutTr, swingInBottomBck, swingInBottomFwd, swingInLeftBck, swingInLeftFwd, swingInRightBck, swingInRightFwd, swingInTopBck, swingInTopFwd, swingOutBottomBck, swingOutBottomFwd, swingOutLeftBck, swingOutLefttFwd, swingOutRightBck, swingOutRightFwd, swingOutTopBck, swingOutTopFwd, toPercent, toValue, valueInRange, weekDay, IgxGridFilteringCellComponent as θIgxGridFilteringCellComponent, IgxGridFilteringRowComponent as θIgxGridFilteringRowComponent, IgxHierarchicalGridCellComponent as θIgxHierarchicalGridCellComponent, IgxTreeGridCellComponent as θIgxTreeGridCellComponent, IgxTreeGridRowComponent as θIgxTreeGridRowComponent, IgxGridCellComponent as ϴIgxGridCellComponent, IgxGridRowComponent as ϴIgxGridRowComponent };\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { JoinPipe } from './pipes/join.pipe';\r\nimport { NgVarDirective } from './directives/ng-var.directive';\r\nimport { SortPipe } from './pipes/sort.pipe';\r\nimport { FindByPipe } from './pipes/find-by.pipe';\r\nimport { PropPipe } from './pipes/prop.pipe';\r\nimport { TimingPipe } from './pipes/timing.pipe';\r\nimport { ValidateStateDirective } from './directives/validate-state.directive';\r\nimport { StripHtmlPipe } from './pipes/strip-html.pipe';\r\nimport { SimpleCardComponent } from './components/simple-card/simple-card.component';\r\nimport { DatalistSelectComponent } from './components/datalist-select/datalist-select.component';\r\nimport { RolePinComponent } from './components/role-pin/role-pin.component';\r\nimport { EntityAvatarComponent } from './components/entity-avatar/entity-avatar.component';\r\nimport { SpinnerComponent } from './components/spinner/spinner.component';\r\nimport { SortDropdownComponent } from './components/sort-dropdown/sort-dropdown.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { ErrorAlertComponent } from './components/error-alert/error-alert.component';\r\n\r\nimport { CalendarPipe } from './pipes/calendar.pipe';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { PaginationComponent } from './components/pagination/pagination.component';\r\nimport { ScrollSpyDirective } from './directives/scroll-spy.directive';\r\nimport { GoogleMapsLinkComponent } from './components/google-maps-link/google-maps-link.component';\r\nimport { StatCardComponent } from './components/stat-card/stat-card.component';\r\nimport { ImportExportComponent } from './components/import-export/import-export.component';\r\nimport { TranslateRolesPipe } from './pipes/translate-roles.pipe';\r\nimport { ImageUploaderComponent } from './components/image-uploader/image-uploader.component';\r\nimport { ImageSliderComponent } from './components/image-slider/image-slider.component';\r\nimport { ImageCardComponent } from './components/image-card/image-card.component';\r\nimport { ConfirmDeleteComponent } from './components/confirm-delete/confirm-delete.component';\r\nimport { ModalModule } from 'ngx-bootstrap/modal';\r\nimport { SingleTextboxModalComponent } from './components/single-textbox-modal/single-textbox-modal.component';\r\nimport { ConfirmRefreshRedirectComponent } from './components/confirm-refresh-redirect/confirm-refresh-redirect.component';\r\nimport { SingleGroupModalComponent } from '../truck/components/single-group-modal/single-group-modal.component';\r\nimport { NgSelectModule } from '@ng-select/ng-select';\r\nimport { TimepickerDropdownComponent } from './components/timepicker-dropdown/timepicker-dropdown.component';\r\nimport {\r\n IgxIconModule,\r\n IgxInputGroupModule,\r\n IgxTimePickerModule,\r\n} from 'igniteui-angular';\r\nimport { HammerModule } from '@angular/platform-browser';\r\nimport { ImgSliderComponent } from './components/img-slider/img-slider.component';\r\nimport { ConfirmActionComponent } from './components/confirm-action/confirm-action.component';\r\nimport { BigSpinnerComponent } from './components/big-spinner/big-spinner.component';\r\nimport { TripImageSliderComponent } from './components/trip-image-slider/trip-image-slider.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n JoinPipe,\r\n NgVarDirective,\r\n SortPipe,\r\n FindByPipe,\r\n PropPipe,\r\n TimingPipe,\r\n ValidateStateDirective,\r\n StripHtmlPipe,\r\n SimpleCardComponent,\r\n DatalistSelectComponent,\r\n RolePinComponent,\r\n EntityAvatarComponent,\r\n SpinnerComponent,\r\n SortDropdownComponent,\r\n ErrorAlertComponent,\r\n CalendarPipe,\r\n PaginationComponent,\r\n ScrollSpyDirective,\r\n GoogleMapsLinkComponent,\r\n StatCardComponent,\r\n ImportExportComponent,\r\n TranslateRolesPipe,\r\n ImageUploaderComponent,\r\n ImageSliderComponent,\r\n ImageCardComponent,\r\n ConfirmDeleteComponent,\r\n SingleTextboxModalComponent,\r\n ConfirmRefreshRedirectComponent,\r\n SingleGroupModalComponent,\r\n TimepickerDropdownComponent,\r\n ImgSliderComponent,\r\n ConfirmActionComponent,\r\n BigSpinnerComponent,\r\n TripImageSliderComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n NgSelectModule,\r\n IgxTimePickerModule,\r\n IgxInputGroupModule,\r\n IgxIconModule,\r\n HammerModule,\r\n BrowserAnimationsModule,\r\n ModalModule.forRoot(),\r\n ],\r\n exports: [\r\n JoinPipe,\r\n NgVarDirective,\r\n SortPipe,\r\n FindByPipe,\r\n PropPipe,\r\n TimingPipe,\r\n ValidateStateDirective,\r\n StripHtmlPipe,\r\n SimpleCardComponent,\r\n DatalistSelectComponent,\r\n RolePinComponent,\r\n EntityAvatarComponent,\r\n SpinnerComponent,\r\n SortDropdownComponent,\r\n ErrorAlertComponent,\r\n CalendarPipe,\r\n BrowserAnimationsModule,\r\n PaginationComponent,\r\n ScrollSpyDirective,\r\n GoogleMapsLinkComponent,\r\n StatCardComponent,\r\n ImportExportComponent,\r\n ImageUploaderComponent,\r\n TranslateRolesPipe,\r\n ImageSliderComponent,\r\n ImageCardComponent,\r\n ConfirmDeleteComponent,\r\n ConfirmActionComponent,\r\n SingleTextboxModalComponent,\r\n ConfirmRefreshRedirectComponent,\r\n SingleGroupModalComponent,\r\n TimepickerDropdownComponent,\r\n BigSpinnerComponent,\r\n TripImageSliderComponent,\r\n ],\r\n})\r\nexport class SharedModule {}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { CKEditorModule } from '@ckeditor/ckeditor5-angular';\r\nimport { SharedModule } from '../shared/shared.module';\r\nimport { NewsEditComponent } from './news-edit/news-edit.component';\r\nimport { NewsFormComponent } from './news-form/news-form.component';\r\nimport { NewsPostComponent } from './news-post/news-post.component';\r\nimport { NewsComponent } from './news/news.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n NewsEditComponent,\r\n NewsFormComponent,\r\n NewsComponent,\r\n NewsPostComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SharedModule,\r\n CKEditorModule,\r\n ],\r\n exports: [\r\n NewsEditComponent,\r\n NewsComponent,\r\n NewsPostComponent\r\n ]\r\n})\r\nexport class NewsModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpErrorResponse\r\n} from '@angular/common/http';\r\nimport { catchError, Observable } from 'rxjs';\r\nimport { UiRepository } from 'src/app/state/ui.repository';\r\nimport { Router } from '@angular/router';\r\nimport { EnvState } from '../../shared/helpers/env-state';\r\n\r\n// List of UI routes and API endpoints\r\n// that must not cause \"Session is over\" popup\r\nconst DO_NOT_INTERCEPT = [ \r\n '/signin',\r\n '/forgotpassword',\r\n '/api/auth',\r\n '/api/auth/password'\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SessionInterceptor implements HttpInterceptor {\r\n constructor(\r\n private repo: UiRepository, \r\n private router: Router,\r\n private env: EnvState\r\n ) { }\r\n\r\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n return next.handle(request).pipe(\r\n catchError(err => {\r\n if (err instanceof HttpErrorResponse && err.status === 401\r\n && !this.isExceptionUrl(err.url)\r\n && !this.isExceptionUrl(this.router.url)) {\r\n this.repo.setSessionOver();\r\n }\r\n // return the error back to the caller\r\n throw err;\r\n })\r\n );\r\n }\r\n\r\n isExceptionUrl(url: string | null): boolean {\r\n if (!url) {\r\n return false;\r\n }\r\n var parsed = new URL(url, location.origin);\r\n let path = parsed.pathname;\r\n if (path.startsWith(this.env.apiUrl)) {\r\n path = path.substring(this.env.apiUrl.length);\r\n }\r\n return DO_NOT_INTERCEPT.indexOf(path) >= 0;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpResponse\r\n} from '@angular/common/http';\r\nimport { map, Observable } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class DateInterceptor implements HttpInterceptor {\r\n private dateRegex = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z?$/;\r\n\r\n constructor() { }\r\n\r\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n return next.handle(request).pipe(\r\n map((event: HttpEvent) => {\r\n if (event instanceof HttpResponse) { \r\n this.convertDates(event.body);\r\n }\r\n return event;\r\n })\r\n );\r\n }\r\n\r\n private convertDates(object: any) {\r\n if (!object || !(object instanceof Object)) {\r\n return;\r\n }\r\n\r\n if (object instanceof Array) {\r\n for (const item of object) {\r\n this.convertDates(item);\r\n }\r\n }\r\n\r\n for (const key of Object.keys(object)) {\r\n const value = object[key];\r\n\r\n if (value instanceof Array) {\r\n for (const item of value) {\r\n this.convertDates(item);\r\n }\r\n }\r\n\r\n if (value instanceof Object) {\r\n this.convertDates(value);\r\n }\r\n\r\n if (typeof value === 'string' \r\n && this.dateRegex.test(value)) {\r\n object[key] = new Date(value);\r\n }\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n HttpRequest,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor\r\n} from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { EnvState } from '../../shared/helpers/env-state';\r\n\r\n@Injectable()\r\nexport class BaseUrlInterceptor implements HttpInterceptor {\r\n constructor(private env: EnvState) {}\r\n\r\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\r\n let requestUrl = request.url;\r\n if (!requestUrl.startsWith('/')) {\r\n requestUrl = `/${requestUrl}`;\r\n }\r\n const apiReq = request.clone({ url: `${this.env.apiUrl}${request.url}` });\r\n return next.handle(apiReq);\r\n }\r\n}\r\n","import { EventEmitter, Component, ElementRef, Inject, Output, Input, NgModule } from '@angular/core';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { timer } from 'rxjs';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\n\nfunction CircleProgressComponent__svg_svg_0__svg_linearGradient_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"linearGradient\");\n ɵngcc0.ɵɵelement(1, \"stop\", 5)(2, \"stop\", 6);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵattribute(\"id\", ctx_r1.svg.outerLinearGradient.id);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵattribute(\"stop-color\", ctx_r1.svg.outerLinearGradient.colorStop1)(\"stop-opacity\", 1);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵattribute(\"stop-color\", ctx_r1.svg.outerLinearGradient.colorStop2)(\"stop-opacity\", 1);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_radialGradient_3_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"radialGradient\");\n ɵngcc0.ɵɵelement(1, \"stop\", 5)(2, \"stop\", 6);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r2 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵattribute(\"id\", ctx_r2.svg.radialGradient.id);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵattribute(\"stop-color\", ctx_r2.svg.radialGradient.colorStop1)(\"stop-opacity\", 1);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵattribute(\"stop-color\", ctx_r2.svg.radialGradient.colorStop2)(\"stop-opacity\", 1);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_ng_container_4__svg_circle_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelement(0, \"circle\");\n} if (rf & 2) {\n const ctx_r8 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵattribute(\"cx\", ctx_r8.svg.backgroundCircle.cx)(\"cy\", ctx_r8.svg.backgroundCircle.cy)(\"r\", ctx_r8.svg.backgroundCircle.r)(\"fill\", ctx_r8.svg.backgroundCircle.fill)(\"fill-opacity\", ctx_r8.svg.backgroundCircle.fillOpacity)(\"stroke\", ctx_r8.svg.backgroundCircle.stroke)(\"stroke-width\", ctx_r8.svg.backgroundCircle.strokeWidth);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_ng_container_4__svg_circle_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelement(0, \"circle\");\n} if (rf & 2) {\n const ctx_r9 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵattributeInterpolate1(\"fill\", \"url(#\", ctx_r9.svg.radialGradient.id, \")\");\n ɵngcc0.ɵɵattribute(\"cx\", ctx_r9.svg.backgroundCircle.cx)(\"cy\", ctx_r9.svg.backgroundCircle.cy)(\"r\", ctx_r9.svg.backgroundCircle.r)(\"fill-opacity\", ctx_r9.svg.backgroundCircle.fillOpacity)(\"stroke\", ctx_r9.svg.backgroundCircle.stroke)(\"stroke-width\", ctx_r9.svg.backgroundCircle.strokeWidth);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_ng_container_4_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, CircleProgressComponent__svg_svg_0__svg_ng_container_4__svg_circle_1_Template, 1, 7, \"circle\", 2);\n ɵngcc0.ɵɵtemplate(2, CircleProgressComponent__svg_svg_0__svg_ng_container_4__svg_circle_2_Template, 1, 7, \"circle\", 2);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r3 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r3.options.backgroundGradient);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r3.options.backgroundGradient);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_circle_5_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelement(0, \"circle\");\n} if (rf & 2) {\n const ctx_r4 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵattribute(\"cx\", ctx_r4.svg.circle.cx)(\"cy\", ctx_r4.svg.circle.cy)(\"r\", ctx_r4.svg.circle.r)(\"fill\", ctx_r4.svg.circle.fill)(\"stroke\", ctx_r4.svg.circle.stroke)(\"stroke-width\", ctx_r4.svg.circle.strokeWidth);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_ng_container_6__svg_path_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelement(0, \"path\");\n} if (rf & 2) {\n const ctx_r10 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵattribute(\"d\", ctx_r10.svg.path.d)(\"stroke\", ctx_r10.svg.path.stroke)(\"stroke-width\", ctx_r10.svg.path.strokeWidth)(\"stroke-linecap\", ctx_r10.svg.path.strokeLinecap)(\"fill\", ctx_r10.svg.path.fill);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_ng_container_6__svg_path_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelement(0, \"path\");\n} if (rf & 2) {\n const ctx_r11 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵattributeInterpolate1(\"stroke\", \"url(#\", ctx_r11.svg.outerLinearGradient.id, \")\");\n ɵngcc0.ɵɵattribute(\"d\", ctx_r11.svg.path.d)(\"stroke-width\", ctx_r11.svg.path.strokeWidth)(\"stroke-linecap\", ctx_r11.svg.path.strokeLinecap)(\"fill\", ctx_r11.svg.path.fill);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_ng_container_6_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, CircleProgressComponent__svg_svg_0__svg_ng_container_6__svg_path_1_Template, 1, 5, \"path\", 2);\n ɵngcc0.ɵɵtemplate(2, CircleProgressComponent__svg_svg_0__svg_ng_container_6__svg_path_2_Template, 1, 5, \"path\", 2);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r5 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r5.options.outerStrokeGradient);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.options.outerStrokeGradient);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_1__svg_tspan_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"tspan\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const tspan_r16 = ctx.$implicit;\n const ctx_r15 = ɵngcc0.ɵɵnextContext(4);\n ɵngcc0.ɵɵattribute(\"x\", ctx_r15.svg.title.x)(\"y\", ctx_r15.svg.title.y)(\"dy\", tspan_r16.dy)(\"font-size\", ctx_r15.svg.title.fontSize)(\"font-weight\", ctx_r15.svg.title.fontWeight)(\"fill\", ctx_r15.svg.title.color);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(tspan_r16.span);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_1__svg_tspan_1_Template, 2, 7, \"tspan\", 8);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r12 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r12.svg.title.tspans);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_text_7__svg_tspan_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"tspan\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r13 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵattribute(\"font-size\", ctx_r13.svg.units.fontSize)(\"font-weight\", ctx_r13.svg.units.fontWeight)(\"fill\", ctx_r13.svg.units.color);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx_r13.svg.units.text);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_3__svg_tspan_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"tspan\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const tspan_r18 = ctx.$implicit;\n const ctx_r17 = ɵngcc0.ɵɵnextContext(4);\n ɵngcc0.ɵɵattribute(\"x\", ctx_r17.svg.subtitle.x)(\"y\", ctx_r17.svg.subtitle.y)(\"dy\", tspan_r18.dy)(\"font-size\", ctx_r17.svg.subtitle.fontSize)(\"font-weight\", ctx_r17.svg.subtitle.fontWeight)(\"fill\", ctx_r17.svg.subtitle.color);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(tspan_r18.span);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_3_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_3__svg_tspan_1_Template, 2, 7, \"tspan\", 8);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r14 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r14.svg.subtitle.tspans);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_text_7_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"text\", 7);\n ɵngcc0.ɵɵtemplate(1, CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_1_Template, 2, 1, \"ng-container\", 2);\n ɵngcc0.ɵɵtemplate(2, CircleProgressComponent__svg_svg_0__svg_text_7__svg_tspan_2_Template, 2, 4, \"tspan\", 2);\n ɵngcc0.ɵɵtemplate(3, CircleProgressComponent__svg_svg_0__svg_text_7__svg_ng_container_3_Template, 2, 1, \"ng-container\", 2);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r6 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵattribute(\"x\", ctx_r6.svg.circle.cx)(\"y\", ctx_r6.svg.circle.cy)(\"text-anchor\", ctx_r6.svg.title.textAnchor);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r6.options.showTitle);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r6.options.showUnits);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r6.options.showSubtitle);\n} }\nfunction CircleProgressComponent__svg_svg_0__svg_image_8_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelement(0, \"image\", 9);\n} if (rf & 2) {\n const ctx_r7 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵattribute(\"height\", ctx_r7.svg.image.height)(\"width\", ctx_r7.svg.image.width)(\"href\", ctx_r7.svg.image.src, null, \"xlink\")(\"x\", ctx_r7.svg.image.x)(\"y\", ctx_r7.svg.image.y);\n} }\nfunction CircleProgressComponent__svg_svg_0_Template(rf, ctx) { if (rf & 1) {\n const _r20 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵnamespaceSVG();\n ɵngcc0.ɵɵelementStart(0, \"svg\", 1);\n ɵngcc0.ɵɵlistener(\"click\", function CircleProgressComponent__svg_svg_0_Template__svg_svg_click_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r20); const ctx_r19 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r19.emitClickEvent($event)); });\n ɵngcc0.ɵɵelementStart(1, \"defs\");\n ɵngcc0.ɵɵtemplate(2, CircleProgressComponent__svg_svg_0__svg_linearGradient_2_Template, 3, 5, \"linearGradient\", 2);\n ɵngcc0.ɵɵtemplate(3, CircleProgressComponent__svg_svg_0__svg_radialGradient_3_Template, 3, 5, \"radialGradient\", 2);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtemplate(4, CircleProgressComponent__svg_svg_0__svg_ng_container_4_Template, 3, 2, \"ng-container\", 2);\n ɵngcc0.ɵɵtemplate(5, CircleProgressComponent__svg_svg_0__svg_circle_5_Template, 1, 6, \"circle\", 2);\n ɵngcc0.ɵɵtemplate(6, CircleProgressComponent__svg_svg_0__svg_ng_container_6_Template, 3, 2, \"ng-container\", 2);\n ɵngcc0.ɵɵtemplate(7, CircleProgressComponent__svg_svg_0__svg_text_7_Template, 4, 6, \"text\", 3);\n ɵngcc0.ɵɵtemplate(8, CircleProgressComponent__svg_svg_0__svg_image_8_Template, 1, 5, \"image\", 4);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵattribute(\"viewBox\", ctx_r0.svg.viewBox)(\"height\", ctx_r0.svg.height)(\"width\", ctx_r0.svg.width)(\"class\", ctx_r0.options.class);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.options.outerStrokeGradient);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.options.backgroundGradient);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.options.showBackground);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.options.showInnerStroke);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", +ctx_r0.options.percent !== 0 || ctx_r0.options.showZeroOuterStroke);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r0.options.showImage && (ctx_r0.options.showTitle || ctx_r0.options.showUnits || ctx_r0.options.showSubtitle));\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.options.showImage);\n} }\nclass CircleProgressOptions {\r\n constructor() {\r\n this.class = '';\r\n this.backgroundGradient = false;\r\n this.backgroundColor = 'transparent';\r\n this.backgroundGradientStopColor = 'transparent';\r\n this.backgroundOpacity = 1;\r\n this.backgroundStroke = 'transparent';\r\n this.backgroundStrokeWidth = 0;\r\n this.backgroundPadding = 5;\r\n this.percent = 0;\r\n this.radius = 90;\r\n this.space = 4;\r\n this.toFixed = 0;\r\n this.maxPercent = 1000;\r\n this.renderOnClick = true;\r\n this.units = '%';\r\n this.unitsFontSize = '10';\r\n this.unitsFontWeight = 'normal';\r\n this.unitsColor = '#444444';\r\n this.outerStrokeGradient = false;\r\n this.outerStrokeWidth = 8;\r\n this.outerStrokeColor = '#78C000';\r\n this.outerStrokeGradientStopColor = 'transparent';\r\n this.outerStrokeLinecap = 'round';\r\n this.innerStrokeColor = '#C7E596';\r\n this.innerStrokeWidth = 4;\r\n this.titleFormat = undefined;\r\n this.title = 'auto';\r\n this.titleColor = '#444444';\r\n this.titleFontSize = '20';\r\n this.titleFontWeight = 'normal';\r\n this.subtitleFormat = undefined;\r\n this.subtitle = 'progress';\r\n this.subtitleColor = '#A9A9A9';\r\n this.subtitleFontSize = '10';\r\n this.subtitleFontWeight = 'normal';\r\n this.imageSrc = undefined;\r\n this.imageHeight = undefined;\r\n this.imageWidth = undefined;\r\n this.animation = true;\r\n this.animateTitle = true;\r\n this.animateSubtitle = false;\r\n this.animationDuration = 500;\r\n this.showTitle = true;\r\n this.showSubtitle = true;\r\n this.showUnits = true;\r\n this.showImage = false;\r\n this.showBackground = true;\r\n this.showInnerStroke = true;\r\n this.clockwise = true;\r\n this.responsive = false;\r\n this.startFromZero = true;\r\n this.showZeroOuterStroke = true;\r\n this.lazy = false;\r\n }\r\n}\r\n/** @dynamic Prevent compiling error when using type `Document` https://github.com/angular/angular/issues/20351 */\r\nclass CircleProgressComponent {\r\n constructor(defaultOptions, elRef, document) {\r\n this.elRef = elRef;\r\n this.document = document;\r\n this.onClick = new EventEmitter();\r\n // of component\r\n this.svgElement = null;\r\n // whether is in viewport\r\n this.isInViewport = false;\r\n // event for notifying viewport change caused by scrolling or resizing\r\n this.onViewportChanged = new EventEmitter;\r\n this._viewportChangedSubscriber = null;\r\n this.options = new CircleProgressOptions();\r\n this.defaultOptions = new CircleProgressOptions();\r\n this._lastPercent = 0;\r\n this._gradientUUID = null;\r\n this.render = () => {\r\n this.applyOptions();\r\n if (this.options.lazy) {\r\n // Draw svg if it doesn't exist\r\n this.svgElement === null && this.draw(this._lastPercent);\r\n // Draw it only when it's in the viewport\r\n if (this.isInViewport) {\r\n // Draw it at the latest position when I am in.\r\n if (this.options.animation && this.options.animationDuration > 0) {\r\n this.animate(this._lastPercent, this.options.percent);\r\n }\r\n else {\r\n this.draw(this.options.percent);\r\n }\r\n this._lastPercent = this.options.percent;\r\n }\r\n }\r\n else {\r\n if (this.options.animation && this.options.animationDuration > 0) {\r\n this.animate(this._lastPercent, this.options.percent);\r\n }\r\n else {\r\n this.draw(this.options.percent);\r\n }\r\n this._lastPercent = this.options.percent;\r\n }\r\n };\r\n this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {\r\n let angleInRadius = angleInDegrees * Math.PI / 180;\r\n let x = centerX + Math.sin(angleInRadius) * radius;\r\n let y = centerY - Math.cos(angleInRadius) * radius;\r\n return { x: x, y: y };\r\n };\r\n this.draw = (percent) => {\r\n // make percent reasonable\r\n percent = (percent === undefined) ? this.options.percent : Math.abs(percent);\r\n // circle percent shouldn't be greater than 100%.\r\n let circlePercent = (percent > 100) ? 100 : percent;\r\n // determine box size\r\n let boxSize = this.options.radius * 2 + this.options.outerStrokeWidth * 2;\r\n if (this.options.showBackground) {\r\n boxSize += (this.options.backgroundStrokeWidth * 2 + this.max(0, this.options.backgroundPadding * 2));\r\n }\r\n // the centre of the circle\r\n let centre = { x: boxSize / 2, y: boxSize / 2 };\r\n // the start point of the arc\r\n let startPoint = { x: centre.x, y: centre.y - this.options.radius };\r\n // get the end point of the arc\r\n let endPoint = this.polarToCartesian(centre.x, centre.y, this.options.radius, 360 * (this.options.clockwise ?\r\n circlePercent :\r\n (100 - circlePercent)) / 100); // ####################\r\n // We'll get an end point with the same [x, y] as the start point when percent is 100%, so move x a little bit.\r\n if (circlePercent === 100) {\r\n endPoint.x = endPoint.x + (this.options.clockwise ? -0.01 : +0.01);\r\n }\r\n // largeArcFlag and sweepFlag\r\n let largeArcFlag, sweepFlag;\r\n if (circlePercent > 50) {\r\n [largeArcFlag, sweepFlag] = this.options.clockwise ? [1, 1] : [1, 0];\r\n }\r\n else {\r\n [largeArcFlag, sweepFlag] = this.options.clockwise ? [0, 1] : [0, 0];\r\n }\r\n // percent may not equal the actual percent\r\n let titlePercent = this.options.animateTitle ? percent : this.options.percent;\r\n let titleTextPercent = titlePercent > this.options.maxPercent ?\r\n `${this.options.maxPercent.toFixed(this.options.toFixed)}+` : titlePercent.toFixed(this.options.toFixed);\r\n let subtitlePercent = this.options.animateSubtitle ? percent : this.options.percent;\r\n // get title object\r\n let title = {\r\n x: centre.x,\r\n y: centre.y,\r\n textAnchor: 'middle',\r\n color: this.options.titleColor,\r\n fontSize: this.options.titleFontSize,\r\n fontWeight: this.options.titleFontWeight,\r\n texts: [],\r\n tspans: []\r\n };\r\n // from v0.9.9, both title and titleFormat(...) may be an array of string.\r\n if (this.options.titleFormat !== undefined && this.options.titleFormat.constructor.name === 'Function') {\r\n let formatted = this.options.titleFormat(titlePercent);\r\n if (formatted instanceof Array) {\r\n title.texts = [...formatted];\r\n }\r\n else {\r\n title.texts.push(formatted.toString());\r\n }\r\n }\r\n else {\r\n if (this.options.title === 'auto') {\r\n title.texts.push(titleTextPercent);\r\n }\r\n else {\r\n if (this.options.title instanceof Array) {\r\n title.texts = [...this.options.title];\r\n }\r\n else {\r\n title.texts.push(this.options.title.toString());\r\n }\r\n }\r\n }\r\n // get subtitle object\r\n let subtitle = {\r\n x: centre.x,\r\n y: centre.y,\r\n textAnchor: 'middle',\r\n color: this.options.subtitleColor,\r\n fontSize: this.options.subtitleFontSize,\r\n fontWeight: this.options.subtitleFontWeight,\r\n texts: [],\r\n tspans: []\r\n };\r\n // from v0.9.9, both subtitle and subtitleFormat(...) may be an array of string.\r\n if (this.options.subtitleFormat !== undefined && this.options.subtitleFormat.constructor.name === 'Function') {\r\n let formatted = this.options.subtitleFormat(subtitlePercent);\r\n if (formatted instanceof Array) {\r\n subtitle.texts = [...formatted];\r\n }\r\n else {\r\n subtitle.texts.push(formatted.toString());\r\n }\r\n }\r\n else {\r\n if (this.options.subtitle instanceof Array) {\r\n subtitle.texts = [...this.options.subtitle];\r\n }\r\n else {\r\n subtitle.texts.push(this.options.subtitle.toString());\r\n }\r\n }\r\n // get units object\r\n let units = {\r\n text: `${this.options.units}`,\r\n fontSize: this.options.unitsFontSize,\r\n fontWeight: this.options.unitsFontWeight,\r\n color: this.options.unitsColor\r\n };\r\n // get total count of text lines to be shown\r\n let rowCount = 0, rowNum = 1;\r\n this.options.showTitle && (rowCount += title.texts.length);\r\n this.options.showSubtitle && (rowCount += subtitle.texts.length);\r\n // calc dy for each tspan for title\r\n if (this.options.showTitle) {\r\n for (let span of title.texts) {\r\n title.tspans.push({ span: span, dy: this.getRelativeY(rowNum, rowCount) });\r\n rowNum++;\r\n }\r\n }\r\n // calc dy for each tspan for subtitle\r\n if (this.options.showSubtitle) {\r\n for (let span of subtitle.texts) {\r\n subtitle.tspans.push({ span: span, dy: this.getRelativeY(rowNum, rowCount) });\r\n rowNum++;\r\n }\r\n }\r\n // create ID for gradient element\r\n if (null === this._gradientUUID) {\r\n this._gradientUUID = this.uuid();\r\n }\r\n // Bring it all together\r\n this.svg = {\r\n viewBox: `0 0 ${boxSize} ${boxSize}`,\r\n // Set both width and height to '100%' if it's responsive\r\n width: this.options.responsive ? '100%' : boxSize,\r\n height: this.options.responsive ? '100%' : boxSize,\r\n backgroundCircle: {\r\n cx: centre.x,\r\n cy: centre.y,\r\n r: this.options.radius + this.options.outerStrokeWidth / 2 + this.options.backgroundPadding,\r\n fill: this.options.backgroundColor,\r\n fillOpacity: this.options.backgroundOpacity,\r\n stroke: this.options.backgroundStroke,\r\n strokeWidth: this.options.backgroundStrokeWidth,\r\n },\r\n path: {\r\n // A rx ry x-axis-rotation large-arc-flag sweep-flag x y (https://developer.mozilla.org/en/docs/Web/SVG/Tutorial/Paths#Arcs)\r\n d: `M ${startPoint.x} ${startPoint.y}\n A ${this.options.radius} ${this.options.radius} 0 ${largeArcFlag} ${sweepFlag} ${endPoint.x} ${endPoint.y}`,\r\n stroke: this.options.outerStrokeColor,\r\n strokeWidth: this.options.outerStrokeWidth,\r\n strokeLinecap: this.options.outerStrokeLinecap,\r\n fill: 'none'\r\n },\r\n circle: {\r\n cx: centre.x,\r\n cy: centre.y,\r\n r: this.options.radius - this.options.space - this.options.outerStrokeWidth / 2 - this.options.innerStrokeWidth / 2,\r\n fill: 'none',\r\n stroke: this.options.innerStrokeColor,\r\n strokeWidth: this.options.innerStrokeWidth,\r\n },\r\n title: title,\r\n units: units,\r\n subtitle: subtitle,\r\n image: {\r\n x: centre.x - this.options.imageWidth / 2,\r\n y: centre.y - this.options.imageHeight / 2,\r\n src: this.options.imageSrc,\r\n width: this.options.imageWidth,\r\n height: this.options.imageHeight,\r\n },\r\n outerLinearGradient: {\r\n id: 'outer-linear-' + this._gradientUUID,\r\n colorStop1: this.options.outerStrokeColor,\r\n colorStop2: this.options.outerStrokeGradientStopColor === 'transparent' ? '#FFF' : this.options.outerStrokeGradientStopColor,\r\n },\r\n radialGradient: {\r\n id: 'radial-' + this._gradientUUID,\r\n colorStop1: this.options.backgroundColor,\r\n colorStop2: this.options.backgroundGradientStopColor === 'transparent' ? '#FFF' : this.options.backgroundGradientStopColor,\r\n }\r\n };\r\n };\r\n this.getAnimationParameters = (previousPercent, currentPercent) => {\r\n const MIN_INTERVAL = 10;\r\n let times, step, interval;\r\n let fromPercent = this.options.startFromZero ? 0 : (previousPercent < 0 ? 0 : previousPercent);\r\n let toPercent = currentPercent < 0 ? 0 : this.min(currentPercent, this.options.maxPercent);\r\n let delta = Math.abs(Math.round(toPercent - fromPercent));\r\n if (delta >= 100) {\r\n // we will finish animation in 100 times\r\n times = 100;\r\n if (!this.options.animateTitle && !this.options.animateSubtitle) {\r\n step = 1;\r\n }\r\n else {\r\n // show title or subtitle animation even if the arc is full, we also need to finish it in 100 times.\r\n step = Math.round(delta / times);\r\n }\r\n }\r\n else {\r\n // we will finish in as many times as the number of percent.\r\n times = delta;\r\n step = 1;\r\n }\r\n // Get the interval of timer\r\n interval = Math.round(this.options.animationDuration / times);\r\n // Readjust all values if the interval of timer is extremely small.\r\n if (interval < MIN_INTERVAL) {\r\n interval = MIN_INTERVAL;\r\n times = this.options.animationDuration / interval;\r\n if (!this.options.animateTitle && !this.options.animateSubtitle && delta > 100) {\r\n step = Math.round(100 / times);\r\n }\r\n else {\r\n step = Math.round(delta / times);\r\n }\r\n }\r\n // step must be greater than 0.\r\n if (step < 1) {\r\n step = 1;\r\n }\r\n return { times: times, step: step, interval: interval };\r\n };\r\n this.animate = (previousPercent, currentPercent) => {\r\n if (this._timerSubscription && !this._timerSubscription.closed) {\r\n this._timerSubscription.unsubscribe();\r\n }\r\n let fromPercent = this.options.startFromZero ? 0 : previousPercent;\r\n let toPercent = currentPercent;\r\n let { step: step, interval: interval } = this.getAnimationParameters(fromPercent, toPercent);\r\n let count = fromPercent;\r\n if (fromPercent < toPercent) {\r\n this._timerSubscription = timer(0, interval).subscribe(() => {\r\n count += step;\r\n if (count <= toPercent) {\r\n if (!this.options.animateTitle && !this.options.animateSubtitle && count >= 100) {\r\n this.draw(toPercent);\r\n this._timerSubscription.unsubscribe();\r\n }\r\n else {\r\n this.draw(count);\r\n }\r\n }\r\n else {\r\n this.draw(toPercent);\r\n this._timerSubscription.unsubscribe();\r\n }\r\n });\r\n }\r\n else {\r\n this._timerSubscription = timer(0, interval).subscribe(() => {\r\n count -= step;\r\n if (count >= toPercent) {\r\n if (!this.options.animateTitle && !this.options.animateSubtitle && toPercent >= 100) {\r\n this.draw(toPercent);\r\n this._timerSubscription.unsubscribe();\r\n }\r\n else {\r\n this.draw(count);\r\n }\r\n }\r\n else {\r\n this.draw(toPercent);\r\n this._timerSubscription.unsubscribe();\r\n }\r\n });\r\n }\r\n };\r\n this.emitClickEvent = (event) => {\r\n if (this.options.renderOnClick) {\r\n this.animate(0, this.options.percent);\r\n }\r\n this.onClick.emit(event);\r\n };\r\n this.applyOptions = () => {\r\n // the options of may change already\r\n for (let name of Object.keys(this.options)) {\r\n if (this.hasOwnProperty(name) && this[name] !== undefined) {\r\n this.options[name] = this[name];\r\n }\r\n else if (this.templateOptions && this.templateOptions[name] !== undefined) {\r\n this.options[name] = this.templateOptions[name];\r\n }\r\n }\r\n // make sure key options valid\r\n this.options.radius = Math.abs(+this.options.radius);\r\n this.options.space = +this.options.space;\r\n this.options.percent = +this.options.percent > 0 ? +this.options.percent : 0;\r\n this.options.maxPercent = Math.abs(+this.options.maxPercent);\r\n this.options.animationDuration = Math.abs(this.options.animationDuration);\r\n this.options.outerStrokeWidth = Math.abs(+this.options.outerStrokeWidth);\r\n this.options.innerStrokeWidth = Math.abs(+this.options.innerStrokeWidth);\r\n this.options.backgroundPadding = +this.options.backgroundPadding;\r\n };\r\n this.getRelativeY = (rowNum, rowCount) => {\r\n // why '-0.18em'? It's a magic number when property 'alignment-baseline' equals 'baseline'. :)\r\n let initialOffset = -0.18, offset = 1;\r\n return (initialOffset + offset * (rowNum - rowCount / 2)).toFixed(2) + 'em';\r\n };\r\n this.min = (a, b) => {\r\n return a < b ? a : b;\r\n };\r\n this.max = (a, b) => {\r\n return a > b ? a : b;\r\n };\r\n this.uuid = () => {\r\n // https://www.w3resource.com/javascript-exercises/javascript-math-exercise-23.php\r\n var dt = new Date().getTime();\r\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = (dt + Math.random() * 16) % 16 | 0;\r\n dt = Math.floor(dt / 16);\r\n return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n return uuid;\r\n };\r\n this.findSvgElement = function () {\r\n if (this.svgElement === null) {\r\n let tags = this.elRef.nativeElement.getElementsByTagName('svg');\r\n if (tags.length > 0) {\r\n this.svgElement = tags[0];\r\n }\r\n }\r\n };\r\n this.checkViewport = () => {\r\n this.findSvgElement();\r\n let previousValue = this.isInViewport;\r\n this.isInViewport = this.isElementInViewport(this.svgElement);\r\n if (previousValue !== this.isInViewport) {\r\n this.onViewportChanged.emit({ oldValue: previousValue, newValue: this.isInViewport });\r\n }\r\n };\r\n this.onScroll = (event) => {\r\n this.checkViewport();\r\n };\r\n this.loadEventsForLazyMode = () => {\r\n if (this.options.lazy) {\r\n this.document.addEventListener('scroll', this.onScroll, true);\r\n this.window.addEventListener('resize', this.onScroll, true);\r\n if (this._viewportChangedSubscriber === null) {\r\n this._viewportChangedSubscriber = this.onViewportChanged.subscribe(({ oldValue, newValue }) => {\r\n newValue ? this.render() : null;\r\n });\r\n }\r\n // svgElement must be created in DOM before being checked.\r\n // Is there a better way to check the existence of svgElemnt?\r\n let _timer = timer(0, 50).subscribe(() => {\r\n this.svgElement === null ? this.checkViewport() : _timer.unsubscribe();\r\n });\r\n }\r\n };\r\n this.unloadEventsForLazyMode = () => {\r\n // Remove event listeners\r\n this.document.removeEventListener('scroll', this.onScroll, true);\r\n this.window.removeEventListener('resize', this.onScroll, true);\r\n // Unsubscribe onViewportChanged\r\n if (this._viewportChangedSubscriber !== null) {\r\n this._viewportChangedSubscriber.unsubscribe();\r\n this._viewportChangedSubscriber = null;\r\n }\r\n };\r\n this.document = document;\r\n this.window = this.document.defaultView;\r\n Object.assign(this.options, defaultOptions);\r\n Object.assign(this.defaultOptions, defaultOptions);\r\n }\r\n isDrawing() {\r\n return (this._timerSubscription && !this._timerSubscription.closed);\r\n }\r\n isElementInViewport(el) {\r\n // Return false if el has not been created in page.\r\n if (el === null || el === undefined)\r\n return false;\r\n // Check if the element is out of view due to a container scrolling\r\n let rect = el.getBoundingClientRect(), parent = el.parentNode, parentRect;\r\n do {\r\n parentRect = parent.getBoundingClientRect();\r\n if (rect.top >= parentRect.bottom)\r\n return false;\r\n if (rect.bottom <= parentRect.top)\r\n return false;\r\n if (rect.left >= parentRect.right)\r\n return false;\r\n if (rect.right <= parentRect.left)\r\n return false;\r\n parent = parent.parentNode;\r\n } while (parent != this.document.body);\r\n // Check its within the document viewport\r\n if (rect.top >= (this.window.innerHeight || this.document.documentElement.clientHeight))\r\n return false;\r\n if (rect.bottom <= 0)\r\n return false;\r\n if (rect.left >= (this.window.innerWidth || this.document.documentElement.clientWidth))\r\n return false;\r\n if (rect.right <= 0)\r\n return false;\r\n return true;\r\n }\r\n ngOnInit() {\r\n this.loadEventsForLazyMode();\r\n }\r\n ngOnDestroy() {\r\n this.unloadEventsForLazyMode();\r\n }\r\n ngOnChanges(changes) {\r\n this.render();\r\n if ('lazy' in changes) {\r\n changes.lazy.currentValue ? this.loadEventsForLazyMode() : this.unloadEventsForLazyMode();\r\n }\r\n }\r\n}\nCircleProgressComponent.ɵfac = function CircleProgressComponent_Factory(t) { return new (t || CircleProgressComponent)(ɵngcc0.ɵɵdirectiveInject(CircleProgressOptions), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nCircleProgressComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: CircleProgressComponent, selectors: [[\"circle-progress\"]], inputs: { name: \"name\", class: \"class\", backgroundGradient: \"backgroundGradient\", backgroundColor: \"backgroundColor\", backgroundGradientStopColor: \"backgroundGradientStopColor\", backgroundOpacity: \"backgroundOpacity\", backgroundStroke: \"backgroundStroke\", backgroundStrokeWidth: \"backgroundStrokeWidth\", backgroundPadding: \"backgroundPadding\", radius: \"radius\", space: \"space\", percent: \"percent\", toFixed: \"toFixed\", maxPercent: \"maxPercent\", renderOnClick: \"renderOnClick\", units: \"units\", unitsFontSize: \"unitsFontSize\", unitsFontWeight: \"unitsFontWeight\", unitsColor: \"unitsColor\", outerStrokeGradient: \"outerStrokeGradient\", outerStrokeWidth: \"outerStrokeWidth\", outerStrokeColor: \"outerStrokeColor\", outerStrokeGradientStopColor: \"outerStrokeGradientStopColor\", outerStrokeLinecap: \"outerStrokeLinecap\", innerStrokeColor: \"innerStrokeColor\", innerStrokeWidth: \"innerStrokeWidth\", titleFormat: \"titleFormat\", title: \"title\", titleColor: \"titleColor\", titleFontSize: \"titleFontSize\", titleFontWeight: \"titleFontWeight\", subtitleFormat: \"subtitleFormat\", subtitle: \"subtitle\", subtitleColor: \"subtitleColor\", subtitleFontSize: \"subtitleFontSize\", subtitleFontWeight: \"subtitleFontWeight\", imageSrc: \"imageSrc\", imageHeight: \"imageHeight\", imageWidth: \"imageWidth\", animation: \"animation\", animateTitle: \"animateTitle\", animateSubtitle: \"animateSubtitle\", animationDuration: \"animationDuration\", showTitle: \"showTitle\", showSubtitle: \"showSubtitle\", showUnits: \"showUnits\", showImage: \"showImage\", showBackground: \"showBackground\", showInnerStroke: \"showInnerStroke\", clockwise: \"clockwise\", responsive: \"responsive\", startFromZero: \"startFromZero\", showZeroOuterStroke: \"showZeroOuterStroke\", lazy: \"lazy\", templateOptions: [\"options\", \"templateOptions\"] }, outputs: { onClick: \"onClick\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[\"xmlns\", \"http://www.w3.org/2000/svg\", \"preserveAspectRatio\", \"xMidYMid meet\", 3, \"click\", 4, \"ngIf\"], [\"xmlns\", \"http://www.w3.org/2000/svg\", \"preserveAspectRatio\", \"xMidYMid meet\", 3, \"click\"], [4, \"ngIf\"], [\"alignment-baseline\", \"baseline\", 4, \"ngIf\"], [\"preserveAspectRatio\", \"none\", 4, \"ngIf\"], [\"offset\", \"5%\"], [\"offset\", \"95%\"], [\"alignment-baseline\", \"baseline\"], [4, \"ngFor\", \"ngForOf\"], [\"preserveAspectRatio\", \"none\"]], template: function CircleProgressComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, CircleProgressComponent__svg_svg_0_Template, 9, 11, \"svg\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.svg);\n } }, dependencies: [ɵngcc1.NgForOf, ɵngcc1.NgIf], encapsulation: 2 });\r\nCircleProgressComponent.ctorParameters = () => [\r\n { type: CircleProgressOptions },\r\n { type: ElementRef },\r\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\r\n];\r\nCircleProgressComponent.propDecorators = {\r\n onClick: [{ type: Output }],\r\n name: [{ type: Input }],\r\n class: [{ type: Input }],\r\n backgroundGradient: [{ type: Input }],\r\n backgroundColor: [{ type: Input }],\r\n backgroundGradientStopColor: [{ type: Input }],\r\n backgroundOpacity: [{ type: Input }],\r\n backgroundStroke: [{ type: Input }],\r\n backgroundStrokeWidth: [{ type: Input }],\r\n backgroundPadding: [{ type: Input }],\r\n radius: [{ type: Input }],\r\n space: [{ type: Input }],\r\n percent: [{ type: Input }],\r\n toFixed: [{ type: Input }],\r\n maxPercent: [{ type: Input }],\r\n renderOnClick: [{ type: Input }],\r\n units: [{ type: Input }],\r\n unitsFontSize: [{ type: Input }],\r\n unitsFontWeight: [{ type: Input }],\r\n unitsColor: [{ type: Input }],\r\n outerStrokeGradient: [{ type: Input }],\r\n outerStrokeWidth: [{ type: Input }],\r\n outerStrokeColor: [{ type: Input }],\r\n outerStrokeGradientStopColor: [{ type: Input }],\r\n outerStrokeLinecap: [{ type: Input }],\r\n innerStrokeColor: [{ type: Input }],\r\n innerStrokeWidth: [{ type: Input }],\r\n titleFormat: [{ type: Input }],\r\n title: [{ type: Input }],\r\n titleColor: [{ type: Input }],\r\n titleFontSize: [{ type: Input }],\r\n titleFontWeight: [{ type: Input }],\r\n subtitleFormat: [{ type: Input }],\r\n subtitle: [{ type: Input }],\r\n subtitleColor: [{ type: Input }],\r\n subtitleFontSize: [{ type: Input }],\r\n subtitleFontWeight: [{ type: Input }],\r\n imageSrc: [{ type: Input }],\r\n imageHeight: [{ type: Input }],\r\n imageWidth: [{ type: Input }],\r\n animation: [{ type: Input }],\r\n animateTitle: [{ type: Input }],\r\n animateSubtitle: [{ type: Input }],\r\n animationDuration: [{ type: Input }],\r\n showTitle: [{ type: Input }],\r\n showSubtitle: [{ type: Input }],\r\n showUnits: [{ type: Input }],\r\n showImage: [{ type: Input }],\r\n showBackground: [{ type: Input }],\r\n showInnerStroke: [{ type: Input }],\r\n clockwise: [{ type: Input }],\r\n responsive: [{ type: Input }],\r\n startFromZero: [{ type: Input }],\r\n showZeroOuterStroke: [{ type: Input }],\r\n lazy: [{ type: Input }],\r\n templateOptions: [{ type: Input, args: ['options',] }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CircleProgressComponent, [{\n type: Component,\n args: [{\n selector: 'circle-progress',\n template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{tspan.span}}\n \n {{svg.units.text}}\n \n {{tspan.span}}\n \n \n \n \n `\n }]\n }], function () { return [{ type: CircleProgressOptions }, { type: ɵngcc0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { onClick: [{\n type: Output\n }], name: [{\n type: Input\n }], class: [{\n type: Input\n }], backgroundGradient: [{\n type: Input\n }], backgroundColor: [{\n type: Input\n }], backgroundGradientStopColor: [{\n type: Input\n }], backgroundOpacity: [{\n type: Input\n }], backgroundStroke: [{\n type: Input\n }], backgroundStrokeWidth: [{\n type: Input\n }], backgroundPadding: [{\n type: Input\n }], radius: [{\n type: Input\n }], space: [{\n type: Input\n }], percent: [{\n type: Input\n }], toFixed: [{\n type: Input\n }], maxPercent: [{\n type: Input\n }], renderOnClick: [{\n type: Input\n }], units: [{\n type: Input\n }], unitsFontSize: [{\n type: Input\n }], unitsFontWeight: [{\n type: Input\n }], unitsColor: [{\n type: Input\n }], outerStrokeGradient: [{\n type: Input\n }], outerStrokeWidth: [{\n type: Input\n }], outerStrokeColor: [{\n type: Input\n }], outerStrokeGradientStopColor: [{\n type: Input\n }], outerStrokeLinecap: [{\n type: Input\n }], innerStrokeColor: [{\n type: Input\n }], innerStrokeWidth: [{\n type: Input\n }], titleFormat: [{\n type: Input\n }], title: [{\n type: Input\n }], titleColor: [{\n type: Input\n }], titleFontSize: [{\n type: Input\n }], titleFontWeight: [{\n type: Input\n }], subtitleFormat: [{\n type: Input\n }], subtitle: [{\n type: Input\n }], subtitleColor: [{\n type: Input\n }], subtitleFontSize: [{\n type: Input\n }], subtitleFontWeight: [{\n type: Input\n }], imageSrc: [{\n type: Input\n }], imageHeight: [{\n type: Input\n }], imageWidth: [{\n type: Input\n }], animation: [{\n type: Input\n }], animateTitle: [{\n type: Input\n }], animateSubtitle: [{\n type: Input\n }], animationDuration: [{\n type: Input\n }], showTitle: [{\n type: Input\n }], showSubtitle: [{\n type: Input\n }], showUnits: [{\n type: Input\n }], showImage: [{\n type: Input\n }], showBackground: [{\n type: Input\n }], showInnerStroke: [{\n type: Input\n }], clockwise: [{\n type: Input\n }], responsive: [{\n type: Input\n }], startFromZero: [{\n type: Input\n }], showZeroOuterStroke: [{\n type: Input\n }], lazy: [{\n type: Input\n }], templateOptions: [{\n type: Input,\n args: ['options']\n }] }); })();\n\nclass NgCircleProgressModule {\r\n static forRoot(options = {}) {\r\n return {\r\n ngModule: NgCircleProgressModule,\r\n providers: [\r\n { provide: CircleProgressOptions, useValue: options }\r\n ]\r\n };\r\n }\r\n}\nNgCircleProgressModule.ɵfac = function NgCircleProgressModule_Factory(t) { return new (t || NgCircleProgressModule)(); };\nNgCircleProgressModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgCircleProgressModule });\nNgCircleProgressModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgCircleProgressModule, [{\n type: NgModule,\n args: [{\n declarations: [CircleProgressComponent],\n imports: [\n CommonModule\n ],\n exports: [CircleProgressComponent]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgCircleProgressModule, { declarations: function () { return [CircleProgressComponent]; }, imports: function () { return [CommonModule]; }, exports: function () { return [CircleProgressComponent]; } }); })();\n\n/*\r\n * Public API Surface of ng-circle-progress\r\n */\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { CircleProgressComponent, CircleProgressOptions, NgCircleProgressModule };\n\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SessionOverStateComponent } from './components/session-over-state/session-over-state.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { AuthlayoutComponent } from './layouts/authlayout/authlayout.component';\r\nimport { ApphomelayoutComponent } from './layouts/apphomelayout/apphomelayout.component';\r\nimport { AppinnerlayoutComponent } from './layouts/appinnerlayout/appinnerlayout.component';\r\nimport { SigninComponent } from './pages/signin/signin.component';\r\nimport { ForgetpasswordComponent } from './pages/forgetpassword/forgetpassword.component';\r\nimport { ResetpasswordComponent } from './pages/resetpassword/resetpassword.component';\r\nimport { VerifyComponent } from './layouts/authlayout/verify/verify.component';\r\nimport { FooterinfoComponent } from './components/footerinfo/footerinfo.component';\r\nimport { HeaderbackComponent } from './components/headerback/headerback.component';\r\nimport { PagenotfoundComponent } from './pages/pagenotfound/pagenotfound.component';\r\nimport { PagenotauthorizedComponent } from './pages/pagenotauthorized/pagenotauthorized.component';\r\nimport { TenantsCreatePageComponent } from './pages/tenants-create-page/tenants-create-page.component';\r\nimport { ProfileEditComponent } from './pages/profile-edit/profile-edit.component';\r\nimport { UsersCreatePageComponent } from './pages/users-create-page/users-create-page.component';\r\nimport { HeadermenuComponent } from './components/headermenu/headermenu.component';\r\nimport { SidebarComponent } from './components/sidebar/sidebar.component';\r\nimport { ProfileComponent } from './pages/profile/profile.component';\r\nimport { TenantsPageComponent } from './pages/tenants-page/tenants-page.component';\r\nimport { UsersListPageComponent } from './pages/users-list-page/users-list-page.component';\r\nimport { ImpersonationModalComponent } from './components/impersonation-modal/impersonation-modal.component';\r\nimport { TenantFormComponent } from './components/tenant-form/tenant-form.component';\r\nimport { UserBasicInfoFormComponent } from './components/user-basic-info-form/user-basic-info-form.component';\r\nimport { UserHeaderImageComponent } from './components/user-header-image/user-header-image.component';\r\nimport { TenantListComponent } from './components/tenant-list/tenant-list.component';\r\nimport { UserCardComponent } from './components/user-card/user-card.component';\r\nimport { UsersListComponent } from './components/users-list/users-list.component';\r\nimport { NgCircleProgressModule } from 'ng-circle-progress';\r\nimport { LogoComponent } from './components/logo/logo.component';\r\nimport { SharedModule } from '../shared/shared.module';\r\nimport { OfflineLabelComponent } from './components/offline-label/offline-label.component';\r\nimport { PwaInstallButtonComponent } from './components/pwa-install-button/pwa-install-button.component';\r\nimport { UnsyncedChangesComponent } from './components/unsynced-changes/unsynced-changes.component';\r\nimport { ChangePasswordFormComponent } from './components/change-password-form/change-password-form.component';\r\nimport { CurrentTripComponent } from './components/current-trip/current-trip.component';\r\nimport { ProductCardComponent } from './components/product-card/product-card.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n SigninComponent,\r\n ForgetpasswordComponent,\r\n ResetpasswordComponent,\r\n VerifyComponent,\r\n SessionOverStateComponent,\r\n AuthlayoutComponent,\r\n ApphomelayoutComponent,\r\n AppinnerlayoutComponent,\r\n FooterinfoComponent,\r\n HeaderbackComponent,\r\n PagenotfoundComponent,\r\n PagenotauthorizedComponent,\r\n TenantsCreatePageComponent,\r\n ProfileEditComponent,\r\n UsersCreatePageComponent,\r\n HeadermenuComponent,\r\n SidebarComponent,\r\n ProfileComponent,\r\n TenantsPageComponent,\r\n UsersListPageComponent,\r\n ImpersonationModalComponent,\r\n TenantFormComponent,\r\n UserBasicInfoFormComponent,\r\n UserHeaderImageComponent,\r\n TenantListComponent,\r\n UserCardComponent,\r\n UsersListComponent,\r\n LogoComponent,\r\n OfflineLabelComponent,\r\n PwaInstallButtonComponent,\r\n UnsyncedChangesComponent,\r\n ChangePasswordFormComponent,\r\n CurrentTripComponent,\r\n ProductCardComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n NgCircleProgressModule.forRoot(),\r\n SharedModule,\r\n ],\r\n exports: [\r\n SigninComponent,\r\n ForgetpasswordComponent,\r\n ResetpasswordComponent,\r\n VerifyComponent,\r\n SessionOverStateComponent,\r\n AuthlayoutComponent,\r\n ApphomelayoutComponent,\r\n AppinnerlayoutComponent,\r\n FooterinfoComponent,\r\n HeaderbackComponent,\r\n PagenotfoundComponent,\r\n PagenotauthorizedComponent,\r\n TenantsCreatePageComponent,\r\n ProfileEditComponent,\r\n UsersCreatePageComponent,\r\n HeadermenuComponent,\r\n SidebarComponent,\r\n ProfileComponent,\r\n TenantsPageComponent,\r\n UsersListPageComponent,\r\n OfflineLabelComponent,\r\n PwaInstallButtonComponent,\r\n CurrentTripComponent,\r\n UnsyncedChangesComponent,\r\n ProductCardComponent,\r\n ],\r\n})\r\nexport class CoreModule {}\r\n","import * as i0 from '@angular/core';\nimport { PLATFORM_ID, Injectable, Inject, NgModule } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator;\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator;\n}\ncatch {\n hasV8BreakIterator = false;\n}\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\nclass Platform {\n constructor(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId\n ? isPlatformBrowser(this._platformId)\n : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser &&\n !!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' &&\n !this.EDGE &&\n !this.TRIDENT;\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) &&\n !this.BLINK &&\n !this.EDGE &&\n !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n}\nPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Platform, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Platform, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Platform, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass PlatformModule {\n}\nPlatformModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPlatformModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule });\nPlatformModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: PlatformModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes;\n/** Types of ` created at the caret position.\n // For inputs, just '.' would be enough, but no need to bother.\n span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all\n div.appendChild(span);\n const coordinates = {\n top: span.offsetTop + _parseInt(computed.borderTopWidth),\n left: span.offsetLeft + _parseInt(computed.borderLeftWidth),\n height: _parseInt(computed.lineHeight)\n };\n if (debug) {\n span.style.backgroundColor = '#eee';\n createDebugEle(element, coordinates);\n }\n else {\n document.body.removeChild(div);\n }\n return coordinates;\n}\nfunction createDebugEle(element, coordinates) {\n const fontSize = getComputedStyle(element).getPropertyValue('font-size');\n const rect = document.querySelector('#DEBUG') || document.createElement('div');\n document.body.appendChild(rect);\n rect.id = 'DEBUG';\n rect.style.position = 'absolute';\n rect.style.backgroundColor = 'red';\n rect.style.height = fontSize;\n rect.style.width = '1px';\n rect.style.top = `${element.getBoundingClientRect().top - element.scrollTop + window.pageYOffset + coordinates.top}px`;\n rect.style.left = `${element.getBoundingClientRect().left - element.scrollLeft + window.pageXOffset + coordinates.left}px`;\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction isStyleSupport(styleName) {\n if (typeof window !== 'undefined' && window.document && window.document.documentElement) {\n const styleNameList = Array.isArray(styleName) ? styleName : [styleName];\n const { documentElement } = window.document;\n return styleNameList.some(name => name in documentElement.style);\n }\n return false;\n}\nfunction getStyleAsText(styles) {\n if (!styles) {\n return '';\n }\n return Object.keys(styles)\n .map(key => {\n const val = styles[key];\n return `${key}:${typeof val === 'string' ? val : `${val}px`}`;\n })\n .join(';');\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n// We only handle element & text node.\nconst ELEMENT_NODE = 1;\nconst TEXT_NODE = 3;\nconst COMMENT_NODE = 8;\nlet ellipsisContainer;\nconst wrapperStyle = {\n padding: '0',\n margin: '0',\n display: 'inline',\n lineHeight: 'inherit'\n};\nfunction pxToNumber(value) {\n if (!value) {\n return 0;\n }\n const match = value.match(/^\\d*(\\.\\d*)?/);\n return match ? Number(match[0]) : 0;\n}\nfunction styleToString(style) {\n // There are some different behavior between Firefox & Chrome.\n // We have to handle this ourself.\n const styleNames = Array.prototype.slice.apply(style);\n return styleNames.map(name => `${name}: ${style.getPropertyValue(name)};`).join('');\n}\nfunction mergeChildren(children) {\n const childList = [];\n children.forEach((child) => {\n const prevChild = childList[childList.length - 1];\n if (prevChild && child.nodeType === TEXT_NODE && prevChild.nodeType === TEXT_NODE) {\n prevChild.data += child.data;\n }\n else {\n childList.push(child);\n }\n });\n return childList;\n}\nfunction measure(originEle, rows, contentNodes, fixedContent, ellipsisStr, suffixStr = '') {\n if (!ellipsisContainer) {\n ellipsisContainer = document.createElement('div');\n ellipsisContainer.setAttribute('aria-hidden', 'true');\n document.body.appendChild(ellipsisContainer);\n }\n // Get origin style\n const originStyle = window.getComputedStyle(originEle);\n const originCSS = styleToString(originStyle);\n const lineHeight = pxToNumber(originStyle.lineHeight);\n const maxHeight = Math.round(lineHeight * (rows + 1) + pxToNumber(originStyle.paddingTop) + pxToNumber(originStyle.paddingBottom));\n // Set shadow\n ellipsisContainer.setAttribute('style', originCSS);\n ellipsisContainer.style.position = 'fixed';\n ellipsisContainer.style.left = '0';\n ellipsisContainer.style.height = 'auto';\n ellipsisContainer.style.minHeight = 'auto';\n ellipsisContainer.style.maxHeight = 'auto';\n ellipsisContainer.style.top = '-999999px';\n ellipsisContainer.style.zIndex = '-1000';\n // clean up css overflow\n ellipsisContainer.style.textOverflow = 'clip';\n ellipsisContainer.style.whiteSpace = 'normal';\n ellipsisContainer.style.webkitLineClamp = 'none';\n const contentList = mergeChildren(contentNodes);\n const container = document.createElement('div');\n const contentContainer = document.createElement('span');\n const suffixContainer = document.createTextNode(suffixStr);\n const fixedContainer = document.createElement('span');\n // Add styles in container\n Object.assign(container.style, wrapperStyle);\n Object.assign(contentContainer.style, wrapperStyle);\n Object.assign(fixedContainer.style, wrapperStyle);\n contentList.forEach(n => {\n contentContainer.appendChild(n);\n });\n contentContainer.appendChild(suffixContainer);\n fixedContent.forEach(node => {\n fixedContainer.appendChild(node.cloneNode(true));\n });\n container.appendChild(contentContainer);\n container.appendChild(fixedContainer);\n // Render in the fake container\n ellipsisContainer.appendChild(container);\n // Check if ellipsis in measure div is height enough for content\n function inRange() {\n return ellipsisContainer.offsetHeight < maxHeight;\n }\n if (inRange()) {\n const text = ellipsisContainer.innerHTML;\n ellipsisContainer.removeChild(container);\n return { contentNodes, text, ellipsis: false };\n }\n // We should clone the childNode since they're controlled by React and we can't reuse it without warning\n const childNodes = Array.prototype.slice\n .apply(ellipsisContainer.childNodes[0].childNodes[0].cloneNode(true).childNodes)\n .filter(({ nodeType }) => nodeType !== COMMENT_NODE);\n const fixedNodes = Array.prototype.slice.apply(ellipsisContainer.childNodes[0].childNodes[1].cloneNode(true).childNodes);\n ellipsisContainer.removeChild(container);\n // ========================= Find match ellipsis content =========================\n ellipsisContainer.innerHTML = '';\n // Create origin content holder\n const ellipsisContentHolder = document.createElement('span');\n ellipsisContainer.appendChild(ellipsisContentHolder);\n const ellipsisTextNode = document.createTextNode(ellipsisStr + suffixStr);\n ellipsisContentHolder.appendChild(ellipsisTextNode);\n fixedNodes.forEach(childNode => {\n ellipsisContainer.appendChild(childNode);\n });\n // Append before fixed nodes\n function appendChildNode(node) {\n ellipsisContentHolder.insertBefore(node, ellipsisTextNode);\n }\n // Get maximum text\n function measureText(textNode, fullText, startLoc = 0, endLoc = fullText.length, lastSuccessLoc = 0) {\n const midLoc = Math.floor((startLoc + endLoc) / 2);\n textNode.textContent = fullText.slice(0, midLoc);\n if (startLoc >= endLoc - 1) {\n // Loop when step is small\n for (let step = endLoc; step >= startLoc; step -= 1) {\n const currentStepText = fullText.slice(0, step);\n textNode.textContent = currentStepText;\n if (inRange() || !currentStepText) {\n return step === fullText.length\n ? {\n finished: false,\n node: document.createTextNode(fullText)\n }\n : {\n finished: true,\n node: document.createTextNode(currentStepText)\n };\n }\n }\n }\n if (inRange()) {\n return measureText(textNode, fullText, midLoc, endLoc, midLoc);\n }\n else {\n return measureText(textNode, fullText, startLoc, midLoc, lastSuccessLoc);\n }\n }\n function measureNode(childNode, index) {\n const type = childNode.nodeType;\n if (type === ELEMENT_NODE) {\n // We don't split element, it will keep if whole element can be displayed.\n // appendChildNode(childNode);\n if (inRange()) {\n return {\n finished: false,\n node: contentList[index]\n };\n }\n // Clean up if can not pull in\n ellipsisContentHolder.removeChild(childNode);\n return {\n finished: true,\n node: null\n };\n }\n else if (type === TEXT_NODE) {\n const fullText = childNode.textContent || '';\n const textNode = document.createTextNode(fullText);\n appendChildNode(textNode);\n return measureText(textNode, fullText);\n }\n // Not handle other type of content\n // PS: This code should not be attached after react 16\n return {\n finished: false,\n node: null\n };\n }\n const ellipsisNodes = [];\n childNodes.some((childNode, index) => {\n const { finished, node } = measureNode(childNode, index);\n if (node) {\n ellipsisNodes.push(node);\n }\n return finished;\n });\n const result = {\n contentNodes: ellipsisNodes,\n text: ellipsisContainer.innerHTML,\n ellipsis: true\n };\n while (ellipsisContainer.firstChild) {\n ellipsisContainer.removeChild(ellipsisContainer.firstChild);\n }\n return result;\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nlet scrollbarVerticalSize;\nlet scrollbarHorizontalSize;\n// Measure scrollbar width for padding body during modal show/hide\nconst scrollbarMeasure = {\n position: 'absolute',\n top: '-9999px',\n width: '50px',\n height: '50px'\n};\nfunction measureScrollbar(direction = 'vertical', prefix = 'ant') {\n if (typeof document === 'undefined' || typeof window === 'undefined') {\n return 0;\n }\n const isVertical = direction === 'vertical';\n if (isVertical && scrollbarVerticalSize) {\n return scrollbarVerticalSize;\n }\n else if (!isVertical && scrollbarHorizontalSize) {\n return scrollbarHorizontalSize;\n }\n const scrollDiv = document.createElement('div');\n Object.keys(scrollbarMeasure).forEach(scrollProp => {\n // @ts-ignore\n scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];\n });\n // apply hide scrollbar className ahead\n scrollDiv.className = `${prefix}-hide-scrollbar scroll-div-append-to-body`;\n // Append related overflow style\n if (isVertical) {\n scrollDiv.style.overflowY = 'scroll';\n }\n else {\n scrollDiv.style.overflowX = 'scroll';\n }\n document.body.appendChild(scrollDiv);\n let size = 0;\n if (isVertical) {\n size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n scrollbarVerticalSize = size;\n }\n else {\n size = scrollDiv.offsetHeight - scrollDiv.clientHeight;\n scrollbarHorizontalSize = size;\n }\n document.body.removeChild(scrollDiv);\n return size;\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction ensureInBounds(value, boundValue) {\n return value ? (value < boundValue ? value : boundValue) : boundValue;\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction inNextTick() {\n const timer = new Subject();\n Promise.resolve().then(() => timer.next());\n return timer.pipe(take(1));\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction wrapIntoObservable(value) {\n if (isObservable(value)) {\n return value;\n }\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n return from(Promise.resolve(value));\n }\n return of(value);\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n/**\n * Sync from rc-util [https://github.com/react-component/util]\n */\nfunction canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst MARK_KEY = `rc-util-key`;\nfunction getMark({ mark } = {}) {\n if (mark) {\n return mark.startsWith('data-') ? mark : `data-${mark}`;\n }\n return MARK_KEY;\n}\nfunction getContainer(option) {\n if (option.attachTo) {\n return option.attachTo;\n }\n const head = document.querySelector('head');\n return head || document.body;\n}\nfunction injectCSS(css, option = {}) {\n if (!canUseDom()) {\n return null;\n }\n const styleNode = document.createElement('style');\n if (option.csp?.nonce) {\n styleNode.nonce = option.csp?.nonce;\n }\n styleNode.innerHTML = css;\n const container = getContainer(option);\n const { firstChild } = container;\n if (option.prepend && container.prepend) {\n // Use `prepend` first\n container.prepend(styleNode);\n }\n else if (option.prepend && firstChild) {\n // Fallback to `insertBefore` like IE not support `prepend`\n container.insertBefore(styleNode, firstChild);\n }\n else {\n container.appendChild(styleNode);\n }\n return styleNode;\n}\nconst containerCache = new Map();\nfunction findExistNode(key, option = {}) {\n const container = getContainer(option);\n return Array.from(containerCache.get(container)?.children || []).find(node => node.tagName === 'STYLE' && node.getAttribute(getMark(option)) === key);\n}\nfunction removeCSS(key, option = {}) {\n const existNode = findExistNode(key, option);\n existNode?.parentNode?.removeChild(existNode);\n}\nfunction updateCSS(css, key, option = {}) {\n const container = getContainer(option);\n // Get real parent\n if (!containerCache.has(container)) {\n const placeholderStyle = injectCSS('', option);\n // @ts-ignore\n const { parentNode } = placeholderStyle;\n containerCache.set(container, parentNode);\n parentNode.removeChild(placeholderStyle);\n }\n const existNode = findExistNode(key, option);\n if (existNode) {\n if (option.csp?.nonce && existNode.nonce !== option.csp?.nonce) {\n existNode.nonce = option.csp?.nonce;\n }\n if (existNode.innerHTML !== css) {\n existNode.innerHTML = css;\n }\n return existNode;\n }\n const newNode = injectCSS(css, option);\n newNode?.setAttribute(getMark(option), key);\n return newNode;\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nfunction getStatusClassNames(prefixCls, status, hasFeedback) {\n return {\n [`${prefixCls}-status-success`]: status === 'success',\n [`${prefixCls}-status-warning`]: status === 'warning',\n [`${prefixCls}-status-error`]: status === 'error',\n [`${prefixCls}-status-validating`]: status === 'validating',\n [`${prefixCls}-has-feedback`]: hasFeedback\n };\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { InputBoolean, InputCssPixel, InputNumber, arraysEqual, canUseDom, createDebugEle, ensureInBounds, ensureNumberInRange, getCaretCoordinates, getElementOffset, getEventPosition, getMentions, getPercent, getPrecision, getRegExp, getRepeatedElement, getStatusClassNames, getStyleAsText, inNextTick, injectCSS, isNil, isNonEmptyString, isNotNil, isNumberFinite, isPromise, isStyleSupport, isTemplateRef, isTouchEvent, measure, measureScrollbar, padEnd, padStart, properties, pxToNumber, removeCSS, scrollIntoView, shallowCopyArray, shallowEqual, silentEvent, sum, toArray, toBoolean, toCssPixel, toDecimal, toNumber, updateCSS, valueFunctionProp, wrapIntoObservable };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Optional, Inject } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { filter, mapTo } from 'rxjs/operators';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { generate } from 'ng-zorro-antd/core/color';\nimport { warn } from 'ng-zorro-antd/core/logger';\nimport { canUseDom, updateCSS } from 'ng-zorro-antd/core/util';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n/**\n * User should provide an object implements this interface to set global configurations.\n */\nconst NZ_CONFIG = new InjectionToken('nz-config');\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;\nfunction getStyle(globalPrefixCls, theme) {\n const variables = {};\n const formatColor = (color, updater) => {\n let clone = color.clone();\n clone = updater?.(clone) || clone;\n return clone.toRgbString();\n };\n const fillColor = (colorVal, type) => {\n const baseColor = new TinyColor(colorVal);\n const colorPalettes = generate(baseColor.toRgbString());\n variables[`${type}-color`] = formatColor(baseColor);\n variables[`${type}-color-disabled`] = colorPalettes[1];\n variables[`${type}-color-hover`] = colorPalettes[4];\n variables[`${type}-color-active`] = colorPalettes[7];\n variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();\n variables[`${type}-color-deprecated-bg`] = colorPalettes[1];\n variables[`${type}-color-deprecated-border`] = colorPalettes[3];\n };\n // ================ Primary Color ================\n if (theme.primaryColor) {\n fillColor(theme.primaryColor, 'primary');\n const primaryColor = new TinyColor(theme.primaryColor);\n const primaryColors = generate(primaryColor.toRgbString());\n // Legacy - We should use semantic naming standard\n primaryColors.forEach((color, index) => {\n variables[`primary-${index + 1}`] = color;\n });\n // Deprecated\n variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));\n variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));\n variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));\n variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));\n variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setAlpha(c.getAlpha() * 0.12));\n const primaryActiveColor = new TinyColor(primaryColors[0]);\n variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setAlpha(c.getAlpha() * 0.3));\n variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));\n }\n // ================ Success Color ================\n if (theme.successColor) {\n fillColor(theme.successColor, 'success');\n }\n // ================ Warning Color ================\n if (theme.warningColor) {\n fillColor(theme.warningColor, 'warning');\n }\n // ================= Error Color =================\n if (theme.errorColor) {\n fillColor(theme.errorColor, 'error');\n }\n // ================= Info Color ==================\n if (theme.infoColor) {\n fillColor(theme.infoColor, 'info');\n }\n // Convert to css variables\n const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);\n return `\n :root {\n ${cssList.join('\\n')}\n }\n `.trim();\n}\nfunction registerTheme(globalPrefixCls, theme) {\n const style = getStyle(globalPrefixCls, theme);\n if (canUseDom()) {\n updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);\n }\n else {\n warn(`NzConfigService: SSR do not support dynamic theme with css variables.`);\n }\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst isDefined = function (value) {\n return value !== undefined;\n};\nconst defaultPrefixCls = 'ant';\nclass NzConfigService {\n constructor(defaultConfig) {\n this.configUpdated$ = new Subject();\n this.config = defaultConfig || {};\n if (this.config.theme) {\n // If theme is set with NZ_CONFIG, register theme to make sure css variables work\n registerTheme(this.getConfig().prefixCls?.prefixCls || defaultPrefixCls, this.config.theme);\n }\n }\n getConfig() {\n return this.config;\n }\n getConfigForComponent(componentName) {\n return this.config[componentName];\n }\n getConfigChangeEventForComponent(componentName) {\n return this.configUpdated$.pipe(filter(n => n === componentName), mapTo(undefined));\n }\n set(componentName, value) {\n this.config[componentName] = { ...this.config[componentName], ...value };\n if (componentName === 'theme' && this.config.theme) {\n registerTheme(this.getConfig().prefixCls?.prefixCls || defaultPrefixCls, this.config.theme);\n }\n this.configUpdated$.next(componentName);\n }\n}\nNzConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzConfigService, deps: [{ token: NZ_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nNzConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzConfigService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzConfigService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NZ_CONFIG]\n }] }]; } });\n/* eslint-disable no-invalid-this */\n/**\n * This decorator is used to decorate properties. If a property is decorated, it would try to load default value from\n * config.\n */\n// eslint-disable-next-line\nfunction WithConfig() {\n return function ConfigDecorator(target, propName, originalDescriptor) {\n const privatePropName = `$$__zorroConfigDecorator__${propName}`;\n Object.defineProperty(target, privatePropName, {\n configurable: true,\n writable: true,\n enumerable: false\n });\n return {\n get() {\n const originalValue = originalDescriptor?.get ? originalDescriptor.get.bind(this)() : this[privatePropName];\n const assignedByUser = (this.propertyAssignCounter?.[propName] || 0) > 1;\n const configValue = this.nzConfigService.getConfigForComponent(this._nzModuleName)?.[propName];\n if (assignedByUser && isDefined(originalValue)) {\n return originalValue;\n }\n else {\n return isDefined(configValue) ? configValue : originalValue;\n }\n },\n set(value) {\n // If the value is assigned, we consider the newly assigned value as 'assigned by user'.\n this.propertyAssignCounter = this.propertyAssignCounter || {};\n this.propertyAssignCounter[propName] = (this.propertyAssignCounter[propName] || 0) + 1;\n if (originalDescriptor?.set) {\n originalDescriptor.set.bind(this)(value);\n }\n else {\n this[privatePropName] = value;\n }\n },\n configurable: true,\n enumerable: true\n };\n };\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NZ_CONFIG, NzConfigService, WithConfig, getStyle, registerTheme };\n","import * as i3 from '@angular/cdk/platform';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Optional, Inject, Self, Directive, Input, NgModule } from '@angular/core';\nimport { __decorate } from 'tslib';\nimport { Subject, from } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { IconService, IconDirective } from '@ant-design/icons-angular';\nimport { warn } from 'ng-zorro-antd/core/logger';\nimport { InputBoolean } from 'ng-zorro-antd/core/util';\nimport { DOCUMENT } from '@angular/common';\nimport { BarsOutline, CalendarOutline, CaretUpFill, CaretUpOutline, CaretDownFill, CaretDownOutline, CheckCircleFill, CheckCircleOutline, CheckOutline, ClockCircleOutline, CloseCircleOutline, CloseCircleFill, CloseOutline, CopyOutline, DeleteOutline, DoubleLeftOutline, DoubleRightOutline, DownOutline, EditOutline, EllipsisOutline, ExclamationCircleFill, ExclamationCircleOutline, EyeOutline, FileFill, FileOutline, FilterFill, InfoCircleFill, InfoCircleOutline, LeftOutline, LoadingOutline, PaperClipOutline, QuestionCircleOutline, RightOutline, RotateRightOutline, RotateLeftOutline, StarFill, SearchOutline, UploadOutline, VerticalAlignTopOutline, UpOutline, SwapRightOutline, ZoomInOutline, ZoomOutOutline } from '@ant-design/icons-angular/icons';\nimport * as i1 from '@angular/platform-browser';\nimport * as i2 from 'ng-zorro-antd/core/config';\nimport * as i4 from '@angular/common/http';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst NZ_ICONS_USED_BY_ZORRO = [\n BarsOutline,\n CalendarOutline,\n CaretUpFill,\n CaretUpOutline,\n CaretDownFill,\n CaretDownOutline,\n CheckCircleFill,\n CheckCircleOutline,\n CheckOutline,\n ClockCircleOutline,\n CloseCircleOutline,\n CloseCircleFill,\n CloseOutline,\n CopyOutline,\n DeleteOutline,\n DoubleLeftOutline,\n DoubleRightOutline,\n DownOutline,\n EditOutline,\n EllipsisOutline,\n ExclamationCircleFill,\n ExclamationCircleOutline,\n EyeOutline,\n FileFill,\n FileOutline,\n FilterFill,\n InfoCircleFill,\n InfoCircleOutline,\n LeftOutline,\n LoadingOutline,\n PaperClipOutline,\n QuestionCircleOutline,\n RightOutline,\n RotateRightOutline,\n RotateLeftOutline,\n StarFill,\n SearchOutline,\n StarFill,\n UploadOutline,\n VerticalAlignTopOutline,\n UpOutline,\n SwapRightOutline,\n ZoomInOutline,\n ZoomOutOutline\n];\n\nconst NZ_ICONS = new InjectionToken('nz_icons');\nconst NZ_ICON_DEFAULT_TWOTONE_COLOR = new InjectionToken('nz_icon_default_twotone_color');\nconst DEFAULT_TWOTONE_COLOR = '#1890ff';\n/**\n * It should be a global singleton, otherwise registered icons could not be found.\n */\nclass NzIconService extends IconService {\n constructor(rendererFactory, sanitizer, nzConfigService, platform, handler, _document, icons) {\n super(rendererFactory, handler, _document, sanitizer, [...NZ_ICONS_USED_BY_ZORRO, ...(icons || [])]);\n this.nzConfigService = nzConfigService;\n this.platform = platform;\n this.configUpdated$ = new Subject();\n this.iconfontCache = new Set();\n this.subscription = null;\n this.onConfigChange();\n this.configDefaultTwotoneColor();\n this.configDefaultTheme();\n }\n get _disableDynamicLoading() {\n return !this.platform.isBrowser;\n }\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n this.subscription = null;\n }\n }\n normalizeSvgElement(svg) {\n if (!svg.getAttribute('viewBox')) {\n this._renderer.setAttribute(svg, 'viewBox', '0 0 1024 1024');\n }\n if (!svg.getAttribute('width') || !svg.getAttribute('height')) {\n this._renderer.setAttribute(svg, 'width', '1em');\n this._renderer.setAttribute(svg, 'height', '1em');\n }\n if (!svg.getAttribute('fill')) {\n this._renderer.setAttribute(svg, 'fill', 'currentColor');\n }\n }\n fetchFromIconfont(opt) {\n const { scriptUrl } = opt;\n if (this._document && !this.iconfontCache.has(scriptUrl)) {\n const script = this._renderer.createElement('script');\n this._renderer.setAttribute(script, 'src', scriptUrl);\n this._renderer.setAttribute(script, 'data-namespace', scriptUrl.replace(/^(https?|http):/g, ''));\n this._renderer.appendChild(this._document.body, script);\n this.iconfontCache.add(scriptUrl);\n }\n }\n createIconfontIcon(type) {\n return this._createSVGElementFromString(``);\n }\n onConfigChange() {\n this.subscription = this.nzConfigService.getConfigChangeEventForComponent('icon').subscribe(() => {\n this.configDefaultTwotoneColor();\n this.configDefaultTheme();\n this.configUpdated$.next();\n });\n }\n configDefaultTheme() {\n const iconConfig = this.getConfig();\n this.defaultTheme = iconConfig.nzTheme || 'outline';\n }\n configDefaultTwotoneColor() {\n const iconConfig = this.getConfig();\n const defaultTwotoneColor = iconConfig.nzTwotoneColor || DEFAULT_TWOTONE_COLOR;\n let primaryColor = DEFAULT_TWOTONE_COLOR;\n if (defaultTwotoneColor) {\n if (defaultTwotoneColor.startsWith('#')) {\n primaryColor = defaultTwotoneColor;\n }\n else {\n warn('Twotone color must be a hex color!');\n }\n }\n this.twoToneColor = { primaryColor };\n }\n getConfig() {\n return this.nzConfigService.getConfigForComponent('icon') || {};\n }\n}\nNzIconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconService, deps: [{ token: i0.RendererFactory2 }, { token: i1.DomSanitizer }, { token: i2.NzConfigService }, { token: i3.Platform }, { token: i4.HttpBackend, optional: true }, { token: DOCUMENT, optional: true }, { token: NZ_ICONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nNzIconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: i1.DomSanitizer }, { type: i2.NzConfigService }, { type: i3.Platform }, { type: i4.HttpBackend, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NZ_ICONS]\n }] }]; } });\nconst NZ_ICONS_PATCH = new InjectionToken('nz_icons_patch');\nclass NzIconPatchService {\n constructor(extraIcons, rootIconService) {\n this.extraIcons = extraIcons;\n this.rootIconService = rootIconService;\n this.patched = false;\n }\n doPatch() {\n if (this.patched) {\n return;\n }\n this.extraIcons.forEach(iconDefinition => this.rootIconService.addIcon(iconDefinition));\n this.patched = true;\n }\n}\nNzIconPatchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconPatchService, deps: [{ token: NZ_ICONS_PATCH, self: true }, { token: NzIconService }], target: i0.ɵɵFactoryTarget.Injectable });\nNzIconPatchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconPatchService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconPatchService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Self\n }, {\n type: Inject,\n args: [NZ_ICONS_PATCH]\n }] }, { type: NzIconService }]; } });\n\nclass NzIconDirective extends IconDirective {\n constructor(ngZone, changeDetectorRef, elementRef, iconService, renderer, iconPatch) {\n super(iconService, elementRef, renderer);\n this.ngZone = ngZone;\n this.changeDetectorRef = changeDetectorRef;\n this.iconService = iconService;\n this.renderer = renderer;\n this.cacheClassName = null;\n this.nzRotate = 0;\n this.spin = false;\n this.destroy$ = new Subject();\n if (iconPatch) {\n iconPatch.doPatch();\n }\n this.el = elementRef.nativeElement;\n }\n set nzSpin(value) {\n this.spin = value;\n }\n set nzType(value) {\n this.type = value;\n }\n set nzTheme(value) {\n this.theme = value;\n }\n set nzTwotoneColor(value) {\n this.twoToneColor = value;\n }\n set nzIconfont(value) {\n this.iconfont = value;\n }\n ngOnChanges(changes) {\n const { nzType, nzTwotoneColor, nzSpin, nzTheme, nzRotate } = changes;\n if (nzType || nzTwotoneColor || nzSpin || nzTheme) {\n this.changeIcon2();\n }\n else if (nzRotate) {\n this.handleRotate(this.el.firstChild);\n }\n else {\n this._setSVGElement(this.iconService.createIconfontIcon(`#${this.iconfont}`));\n }\n }\n ngOnInit() {\n this.renderer.setAttribute(this.el, 'class', `anticon ${this.el.className}`.trim());\n }\n /**\n * If custom content is provided, try to normalize SVG elements.\n */\n ngAfterContentChecked() {\n if (!this.type) {\n const children = this.el.children;\n let length = children.length;\n if (!this.type && children.length) {\n while (length--) {\n const child = children[length];\n if (child.tagName.toLowerCase() === 'svg') {\n this.iconService.normalizeSvgElement(child);\n }\n }\n }\n }\n }\n ngOnDestroy() {\n this.destroy$.next();\n }\n /**\n * Replacement of `changeIcon` for more modifications.\n */\n changeIcon2() {\n this.setClassName();\n // The Angular zone is left deliberately before the SVG is set\n // since `_changeIcon` spawns asynchronous tasks as promise and\n // HTTP calls. This is used to reduce the number of change detections\n // while the icon is being loaded dynamically.\n this.ngZone.runOutsideAngular(() => {\n from(this._changeIcon())\n .pipe(takeUntil(this.destroy$))\n .subscribe({\n next: svgOrRemove => {\n // Get back into the Angular zone after completing all the tasks.\n // Since we manually run change detection locally, we have to re-enter\n // the zone because the change detection might also be run on other local\n // components, leading them to handle template functions outside of the Angular zone.\n this.ngZone.run(() => {\n // The _changeIcon method would call Renderer to remove the element of the old icon,\n // which would call `markElementAsRemoved` eventually,\n // so we should call `detectChanges` to tell Angular remove the DOM node.\n // #7186\n this.changeDetectorRef.detectChanges();\n if (svgOrRemove) {\n this.setSVGData(svgOrRemove);\n this.handleSpin(svgOrRemove);\n this.handleRotate(svgOrRemove);\n }\n });\n },\n error: warn\n });\n });\n }\n handleSpin(svg) {\n if (this.spin || this.type === 'loading') {\n this.renderer.addClass(svg, 'anticon-spin');\n }\n else {\n this.renderer.removeClass(svg, 'anticon-spin');\n }\n }\n handleRotate(svg) {\n if (this.nzRotate) {\n this.renderer.setAttribute(svg, 'style', `transform: rotate(${this.nzRotate}deg)`);\n }\n else {\n this.renderer.removeAttribute(svg, 'style');\n }\n }\n setClassName() {\n if (this.cacheClassName) {\n this.renderer.removeClass(this.el, this.cacheClassName);\n }\n this.cacheClassName = `anticon-${this.type}`;\n this.renderer.addClass(this.el, this.cacheClassName);\n }\n setSVGData(svg) {\n this.renderer.setAttribute(svg, 'data-icon', this.type);\n this.renderer.setAttribute(svg, 'aria-hidden', 'true');\n }\n}\nNzIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconDirective, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NzIconService }, { token: i0.Renderer2 }, { token: NzIconPatchService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNzIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.5\", type: NzIconDirective, selector: \"[nz-icon]\", inputs: { nzSpin: \"nzSpin\", nzRotate: \"nzRotate\", nzType: \"nzType\", nzTheme: \"nzTheme\", nzTwotoneColor: \"nzTwotoneColor\", nzIconfont: \"nzIconfont\" }, host: { properties: { \"class.anticon\": \"true\" } }, exportAs: [\"nzIcon\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n__decorate([\n InputBoolean()\n], NzIconDirective.prototype, \"nzSpin\", null);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[nz-icon]',\n exportAs: 'nzIcon',\n host: {\n '[class.anticon]': 'true'\n }\n }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NzIconService }, { type: i0.Renderer2 }, { type: NzIconPatchService, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { nzSpin: [{\n type: Input\n }], nzRotate: [{\n type: Input\n }], nzType: [{\n type: Input\n }], nzTheme: [{\n type: Input\n }], nzTwotoneColor: [{\n type: Input\n }], nzIconfont: [{\n type: Input\n }] } });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzIconModule {\n static forRoot(icons) {\n return {\n ngModule: NzIconModule,\n providers: [\n {\n provide: NZ_ICONS,\n useValue: icons\n }\n ]\n };\n }\n static forChild(icons) {\n return {\n ngModule: NzIconModule,\n providers: [\n NzIconPatchService,\n {\n provide: NZ_ICONS_PATCH,\n useValue: icons\n }\n ]\n };\n }\n}\nNzIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNzIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconModule, declarations: [NzIconDirective], imports: [PlatformModule], exports: [NzIconDirective] });\nNzIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconModule, imports: [PlatformModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzIconModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [NzIconDirective],\n declarations: [NzIconDirective],\n imports: [PlatformModule]\n }]\n }] });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_TWOTONE_COLOR, NZ_ICONS, NZ_ICONS_PATCH, NZ_ICONS_USED_BY_ZORRO, NZ_ICON_DEFAULT_TWOTONE_COLOR, NzIconDirective, NzIconModule, NzIconPatchService, NzIconService };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, EventEmitter, Injectable, Optional, Inject, Directive, Output, Input, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nconst DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n/** @docs-private */\nfunction DIR_DOCUMENT_FACTORY() {\n return inject(DOCUMENT);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n/** Resolves a string value to a specific direction. */\nfunction _resolveDirectionality(rawValue) {\n const value = rawValue?.toLowerCase() || '';\n if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n }\n return value === 'rtl' ? 'rtl' : 'ltr';\n}\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\nclass Directionality {\n constructor(_document) {\n /** The current 'ltr' or 'rtl' value. */\n this.value = 'ltr';\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n this.change = new EventEmitter();\n if (_document) {\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n this.value = _resolveDirectionality(bodyDir || htmlDir || 'ltr');\n }\n }\n ngOnDestroy() {\n this.change.complete();\n }\n}\nDirectionality.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Directionality, deps: [{ token: DIR_DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nDirectionality.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Directionality, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Directionality, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DIR_DOCUMENT]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\nclass Dir {\n constructor() {\n /** Normalized direction that accounts for invalid/unsupported values. */\n this._dir = 'ltr';\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Event emitted when the direction changes. */\n this.change = new EventEmitter();\n }\n /** @docs-private */\n get dir() {\n return this._dir;\n }\n set dir(value) {\n const previousValue = this._dir;\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this._dir = _resolveDirectionality(value);\n this._rawDir = value;\n if (previousValue !== this._dir && this._isInitialized) {\n this.change.emit(this._dir);\n }\n }\n /** Current layout direction of the element. */\n get value() {\n return this.dir;\n }\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n this.change.complete();\n }\n}\nDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Dir, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", type: Dir, selector: \"[dir]\", inputs: { dir: \"dir\" }, outputs: { change: \"dirChange\" }, host: { properties: { \"attr.dir\": \"_rawDir\" } }, providers: [{ provide: Directionality, useExisting: Dir }], exportAs: [\"dir\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: Dir, decorators: [{\n type: Directive,\n args: [{\n selector: '[dir]',\n providers: [{ provide: Directionality, useExisting: Dir }],\n host: { '[attr.dir]': '_rawDir' },\n exportAs: 'dir',\n }]\n }], propDecorators: { change: [{\n type: Output,\n args: ['dirChange']\n }], dir: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass BidiModule {\n}\nBidiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBidiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule, declarations: [Dir], exports: [Dir] });\nBidiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: BidiModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [Dir],\n declarations: [Dir],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BidiModule, DIR_DOCUMENT, Dir, Directionality };\n","import { PlatformModule } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { Directive, Input, NgModule } from '@angular/core';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n/**\n * hack the bug\n * angular router change with unexpected transition trigger after calling applicationRef.attachView\n * https://github.com/angular/angular/issues/34718\n */\nclass NzTransitionPatchDirective {\n constructor(elementRef, renderer) {\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.hidden = null;\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n }\n setHiddenAttribute() {\n if (this.hidden) {\n if (typeof this.hidden === 'string') {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', this.hidden);\n }\n else {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', '');\n }\n }\n else {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'hidden');\n }\n }\n ngOnChanges() {\n this.setHiddenAttribute();\n }\n ngAfterViewInit() {\n this.setHiddenAttribute();\n }\n}\nNzTransitionPatchDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzTransitionPatchDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNzTransitionPatchDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.5\", type: NzTransitionPatchDirective, selector: \"[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group\", inputs: { hidden: \"hidden\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzTransitionPatchDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group'\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hidden: [{\n type: Input\n }] } });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzTransitionPatchModule {\n}\nNzTransitionPatchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzTransitionPatchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNzTransitionPatchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.5\", ngImport: i0, type: NzTransitionPatchModule, declarations: [NzTransitionPatchDirective], imports: [PlatformModule], exports: [NzTransitionPatchDirective] });\nNzTransitionPatchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzTransitionPatchModule, imports: [PlatformModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzTransitionPatchModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [PlatformModule],\n exports: [NzTransitionPatchDirective],\n declarations: [NzTransitionPatchDirective]\n }]\n }] });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NzTransitionPatchDirective as ɵNzTransitionPatchDirective, NzTransitionPatchModule as ɵNzTransitionPatchModule };\n","import { Platform, PlatformModule } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, PLATFORM_ID, Directive, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzWaveRenderer {\n constructor(triggerElement, ngZone, insertExtraNode, platformId) {\n this.triggerElement = triggerElement;\n this.ngZone = ngZone;\n this.insertExtraNode = insertExtraNode;\n this.platformId = platformId;\n this.waveTransitionDuration = 400;\n this.styleForPseudo = null;\n this.extraNode = null;\n this.lastTime = 0;\n this.onClick = (event) => {\n if (!this.triggerElement ||\n !this.triggerElement.getAttribute ||\n this.triggerElement.getAttribute('disabled') ||\n event.target.tagName === 'INPUT' ||\n this.triggerElement.className.indexOf('disabled') >= 0) {\n return;\n }\n this.fadeOutWave();\n };\n this.platform = new Platform(this.platformId);\n this.clickHandler = this.onClick.bind(this);\n this.bindTriggerEvent();\n }\n get waveAttributeName() {\n return this.insertExtraNode ? 'ant-click-animating' : 'ant-click-animating-without-extra-node';\n }\n bindTriggerEvent() {\n if (this.platform.isBrowser) {\n this.ngZone.runOutsideAngular(() => {\n this.removeTriggerEvent();\n if (this.triggerElement) {\n this.triggerElement.addEventListener('click', this.clickHandler, true);\n }\n });\n }\n }\n removeTriggerEvent() {\n if (this.triggerElement) {\n this.triggerElement.removeEventListener('click', this.clickHandler, true);\n }\n }\n removeStyleAndExtraNode() {\n if (this.styleForPseudo && document.body.contains(this.styleForPseudo)) {\n document.body.removeChild(this.styleForPseudo);\n this.styleForPseudo = null;\n }\n if (this.insertExtraNode && this.triggerElement.contains(this.extraNode)) {\n this.triggerElement.removeChild(this.extraNode);\n }\n }\n destroy() {\n this.removeTriggerEvent();\n this.removeStyleAndExtraNode();\n }\n fadeOutWave() {\n const node = this.triggerElement;\n const waveColor = this.getWaveColor(node);\n node.setAttribute(this.waveAttributeName, 'true');\n if (Date.now() < this.lastTime + this.waveTransitionDuration) {\n return;\n }\n if (this.isValidColor(waveColor)) {\n if (!this.styleForPseudo) {\n this.styleForPseudo = document.createElement('style');\n }\n this.styleForPseudo.innerHTML = `\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: ${waveColor};\n }`;\n document.body.appendChild(this.styleForPseudo);\n }\n if (this.insertExtraNode) {\n if (!this.extraNode) {\n this.extraNode = document.createElement('div');\n }\n this.extraNode.className = 'ant-click-animating-node';\n node.appendChild(this.extraNode);\n }\n this.lastTime = Date.now();\n this.runTimeoutOutsideZone(() => {\n node.removeAttribute(this.waveAttributeName);\n this.removeStyleAndExtraNode();\n }, this.waveTransitionDuration);\n }\n isValidColor(color) {\n return (!!color &&\n color !== '#ffffff' &&\n color !== 'rgb(255, 255, 255)' &&\n this.isNotGrey(color) &&\n !/rgba\\(\\d*, \\d*, \\d*, 0\\)/.test(color) &&\n color !== 'transparent');\n }\n isNotGrey(color) {\n const match = color.match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\.\\d]*)?\\)/);\n if (match && match[1] && match[2] && match[3]) {\n return !(match[1] === match[2] && match[2] === match[3]);\n }\n return true;\n }\n getWaveColor(node) {\n const nodeStyle = getComputedStyle(node);\n return (nodeStyle.getPropertyValue('border-top-color') || // Firefox Compatible\n nodeStyle.getPropertyValue('border-color') ||\n nodeStyle.getPropertyValue('background-color'));\n }\n runTimeoutOutsideZone(fn, delay) {\n this.ngZone.runOutsideAngular(() => setTimeout(fn, delay));\n }\n}\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst NZ_WAVE_GLOBAL_DEFAULT_CONFIG = {\n disabled: false\n};\nconst NZ_WAVE_GLOBAL_CONFIG = new InjectionToken('nz-wave-global-options', {\n providedIn: 'root',\n factory: NZ_WAVE_GLOBAL_CONFIG_FACTORY\n});\nfunction NZ_WAVE_GLOBAL_CONFIG_FACTORY() {\n return NZ_WAVE_GLOBAL_DEFAULT_CONFIG;\n}\nclass NzWaveDirective {\n constructor(ngZone, elementRef, config, animationType, platformId) {\n this.ngZone = ngZone;\n this.elementRef = elementRef;\n this.config = config;\n this.animationType = animationType;\n this.platformId = platformId;\n this.nzWaveExtraNode = false;\n this.waveDisabled = false;\n this.waveDisabled = this.isConfigDisabled();\n }\n get disabled() {\n return this.waveDisabled;\n }\n get rendererRef() {\n return this.waveRenderer;\n }\n isConfigDisabled() {\n let disabled = false;\n if (this.config && typeof this.config.disabled === 'boolean') {\n disabled = this.config.disabled;\n }\n if (this.animationType === 'NoopAnimations') {\n disabled = true;\n }\n return disabled;\n }\n ngOnDestroy() {\n if (this.waveRenderer) {\n this.waveRenderer.destroy();\n }\n }\n ngOnInit() {\n this.renderWaveIfEnabled();\n }\n renderWaveIfEnabled() {\n if (!this.waveDisabled && this.elementRef.nativeElement) {\n this.waveRenderer = new NzWaveRenderer(this.elementRef.nativeElement, this.ngZone, this.nzWaveExtraNode, this.platformId);\n }\n }\n disable() {\n this.waveDisabled = true;\n if (this.waveRenderer) {\n this.waveRenderer.removeTriggerEvent();\n this.waveRenderer.removeStyleAndExtraNode();\n }\n }\n enable() {\n // config priority\n this.waveDisabled = this.isConfigDisabled() || false;\n if (this.waveRenderer) {\n this.waveRenderer.bindTriggerEvent();\n }\n }\n}\nNzWaveDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzWaveDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: NZ_WAVE_GLOBAL_CONFIG, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });\nNzWaveDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.2.5\", type: NzWaveDirective, selector: \"[nz-wave],button[nz-button]:not([nzType=\\\"link\\\"]):not([nzType=\\\"text\\\"])\", inputs: { nzWaveExtraNode: \"nzWaveExtraNode\" }, exportAs: [\"nzWave\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzWaveDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])',\n exportAs: 'nzWave'\n }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NZ_WAVE_GLOBAL_CONFIG]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, propDecorators: { nzWaveExtraNode: [{\n type: Input\n }] } });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzWaveModule {\n}\nNzWaveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNzWaveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.5\", ngImport: i0, type: NzWaveModule, declarations: [NzWaveDirective], imports: [PlatformModule], exports: [NzWaveDirective] });\nNzWaveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzWaveModule, imports: [PlatformModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzWaveModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [PlatformModule],\n exports: [NzWaveDirective],\n declarations: [NzWaveDirective]\n }]\n }] });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NZ_WAVE_GLOBAL_CONFIG, NZ_WAVE_GLOBAL_CONFIG_FACTORY, NZ_WAVE_GLOBAL_DEFAULT_CONFIG, NzWaveDirective, NzWaveModule, NzWaveRenderer };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, ContentChild, Input, NgModule } from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil, startWith, filter } from 'rxjs/operators';\nimport * as i1 from 'ng-zorro-antd/core/config';\nimport { WithConfig } from 'ng-zorro-antd/core/config';\nimport { InputBoolean } from 'ng-zorro-antd/core/util';\nimport * as i4 from 'ng-zorro-antd/icon';\nimport { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';\nimport * as i2 from '@angular/cdk/bidi';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from 'ng-zorro-antd/core/transition-patch';\nimport { ɵNzTransitionPatchModule } from 'ng-zorro-antd/core/transition-patch';\nimport { NzWaveModule } from 'ng-zorro-antd/core/wave';\n\nconst NZ_CONFIG_MODULE_NAME = 'button';\nclass NzButtonComponent {\n constructor(ngZone, elementRef, cdr, renderer, nzConfigService, directionality) {\n this.ngZone = ngZone;\n this.elementRef = elementRef;\n this.cdr = cdr;\n this.renderer = renderer;\n this.nzConfigService = nzConfigService;\n this.directionality = directionality;\n this._nzModuleName = NZ_CONFIG_MODULE_NAME;\n this.nzBlock = false;\n this.nzGhost = false;\n this.nzSearch = false;\n this.nzLoading = false;\n this.nzDanger = false;\n this.disabled = false;\n this.tabIndex = null;\n this.nzType = null;\n this.nzShape = null;\n this.nzSize = 'default';\n this.dir = 'ltr';\n this.destroy$ = new Subject();\n this.loading$ = new Subject();\n this.nzConfigService\n .getConfigChangeEventForComponent(NZ_CONFIG_MODULE_NAME)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.cdr.markForCheck();\n });\n }\n insertSpan(nodes, renderer) {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = renderer.createElement('span');\n const parent = renderer.parentNode(node);\n renderer.insertBefore(parent, span, node);\n renderer.appendChild(span, node);\n }\n });\n }\n assertIconOnly(element, renderer) {\n const listOfNode = Array.from(element.childNodes);\n const iconCount = listOfNode.filter(node => {\n const iconChildNodes = Array.from(node.childNodes || []);\n return node.nodeName === 'SPAN' && iconChildNodes.length > 0 && iconChildNodes.every(ic => ic.nodeName === 'svg');\n }).length;\n const noText = listOfNode.every(node => node.nodeName !== '#text');\n // ignore icon\n const noSpan = listOfNode\n .filter(node => {\n const iconChildNodes = Array.from(node.childNodes || []);\n return !(node.nodeName === 'SPAN' &&\n iconChildNodes.length > 0 &&\n iconChildNodes.every(ic => ic.nodeName === 'svg'));\n })\n .every(node => node.nodeName !== 'SPAN');\n const isIconOnly = noSpan && noText && iconCount >= 1;\n if (isIconOnly) {\n renderer.addClass(element, 'ant-btn-icon-only');\n }\n }\n ngOnInit() {\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => {\n this.dir = direction;\n this.cdr.detectChanges();\n });\n this.dir = this.directionality.value;\n this.ngZone.runOutsideAngular(() => {\n // Caretaker note: this event listener could've been added through `host.click` or `HostListener`.\n // The compiler generates the `ɵɵlistener` instruction which wraps the actual listener internally into the\n // function, which runs `markDirty()` before running the actual listener (the decorated class method).\n // Since we're preventing the default behavior and stopping event propagation this doesn't require Angular to run the change detection.\n fromEvent(this.elementRef.nativeElement, 'click', { capture: true })\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => {\n if ((this.disabled && event.target?.tagName === 'A') || this.nzLoading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n });\n });\n }\n ngOnChanges(changes) {\n const { nzLoading } = changes;\n if (nzLoading) {\n this.loading$.next(this.nzLoading);\n }\n }\n ngAfterViewInit() {\n this.assertIconOnly(this.elementRef.nativeElement, this.renderer);\n this.insertSpan(this.elementRef.nativeElement.childNodes, this.renderer);\n }\n ngAfterContentInit() {\n this.loading$\n .pipe(startWith(this.nzLoading), filter(() => !!this.nzIconDirectiveElement), takeUntil(this.destroy$))\n .subscribe(loading => {\n const nativeElement = this.nzIconDirectiveElement.nativeElement;\n if (loading) {\n this.renderer.setStyle(nativeElement, 'display', 'none');\n }\n else {\n this.renderer.removeStyle(nativeElement, 'display');\n }\n });\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\nNzButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i1.NzConfigService }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nNzButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.5\", type: NzButtonComponent, selector: \"button[nz-button], a[nz-button]\", inputs: { nzBlock: \"nzBlock\", nzGhost: \"nzGhost\", nzSearch: \"nzSearch\", nzLoading: \"nzLoading\", nzDanger: \"nzDanger\", disabled: \"disabled\", tabIndex: \"tabIndex\", nzType: \"nzType\", nzShape: \"nzShape\", nzSize: \"nzSize\" }, host: { properties: { \"class.ant-btn-primary\": \"nzType === 'primary'\", \"class.ant-btn-dashed\": \"nzType === 'dashed'\", \"class.ant-btn-link\": \"nzType === 'link'\", \"class.ant-btn-text\": \"nzType === 'text'\", \"class.ant-btn-circle\": \"nzShape === 'circle'\", \"class.ant-btn-round\": \"nzShape === 'round'\", \"class.ant-btn-lg\": \"nzSize === 'large'\", \"class.ant-btn-sm\": \"nzSize === 'small'\", \"class.ant-btn-dangerous\": \"nzDanger\", \"class.ant-btn-loading\": \"nzLoading\", \"class.ant-btn-background-ghost\": \"nzGhost\", \"class.ant-btn-block\": \"nzBlock\", \"class.ant-input-search-button\": \"nzSearch\", \"class.ant-btn-rtl\": \"dir === 'rtl'\", \"attr.tabindex\": \"disabled ? -1 : (tabIndex === null ? null : tabIndex)\", \"attr.disabled\": \"disabled || null\" }, classAttribute: \"ant-btn\" }, queries: [{ propertyName: \"nzIconDirectiveElement\", first: true, predicate: NzIconDirective, descendants: true, read: ElementRef }], exportAs: [\"nzButton\"], usesOnChanges: true, ngImport: i0, template: `\n \n \n `, isInline: true, dependencies: [{ kind: \"directive\", type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i4.NzIconDirective, selector: \"[nz-icon]\", inputs: [\"nzSpin\", \"nzRotate\", \"nzType\", \"nzTheme\", \"nzTwotoneColor\", \"nzIconfont\"], exportAs: [\"nzIcon\"] }, { kind: \"directive\", type: i5.ɵNzTransitionPatchDirective, selector: \"[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group\", inputs: [\"hidden\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n__decorate([\n InputBoolean()\n], NzButtonComponent.prototype, \"nzBlock\", void 0);\n__decorate([\n InputBoolean()\n], NzButtonComponent.prototype, \"nzGhost\", void 0);\n__decorate([\n InputBoolean()\n], NzButtonComponent.prototype, \"nzSearch\", void 0);\n__decorate([\n InputBoolean()\n], NzButtonComponent.prototype, \"nzLoading\", void 0);\n__decorate([\n InputBoolean()\n], NzButtonComponent.prototype, \"nzDanger\", void 0);\n__decorate([\n InputBoolean()\n], NzButtonComponent.prototype, \"disabled\", void 0);\n__decorate([\n WithConfig()\n], NzButtonComponent.prototype, \"nzSize\", void 0);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'button[nz-button], a[nz-button]',\n exportAs: 'nzButton',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n \n \n `,\n host: {\n class: 'ant-btn',\n '[class.ant-btn-primary]': `nzType === 'primary'`,\n '[class.ant-btn-dashed]': `nzType === 'dashed'`,\n '[class.ant-btn-link]': `nzType === 'link'`,\n '[class.ant-btn-text]': `nzType === 'text'`,\n '[class.ant-btn-circle]': `nzShape === 'circle'`,\n '[class.ant-btn-round]': `nzShape === 'round'`,\n '[class.ant-btn-lg]': `nzSize === 'large'`,\n '[class.ant-btn-sm]': `nzSize === 'small'`,\n '[class.ant-btn-dangerous]': `nzDanger`,\n '[class.ant-btn-loading]': `nzLoading`,\n '[class.ant-btn-background-ghost]': `nzGhost`,\n '[class.ant-btn-block]': `nzBlock`,\n '[class.ant-input-search-button]': `nzSearch`,\n '[class.ant-btn-rtl]': `dir === 'rtl'`,\n '[attr.tabindex]': 'disabled ? -1 : (tabIndex === null ? null : tabIndex)',\n '[attr.disabled]': 'disabled || null'\n }\n }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i1.NzConfigService }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { nzIconDirectiveElement: [{\n type: ContentChild,\n args: [NzIconDirective, { read: ElementRef }]\n }], nzBlock: [{\n type: Input\n }], nzGhost: [{\n type: Input\n }], nzSearch: [{\n type: Input\n }], nzLoading: [{\n type: Input\n }], nzDanger: [{\n type: Input\n }], disabled: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], nzType: [{\n type: Input\n }], nzShape: [{\n type: Input\n }], nzSize: [{\n type: Input\n }] } });\n\nclass NzButtonGroupComponent {\n constructor(directionality) {\n this.directionality = directionality;\n this.nzSize = 'default';\n this.dir = 'ltr';\n this.destroy$ = new Subject();\n }\n ngOnInit() {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => {\n this.dir = direction;\n });\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\nNzButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonGroupComponent, deps: [{ token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nNzButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.2.5\", type: NzButtonGroupComponent, selector: \"nz-button-group\", inputs: { nzSize: \"nzSize\" }, host: { properties: { \"class.ant-btn-group-lg\": \"nzSize === 'large'\", \"class.ant-btn-group-sm\": \"nzSize === 'small'\", \"class.ant-btn-group-rtl\": \"dir === 'rtl'\" }, classAttribute: \"ant-btn-group\" }, exportAs: [\"nzButtonGroup\"], ngImport: i0, template: ` `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonGroupComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'nz-button-group',\n exportAs: 'nzButtonGroup',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ant-btn-group',\n '[class.ant-btn-group-lg]': `nzSize === 'large'`,\n '[class.ant-btn-group-sm]': `nzSize === 'small'`,\n '[class.ant-btn-group-rtl]': `dir === 'rtl'`\n },\n preserveWhitespaces: false,\n template: ` `\n }]\n }], ctorParameters: function () { return [{ type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { nzSize: [{\n type: Input\n }] } });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzButtonModule {\n}\nNzButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNzButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonModule, declarations: [NzButtonComponent, NzButtonGroupComponent], imports: [BidiModule, CommonModule, NzWaveModule, NzIconModule, ɵNzTransitionPatchModule], exports: [NzButtonComponent, NzButtonGroupComponent, ɵNzTransitionPatchModule, NzWaveModule] });\nNzButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonModule, imports: [BidiModule, CommonModule, NzWaveModule, NzIconModule, ɵNzTransitionPatchModule, ɵNzTransitionPatchModule, NzWaveModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.5\", ngImport: i0, type: NzButtonModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [NzButtonComponent, NzButtonGroupComponent],\n exports: [NzButtonComponent, NzButtonGroupComponent, ɵNzTransitionPatchModule, NzWaveModule],\n imports: [BidiModule, CommonModule, NzWaveModule, NzIconModule, ɵNzTransitionPatchModule]\n }]\n }] });\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NzButtonComponent, NzButtonGroupComponent, NzButtonModule };\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule, DatePipe, DecimalPipe } from '@angular/common';\r\nimport { GoPageComponent } from './pages/go-page/go-page.component';\r\nimport { TripSettingsPageComponent } from './pages/trip-settings-page/trip-settings-page.component';\r\nimport { TripEventPageComponent } from './pages/trip-event-page/trip-event-page.component';\r\nimport { VehicleFormComponent } from './components/vehicle-form/vehicle-form.component';\r\nimport { VehicleListComponent } from './components/vehicle-list/vehicle-list.component';\r\nimport { VehiclePageComponent } from './pages/vehicle-page/vehicle-page.component';\r\nimport { VehicleCreatePageComponent } from './pages/vehicle-create-page/vehicle-create-page.component';\r\nimport { TrailerFormComponent } from './components/trailer-form/trailer-form.component';\r\nimport { TrailerCreatePageComponent } from './pages/trailer-create-page/trailer-create-page.component';\r\nimport { TrailerListComponent } from './components/trailer-list/trailer-list.component';\r\nimport { TrailerPageComponent } from './pages/trailer-page/trailer-page.component';\r\nimport { StartDayFormComponent } from './components/start-day-form/start-day-form.component';\r\nimport { StartTripFormComponent } from './components/start-trip-form/start-trip-form.component';\r\nimport { EndDayFormComponent } from './components/end-day-form/end-day-form.component';\r\nimport { TripSettingsComponent } from './components/trip-settings/trip-settings.component';\r\nimport { TripInfoFormComponent } from './components/trip-info-form/trip-info-form.component';\r\nimport { EndTripFormComponent } from './components/end-trip-form/end-trip-form.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { SharedModule } from '../shared/shared.module';\r\nimport { AccessoryPageComponent } from './pages/accessory-page/accessory-page.component';\r\nimport { AccessoryCreatePageComponent } from './pages/accessory-create-page/accessory-create-page.component';\r\nimport { AccessoryFormComponent } from './components/accessory-form/accessory-form.component';\r\nimport { AccessoryListComponent } from './components/accessory-list/accessory-list.component';\r\nimport { CleaningPageComponent } from './pages/cleaning-page/cleaning-page.component';\r\nimport { CleaningCreatePageComponent } from './pages/cleaning-create-page/cleaning-create-page.component';\r\nimport { CleaningListComponent } from './components/cleaning-list/cleaning-list.component';\r\nimport { CleaningFormComponent } from './components/cleaning-form/cleaning-form.component';\r\nimport { ProductPageComponent } from './pages/product-page/product-page.component';\r\nimport { ProductCreatePageComponent } from './pages/product-create-page/product-create-page.component';\r\nimport { ProductFormComponent } from './components/product-form/product-form.component';\r\nimport { ProductListComponent } from './components/product-list/product-list.component';\r\nimport { CompanyPageComponent } from './pages/company-page/company-page.component';\r\nimport { CompanyCreatePageComponent } from './pages/company-create-page/company-create-page.component';\r\nimport { CompanyListComponent } from './components/company-list/company-list.component';\r\nimport { CompanyFormComponent } from './components/company-form/company-form.component';\r\nimport { ActivePauseComponent } from './components/active-pause/active-pause.component';\r\nimport { DayHistoryPageComponent } from './pages/day-history-page/day-history-page.component';\r\nimport { DayTimelineComponent } from './components/day-timeline/day-timeline.component';\r\nimport { TripHistoryPageComponent } from './pages/trip-history-page/trip-history-page.component';\r\nimport { TripTimelineComponent } from './components/trip-timeline/trip-timeline.component';\r\nimport { ModelCardComponent } from './components/model-card/model-card.component';\r\nimport { DayEventPageComponent } from './pages/day-event-page/day-event-page.component';\r\nimport { DayInfoFormComponent } from './components/day-info-form/day-info-form.component';\r\nimport { DashboardComponent } from './pages/dashboard/dashboard.component';\r\nimport { DriverLogsPageComponent } from './pages/driver-logs-page/driver-logs-page.component';\r\nimport { DriversListComponent } from './components/drivers-list/drivers-list.component';\r\nimport { SortTableComponent } from './components/sort-table/sort-table.component';\r\nimport { NgbdSortableHeader } from './components/sortable.directive';\r\nimport { DriversWorkdaysPageComponent } from './pages/drivers-workdays-page/drivers-workdays-page.component';\r\nimport { SortTableWorkdaysComponent } from './components/sort-table-workdays/sort-table-workdays.component';\r\nimport { ColumnsPageComponent } from './pages/columns-page/columns-page.component';\r\nimport { ColumnsListComponent } from './components/columns-list/columns-list.component';\r\nimport { ColumnCardComponent } from './components/column-card/column-card.component';\r\nimport { SortTableModalComponent } from './components/sort-table-modal/sort-table-modal.component';\r\nimport { ActiveDriversListComponent } from './components/active-drivers-list/active-drivers-list.component';\r\nimport { ActiveDriversPageComponent } from './pages/active-drivers-page/active-drivers-page.component';\r\nimport { GoInfoComponent } from './components/go-info/go-info.component';\r\nimport { OrdersPageComponent } from './pages/orders-page/orders-page.component';\r\nimport { OrdersFilterComponent } from './components/orders-filter/orders-filter.component';\r\nimport { OrderFormComponent } from './components/order-form/order-form.component';\r\nimport { GooglePlaceModule } from 'ngx-google-places-autocomplete';\r\nimport { StartOrderFormComponent } from './components/start-order-form/start-order-form.component';\r\nimport { EndOrderFormComponent } from './components/end-order-form/end-order-form.component';\r\nimport { OrderEventPageComponent } from './pages/order-event-page/order-event-page.component';\r\nimport { OrderInfoFormComponent } from './components/order-info-form/order-info-form.component';\r\nimport { GoOrderInfoComponent } from './components/go-order-info/go-order-info.component';\r\nimport { NavigationPageComponent } from './pages/navigation-page/navigation-page.component';\r\nimport { EconomicPageComponent } from './pages/economic-page/economic-page.component';\r\nimport { EconomicTableComponent } from './components/economic-table/economic-table.component';\r\nimport { ClientUpdateModalComponent } from './components/client-update-modal/client-update-modal.component';\r\nimport { EproductEditPageComponent } from './pages/eproduct-edit-page/eproduct-edit-page.component';\r\nimport { EproductsPageComponent } from './pages/eproducts-page/eproducts-page.component';\r\nimport { EproductListComponent } from './components/eproduct-list/eproduct-list.component';\r\nimport { EproductFormComponent } from './components/eproduct-form/eproduct-form.component';\r\nimport { CoreModule } from '../core/core.module';\r\nimport { ParkedTripsModalComponent } from './components/parked-trips-modal/parked-trips-modal.component';\r\nimport { DeletedTripsPageComponent } from './pages/deleted-trips-page/deleted-trips-page.component';\r\nimport { DeletetedTripsListComponent } from './components/deleteted-trips-list/deleteted-trips-list.component';\r\nimport { TripNavigationPageComponent } from './pages/trip-navigation-page/trip-navigation-page.component';\r\nimport { ModalModule } from 'ngx-bootstrap/modal';\r\nimport { OfficeNoteFormComponent } from './components/office-note-form/office-note-form.component';\r\nimport { OfficeAddressFormComponent } from './components/office-address-form/office-address-form.component';\r\nimport { TemplatesPageComponent } from './pages/templates-page/templates-page.component';\r\nimport { CreateTemplatePageComponent } from './pages/create-template-page/create-template-page.component';\r\nimport { TemplatesListComponent } from './components/templates-list/templates-list.component';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NotesInfoModalComponent } from './components/notes-info-modal/notes-info-modal.component';\r\nimport { TripChangeDriverModalComponent } from './components/trip-change-driver-modal/trip-change-driver-modal.component';\r\nimport { CommentphotosFormComponent } from './components/commentphotos-form/commentphotos-form.component';\r\nimport { FileUploaderComponent } from './components/file-uploader/file-uploader.component';\r\nimport { SortTable1Component } from './components/sort-table1/sort-table1.component';\r\nimport { SortTablePaginationComponent } from './components/sort-table-pagination/sort-table-pagination.component';\r\nimport { EconomicTable1Component } from './components/economic-table1/economic-table1.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n GoPageComponent,\r\n TripSettingsPageComponent,\r\n TripEventPageComponent,\r\n VehicleFormComponent,\r\n VehicleListComponent,\r\n VehiclePageComponent,\r\n VehicleCreatePageComponent,\r\n TrailerFormComponent,\r\n TrailerCreatePageComponent,\r\n TrailerListComponent,\r\n TrailerPageComponent,\r\n StartDayFormComponent,\r\n StartTripFormComponent,\r\n EndDayFormComponent,\r\n TripSettingsComponent,\r\n TripInfoFormComponent,\r\n EndTripFormComponent,\r\n AccessoryPageComponent,\r\n AccessoryCreatePageComponent,\r\n AccessoryFormComponent,\r\n AccessoryListComponent,\r\n CleaningPageComponent,\r\n CleaningCreatePageComponent,\r\n CleaningListComponent,\r\n CleaningFormComponent,\r\n ActivePauseComponent,\r\n ProductPageComponent,\r\n ProductCreatePageComponent,\r\n ProductFormComponent,\r\n ProductListComponent,\r\n CompanyPageComponent,\r\n CompanyCreatePageComponent,\r\n CompanyListComponent,\r\n CompanyFormComponent,\r\n DayHistoryPageComponent,\r\n DayTimelineComponent,\r\n TripHistoryPageComponent,\r\n TripTimelineComponent,\r\n ModelCardComponent,\r\n DayEventPageComponent,\r\n DayInfoFormComponent,\r\n DashboardComponent,\r\n DriverLogsPageComponent,\r\n DriversListComponent,\r\n SortTableComponent,\r\n NgbdSortableHeader,\r\n DriversWorkdaysPageComponent,\r\n SortTableWorkdaysComponent,\r\n ColumnsPageComponent,\r\n ColumnsListComponent,\r\n ColumnCardComponent,\r\n SortTableModalComponent,\r\n ActiveDriversListComponent,\r\n ActiveDriversPageComponent,\r\n GoInfoComponent,\r\n OrdersPageComponent,\r\n OrdersFilterComponent,\r\n OrderFormComponent,\r\n StartOrderFormComponent,\r\n EndOrderFormComponent,\r\n OrderEventPageComponent,\r\n OrderInfoFormComponent,\r\n GoOrderInfoComponent,\r\n NavigationPageComponent,\r\n EconomicPageComponent,\r\n EconomicTableComponent,\r\n ClientUpdateModalComponent,\r\n EproductEditPageComponent,\r\n EproductsPageComponent,\r\n EproductListComponent,\r\n EproductFormComponent,\r\n ParkedTripsModalComponent,\r\n EproductFormComponent,\r\n DeletedTripsPageComponent,\r\n DeletetedTripsListComponent,\r\n TripNavigationPageComponent,\r\n OfficeNoteFormComponent,\r\n OfficeAddressFormComponent,\r\n TemplatesPageComponent,\r\n CreateTemplatePageComponent,\r\n TemplatesListComponent,\r\n NotesInfoModalComponent,\r\n TripChangeDriverModalComponent,\r\n CommentphotosFormComponent,\r\n FileUploaderComponent,\r\n SortTable1Component,\r\n SortTablePaginationComponent,\r\n EconomicTable1Component,\r\n ],\r\n imports: [\r\n GooglePlaceModule,\r\n CommonModule,\r\n SharedModule,\r\n CoreModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n ModalModule.forRoot(),\r\n NzButtonModule,\r\n ],\r\n providers: [DecimalPipe, DatePipe],\r\n exports: [\r\n GoPageComponent,\r\n TripSettingsPageComponent,\r\n TripEventPageComponent,\r\n VehiclePageComponent,\r\n VehicleCreatePageComponent,\r\n TrailerCreatePageComponent,\r\n TrailerPageComponent,\r\n AccessoryPageComponent,\r\n AccessoryCreatePageComponent,\r\n CleaningPageComponent,\r\n CleaningCreatePageComponent,\r\n ProductPageComponent,\r\n ProductCreatePageComponent,\r\n CompanyPageComponent,\r\n CompanyCreatePageComponent,\r\n DayHistoryPageComponent,\r\n TripHistoryPageComponent,\r\n DayEventPageComponent,\r\n DashboardComponent,\r\n DriverLogsPageComponent,\r\n DriversWorkdaysPageComponent,\r\n ClientUpdateModalComponent,\r\n ParkedTripsModalComponent,\r\n ],\r\n})\r\nexport class TruckModule {}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot, UrlTree } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { AuthRepository } from \"./state/auth.repository\";\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AuthGuard implements CanActivate, CanActivateChild {\r\n constructor(\r\n private router: Router,\r\n private authRepo: AuthRepository\r\n ) { }\r\n\r\n canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n return this.canActivate(childRoute, state);\r\n }\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n if (!this.authRepo.isAuthenticated()) {\r\n // not logged in so redirect to login page with the return url\r\n this.router.navigate(['signin'], { queryParams: { returnUrl: state.url } });\r\n return false;\r\n }\r\n let allowedRoles = route.data.authorize || [];\r\n if (!allowedRoles.length) {\r\n // authorized and a specific role is not required - allow to proceed\r\n return true;\r\n }\r\n if (!Array.isArray(allowedRoles)) {\r\n allowedRoles = [allowedRoles];\r\n }\r\n for (let role of allowedRoles) {\r\n if (this.authRepo.isInRole(role)) {\r\n // authorized and has at least one role that allows to view the route\r\n return true;\r\n }\r\n }\r\n this.router.navigate(['unauthorized']);\r\n return false;\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\n\r\n@Component({\r\n selector: 'app-footerinfo',\r\n templateUrl: './footerinfo.component.html',\r\n styleUrls: ['./footerinfo.component.scss']\r\n})\r\nexport class FooterinfoComponent implements OnInit {\r\n year = new Date().getFullYear();\r\n\r\n constructor(public env: EnvState) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","\r\n
    \r\n
    \r\n\r\n \r\n {{ year }} {{ env.name }}\r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({ name: 'join' })\r\nexport class JoinPipe implements PipeTransform {\r\n transform(input: any[] | null | undefined, separator = ', '): string {\r\n return input?.filter(x => x).join(separator) || '';\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { UserRoles } from \"src/app/state/auth.repository\";\r\n\r\nexport const ROLE_NAMES = {\r\n [UserRoles.Superamin]: $localize `:Role - Superadmin:Superadmin`,\r\n [UserRoles.TenantAdmin]: $localize `:Role - Administrator:Administrator`,\r\n [UserRoles.Driver]: $localize `:Role - Driver:Driver`,\r\n};\r\n\r\n@Pipe({ name: 'translateRoles' })\r\nexport class TranslateRolesPipe implements PipeTransform {\r\n transform(input: UserRoles[] | null | undefined): string[] | undefined {\r\n return input?.map(x => ROLE_NAMES[x]);\r\n }\r\n}\r\n","
    \r\n \r\n\r\n\r\n
    \r\n
    \r\n {{ name }}\r\n
    \r\n

    {{ repo.roles$ | async | translateRoles | join }}

    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n{{ repo.email$ | async }}","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\n\r\n@Component({\r\n selector: 'app-user-card',\r\n templateUrl: './user-card.component.html',\r\n styleUrls: ['./user-card.component.scss']\r\n})\r\nexport class UserCardComponent implements OnInit {\r\n readonly DEFAULT_IMAGE = 'assets/img/user_default.svg';\r\n\r\n @Input() size: 'sm' | 'md' | 'lg' = 'lg';\r\n @Input() preventClick = false;\r\n @Output() profileClick = new EventEmitter();\r\n\r\n constructor(public repo: AuthRepository) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\n\r\n@Component({\r\n selector: 'app-logo',\r\n templateUrl: './logo.component.html',\r\n styleUrls: ['./logo.component.scss']\r\n})\r\nexport class LogoComponent implements OnInit {\r\n\r\n constructor(public env: EnvState) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","

    \r\n \r\n \r\n \r\n

    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UiRepository } from 'src/app/state/ui.repository';\r\n\r\n@Component({\r\n selector: 'app-headermenu',\r\n templateUrl: './headermenu.component.html',\r\n styleUrls: ['./headermenu.component.scss']\r\n})\r\nexport class HeadermenuComponent implements OnInit {\r\n \r\n constructor(public repo: UiRepository) { }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n}\r\n","
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    ","import { Injectable } from \"@angular/core\";\r\nimport { createStore } from \"@ngneat/elf\";\r\nimport { selectAllEntities, upsertEntities, withEntities } from \"@ngneat/elf-entities\";\r\nimport { createRequestsCacheOperator, createRequestsStatusOperator, selectRequestStatus, updateRequestCache, updateRequestsStatus, withRequestsCache, withRequestsStatus } from \"@ngneat/elf-requests\";\r\nimport { map, MonoTypeOperatorFunction } from \"rxjs\";\r\nimport { SortOption } from \"../modules/shared/pipes/sort.pipe\";\r\n\r\nexport interface Feature {\r\n id: string;\r\n name: string;\r\n createdAt: Date;\r\n}\r\n\r\nexport const featureSortOptions: SortOption[] = [\r\n { label: $localize `:Sort label Name:Name`, property: 'name' },\r\n { label: $localize `:Sort label Date:Date`, property: 'createdAt' }\r\n];\r\n\r\nexport enum TenantFeatures {\r\n Accessory = \"Accessories\",\r\n Cleaning = \"Cleanings\",\r\n Note = \"Note\",\r\n Products = \"Products\",\r\n Reference = \"Reference\",\r\n Vendor = \"Vendor\",\r\n ContactPerson = \"ContactPerson\",\r\n Order = \"Order\",\r\n Economic = \"E-conomic\",\r\n EconomicOrder = \"EconomicOrder\"\r\n}\r\n\r\nconst store = createStore(\r\n { name: 'features' },\r\n withEntities(),\r\n withRequestsCache(),\r\n withRequestsStatus()\r\n);\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class FeatureRepository {\r\n\r\n constructor() { }\r\n\r\n private trackOperator = createRequestsStatusOperator(store);\r\n private skipOperator = createRequestsCacheOperator(store);\r\n\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(store.name),\r\n map(x => x.value === 'pending')\r\n );\r\n\r\n all$ = store.pipe(selectAllEntities());\r\n\r\n set(models: Feature[]): void {\r\n store.update(\r\n updateRequestCache(store.name),\r\n upsertEntities(models),\r\n updateRequestsStatus([store.name], 'success')\r\n );\r\n }\r\n\r\n track(): MonoTypeOperatorFunction {\r\n return this.trackOperator(store.name);\r\n }\r\n\r\n skipWhileCached(): MonoTypeOperatorFunction {\r\n return this.skipOperator(store.name);\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { createStore, select, withProps } from '@ngneat/elf';\r\nimport { updateRequestsStatus, withRequestsCache, withRequestsStatus, createRequestsStatusOperator, selectRequestStatus } from '@ngneat/elf-requests';\r\nimport { map } from 'rxjs';\r\n\r\nexport type StatiscticsPeriods = 'day' | 'week' | 'month';\r\n\r\nexport interface TruckStatistics {\r\n activeDrivers?: number | null;\r\n trips: number;\r\n unloadedProducts: number;\r\n}\r\n\r\nexport interface StatisticsProps {\r\n day?: TruckStatistics;\r\n week?: TruckStatistics;\r\n month?: TruckStatistics;\r\n dayOwn?: TruckStatistics;\r\n weekOwn?: TruckStatistics;\r\n monthOwn?: TruckStatistics;\r\n}\r\n\r\nconst store = createStore(\r\n { name: 'statistics' }, \r\n withProps({}), \r\n withRequestsCache(), \r\n withRequestsStatus()\r\n);\r\nexport const trackStatsRequestsStatus = createRequestsStatusOperator(store);\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class StatisticsRepository {\r\n name = store.name;\r\n isLoading$ = (period: StatiscticsPeriods) => store.pipe(\r\n selectRequestStatus(`${this.name}_${period}`),\r\n map(x => x.value === 'pending')\r\n );\r\n isDayLoading$ = this.isLoading$('day');\r\n isWeekLoading$ = this.isLoading$('week');\r\n isMonthLoading$ = this.isLoading$('month');\r\n\r\n one = (period: StatiscticsPeriods | 'dayOwn' | 'weekOwn' | 'monthOwn') => store.pipe(\r\n select(state => state[period])\r\n );\r\n day$ = this.one('day');\r\n week$ = this.one('week');\r\n month$ = this.one('month');\r\n dayOwn$ = this.one('dayOwn');\r\n weekOwn$ = this.one('weekOwn');\r\n monthOwn$ = this.one('monthOwn');\r\n\r\n set(period: StatiscticsPeriods, stats: TruckStatistics, isOwn = false) {\r\n let prop = period;\r\n if (isOwn) {\r\n prop += 'Own';\r\n }\r\n store.update((state) => ({\r\n ...state,\r\n [prop]: stats\r\n }));\r\n store.update(\r\n updateRequestsStatus([`${this.name}_${period}${isOwn ? '_own' : ''}`], 'success')\r\n );\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { catchError, tap } from \"rxjs\";\r\nimport { StatiscticsPeriods, StatisticsRepository, trackStatsRequestsStatus, TruckStatistics } from \"./statistics.repository\";\r\n\r\nconst API = '/api/statistics';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class StatisticsService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n private repo: StatisticsRepository\r\n ) { }\r\n\r\n load(period: StatiscticsPeriods, onlyOwnStats = false) {\r\n return this.http\r\n .get(`${API}/${period}${onlyOwnStats ? '?isOnlyOwn=true' : ''}`)\r\n .pipe(\r\n tap(stats => this.repo.set(period, stats, onlyOwnStats)),\r\n trackStatsRequestsStatus(`${this.repo.name}_${period}${onlyOwnStats ? '_own' : ''}`) \r\n );\r\n }\r\n}","
    \r\n Close Menu\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Dashboard
      \r\n \r\n
    • \r\n \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Go
      \r\n \r\n
    • \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Time log
      \r\n \r\n
    • \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Trips log
      \r\n \r\n
    • \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Trip settings
      \r\n \r\n
    • \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Tenants
      \r\n \r\n
    • \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Users
      \r\n \r\n
    • \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      \r\n Driver logs(Trips log)\r\n
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      \r\n Driver logs(Trips log) - Parked\r\n
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Economic
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Products
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      \r\n Driver logs(Time log)\r\n
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Vehicles
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Trailers
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Accessories
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Cleanings
      \r\n \r\n \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      News
      \r\n \r\n
    • \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Products
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Clients
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Vendors
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Columns order
      \r\n \r\n \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      Templates
      \r\n \r\n \r\n \r\n
    • \r\n \r\n
      \r\n \r\n
      \r\n
      Logout
      \r\n \r\n \r\n
      \r\n \r\n
      \r\n
      \r\n Stop impersonating\r\n
      \r\n \r\n
    • \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Subscription, switchMap } from 'rxjs';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\nimport { TenantFeatures } from 'src/app/state/feature.repository';\r\nimport { StatisticsService } from 'src/app/state/statistics.service';\r\nimport { UiRepository } from 'src/app/state/ui.repository';\r\n\r\n@Component({\r\n selector: 'app-sidebar',\r\n templateUrl: './sidebar.component.html',\r\n styleUrls: ['./sidebar.component.scss']\r\n})\r\nexport class SidebarComponent implements OnInit {\r\n TenantFeatures = TenantFeatures;\r\n features = this.env.features;\r\n \r\n constructor(\r\n private auth: AuthService,\r\n public repo: AuthRepository,\r\n public ui: UiRepository,\r\n private router: Router,\r\n public env: EnvState,\r\n private service: StatisticsService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n \r\n \r\n menuclose() {\r\n this.ui.toggleMenuOpened(false);\r\n }\r\n\r\n logout() {\r\n this.menuclose(); \r\n this.auth.logout().subscribe(() => this.router.navigate(['/signin'])); \r\n return false; // prevent default\r\n }\r\n\r\n unimpersonate() {\r\n this.menuclose();\r\n this.auth.unimpersonate().subscribe(() => {\r\n this.service\r\n .load('day')\r\n .pipe(\r\n switchMap(() => this.service.load('week')),\r\n switchMap(() => this.service.load('month'))\r\n )\r\n .subscribe();\r\n this.router.navigate(['/'])\r\n });\r\n return false; // prevent default\r\n }\r\n\r\n toggleDarkMode() {\r\n this.menuclose();\r\n this.ui.toggleDarkMode();\r\n return false; // prevent default\r\n }\r\n}\r\n","import { Component, OnInit, HostListener } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-apphomelayout',\r\n templateUrl: './apphomelayout.component.html',\r\n styleUrls: ['./apphomelayout.component.scss']\r\n})\r\nexport class ApphomelayoutComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n @HostListener('window:scroll', [])\r\n onWindowScroll() {\r\n let header = document.getElementsByTagName('app-headermenu')[0];\r\n let main = document.getElementsByTagName('html')[0];\r\n\r\n if (main.scrollTop > 15 ) { \r\n header.classList.add('active'); \r\n } else{\r\n header.classList.remove('active');\r\n }\r\n }\r\n\r\n}\r\n","\r\n\r\n\r\n\r\n\r\n\r\n
    \r\n\r\n \r\n \r\n \r\n\r\n \r\n
    \r\n \r\n
    \r\n \r\n\r\n \r\n \r\n \r\n\r\n
    \r\n\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-headerback',\r\n templateUrl: './headerback.component.html',\r\n styleUrls: ['./headerback.component.scss']\r\n})\r\nexport class HeaderbackComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n backnav() {\r\n window.history.back();\r\n return false;\r\n }\r\n\r\n\r\n}\r\n","
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    ","import { Component, OnInit, HostListener, Renderer2 } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-appinnerlayout',\r\n templateUrl: './appinnerlayout.component.html',\r\n styleUrls: ['./appinnerlayout.component.scss']\r\n})\r\nexport class AppinnerlayoutComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n @HostListener('window:scroll', [])\r\n onWindowScroll() {\r\n let header = document.getElementsByTagName('app-headerback')[0];\r\n let main = document.getElementsByTagName('html')[0];\r\n\r\n if (main.scrollTop > 15 ) { \r\n header.classList.add('active'); \r\n }else{\r\n header.classList.remove('active');\r\n }\r\n }\r\n\r\n}\r\n\r\n","\r\n
    \r\n\r\n \r\n \r\n \r\n\r\n \r\n
    \r\n\r\n \r\n\r\n
    \r\n \r\n\r\n
    \r\n\r\n\r\n\r\n\r\n ","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-authlayout',\r\n templateUrl: './authlayout.component.html',\r\n styleUrls: ['./authlayout.component.scss']\r\n})\r\nexport class AuthlayoutComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    ","import { Directive, HostBinding, Input } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\n\r\n@Directive({\r\n selector: '[appValidateState]'\r\n})\r\nexport class ValidateStateDirective {\r\n @Input() appValidateState: AbstractControl | null = null;\r\n\r\n @HostBinding('class.is-valid')\r\n get isValid(): boolean {\r\n return !!this.appValidateState \r\n && this.appValidateState.touched \r\n && this.appValidateState.valid;\r\n }\r\n\r\n @HostBinding('class.is-invalid')\r\n get isInvalid(): boolean {\r\n return !!this.appValidateState \r\n && this.appValidateState.touched \r\n && !this.appValidateState.valid;\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n \r\n

    Forgot your password?

    \r\n

    Please provide your
    registered email address

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n

    \r\n \r\n \r\n

    \r\n

    We received your request. If your email address is registered, you will receive a letter with password reset instructions. Please also check the spam folder.

    \r\n

    An error occured while completing your request. Please try again in a moment or contact the support if the problem persists.

    \r\n
    \r\n
    \r\n","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { Router } from '@angular/router';\r\nimport { filter, Subscription } from 'rxjs';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\n\r\n@Component({\r\n selector: 'app-forgetpassword',\r\n templateUrl: './forgetpassword.component.html',\r\n styleUrls: ['./forgetpassword.component.scss']\r\n})\r\nexport class ForgetpasswordComponent implements OnInit, OnDestroy {\r\n form = this.formBuilder.group({\r\n email: ['', [Validators.email, Validators.required]]\r\n });\r\n state: 'idle' | 'processing' | 'error' | 'success' = 'idle';\r\n\r\n authSubscription?: Subscription;\r\n\r\n constructor(\r\n private auth: AuthService,\r\n private repo: AuthRepository,\r\n private router: Router,\r\n private formBuilder: UntypedFormBuilder,\r\n public env: EnvState\r\n ) { }\r\n\r\n ngOnDestroy(): void {\r\n this.authSubscription?.unsubscribe();\r\n }\r\n\r\n ngOnInit(): void { \r\n this.authSubscription = this.repo.isAuthenticated$.pipe(\r\n filter(x => x)\r\n ).subscribe(() => this.router.navigateByUrl(\"/\"));\r\n }\r\n\r\n reset(): void {\r\n this.state = 'processing';\r\n this.auth.forgot(\r\n this.form.value.email\r\n ).subscribe({\r\n complete: () => this.state = 'success', \r\n error: () => this.state = 'error' \r\n });\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-pagenotauthorized',\r\n templateUrl: './pagenotauthorized.component.html',\r\n styleUrls: ['./pagenotauthorized.component.scss']\r\n})\r\nexport class PagenotauthorizedComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n

    Unauthorized

    \r\n

    You do not have access to this page. Please try signing in with another account or contact site administrator.

    \r\n\r\n Back to Home\r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-pagenotfound',\r\n templateUrl: './pagenotfound.component.html',\r\n styleUrls: ['./pagenotfound.component.scss']\r\n})\r\nexport class PagenotfoundComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n
    \r\n \"\"\r\n
    \r\n

    Oops!...

    \r\n

    Page not found

    \r\n

    The page you are looking for is not found or removed. Please try again sometime or go back to home page.

    \r\n\r\n Back to Home\r\n
    \r\n
    \r\n","import { Injectable } from '@angular/core';\r\n\r\nimport {\r\n sortBy,\r\n SortOption,\r\n SortState,\r\n} from 'src/app/modules/shared/pipes/sort.pipe';\r\nimport { UserRoles } from './auth.repository';\r\nimport { BaseRepository, SortProps } from './abstract/base.repository';\r\nimport { withPagination } from '@ngneat/elf-pagination';\r\n\r\nexport interface User {\r\n id: string;\r\n email: string;\r\n phoneNumber: string;\r\n name: string;\r\n surname: string;\r\n title: string;\r\n location: string;\r\n birthday?: Date;\r\n tenantId?: string;\r\n createdAt: Date;\r\n image: File | null;\r\n imagePath: string;\r\n roles: UserRoles[];\r\n vehicleId: string;\r\n vehicleName: string;\r\n trailerId: string;\r\n trailerName: string;\r\n deletedAt?: string;\r\n}\r\n\r\nexport interface UserSelectDto {\r\n id: string;\r\n email: string;\r\n name: string;\r\n surname: string;\r\n}\r\n\r\nexport const userSortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Name:Name`, property: 'name' },\r\n { label: $localize`:Sort label Surname:Surname`, property: 'surname' },\r\n { label: $localize`:Sort label Date:Date`, property: 'createdAt' },\r\n];\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UsersRepository extends BaseRepository {\r\n constructor() {\r\n super('users', userSortOptions);\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { PaginationData } from '@ngneat/elf-pagination';\r\nimport { combineLatest, Observable, of } from 'rxjs';\r\nimport { map, switchMap, tap } from 'rxjs/operators';\r\nimport {\r\n BaseService,\r\n DEFAULT_ENTITIES_PER_PAGE,\r\n} from './abstract/base.service';\r\nimport { User, UserSelectDto, UsersRepository } from './users.repository';\r\n\r\nconst API = '/api/users';\r\nconst USER_SUMMARY_API = '/api/usersSummary';\r\nexport type UserCreateUpdateDto = Partial & { password?: string };\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UsersService extends BaseService {\r\n constructor(http: HttpClient, repo: UsersRepository) {\r\n super(API, http, repo);\r\n }\r\n\r\n loadDriversForSelect() {\r\n return this.http.get(`${USER_SUMMARY_API}/allforselect`);\r\n }\r\n\r\n loadDrivers(): Observable {\r\n return this.http\r\n .get>(`/api/usersSummary/alldivers`)\r\n .pipe(this.repo.track());\r\n }\r\n\r\n loadDriversDeleted(): Observable {\r\n return this.http\r\n .get>(`/api/usersSummary/alldivers/deleted`)\r\n .pipe(\r\n tap((res: any) => this.repo.setDeleted(res)),\r\n this.repo.trackDeleted()\r\n );\r\n }\r\n\r\n loadDriversForOrder(): Observable {\r\n return this.http.get(`/api/orders/alldrivers`).pipe(\r\n tap((res) => this.repo.set(res)),\r\n this.repo.track()\r\n );\r\n }\r\n\r\n loadDriversForPage(driverIds?: string[]): Observable {\r\n return this.http.patch('/api/orders/loaddrivers', driverIds);\r\n }\r\n\r\n loadDriversPage(\r\n page: number,\r\n take: number = DEFAULT_ENTITIES_PER_PAGE\r\n ): Observable {\r\n const sortOrder = this.repo.getSort();\r\n const query = [\r\n `page=${page}`,\r\n `take=${take}`,\r\n `sort=${sortOrder.parameter.property}`,\r\n `direction=${sortOrder.direction}`,\r\n ];\r\n this.repo.setPage(page);\r\n return this.http\r\n .get(\r\n `${API}/drivers?${query.join('&')}`\r\n )\r\n .pipe(\r\n tap((res) => this.repo.addPage(res)),\r\n this.repo.track(),\r\n this.repo.skipWhilePageCached(page)\r\n );\r\n }\r\n\r\n reloadDriversPage(\r\n defaultTake: number = DEFAULT_ENTITIES_PER_PAGE\r\n ): Observable<(PaginationData & { data: User[] }) | null> {\r\n const data = this.repo.getPaginationData();\r\n if (data && Object.keys(data.pages).length) {\r\n this.repo.clearPages();\r\n return this.loadDriversPage(data.currentPage, data.perPage);\r\n }\r\n return this.loadDriversPage(1, defaultTake);\r\n }\r\n\r\n add(user: UserCreateUpdateDto) {\r\n const formData = new FormData();\r\n formData.append('file', user.image!);\r\n\r\n return this.http.post(API, user).pipe(\r\n tap((user) => this.repo.upsert(user)),\r\n switchMap((user) =>\r\n this.http.post(`${API}/${user.id}/file`, formData)\r\n ),\r\n this.tapReloadPage(),\r\n this.repo.track('add')\r\n );\r\n }\r\n\r\n update(id: string, model: Partial) {\r\n return this.http.patch(`${API}/${id}`, model).pipe(\r\n tap((user) => this.repo.upsert(user)),\r\n switchMap((user) => {\r\n if (model.image) {\r\n const formData = new FormData();\r\n formData.append('file', model.image);\r\n return this.http.post(`${API}/${id}/file`, formData);\r\n }\r\n return of(user);\r\n }),\r\n this.repo.trackOne(id)\r\n );\r\n }\r\n\r\n reloadPage(\r\n defaultTake: number = DEFAULT_ENTITIES_PER_PAGE\r\n ): Observable<(PaginationData & { data: User[] }) | null> {\r\n const data = this.repo.getPaginationData();\r\n if (data && Object.keys(data.pages).length) {\r\n this.repo.clearPages();\r\n return this.loadPage(data.currentPage, data.perPage);\r\n }\r\n return this.loadPage(1, defaultTake);\r\n }\r\n\r\n protected tapReloadPage() {\r\n return switchMap((sourceResponse: R) =>\r\n combineLatest([of(sourceResponse), this.reloadPage()]).pipe(\r\n map(([res, _]) => res)\r\n )\r\n );\r\n }\r\n\r\n delete(id: string): Observable {\r\n return this.http.delete(`${API}/${id}`).pipe(\r\n tap(() => this.repo.remove(id)),\r\n this.tapReloadPage(),\r\n this.repo.trackOne(id)\r\n );\r\n }\r\n}\r\n","
    \r\n
    \r\n
    {{ title }}
    \r\n

    {{ error }}

    \r\n
    \r\n
    ","import { Component, Input, OnInit } from '@angular/core';\r\n\r\nconst DEFAULT_ERROR = $localize `:Unknown error message in Angular UI:An error occured while completing your request. Please try again in a moment or contact the support if the problem persists.`;\r\n\r\n@Component({\r\n selector: 'app-error-alert',\r\n templateUrl: './error-alert.component.html',\r\n styleUrls: ['./error-alert.component.scss']\r\n})\r\nexport class ErrorAlertComponent implements OnInit {\r\n parsedErrors: string[] = [];\r\n\r\n @Input() title: string = '';\r\n @Input() set errors(value: any) {\r\n this.parsedErrors = this.parse(value);\r\n } \r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n private parse(value: any): string[] {\r\n if (!value) {\r\n return [];\r\n }\r\n if (typeof value.error === 'string') {\r\n return [value.error];\r\n }\r\n if (typeof value.errors === 'string') {\r\n return [value.errors];\r\n }\r\n for (const errorArray of [ value, value.error, value.errors, value.error?.errors ]) {\r\n if (Array.isArray(errorArray)) {\r\n const parsed = this.parseErrorsArray(errorArray);\r\n if (parsed.length) {\r\n return parsed;\r\n }\r\n }\r\n }\r\n return [ DEFAULT_ERROR ];\r\n }\r\n\r\n private parseErrorsArray(value: any[]): string[] {\r\n return value.map(e => {\r\n if (typeof e === 'string') {\r\n return e;\r\n }\r\n if (e && typeof e.description === 'string') {\r\n return e.description as string;\r\n }\r\n return '';\r\n }).filter(x => !!x);\r\n }\r\n\r\n}\r\n","
    \r\n \r\n \r\n \r\n {{ option.label }}\r\n \r\n (Inactive)
    \r\n {{ option.sublabel }}\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n} from '@angular/core';\r\nimport { ChangeDetectorRef } from '@angular/core';\r\nimport {\r\n BehaviorSubject,\r\n Observable,\r\n Subject,\r\n firstValueFrom,\r\n isObservable,\r\n} from 'rxjs';\r\n\r\nvar _appDatalistSelectNextId = 0;\r\n\r\nexport type DatalistOption = {\r\n label: string;\r\n sublabel?: string;\r\n value: any;\r\n isDeleted?: boolean;\r\n isActive?: boolean;\r\n};\r\n\r\nconst DELETED_RECORD = $localize`:Dropdown label for a deleted options:[Deleted record]`;\r\nconst NOT_AVIABLE_RECORD = $localize`:Dropdown label for not aviable options:[Not aviable record]`;\r\nconst NOT_AVIABLE_RECORD_SUBTITLE = $localize`:Dropdown description for not aviable options:This option has different tenant or not aviable for you`;\r\nconst DELETED_RECORD_SUBTITLE = $localize`:Dropdown description for a deleted options:This option has been removed from the database`;\r\n\r\ndeclare const Zone: any;\r\n\r\n@Component({\r\n selector: 'app-datalist-select',\r\n templateUrl: './datalist-select.component.html',\r\n styleUrls: ['./datalist-select.component.scss'],\r\n})\r\nexport class DatalistSelectComponent implements OnInit {\r\n sub$: Subject = new BehaviorSubject(false);\r\n subS: any;\r\n @Input() multiple = false;\r\n @Input() activeValue: any | undefined;\r\n @Output() activeValueChange: EventEmitter = new EventEmitter();\r\n @Input() isDisabled: boolean | false = false;\r\n @Input() label: string | undefined;\r\n @Input() isCompanies: boolean = false;\r\n @Input() set options(val: DatalistOption[] | null) {\r\n this.optionsForCalc = val ?? [];\r\n if (\r\n val\r\n ?.map((f) => f.value)\r\n .some((g) => !this.test?.map((f) => f.value).includes(g)) ||\r\n this.test\r\n ?.map((f) => f.value)\r\n .some((g) => !val?.map((f) => f.value).includes(g)) ||\r\n val?.length == 0\r\n ) {\r\n this.testF();\r\n }\r\n }\r\n @Input() optionsDeleted: DatalistOption[] | null = [];\r\n @Input() width?: string = '100%';\r\n @Input() maxW?: string = '100%';\r\n @Output() clear: EventEmitter = new EventEmitter();\r\n @Input() isExported: boolean | undefined = false;\r\n\r\n prevB: any;\r\n checkCounter: number = 0;\r\n\r\n id = `appDatalistSelect_${_appDatalistSelectNextId++}`;\r\n\r\n constructor(private ref: ChangeDetectorRef) {}\r\n\r\n test: DatalistOption[] | null = [];\r\n optionsForCalc: DatalistOption[] = [];\r\n firstLoad: boolean = true;\r\n\r\n async delay(ms: number) {\r\n await new Promise((resolve) =>\r\n setTimeout(() => {\r\n if (this.checkCounter <= 20) {\r\n this.testF();\r\n this.checkCounter = this.checkCounter + 1;\r\n }\r\n }, ms)\r\n ).then();\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n prev: any;\r\n\r\n ngAfterViewInit() {\r\n setTimeout(() => {\r\n this.testF();\r\n }, 100);\r\n this.firstLoad = false;\r\n }\r\n\r\n testF() {\r\n this.test = [];\r\n if (!this.activeValue) {\r\n this.activeValue = undefined;\r\n } else {\r\n const values: any[] = this.multiple\r\n ? this.activeValue\r\n : [this.activeValue];\r\n\r\n // If any deleted/unknown value are pre-selected,\r\n // we display them in the list as such.\r\n if (\r\n this.optionsDeleted &&\r\n this.optionsDeleted.some((x) => values.includes(x.value))\r\n ) {\r\n values.forEach((value) => {\r\n if (!this.optionsForCalc?.find((x) => x.value === value)) {\r\n var delOption = this.optionsDeleted?.find(\r\n (f: any) => f.value == value\r\n );\r\n\r\n if (delOption) {\r\n this.optionsForCalc?.unshift({\r\n value,\r\n label: delOption.label,\r\n sublabel: !delOption.isDeleted\r\n ? DELETED_RECORD_SUBTITLE\r\n : NOT_AVIABLE_RECORD_SUBTITLE,\r\n isDeleted: this.isExported ? false : true,\r\n });\r\n }\r\n }\r\n });\r\n } else {\r\n if (this.optionsForCalc) {\r\n this.optionsForCalc = this.optionsForCalc?.filter(\r\n (x) => !this.optionsDeleted?.map((f) => f.value).includes(x.value)\r\n );\r\n } else {\r\n this.test = [];\r\n }\r\n }\r\n }\r\n if (this.optionsForCalc && this.optionsForCalc.length > 0) {\r\n this.test = this.optionsForCalc;\r\n } else {\r\n this.test = [];\r\n }\r\n }\r\n}\r\n","
    \r\n
    \r\n
    \r\n
    Basic Information
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    Roles
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n
      \r\n
      \r\n
      \r\n \r\n \r\n
      \r\n
      \r\n
      \r\n
      {{ ROLE_NAMES[role] }}
      \r\n

      {{ ROLE_DESCRIPTIONS[role] }}

      \r\n
      \r\n
      \r\n
    • \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n","import { formatDate } from '@angular/common';\r\nimport {\r\n Component,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n Output,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n UntypedFormBuilder,\r\n UntypedFormGroup,\r\n NG_ASYNC_VALIDATORS,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { DatalistOption } from 'src/app/modules/shared/components/datalist-select/datalist-select.component';\r\nimport { ROLE_NAMES } from 'src/app/modules/shared/pipes/translate-roles.pipe';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { Tenant } from 'src/app/state/tenants.repository';\r\nimport { User } from 'src/app/state/users.repository';\r\nimport { UserCreateUpdateDto } from 'src/app/state/users.service';\r\n\r\n@Component({\r\n selector: 'app-user-basic-info-form',\r\n templateUrl: './user-basic-info-form.component.html',\r\n styleUrls: ['./user-basic-info-form.component.scss'],\r\n})\r\nexport class UserBasicInfoFormComponent implements OnInit {\r\n readonly ROLE_DESCRIPTIONS = {\r\n [UserRoles.Superamin]: $localize`:Role description - Superadmin:Can edit system data and create tenants`,\r\n [UserRoles.TenantAdmin]: $localize`:Role description - Administrator:Can view and edit all data inside a tenant`,\r\n [UserRoles.Driver]: $localize`:Role description - Driver:Can create trips`,\r\n };\r\n ROLE_NAMES = ROLE_NAMES;\r\n isSuperAdmin?: boolean;\r\n tenantOptions: DatalistOption[] | null = null;\r\n roleOptions: UserRoles[] = [];\r\n form?: UntypedFormGroup;\r\n file: File | null = null;\r\n\r\n @Input() initialValue?: User | null;\r\n @Input() set tenants(value: Tenant[] | null) {\r\n if (!value) {\r\n this.tenantOptions = null;\r\n } else {\r\n this.tenantOptions = value.map((x) => ({\r\n value: x.id,\r\n label: x.name,\r\n }));\r\n }\r\n }\r\n\r\n @Output() userSubmit = new EventEmitter();\r\n\r\n @HostListener('change', ['$event.target.files']) emitFiles(event: FileList) {\r\n if (this.form) {\r\n if ((event && event.item(0)) instanceof File) {\r\n this.file = event && event.item(0);\r\n this.form.value.picture = this.file;\r\n }\r\n }\r\n }\r\n\r\n updateValue(control: string, value: any) {\r\n const controlObject = this.form?.get(control);\r\n controlObject?.setValue(value);\r\n controlObject?.markAsTouched();\r\n }\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private authRepo: AuthRepository\r\n ) {\r\n if (this.authRepo.isInRole(UserRoles.Superamin)) {\r\n this.roleOptions = Object.values(UserRoles);\r\n } else if (this.authRepo.isInRole(UserRoles.TenantAdmin)) {\r\n this.roleOptions = Object.values(UserRoles).filter(\r\n (r) => r !== UserRoles.Superamin\r\n );\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n const birthday =\r\n this.initialValue && this.initialValue.birthday\r\n ? formatDate(this.initialValue.birthday, 'yyyy-MM-dd', 'en')\r\n : '';\r\n this.isSuperAdmin = this.initialValue?.roles[0] === 'Superadmin';\r\n this.form = this.formBuilder.group({\r\n name: [this.initialValue?.name || ''],\r\n surname: [this.initialValue?.surname || ''],\r\n email: [\r\n this.initialValue?.email,\r\n [Validators.required, Validators.email],\r\n ],\r\n phone: [this.initialValue?.phoneNumber || ''],\r\n picture: [this.initialValue?.image || ''],\r\n location: [this.initialValue?.location || ''],\r\n title: [this.initialValue?.title || ''],\r\n birthday: [birthday],\r\n password: ['', Validators.required],\r\n roles: this.formBuilder.array(\r\n this.roleOptions.map(\r\n (r) => this.initialValue && this.initialValue.roles.indexOf(r) >= 0\r\n )\r\n ),\r\n tenant: [this.initialValue?.tenantId || ''],\r\n });\r\n if (this.initialValue) {\r\n this.removeRequired(this.form?.controls['password']);\r\n }\r\n this.checkIfSuperAdmin();\r\n if (this.initialValue?.roles[0] === 'Superadmin') {\r\n this.removeRequired(this.form?.controls['tenant']);\r\n }\r\n if (!this.authRepo.isInRole(UserRoles.Superamin)) {\r\n this.removeRequired(this.form?.controls['tenant']);\r\n }\r\n }\r\n\r\n checkIfSuperAdmin() {\r\n this.addRequired(this.form?.controls['tenant']);\r\n this.form?.controls['roles'].valueChanges.subscribe((x) => {\r\n if (x[1] || x[2]) {\r\n this.addRequired(this.form?.controls['tenant']);\r\n } else if (x[1] && x[2]) {\r\n this.addRequired(this.form?.controls['tenant']);\r\n } else if (!x[0] && !x[1] && !x[2]) {\r\n this.addRequired(this.form?.controls['tenant']);\r\n } else if (x[0] && (x[1] || x[2])) {\r\n this.addRequired(this.form?.controls['tenant']);\r\n } else {\r\n this.removeRequired(this.form?.controls['tenant']);\r\n }\r\n });\r\n if (!this.authRepo.isInRole(UserRoles.Superamin)) {\r\n this.removeRequired(this.form?.controls['tenant']);\r\n }\r\n }\r\n\r\n addRequired(control: AbstractControl | undefined) {\r\n control?.addValidators(Validators.required);\r\n control?.updateValueAndValidity();\r\n }\r\n\r\n removeRequired(control: AbstractControl | undefined) {\r\n control?.removeValidators(Validators.required);\r\n control?.updateValueAndValidity();\r\n }\r\n\r\n onSubmit() {\r\n if (!this.authRepo.isInRole(UserRoles.Superamin)) {\r\n this.removeRequired(this.form?.controls['tenant']);\r\n }\r\n\r\n if (this.form && !this.form.valid) {\r\n this.form.markAllAsTouched();\r\n return;\r\n }\r\n const roles = (this.form?.value?.roles as boolean[])\r\n .map((x, i) => (x && this.roleOptions[i]) as UserRoles)\r\n .filter((x) => !!x);\r\n\r\n if (this.form?.value?.roles[0]) {\r\n this.isSuperAdmin = true;\r\n }\r\n\r\n this.userSubmit.emit({\r\n email: this.form?.value?.email,\r\n phoneNumber: this.form?.value?.phone,\r\n name: this.form?.value?.name,\r\n surname: this.form?.value?.surname,\r\n title: this.form?.value?.title,\r\n location: this.form?.value?.location,\r\n birthday: this.form?.value?.birthday || null,\r\n image: this.file,\r\n password: this.form?.value?.password,\r\n tenantId: this.form?.value?.tenant || null,\r\n roles: roles,\r\n });\r\n\r\n this.form?.markAsUntouched();\r\n }\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-user-header-image',\r\n templateUrl: './user-header-image.component.html',\r\n styleUrls: ['./user-header-image.component.scss']\r\n})\r\nexport class UserHeaderImageComponent implements OnInit {\r\n readonly DEFAULT_BACKGROUND = 'assets/img/background_default.webp';\r\n\r\n @Input() background: string | null = null;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n onProfileClick($event: Event) {\r\n $event.stopPropagation();\r\n }\r\n}\r\n","
    \r\n
    \r\n
    \r\n \"\"\r\n
    \r\n \r\n
    \r\n
    ","
    \r\n
    \r\n
    \r\n
    Change password
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n ","import { Component, EventEmitter, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { PasswordChangeRequest } from 'src/app/state/auth.repository';\r\n\r\n@Component({\r\n selector: 'app-change-password-form',\r\n templateUrl: './change-password-form.component.html',\r\n styleUrls: ['./change-password-form.component.scss']\r\n})\r\nexport class ChangePasswordFormComponent implements OnInit {\r\n form?: UntypedFormGroup;\r\n\r\n @Output() passwordSubmit = new EventEmitter();\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n currentPassword: ['', Validators.required],\r\n password: ['', Validators.required],\r\n });\r\n }\r\n\r\n onSubmit() {\r\n if (this.form && !this.form.valid) {\r\n this.form.markAllAsTouched();\r\n return;\r\n }\r\n this.passwordSubmit.emit({\r\n password : this.form?.value?.password,\r\n currentPassword : this.form?.value?.currentPassword,\r\n });\r\n this.form?.markAsUntouched();\r\n }\r\n}\r\n","\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { filterNil } from '@ngneat/elf';\r\nimport { Observable, switchMap, tap } from 'rxjs';\r\nimport {\r\n AuthRepository,\r\n PasswordChangeRequest,\r\n} from 'src/app/state/auth.repository';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\nimport { User, UsersRepository } from 'src/app/state/users.repository';\r\nimport { UsersService } from 'src/app/state/users.service';\r\n\r\n@Component({\r\n selector: 'app-profile-edit',\r\n templateUrl: './profile-edit.component.html',\r\n styleUrls: ['./profile-edit.component.scss'],\r\n})\r\nexport class ProfileEditComponent implements OnInit {\r\n userData$?: Observable;\r\n id?: string;\r\n submitErrors: string[] | null = null;\r\n\r\n constructor(\r\n public repo: AuthRepository,\r\n private auth: AuthService,\r\n private users: UsersRepository,\r\n private usersService: UsersService,\r\n private service: UsersService,\r\n private router: Router\r\n ) {\r\n this.usersService.load().subscribe();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.repo.id$\r\n .pipe(\r\n filterNil(),\r\n switchMap((id) => this.service.loadOne(id))\r\n )\r\n .subscribe();\r\n this.userData$ = this.repo.id$.pipe(\r\n filterNil(),\r\n switchMap((id) => this.users.one(id)),\r\n tap((user) => (this.id = user?.id))\r\n );\r\n }\r\n\r\n onInfoSubmit(user: Partial) {\r\n this.submitErrors = null;\r\n if (!this.id) {\r\n throw 'Can not identify current user';\r\n }\r\n this.service.update(this.id, user).subscribe({\r\n complete: () => {\r\n this.auth.refresh().subscribe(() => this.router.navigate(['/profile']));\r\n },\r\n error: (data) => (this.submitErrors = data),\r\n });\r\n }\r\n\r\n onPasswordSubmit(dto: PasswordChangeRequest) {\r\n this.submitErrors = null;\r\n this.auth.changePassword(dto).subscribe({\r\n complete: () => {\r\n this.router.navigate(['/profile']);\r\n },\r\n error: (data) => (this.submitErrors = data),\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Store, createState, withProps, select } from '@ngneat/elf';\r\nimport { withEntities, selectAllEntities, upsertEntities, selectEntity, deleteEntities } from '@ngneat/elf-entities';\r\nimport { createRequestsCacheOperator, createRequestsStatusOperator, selectRequestStatus, updateRequestCache, updateRequestsStatus, withRequestsCache, withRequestsStatus } from '@ngneat/elf-requests';\r\nimport { combineLatest, map } from 'rxjs';\r\nimport { sortBy, SortOption, SortState } from 'src/app/modules/shared/pipes/sort.pipe';\r\nimport { Feature } from './feature.repository';\r\n\r\nexport interface Tenant {\r\n id: string;\r\n name: string;\r\n createdAt: Date;\r\n countOfUsers: number;\r\n image: File | null;\r\n imagePath: string;\r\n cvr: string;\r\n address: string;\r\n mainMail: string;\r\n maxAdministrators: number;\r\n maxDrivers: number;\r\n remarks: string;\r\n layoutNumber: number;\r\n phoneNumber: string;\r\n appSecretToken: string;\r\n agreementGrantToken: string;\r\n featureIds: string[];\r\n features: Feature[];\r\n}\r\n\r\nexport const tenantSortOptions: SortOption[] = [\r\n { label: $localize `:Sort label Name:Name`, property: 'name' },\r\n { label: $localize `:Sort label Number of users:Number of users`, property: 'countOfUsers' },\r\n { label: $localize `:Sort label Date:Date`, property: 'createdAt' }\r\n];\r\n\r\nexport interface TenantProps {\r\n sortBy: SortState;\r\n}\r\n\r\nconst { state, config } = createState(\r\n withProps({ \r\n sortBy: { parameter: tenantSortOptions[0], direction: 'asc'} \r\n }),\r\n withEntities(),\r\n withRequestsCache(), \r\n withRequestsStatus()\r\n);\r\nconst store = new Store({ name: 'tenants', state, config });\r\nexport const trackTenantRequestsStatus = createRequestsStatusOperator(store);\r\nexport const skipWhileTenantsCached = createRequestsCacheOperator(store);\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TenantsRepository {\r\n name = store.name;\r\n\r\n sort$ = store.pipe(select(state => state.sortBy));\r\n tenants$ = store.pipe(selectAllEntities());\r\n tenantsSorted$ = combineLatest([this.tenants$, this.sort$]).pipe(\r\n map(([list, sort]) => sortBy(list, sort))\r\n );\r\n isLoading$ = store.pipe(\r\n selectRequestStatus(this.name),\r\n map(x => x.value === 'pending')\r\n );\r\n isLoadingOne$ = (id: Tenant['id']) => store.pipe(\r\n selectRequestStatus(id),\r\n map(x => x.value === 'pending')\r\n );\r\n\r\n tenant = (id: string) => store.pipe(selectEntity(id));\r\n status = (id: string) => store.pipe(selectRequestStatus(id, { groupKey: store.name }));\r\n\r\n setSort(sortBy: SortState) {\r\n store.update((state) => ({\r\n ...state,\r\n sortBy\r\n }));\r\n }\r\n\r\n setTenants(posts: Tenant[]) {\r\n store.update(\r\n updateRequestCache(store.name),\r\n upsertEntities(posts),\r\n updateRequestsStatus([store.name], 'success')\r\n );\r\n }\r\n\r\n upsertTenant(post: Tenant) {\r\n store.update(\r\n updateRequestCache(post.id),\r\n upsertEntities([post]),\r\n updateRequestsStatus([post.id], 'success')\r\n );\r\n }\r\n\r\n remove(id: string): void {\r\n store.update(\r\n updateRequestCache(id),\r\n deleteEntities(id),\r\n updateRequestsStatus([id], 'success')\r\n );\r\n}\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { switchMap, tap } from 'rxjs/operators';\r\nimport { skipWhileTenantsCached, Tenant, TenantsRepository, trackTenantRequestsStatus } from \"./tenants.repository\";\r\n\r\nconst API = '/api/tenants';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TenantsService {\r\n constructor(private http: HttpClient, private repo: TenantsRepository) { }\r\n\r\n load() {\r\n return this.http\r\n .get(API)\r\n .pipe(\r\n tap((tenants) => this.repo.setTenants(tenants)), \r\n trackTenantRequestsStatus(this.repo.name),\r\n //skipWhileTenantsCached(this.repo.name)\r\n );\r\n }\r\n\r\n loadOne(id: string) {\r\n return this.http\r\n .get(`${API}/${id}`)\r\n .pipe(\r\n tap((tenant) => this.repo.upsertTenant(tenant)),\r\n trackTenantRequestsStatus(id),\r\n skipWhileTenantsCached(id)\r\n );\r\n }\r\n \r\n\r\n add(tenant: Partial) {\r\n const formData = new FormData();\r\n formData.append(\"file\", tenant.image!);\r\n\r\n return this.http\r\n .post(API, tenant)\r\n .pipe(\r\n tap((tenant) => this.repo.upsertTenant(tenant)),\r\n switchMap((tenant) => this.http.post(`${API}/${tenant.id}/file`, formData)),\r\n trackTenantRequestsStatus(`${this.repo.name}_add`)\r\n );\r\n }\r\n\r\n update(id: string, model: Partial) {\r\n return this.http\r\n .patch(`${API}/${id}`, model)\r\n .pipe(\r\n tap((tenant) => this.repo.upsertTenant(tenant)),\r\n switchMap((tenant) => {\r\n if (model.image) {\r\n const formData = new FormData();\r\n formData.append(\"file\", model.image);\r\n return this.http.post(`${API}/${id}/file`, formData);\r\n }\r\n return of(tenant);\r\n }),\r\n trackTenantRequestsStatus(id)\r\n );\r\n }\r\n\r\n delete(id: string): Observable {\r\n return this.http\r\n .delete(`${API}/${id}`)\r\n .pipe(\r\n tap(() => this.repo.remove(id))\r\n );\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { map } from 'rxjs/operators';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\nimport { User, UsersRepository } from 'src/app/state/users.repository';\r\nimport { UsersService } from 'src/app/state/users.service';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { TenantsService } from 'src/app/state/tenants.service';\r\nimport { TenantsRepository } from 'src/app/state/tenants.repository';\r\nimport { combineLatest } from 'rxjs';\r\nimport { DatalistOption } from 'src/app/modules/shared/components/datalist-select/datalist-select.component';\r\n\r\n@Component({\r\n selector: 'app-impersonation-modal',\r\n templateUrl: './impersonation-modal.component.html',\r\n styleUrls: ['./impersonation-modal.component.scss'],\r\n})\r\nexport class ImpersonationModalComponent implements OnInit {\r\n console = console;\r\n selectedUserId: string | undefined;\r\n userOptions$ = combineLatest([\r\n this.repo.allSorted$,\r\n this.tenantsRepo.tenants$,\r\n ]).pipe(\r\n map(([users, tenants]) =>\r\n users.map((x) => {\r\n let option: DatalistOption = {\r\n value: x.id,\r\n label: x.email,\r\n sublabel: `${x.name} ${x.surname}`,\r\n };\r\n if (x.tenantId && tenants && tenants.length) {\r\n const tenantName = tenants.find((t) => t.id === x.tenantId)?.name;\r\n if (tenantName) {\r\n option.sublabel += `${option.sublabel ? ' ' : ''}(${tenantName})`;\r\n }\r\n }\r\n return option;\r\n })\r\n )\r\n );\r\n\r\n constructor(\r\n public repo: UsersRepository,\r\n private service: UsersService,\r\n private auth: AuthService,\r\n private authRepo: AuthRepository,\r\n private tenantsService: TenantsService,\r\n private tenantsRepo: TenantsRepository,\r\n private router: Router\r\n ) {}\r\n\r\n ngOnInit(): void {}\r\n\r\n load() {\r\n this.service.load().subscribe();\r\n if (this.authRepo.isInRole(UserRoles.Superamin)) {\r\n this.tenantsService.load().subscribe();\r\n }\r\n }\r\n\r\n impersonate() {\r\n if (!this.selectedUserId) {\r\n return;\r\n }\r\n this.auth.impersonate(this.selectedUserId).subscribe(() => {\r\n let isAccessed = false;\r\n for (let role in UserRoles) {\r\n if (this.authRepo.isInRole(role)) {\r\n isAccessed = true;\r\n }\r\n }\r\n if (!isAccessed) {\r\n this.router.navigate(['/profile']);\r\n return;\r\n }\r\n this.router.navigate(['/']);\r\n });\r\n }\r\n}\r\n","\r\n\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    View application as..
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n","\r\n\r\n\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {{ item === 1 ? item + \" tur\" : item + \" ture\" }} \r\n
    \r\n

    {{i === 0 ? \"I dag\" : i === 1 ? \"Denne uge\" : i === 2 ? \"Denne måned\" : \"\"}}

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n Edit profile\r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { StatisticsService } from 'src/app/state/statistics.service';\r\nimport { Subscription, switchMap } from 'rxjs';\r\nimport { StatisticsRepository, TruckStatistics } from 'src/app/state/statistics.repository';\r\nimport { UsersService } from 'src/app/state/users.service';\r\nimport { TenantsService } from 'src/app/state/tenants.service';\r\n\r\n@Component({\r\n selector: 'app-profile',\r\n templateUrl: './profile.component.html',\r\n styleUrls: ['./profile.component.scss']\r\n})\r\nexport class ProfileComponent implements OnInit {\r\n tripStats = new Array(3);\r\n productStats = new Array(3);\r\n isLoaded = new Array(3).fill(false);\r\n subsctiptions = new Array();\r\n items = ['today', 'thisweek', 'thismonth']\r\n\r\n constructor(\r\n public repo: AuthRepository,\r\n private service: UsersService,\r\n private statsService: StatisticsService,\r\n private statsRepo: StatisticsRepository,\r\n private tenantsService: TenantsService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.subsctiptions.push(\r\n this.statsRepo.dayOwn$.subscribe(stats => this.setStats(0, stats))\r\n );\r\n this.subsctiptions.push(\r\n this.statsRepo.weekOwn$.subscribe(stats => this.setStats(1, stats))\r\n );\r\n this.subsctiptions.push(\r\n this.statsRepo.monthOwn$.subscribe(stats => this.setStats(2, stats))\r\n );\r\n\r\n this.statsService.load('day', true).pipe(\r\n switchMap(() => this.statsService.load('week', true)),\r\n switchMap(() => this.statsService.load('month', true))\r\n ).subscribe();\r\n \r\n this.load();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subsctiptions.forEach(s => s.unsubscribe());\r\n }\r\n\r\n load() {\r\n this.service.load().subscribe();\r\n if (this.repo.isInRole(UserRoles.Superamin)) {\r\n this.tenantsService.load().subscribe();\r\n }\r\n }\r\n\r\n setStats(index: number, stats?: TruckStatistics) {\r\n this.tripStats[index] = stats?.trips || 0;\r\n //this.productStats[index] = stats?.unloadedProducts || 0;\r\n this.isLoaded[index] = !!stats;\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n \r\n

    Reset your password

    \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n Already have password?\r\n
    \r\n

    \r\n \r\n

    \r\n

    Your password has been successfully changed

    \r\n Sign in\r\n
    \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\n\r\n\r\n@Component({\r\n selector: 'app-resetpassword',\r\n templateUrl: './resetpassword.component.html',\r\n styleUrls: ['./resetpassword.component.scss']\r\n})\r\nexport class ResetpasswordComponent implements OnInit {\r\n form = this.formBuilder.group({\r\n password: ['', Validators.required]\r\n });\r\n state: 'idle' | 'processing' | 'success' = 'idle';\r\n errors?: any;\r\n public token!:string;\r\n \r\n\r\n constructor(\r\n private auth: AuthService,\r\n private formBuilder: UntypedFormBuilder,\r\n private route: ActivatedRoute,\r\n public env: EnvState\r\n ) { \r\n this.route.queryParams.subscribe(params => {\r\n this.token = params['token'];\r\n localStorage.setItem('specialToken', this.token);\r\n });\r\n }\r\n\r\n ngOnInit(): void { \r\n \r\n }\r\n\r\n reset(): void {\r\n this.state = 'processing';\r\n this.errors = undefined;\r\n this.auth.reset(\r\n this.form.value.password,\r\n this.route.snapshot.queryParamMap.get('id') || '',\r\n this.route.snapshot.queryParamMap.get('token') || ''\r\n ).subscribe({\r\n complete: () => this.state = 'success', \r\n error: err => {\r\n this.state = 'idle'; \r\n this.errors = err;\r\n } \r\n });\r\n }\r\n}\r\n","
    \r\n
    \r\n \r\n

    Sign in now by entering
    your email and password

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n\r\n
    \r\n \r\n

    Forgot your password?

    \r\n
    \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { filter, map, take, withLatestFrom } from 'rxjs/operators';\r\nimport { EnvState } from 'src/app/modules/shared/helpers/env-state';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\n\r\n@Component({\r\n selector: 'app-signin',\r\n templateUrl: './signin.component.html',\r\n styleUrls: ['./signin.component.scss'],\r\n})\r\nexport class SigninComponent implements OnInit {\r\n title: any;\r\n loginForm = this.formBuilder.group({\r\n email: ['', [Validators.email, Validators.required]],\r\n password: ['', Validators.required],\r\n rememberMe: false,\r\n });\r\n\r\n private returnUrl$: Observable;\r\n\r\n constructor(\r\n private auth: AuthService,\r\n public repo: AuthRepository,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private formBuilder: UntypedFormBuilder,\r\n public env: EnvState\r\n ) {\r\n this.returnUrl$ = this.route.queryParamMap.pipe(\r\n map((params) => params.get('returnUrl') || '/')\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n this.repo.isAuthenticated$\r\n .pipe(\r\n filter((x) => x),\r\n take(1),\r\n withLatestFrom(this.returnUrl$)\r\n )\r\n .subscribe(([_, returnUrl]) => this.router.navigateByUrl(returnUrl));\r\n }\r\n\r\n private showTooltip() {\r\n var tooltiptriggerList = [].slice.call(\r\n document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')\r\n );\r\n tooltiptriggerList.map(function (e: any) {\r\n return new bootstrap.Tooltip(e);\r\n });\r\n }\r\n\r\n private renderError(err: any) {\r\n this.title = err.error;\r\n setTimeout(this.showTooltip);\r\n }\r\n\r\n login(): void {\r\n this.auth\r\n .login(\r\n this.loginForm.value.email,\r\n this.loginForm.value.password,\r\n this.loginForm.value.rememberMe\r\n )\r\n .subscribe({\r\n next: (x) => {\r\n let isAccessed = false;\r\n for (let role in UserRoles) {\r\n if (this.repo.isInRole(role)) {\r\n isAccessed = true;\r\n }\r\n }\r\n if (!isAccessed) {\r\n this.router.navigate(['/profile']);\r\n return;\r\n }\r\n },\r\n error: (err) => this.renderError(err),\r\n });\r\n }\r\n}\r\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n return operate((source, subscriber) => {\n let taking = false;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)));\n });\n}\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRoute, ParamMap, Router } from '@angular/router';\r\nimport { filterNil } from '@ngneat/elf';\r\nimport { StatusState } from '@ngneat/elf-requests';\r\nimport { combineLatest, distinctUntilChanged, filter, map, Observable, skipWhile, switchMap, take, tap } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UrlIdResolverService {\r\n\r\n constructor(\r\n private router: Router\r\n ) { }\r\n\r\n resolve(\r\n routeParams: Observable,\r\n loader: (id: string) => Observable,\r\n selector: (id: string) => Observable,\r\n status: (id: string) => Observable,\r\n idCallback?: (id: string) => void\r\n ) {\r\n const id$ = routeParams.pipe(\r\n map(param => param.get('id')!),\r\n distinctUntilChanged(),\r\n tap(id => idCallback ? idCallback(id) : null),\r\n filter(id => !!id && id !== 'new'),\r\n take(1)\r\n );\r\n id$.pipe(\r\n switchMap(id => loader(id))\r\n ).subscribe();\r\n return id$.pipe(\r\n switchMap(id => combineLatest([selector(id), status(id)])),\r\n skipWhile(([_, status]) => status.value === 'pending' || status.value === 'idle'),\r\n map(([model, _]) => model),\r\n tap(model => {\r\n if (!model) {\r\n this.router.navigate(['/not-found'], { skipLocationChange: true });\r\n }\r\n }),\r\n filterNil() \r\n );\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, tap } from 'rxjs';\r\nimport { Feature, FeatureRepository } from './feature.repository';\r\n\r\nconst API = '/api/features';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FeatureService {\r\n\r\n constructor(\r\n private http: HttpClient,\r\n protected repo: FeatureRepository\r\n ) { }\r\n\r\n load(): Observable {\r\n return this.http\r\n .get(API)\r\n .pipe(\r\n tap(res => this.repo.set(res)),\r\n this.repo.track(),\r\n this.repo.skipWhileCached()\r\n );\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n","import { Component, OnInit, Output, EventEmitter, Input, HostListener } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { DatalistOption } from 'src/app/modules/shared/components/datalist-select/datalist-select.component';\r\nimport { Feature, TenantFeatures } from 'src/app/state/feature.repository';\r\nimport { Tenant } from 'src/app/state/tenants.repository';\r\n\r\nconst FEATURE_NAMES: { [f:string]: string } = {\r\n [TenantFeatures.Accessory]: $localize `:Accessory label:Accessory`,\r\n [TenantFeatures.Cleaning]: $localize `:Cleaning label:Cleaning`,\r\n [TenantFeatures.ContactPerson]: $localize `:Contact person label:Contact person`,\r\n [TenantFeatures.Note]: $localize `:Note label:Note`,\r\n [TenantFeatures.Products]: $localize `:Products label:Products`,\r\n [TenantFeatures.Reference]: $localize `:Reference label:Reference`,\r\n [TenantFeatures.Vendor]: $localize `:Vendor label:Vendor`,\r\n [TenantFeatures.Order]: $localize `:Order label:Order`,\r\n [TenantFeatures.Economic]: $localize `:Economic label:E-conomic`,\r\n [TenantFeatures.EconomicOrder]: $localize `:EconomicOrder label:EconomicOrder`\r\n};\r\n\r\n@Component({\r\n selector: 'app-tenant-form',\r\n templateUrl: './tenant-form.component.html',\r\n styleUrls: ['./tenant-form.component.scss']\r\n})\r\nexport class TenantFormComponent implements OnInit {\r\n @Input() editedTenant?: Tenant | null;\r\n form?: UntypedFormGroup;\r\n file: File | null = null;\r\n\r\n @Input() set features(value: Feature[] | null) {\r\n if (!value) {\r\n this.featureOptions = null;\r\n } else {\r\n this.featureOptions = value.map(x => ({\r\n value: x.id,\r\n label: FEATURE_NAMES[x.name]\r\n }));\r\n }\r\n }\r\n\r\n @Output() tenantSubmit = new EventEmitter>();\r\n\r\n @HostListener('change', ['$event.target.files']) emitFiles(event: FileList) {\r\n if(this.form) {\r\n if((event && event.item(0)) instanceof File) {\r\n this.file = event && event.item(0);\r\n this.form.value.image = this.file;\r\n }\r\n }\r\n }\r\n\r\n featureOptions: DatalistOption[] | null = null;\r\n\r\n constructor(private formBuilder: UntypedFormBuilder) {\r\n }\r\n\r\n ngOnInit() {\r\n this.form = this.formBuilder.group({\r\n name: [this.editedTenant?.name, Validators.required],\r\n image: [this.editedTenant?.image],\r\n cvr: [this.editedTenant?.cvr],\r\n maxAdministrators: [this.editedTenant?.maxAdministrators, Validators.required],\r\n maxDrivers: [this.editedTenant?.maxDrivers, Validators.required],\r\n address: [this.editedTenant?.address],\r\n mainMail: [this.editedTenant?.mainMail],\r\n remarks:[this.editedTenant?.remarks],\r\n phoneNumber: [this.editedTenant?.phoneNumber],\r\n appSecretToken:[this.editedTenant?.appSecretToken],\r\n agreementGrantToken: [this.editedTenant?.agreementGrantToken],\r\n layoutNumber: [this.editedTenant?.layoutNumber || 0],\r\n featureIds: [this.editedTenant?.features?.map(x => x.id)]\r\n });\r\n }\r\n\r\n updateValue(control: string, value: any) {\r\n const controlObject = this.form?.get(control);\r\n controlObject?.setValue(value);\r\n controlObject?.markAsTouched();\r\n }\r\n\r\n onSubmit() {\r\n if (this.form && !this.form.valid) {\r\n this.form.markAllAsTouched();\r\n return;\r\n }\r\n this.tenantSubmit.emit({\r\n name: this.form?.value?.name.toString(),\r\n image: this.file,\r\n cvr: this.form?.value?.cvr,\r\n maxAdministrators: this.form?.value?.maxAdministrators,\r\n maxDrivers: this.form?.value?.maxDrivers,\r\n address: this.form?.value?.address,\r\n mainMail: this.form?.value?.mainMail,\r\n remarks: this.form?.value?.remarks,\r\n phoneNumber: this.form?.value?.phoneNumber,\r\n featureIds: this.form?.value?.featureIds,\r\n agreementGrantToken: this.form?.value?.agreementGrantToken,\r\n layoutNumber: this.form?.value?.layoutNumber,\r\n appSecretToken: this.form?.value?.appSecretToken\r\n });\r\n }\r\n}\r\n","

    Create tenant

    \r\n

    Edit tenant

    \r\n
    \r\n
    \r\n \r\n

    \r\n \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { UrlIdResolverService } from 'src/app/modules/shared/services/url-id-resolver.service';\r\nimport { FeatureRepository } from 'src/app/state/feature.repository';\r\nimport { FeatureService } from 'src/app/state/feature.service';\r\nimport { Tenant, TenantsRepository } from 'src/app/state/tenants.repository';\r\nimport { TenantsService } from 'src/app/state/tenants.service';\r\n\r\n@Component({\r\n selector: 'app-tenants-create-page',\r\n templateUrl: './tenants-create-page.component.html',\r\n styleUrls: ['./tenants-create-page.component.scss']\r\n})\r\nexport class TenantsCreatePageComponent implements OnInit {\r\n tenant$: Observable | null = null;\r\n id?: string;\r\n submitErrors: string[] | null = null; \r\n \r\n constructor(\r\n private tenantService: TenantsService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private repo: TenantsRepository,\r\n private urlId: UrlIdResolverService,\r\n private featureService: FeatureService,\r\n public featureRepo: FeatureRepository\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.tenant$ = this.urlId.resolve(\r\n this.activatedRoute.paramMap,\r\n id => this.tenantService.loadOne(id),\r\n id => this.repo.tenant(id),\r\n id => this.repo.status(id),\r\n id => this.id = id\r\n );\r\n this.loadData();\r\n }\r\n\r\n loadData() { \r\n this.featureService.load().subscribe();\r\n }\r\n\r\n createTenant(tenant: Partial) {\r\n this.submitErrors = null;\r\n let updateResult: Observable | undefined;\r\n if(this.id === 'new'){\r\n updateResult = this.tenantService.add(tenant);\r\n \r\n } else if(this.id){\r\n updateResult = this.tenantService.update(this.id , tenant);\r\n }\r\n if (updateResult) {\r\n updateResult.subscribe({\r\n complete: () => {\r\n this.router.navigate(['/tenants']);\r\n },\r\n error: data => this.submitErrors = data\r\n });\r\n } \r\n } \r\n}\r\n","
    \r\n
    \r\n \r\n
      \r\n
    • {{ option.label }}
    • \r\n
    \r\n \r\n
    \r\n
    \r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { SortOption, SortState } from 'src/app/modules/shared/pipes/sort.pipe';\r\n\r\n@Component({\r\n selector: 'app-sort-dropdown',\r\n templateUrl: './sort-dropdown.component.html',\r\n styleUrls: ['./sort-dropdown.component.scss']\r\n})\r\nexport class SortDropdownComponent implements OnInit {\r\n @Input() sortingOptions: SortOption[] = [];\r\n @Input() sorting: SortState | null = null;\r\n @Output() sortingChange = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ChangeDirection() {\r\n this.sortingChange.emit({\r\n parameter: this.sorting?.parameter || this.sortingOptions[0],\r\n direction: this.sorting?.direction === 'asc' ? 'desc' : 'asc'\r\n });\r\n }\r\n\r\n ChangeParam(parameter: SortOption) {\r\n this.sortingChange.emit({\r\n direction: this.sorting?.direction || 'asc',\r\n parameter\r\n });\r\n }\r\n}","\r\n {{ role[0] }}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-role-pin',\r\n templateUrl: './role-pin.component.html',\r\n styleUrls: ['./role-pin.component.scss']\r\n})\r\nexport class RolePinComponent implements OnInit {\r\n badges: string[] = [];\r\n\r\n @Input() set roles(value: string[]) {\r\n this.badges = value;\r\n setTimeout(() => this.tooltips());\r\n }\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n tooltips(): void {\r\n const tooltipTriggerList = [].slice.call(\r\n document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')\r\n );\r\n tooltipTriggerList.map(function (tooltipTriggerEl) {\r\n return new bootstrap.Tooltip(tooltipTriggerEl);\r\n });\r\n }\r\n\r\n}\r\n","
    \r\n \r\n \r\n
    \r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-entity-avatar',\r\n templateUrl: './entity-avatar.component.html',\r\n styleUrls: ['./entity-avatar.component.scss']\r\n})\r\nexport class EntityAvatarComponent implements OnInit {\r\n @Input() roles: string[] | undefined;\r\n @Input() alt: string | undefined;\r\n @Input() img: string | undefined;\r\n @Input() icon: string = 'bi-person';\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","\r\n
    \r\n
    \r\n
    \r\n \r\n Confirm your action\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n You are about to delete the following entry:\r\n

    \r\n

    {{ deleteText }}

    \r\n

    \r\n \r\n

    \r\n \r\n Please confirm your action by clicking Delete.\r\n

    \r\n

    {{ deleteMessage }}

    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n Delete only this trip\r\n \r\n
    \r\n
    \r\n \r\n \r\n Delete all trips in group\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n","import {\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n ViewChild,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-confirm-delete',\r\n templateUrl: './confirm-delete.component.html',\r\n styleUrls: ['./confirm-delete.component.scss'],\r\n})\r\nexport class ConfirmDeleteComponent {\r\n @Input() isMultipleDrivers: boolean = false;\r\n @Output() confirm = new EventEmitter();\r\n @Output() cancel = new EventEmitter();\r\n @Input() deleteCandidate: string = '';\r\n @Input() deleteButton: string = '';\r\n @Input() deleteText: string = '';\r\n @Input() deleteMessage: string = '';\r\n @Input() isReccurence: boolean = false;\r\n\r\n @ViewChild('isForOneDriver') isForOneDriver:\r\n | ElementRef\r\n | undefined;\r\n\r\n @ViewChild('isRecurred') isRecurred: ElementRef | undefined;\r\n\r\n addNewLines(str: string) {\r\n return str.replace(/\\n/g, '
    ');\r\n }\r\n confirmCall() {\r\n try {\r\n if (this.isMultipleDrivers) {\r\n this.confirm.emit({\r\n recurrence: this.isReccurence\r\n ? this.isRecurred?.nativeElement.checked\r\n : true,\r\n forOneDriver: this.isForOneDriver?.nativeElement.checked,\r\n });\r\n } else if (this.isReccurence) {\r\n this.confirm.emit(this.isRecurred?.nativeElement.checked);\r\n } else {\r\n this.confirm.emit(true);\r\n }\r\n } catch (s: any) {\r\n this.confirm.emit();\r\n }\r\n }\r\n constructor() {}\r\n}\r\n","\r\n\r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n

      {{tenant.name}}
      {tenant.countOfUsers, plural, =1 {1 user} other {{{tenant.countOfUsers}} users}}

      \r\n
      \r\n
      \r\n Order active\r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n Created {{tenant.createdAt | date:'longDate'}}\r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n \r\n Edit\r\n \r\n
      \r\n
      \r\n
      \r\n
      \r\n
    • \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { Tenant } from 'src/app/state/tenants.repository';\r\n\r\n@Component({\r\n selector: 'app-tenant-list',\r\n templateUrl: './tenant-list.component.html',\r\n styleUrls: ['./tenant-list.component.scss']\r\n})\r\nexport class TenantListComponent implements OnInit {\r\n @Input() tenants: Tenant[] | null = null; \r\n @Input() isDeleteDisabled = true;\r\n @Output() delete = new EventEmitter();\r\n deleteConfirmation: Tenant | null = null;\r\n \r\n constructor(public auth: AuthRepository) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n handleDeleteClick(tenant: Tenant) { \r\n if (!this.isDeleteDisabled) {\r\n this.delete.emit(tenant.id);\r\n }\r\n }\r\n\r\n isOrderInTenant(tenant: Tenant) {\r\n if(tenant.features) {\r\n return tenant.features.find(x => x.name === \"Order\");\r\n }\r\n return;\r\n }\r\n}\r\n","
    \r\n
    \r\n

    Tenants

    \r\n
    \r\n
    \r\n \r\n Add\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n

    \r\n \r\n
    \r\n
    \r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { SortOption, SortState } from 'src/app/modules/shared/pipes/sort.pipe';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { tenantSortOptions, TenantsRepository } from 'src/app/state/tenants.repository';\r\nimport { TenantsService } from 'src/app/state/tenants.service';\r\n\r\n@Component({\r\n selector: 'app-tenants-page',\r\n templateUrl: './tenants-page.component.html',\r\n styleUrls: ['./tenants-page.component.scss']\r\n})\r\nexport class TenantsPageComponent implements OnInit {\r\n sortOptions = tenantSortOptions;\r\n \r\n constructor(\r\n public repo: TenantsRepository, \r\n public service: TenantsService,\r\n public auth: AuthRepository\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.service.load().subscribe();\r\n }\r\n}\r\n","

    Create user

    \r\n

    Edit user

    \r\n
    \r\n \r\n \r\n \r\n
    \r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { filterNil } from '@ngneat/elf';\r\nimport { combineLatest, filter, map, Observable, of, skipWhile, switchMap, tap } from 'rxjs';\r\nimport { TenantsRepository } from 'src/app/state/tenants.repository';\r\nimport { TenantsService } from 'src/app/state/tenants.service';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { AuthService } from 'src/app/state/auth.service';\r\nimport { User, UsersRepository } from 'src/app/state/users.repository';\r\nimport { UserCreateUpdateDto, UsersService } from 'src/app/state/users.service';\r\nimport { UrlIdResolverService } from 'src/app/modules/shared/services/url-id-resolver.service';\r\n\r\n@Component({\r\n selector: 'app-users-create-page',\r\n templateUrl: './users-create-page.component.html',\r\n styleUrls: ['./users-create-page.component.scss']\r\n})\r\nexport class UsersCreatePageComponent implements OnInit {\r\n user$: Observable | null = null;\r\n id?: string;\r\n submitErrors: string[] | null = null;\r\n constructor(\r\n private usersService: UsersService,\r\n private tenantService: TenantsService,\r\n public tenantRepo: TenantsRepository,\r\n private auth: AuthRepository,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private repo: UsersRepository,\r\n private urlId: UrlIdResolverService,\r\n private authService: AuthService\r\n ) { }\r\n\r\n\r\n ngOnInit(): void {\r\n if (this.auth.isInRole(UserRoles.Superamin)) {\r\n this.tenantService.load().subscribe();\r\n }\r\n this.user$ = this.urlId.resolve(\r\n this.activatedRoute.paramMap,\r\n id => this.usersService.loadOne(id),\r\n id => this.repo.one(id),\r\n id => this.repo.statusOne(id),\r\n id => this.id = id\r\n );\r\n }\r\n \r\n onInfoSubmit(user: UserCreateUpdateDto) {\r\n this.submitErrors = null;\r\n if (!this.id) {\r\n throw 'Can not identify current user';\r\n }\r\n let updateResult: Observable | undefined;\r\n if (this.id === 'new') {\r\n updateResult = this.usersService.add(user);\r\n\r\n } else if (this.id) {\r\n updateResult = this.usersService.update(this.id, user);\r\n }\r\n if (updateResult) {\r\n updateResult.pipe(\r\n switchMap(() => this.auth.getId() === this.id \r\n ? this.authService.refresh()\r\n : of()\r\n )\r\n ).subscribe({\r\n complete: () => {\r\n this.router.navigate(['/users']);\r\n },\r\n error: data => this.submitErrors = data\r\n });\r\n }\r\n }\r\n}\r\n","
    \r\n \r\n
    ","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-pagination',\r\n templateUrl: './pagination.component.html',\r\n styleUrls: ['./pagination.component.scss']\r\n})\r\nexport class PaginationComponent implements OnInit {\r\n @Input() page: number = 1;\r\n @Input() set total(length: number) {\r\n this.pages = Array.from({ length }, (_, i) => i + 1);\r\n };\r\n @Output() pageChange = new EventEmitter();\r\n \r\n pages: number[] = [];\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
    \r\n \r\n \r\n
    \r\n\r\n\r\n","import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { DayjsService } from '../../services/dayjs.service';\r\n\r\n@Component({\r\n selector: 'app-import-export',\r\n templateUrl: './import-export.component.html',\r\n styleUrls: ['./import-export.component.scss'],\r\n})\r\nexport class ImportExportComponent implements OnInit {\r\n @Input() exportFactory?: () => Observable;\r\n @Input() importFactory?: (file: File) => Observable;\r\n\r\n @Input() filenamePrefix: string = '';\r\n @Input() filenameExtension: string = '.csv';\r\n @Input() titlePrefix: string = '';\r\n @Input() icon: string = 'bi bi-file-earmark-arrow-up';\r\n @Input() format: string = 'YYYY-MM-DD-HH-mm-ss';\r\n isExporting = false;\r\n isImporting = false;\r\n isImportError = false;\r\n\r\n @ViewChild('importExportLink') importExportLink!: ElementRef;\r\n @ViewChild('fileImport') fileImport!: ElementRef;\r\n\r\n constructor(public ngDay: DayjsService) {}\r\n\r\n ngOnInit(): void {}\r\n\r\n export() {\r\n if (!this.exportFactory) {\r\n return;\r\n }\r\n this.isExporting = true;\r\n this.exportFactory().subscribe({\r\n next: (url) => {\r\n this.importExportLink.nativeElement.href = url;\r\n const filename = this.format\r\n ? `${this.filenamePrefix}-${this.ngDay.dayjs().format(this.format)}${\r\n this.filenameExtension\r\n }`\r\n : `${this.filenamePrefix}${this.filenameExtension}`;\r\n this.importExportLink.nativeElement.setAttribute('download', filename);\r\n this.importExportLink.nativeElement.click();\r\n this.isExporting = false;\r\n },\r\n error: () => (this.isExporting = false),\r\n });\r\n }\r\n\r\n import(event: Event) {\r\n this.isImportError = false;\r\n if (!this.importFactory) {\r\n return;\r\n }\r\n const target = event.target as HTMLInputElement;\r\n if (!target.files || !target.files.length) {\r\n return;\r\n }\r\n this.isImporting = true;\r\n this.importFactory(target.files[0]).subscribe({\r\n next: () => this.resetImport(),\r\n error: () => {\r\n this.isImportError = true;\r\n this.resetImport();\r\n },\r\n });\r\n }\r\n\r\n resetImport() {\r\n this.fileImport.nativeElement.value = null;\r\n this.isImporting = false;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'findBy'\r\n})\r\nexport class FindByPipe implements PipeTransform {\r\n\r\n transform(array: any[], field: string, value: any): any {\r\n return array.find(x => x[field] === value);\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'prop'\r\n})\r\nexport class PropPipe implements PipeTransform {\r\n\r\n transform(value: any, propName: any): any {\r\n return value[propName];\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n

      \r\n {{user.name}} {{user.surname}}\r\n
      \r\n \r\n \r\n {{ tenants | findBy:'id':user.tenantId | prop:'name' }}\r\n \r\n {{user.email}}\r\n \r\n

      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n Created {{user.createdAt | date:'longDate'}}\r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n \r\n Edit\r\n \r\n
      \r\n
      \r\n
      \r\n
      \r\n
    • \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { Tenant } from 'src/app/state/tenants.repository';\r\nimport { User } from 'src/app/state/users.repository';\r\n\r\n@Component({\r\n selector: 'app-users-list',\r\n templateUrl: './users-list.component.html',\r\n styleUrls: ['./users-list.component.scss']\r\n})\r\nexport class UsersListComponent implements OnInit {\r\n @Input() users: User[] | null = null;\r\n @Input() tenants: Tenant[] | null = null;\r\n @Input() isDeleteDisabled = true;\r\n @Output() delete = new EventEmitter();\r\n deleteConfirmation: User | null = null;\r\n \r\n constructor(public auth: AuthRepository) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n \r\n handleDeleteClick(user: User) { \r\n if (!this.isDeleteDisabled) {\r\n this.delete.emit(user.id);\r\n }\r\n }\r\n}\r\n","
    \r\n
    \r\n

    Users

    \r\n
    \r\n
    \r\n \r\n \r\n Add\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { SortOption, SortState } from 'src/app/modules/shared/pipes/sort.pipe';\r\nimport { AuthRepository, UserRoles } from 'src/app/state/auth.repository';\r\nimport { TenantsRepository } from 'src/app/state/tenants.repository';\r\nimport { TenantsService } from 'src/app/state/tenants.service';\r\nimport { userSortOptions, UsersRepository } from 'src/app/state/users.repository';\r\nimport { UsersService } from 'src/app/state/users.service';\r\n\r\n@Component({\r\n selector: 'app-users-list-page',\r\n templateUrl: './users-list-page.component.html',\r\n styleUrls: ['./users-list-page.component.scss']\r\n})\r\nexport class UsersListPageComponent implements OnInit {\r\n sortOptions = userSortOptions;\r\n exportFactory = () => this.service.export();\r\n importFactory = (file: File) => this.service.import(file);\r\n\r\n constructor(public repo: UsersRepository,\r\n public tenantRepo: TenantsRepository,\r\n public service: UsersService,\r\n private tenantService: TenantsService,\r\n public auth: AuthRepository) { }\r\n\r\n ngOnInit(): void {\r\n this.service.reloadPage().subscribe();\r\n if (this.auth.isInRole(UserRoles.Superamin)) {\r\n this.tenantService.load().subscribe();\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { AuthGuard } from '../auth.guard';\r\nimport { ApphomelayoutComponent } from '../modules/core/layouts/apphomelayout/apphomelayout.component';\r\nimport { AppinnerlayoutComponent } from '../modules/core/layouts/appinnerlayout/appinnerlayout.component';\r\nimport { AuthlayoutComponent } from '../modules/core/layouts/authlayout/authlayout.component';\r\nimport { ForgetpasswordComponent } from '../modules/core/pages/forgetpassword/forgetpassword.component';\r\nimport { PagenotauthorizedComponent } from '../modules/core/pages/pagenotauthorized/pagenotauthorized.component';\r\nimport { PagenotfoundComponent } from '../modules/core/pages/pagenotfound/pagenotfound.component';\r\nimport { ProfileEditComponent } from '../modules/core/pages/profile-edit/profile-edit.component';\r\nimport { ProfileComponent } from '../modules/core/pages/profile/profile.component';\r\nimport { ResetpasswordComponent } from '../modules/core/pages/resetpassword/resetpassword.component';\r\nimport { SigninComponent } from '../modules/core/pages/signin/signin.component';\r\nimport { TenantsCreatePageComponent } from '../modules/core/pages/tenants-create-page/tenants-create-page.component';\r\nimport { TenantsPageComponent } from '../modules/core/pages/tenants-page/tenants-page.component';\r\nimport { UsersCreatePageComponent } from '../modules/core/pages/users-create-page/users-create-page.component';\r\nimport { UsersListPageComponent } from '../modules/core/pages/users-list-page/users-list-page.component';\r\nimport { UserRoles } from '../state/auth.repository';\r\n\r\nconst routes: Routes = [\r\n { path: '', redirectTo: '/home', pathMatch: 'full' },\r\n {\r\n path: '',\r\n component: AuthlayoutComponent,\r\n children: [\r\n {\r\n path: 'signin',\r\n component: SigninComponent,\r\n },\r\n {\r\n path: 'forgotpassword',\r\n component: ForgetpasswordComponent,\r\n },\r\n {\r\n path: 'resetpassword',\r\n component: ResetpasswordComponent,\r\n },\r\n ]\r\n },\r\n {\r\n path: '',\r\n component: ApphomelayoutComponent,\r\n canActivateChild: [AuthGuard],\r\n\r\n children: [\r\n {\r\n path:'profile',\r\n component: ProfileComponent\r\n },\r\n {\r\n path: 'tenants',\r\n component: TenantsPageComponent,\r\n canActivate: [AuthGuard],\r\n data: { authorize: UserRoles.Superamin }\r\n },\r\n {\r\n path: 'users',\r\n component: UsersListPageComponent,\r\n canActivate: [AuthGuard],\r\n data: { authorize: [ UserRoles.Superamin, UserRoles.TenantAdmin ] }\r\n }\r\n ]\r\n },\r\n {\r\n path: '',\r\n component: AppinnerlayoutComponent,\r\n canActivateChild: [AuthGuard],\r\n\r\n children: [\r\n {\r\n path: 'tenants/:id',\r\n component: TenantsCreatePageComponent,\r\n canActivate: [AuthGuard],\r\n data: { authorize: UserRoles.Superamin }\r\n },\r\n {\r\n path: 'users/:id',\r\n component: UsersCreatePageComponent,\r\n canActivate: [AuthGuard],\r\n data: { authorize: [UserRoles.Superamin, UserRoles.TenantAdmin] }\r\n },\r\n {\r\n path: 'profile/edit',\r\n component: ProfileEditComponent\r\n },\r\n ]\r\n },\r\n { path: 'unauthorized', component: PagenotauthorizedComponent },\r\n { path: 'pagenotfound', component: PagenotfoundComponent }\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forRoot(routes),\r\n ],\r\n exports: [RouterModule]\r\n})\r\nexport class CoreRoutingModule { }\r\n","
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { Accessory } from 'src/app/state/accessories.repository';\r\n\r\n@Component({\r\n selector: 'app-accessory-form',\r\n templateUrl: './accessory-form.component.html',\r\n styleUrls: ['./accessory-form.component.scss']\r\n})\r\nexport class AccessoryFormComponent implements OnInit {\r\n\r\n @Input() editedAccessory: Accessory | null = null;\r\n form: UntypedFormGroup | null = null; \r\n\r\n @Output() accessorySubmit = new EventEmitter>();\r\n\r\n constructor(private formBuilder: UntypedFormBuilder) {\r\n }\r\n\r\n ngOnInit() {\r\n this.form = this.formBuilder.group({\r\n name: [this.editedAccessory?.name, Validators.required], \r\n description: [this.editedAccessory?.description] \r\n });\r\n }\r\n\r\n onSubmit() {\r\n if (this.form && !this.form.valid) {\r\n this.form.markAllAsTouched();\r\n return;\r\n }\r\n let name = this.form?.value?.name.toString();\r\n let description = this.form?.value?.description?.toString();\r\n\r\n this.accessorySubmit.emit({ name, description });\r\n }\r\n\r\n}\r\n","

    Create accessory

    \r\n

    Edit accessory

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { UrlIdResolverService } from 'src/app/modules/shared/services/url-id-resolver.service';\r\nimport { AccessoriesRepository, Accessory } from 'src/app/state/accessories.repository';\r\nimport { AccessoriesService } from 'src/app/state/accessory.service';\r\n\r\n@Component({\r\n selector: 'app-accessory-create-page',\r\n templateUrl: './accessory-create-page.component.html',\r\n styleUrls: ['./accessory-create-page.component.scss']\r\n})\r\nexport class AccessoryCreatePageComponent implements OnInit {\r\n accessory$: Observable | null = null;\r\n id: string | undefined;\r\n submitErrors: string[] | null = null;\r\n\r\n constructor(\r\n private accessoryService: AccessoriesService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private repo: AccessoriesRepository,\r\n private urlId: UrlIdResolverService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.accessory$ = this.urlId.resolve(\r\n this.activatedRoute.paramMap,\r\n id => this.accessoryService.loadOne(id),\r\n id => this.repo.one(id),\r\n id => this.repo.statusOne(id),\r\n id => this.id = id\r\n );\r\n }\r\n\r\n createAccessory(accessory: Partial) {\r\n this.submitErrors = null;\r\n let updateResult: Observable | undefined;\r\n if(this.id === 'new'){\r\n updateResult = this.accessoryService.add(accessory);\r\n\r\n } else if(this.id){\r\n updateResult = this.accessoryService.update(this.id , accessory);\r\n }\r\n if (updateResult) {\r\n updateResult.subscribe({\r\n complete: () => {\r\n this.router.navigate(['/accessories']);\r\n },\r\n error: data => this.submitErrors = data\r\n });\r\n }\r\n }\r\n}\r\n","
  • \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n

    \r\n {{ title }}\r\n
    \r\n \r\n {{ subtitle }}\r\n \r\n

    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n Created {{ date | date:'longDate' }}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n Edit\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
  • \r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-model-card',\r\n templateUrl: './model-card.component.html',\r\n styleUrls: ['./model-card.component.scss']\r\n})\r\nexport class ModelCardComponent implements OnInit {\r\n @Input() title?: string;\r\n @Input() subtitle?: string;\r\n @Input() icon?: string;\r\n @Input() date?: Date;\r\n @Input() routerLinkBase!: string;\r\n @Input() roles?: string[];\r\n @Input() id!: string;\r\n @Input() isDeleteDisabled = true;\r\n @Input() isEditDisabled = false;\r\n @Input() returnUrl?: string;\r\n\r\n @Output() deleteClick = new EventEmitter();\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n handleDeleteClick($event: Event) {\r\n $event.preventDefault();\r\n if (!this.isDeleteDisabled) {\r\n this.deleteClick.emit();\r\n }\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n
    \r\n
      \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { Accessory } from 'src/app/state/accessories.repository';\r\n\r\n@Component({\r\n selector: 'app-accessory-list',\r\n templateUrl: './accessory-list.component.html',\r\n styleUrls: ['./accessory-list.component.scss']\r\n})\r\nexport class AccessoryListComponent implements OnInit {\r\n @Input() accessories: Accessory[] | null = null;\r\n @Output() delete = new EventEmitter();\r\n deleteConfirmation: Accessory | null = null;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n

    Accessories

    \r\n
    \r\n
    \r\n \r\n \r\n Add\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { AccessoriesRepository, accessorysSortOptions } from 'src/app/state/accessories.repository';\r\nimport { AccessoriesService } from 'src/app/state/accessory.service';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\n\r\n@Component({\r\n selector: 'app-accessory-page',\r\n templateUrl: './accessory-page.component.html',\r\n styleUrls: ['./accessory-page.component.scss']\r\n})\r\nexport class AccessoryPageComponent implements OnInit {\r\n sortOptions = accessorysSortOptions;\r\n exportFactory = () => this.service.export();\r\n importFactory = (file: File) => this.service.import(file);\r\n\r\n constructor(\r\n public service: AccessoriesService,\r\n public repo: AccessoriesRepository,\r\n public auth: AuthRepository\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.service.reloadPage().subscribe();\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { Cleaning } from 'src/app/state/cleaning.repository';\r\n\r\n@Component({\r\n selector: 'app-cleaning-form',\r\n templateUrl: './cleaning-form.component.html',\r\n styleUrls: ['./cleaning-form.component.scss']\r\n})\r\nexport class CleaningFormComponent implements OnInit {\r\n @Input() editedCleaning: Cleaning | null = null;\r\n form: UntypedFormGroup | null = null; \r\n\r\n @Output() cleaningSubmit = new EventEmitter>();\r\n\r\n constructor(private formBuilder: UntypedFormBuilder) {\r\n }\r\n\r\n ngOnInit() {\r\n this.form = this.formBuilder.group({\r\n name: [this.editedCleaning?.name, Validators.required] \r\n });\r\n }\r\n\r\n onSubmit() {\r\n if (this.form && !this.form.valid) {\r\n this.form.markAllAsTouched();\r\n return;\r\n }\r\n let name = this.form?.value?.name.toString(); \r\n\r\n this.cleaningSubmit.emit({ name});\r\n }\r\n}\r\n","

    Create cleaning

    \r\n

    Edit cleaning

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { filterNil } from '@ngneat/elf';\r\nimport { combineLatest, Observable } from 'rxjs';\r\nimport { filter, map, skipWhile, switchMap, tap } from 'rxjs/operators';\r\nimport { UrlIdResolverService } from 'src/app/modules/shared/services/url-id-resolver.service';\r\nimport { Cleaning, CleaningsRepository } from 'src/app/state/cleaning.repository';\r\nimport { CleaningsService } from 'src/app/state/cleaning.service';\r\n\r\n@Component({\r\n selector: 'app-cleaning-create-page',\r\n templateUrl: './cleaning-create-page.component.html',\r\n styleUrls: ['./cleaning-create-page.component.scss']\r\n})\r\nexport class CleaningCreatePageComponent implements OnInit {\r\n cleaning$: Observable | null = null;\r\n id: string | undefined;\r\n submitErrors: string[] | null = null;\r\n\r\n constructor(\r\n private cleaningService: CleaningsService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private repo: CleaningsRepository,\r\n private urlId: UrlIdResolverService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.cleaning$ = this.urlId.resolve(\r\n this.activatedRoute.paramMap,\r\n id => this.cleaningService.loadOne(id),\r\n id => this.repo.one(id),\r\n id => this.repo.statusOne(id),\r\n id => this.id = id\r\n );\r\n }\r\n\r\n createCleaning(cleaning: Partial) {\r\n this.submitErrors = null;\r\n let updateResult: Observable | undefined;\r\n if(this.id === 'new'){\r\n updateResult = this.cleaningService.add(cleaning);\r\n \r\n } else if(this.id){\r\n updateResult = this.cleaningService.update(this.id , cleaning);\r\n }\r\n if (updateResult) {\r\n updateResult.subscribe({\r\n complete: () => {\r\n this.router.navigate(['/cleanings']);\r\n },\r\n error: data => this.submitErrors = data\r\n });\r\n } \r\n }\r\n}\r\n","
    \r\n
    \r\n
    \r\n
      \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n ","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { Cleaning } from 'src/app/state/cleaning.repository';\r\n\r\n@Component({\r\n selector: 'app-cleaning-list',\r\n templateUrl: './cleaning-list.component.html',\r\n styleUrls: ['./cleaning-list.component.scss']\r\n})\r\nexport class CleaningListComponent implements OnInit {\r\n @Input() cleanings: Cleaning [] | null = null;\r\n @Output() delete = new EventEmitter();\r\n deleteConfirmation: Cleaning | null = null;\r\n \r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n

    Cleanings

    \r\n
    \r\n
    \r\n \r\n \r\n Add\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n","import { Component, OnInit } from '@angular/core';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { CleaningsRepository, cleaningsSortOptions } from 'src/app/state/cleaning.repository';\r\nimport { CleaningsService } from 'src/app/state/cleaning.service';\r\n\r\n@Component({\r\n selector: 'app-cleaning-page',\r\n templateUrl: './cleaning-page.component.html',\r\n styleUrls: ['./cleaning-page.component.scss']\r\n})\r\nexport class CleaningPageComponent implements OnInit {\r\n sortOptions = cleaningsSortOptions;\r\n exportFactory = () => this.service.export();\r\n importFactory = (file: File) => this.service.import(file);\r\n\r\n\r\n constructor(\r\n public service: CleaningsService,\r\n public repo: CleaningsRepository,\r\n public auth: AuthRepository\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.service.reloadPage().subscribe();\r\n }\r\n\r\n}\r\n","
    \r\n
    \r\n
    \r\n
    Company Information
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Company roles
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n
      \r\n
      \r\n
      \r\n \r\n \r\n
      \r\n
      \r\n
      \r\n
      Vendor
      \r\n

      Will be displayed in the vendors list

      \r\n
      \r\n
      \r\n
    • \r\n
    • \r\n
      \r\n
      \r\n
      \r\n \r\n \r\n
      \r\n
      \r\n
      \r\n
      Client
      \r\n

      Will be displayed in the clients list

      \r\n
      \r\n
      \r\n
    • \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport { AuthRepository } from 'src/app/state/auth.repository';\r\nimport { Company } from 'src/app/state/companies.repository';\r\nimport { TenantFeatures } from 'src/app/state/feature.repository';\r\n\r\n@Component({\r\n selector: 'app-company-form',\r\n templateUrl: './company-form.component.html',\r\n styleUrls: ['./company-form.component.scss']\r\n})\r\nexport class CompanyFormComponent implements OnInit {\r\n TenantFeatures = TenantFeatures;\r\n @Input() editedCompany: Company | null = null;\r\n form: UntypedFormGroup | null = null;\r\n\r\n @Output() companySubmit = new EventEmitter>();\r\n\r\n constructor(private formBuilder: UntypedFormBuilder,\r\n public authRepo: AuthRepository) {\r\n }\r\n\r\n ngOnInit() {\r\n this.form = this.formBuilder.group({\r\n name: [this.editedCompany?.name, Validators.required],\r\n idNumber: [this.editedCompany?.idNumber, Validators.required],\r\n email: [this.editedCompany?.email, Validators.email],\r\n phoneNumber: [this.editedCompany?.phoneNumber],\r\n address: [this.editedCompany?.address],\r\n zipCode: [this.editedCompany?.zipCode],\r\n city: [this.editedCompany?.city],\r\n canBeVendor: [this.editedCompany?.canBeVendor || false],\r\n canBeClient: [this.editedCompany?.canBeClient || false]\r\n });\r\n }\r\n\r\n onSubmit() {\r\n if (this.form && !this.form.valid) {\r\n this.form.markAllAsTouched();\r\n return;\r\n } \r\n\r\n this.authRepo.hasFeature$(TenantFeatures.Economic).subscribe(x => {\r\n this.companySubmit.emit({\r\n name: this.form?.value?.name,\r\n idNumber: this.form?.value?.idNumber,\r\n email: this.form?.value?.email,\r\n phoneNumber: this.form?.value?.phoneNumber,\r\n address: this.form?.value?.address,\r\n zipCode: this.form?.value?.zipCode,\r\n city: this.form?.value?.city,\r\n canBeVendor: x ? x : this.form?.value?.canBeVendor,\r\n canBeClient: this.form?.value?.canBeClient\r\n });\r\n });\r\n\r\n \r\n }\r\n\r\n\r\n}\r\n","

    Create company

    \r\n

    Edit company

    \r\n
    \r\n \r\n \r\n \r\n
    \r\n","import { Component, Inject, Input, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { UrlIdResolverService } from 'src/app/modules/shared/services/url-id-resolver.service';\r\nimport { CompaniesRepository, Company } from 'src/app/state/companies.repository';\r\nimport { CompaniesService } from 'src/app/state/companies.service';\r\n\r\n@Component({\r\n selector: 'app-company-create-page',\r\n templateUrl: './company-create-page.component.html',\r\n styleUrls: ['./company-create-page.component.scss']\r\n})\r\nexport class CompanyCreatePageComponent implements OnInit {\r\n company$: Observable | null = null;\r\n id: string | undefined;\r\n submitErrors: string[] | null = null;\r\n returnUrl: string | undefined;\r\n\r\n constructor(\r\n private companiesService: CompaniesService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private repo: CompaniesRepository,\r\n private urlId: UrlIdResolverService,\r\n ) {\r\n this.activatedRoute.queryParams.subscribe(params => {\r\n this.returnUrl = params['returnUrl'];\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.company$ = this.urlId.resolve(\r\n this.activatedRoute.paramMap,\r\n id => this.companiesService.loadOne(id),\r\n id => this.repo.one(id),\r\n id => this.repo.statusOne(id),\r\n id => this.id = id\r\n )\r\n }\r\n\r\n createCompany(company: Partial) {\r\n this.submitErrors = null;\r\n let updateResult: Observable | undefined;\r\n if(this.id === 'new'){\r\n updateResult = this.companiesService.add(company);\r\n\r\n } else if(this.id){\r\n updateResult = this.companiesService.update(this.id , company);\r\n }\r\n if (updateResult) {\r\n updateResult.subscribe({\r\n complete: () => {\r\n if (this.returnUrl === undefined) {\r\n this.returnUrl = \"/companies/clients\";\r\n }\r\n this.router.navigate([this.returnUrl]);\r\n },\r\n error: data => this.submitErrors = data\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { SortOption } from \"../modules/shared/pipes/sort.pipe\";\r\nimport { BaseRepository } from \"./abstract/base.repository\";\r\nimport { Column } from \"./columns.repository\";\r\n\r\n\r\nexport interface Template {\r\n id: string;\r\n name: string;\r\n createdAt: Date;\r\n description: string;\r\n showExtraData: boolean;\r\n isBeingUsed: boolean;\r\n columns: Column[];\r\n}\r\n\r\nexport const templatesSortOptions: SortOption[] = [\r\n { label: $localize`:Sort label Name:Name`, property: 'name' },\r\n {\r\n label: $localize`:Sort label Description:Description`,\r\n property: 'description',\r\n },\r\n { label: $localize`:Sort label Date:Date`, property: 'createdAt' },\r\n ];\r\n \r\n @Injectable({ providedIn: 'root' })\r\n export class TemplatesRepository extends BaseRepository